Howto |
ช่วงนี้ใช้งาน Linux Console บ่อยและด้วยความที่ขี้เกียจคำสั่งที่เคยพิมพ์ไปแล้ว และจำได้ว่ามันมี command ที่ใช้รันคำสั่งที่เราเคยพิมพ์ไปแล้ว ปกติผมจะใช้ปุ่มลูกศรขึ้นลงเพื่อเลือกคำสั่งที่ผ่านๆมา แต่มันไม่สะดวกเพราะคำสั่งที่เคยพิมพ์ๆไปมันอาจพิมพ์ไปนานแล้ว ก็เลยลอง Search ดูก็เจอคำสั่งที่จะช่วยให้ประหยัดเวลาในการทำงาน
คำสั่งแรกเลย history
historyจะเป็นการลิสท์คำสั่งต่างๆที่เราเคยเรียกใช้งานไปแล้วทั้งหมด history 10จะเป็นการลิสท์คำสั่ง 10 คำสั่งสุดท้ายออกมา เราสารถใช้คำสั่ง ! |
|||
FireFox 2.0 เปิดตัวอย่างเป็นทางการแล้วนะครับเมื่อวานนี้ 25 ต.ค. ความจริงแล้ว สำหรับการ Disable Tab Scrolling ใน FireFox 2.0 นั้น พอดีผมไปเจอมาที่เว็ปด้านล่างนี้ วิธีก็คือพิมพ์ about:config ในช่องใส่ URL เว็ปแล้ว Enter มันจะขึ้นหน้าที่ใช้สำหรับปรับ |
|||
ช่วงหลังๆมานี่ผมกลับมาใช้ Windows ในการทำงาน และในการเขียน PHP
ปัญหาอย่างนึงที่น่ารำคาญคือส่ง email ไม่ออกมีปัญหากับ SMTP Server
ซึ่งผมก็ลง IIS และเป็น SMTP service ไว้ด้วยแต่ก็ส่งอีเมล์ไม่ออก แต่พอดีผม
ไม่ค่อยได้สนใจในส่วนนี้เท่าไหร่ เลยหยวนๆข้ามๆมันไปเขียนโปรแกรมทำส่วนอื่น
แต่พอดีช่วงนี้กำลังเขียนโมดูลของ Drupal และ่ต้องมีการส่ง email เลยจำต้องหา
วิธีทำให้มันใช้งานได้ ซึ่งจะอัพโหลดไปทดสอบบน Server ก็ลำบากในการแก้ไข
และ debug โปรแกรม ก็เลยลองๆ Search ดูก็เจอวิธีตาม Link ด้านล่าง
http://drupal.org/node/30079
ถ้าลิ้งก์เสียก็ตามล่างนี้เลย แต่อย่าลืมว่า Windows ต้องลง IIS ก่อนนะครับ
1) Go to: start > settings > control panel > Administrative Tools > Internet Information Services 2) Expand the " (local computer)" node 3) Right click on your SMTP server > go to "Properties" 4) Click "Access" tab 5) Under Relay Restrictions, click the "Relay" button 6) Click "Add" 7) Select "Single Computer" and enter IP address 127.0.0.1 8) Hit OK, OK, OK (until the properties dialog is closed)หลังจากเซ็ตตามด้านบนแล้วสคริปต์ PHP เราก็จะส่งอีเมล์ออกไปได้ตามปกติ เพียงแต่อาจมีปัญหา email ที่ถูกส่งไปอาจถูกปลายทางส่งเข้า |
|||
บทความเกี่ยวกับการหลีกเลี่ยงเขียน Javascript แล้วทำให้เกิด Memory Leak
หลักที่ผู้เขียนเขาแนะนำคือ
3. Set your XMLHttpRequest onreadystatechange handlers to null when you are done with them. I use YAHOO.util.Connect for all my XHR connections and it uses a polling mechanism instead of readstate, so I don’t need to do this anymore. If you can switch to YAHOO.util.Connect (or YAHOO.ext.UpdateManager built on top of it), I’d recommend it. 2. Clean up all your DOM event handlers on unload if there’s a chance they could reference a DOM object. There’s no reason to manually do this when there are libraries that do it automatically. I use YAHOO.util.Event for all my event handlers, it handles this for me automagically. Other libraries (prototype, dojo, etc) have some sort of mechanism to do the same thing, although I’m not sure how effective they are. If you look at the leak images above once again, you will notice almost all of them are in event related code of those libraries. 1. |
|||