Android coding samples will arrive shortly

23 Dec

I’m currently involed in a project that develops software running on android mobile platforms. The project is currently on going and I’d like to share experience with all the people that are interested in.

The coding examples will cover basic knowledge as well as third party sdks. As I am a new developer on android. These samples/tutorials won’t be very hard to master, and they are actually very useful in the whole developing process. It mainly covers: platform settings, basic usage of views, cutomize views, response to the user interaction, connection with facebook in the first stage of the articles. So watch on this blog if you feel interested in.

Macbuntu makes your linux mac-alike

19 Nov

What I like mac the most is the FONT, though Windows has a default well-enough, yet compared to MacOSX, is still looks not that good.

There’s a little bug in this transformation back, mainly focused on the textbox control, yet since it is well-enough, we should expect the next version.

Oh, btw, I am using Linux Mint 10. It suits pretty well.


4 Oct

1. 数据库 Project 2
2. 数据库 Ass3
3. Event-B Ass3
4. C语言 Ass3

My New ubuntu

27 Sep

Looks really cool with a lot of 3rd-plugins installed.

Simple ways to get your computer connected to SSH and VPN servers in GNOME.

26 Sep

Since i’ve been studying in CSE@UNSW. Almost all the jobs are connected with SSH servers and VPN servers(OpenVPN as an example here). If you are using Linux and the Gnome Environment, it is pretty easy for you to get all things fixed in simply a few steps. And this article is meant to guide you how to do it.

Note that the system involved in this tutorial is Ubuntu 10.10 beta, yet I believed that you won’t find many differences when configuring under other distributions of Linux.

1. Get your computer connected to the SSH server.

Go to Places -> Connect to Server

select type: SSH, type in the server address, port(usually 22), and your username and hit connect. (You may leave the folder to be blank, or if you want to enter a specific folder like /, you can input in the corresponding text-box.)
You can also right click on the panel, select Add to panel, and then select “Connect to Server” applet, and hit Connect.

After a prompt in which you enter your password, you can see a mounted folder on your desktop.  All done.

2. Get your computer connected to the VPN server using OpenVPN

First you need to install the openvpn application via using the following command typed in terminal: (or you can search OpenVPN in synaptic package manager)

sudo apt-get install openvpn

Second, you need to install a small applet using the following command:

sudo apt-get install network-manager-openvpn

After all these things done, you can  click on the network applet on your panel, and scroll down to the VPN menu, then click “Config VPN”. Now you shall see a “Network Connection” dialog. If you have already configured an wireless.conf file, you can simply hit “Import” from the dialog, and import the previous configuration. After all these things done. Click the applet icon again, scroll down to VPN menu, and hit the name of VPN. Since now, everything is done.

Yet, you may face a little problem in Ubuntu 10.10 beta. When i try to do this , i was informed that the VPN server could not be connected because invalid key secrets. If you are sure that the wireless.conf file are legal and you can start the openvpn service using command line, you may try the following:

Open a terminal and type: sudo gedit

Now you see a gnone text editor running under root privileges, open the file located at /etc/dbus-1/system.d

and add the following four lines into the file right between the two policy tags:

<policy user="at_console">
<allow own="org.freedesktop.NetworkManager.vpnc"/>
<allow send_destination="org.freedesktop.NetworkManager.vpnc"/>
Now your file shall look like this:
<!DOCTYPE busconfig PUBLIC
“-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN”
<policy user="root">
<allow own="org.freedesktop.NetworkManager.openvpn"/>
<allow send_destination="org.freedesktop.NetworkManager.openvpn"/>
<policy user="at_console">
<allow own="org.freedesktop.NetworkManager.vpnc"/>
<allow send_destination="org.freedesktop.NetworkManager.vpnc"/>
<policy context="default">
<deny own="org.freedesktop.NetworkManager.openvpn"/>
<deny send_destination="org.freedesktop.NetworkManager.openvpn"/>
restart the computer, and connect it again, everything shall be just fine!

Not Only Pictures :)

10 Sep


Sunset after 3 minutes raining. (Photographed in UNSW ) 3分钟雨后的夕阳(貌似没照到太阳)


Muahaha. Soup of pork trotter. (木哈哈,“猪蹄汤”)


Kangaroo Mini Roast (98% FAT FREE!) 袋鼠肉!仅含2%脂肪!


DONT tamper with occupied power points(photographed in Oboe Lab, UNSW)



Herbs  各种中草药~


FUSILLI 意大利通心粉


SUPER – Specials  各种特价


Ingredients 各种调料~~


Ice-cream in winter 冬天的冰淇淋~

How to add desktop shortcut in KDE.

25 Aug

If you find this article helpful please follow the blog:, and recommend it to your friends. Thx.

[NOTE:] This article is talking about how to add a shortcut of a batch file or shell script. If you want to add a shortcut of a file, simply right-click and “Add to desktop”.

I’ve been confusing about how to create a shortcut for a long time, yet finally figure out a way. Beside this, I go deep to the shortcut file, and work out an another complicated way~ Let’s see how to do.

1. My application need to run in a root privilege.  (skip this if your application don’t need to)

In KDE, you need to add kdesu before the command which you wish to run. (in GNOME use gksu instead)

2. What’s Now?

Right click the Application Launcher.(Left-bottom, blue button), and select Menu Editor, now you can see a KDE Menu Editor dialog. Click the New Item on the toolbar, type the name and click OK. On the right side of the Menu Editor, type the command into it or use the small button on the right to locate the application. After these all, click Save on the toolbar. Then you can drag the item into the category you want, and then click Save.

3. How can I put it into desktop?

Right click the item in the Application Lanucher, then click Add to Desktop. We are done!

3. My shortcut points to a shell script or batch file that doesn’t have an icon, can I add one?

Yes, to do so move the cursor to the icon and wait until a vertical bar shows, click on the icon that looks like a screwdriver. Now you can see a Icon Setting Dialog. Click the screwdriver icon on the General tab. You can see a KEditFileType dialog. Now click the icon itself, a Select Icon dialog will show up, choose the icon you want and click OK, everything is done.

4. Can I change the icon directly from the menu?

Yes. But it is not that easy to find for the first time…Click the “CLICK HERE” part showed in the following picture…

5. What is a shortcut?

A .desktop file actually. When you use Dolphin file manager and you type applications:/ in the address bar, you can see all the applications listed in the manager. When you right click on the blank place, and select Create New -> Link to Application, you find it the same with what you were doing. But still, what it is? If you right click a shortcut and choose Open with -> Kate, you will find it is a readable ascii text file, just like this:

It is actually true that we can simply write a file like this and save it. As long as the extension of the file is not engaged by other program(say if you save it to a.txt, it will be open by kate, you save it to a.jpg, it will be open by gview). Here we save it to a.desktop(you can save it to a.hello, a.bye as well). We see a exclamation mark on the icon, when you click it, the system will pop-up a dialog and says “This will start a program”, click yes. WOW, you now create a shortcut by your own. Isn’t it amazing?

Anyway, you cannot write files or add link to applicaiton in application:/, even if you are the root. Okay, this is the end of the tutorial, Thx.


Get every new post delivered to your Inbox.