2025年5月
 123
45678910
11121314151617
18192021222324
25262728293031

カテゴリー

アーカイブ

ブログ統計情報

  • 114,770 アクセス


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.

WordPress サイドバーにテキスト追加

<hr/>
<div style="text-align : center ;" >
  <iframe src='/3D_Data/scene_js/cube_sj.html' name='frm_1' width='65%'> </iframe>
  <script src="/_lib/js/i_lib/2017.12/c_qr_img.js" > </script>
  <script> call_qr_img_href() ; </script>
  <hr/>広告<br/>
  <!-- admax sp --> <script src="//adm.shinobi.jp/s/4c50d8bcfb7ba3cdc7dd08d34af646cf"> </script>
  <!-- admax pc --> <script src="//adm.shinobi.jp/s/81f09af7fdcffc43a2018c06df975139"> </script>
</div>
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.

QR コード挿入のテスト

<div style=”text-align: center;”>
<script src =”/_lib/js/i_lib/2017.12/c_qr_img.js” > </script>
<script> call_qr_img_href() ; </script>
</div>



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.

QR コード生成

QRコードをどこかで使えないかと思いちょっと調べてみた.


先ず読取りから.
moto g5 や 107SH での読取りは,「公式QRコードリーダー”Q”」が良さそう.
 「機能一覧」には「読み取り内容コピー」とある.


今度は生成.
15 年位前に一度調べて,何か面倒そうなイメージがあったが…
検索すると,Y.Swetakeさんの「QR code CGI & PHP scripts」が多くヒットする.
QRcode Perl CGI & PHP scripts ver. 0.50」が最新の様で,「ver. 0.50j ( 2013/5/18)」をダウンロード.
それを解凍し,//ds115j/…/qr/qr_img/ 以下にコピー.
//…/php/qr_img.php を開くと,
 Fatal error: QRcode : Data do not exist. in /…/qr/qr_img/php/qr_img.php on line 88
 「QRcode Perl … トラブルシューティング」を見ると,qr_img.php?d=address とする必要があるとのこと.
 README.sjis にもちゃんと書いてある.


読取りでアドレスをメールなどで送信する方法は見つけた.
「設定」の中の「開く前に確認メッセージを表示」にチェックを付ける.
読取り後の確認画面に,「コピー」や「共有」のメニューが表示される.


2018/01/26 JavaScript 経由で,qr_img.php を呼び出し


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



* QRコードは(株)デンソーウェーブの登録商標です.

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

Connection to iwao.synology.me has been lost since 2017-12-01 14:07:12 +09:00

メールを確認していると,次の様な内容が
Dear user,
Connection to iwao.synology.me has been lost since 2017-12-01 14:07:12 +09:00. Please check the network connection of your DiskStation, and make sure its DDNS service is enabled.
Sincerely,
Synology Account


なぜかわからないが,192.168.11.1 の方が「デフォルトゲートウェイ」になっている.
192.168.11.1 は,Wi-Fi 接続側.
「コントロールパネル」のいろいろな設定を見ると確かに 192.168.11.1 の方が選択されている.
チェックを外したり,順番を入替えたりしても「有線」の方に変更できない.
結局,「ワイヤレス」-「ネットワークマップ」で,「ワイヤレスAP」に一度設定して戻すことで対応.

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

空のコンソール AP でビルドすると

空のコンソール AP プロジェクトを追加して,何度かビルドしていると…

--------------------構成: up_nView - Win32 Debug--------------------
コンパイル中...
up_nView.cpp
\\devs\...\__cpr_\straryfn.hxx(254) : error C2065: 'MessageCon' : 定義されていない識別子です。
\\devs\...\__cpr_\straryfn.hxx(254) : error C2146: 構文エラー : ';' が、識別子 'bar' の前に必要です。
\\devs\...\__cpr_\straryfn.hxx(254) : error C2065: 'bar' : 定義されていない識別子です。
\\devs\...\__cpr_\straryfn.hxx(258) : error C2228: '.SetBarInc' : 左側がクラス、構造体、共用体ではありません。
\\devs\...\__iwao\messbar.hxx(23) : warning C4005: 'MessageBar' : マクロが再定義されました。
        c:\documents...\up_nview\up_nview.cpp(19) : 'MessageBar' の前の定義を確認してください
Message::SetMessage      No Support MsgStr
\\devs\...\__iwao\enumfile.hxx(342) : error C2146: 構文エラー : ';' が、識別子 'bar' の前に必要です。
\\devs\...\__iwao\enumfile.hxx(346) : error C2228: '.SetBarInc' : 左側がクラス、構造体、共用体ではありません。
\\devs\...\__iwao\enumfile.hxx(412) : error C2146: 構文エラー : ';' が、識別子 'bar' の前に必要です。
\\devs\...\_.src\__iwao\enumfile.hxx(419) : error C2228: '.SetBarMax' : 左側がクラス、構造体、共用体ではありません。
\\devs\...\develop\_.src\__iwao\enumfile.hxx(420) : error C2228: '.SetBarInc' : 左側がクラス、構造体、共用体ではありません。
...
cl.exe の実行エラー
up_nView.exe - エラー 31、警告 1

「プリコンパイル済みヘッダーを自動的に使用」になっていることがあるので「…使用しない」に.

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.

WLI-UC-AG300N その後

DS115j に接続した Wi-Fi(WLI-UC-AG300N)が,またうまく動作しなくなった.

DS116 を追加してから DS115j での使用頻度は減っていた.
前回この現象を確認した頃は暑い時期だったので,それが影響しているものかと思っていた.
また,WLI-UC-AG300N の問題(個体差)だろうと勝手に思っていた.
DS116 を追加した時にも WLI-UC-AG300N を追加しているので,DS115j と交換してみた.
しかし,DS115j での現象は変わらない.つまり,WLI-UC-AG300N の問題ではなく DS115j でうまくないみたい.

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

wordpress の「パブリサイズ共有」

先日環境をここに移してから「パブリサイズ共有」設定がうまく機能していなかった.
今日確認するとうまく動作する様になっている.
特に設定を変更した覚えはないのに…
先日までは「設定」-「共有」と入って,設定後「変更を保存」しても,対象の所に登録されなかった.

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