- InventSumFinancial inventSumFinancial;
- InventDimParm inventDimParm;
- InventDim inventDim;
- ;
- //Set Dimensions.
- inventDimParm.InventLocationIdFlag = NoYes::No;
- inventDimParm.WMSLocationIdFlag = NoYes::No;
- inventDimParm.WMSPalletIdFlag = NoYes::No;
- inventDimParm.InventBatchIdFlag = NoYes::No;
- inventDimParm.InventSerialIdFlag = NoYes::No;
- inventDimParm.ConfigIdFlag = NoYes::No;
- inventDimParm.ItemIdFlag = NoYes::No;
- inventDimParm.ClosedFlag = NoYes::No;
- inventDimParm.InventColorIdFlag = NoYes::No;
- inventDimParm.InventSizeIdFlag = NoYes::No;
- inventSumFinancial = new InventSumFinancial(str2date(strfmt("31/12/%1", YearText -1), 123), ItemIdSelect, inventDim, inventDimParm);
- info(inventSumFinancial.qty());
วันพฤหัสบดีที่ 6 กันยายน พ.ศ. 2561
Axapta :: Axapta Finde Onhand Of Item As Of Date
Axapta :: Axapta Finde Onhand Of Item As Of Date
วันศุกร์ที่ 17 สิงหาคม พ.ศ. 2561
Home Assistant :: Home Assistant Send Mail Gmail SMTP
Home Assistant :: Home Assistant Send Mail Gmail SMTP
1. Config configuration.yaml
2. Insert code notification and set Gmail user password
3. Test Send mail select service menu and select service we create on stab 2.
insert Service Data Optional And click CALL SERVICE check mail.
4. Set Automation for send mail when track device ping down.
Add this code.
https://www.home-assistant.io/components/notify.smtp/
1. Config configuration.yaml
- cd /home/homeassistant/.homeassistant
- nano configuration.yaml
2. Insert code notification and set Gmail user password
- notify:
- - name: "SendMail"
- platform: smtp
- server: smtp.gmail.com
- port: 587
- timeout: 15
- sender: scivalve.suwit@gmail.com
- encryption: starttls
- username: scivalve.suwit@gmail.com
- password: Password Gmail
- recipient:
- - suwit.jph@gmail.com
- - komkid@gmail.com
- - seksan.kamt56@gmail.com
- sender_name: My Home Assistant
3. Test Send mail select service menu and select service we create on stab 2.
insert Service Data Optional And click CALL SERVICE check mail.
- {"message":"Test mail"}
4. Set Automation for send mail when track device ping down.
- nano automations.yaml
Add this code.
- - id: '1534491838266'
- alias: CheckPingDown
- trigger:
- - entity_id: device_tracker.sonoff
- platform: state
- condition:
- - after: '8:00'
- before: '18:00'
- condition: time
- - condition: state
- entity_id: device_tracker.sonoff
- state: not_home
- action:
- - data:
- message: Can't connect sonoff Garden. Please Check WIFI Or Sonoff.
- service: notify.sendmail
https://www.home-assistant.io/components/notify.smtp/
วันพฤหัสบดีที่ 16 สิงหาคม พ.ศ. 2561
Firefox :: Firefox ถามรหัส Proxy บ่อย ๆ
Firefox :: Firefox ถามรหัส Proxy บ่อย ๆ ใส่ไปแล้วสักพักขึ้นมาถามอีก ทั้ง ๆ ที่ใส่ Username และ Password ถูก
https://kb.globalscape.com/KnowledgebaseArticle10522.aspx
Firefox repeatedly prompts for proxy authentication
THE INFORMATION IN THIS ARTICLE APPLIES TO:
EFT Server (All versions)
SYMPTOM
When using Firefox through an ISA server, Firefox repeatedly prompts for proxy authentication, even though the correct credentials have been entered and applied.
RESOLUTION
To resolve this issue:
1. Open Firefox.
2. In the address bar, type about:config. A warning appears.
3. Click I'll be careful. I promise! A variety of configuration options appears.
4. In the Filter box, type network.negotiate.
5. Double-click network.negotiate-auth.allow-proxies to toggle between true and false. The option must be set to false. (It seems counterintuitive, but you set it to false to make it work with the ISA proxy.)
6. Click the Home icon to close the configuration window.
https://kb.globalscape.com/KnowledgebaseArticle10522.aspx
Firefox repeatedly prompts for proxy authentication
THE INFORMATION IN THIS ARTICLE APPLIES TO:
EFT Server (All versions)
SYMPTOM
When using Firefox through an ISA server, Firefox repeatedly prompts for proxy authentication, even though the correct credentials have been entered and applied.
RESOLUTION
To resolve this issue:
1. Open Firefox.
2. In the address bar, type about:config. A warning appears.
3. Click I'll be careful. I promise! A variety of configuration options appears.
4. In the Filter box, type network.negotiate.
5. Double-click network.negotiate-auth.allow-proxies to toggle between true and false. The option must be set to false. (It seems counterintuitive, but you set it to false to make it work with the ISA proxy.)
6. Click the Home icon to close the configuration window.
Pi-Hole :: Pi-hole Update Version
วันพุธที่ 15 สิงหาคม พ.ศ. 2561
Ubuntu :: Ubuntu set track ping to other host. For check online or down.
Ubuntu :: Ubuntu set track ping to other host. For check online or down.
Use php and bash shell run crontab. On Ubuntu 18.04
1. Install software.
2. Set timezone.
List
Set
3. Create file php.
insert code
4. Config send mail.
backup original file.
replace all code.
5. Test send mail.
6. Create file for check ping to other server.
insert code.
7. Test sell.
8. Set crontab. run bash file.
https://unix.stackexchange.com/questions/56340/bash-script-to-detect-when-my-server-is-down-or-offline
https://askubuntu.com/questions/3375/how-to-change-time-zone-settings-from-the-command-line
Use php and bash shell run crontab. On Ubuntu 18.04
1. Install software.
- sudo apt-get install apache2
- sudo apt install php libapache2-mod-php
- sudo apt-get install ssmtp mailutils mpack
2. Set timezone.
List
- timedatectl list-timezones
Set
- timedatectl set-timezone Asia/Bangkok
3. Create file php.
- nano /var/www/check-sonoff.php
insert code
- <?php
- $strDateTime = date("Y-m-d H:i:s");
- $strToPost = "\nFrom Home Assistan : {$strDateTime} \n";
- $ret = mail("komkid@gmail.com,suwit.jph@gmail.com,seksan.kamt56@gmail.com", "Internet Test Speed is low. Please Check Internet Connection.", $strToPost, "From: Proxy Server\n");$
- //$ret = mail("suwit.jph@gmail.com", "Can't connect sonoff Garden. Please Check WIFI Or Sonoff.", $strToPost, "From: Home Assistan \n");
- ?>
4. Config send mail.
backup original file.
- cp /etc/ssmtp/ssmtp.conf ssmtp.conf.backup
- nano /etc/ssmtp/ssmtp.conf
replace all code.
- #
- # Config file for sSMTP sendmail
- #
- # The person who gets all mail for userids < 1000
- # Make this empty to disable rewriting.
- #root=postmaster
- root=scivalve.suwit@gmail.com
- # The place where the mail goes. The actual machine name is required no
- # MX records are consulted. Commonly mailhosts are named mail.domain.com
- mailhub=mail
- mailhub=smtp.gmail.com:587
- # Where will the mail seem to come from?
- #rewriteDomain=
- # The full hostname
- #hostname=scivalve.suwit@gmail.com
- hostname=localhost
- # Are users allowed to set their own From: address?
- # YES - Allow the user to specify their own From: address
- # NO - Use the system generated From: address
- #FromLineOverride=YES
- AuthUser=MAIL GMAIL
- AuthPass=PASSWORD
- useSTARTTLS=YES
- TLS_CA_File=/etc/ssl/certs/ca-certificates.crt
5. Test send mail.
- /usr/bin/php /var/www/check-sonoff.php
6. Create file for check ping to other server.
- nano check-sonoff.sh
insert code.
- #!/bin/bash
- SERVERIP=192.168.0.210
- ping -c 3 $SERVERIP > /dev/null 2>&1
- if [ $? -ne 0 ]
- then
- # Call php file send mail here:
- /usr/bin/php /var/www/check-sonoff.php
- fi
7. Test sell.
- bash check-sonoff.sh
8. Set crontab. run bash file.
- #Check Ping Sonoff Every 1 Hours
- 0 8-18 * * 1-6 bash /check-sonoff.sh
https://unix.stackexchange.com/questions/56340/bash-script-to-detect-when-my-server-is-down-or-offline
https://askubuntu.com/questions/3375/how-to-change-time-zone-settings-from-the-command-line
Ubuntu :: PDFSam On Mint 19
Ubuntu :: PDFSam On Mint 19
1. ติดตั้ง PDFSam จาก Software Manager (ติดตั้งเสร็จจะ Run ไม่ได้) เพราะ ยังไม่ได้ติดตั้ง JAVA
ติดตั้งผ่านคำสั่งไม่ได้ ERROR Download File ไม่ได้
ต้องติดตั้งเอง Manual
2. Download java จาก เป็นตัว Ubuntu Linux x64
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
หรือ
\\datacenter\Software\#Freeware\Framework\Java8
ได้ไฟล์ jdk-8u181-linux-x64.tar.gz มา
3. Extract file
4. Create folder.
5. Move file to folder /opt/java
6. Install Java
7. Make JDK system default.
update-alternatives --set java /opt/java/jdk1.8.0_181/bin/java
8. Test installed java version. Show this.
9. Test open PDFSam worked.
This Link:
https://community.linuxmint.com/tutorial/view/1372
1. ติดตั้ง PDFSam จาก Software Manager (ติดตั้งเสร็จจะ Run ไม่ได้) เพราะ ยังไม่ได้ติดตั้ง JAVA
ติดตั้งผ่านคำสั่งไม่ได้ ERROR Download File ไม่ได้
- apt-get install oracle-java8-installer
ต้องติดตั้งเอง Manual
2. Download java จาก เป็นตัว Ubuntu Linux x64
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
หรือ
\\datacenter\Software\#Freeware\Framework\Java8
ได้ไฟล์ jdk-8u181-linux-x64.tar.gz มา
3. Extract file
- [code]tar -zxvf jdk-8u181-linux-x64.tar.gz[/code]
4. Create folder.
- mkdir -p /opt/java
5. Move file to folder /opt/java
- mv jdk1.8.0_181/ /opt/java
6. Install Java
- update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_181/bin/java" 1
7. Make JDK system default.
update-alternatives --set java /opt/java/jdk1.8.0_181/bin/java
8. Test installed java version. Show this.
- java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
9. Test open PDFSam worked.
This Link:
https://community.linuxmint.com/tutorial/view/1372
Axapta :: Axapta เลือกข้อมูลหน้า Onhand หลาย ๆ แถว จาก InventSum หลาย ๆ แถว
Axapta :: Axapta เลือกข้อมูลหน้า Onhand หลาย ๆ แถว จาก InventSum หลาย ๆ แถว
Form อื่น Table อื่นเดิมใช้ Code แบบนี้แต่ใช้ กับ InventSum แล้วไม่ออกได้แถวเดียวบรรทัดสุดท้ายที่เลือก
Code ที่ใช้งานได้กับ Form Onhand InventSum กรณีต้องการ Select หลาย ๆ Item แล้วนำ Item ไปใช้งานต่อ
https://axapta.mazzy.ru/forums/showthread.php?p=65533
Form อื่น Table อื่นเดิมใช้ Code แบบนี้แต่ใช้ กับ InventSum แล้วไม่ออกได้แถวเดียวบรรทัดสุดท้ายที่เลือก
- InventSum myInventSum;
- ;
- for (myInventSum = InventSum_ds.getFirst(true) ? InventSum_ds.getFirst(true) : InventSum_ds.cursor();
- myInventSum;
- myInventSum = InventSum_ds.getNext())
- {
- print myInventSum.ItemId;
- }
Code ที่ใช้งานได้กับ Form Onhand InventSum กรณีต้องการ Select หลาย ๆ Item แล้วนำ Item ไปใช้งานต่อ
- InventSum myInventSum;
- Common inventSumCommon;
- ;
- for(inventSumCommon = InventSum_ds.getFirst(1).TableId != tablenum(Common) ?
- InventSum_ds.getFirst(1) : InventSum_ds.cursor();
- inventSumCommon.TableId != tablenum(Common);
- inventSumCommon = InventSum_ds.getNext())
- {
- myInventSum = inventSumCommon;
- print myInventSum.ItemId;
- }
https://axapta.mazzy.ru/forums/showthread.php?p=65533
สมัครสมาชิก:
บทความ (Atom)