九月 21, 2010

iPhone/iPad app – 倉頡解碼

Posted in iOS, iPad, iPhone, iPod, tools tagged , , , 於 7:37 上午 由 Wing

目的:
– 本程式主要為不太懂倉頡的人士查詢倉頡碼而設的。
– 當遇到中文字輸入困難時,總會以各式各樣的方式解決,例如 copy & paste、搜尋關聯字、甚至用外文翻譯… 相當費時失事! =_="
– 有了本程式後,不論你懂不懂倉頡輸入法,都可以拆解倉頡碼了~

* 前提是當你要在一個只能用倉頡∕速成輸入法的環境下打字,你便可用本程式,最好再配以手寫輸入法!(詳細不用多說吧~ 😛

功能用法:
– 只要輸入你想查詢的一個或多個中文字,倉頡碼即可顯示,無需連上網路。
– 支援香港字。

希望各位用了本程式以後,打字更加得心應手! ^o^
如有意見或問題,歡迎提出~

Screen Shot:

感謝各用戶的支持, 本程式成了 Free iPhone Apps 的 Top 2 (Hong Kong 21/5/2011) ^O^/

九月 7, 2010

iPhone/iPad app – 秘 & Secret

Posted in Game, iOS, iPad, iPhone, iPod tagged , , 於 10:24 下午 由 Wing

這是個集秘密信息與秘技指令於一身的程式。你可以想像成秘技指令是個用來保護秘密的密碼,而輸入的方式是創新地用模擬遊戲控制器。

玩法:
– 可選擇用"設定"功能自定秘密信息和秘技指令。如無指定,秘技指令會是 Konami Code(↑↑↓↓←→←→BA)
– 在模擬遊戲控制器執行秘技指令後,你的秘密信息將被顯示。

特點:
– 為了保障你的秘密信息在沒有輸入指定的秘技指令前被看見,你的秘密信息只會在模擬遊戲控制器正確執行後才會顯示。
– 一旦啟用了“秘密”模式,不僅秘密信息就連秘技指令也會被隱藏。

開始用秘技藏秘密吧~ ^O^

This is a funny application that combined the concepts of secret message keeping and cheat code command execution by using a game pad simulator.
You may consider the cheat code command is act as a password that protect your secret message, and the password is input with a game pad simulator that is different from the transitional input method.

Game Play:
– Optional to define your own secret message and cheat code command in the “Options" screen. By default the command is Konami Code (↑↑↓↓←→←→BA)
– After executed the specific command by using the game pad simulator, your secret message will be shown.

Features:
– To protect your secret being accessed without input the specified command, your secret message will not be retrieved until correct command has been executed in the game pad simulator.
– Once you enabled the “Secret" mode, not only the secret message, but also the command would be hidden.

Start to use cheat code to store secret message now~ ^O^



八月 14, 2010

Jailbreak 後要做的事…

Posted in Phone, tools tagged , , , 於 2:00 上午 由 Wing

這是一篇關於 Jailbreak iPad 的一些小總結!

主要事項:
1. Backup shsh
2. 更改 root password
3. 安裝 Extensions

Backup shsh

Backup shsh 主要原因是為日後一旦 upgrade 了firmware 都可以 downgrade 返前版本而設。shsh 是 firmware 的 signature file, itune 會先確認這個 file 才讓你 restore!

* 注意因為 shsh 都是跟機的所以不能 download 其他機的 file 來用!
可以用 TinyUmbrella – semaphore 來 backup。

Screenshot:

更改 root password

iOS 跟很多 operating system 一樣都是有個 root account 的,很多時候大家都無為意,其實 jailbreak 後很多東西都可以用這個 account 來做"很多事"!例如當 connect 上 wifi 後,其他人可用這個 account 以 SSH/SFTP 等方式存取你的資料!當然你也可以安裝 SBSetting 來關掉 SSH 的!
以下是改 password 的command:
$ su root
Password:<alpine (default password)>
# passwd
Changing password for root.
New password: <input new password>
Retype new password: <input new password again>

* 注意 iPad 3.x.x 不能用 Cydia 的 MobileTerminal, 因為這是為 iOS4 而設的,所以要用另一個版本。

Reference:
Mobile Terminal Coming Soon For iOS 4
如何下載使用ipad 版 mobile terminal
mobileterminal: A GUI Terminal application for the iPhone
Guide to Change Your iPad SSH Password

安裝 Extensions

SBSettings: 可以很方便地開關 service (e.g. 3G, WIFI, SSH, etc…) 了!
安裝位置: Cydia -> Featured Packages -> SBSettings

Backgrounder: 用了這個就可以把使用中的 apps keep 注 running 了!
安裝位置: Cydia -> Featured Packages -> Backgrounder

ProSwitch HD: 這個可以很方便地選取使用中的 apps!但因為 Cydia 現時還未有 iPad 版本,所以要用 ProSwitcher HD – Alpha 版
安裝位置: Cydia -> Manage -> Sources -> Edit -> Add -> 加入URL http://rpetri.ch/repo -> ProSwitcher
因為是 Alpha 版,所以 apps 唔知幾時會神秘消失… 但還是很好用的!

順帶一提,現在 Jailbreak 已經合法的了!

U.S. Government: You Can Jailbreak Your iPhone

七月 2, 2010

Android app – 倉頡解碼

Posted in Android, Development, tools tagged , , , , 於 7:59 上午 由 Wing

我的 Android app 倉頡解碼 已經上市了~

目的:
– 本程式主要為不太懂倉頡的人士查詢倉頡碼而設的。
– 當遇到中文字輸入困難時,總會以各式各樣的方式解決,例如 copy & paste、搜尋關聯字、甚至用外文翻譯… 相當廢時失事! =_="
– 有了本程式後,不論你懂不懂倉頡輸入法,都可以拆解倉頡碼了~
* 前提是當你要在一個只能用倉頡∕速成輸入法的環境下打字,你便可用本程式,最好再配以手寫輸入法!(詳細不用多說吧~ 😛

功能用法:
– 只要輸入你想查詢的一個或多個中文字,倉頡碼即可顯示,無需連上網路。
– 設有各種默認查詢字搜查方式,使你可以更快速地查字。
– 超連結到網站查字。
– 支援香港字。
– 支援 “移至SD 卡” 功能。識用於Android 2.2 或以上。(App ver 2.2)
– 可切換自動/手動查詢。(App ver 2.3)

希望各位用了本程式以後,打字更加得心應手! ^o^
如有意見或問題,歡迎提出~

Screen Shot:

下載:
倉頡解碼
market://search?q=pname:hk.wing.cjcode

五月 24, 2010

Quick guide on using Oracle Database Audit Trail

Posted in Database, Development tagged , 於 9:16 下午 由 Wing

This post just to provide a quick guide on using Oracle 10g Database Audit Trail~

In this post:
1. Basic Configuration
2. Standard Audit Trail
3. Fine-Grained Auditing
4. Using Triggers
5. System logs
6. Oracle Audit Vault

Basic Configuration:

1. To configure audit trail option, you have to connect to an instance as administrator privilege user, e.g. sysdba, sysoper
conn sys as sysdba
2. Check current audit parameters with command:
show parameter audit
3. Define the audit log file location (if you choose to keep the audit log record in physical file):
ALTER SYSTEM SET AUDIT_FILE_DEST = '/oracle/audit_log' DEFERRED;
4. Be reminded to restart database instance after applied the configuration:
shutdown IMMEDIATE;
startup;

5. Normally, the audit log records is growing fast that remember to archive the records, following is some methods for reference:
– perform table copy from the audit log table/view to new table and then perform deletion.
Here is the example of archive SYS.AUD$ into new table:
CREATE TABLE TMP_AUD AS SELECT * FROM SYS.AUD$;
TRUNCATE table sys.aud$;

– perform table export to file by using command exp and then perform deletion.
– move the existing audit log into a new tablespace.
6. Three main views for auditing records are:
– DBA_AUDIT_TRAIL (AUD$): Standard auditing records.
– DBA_FGA_AUDIT_TRAIL (FGA_LOG$): Fine-grained auditing records.
– DBA_COMMON_AUDIT_TRAIL: For both standard and fine-grained auditing records.

Standard Audit Trail:

1. The options of Audit Trail record storage methods are: OS, DB, DB + Extended, XML, XML + Extended, and NONE.
2. You can apply following script to set the audit trail method, e.g. I am using XML that also capture the SQL text that user applied:
ALTER SYSTEM SET audit_trail=XML,EXTENDED SCOPE=SPFILE;
3. To define what kind of audit information required to capture for the particular user:
For DDL operations:
AUDIT ALL BY <username> BY ACCESS;
For DML operations:
AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE, EXECUTE PROCEDURE BY <username> BY ACCESS;
4. To disable audit trail:
NOAUDIT ALL BY ;
NOAUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE, EXECUTE PROCEDURE BY ;
5. If you choose to use DB to capture the audit trail record:
– Retrieve audit records by selecting the table SYS.AUD$
– Purge audit trail record by delete/truncate records in SYS.AUD$.
6. If you choose to use OS or XML to capture the audit trail record:
– Retrieve audit records by selecting the view DBA_COMMON_AUDIT_TRAIL or from the physical files
– Each audit log file will capture all concerned operation within a session of a database user.
– Purge audit trail record by physically delete/move the audit log files. FYI, as the view DBA_COMMON_AUDIT_TRAIL will read from the physical file data, after removed the audit log files, the records in the view will also disappeared.

Fine-Grained Auditing:

1. FGA allows you to define your own criteria of for auditing.
2. Check the availability of FGA:
select * from v$option
where parameter like 'Fine-grained%';

3. Add FGA policy:
EXEC DBMS_FGA.add_policy(object_schema=>'username',object_name=>'table_name',policy_name=>'policy_name',audit_condition=>NULL,audit_column=>NULL,statement_types=>'SELECT,INSERT,UPDATE,DELETE');
4. Drop FGA policy:
EXEC DBMS_FGA.DROP_POLICY(object_schema=>'username',object_name=>'table_name',policy_name=>'policy_name');
5. Audit trail records can be retrieved in the table SYS.FGA_LOG$, DBA_COMMON_AUDIT_TRAIL, DBA_FGA_AUDIT_TRAIL
6. To Purge audit trail record, delete records in SYS.FGA_LOG$, DBA_FGA_AUDIT_TRAIL.

Using Triggers

1. By using triggers, you can define your own criteria and audit log logging logic, which is more flexible to capture the audit log and even the data.
2. Following is the trigger sample:
CREATE TRIGGER audit_tmp_table
AFTER INSERT OR DELETE OR UPDATE ON tmp_table
for each row
begin
if (:new.field_name = 'A')
then
insert into tmp_table_audit values (
:tmp_field,
:old.field_name,
:new.field_name,
user,
sysdate ) ;
endif;
end;

3. Retrieve/Purge audit trail record according to the trigger logic.

System logs

1. syslog is independence with audit log, it mainly used to audit the operation of privileged users, such as SYS, in order to prevent the privileged users to modify the audit log records.
2. To enable the syslog:
– Alter the system parameter
AUDIT_TRAIL=OS
AUDIT_SYSLOG_LEVEL=facility.level
– Set the log file location to the syslog configure file:
facility.level /var/log/audit.log
– Restart the database instance

Oracle Audit Vault

1. DBMS_AUDIT_MGMT PL/SQL Package is available in Oracle Audit Vault, which provides subprograms to manage audit trail records.
2. Oracle Audit Vault supported from Oracle 10g Release 2 and bundled with Oracle 11i, which means you need to install the Oracle Audit Vault package for 10g. Although it is free to download, it required license to run on production environment.

Reference:

Auditing in XML
http://www.oracle.com/technology/oramag/oracle/06-jan/o16security.html

Configuring and Administering Auditing
http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm#BABCBJHG

DBMS_AUDIT_MGMT PL/SQL Package
http://download.oracle.com/docs/cd/E11062_01/admin.1023/e11059/avadm_app_d_audit_mgmt.htm

Oracle Audit Vault Downloads
http://www.oracle.com/technology/software/products/auditvault/index.html

Oracle Audit Vault Server Installation Guide
http://download.oracle.com/docs/cd/E14472_01/doc.102/e14458/toc.htm

* Please ensure you have applied the latest patch set for Audit Vault
http://updates.oracle.com/download/9087650.html (as of May 2010)

一月 22, 2010

Tips on using Google Wave~

Posted in computer, tools tagged , , 於 9:14 下午 由 Wing

This is to share all about tips on using Google Wave.

Google Wave is a new online communications tool that enables groups of people to edit and discuss documents simultaneously on the web.

Command for searching wave:

with:public
onlyto:me is:unread
creator:me -is:note
is:note

http://lifehacker.com/5383221/three-google-wave-searches-worth-saving


Useful Cheat Sheet:

http://www.googlewaveblogger.com/reviews/new-google-wave-users-cheat-sheet/


To open multiple waves:

(Windows) Ctrl+ click another wave in Inbox
(Mac OS) Command+ click another wave in Inbox


To add a link to another wave:

“To create a link, locate in the Search panel the wave you’d like to reference. Then, drag and drop that wave into your compose window. Voila! Your waves are linked."
http://www.google.com/support/wave/bin/answer.py?hl=en&answer=163058


To switch image display mode between preview/large size:

In edit mode, click “option" at the top right corner to switch image display mode.


Create a public wave:

Method 1:
1. Click on the + beside Manage Contacts
2. Type public@a.gwave.com (not public@a.googlewave.com)
3. Ignore the “User does not have a Google Wave account" message and hit enter.
4. Create a new wave
5. Click the + at the top of the wave
6. Choose public@a.gwave.com from the list

Method 2:
“Add this to your contacts list – easypublic@appspot.com – this will actually stay in your contacts list so you don’t have to add it every time you create a public wave, like public@a.googlewave.com"
This method is easier but easypublic@appspot.com will be included in the user list.
http://www.google.com/support/forum/p/wave/thread?tid=3069b241f612e1ba&hl=en


Remove user in wave (so far):

“It’s not possible to remove a participant from a wave just yet…"
Be careful when selecting …
http://www.google.com/support/forum/p/wave/thread?tid=357285765c698588&hl=en


Cannot create Read-only wave (so far):

“It isn’t yet possible to make your own waves read-only, but we look forward to offering this functionality in the future."
http://www.google.com/support/wave/bin/answer.py?hl=en&answer=163150


Wave on mobile:

In case you want to use it on mobile, you may see the screen as followings:
iPhone Screenshot
iPhone Screenshot
you may click “go ahead" to continue at your own peril XDD

In fact, I have tried on iPhone and android platform, it is quite slow and some gadget is broken…


Reference

The Complete Guide to Google Wave:
http://completewaveguide.com/guide/The_Complete_Guide_to_Google_Wave
This blog post is a copy of following wave:
https://wave.google.com/wave/?pli=1#restored:wave:googlewave.com!w%252Bt3rqj0OYI

I would like to thank all of the contributors, who enrich my wave. Cheers~

PS: If you want to be invited to google wave, just let me know~

一月 16, 2010

Android Development

Posted in computer, Development tagged , , , 於 9:57 下午 由 Wing

This is my development notes on Android~

Development Environment:

Mac OS
Android 1.6 SDK
Eclipse 3.5 Galileo


Basic elements:

1. Installation
2. Emulator
3. Android 1.6 NDK
4. SQLite databases


1. Installation:

1.1. Install Android 1.6 SDK
1.2. Install Eclipse 3.5 Galileo http://www.eclipse.org/downloads/
1.3. Install Android Development Tools (ADT) Plugin for Eclipse
http://developer.android.com/sdk/1.6_r1/installing.html


2. Emulator:

To list Available Android targets, go to the sdk tools directory (e.g. /Applications/android-sdk-mac_x86-1.6_r1/tools) and then issue following command:
$ ./android list targets
Available Android targets:

id: 1
Name: Android 1.5
Type: Platform
API level: 3
Revision: 1
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id: 2
Name: Android 1.6
Type: Platform
API level: 4
Revision: 1
Skins: HVGA (default), QVGA, WVGA800, WVGA854
id: 3
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 3
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P
id: 4
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Android + Google APIs
Based on Android 1.6 (API level 4)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: WVGA854, HVGA (default), WVGA800, QVGA

Note:
VGA (Video Graphics Array) is 640×480
HVGA (Half Video Graphics Array) is 640×240
QVGA (Quarter Video Graphics Array) is 320×240
WVGA (Wide Video Graphics Array) is 800×480

To create emulator:
$ ./android create avd --target 1 --name cupcake
Android 1.5 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD ‘cupcake’ based on Android 1.5
$ ./android create avd --target 2 --name donut
Android 1.6 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD ‘donut’ based on Android 1.6, with the following hardware config:
hw.lcd.density=160

To list the created emulator:
$ ./android list avd
Available Android Virtual Devices:
Name: cupcake
Path: /Users/wing/.android/avd/cupcake.avd
Target: Android 1.5 (API level 3)
Skin: HVGA
———
Name: donut
Path: /Users/wing/.android/avd/donut.avd
Target: Android 1.6 (API level 4)
Skin: HVGA

To delete emulator:
$ ./android delete avd --name donut
Deleting file /Users/wing/.android/avd/donut.ini
Deleting folder /Users/wing/.android/avd/donut.avd
AVD ‘donut’ deleted.

To start emulator:
$ ./emulator -avd cupcake


3. Android 1.6 NDK:

Seems it can reuse existing native code.
http://developer.android.com/sdk/ndk/1.6_r1/index.html


4. SQLite Databases:

4.1. Start emulator
$ ./emulator -avd cupcake

4.2. Start adb shell
$ ./adb shell

4.3. Go to application directory and create database
#cd data/data/<application_dir>
#mkdir databases
#chmod 777 databases
#sqlite3 <db_name>.db
sqlite>


Reference:

http://developer.android.com/index.html

一月 10, 2010

如何除去礙眼的路人

Posted in photo tagged , 於 5:51 下午 由 Wing

當拍風景照的時候,尤其是比較熱門的景點,總是有很多路人走來走去!
最簡單的方法當然是等待及捉緊時機拍下,但是當人多的時候總少不免地拍到一個半個路人的…
其實有一個比較有趣的方法可以除去礙眼的路人,就是使用長時間曝光
首先要用腳架設定好你的拍攝位置,之後便可以大約30秒的快門(甚或使用 BULB 自定等候時間),再相對地調整較細的光圈(e.g. f/22)。當然要做到完全除去礙眼的路人,先決條件是路人不會在同一地點停留很久,要不然會影到很多殘影的說…

以下是我在夜間拍下的照片,由於人流太多,也有一點殘影呢~
長時間曝光
曝光: 30
Aperture: f/22.0
焦距: 24 mm
ISO 速度: 100

長時間曝光也可做出各種不同的效果,例如以下便是拉長了的船~
拉長了的船
曝光: 30
Aperture: f/22.0
焦距: 22 mm
ISO 速度: 100

另外有沒有發現當長時間曝光時,光點都是星形的呢?當然我沒有用到 filter 啦,這其實是由細光圈加上鏡頭葉片結構所造成的呀~
(Reference: http://forum.photosharp.com.tw/FORUM/ArticleList.aspx?ForumId=129&TopicId=134729)

話說影煙花的時候也可使用長時間曝光再配合黑色卡紙,而黑色卡紙用於拍照的時候把不必要入鏡的東西都蓋上以免影響構圖!例如在沒有煙花出現的時候如果太大煙可用黑色卡紙蓋上。說實在的影煙花的技巧我也只是聽說,還未有機會試呢 😛

十二月 23, 2009

DIY 拍出獨特的散景~

Posted in photo tagged , , 於 6:55 下午 由 Wing

又到年尾,除了聖誕新年裝飾髓處可見之外,各攝影愛好者也紛紛出動呢!
要拍出與別不同的作品,除了考考各位的取景拍攝功力之外,還可以試下 DIY 拍出獨特的散景~
其實我本來是想買現成的 filter,但是經一番搜尋之後發現原來可以自製的,當然手作的始終與市面上買的效果不同啊…

材料:
– 膠片
– 黑色卡紙

步驟 1 – Filter mount:
先剪出兩片四方膠片,再在膠片中心界出接近鏡頭大細的圓形,之後用膠紙封注三邊。
再剪出一條紙條做成一個紙圈用以連接及固定 filter mount 與鏡頭。
之後把膠片套和紙圈用膠紙連接即可!

注意: 紙圈最好整得鬆一點,好讓使用時可以調校角度及方便套上鏡頭。

Filter mount

步驟 2 – 圖形片:
用四方黑色卡紙在中心界出你想要的形狀,再把卡紙插入 filter mount 便完成了!

注意: 中心的圖形大小可以自行決定,我做的大約是 2cm
下圖中圓形的是floppy disk 片心, 用來作 IR Filter 的!

圖形片
IMG_6225

步驟 3 – 開始拍攝:
當相機對好焦之後把手作 filter 套上鏡頭即可拍攝~

注意: 最好還是用大光圈鏡頭拍出散景, 我使用的是定焦鏡頭 Canon EF 50mm f/1.8 MkII

DSC00117

以下是使用前後拍出來的效果:
IMG_6170
IMG_6169

同場加影 IR filter:

原來 floppy disk 可以用來做 IR filter 的, 只要從 floppy disk 取出片心再插入 filter mount 便完成了!

以下是使用前後拍出來的效果:
IMG_6153
IMG_6149

Photo Set: http://www.flickr.com/photos/wingsinwk/sets/72157623055638926/

Reference:
教你拍出聖誕氣氛:創意散景 DIY (http://www.dcfever.com/news/readnews.php?id=2602)
How to Make an IR Filter – DIY Photography Equipment (http://www.brighthub.com/multimedia/photography/articles/43805.aspx)

七月 4, 2009

Danbo

Posted in Danbo tagged 於 11:57 下午 由 Wing


Danbo 飲茶 – 藍編

原由 wingsinwk 上載

More on http://www.flickr.com/photos/wingsinwk/sets/72157620801299635/

下一頁