ホーム » Iwao の投稿 (ページ 33)

作者アーカイブ: Iwao

2025年5月
 123
45678910
11121314151617
18192021222324
25262728293031

カテゴリー

アーカイブ

ブログ統計情報

  • 113,227 アクセス


Magical Finder + WN-AC1167R

moto g5 を Android 8.1 に更新した.

ダウンロードする所の評価はかなり低いが…
Android 7 の時もそうだったが,特に問題なし.

「Web設定画面を開く」で,正しく開くことができる.


Magical Finder は,IPv4 のアドレスを調べる程度の利用.
今は ASUS Router アプリ があるので,あまり必要ではない.

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

moto g5 Android 8.1

今日の朝 moto g5 の Android 8.1 へのアップデートが表示されていた.

ダウンロードに必要な容量が少し足りず,内蔵ストレージを 1.5 G 程空けてアップデート.

念のため,電源に接続.

ダウンロードとインストールに,それぞれ 30 分程度要した.

全てを確認できてないが,よく使用する AP は問題なさそう.
ちょっと気になるのが,画面の上下の「赤」がきつくなった.

前の様にもう少し柔らかい感じの方が良かった.

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

three.js で表示できない

ipl を WebGL で表示できる形式に変換しても,表示できないデータができてしまった.

本当は次の様に表示されなければならない.


vt と vn がない時にうまくない.
f 1// 2// 3// の様になってしまっていて,これをうまく処理してくれない.

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

STL(Stereolithography) 読込みで…

STL(Stereolithography,Standard Triangulated Language) バイナリ読込みで,VC 14 でビルドした exe でダウンする.
VC 6 でビルドしたものは通っているが,たまたまエラーにならなかっただけ.
コードは,

    {
        size_t  hStart = 0 ;
        v_char  head ;
        head.resize(STL_B_HEADER_SIZE+100,0x00) ;
        memmove(&head,&readBuf[hStart],sizeof(STL_B_HEADER_SIZE)) ;
        stl.SetName(::To_tstring(head).c_str()) ;
        }

::To_tstring で head を利用した時にエラーとなる.
ここをコメントにすると,ブロックを抜けた時に head の解放?でエラーになる.


memmove で &head ではなく &head[0] としなければならない.

正しくは,

    {
        size_t	hStart = 0 ;
        v_char	head ;
        head.resize(STL_B_HEADER_SIZE+100,0x00) ;
        memmove(&head[0],&readBuf[hStart],STL_B_HEADER_SIZE) ;
        stl.SetName(::To_tstring(head).c_str()) ;
        }

v_char は次の様に定義.
 typedef std::vector<char> v_char ;

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

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.

#define での括弧 …

STL バイナリのサイズをチェックする所でうまく判断できず,気が付くまで少し時間がかかったのでメモ.
   u_64 dataSize = STL_B_H_COUNT_SIZE + faceCount * STL_B_FACE_1_SIZE ;
   if (dataSize == fileSize) { return true ; }
STL_B_FACE_1_SIZE が 4*3*4+2 となっていて,84 + faceCount * 48 + 2 になってしまっていた.
括弧で括って 84 + faceCount * 50 で OK .
#define     STL_B_FACE_1_SIZE       (4*3*4+2)

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.

PC から SMS

PC から SMS が利用できないかと思い,調べてみた.
検索すると次の様な内容がヒットする.
Androidのメッセージ、PCブラウザからSMSの送受信が可能に
試してみたが,よくわからない.


2021/04/29
再度試すと,欲しかったものとは違う.

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.

Let’s Encrypt certificate expiration …

Let’s Encrypt からのメール.
Let’s Encrypt certificate expiration notice for domain “itl.mydns.jp” (and 1 more)
Hello,
Your certificate (or certificates) for the names listed below will expire in 20 days (on 11 Aug 18 06:35 +0000). Please make sure to renew your certificate before then, or visitors to your website will encounter errors.
We recommend renewing certificates automatically when they have a third of their total lifetime left. For Let’s Encrypt’s current 90-day certificates, that means renewing 30 days before expiration. See https://letsencrypt.org/docs/integration-guide/ for details.
itl.mydns.jp
mish.myds.me
For any questions or support, please visit https://community.letsencrypt.org/. Unfortunately, we can’t provide support by email.
Regards,
The Let’s Encrypt Team


どうも Synology NAS に,最初に登録したものに対して期限が迫っているということみたい.
Synology NAS の DSM は自動で更新してくれるそうなので,このまま様子見.


2018/08/01 再度,Lets’ Encrypt から.
Hello,
Your certificate (or certificates) for the names listed below will expire in 9 days (on 11 Aug 18 06:35 +0000). Please make sure to renew your certificate before then, or visitors to your website will encounter errors.
We recommend renewing certificates automatically when they have a third of their total lifetime left. For Let’s Encrypt’s current 90-day certificates, that means renewing 30 days before expiration. See https://letsencrypt.org/docs/integration-guide/ for details.
itl.mydns.jp
mish.myds.me
For any questions or support, please visit https://community.letsencrypt.org/. Unfortunately, we can’t provide support by email.
If you are receiving this email in error, unsubscribe at http://mandrillapp.com/track/unsub.php?u=30850198&id=547c6b491faf4f03b0ecc8cb3871a0b2.RsjpgIgXcXbPKK4%2Fg4vK9vppkUw%3D&r=https%3A%2F%2Fmandrillapp.com%2Funsub%3Fmd_email%3Diwao.n%2540ae.auone-net.jp
Regards,
The Let’s Encrypt Team

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.

SVG 脆弱性

wordpress で svg を追加しようとすると,
Arial__A.svg
このファイルタイプはセキュリティの観点から許可されていません。

SVG 脆弱性」で検索するといっぱい出てくる.
Blaze’s Security Blog Nemucod downloader spreading via Facebook
The Hacker News Spammers using Facebook Messenger to Spread Locky Ransomware
普通にファイルをアップロードできる場所を用意して,それを参照する方法で対応.

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.