water's blog
Pull down to refresh table view
An easy way to add twitter like pull down to refresh function to any table view. No dependency to other libraries, only include the 4 source files and 1 resource file to use it.
How does it work?
Disable Java Auto Updater
If you've installed java in your Windows, the java will automatically run an auto update periodically. If you are using Vista or Windows 7, the annoying UAC will prompt you every time when the system try to run the auto updater. To disable this, edit the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableAutoUpdateCheck"=dword:00000000
Ref: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294083
UIGraphicsBeginImageContext and retina display
To support retina display, you need to set the scale of UIImage correctly. If you use UIGraphicsBeginImageContext to create offline image, you should use UIGraphicsBeginImageContextWithOptions instead to set the correct scale of the image. Below is the help function that will call with correct scale according to the scale of current device and will use the old function if the OS version of the device is below 4.0 that UIGraphicsBeginImageContextWithOptions is not available.
To use the code, simply replace all UIGraphicsBeginImageContext with RetinaAwareUIGraphicsBeginImageContext
See emoji keyboard in notes but not other apps
If you can see emoji keyboard in notes app. Congratulations, you have enabled the emoji keyboard. But some users set they can't use it on other apps. You can try the following fixes:
1. Reboot the iPhone, iPod Touch. Long press the power button, slide the slider to turn off the phone completely. Then press the button again after the screen is off to turn it on again.
Huawei 華為 E583C Pocket Wifi
早前出席了華為 Huawei 的blogger 聚會,當聽到是關於 3G Pocket Wifi 的產品便一口答應了,主要是想幫自己的那部 Wifi 版 iPad 找一個 3G 上網方案。利益申報,聚會上每一個 blogger 也得到一部 pre-production 版 E583C (這我事前是不知道的 XD)
dd-wrt PPTP VPN Setup
To setup PPTP VPN on dd-wrt
In Services-> VPN-> PPTP Server:
PPTP Server: Enable
Broadcast support: Enable
Force MPPE Encryption: Enable
Server IP: 0.0.0.0
Client IP(s): 192.168.2.51-55
CHAP-Secrets: user1 * pass1 *
user2 * pass2 *
where client ip stores what IPs will be assigned to the client. In the above case, the server will assign 192.168.2.51 to 192.168.2.55. The subnet can be different to the NAT in the server (192.168.1.X)
CHAP-Secrets stores the username and password for the logins, multiple accounts are supported.



Recent comments
1 day 20 hours ago
3 days 5 hours ago
1 week 2 days ago
1 week 3 days ago
1 week 3 days ago
1 week 5 days ago
1 week 6 days ago
2 weeks 2 hours ago
2 weeks 15 hours ago
2 weeks 1 day ago