water's blog

無國界醫生,"衝突.求生" 貨櫃展覽

一直對無國界醫生這個組織十分尊敬的,一班原本可以悠閒生活的醫生走去前線做義工,以他們的專業救助生命 (其實無國界醫生也不只是只有醫生,還有其他崗位),我自己覺得比起其他自願團體多一重意義。

維園展覽場地

iPhone 4 bumper + 山寨殼使用後感

蘋果免費送的 bumper 終於送來了,基本上只是一舊膠。如果和香港常見山寨機殼比,二佰多元的 bumper 是否物有所值?
Bumper front Bumper back

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

DIY iPhone stand

Easily turn your useless credit card to an iPhone stand

IMG_1031[1].JPG

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.

iPhone 4 相片集

iPhone 4 開盒,盒子又比上一代細了,可能是要方便水貨商。
iphone4_1.jpg

Huawei 華為 E583C Pocket Wifi

早前出席了華為 Huawei 的blogger 聚會,當聽到是關於 3G Pocket Wifi 的產品便一口答應了,主要是想幫自己的那部 Wifi 版 iPad 找一個 3G 上網方案。利益申報,聚會上每一個 blogger 也得到一部 pre-production 版 E583C (這我事前是不知道的 XD)

華為 E583C

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.

Syndicate content