ホーム » メモ (ページ 12)

メモ」カテゴリーアーカイブ

2025年4月
 12345
6789101112
13141516171819
20212223242526
27282930  

カテゴリー

アーカイブ

ブログ統計情報

  • 111,703 アクセス


3D ファイルの表示で黒?

個人的な形式の ipl .直接読込んで OpenGL で表示する様にコードを修正中…
表示すると黒くなる.
3D データの表示で黒くなる
STL などはそれなりの色で表示される.
ワイヤフレームなどでは,色で表示されている.
原因は,ipl では法線ベクトルを持っていないので 0,0,0 として表示されていた.
法線ベクトルを正しく設定しているので面の色で表示される


2021/12/27
GonsA GonsA_CalcNormal (const GonsA& gnsa_,…)

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ログが途中までしか表示されない

変なアクセスがあり,ログが途中までしか表示されなくなった.
‘\x0’ が含まれていて,そこを文字列の終わりと解釈しているためだった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

wordpress で更新できない

次の所を編集しようとして,「更新」を押しても反映されない.
https://mish.myds.me/wordpress/i-tools/about/
元に戻ってしまう.
一度ログアウトして,再度入ろうとすると入れない.
Synology NAS DS116 を再起動することで対応.


Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

C1076 ヒープの領域を…

——————–構成: MkCmf – Win32 Debug——————–
コンパイル中…
ComPrj03.cpp
c:\program files\microsoft visual studio\vc98\include\comip.h(46) : fatal error C1076: コンパイラの制限 : ヒープの領域を使い果たしました; 上限を設定するために /Zm オプションを使用してください。
cl.exe の実行エラー
ComPrj03.obj – エラー 1、警告 0


VC 7 では,
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ostream(632) : fatal error C1076: コンパイラの制限 : 内部ヒープの上限に達しました。上限を変更するには /Zm オプションを使用してください。


MSDN /Zm
コンパイルのオプションに /Zm150 を追加.
VC 6 /Zm の設定

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

template でのキャスト

次の様なベクトルの template .

	template <typename T>
	struct	Vector3 {
	//	...
		void	Normalize	(void)	{
			if (Length() > 0) {
				double	s = 1.0f / Length() ;
				x *= s;
				y *= s;
				z *= s;
				}
			}
	//	...
		T	x ;
		T	y ;
		T	z ;
		} ;	

double の時は問題ないが,float だとワーニング.
T(value) として対応.

				double	s = 1.0f / Length() ;
				x = T(x*s) ;
				y = T(y*s) ;
				z = T(z*s) ;	
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

システムメニューに項目の追加

あまり使用しないので,メモ.
「ダイアログベース」の AP に「設定」メニューの追加.
コードのサンプルなどは以下の所や,CXxxDlg::OnInitDialog .
MSDN CWnd::GetSystemMenu


IDS_… と IDM_… のリソースを追加.

	pSysMenu->AppendMenu(MF_SEPARATOR);
	pSysMenu->AppendMenu(MF_STRING, IDM_SETTING, _T("設定(&S)...")) ;	

今回は,面倒だったのでメニュー名は文字列として直接指定.


IDM_… の値は 0x0020 など.
メニューの「編集」-「リソース シンボル」で表示されるダイアログで追加する.
メニュー項目の IDM_... を追加する
CXxxxDlg::OnSysCommand でイベントを受け取る.

	if ((nID & 0xFFF0) == IDM_ABOUTBOX)	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
		}
	else if ((nID & 0xfff0) == IDM_SETTING) {
		OnSetting() ;
		}
	else 	{
		CDialog::OnSysCommand(nID, lParam);
		}	
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

pgons.Material::operator=(pgons1)

	d3D_PgonsA	pgsa = c3d.GetPgonsA() ;
	{
		d3D_PgonsA	pa_tri ;
		for (long index=0 ; index<pgsa.GetCount() ; index++) {
			d3D_Pgons1	pgns1 = pgsa[index] ;
			d3D_Pgons1	pgons = pgns1 ;
			{
					pgons = ::Pgons_ToTriangle(pgns1) ;
				//	pgons.SetColor  (pgns1.GetColor  ()) ;
				//	pgons.SetTexture(pgns1.GetTexture()) ;
				//	pgons.SetName   (pgns1.GetName   ()) ;
					pgons.Material::operator=(pgns1) ;
				}
			pa_tri.Add(pgons) ;
			}
		pgsa = pa_tri ;
		}
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

vector 型のデフォルト引数

あまり使うことがないかもしれないが…
関数に std::vector<Vd2> を渡す時,デフォルト引数を指定可能にしたかった.

	typedef	std::vector<Vd2>  Vd2A ;

	Vd2A	pnt2s = ::ToVd2A(pnts) ;
	v_Vd2A	v_v2a = ::V2_Triangulation(pnt2s) ;
		v_v2a = ::V2_Triangulation(pnt2s,ext2s) ;

	通常は上の呼び方だが,デバッグ用のデータのダンプで全体の範囲を与えたい時がある.
	上の方法では,デバッグ用のデータが個別の範囲となってしまう.

検索すると,[C++]const参照は一時変数にバインドできる
次の様に指定すれば良いとあった.
 const std::vector<int>& param = std::vector<int>()

v_Vd2A	V2_Triangulation	(const Vd2A& pnts,const Vd2A& ext2s=Vd2A())
{
	Poly_1_2D	ply2d(pnts) ;
	ply2d.AddPosition(ext2s) ;
	vv_long		tri_a = ply2d.Triangulation() ;
	Vd2A		tri_p = ply2d.GetPosition() ;
	v_Vd2A		tri_ary ;
	{
		//	...
		}
	return	tri_ary ;
	}
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

SVG スライドの埋め込み

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

https で鍵マークが…

https で鍵マークが消えてしまうことがあった.
最近アップロードしたページでは問題ない.

以前アップしてまだ修正が残っているページを見ると,
「このページの一部(画像など)は安全ではありません。」となる.

ここの画像を修正して OK になった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

PolyPolygon

あまり利用していないが,PolyPolygon を使ったコード.

	CArray<P2A,P2A>	p2aAry ;
	p2aAry.Copy(P2A_Ary) ;
	::P2AA_InvY(&p2aAry) ;
	CRect		rect ;
	m_Image.GetClientRect(rect) ;
	::P2AA_Scale(&p2aAry,rect) ;
	//	...
	CArray<CPoint,CPoint>	points ;
	CUIntArray		polyCounts ;
	int		nCount = ::P2AA_ToPointAry(p2aAry,&points,&polyCounts) ;
	CClientDC	dc(&m_Image) ;
	dc.PolyPolygon	(points.GetData(),  (int*)polyCounts.GetData(),nCount) ;
	//	...

P2A は 2 次元座標の配列で,一つの多角形を保持.
CArray<P2A,P2A> とすることにより,複数の多角形を持っている.
前半部分で表示用の座標に変換している.
次の様なデータの場合,2 次元座標の配列 points と,polyCounts が 9 と 8 ,nCount が 2 .

	
L
-1.390625,    6.5,        0,1,
 1.390625,    6.5,        0,1,
 5.640625,   -6.5,        0,1,
 3.734375,   -6.5,        0,1,
 2.21875,    -2.5,        0,1,
-2.21875,    -2.5,        0,1,
-3.75,       -6.5,        0,1,
-5.640625,   -6.5,        0,1,
-1.390625,    6.5,        0,1,
L
 1.59375,    -0.5,        0,1,
 0.734375,    2.203125,   0,1,
 0.28515625,  3.60546875, 0,1,
 0,           4.5,        0,1,
-0.2421875,   3.72265625, 0,1,
-0.59375,     2.640625,   0,1,
-1.59375,    -0.5,        0,1,
 1.59375,    -0.5,        0,1,

1つの多角形は閉じた状態で指定している.
ドキュメントには,次の様に書かれている.
「各多角形の最初の頂点と最後の頂点は、自動的に結ばれます。各頂点を 1 回だけ指定するべきです。」

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

DS115j と DS116 の熱状態

去年の夏は気付かなかったが,DS115j の本体の温度が高いので心配.

DS116 は気にならない.

実装しているハードディスクは,どちらも WD Red 3TB .
温度は,42 と 43 なので問題ない.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

RT-AC86U 追加 – 9

AiProtection で,PC の脆弱性保護と,感染デバイス検出.
原因や対応がわからないので,画面をコピー.

Client Device Infected WEB Cross-site Scripting-36



C&C Server www.google.kg

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

RT-AC86U 追加 – 8

週末になると増える気がする.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

http://mish.myds.me/… が審査を

http://mish.myds[.]me/… が審査を通過しませんでした.

原因を特定できなくて,そのままになっている.
それで,サイトをチェックするサイトへのリンク.
Google Transparency Report
Trend Micro Site Safety Center
Norton Safe Web
gred 無料のWeb安全チェックサービスといえばグレッド!


以前の http://iwao.synology.me で「再審査」をリクエストしたが,ダメだった.


2018/06/23
何とか通ったみたい.


Message type: [WNC-608000]
Search Console
http://mish.myds.me/ の審査が問題なく完了しました
http://mish.myds.me/ のウェブマスター様
セキュリティ審査のリクエストを受領し、処理いたしました。Google のシステムで、現在の http://mish.myds.me/ には有害なサイトやダウンロードへのリンクが含まれていないことを確認できましたのでお知らせいたします。サイトのユーザーに対して表示されていた警告は削除させていただきます。なお、この手続きには数時間かかることがありますのでご了承ください。
今後もサイトの安全を確保いただくため、以下の点にご注意ください。
1 攻撃からサイトを保護する
サイトのセキュリティが侵害される原因となった脆弱性を特定して解決し、管理アカウントのパスワードを変更してください。利用しているホスティング サービスに協力を要請することも検討してください。
2 望ましくないソフトウェアのポリシーを厳守する
サイトからダウンロードできるすべてのファイルが、ポリシーに明記されている基準を満たしていることを確認してください。これらの基準を満たしていないファイルは望ましくないソフトウェアと見なされます。
ポリシーを表示
サポートが必要な場合
• ヘルプセンターでマルウェアへの感染を防止する方法をご確認ください。
• プロダクト フォーラムに質問を投稿してください(その際はメッセージ タイプ [WNC-608000] の件である旨をお知らせください)。
Google LLC, 1600 Amphitheatre Parkway Mountain View, CA 94043 | このお知らせのメールは、Google Search Console にサイトが登録されているすべてのお客様にお送りしています。 このようなメッセージの配信を希望されない場合
パートナーを追加この Search Console アカウントについてのメッセージを受信するパートナーを追加できます

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

DS115j の動作が…

DS115j の動作が何かおかしい.
パッケージが幾つも更新された影響か?
それとも,WSR-300HP を含む無線 LAN 環境が不安定なためか?
今日も,DS115j に接続した WLI-UC-AG300N が動作していなかった.
パッケージの更新が動作しているのに気づいてから,更新に 1 時間程度かかっていた.
WSR-300HP と DS115j を再起動させて様子見.


Synology NAS に NTP 機能があることに気が付いた.
WSR-300HP の時間が頻繁に変になってしまうので,この DS116 で NTP サービスを有効に.
DS116 NTP サービスを有効に


2018/06/13
今日 DSM が更新されて DSM 6.2-23739 となった.
これが入るために予め他のパッケージが更新されたのか?

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

HDL-AH3.0W 追加

HDL-AH3.0W を追加.
LAN ケーブルを接続して,電源ケーブルを接続.電源 ON .
LAN 上で認識可能になるまでは,5 分位か?
NAS の設定画面に入るために IP アドレスが必要なため,Magical Finder で確認.
Magical Finder は,うまく認識しないこともあります.
IP アドレスが知りたいだけなので,ASUS ルータがあれば「ASUS Router」アプリでも可.
設定画面に入り,NarSuS への登録,LAN DISK の名称,メール設定
ファームウェアのアップデートがあったので,これも実施.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

std::setprecision

次の様なコードでビルドすると,
std::tout << … << std::setprecision(4) << x << _T(“\t”) << y << std::endl ;


——————–構成: GetX_5 – Win32 Debug——————–
コンパイル中…
GetX_5.cpp
c:\…\getx_5\getx_5.cpp(256) : error C2039: ‘setprecision’ : ‘std’ のメンバではありません。
c:\…\getx_5\getx_5.cpp(256) : error C2065: ‘setprecision’ : 定義されていない識別子です。
cl.exe の実行エラー
GetX_5.exe – エラー 2、警告 0


iomanip のインクルードが必要.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

error D8016: ‘/ZI’ と ‘/Gy-‘ は同時に…

VC 6 プロジェクトを VC 14 に変換してビルドすると,

------ ビルド開始: プロジェクト:GetX_1, 構成:Release Win32 ------
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(367,5): warning MSB8004: Intermediate Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(368,5): warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
  GetX_1.cpp
  GetX_1.vcxproj -> c:\Temp\Test\Fill\GetX_1\Release.140\GetX_1.exe
  GetX_1.vcxproj -> c:\Temp\Test\Fill\GetX_1\Release.140\GetX_1.pdb (Full PDB)
------ ビルド開始: プロジェクト:GetX_1, 構成:Debug Win32 ------
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(367,5): warning MSB8004: Intermediate Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(368,5): warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
cl : コマンド ライン error D8016: コマンド ライン オプション '/ZI' と '/Gy-' は同時に指定できません
========== ビルド: 1 正常終了、1 失敗、0 更新不要、0 スキップ ==========


/ZI と /Gy- は,
 デバッグ情報の形式   : エディット コンティニュのプログラム データベース (/ZI)
 関数レベルでリンクする : いいえ (/Gy-)

関数レベルでリンクする」をブランクに.
error D8016 への対応


かんたん Visual C++ [改訂3版


error D8016 : /clr /RTC1

Is this 投稿 useful? Useful Useless 4 of 5 people say this 投稿 is useful.

RT-AC86U 追加 – 7

「AiProtection」-「脆弱性保護」のログ.

2018/05/10 08:23:49 27.92.169.109 156.232.254.26 404 /phpMyAdmin/phpMyAdmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:49 27.92.169.109 156.232.254.26 404 /phpmyadmin/phpmyadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:46 27.92.169.109 156.232.254.26 404 /typo3/phpmyadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:45 27.92.169.109 156.232.254.26 404 /claroline/phpMyAdmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:45 27.92.169.109 156.232.254.26 404 /pma-old/index.php GET     Mozilla/5.0
2018/05/10 08:23:42 27.92.169.109 156.232.254.26 404 /phpmyadmin-old/index.php GET     Mozilla/5.0
2018/05/10 08:23:42 27.92.169.109 156.232.254.26 404 /tools/phpMyAdmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:39 27.92.169.109 156.232.254.26 404 /phpMyadmin_bak/index.php GET     Mozilla/5.0
2018/05/10 08:23:39 27.92.169.109 156.232.254.26 404 /xampp/phpmyadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:39 27.92.169.109 156.232.254.26 404 /myadmin2/index.php GET     Mozilla/5.0
2018/05/10 08:23:36 27.92.169.109 156.232.254.26 404 /phpmyadmin2/index.php GET     Mozilla/5.0
2018/05/10 08:23:35 27.92.169.109 156.232.254.26 404 /phpmyadmin1/index.php GET     Mozilla/5.0
2018/05/10 08:23:35 27.92.169.109 156.232.254.26 404 /phpmyadmin0/index.php GET     Mozilla/5.0
2018/05/10 08:23:32 27.92.169.109 156.232.254.26 404 /mysql-admin/index.php GET     Mozilla/5.0
2018/05/10 08:23:32 27.92.169.109 156.232.254.26 404 /mysqladmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:32 27.92.169.109 156.232.254.26 404 /admin/phpmyadmin2/index.php GET     Mozilla/5.0
2018/05/10 08:23:29 27.92.169.109 156.232.254.26 404 /admin/phpmyadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:29 27.92.169.109 156.232.254.26 404 /admin/mysql2/index.php GET     Mozilla/5.0
2018/05/10 08:23:29 27.92.169.109 156.232.254.26 404 /admin/mysql/index.php GET     Mozilla/5.0
2018/05/10 08:23:28 27.92.169.109 156.232.254.26 404 /admin/PMA/index.php GET     Mozilla/5.0
2018/05/10 08:23:25 27.92.169.109 156.232.254.26 404 /web/phpMyAdmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:25 27.92.169.109 156.232.254.26 404 /dbadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:25 27.92.169.109 156.232.254.26 404 /db/index.php GET     Mozilla/5.0
2018/05/10 08:23:22 27.92.169.109 156.232.254.26 404 /mysql/index.php GET     Mozilla/5.0
2018/05/10 08:23:22 27.92.169.109 156.232.254.26 404 /pmamy2/index.php GET     Mozilla/5.0
2018/05/10 08:23:22 27.92.169.109 156.232.254.26 404 /pmamy/index.php GET     Mozilla/5.0
2018/05/10 08:23:22 27.92.169.109 156.232.254.26 404 /PMA2/index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109 156.232.254.26 404 /pma/index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109 156.232.254.26 404 /pmd/index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109 156.232.254.26 404 /phpMyAdmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109 156.232.254.26 404 /phpmyadmin/index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109 156.232.254.26   /index.php GET     Mozilla/5.0
2018/05/10 08:23:18 27.92.169.109:80 156.232.254.26 404 /wls-wsat/CoordinatorPortType GET     Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0

2018/05/21
時々,ブロックされた情報が更新されなくなるので,定期的に再起動させる設定に.
ルータの設定で,「詳細設定」「管理」-「システム」.
「基本設定」-「リブートスケジューラーの有効化」で「はい」に.
「再起動指定日」と「再起動指定時間」を設定.


2018/05/28
ブロック情報が更新されなくなると?,「リブートスケジューラー」の動作も効かなくなる.


2018/07/06
今日も「リブートスケジューラー」の再起動後正しく動作しなくなった.
ランプは全て白だったので有線 LAN は動作していたのかもしれない.
6/17 にも似た様な現象になったが,この時は WAN LED が赤だった?
結局,「リブートスケジューラー」は OFF にして様子見.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.