thaicosmic.com

หนัง

วันศุกร์ที่ 27 ธันวาคม พ.ศ. 2562

นำเข้าข้อมูลสิทธิ

/* 127 */       this.dbs.UpdateViaSQL("DROP TABLE IF EXISTS _tmpnhsoucsearch_txt;");
/* 129 */       String ct = "CREATE TABLE _tmpnhsoucsearch_txt (idcard varchar(13) NOT NULL,status varchar(10) default NULL,birth varchar(8) default NULL,nation varchar(3) default NULL,maininscl varchar(9) default NULL,subinscl varchar(9) default NULL,cardid varchar(55) default NULL,datestart varchar(8) default NULL,dateexpire varchar(8) default NULL,hosmain varchar(255) default NULL,hossub varchar(255) default NULL,rightcodejhcis varchar(2) default NULL,hosm varchar(9) default NULL,hoss varchar(9) default NULL,PRIMARY KEY  (idcard)) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
/* 141 */       this.dbs.UpdateViaSQL(ct);

วันศุกร์ที่ 15 พฤศจิกายน พ.ศ. 2562

Simplenote Android

Welcome to Simplenote Android!
Open this for instructions.

To create a new note, tap the blue Add Note button.

To search your notes, tap the search button in the Action Bar and enter any text. Simplenote will show you matching results instantly.

Got a really important note? Press the pin button while viewing a note to pin it to the top of the list.

Use tags to help organize your notes. You can also add an email address as a tag to share a note with someone.

Easily share notes with other Android apps by tapping the share button in the toolbar.

Deleted notes go in the trash. You can restore them if you want, or empty the trash to get rid of them forever.

You can access your notes on the web and your other devices. Go to http://simplenote.com to get started.

We hope you enjoy using Simplenote!

วันเสาร์ที่ 9 พฤศจิกายน พ.ศ. 2562

Hotkey

แสดงทั้งหมด          Ctrl+Shift+8
จัดแนวชิดซ้าย        Ctrl+L
กึ่งกลาง                  Ctrl+E
จัดแนวชิดขวา         Ctrl+R
เต็มแนว                  Ctrl+J
คัดรูปแบบ              Ctrl-Shift+C
วางรูปแบบ             Ctrl-Shift+V

USSD

True
         - เช็คเบอร์                     *933#       
         - โอนสาย                      **21*เบอร์ที่ต้องการโอนไป#
         -  ยกเลิกโอนสาย            ##21#


Ais
         - เช็คเบอร์                      *545#
         - ยอดเงินคงเหลือ          *121#


My by CAT
         - เช็คเบอร์                      *99#
         - ยอดเงินคงเหลือ          *902#
         http://www.mybycat.com/th/Service_Additional.php
     
*902#


Dtac
         - เช็คเบอร์                      *102#


TOT 3G
         - เช็คเบอร์                      *153#



iMobile 3GX
         - เช็คเบอร์                      *153*1#


วันอาทิตย์ที่ 3 พฤศจิกายน พ.ศ. 2562

คศ-พศ

CONCAT(DATE_FORMAT(person.birth,'%d-%m-'),DATE_FORMAT(person.birth,'%Y')+543)as วันเกิด,

ORDER BY house.villcode
,length(if(instr(hno,'/') > 0,substring(hno,1,instr(hno,'/')-1),hno))
,if(instr(hno,'/') > 0,substring(hno,1,instr(hno,'/')-1),hno)
,hno
,person.birth

วันเสาร์ที่ 22 มิถุนายน พ.ศ. 2562

crosstab-right query

SET @sql = NULL;
SELECT
   GROUP_CONCAT(DISTINCT
      CONCAT(
          'MAX(IF(villcode = ''',
           villcode,
           ''',rCount ,NULL)) AS ''' ,
           villcode ,''''
      )
   ) INTO @sql
FROM
(SELECT house.villcode,IF(ISNULL(person.rightcode) ,'no',person.rightcode) as "rightcode",COUNT(person.pid) as rCount
FROM person INNER JOIN house ON house.hcode = person.hcode
GROUP BY
house.villcode,
person.rightcode
)
AS pRight;
SET @sql = CONCAT('SELECT IF(isNull(rightcode),"no" ,rightcode) as "rightcode" ,', @sql, ' FROM pRight GROUP BY rightcode ORDER BY rightcode');
PREPARE stmt FROM @sql;
EXECUTE stmt;

วันศุกร์ที่ 21 มิถุนายน พ.ศ. 2562

install google chrome ubuntu 14.04

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

วันอาทิตย์ที่ 19 พฤษภาคม พ.ศ. 2562

run with java6

@echo off
set path=C:\Program Files (x86)\Java\jre6\bin\;%path%
java -version
javaw -jar UbonSystem.jar
pause
exit

วันจันทร์ที่ 13 พฤษภาคม พ.ศ. 2562

วันเสาร์ที่ 4 พฤษภาคม พ.ศ. 2562

วันศุกร์ที่ 26 เมษายน พ.ศ. 2562

edit ubuntu 14.04.5 source list

deb cdrom:[Ubuntu 14.04.5 LTS _Trusty Tahr_ - Release amd64 (20160803)]/ trusty main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted

edit ubuntu 14.04 source

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

วันพุธที่ 3 เมษายน พ.ศ. 2562

คนอยู่ที่เรา สิทธิ์อยู่ที่ใคร

SELECT
village.villno,
house.hno,
person.prename,
person.fname,
person.lname,
person.birth,
person.sex,
person.idcard,
person.typelive,
person.hosmain,
person.hossub
FROM
village
INNER JOIN house ON village.villcode = house.villcode
INNER JOIN person ON house.hcode = person.hcode
LEFT JOIN persondeath ON person.pid = persondeath.pid
WHERE
persondeath.pid IS NULL AND
village.villno <> 0 AND
person.typelive IN (0, 1, 3) AND
person.hossub = '03302'
ORDER BY
village.villno+100 ASC ,
length(if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno)) ASC,
if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno) asc,
hno asc

วันศุกร์ที่ 29 มีนาคม พ.ศ. 2562

วันจันทร์ที่ 18 กุมภาพันธ์ พ.ศ. 2562

crontab

#20130816
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --rep$
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --rep$
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --rep$
0 16    * * 0-6 root    /var/jhcis/mysql-backup-jhcisdb.sh >/dev/null 2>&1
0 0-23  * * 0-6 root    /var/jepidem/runjepidem.sh >/dev/null 2>&1
0 0-23  * * 0-6 root    /var/jxp18/runjxp18.sh >/dev/null 2>&1
0 5,13,23       * * 0-6 root    /var/jautoup/runjauto.sh >/dev/null 2>&1
#end

cannon mp287 ubuntu 14.04

http://ubuntuhandbook.org/index.php/2014/12/canon-driver-scangear-mp-ubuntu-14-04/

วันศุกร์ที่ 15 กุมภาพันธ์ พ.ศ. 2562

วันจันทร์ที่ 11 กุมภาพันธ์ พ.ศ. 2562

วันพฤหัสบดีที่ 7 กุมภาพันธ์ พ.ศ. 2562

เรียงบ้านเลขที่ บลท.

access แบบสอบถาม

ORDER BY Val([house].[villcode]), Val([house].[hno])+1000, IIf(Len([house].[hno])-Len(Val([house].[hno]))=0,0,Right([house].[hno],Len([house].[hno])-Len(Val([house].[hno]))-1))+100;

excel สูตร
=IF(ISERROR(FIND("/",B3)),B3*1,LEFT(B3,FIND("/",B3)-1)+RIGHT(B3,LEN(B3)-FIND("/",B3))/1000)

Visual basic - VB - VBA

Public Function FormatAdr(Adr)
If IsNull([Adr]) Then
FormatAdr = "0000000"
ElseIf Not IsNumeric(Val(Adr)) Then
FormatAdr = Adr
Else
FormatAdr = Format(Val(Adr), "0000") & IIf(InStr(Adr, "/") = 0, Format(0, "000"), Format(Right(Adr, IIf(InStr(Adr, "/") = 0, 0, Len(Adr) - InStr(Adr, "/"))), "000"))
End If
End Function

mySQL query
ORDER BY house.villcode
,length(if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno))
,if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno)
,hno

ORDER BY
house.villcode,
length(if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno)),
if(instr(hno,'/')>0,substring(hno,1,instr(hno,'/')-1),hno),
if(instr(hno,'/')>0,length(hno)-instr(hno,'/'),''),
if(instr(hno,'/')>0,right(hno,length(hno)-instr(hno,'/')),'')

เขียนโดย นายปองพล

เปลี่ยนวันที่ให้บริการ

update visit INNER JOIN `__z001_1 query` ON visit.visitno = `__z001_1 query`.visitno
set visit.visitdate = `__z001_1 query`.visitdate

วันพุธที่ 6 กุมภาพันธ์ พ.ศ. 2562

คำนวนอายุ

access :   age: Int(DateDiff("m",[Birth],Now())/12)
 Int(DateDiff("m", [BirthDate], Now()) / 12) & " ปี " & (DateDiff("m", [BirthDate], Now()) Mod 12) & " เดือน"

Excel : =DATEDIF(A1,$B$1,"Y")&" ปี "&DATEDIF(A1,$B$1,"YM")&" เดือน "&DATEDIF(A1,$B$1,"MD")&" วัน"

รูปแบบเซลล์ [$-,107]d/mm/yyyy
หรือ dd/mm/bbbb

พิมพ์ พ.ศ. แล้วให้ excel แปลงค่าเป็น ค.ศ. นำไปคำนวน
=DATE(YEAR(A1)-543,MONTH(A1),DAY(A1))

วันจันทร์ที่ 4 กุมภาพันธ์ พ.ศ. 2562

วันอาทิตย์ที่ 3 กุมภาพันธ์ พ.ศ. 2562

autoupdate

http://202.80.231.69/php5.zip
http://202.80.231.69/gisweb.zip
http://203.157.165.99/program/jautoup.deb
http://203.157.165.99/program/jxp18.deb
http://203.157.165.99/program/jepidem.deb


setting os4j network (ssko)

sudo su
123456

sudo passwd
123456
123456
(sudo apt-get install openssh-server)
sudo dpkg-reconfigure openssh-server
sudo nano /etc/ssh/sshd_config
#PermitRootLogin without-password
PermitRootLogin yes
ctrl+x
Y
sudo service ssh restart

sudo nano /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4

reboot

check version

apche2 -v
php -v
mysql --version
java -version
javac -version

วันพุธที่ 30 มกราคม พ.ศ. 2562

ตัดเครื่องหมาย - ออกจากเลขประชาชน

Excel                =SUBSTITUTE(E2,"-","")
Access              Replace([65CKD].pid,"-","") AS cid;
mySQL             REPLACE(pid,'-','') as cid

วันพุธที่ 23 มกราคม พ.ศ. 2562

AUTO DATACORRECT FROM JHCIS 201601231033

HOSPCODE|TABLENAME|DATA_CORRECT|D_UPDATE
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181113102032
03301|diagnosis_opd|{"SEQ":"190635","EDITOR_CID":"3330300309025","PID":"11645","DATE_SERV":"20181112"}|20181113102329
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181214092512
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181214094901
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181214095124
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181214095222
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"1339900306533"}|20181226150313
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181228111400
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181228111523
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181228111624
03301|PRENATAL|{"GRAVIDA":"4","HOSPCODE":"03301","PID":"11645","EDITOR_CID":"3330300309025"}|20181228111745