|
|
|
|
|
|
Powered byD's Bloggie
| Weblog Main complete archive ... |
|
|
Last edited: Sat 2006-06-10 @ 13:34 , by DaRen 3 time(s)
Unicode Testing - 10:21 am
Encoding used : UTF-8
Browser , Site Issue , Site Updates , Unicode - DaRen
Running Unicode test on server-side... If you see gibberish below that means your browser doesn't support the font... or just simply my code isn't working like what I expected...
English
You kidding me?
Chinese (Simplified)
花间一壶酒,独酌无相亲
举杯邀明月,对影成三人
月既不解饮,影徒随我身
暂伴月将影,行乐须及春
我歌月徘徊,我舞影零乱
醒时同交欢,醉后各分散
永结无情游,相期邈云汉
Chinese (Traditional)
子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?
人不知而不慍,不亦君子乎?」
有子曰:「其為人也孝弟,而好犯上者,鮮矣;
不好犯上,而好作亂者,未之有也。君子務本,本立而道生。
孝弟也者,其為仁之本與!」
Russian
По оживлённым берегам
Громады стройные теснятся
Дворцов и башен; корабли
Толпой со всех концов земли
К богатым пристаням стремятся;
Ancient Greek
Ἰοὺ ἰού· τὰ πάντʼ ἂν ἐξήκοι σαφῆ.
Ὦ φῶς, τελευταῖόν σε προσϐλέψαιμι νῦν,
ὅστις πέφασμαι φύς τʼ ἀφʼ ὧν οὐ χρῆν, ξὺν οἷς τʼ
οὐ χρῆν ὁμιλῶν, οὕς τέ μʼ οὐκ ἔδει κτανών.
Sanskrit (should be right-aligned)
पशुपतिरपि तान्यहानि कृच्छ्राद्
अगमयदद्रिसुतासमागमोत्कः ।
कमपरमवशं न विप्रकुर्युर्
विभुमपि तं यदमी स्पृशन्ति भावाः ॥
Tamil
ஸ்றீனிவாஸ ராமானுஜன் ஐயங்கார
Czech
Dejte mi libru kávy Java, dvě libry Rio, šest liber kouskového cukru a paklíček cikorie.
Korean
비겁한 사람은 죽기 전에도 여러번 죽는다.
그러나 용감한 사람은 한번 밖에 죽지 않는다.
Japanese
コンビニエンスストア全国大手のファミリーマートの道内1号店が7月7日に札幌市東区本町1で開店することが9日、明らかになった。これによりファミリーマートは全都道府県出店を達成し、7月14日には同市清田区美しが丘4に2号店も開く。
ps: The font works fine in my Opera 8.50 browser. Firefox 1.0.7 is rendering the text a bit smaller making some of the characters look weird. Internet Explorer 6 is displaying bigger text size, but the Ancient Greek part is partially gibberish. In other words, Opera still rules ! ^^
PHP isset() - 7:40 pm
Bug , Coding , PHP - DaRen
In PHP, sometimes you'll need to do alot of variable assignment like
[ Hide ] <?php
// simple
$bar = isset($foo) ? $foo : '';
// complicated
$bar = isset($foo[$test['index']]) ? $foo[$test['index']] : '';
?>
So I came up with this function to ease my life...
[ Hide ] <?php
// Use this to standardize things..
function isset_empty(&$input)
{
return isset($input) ? $input : '';
}
?>
Things works fine at first. But later then I discovered that it's not working like what I expected when I pass a value inside an array to that function. See below:
[ Hide ] <?php
$bar = isset_empty($foo); // $foo is undefined at this point
echo $bar;
$foo = array(1 => 'World', 2 => 'Cup');
print_r($foo);
$bar = isset_empty($foo[10]);
print_r($foo);
// The outpust result
// <-- emptry string, expected
// Array ( [1] => World [2] => Cup )
// Array ( [1] => World [2] => Cup [10] => )
?>
It seems that index 10 with empty string is inserted to the $foo array after calling that function. It doesn't harm in some situation but it's a real disaster if you're using array to populate items or doing a count($foo) to check the array size. The results are affected !
So I have to replace all the statements that uses the function and go back to the old way
$bar = isset($foo[$test['index']]) ?$foo[$test['index']] : '';
Doh!
PHP, MySQL, Unicode - 9:14 pm
Complicated ? nah... it's VERY complicated
(X)HTML , Site Issue , Unicode , Web Hosting - DaRen
Serving my site content in XHTML in Unicode has already been on my to-do list for quite a while. I have read alot of articles on how to implement it. Sadly, 90% of the hosting companies are still using old PHP, old MySQL server and not having Multibyte String Functions enabled in PHP. They are not aware of , or just don't like the idea of "Internationalization" eh ?
After checking the specs of my hosting server, PHP seems to be OK but I am not sure about MySQL. It would be waste of time if the server is running a older version of MySQL that completely treats Unicode as something that came from outter space. Anyhow, I'll spend some time on this weekend to work on it. I just love the idea of having having Chinese characters on my site on top of English. Unicode will be my only option to do that. I don't like to serve the page with content="text/html; charset=gb2312", I just need something that can do all the things - Unicode.
By the way, I changed the top horizontal navigation menu on my site. I haven't upload it to this server though. Everything is still on localhost =) The one that's still on this site, it's too "heavy" and runs too slow. It consumes a noticeable amount of CPU performance. The new one will be alot more lightweight and most important thing is, it's still cross browser compatible.
Site will be updated pretty soon... hopefully...
Touring William to Gold Coast - 11:00 pm
Coast that doesn't produce gold...
Personal - DaRen
William(Xiao He) came over to Brisbane branch yesterday. We went down to the coast today since he never been to Gold Coast before. Stop by Harbour Town on the way, I grabbed a jumper and a pair of Adidas shoe from the shops. It seems that Harbour Town is expanding, that's good news for guys since there aren't many men shops before that. But any how, with Jimmy and William, we're able (I'm forced to) finish the "shopping trip" in an hour no matter how big Harbour Town got expanded =) You'll be amazed to see the comparison results between the male and female shopping path. It reminds me about the shortest path thing... hehe...
It's so warm on the noon time, but then the rain on afternoon caused the temperature suddenly dropped till 17+ degrees. Huge waves and cold wind blowing on the Gold Coast beach, I can even count the people on the beach with my fingers. That indicates that winter is here and there's nothing to do and watch on the beach =p
Anyway, I bought two beanies in Surfers Paradise, one gray and one black. Never try wearing a beanie before, but I guess I'll be using them pretty soon with this kinda weather ^^
Opera 9.0 beta 2 - 10:49 pm
Browser , Software - DaRen
Opera 9.0 beta 2 is now available for download and testing. Areas like widgets, support of scripts, messaging and newsfeeds are major changes since beta 1.
View the changelog
Download Opera 9.0 beta 2
Torrent file for Opera 9.0 beta 2
Last edited: Thu 2006-06-15 @ 18:12 , by DaRen 1 time(s)
State of Origin - 10:17 pm
Game I
Event , Sports - DaRen
Game I - 24th May 2006 - NSW
NSW's 17-16 victory over Queensland in Wednesday's State of Origin rugby league - arrrh ~~ I'm not a big fan in rugby sports, but since I'm in Queensland, everybody is talking about this. It's just like the world cup fever, gonna watch it to support your state ! Anyway, out of topic, I even got clients that turn nasty because their plasma tv broke down and they can't watch the game... poor bastards =)
Game II - 14th June 2006 - Brisbane
Queensland beat New South Wales 30-6 to take Australian rugby league's State of Origin series into a decider in Melbourne next month.
*Updated on 2006.6.15*
Game III - 5th July 2006 - Melbourne
Great invention of the century - Bed Tray - 8:46 pm
$12.95 from Ikea
Personal - DaRen
Finally, after several weeks, I'm able to sit down (well, actually lying on my bed) quietly, peacefully, to blog something. It's not that I'm busy or whatever, just that I don't have the mood to write something after a rough day of work. I deserve more =)
Oh well, nothing much changes in my life. Everyday the same day. Today's a bit different. CEO pay a visit to Brisbane branch today but I don't think "You guys are doing excellent" will help or affect what I am doing right now. No promise or actions are considered or taken after I throw out the question. Well, I guess that's the end of the story, it's nothing new.
I did mentioned above that I'm lying on my bed right now. Yup, I finally bought a bed tray, or breakfast tray or whatever you call. It's a small tray with legs and sits on the bed. I never dare to use it for breakfast serving, because my bed ain't coke/milf-proof, and it's not anti-cockroach as well. I only use it to put my notebook, so that I can cover myself with quilt and blanket during the winter and use the notebook at the same time. It's only $12.95 from Ikea. (and oh ya, it's optical mouse friendly too hehe)
Working slowly on my site since the last update. I'm working on the url rewrite thing. Like usual, alot of files/codes are affected. I just need more practice in order to produce a quality codes that's versatile and easily expandable.
Last edited: Thu 2006-05-25 @ 20:48 , by DaRen 1 time(s)
To : BlurZzz - 10:12 pm
Family - DaRen
BlurZzz:
Kinda missed you after talking to you through the phone. Maybe it's because you're leaving to a place "more far" than you were before. Anyway, it's good to hear that you've settled down in KL. Please take good care of yourself, I seriously mean it and I hope you don't forget this.
Wish you and Tzyy Shyuan all the best !
Enable mod_rewrite in Windows - 7:21 pm
Apache's module - mod_rewrite
Computing , Guides - DaRen
A quick tip to enable Apache's module, mod_rewrite, for Windows. You need the extra step 4 & 5 if you're still unable to enable the mod_rewrite in Windows.
- Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)
- Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)
- Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.
- Then, find the the below section in httpd.conf
DocumentRoot "C:/www/public_html"
#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
- Now modify the option for AllowOverride to look like this:
<Directory />
Options All
AllowOverride All
</Directory>
Note:
The AllowOverride None in <Directory "C:/www/public_html" > scope will still disable url rewrite even though you got AllowOverride All in the scope of <Directory />. So be sure to check the AllowOverride options for every directory scope.
It's always convenient to use Options All but not a so-good-idea for stricter security. See Apache 2.0 directives for more info.
ps: Just to say "Woohoo ~~" for my weblog to hit over 100 entries =)
Nokia 6280 - 11:21 pm
Disappointed...
Gadgets , Personal - DaRen
I'm seeking for a new phone lately. Went to alot of shops and I just realize that the phones in Australia are so limited. It's like every shops are selling the same phones. It sucks when the telephone companies and phone manufacturer are standing on the same side.
Anyway, Nokia 6280 is my first choice. I read alot of reviews on the internet. Even though there are many reviews mentioned about the poor quality of photos taken from the 2 Mega pixel camera, I still consider it as a nice phone. However, I gave up my stand for this phone after I read the 2 MP camera test: 6280 vs N70 vs D750. It's very obvious that the photo is more "sharper" and I guess it's also something to do with the compression settings the phone uses. It reminds me about the early days of digital cameras. It's just a crappy 2 Mega pixel camera.
Nokia N70 is fine but I feel that it's bulky and it gets alot of heat from users review. Other than the photo quality, N70 is nothing more better than 6280. I guess I'll just have to wait for better phones that's coming out later on this year. 3.2 Mega pixel camera phone is on its way =)
Read more reviews for Nokia 6280.
|
|
|
|
|