วันศุกร์ที่ 17 มกราคม พ.ศ. 2557
วันอาทิตย์ที่ 5 มกราคม พ.ศ. 2557
วันพุธที่ 4 ธันวาคม พ.ศ. 2556
jQuery $(this) vs this
http://stackoverflow.com/questions/1051782/jquery-this-vs-this
$(this)[0] == this
$("#myDiv")[0] == document.getElementById("myDiv");
วันจันทร์ที่ 18 พฤศจิกายน พ.ศ. 2556
หาวัน ด้วย php
http://stackoverflow.com/questions/712761/how-to-find-day-of-week-in-php
http://www.php.net/manual/en/function.date.php
http://www.php.net/manual/en/function.date.php
วันศุกร์ที่ 15 พฤศจิกายน พ.ศ. 2556
jQuery for dynamic content
http://stackoverflow.com/questions/15090942/jquery-on-method-not-working-on-dynamic-content
$(document.body).on('click', '.update' ,function(){ });
วันเสาร์ที่ 2 พฤศจิกายน พ.ศ. 2556
ซ่อน/แสดง cursor Firefox
โดยการกดปุ่ม F7
วันอาทิตย์ที่ 29 กันยายน พ.ศ. 2556
การเรียงลำดับภาษาไทย MySQL
ถ้าใช้ฐานข้อมูลแบบ utf8 ให้ลอง
SELECT * FROM ชื่อตาราง ORDER BY CONVERT (ชื่อฟิลด์ USING tis620);
มันตะเรียงตามอักษรโดยไม่สนใจสระ ฮะ
วันอาทิตย์ที่ 1 กันยายน พ.ศ. 2556
Firefox change default zoom (ปรับซูมไฟร์ฟอกซ์)
- ไปที่ about:config
- กด I'll be careful,I promise
- ค้นหาคำว่า layout.css.devPixelsPerPx ในช่อง Search
- (Double click)ปรับค่าจาก -1 เป็น 1
** สามารถปรับค่าเล็ก/ใหญ่ทีละนิดได้โดย เพิ่ม/ลด เลขเป็นทศนิยม2หลัก เช่น
- ใหญ่ขึ้น จาก 1.0 เป็น 1.01 , 1.03 , ...
- เล็กลง จาก 1.0 เป็น 0.99 , 0.98 , ...
ขอบคุณข้อมูลดีๆจาก https://support.mozilla.org/en-US/questions/963759
วันเสาร์ที่ 31 สิงหาคม พ.ศ. 2556
นับ string(utf-8) ใน MySQL
- http://www.electrictoolbox.com/find-length-longest-string-mysql/
- SELECT subdistrictname, LENGTH(subdistrictname) FROM subdistrict;
ได้ผลคือ
แขวงโคกแฝด (length = 30)
มันไม่ตรงกับที่เราต้องการนี่นา แขวงโคกแฝด นับด้วยตาแล้วได้แค่ 10 อักษรเองนิ
ก็เลยไปค้น google ได้เจอเกี่ยวกับการนับข้อความ UTF-8
- http://www.thaicreate.com/php/forum/022048.html
ตามคำตอบของคุณ เต๋า ในกระทู้ thaicreate เปลี่ยนจากโค้ดด้านบนเป็น...
- SELECT (LENGTH(CONVERT(subdistrictname USING 'ucs2'))/2) FROM subdistrict;
ผลลัพธ์ที่ได้
ข้อมูลเพิ่มเติมเกี่ยวกับ ucs2
- Unicode UCS-2 code chart
- http://dev.mysql.com/doc/refman/4.1/en/charset-unicode-ucs2.html
- SELECT subdistrictname, LENGTH(subdistrictname) FROM subdistrict;
ได้ผลคือ
แขวงโคกแฝด (length = 30)
มันไม่ตรงกับที่เราต้องการนี่นา แขวงโคกแฝด นับด้วยตาแล้วได้แค่ 10 อักษรเองนิ
ก็เลยไปค้น google ได้เจอเกี่ยวกับการนับข้อความ UTF-8
- http://www.thaicreate.com/php/forum/022048.html
ตามคำตอบของคุณ เต๋า ในกระทู้ thaicreate เปลี่ยนจากโค้ดด้านบนเป็น...
- SELECT (LENGTH(CONVERT(subdistrictname USING 'ucs2'))/2) FROM subdistrict;
ผลลัพธ์ที่ได้
ข้อมูลเพิ่มเติมเกี่ยวกับ ucs2
- Unicode UCS-2 code chart
- http://dev.mysql.com/doc/refman/4.1/en/charset-unicode-ucs2.html
สมัครสมาชิก:
บทความ (Atom)

+%E0%B9%83%E0%B8%99+MySQL1.png)