แค่เว็บๆหนึ่ง ! ที่อยากเก็บประสบการณ์
Home
 

เรื่องเล่ารายวัน

Share Folder ใน WINDOW XP ไม่ให้คนอื่นเห็น

1. Share Folder  ตามปกติ  โดยให้ใส่ $ ต่อท้าย  ดังรูป   2.  เรียกใช้งาน  ดังนี้    \\192.168.1.10\c$   เท่านี้ คนอื่นก็จะมองไม่เห็น Folder  ที่เรา  Share

Off 

ส่งข้อมูล ขึ้น Host ผ่าน FTP ด้วย Powerbuilder 12.5

มีโอกาสทดลอง Powerbuilder กับ FTP  มีวิธีทำดังนี้ครับ เขียน .bat ไฟล์  ชื่อ upload.bat  ไว้ที่ Drive C: ดังนี้                  @echo off @rem This file will attempt to upload 1 files to the ftp server @c: @cd\temp    ;Folderที่เก็บไฟล์ในเครื่อง echo user  adminx> ftpcmd.dat   ; User ftp echo 12345>> ftpcmd.dat  ; Password  ftp @echo …Continue reading

Off 

กำหนดเฉพาะไฟล์ บาง นามสกุล uploadได้ บน Samba

มีโอกาศได้ทดลองเขียนโปรแกรม สั่งพิมพ์งานจากFolder  ที่ shrae ให้ผู้ใช้ up ไฟล์มาไว้  ทุกๆ 5 นาที  แต่ปัญหามี บางคน เล่น up ไฟล์ เพลง หนัง ขึ้นมาฝากไว้ ทำให้พื้นที่ไม่พอใช้  จำเป็นต้องหา วิธีป้องกัน  และมีวิธีการดังนี้ ให้เพิ่ม veto files = /*.xx/   ใน path ที่ shrae  เช่น [data] path = /www/data_print public = yes writable = yes veto files = /*.mp3/   # ป้องกันไม่ให้ uploadไฟล์ .mp3 ถ้าต้องการชื่อไฟล์อื่นๆ ก็เพิ่มเข้าไปเช่น  /*.txt/*.TXT  เป็นต้น ลองนำไปใช้ดูนะครับ

Off 

Print files from a folder in PowerBuilder 12

You can hook up one of the standard Windows API calls ShellExecute Function long ShellExecute( long hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, integer nShowCmd ) Library “shell32.dll” alias for “ShellExecuteW” Once you have done this, you can send your path/file to this function and tell it to print, like so: integer li_return_code string …Continue reading

Off 

Google Cloud Print คืออะไร

Google Cloud Print เป็นเทคโนโลยีใหม่ที่เชื่อมต่อเครื่องพิมพ์ของคุณกับเว็บ ด้วยการใช้ Google Cloud Print จะทำให้คุณและคนอื่นๆ ที่คุณเลือกสามารถใช้เครื่องพิมพ์ทั้งที่บ้านและที่ทำงานได้ โดยสั่งพิมพ์จากแอปพลิเคชันต่างๆ ที่คุณใช้ทุกๆ วัน Google Cloud Print ทำงานบนโทรศัพท์ แท็บเล็ต อุปกรณ์ Chrome คอมพิวเตอร์พีซี และอุปกรณ์เชื่อมต่อเว็บอื่นๆ ทั้งหมดที่คุณต้องการใช้สั่งพิมพ์ เครื่องพิมพ์ชนิดใดบ้างที่ฉันสามารถพิมพ์โดยใช้ Google Cloud Print ได้ Google Cloud Print สามารถสั่งพิมพ์ไปยังเครื่องพิมพ์ที่ใช้งานได้ในระบบคลาวด์ ซึ่งเชื่อมต่อกับเว็บโดยตรงและไม่ต้องใช้คอมพิวเตอร์ในการตั้งค่า Google Cloud Print ยังสามารถเชื่อมต่อกับเครื่องพิมพ์ที่มีใช้ในปัจจุบัน (เครื่องพิมพ์ทั่วไป) ซึ่งต่อเข้ากับเครื่อง Windows หรือ Mac ที่มีการเข้าถึงอินเทอร์เน็ตโดยใช้โปรแกรมเชื่อมต่อ Google Cloud Print ใน Google Chrome   อ่านรายละเอียดเพิ่มเติมได้ที่  google-Cloud-Print

Off 

How to mount NFS on Windows 7 and Server Ubuntu

Linux (Ubuntu) – Server Install NFS support: 1.ติดตั้ง NFS ดังนี้     #apt-get install nfs-kernel-server nfs-common portmap 2. จากขั้นเข้าไปเพิ่ม Folder ที่ต้องการ share เช่น home     #pico /etc/exports     /home/data 192.168.2.1/24(ro,async,insecure,no_subtree_check) 3. Restart the NFS server:     #/etc/init.d/nfs-kernel-server restart 4. ตรวจสอบว่า shrae ได้หรือไม่     # exportfs -a ** ถ้าต้องการให้ Client สามารถ อ่านเขียน ได้ …Continue reading

Off 

การย้าย location www , mysql บน Ubuntu 12.04

Ubuntu 12.04 1.             หลังจากติดตั้ง php+mysql แล้ว ให้ใช้คำสั่ง เพื่อให้ php สามารถติดต่อ database ได้ ดังนี้ โดย login เป็น root #  apt-get install libapache2-mod-auth-mysql php5-mysql 2.             ย้าย Database จาก /var/lib/mysql   ไปไว้บน san เช่น (/databaseSAN/mysql)  ดังนี้ #  cd /databaseSAN #  mkdir mysql  ( สร้าง directory  ชื่อ mysql เพื่อเก็บ databases) #  chown -R mysql.mysql mysql (กำหนด Owner  mysql ให้ directory …Continue reading

Off 

วิธีตรวจสอบ Lancard บน Ubuntu

วิธีดูว่า server เรา มี eth อะไรบ้าง root@server# ifconfig -a | grep eth eth0 Link encap:Ethernet HWaddr 00:1A:4B:4D:6D:67 eth2 Link encap:Ethernet HWaddr 00:04:E2:41:F0:D6 หรือ  อยากรู้ว่า lan ใบไหน Up  อยู่ บ้างให้ใช้คำสั่งดังนี้ root@rx-server:/etc/network# ifconfig -s Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 5395 0 0 0 2776 0 0 0 …Continue reading

Off 

PowerBuilder กดปุ่ม enter แล้วให้ ย้ายไปอีก field

By default, pressing the ENTER key changes the focus to the same column in row below it, if there is any row below it. In a typical data-entry screen in the industry, pressing the ENTER moves the focus to the next field in the same row. Let’s now add this functionality to the DataWindow. Declare …Continue reading

Off 

update select

update table1  ให้ค่าเท่ากับ table2   where รหัส เท่ากัน update tb1 set a2=(select as1 from tb3 where tb1.a1=tb3.b1 )

Off 

การเขียน Bat file สำหรับ Run exe

เรื่องมีอยู่ว่า  เครื่อง User  ต้องการ Run  โปรแกรม 2 Program   และใช้เครื่องพิมพ์ 2 ตัว โดยให้กด ปุ่มพิมพ์ แล้วให้เครื่องพิมพ์ ออก เครื่องที่ต้องการ โดยไม่ต้องมานั่งเลือก เครื่องพิมพ์ วิธีการทำ ดังนี้ เช่น 1. ต้องการ  Run  Program  Express   ให้เขียนคำสั่งดังนี้   ในไฟล์  a1.bat :: @echo off :: ตั้งค่าเครื่องพิมพ์ชื่อ Canon LBP3010 เป็นเครื่อง default rundll32 printui.dll,PrintUIEntry /y /n “Canon LBP3010” START N:\ExpressI\ExpressI.exe 2.ต้องการ  Run  Program  Hosxp  ให้เขียนคำสั่งดังนี้   …Continue reading

Off 

กำหนดให้ mysql อ่าน ตัวอักษรเล็ก,ใหญ่ เป็นตัวเดียวกัน

กรณีฐานข้อมูล ใน Linux   มีtable  ชื่อ table หรือ field  มีอักษร เล็กใหญ่สลับกัน ให้ไปแก้ไข  my.cnf   หรือ  my.ini โดยเพิ่มใน  [mysqld] lower_case_table_names = 1    หรือ lower_case_table_names = 2

Off 

loop เตือนความจำ

พอดีทดอลเขียน function  update วัน  กลัวลืม เลยเก็บไว้ BEGIN DECLARE i INTEGER; DECLARE k INTEGER; DECLARE d CHAR; set i = 0; #SET k = DATEDIFF(d2,d1); count_loop : LOOP #INSERT INTO `oapp_limit` (`oapp_limit_id`, `oapp_date`, `oapp_clinic`, `oapp_limit`) VALUES (k, DATE_ADD( ’2013-10-16′, INTERVAL 7 * i day), ’001′, ’60′); if i = 5 THEN LEAVE count_loop; end if; select …Continue reading

Off 

คำสั่งค้นหา ไฟล์ขนาดใหญ่ ใน linux

#find /var/lib/mysql -type f -size +1G | xargs ls -lh  (หาไฟล์ที่มีขนาด มากกว่า 1GB) ถ้าต้องการดู ขนาดไฟล์ ก็ใช้ #find /var/lib/mysql -type f -size +1G | xargs du -lh

Off 

Powerbuilder Resizing the Controls Automatically

Resizing the Controls Automatically We can make w_product_master window more useful, by simply resizing the DataWindow controls whenever the user resizes the window. To do this, we have to add some code to the resize event of the w_product_master: // Object: w_product_master // Event: Resize dw_query.x = 10 dw_query.y = 10 dw_query.Width = WorkSpaceWidth() – …Continue reading

Off 
1 2 3 4 5 11
Top