i know i am a nerd because of..

| Monday, September 28, 2009
the post on archlinux forum is funny

i like this one:
I'm a nerd because I know the secret of counting to 1024 with my fingers.


Then:
That's about to be the greatest finger exercises I've ever known. lol


But.. someone states out:
you know, it is really only 1023 :p


Then
I'm a nerd because when I read that I thought 'or my fingers would overflow'.


..
Sounds painful.


But they forget we could turn our hands around
Besides, a true geek knows you've got two more bits by turning your hands around(so, say from palms towards you to away), or even putting your hands at an angle for two more bits...

2^14 = 16,384


So, we can give others the "4"..
When you give someone the "4", he will understand only if he is a turbo nerd.


And i decide to change my hand sign to show 13.. HAHA

Two interesting C questions

| Friday, September 18, 2009
1. Whats wrong with this code?
int a,b,c;
int *p;
a=100;
c=10;
p=&c;
b=a/*p;
printf("%d",b);


2. Why is the following code not wrong?
int a,b,c;
int *p;
http://www.google.com/
a=100;
c=10;
p=&c;
b=a/ *p;
printf("%d",b);


Answer:
1. /* starts the comment
2. http: is label, // starts the comment

孟子曰

| Wednesday, September 16, 2009
舜发于畎亩之中,
傅说举于版筑之间,
胶鬲举于鱼盐之中,
管夷吾举于土,
孙叔敖举于海,
百里奚举于市。
故天将降大任于是人也,
必先苦其心志,
劳其筋骨,
饿其体肤,
空乏其身,
行拂乱其所为,
所以动心忍性,
曾益其所不能。

人恒过,
然后能改;
困于心,
衡于虑,
而后作;
征于色,
发于声,
而后喻。
入则无法家拂士,
出则无敌国外患者,
国恒亡。
然后知生于忧患而死于安乐也。

OpenAL tutorials

| Tuesday, September 08, 2009
OpenAL is a cross-platform audio library. The advantage is its cross-platform, similarity to OpenGL and the ability to handle some advanced sound effect like doppler shift. Adding sound effects is definitely making your game more attractive.

Here are several tutorial links which i think are useful.
http://www.devmaster.net/articles.php?catID=6
http://www.edenwaith.com/products/pige/tutorials/openal.php
http://kcat.strangesoft.net/openal-tutorial.html

glxgears seg fault

| Monday, September 07, 2009
Add urself to video group.
gpasswd -a user video

Cocktail Recipes (1)

| Sunday, September 06, 2009
Yesternight I tried several kinds of cocktails myself. I enjoyed the new experience with the shaker and jigger. Having fresh limes and ice ready added my happiness. Here are the drinks i made last night.

Black Russian:
I was supposed to make white russian. But thanks to the non-working refrigerator that made all my milk going bad easily, i was out of milk. So I made Black Russian instead.
  • 3/4 oz coffee liqueur
  • 1 1/2 oz vodka


Lemon Drop Martini recipe:
All lemon-flavor drinks taste pretty similar and they are all pretty good. The bad thing was i didnt have any cherries to make more colorful.
  • 2 oz vodka
  • 1 oz triple sec
  • 2 oz margarita mix
  • 1 tsp sugar
  • 1 tbsp lemon juice


Long Island Iced Tea:
This is much easier than i thought. Simply mixing all things together could make exact the same taste as what i had in those bars.
  • 1 part vodka
  • 1 part Tequila
  • 1 part rum
  • 1 part gin
  • 1 part triple sec
  • 1 1/2 parts sweet and sour mix(8 ounces lemon juice with 2 tablespoons of sugar)
  • 1 splash Coca-Cola®


Marzo Madness recipe
  • 2 oz Tequila
  • 2 oz Rum
  • 1 - 2 oz lemon juice


All these recipes actually copied from drinksmixer.com, but after restrict testing :D

Android on my Tilt (3)

|
用了好些天的Android了,基本上已经几乎可以日常用了,比WinMo平滑顺畅很多,各种软件也更适合我的习惯。

自带的Gmail, Browser, Google Map都很好用。装了ASTRO做File manager,Shuffle做To-Do list, Time Tracker管理时间,NewsRob读Google Reader。电池消耗稍微比WinMo快一些。昨天第一次把电池用干了,打了若干电话,一直连着网络上网和读Google Reader,收发邮件之类的,用了差不多一天到晚上的时候就完全没电了。

有一个小毛病,就是进入Airplane Mode再出来3G网络好像就连不上了。另外,我现在看到的服务商名字很奇怪,有时候是Cingular,有时是AT&T@,有时是AT&TE,有时是AT&TD,就是从来没有纯的AT&T的....

btw, Android下有个游戏很好玩,叫Trap!,我现在每天早上起床就玩这个游戏热身 :D

Random Posts

Powered by Stuff-a-Blog