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

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

2025年6月
1234567
891011121314
15161718192021
22232425262728
2930  

カテゴリー

アーカイブ

ブログ統計情報

  • 116,142 アクセス


Rational B-Spline

Vd4 として w に設定してみたが,これで良いのか?

Vd3A	b_spline	(const Vd4& q0,const Vd4& q1,const Vd4& q2,const Vd4& q3,const long div_c)
{
	Vd3A	vd3a ;
	for (long index=0 ; index<=div_c ; index++) {
		double	t  = 1./div_c*index ;
		double	n0 = 1./6 * (1.-t)*(1.-t)*(1.-t) ;
		double	n1 = 1./2 * t*t*t - t*t + 2./3 ;
		double	n2 =-1./2 * t*t*t + 1./2 * t*t + 1./2 *t + 1./6 ;
		double	n3 = 1./6 * t*t*t ;
		double	px = ( (n0*q0.x)*q0.w + (n1*q1.x)*q1.w + (n2*q2.x)*q2.w + (n3*q3.x)*q3.w ) / ((n0)*q0.w + (n1)*q1.w + (n2)*q2.w + (n3)*q3.w) ;
		double	py = ( (n0*q0.y)*q0.w + (n1*q1.y)*q1.w + (n2*q2.y)*q2.w + (n3*q3.y)*q3.w ) / ((n0)*q0.w + (n1)*q1.w + (n2)*q2.w + (n3)*q3.w) ;
		double	pz = ( (n0*q0.z)*q0.w + (n1*q1.z)*q1.w + (n2*q2.z)*q2.w + (n3*q3.z)*q3.w ) / ((n0)*q0.w + (n1)*q1.w + (n2)*q2.w + (n3)*q3.w) ;
		vd3a.push_back(Vd3(px,py,pz)) ;
		}
	return	vd3a ;
	}

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

QR コードが表示されない?

いつからなのか不明だが,DS116 上の qr_img.php を使用している所で正しく表示されなくなっていた.
気付いたのは昨日の昼頃.

DS115j 上や,//itools.hp2.jp/Test/qr/ のものはうまく動作している.
//itools.hp2.jp/ は DS116 上のものを利用しているのでうまく表示されない.


「Web Station」-「PHP 設定」で,「PHP エラーメッセージ表示…」にチェック.

すると,次の様なエラー.
 Fatal error: Call to undefined function ImageCreate() in /…/php/qr_img.php on line 609
検索すると GD が動作していないとのこと.
gd にチェックを付けてうまく動作する様になった.
OFF にした覚えはないので,DS116 上の何かの更新で無効になってしまったのか?

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

スプライン

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

QR コード生成 – 2

次のコードを html 内に追加することで,html のを参照する QR コードを表示できます.

<script src ="//itl.mydns.jp/_lib/js/i_lib/2022.01/c_qr_img.js"> </script>
<script> call_qr_img_href() ; </script>

SiteMix ではうまく動作しなくなってしまいました.
以下は,以前の情報です.考え方などはそのまま使えるため残しています.


以前設定した「QR コード生成」を,もう少し汎用的に.
先ず,PHP が利用できるフリーのサーバを用意.
  SiteMix を利用.
  //itools.hp2.jp として登録.
QRcode Perl CGI & PHP scripts ver. 0.50」をサーバーに転送.
  
c_qr_img.js を転送.
  
これを利用したページ.
  //itools.hp2.jp/Test/qr/index.html


次の様なスクリプトを HTML の表示したいところに挿入する.
  <script src =”/Test/qr/c_qr_img.js” > </script>
  <script> call_qr_img_href() ; </script>
  <script> call_qr_img_free(“http://itl.mydns.jp”) ; </script>


src=”/Test/qr/c_qr_img.js” の部分は,”//itools.hp2.jp/Test/qr/c_qr_img.js” でテスト可能.
最終的には c_qr_img.js の次の所を,利用環境に合わせて編集してください.
   var domain = “//itools.hp2.jp” ;
   var qr_php = domain + “/Test/qr/qr_img/php/qr_img.php” ;




うまく動作しない時のチェック方法
QR コードが表示されない場合

JavaScript 内の qr_img.php の呼び出しが間違っている可能性があります.
ブラウザによっては「要素を調査」などで php を呼び出している部分を確認できます.


何も表示されない場合
JavaScript 自体をうまく呼び出せてない可能性があります.
html 内の呼び出し部分を確認してください.


c_qr_img.js

function	call_qr_img_php  (data,is_draw_data)
{
	var	domain	= 	"//itools.hp2.jp" ;
	var	qr_php	=	domain	+  "/Test/qr/qr_img/php/qr_img.php" ;
	{
		var	qr_img	=  "<img  src='"  +  qr_php  +  "?d="  +  data  +  "'>" ;
		document.write	(qr_img) ;
		}
	if (is_draw_data) {
		document.write	("<br/>") ;
		document.write	(data) ;
		}
	}

function	call_qr_img_href ()
{
	var	href	=	location.href ;
	call_qr_img_php	(href,true) ;
	}

function	call_qr_img_free (freeText)
{
	call_qr_img_php	(freeText,true) ;
	}

2018/06/29 追記
https に移行した関係で,SiteMix ではうまく動作しなくなってます.


2021/07/14 qr_img.php を呼出す JavaScript を修正

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

XP 環境で OpenGL での表示が…

WinXP 環境で OpenGL での表示が変になっている.

スムージングを無効にしていると正しく表示される.

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

Win10 1709 その後

内臓のディスク容量が少ないので,「ジャンクション」を利用して D にしていた.

C:\Users\Public\Documents>dir /a
 ドライブ C のボリューム ラベルは OS です
 ボリューム シリアル番号は 9899-964A です
 C:\Users\Public\Documents のディレクトリ
2018/01/21  13:56    <DIR>          .
2018/01/21  13:56    <DIR>          ..
2016/02/11  01:29    <JUNCTION>     Asus [C:\Public\Document\Asus]
2017/09/29  20:52               278 desktop.ini
2016/02/11  01:49    <JUNCTION>     Dropbox [C:\Public\Document\Dropbox]
2016/12/22  11:01    <DIR>          images
2016/02/11  01:27    <JUNCTION>     M... [C:\Public\Document\M...]
2016/02/11  01:16    <JUNCTION>     M... [C:\Public\Document\M...]
2015/07/10  18:55    <JUNCTION>     My Music [C:\Users\Public\Music]
2015/07/10  18:55    <JUNCTION>     My Pictures [C:\Users\Public\Pictures]
2015/07/10  18:55    <JUNCTION>     My Videos [C:\Users\Public\Videos]
2018/01/21  14:20    <DIR>          Temp
2016/02/11  01:26    <JUNCTION>     Tools [C:\Public\Document\Tools]
2016/02/20  16:28                 0 VC_Path.BAK
2016/02/20  16:31             2,563 VC_Path.txt
2016/12/21  23:45               168 web.config
2017/02/17  22:12    <DIR>          w_Conf
               4 個のファイル               3,009 バイト
              13 個のディレクトリ   3,028,328,448 バイトの空き領域

* 一部ディレクトリ名などは編集済み.
JUNCTION という情報は残っているようではあるが,D ドライブを正しく指していない.
確か,1607 でも一部(%Temp% 直下のジャンクション)がうまく引き継がれなかった.
ここが引き継げないのはわからなくもないが,Public\Documents 以下は何とかできないものか?

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

Win10 1709

T90Chi を使っていたら,1709 のアップデートの表示が出てきた.
特にその後にすることもなかったので,「更新して再起動」に.
予想はしていたがかなり時間がかかりそう.

結局,2 時間半くらいかかった.

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

template の利用

inline	tstring	x_To_tstring	(const i_64	v)	{	return	::i64tot	(v,10) ;	}
inline	tstring	x_To_tstring	(const u_64	v)	{	return	::u64tot	(v,10) ;	}
inline	tstring	x_To_tstring	(const long	v)	{	return	::i64tot	(v,10) ;	}
inline	tstring	x_To_tstring	(const int	v)	{	return	::i64tot	(v,10) ;	}
inline	tstring	x_To_tstring	(const float	v)	{	return	::To_tstring_rz	(v,0, 7) ;	}
inline	tstring	x_To_tstring	(const double	v)	{	return	::To_tstring_rz	(v,0,15) ;	}

template  <class V2>	tstring	V2_To_tstring(const V2& vt,LPCTSTR sp=_T(" "))
{
	tstring	str = ::x_To_tstring(vt.x) + sp ;
		str+= ::x_To_tstring(vt.y) + sp ;
	return	str ;
	}
template  <class V2>	tstring	V2_To_tstring(const std::vector<V2>& va,LPCTSTR sp2=_T("\t"),LPCTSTR sp=_T("\r\n"))
{
	tstring	str ;
	for (size_t index=0 ; index<va.size() ; index++) {
		str += ::V2_To_tstring<V2>(va[index],sp2) + sp ;
		}
	return	str ;
	}

次の様にすると, tstring pt_str = ::V2_To_tstring(pt2) ; C:\...\T_SplVw.cpp(99) : error C2667: 'V2_To_tstring' : 2 個のオーバーロード関数があいまいで最適な変換ができません。 C:\...\T_SplVw.cpp(99) : error C2668: 'V2_To_tstring' : オーバーロード関数の呼び出しを解決することができません。(新機能 ; ヘルプを参照)

呼出し方法を忘れるので…
  Vl2A pt2 ;
  tstring pt_str = ::V2_To_tstring<Vl2>(pt2) ;
他にも,
  ::V2_To_tstring<Vd2>(::ToVd2A(tuvs)) ;


Vxx_tstr.hxx

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

vector::assign

…\VC98\Include\VECTOR

	void assign(_It _F, _It _L)
		{erase(begin(), end());
		insert(begin(), _F, _L); }
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

SketchUp から …

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

IGES ファイル

どこまで対応可能か不明だが,IGES の仕様書を読んで自分用にまとめている途中…
https://mish.myds.me/Iwao/Doc/spec/3d/iges/iges.html

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

opkg install tree

以前 DS115j には tree コマンドを入れていたが,DS116 はまだだったので…

Iwao@DS116:/tmp/http$ sudo -i
Password:

root@DS116:~# opkg install tree
-ash: opkg: command not found

root@DS116:~# cd /var/services/homes/Iwao/
root@DS116:/var/services/homes/Iwao# source ./set_ds_inc.sh
root@DS116:/var/services/homes/Iwao# opkg -v
opkg version 0.1.8
root@DS116:/var/services/homes/Iwao# opkg install tree
Installing tree (1.7.0-1) to root...
Downloading http://pkg.entware.net/binaries/armv7/tree_1.7.0-1_armv7soft.ipk
Collected errors:
 * opkg_install_pkg: Package tree md5sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'.
 * opkg_install_cmd: Cannot install package tree.
root@DS116:/var/services/homes/Iwao# opkg update
Downloading http://pkg.entware.net/binaries/armv7/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/packages
root@DS116:/var/services/homes/Iwao# opkg install tree
Installing tree (1.7.0-1) to root...
Downloading http://pkg.entware.net/binaries/armv7/tree_1.7.0-1_armv7soft.ipk
Configuring tree.
root@DS116:/var/services/homes/Iwao# tree
.
├── gcc_test
│   ├── 20170922.out
│   ├── a.out
│   ├── editad
│   ├── EditAd.cpp
│   ├── edit_ad.php
│   └── T_P_ini.cpp
├── set_ds_inc.sh
├── Temp
│   └── rc.local
└── www
    └── dmp_   .php

3 directories, 9 files
tree コマンド実行
Synology NAS tree
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

html がダウンロードに…

html から php を呼出す様にするために,.htaccess に次の内容を追加.
 AddType application/x-httpd-php .php .html
一部の環境ではうまく動作するように見えたが,幾つかの環境でダウンロードになってしまう.


.htaccess を削除して,再度 html を開くと,またダウンロードになってしまう.
別のサーバ名(//mish.myds.me ではなく//ds116)から入ると,正しく表示出来る.
原因はブラウザのキャッシュで,クリアして正しく表示出来る様になった.

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

HDL-Z2WM2C2 メール設定

何時からかは不明だが HDL-Z2WM2C2 のメール設定が無効になっていたので…
メール設定 ZWS Manager
HDL-AH2W は,
LANDISK HDL-AHW メール設定
WDCloud はメールアドレスだけの指定.
WDCloud メール設定
WDCloud メール設定
DS115j
Synology NAS  DSM メール設定



https://dev.mish.work/wordpress/?s=Mail+Server

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

WN-AC1167R 追加

アクセスポイントとして WN-AC1167R を追加.
単に接続するだけならば,特に難しい部分はなし.
最初「APモード」としてうまく認識していなかったのか,AC アダプタを抜いて再起動.
ちょっと失敗したのが,有線 LAN が 100 M .
 パッケージの「有線 Giga」は誤解を招きそうと思う(私もちゃんと見てなくて勘違い).
 型番で G が付くものが有線 LAN を含む全ポート Gigabit 対応?


無線 LAN のチャンネルや帯域を設定は,AC1167R の IP アドレスが必要になる.
Magical Finder が必要で 107SH にインストール(Moto G5 は Android 7.0 のため?動作しない).

ここで表示される IP アドレスを PC のブラウザに入力して設定.


AC1167R に WD Cloud をつなげたので,次のアラートが…
 イベント タイトル:10/100 でイーサネット ポート %1 に接続されています
 イベント タイトル:ネットワーク リンク停止
再起動したりしているので当然だが,ある時からほぼ毎日 2:00 と 9:00 にメールが来るようになっていた.
原因はルータ BL190HW の「省エネモード設定」で,とりあえず無効に.


設置してしばらくして気付いたのが,Web サーバが外からアクセスできなくなっていた.
LAN 内からは問題ないので,Web サーバの再起動と,ルータ BL190HW を再起動.


2017/11/07
WN-AC1167R の現在時刻が正しくない.1/1 にリセットされている.
また,「インターネットに接続されてない」という表示があった?
再起動して OK .


2017/11/08
Aterm WR9500N より,届く範囲が少し狭い様に感じる.
届きにくかった部屋は解消できているので,出力も少し押さえて利用.


2017/11/16
その後,特に問題なく安定しているように見える.


2018/02/15
Magical Finder for Andriod Version 4.0.0 Build 1115 で,Moto G5 でも動作する様になっている.


2018/02/28
107SH では動作しなくなった?


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

CObArray <--> CObList

CObList の形式のデータを配列として処理したかったので,その相互変換(Sort_ind.hxx 内).


#ifdef		_MFC_VER
//*******************************************************************************
//	ObList	->	ObArray
//	Create	:	2017/10/30
//*******************************************************************************
inline	bool	To_ObArray	(const CObList& src,CObArray* dstAry)
{
	if (dstAry == NULL)		{	return	false ;		}
	dstAry->RemoveAll() ;
	{
		POSITION pos = src.GetHeadPosition();
		while (pos != NULL)	{
			CObject*	pObj = src.GetNext(pos);
			dstAry->Add(pObj) ;
			}
		}
	return	true ;
	}

//*******************************************************************************
//	ObArray	->	ObList
//	Create	:	2017/10/30
//*******************************************************************************
inline	bool	To_ObList	(const CObArray& src,CObList* dstLst)
{
	if (dstLst == NULL)		{	return	false ;		}
	dstLst->RemoveAll() ;
	{
		for (INT_PTR index=0 ; index<src.GetSize() ; index++) {
			CObject*	pObj = src[index] ;
			dstLst->AddTail(pObj) ;
			}
		}
	return	true ;
	}

#endif	//	_MFC_VER
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

T5400 そろそろ…

Windows Update を行って,再起動.もう一回再起動.

340 の末期の頃と似た現象.


Aero などのトラブルシューティングに入っていくと,
「デスクトップ ウィンドウ マネージャーが無効になっている」.

意外とこの状態の方が表示周りはサクサク動いている様に感じる.


DiXiM Digital TV plus で再生ができない.


2017/10/20 今日はネットワークが見えなくなった.PC の再起動で対応.


2017/11/01 仮想マシンのマウス入力が効かなくなった.仮想 PC の再起動で対応.


2017/11/08
今度は,USB 機器が突然認識しなくなった.
接続し直したり,再起動してもダメ.
特に困ったのは,切替機(USH2-24SSV)に接続したキーボードとマウス.
さらに再起動して,別のポートにキーボードとマウスを接続してやっと認識できた.


2017/11/09
これとの関係ははっきりしないが,仮想 PC から NAS の参照で幾つかのファイルが開けない現象が発生.
他にも,Outlook のフォルダ構成が変わってしまい意図しない所に移動している?


2017/11/16
今日になって,ネットワークが不安定.

NAS やルータ,PC を再起動して何とかつながる様になったみたい.
Aero が動作する様になった.この再起動の時,Windows Update があったのでその影響か?

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

BRD-UT16WX その後

今年の初めの頃に BRD-UT16WX を追加したが,BD が見れなくてあまり活用できていなかった.
今日 CD を焼きたいと思い,IOPortal に行くと WinDVD が新しくなっている.
これをダウンロードしてインストール,
実行すると前回再生できなかった BTTF が見られるようになった.

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

NSZT-W64 地図更新

先週位からナビ起動時に,地図データ更新期限のメッセージ…
いつもお世話になっているトヨタの人に聞くと「面倒ですよ」とのこと.
個人的に躓いたのは次の内容.
 ナビ情報の登録
 予想以上の更新時間
 更新の失敗


ナビ情報の登録は,私の場合は「品番」と「シリアル」が必要でした.
トヨタ純正ナビ 型番 NSZT-W64 品番 08545-00W50 と シリアル
車台番号ではダメで,その画面の一番下で入力するのですが,それがわかり難かった.
また,ナビ本体でも確認できる様です.
 トヨタ純正カーナビNSZT-W64のシリアル番号の調べ方(SDカードの地図更新)


地図データの更新
「地図SDを抜かないで…」と出ているので,その間検索してみると 3 時間以上かかるとのこと.
手順なども含めこちらで詳しく書かれています.
 トヨタのナビ更新サービスのマップオンデマンドが結構大変な件
更新を行っていたのが昨日の夜だったので,そのまま放置.


画面を撮るのを忘れたのですが,確か 84/3468 で止まった状態.
 今思うと,PC がスリープに入ったのが原因?
検索すると,ちょっと表示は異なるのですが,
 地図データ更新(失敗) 地図SDリカバリー
 地図データ更新(失敗) 地図SDリカバリー 続きです
そこにある手順通りに,
 ユーザー情報削除
 ローカル地図データ削除
MapOnDemand を再起動して,zip のドロップから再度操作.
3 時間位かかって,やっと更新終了.
はっきりは分かりませんが,SD への書き込みが動作する前に止まっていたのではと思います.

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

外からの接続が不安定

朝見ると,http://itl.mydns.jp や http://iwao.synology.me などへの外からの接続ができなくなっていた.
外へのアクセスは特に問題なさそう.
先日 DS116 を追加して,いろいろいじったためと思ったが…
DS115j のログにエラーがある.
Error システム 2017/09/27 03:24:25 SYSTEM System failed to register [27.92..] to [xxx.jp] in DDNS server …


5 年以上前から 121.108…. から変更されなかったので,丁度良いと思っていたのに…
IP が変わったことにより,何かの整合性が取れてないのかもしれない.
ルータ,アクセスポイント,外からアクセスできるサーバなど,何度か再起動して落ち着いた?

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