ホーム » 2018 » 7月

月別アーカイブ: 7月 2018

2018年7月
1234567
891011121314
15161718192021
22232425262728
293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,334 アクセス



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.