愛得太遲 : 終於解決 Firefox load visual studio localhost 好慢既問題

如果你用visual studio 寫asp.net, 就好自然會用佢localhost 黎做開發,

但你又有無無發現, 用ie 開localhost 一個page 比起 firefox 開一個page 既速度快十倍唔止? 同一個page firefox 要load 15sec (用firebug 可以睇到主要慢係download image 度), ie 1 秒搞掂, 搞到我成日寫寫下code都唔係太想reload, 因為一reload 我無心機等咁耐就會分心去搞其他野….

其實呢個問題已經煩左我好耐, 不過一路都無時間正視佢, 前幾日終於抽小小時間問下google 大神, 5 分鐘唔使就解決左呢個問題

http://dotnetslackers.com/ASP_NET/re-122146_Speeding_Up_FireFox_When_Using_the_ASP_NET_Development_Server_from_Localhost.aspx

詳情唔多講啦, 太約係因為因為firefox 要support IPv6 而導致呢個問題

解決方法好簡單
1. 去address bar 打 about:config
2. 之後搵network.dns.ipv4OnlyDomains 呢條key, double click 佢輸入 localhost
3. 得左, 從今開始可以神速load localhost d page!

呢個發現相信每日最少為我慳返30分鐘 Orz… 好後侮唔早D 解決佢

Visual Studio : How to disable javascript intellisense?

如果你好似我咁, 好鬼憎visual studio 入面個javascript 既intellisense, 你可以咁做.  (刺激我去做呢樣野既原因為今朝係咁比佢整到我個VS crash, 真係用唔用都罷!)

1.Go to Tools->Options->Text Editor->JScript->

2. In the section Statement completion

turn off Auto list members and Parameter information

3.Done!

SQLserver , 如何查找所有primary key

原本在這裡 : org link

如果你要知道你的database 所有的primary key, 你可以使用以下sql


.htaccess 把所有 非WWW 的網址轉到 www

例子

http://hkcug.com 轉跳成 http://www.hkcug.com

你只需要在你的linux 主機 修改 .htacess 檔

加入

如果唔咁做, Search engine 可能會把 http://hkcug.com 同 http://www.hkcug.com 分開睇成兩個site, 對seo 不利. 如果無特別原因的話都係redirect 去曬www 吧!

PHP Big5 + Jquery AJAX 亂碼問題

呢個問題足足搞左我一晚, 都唔差左用多少少時間打篇BLOG 做過紀錄

事緣有個舊WEB 不嬲都用開BIG-5, 又咁岩用Jquery ajax submit d data 返server side, 大家都知jquery ajax 會變曬你d 野做utf8 先傳回server, 所以唔做野一定出亂碼

解決方法如下
係你個javascript function, CALL ajax 之前用 encodeURI() encode 左你個data 先


返到去你個PHP 就用

urldecode() 之後再用 iconv 由utf8 轉返做 big-5 再INSERT 入mysql

就係以上呢幾行CODE 又無左一晚 T_T

Airnergy WiFi Charger – 用WiFi 充電?

This little box has, inside it, some kind of circuitry that harvests WiFi energy out of the air and converts it into electricity. This has been done before, but the Airnergy is able to harvest electricity with a high enough efficiency to make it practically useful: on the CES floor, they were able to charge a BlackBerry from 30% to full in about 90 minutes, using nothing but ambient WiFi signals as a power source.

呢隻CHARGER 可以利用大氣中既wifi signal 轉化做電能為你既usb device 充電, 當然充電時間會好長 , 90 分鐘可以充到一部BlackBerry 既30% 電, 都幾搞野下

個人覺得實用性就唔高喇, 不過作為一件環保產品就十分有諗頭, 價錢亦都唔貴, 只係USD40, 有興起可以買返一舊黎型下比D friend睇

Canon 公怖 EOS 550D

主要Spec

一部入門機仔有18M pixel 同可用6,400, 睇黎我部5D2 好快會outdate :(

  • 18 Megapixel APS-C CMOS sensor
  • DIGIC 4 processor with ISO 100-6400 (Expansion to 12800)
  • Continuous shooting at 3.7fps
  • Full HD movie recording with manual control and selectable frame rates
  • 7.7cm (3.0”) 3:2 Clear View LCD with 1,040k dots
  • iFCL metering System with 63-zone Dual-layer Metering Sensor
  • Quick Control screen to change shooting settings
  • Exposure compensation +/-5 stops.
  • Select maximum value for Auto ISO
  • External Microphone socket
  • Movie crop function
  • Eye-Fi connected functions compatibility
  • http://www.dpreview.com/news/1002/10020806canoneos550d.asp

    AF-S NIKKOR 16-35MM F/4G ED VR

    N 記公怖左支 16-35MM F/4G ED VR

    http://www.dpreview.com/news/1002/10020902nikon16mm35mm.asp

    唔知Canon 會唔會出支17-40 F/4 L IS USM 應戰呢?


    lightroom adobe TV 教學

    http://tv.adobe.com/watch/learn- … -local-corrections/

    有專用拍片Step by step 搞你點玩, 好過睇書啦! 仲要係免費既tim!

    Facebook 公怖新php engine – HipHop for PHP

    http://www.facebook.com/note.php?note_id=280583813919&id=9445547199

    Facebook 呢個全球最大用緊PHP 既網站, 終於都訂唔住php 既速度, 索性自己寫過另一個ENGINE, 不過有趣之處在於, 佢係先張PHP->C++ 之後再complie , C++ 既performance 我諗大家唔使有任何擔心喇掛