หน้าเว็บ

วันจันทร์ที่ 30 ตุลาคม พ.ศ. 2560

เครื่องพิมพ์ barcode Zebra Stripe 600 Print แล้วเลขกระโดด ไม่ run ตามที่ต้องการ

เครื่องพิมพ์ barcode Zebra Stripe 600 Print แล้วเลขกระโดด ไม่ run ตามที่ต้องการ
ตอนสั่ง Print มี Error
Demonstration Print Mode. ตามรูป

จาก Error เกิดจากโปรแกรม เป็น Demo เข้า Help About ดู จะเห็นเป็น Demo Version

ตรวจดูที่เครื่อง เวลาไม่ตรง ทำให้เปิดโปรแกรม แล้ว เป็น Demo แก้ไขเรื่องเวลา ก็สามารถใช้งานได้ตามปกติ

Windows 10 : Add Driver Printer จาก Windows 7

Windows 10 : Add Driver Printer จาก Windows 7 Printer Epson lq-590
Windows XP เข้าไป Connect Printer จาก Windows 10

1. You have to see the printer in explorer - so you have to log into \\PR-ARTHIMA ComputerName (with valid credentials)
2. Select Add Printer - LOCAL Printer, new Local Port : \\PR-ARTHIMA\sharedPrinterName (e.g \\PR-ARTHIMA\epson lq-590 escp2)
3. If the port is in use, find it in existing Local Ports
4. Select Driver by have disk. and select printer we need.
5. Finish and Test Print.

https://superuser.com/questions/963755/how-to-connect-windows-xp-to-printer-connected-to-windows-10-pro

Windows 7 : Install Error

Windows 7 : Install Error
windows setup could not configure windows to run on this computer's hardware



Manually run msoobe.exe to finish the install
A possible resolution to this issue is to manually run the msoobe.exe program to allow the install to complete. Follow the steps below to manually run the msoobe.exe program:

Windows 7:

1.At the error screen, press Shift+F10 to open a command prompt.
2.Type cd \ and press Enter.
3.Type cd c:\windows\system32\oobe and press Enter.
4.Type msoobe and press Enter. The installation process should now automatically continue.
5.Remove the installation media and the system should finish the installation and boot into Windows.

Windows 10:

1.While on the screen where the error appears, press Shift+F10 to bring up the command prompt.
2.Type CD C:\windows\system32\oobe and hit Enter.
3.Type msoobe and hit Enter.
4.You may then be prompted to create an account name and password, and set the time and date. Click Finish when done.
NOTE: If this is a retail version of Windows 10, you may also be prompted to enter a product key for Windows 10. Enter the product key and click Finish.

5.The installation process should then complete and allow the computer to boot into Windows.

http://www.dell.com/support/article/us/en/19/SLN293812/-windows-setup-could-not-configure-to-run-on-this-computers-hardware--error-during-windows-7-or-windows-10-installation?lang=EN

Qnap : Problem maintaining CIFS mount from Ubuntu Virtual Machin Error Host is down

update Qnap To Version 4.3.3.0210 แล้วมีปัญหา Mount to ubuntu error Host is down

When it comes to the max SMB version - the control has not made it to the UI of the CAT1 systems, you need to call the readily available smb[N|NN]enable, and check the current settings using smb2status form the NAS shell:

Up to QTS 4.2.x, SMB 2.1 is the max available:

[~] # smb21enable
...

QTS 4.3.x will bring SMB up to the 3.0 subset available in SAMBA 4.4 to all QNAP Marvell Kirkwood NAS.

[~] # smb3enable
...

Check status:

[~] # smb2status

smbd (samba daemon) Version 4.4.9
smbd (samba daemon) is running.
max protocol SMB 3.0 enabled.

[~] # smb<TAB>
smb21enable smb2disable smb2enable smb2status smb3enable smbtools

reboot Qnap and mount again.

https://forum.qnap.com/viewtopic.php?t=132166

และเวลา Mount ต้องใส่ Version 3 ด้วย
  1. sudo mount -t cifs -o username=xxx,password=xxx  vers=3.0 //192.168.0.218/backup /BACKUP/BackupToQnap/


https://forum.qnap.com/viewtopic.php?t=132166

PHP : PHP ดึง rate จาก Web กสิกรใหม่มาแสดงใน Internet

ดยใช้วิธีดึงค่าจาก aspx ของ ธนาคารเลย
https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx

https://stackoverflow.com/questions/24134886/get-html-code-from-aspx-page-with-php
  1. <?php
  2. include_once("simple_html_dom.php");
  3. $url = 'https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx';
  4. $contents = htmlentities(file_get_contents($url));
  5. echo $contents;
  6.  
  7. ?>


สามารถส่งวันที่ เข้าไปได้ ก็จะได้ค่าเช่นกัน

  1. <?php
  2. include_once("simple_html_dom.php");
  3. $url = 'https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx?d=19&m=05&y=2017&r=0';
  4. $contents = htmlentities(file_get_contents($url));
  5. echo $contents;
  6.  
  7. ?>



เอาค่ามาใช้งานโดย ใช้ explode <div> เอา
https://stackoverflow.com/questions/20446598/get-div-content-from-external-website

  1. <?php
  2. include_once("simple_html_dom.php");
  3. $url = 'https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx';
  4. //$contents = htmlentities(file_get_contents($url));
  5. //$contents  = file_get_contents($url);
  6. //echo $contents;
  7. //exit;
  8.  
  9. // FIND THE DESIRED DIV
  10. $htm = file_get_contents($url);
  11. echo htmlentities($htm);
  12.  
  13. $strDate = '<div id="divRate"';
  14. $arrDate = explode($strDate, $htm);
  15. $arrDate = explode('</div', $arrDate[1]);
  16.  
  17. // RECONSTRUCT THE DIV WITH HTML TAGS
  18. $new = $strDate . $arrDate[0] .'</div>';
  19.  
  20. echo htmlentities($new);
  21.  
  22. ?>


ตัวอย่าง Rate ข้อเสนอแนะคุณพเยาว์
https://intranet.scivalve.com/sci/AF/rate_bank.php
  1.  
  2. <?php
  3. error_reporting(E_ERROR);
  4. define('IN_PHPBB', true);
  5. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../';
  6. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  7. include($phpbb_root_path . 'common.' . $phpEx);
  8.  
  9. include($phpbb_root_path ."sci/include/config.php");
  10. //include($phpbb_root_path ."sci/include/db.php");
  11. include($phpbb_root_path ."sci/include/functions.php");
  12. //include($phpbb_root_path ."sci/include/db2.php");
  13.  
  14. include_once("simple_html_dom.php");
  15.  
  16. //$url = 'https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx?d=19&m=05&y=2017&r=0';
  17. $url = 'https://www.kasikornbank.com/TH/Rate/Pages/Foreign-Exchange.aspx';
  18. //$contents = htmlentities(file_get_contents($url));
  19. //$contents  = file_get_contents($url);
  20. //echo $contents;
  21. //exit;
  22.  
  23. // FIND THE DESIRED DIV
  24. $htm = file_get_contents($url);
  25. echo htmlentities($htm);
  26. /*
  27. $strDate = '<div id="divRate"';
  28. $arrDate = explode($strDate, $htm);
  29. $arrDate = explode('</div', $arrDate[1]);
  30.  
  31. // RECONSTRUCT THE DIV WITH HTML TAGS
  32. $new = $strDate . $arrDate[0] .'</div>';
  33.  
  34. echo htmlentities($new);
  35. */
  36.  
  37. //########### USD ############//
  38. $strDiv = '<div id="divLastRate"';
  39. $arrDiv = explode($strDiv, $htm);
  40.  
  41. $arrDiv = explode('</div>', $arrDiv[1]);
  42.  
  43. // RECONSTRUCT THE DIV WITH HTML TAGS
  44. $newDiv = $strDiv . $arrDiv[0] .'</div>';
  45.  
  46. //echo htmlentities($newDiv);
  47.  
  48. // Explode Data For Show Buying.
  49. $strBuyUSD = 'data-BuyTelex="';
  50. $arrBuyUSD = explode($strBuyUSD, $newDiv);
  51. $arrBuyUSD = explode('"', $arrBuyUSD[1]);
  52. $newBuyUSD = $arrBuyUSD[0];
  53.  
  54. //echo $newBuyUSD;
  55.  
  56. // Explode Data For Show Selling.
  57. $strSellUSD = 'data-SellChq="';
  58. $arrSellUSD = explode($strSellUSD, $newDiv);
  59. $arrSellUSD = explode('"', $arrSellUSD[1]);
  60. $newSellUSD = $arrSellUSD[0];
  61.  
  62. //echo $newSellUSD;
  63. //########### USD ############//
  64.  
  65. //########### CNY ############//
  66. $strDiv = '<div id="divLastRate"';
  67. $arrDiv = explode($strDiv, $htm);
  68. $arrDiv = explode('</div>', $arrDiv[1]);
  69.  
  70. // RECONSTRUCT THE DIV WITH HTML TAGS
  71. $newDiv = $strDiv . $arrDiv[10] .'</div>';
  72.  
  73. //echo htmlentities($newDiv);
  74.  
  75. // Explode Data For Show Buying.
  76. $strBuyCNY = 'data-BuyTelex="';
  77. $arrBuyCNY = explode($strBuyCNY, $newDiv);
  78. $arrBuyCNY = explode('"', $arrBuyCNY[1]);
  79. $newBuyCNY = $arrBuyCNY[0];
  80.  
  81. //echo $newBuyCNY;
  82.  
  83. // Explode Data For Show Selling.
  84. $strSellCNY = 'data-SellChq="';
  85. $arrSellCNY = explode($strSellCNY, $newDiv);
  86. $arrSellCNY = explode('"', $arrSellCNY[1]);
  87. $newSellCNY = $arrSellCNY[0];
  88.  
  89. //echo $newSellCNY;
  90. //########### CNY ############//
  91.  
  92. //########### EUR ############//
  93. $strDiv = '<div id="divLastRate"';
  94. $arrDiv = explode($strDiv, $htm);
  95. $arrDiv = explode('</div>', $arrDiv[1]);
  96.  
  97. // RECONSTRUCT THE DIV WITH HTML TAGS
  98. $newDiv = $strDiv . $arrDiv[12] .'</div>';
  99.  
  100. //echo htmlentities($newDiv);
  101.  
  102. // Explode Data For Show Buying.
  103. $strBuyEUR = 'data-BuyTelex="';
  104. $arrBuyEUR = explode($strBuyEUR, $newDiv);
  105. $arrBuyEUR = explode('"', $arrBuyEUR[1]);
  106. $newBuyEUR = $arrBuyEUR[0];
  107.  
  108. //echo $newBuyEUR;
  109.  
  110. // Explode Data For Show Selling.
  111. $strSellEUR = 'data-SellChq="';
  112. $arrSellEUR = explode($strSellEUR, $newDiv);
  113. $arrSellEUR = explode('"', $arrSellEUR[1]);
  114. $newSellEUR = $arrSellEUR[0];
  115.  
  116. //echo $newSellEUR;
  117. //########### EUR ############//
  118.  
  119. //########### GBP ############//
  120. $strDiv = '<div id="divLastRate"';
  121. $arrDiv = explode($strDiv, $htm);
  122. $arrDiv = explode('</div>', $arrDiv[1]);
  123.  
  124. // RECONSTRUCT THE DIV WITH HTML TAGS
  125. $newDiv = $strDiv . $arrDiv[13] .'</div>';
  126.  
  127. //echo htmlentities($newDiv);
  128.  
  129. // Explode Data For Show Buying.
  130. $strBuyGBP = 'data-BuyTelex="';
  131. $arrBuyGBP = explode($strBuyGBP, $newDiv);
  132. $arrBuyGBP = explode('"', $arrBuyGBP[1]);
  133. $newBuyGBP = $arrBuyGBP[0];
  134.  
  135. //echo $newBuyGBP;
  136.  
  137. // Explode Data For Show Selling.
  138. $strSellGBP = 'data-SellChq="';
  139. $arrSellGBP = explode($strSellGBP, $newDiv);
  140. $arrSellGBP = explode('"', $arrSellGBP[1]);
  141. $newSellGBP = $arrSellGBP[0];
  142.  
  143. //echo $newSellGBP;
  144. //########### GBP ############//
  145.  
  146. //########### HKD ############//
  147. $strDiv = '<div id="divLastRate"';
  148. $arrDiv = explode($strDiv, $htm);
  149. $arrDiv = explode('</div>', $arrDiv[1]);
  150.  
  151. // RECONSTRUCT THE DIV WITH HTML TAGS
  152. $newDiv = $strDiv . $arrDiv[14] .'</div>';
  153.  
  154. //echo htmlentities($newDiv);
  155.  
  156. // Explode Data For Show Buying.
  157. $strBuyHKD = 'data-BuyTelex="';
  158. $arrBuyHKD = explode($strBuyHKD, $newDiv);
  159. $arrBuyHKD = explode('"', $arrBuyHKD[1]);
  160. $newBuyHKD = $arrBuyHKD[0];
  161.  
  162. //echo $newBuyHKD;
  163.  
  164. // Explode Data For Show Selling.
  165. $strSellHKD = 'data-SellChq="';
  166. $arrSellHKD = explode($strSellHKD, $newDiv);
  167. $arrSellHKD = explode('"', $arrSellHKD[1]);
  168. $newSellHKD = $arrSellHKD[0];
  169.  
  170. //echo $newSellHKD;
  171. //########### HKD ############//
  172.  
  173. //########### JPY ############//
  174. $strDiv = '<div id="divLastRate"';
  175. $arrDiv = explode($strDiv, $htm);
  176. $arrDiv = explode('</div>', $arrDiv[1]);
  177.  
  178. // RECONSTRUCT THE DIV WITH HTML TAGS
  179. $newDiv = $strDiv . $arrDiv[18] .'</div>';
  180.  
  181. //echo htmlentities($newDiv);
  182.  
  183. // Explode Data For Show Buying.
  184. $strBuyJPY = 'data-BuyTelex="';
  185. $arrBuyJPY = explode($strBuyHKD, $newDiv);
  186. $arrBuyJPY = explode('"', $arrBuyHKD[1]);
  187. $newBuyJPY = $arrBuyHKD[0];
  188.  
  189. //echo $newBuyJPY;
  190.  
  191. // Explode Data For Show Selling.
  192. $strSellJPY = 'data-SellChq="';
  193. $arrSellJPY = explode($strSellJPY, $newDiv);
  194. $arrSellJPY = explode('"', $arrSellJPY[1]);
  195. $newSellJPY = $arrSellJPY[0];
  196.  
  197. //echo $newSellJPY;
  198. //########### JPY ############//
  199.  
  200. //########### MYR ############//
  201. $strDiv = '<div id="divLastRate"';
  202. $arrDiv = explode($strDiv, $htm);
  203. $arrDiv = explode('</div>', $arrDiv[1]);
  204.  
  205. // RECONSTRUCT THE DIV WITH HTML TAGS
  206. $newDiv = $strDiv . $arrDiv[24] .'</div>';
  207.  
  208. //echo htmlentities($newDiv);
  209.  
  210. // Explode Data For Show Buying.
  211. $strBuyMYR = 'data-BuyTelex="';
  212. $arrBuyMYR = explode($strBuyHKD, $newDiv);
  213. $arrBuyMYR = explode('"', $arrBuyMYR[1]);
  214. $newBuyMYR = $arrBuyMYR[0];
  215.  
  216. //echo $newBuyMYR;
  217.  
  218. // Explode Data For Show Selling.
  219. $strSellMYR = 'data-SellChq="';
  220. $arrSellMYR = explode($strSellMYR, $newDiv);
  221. $arrSellMYR = explode('"', $arrSellMYR[1]);
  222. $newSellMYR = $arrSellMYR[0];
  223.  
  224. //echo $newSellMYR;
  225. //########### MYR ############//
  226.  
  227. //########### SGD ############//
  228. $strDiv = '<div id="divLastRate"';
  229. $arrDiv = explode($strDiv, $htm);
  230. $arrDiv = explode('</div>', $arrDiv[1]);
  231.  
  232. // RECONSTRUCT THE DIV WITH HTML TAGS
  233. $newDiv = $strDiv . $arrDiv[24] .'</div>';
  234.  
  235. //echo htmlentities($newDiv);
  236.  
  237. // Explode Data For Show Buying.
  238. $strBuySGD = 'data-BuyTelex="';
  239. $arrBuySGD = explode($strBuySGD, $newDiv);
  240. $arrBuySGD = explode('"', $arrBuySGD[1]);
  241. $newBuySGD = $arrBuySGD[0];
  242.  
  243. //echo $newBuySGD;
  244.  
  245. // Explode Data For Show Selling.
  246. $strSellSGD = 'data-SellChq="';
  247. $arrSellSGD = explode($strSellSGD, $newDiv);
  248. $arrSellSGD = explode('"', $arrSellSGD[1]);
  249. $newSellSGD = $arrSellSGD[0];
  250.  
  251. //echo $newSellSGD;
  252. //########### SGD ############//
  253.  
  254. ?>
  255.  

Windows 10 : Widows 10 Share Driver To Windows 7 Or Windows XP

Windows 10 : Widows 10 Share Driver To Windows 7 Or Windows XP

1. สำคัญมากถ้าเครื่อง Windows 10 ต่อ Printer และเป็นเครื่องที่จะ Share ให้เครื่องอื่น
ห้ามใช้ Driver ที่ update ผ่าน Windows มาใช้ เพราะจะ Share ไม่ได้
ต้องติดตั้ง Driver จากแผ่นหรือ Download มาติดตั้ง เท่านั้น ถึงจะ Share ให้เครื่องอื่นได้

2. Windows 10 ต้องเปิด Network and Sharing Center ในหัวข้อ File and printer sharing ทำการเลือก Turn on ให้เปิด
Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings


Link : https://www.windowssiam.com/add-printer-windows10/

3. Windows 7 สามารถเข้าไปที่เครื่องแล้วคลิก ที่ Printer ได้เลย
ส่วน Windows XP ต้องใช้วิธี Add Printer ผ่าน Local Port เอา คลิ๊ก ที่ชื่อเครื่อง ตรง ๆ ไม่ได้ จะให้ใส่รหัส และ error Operation could not be completed. Access is denied.
โดย
3.1 On a computer running Windows XP, open Control Panel-> Printers and Faxes and start Add Printer Wizard (Add printer)

3.2 Then select Local printer attached to this computer -> Create a new port -> Local Port

3.3 As a port name, specify the UNC address of the printer like this: \\Win10-PC1\SharedPrinterName (in our example it is \\192.168.1.22\HPLaserJet)
http://woshub.com/unable-to-connect-windows-10-shared-printer-to-windows-xp/

Axapta : Axapta Tab Active Code.

Axapta : Axapta Tab Active Code.

On Method Tab Use pageActivated for run code when click Tab.

public void pageActivated()
{
    ;
    print "555";
    super();
}