|
|
|
|
|
|
Powered byD's Bloggie
| Weblog Main complete archive ... |
|
|
Last edited: Sat 2006-06-17 @ 20:17 , by DaRen 2 time(s)
MySQL 4.0.21 - 6:35 pm
Who's still using it ?
Software , Web Hosting - DaRen
Just realize that I'm (still) using MySQL 4.0.21. That's not a big deal if I'm not aware of this before that. However, it makes me feel that I'm stupid because I thought the version I'm using is MySQL 5.0+ which in fact is just 4.0.21. This is horrible... suddenly I just remembered it's almost 3 years I haven't format my harddisk. That also means that I got MySQL server installed for almost 3 years ! gayness...
(well, come to think about it... my notebook survived for so long and it has never been took down by virus/trojan... not too bad eh ? although it's full of craps and spywares...)
Check out the below screen shot, notice the "Date Created: 2004-10-14" ... Also I just checked the MySQL download website, MySQL Control Center is "discontinued", they no longer provide download for it. Well, at least I remember the last time when I download it, MySQL website still consider it as a project that "no longer under development".
 MySQL 4.0.21, with MySQL Control Center
I guess I just have to upgrade to the latest version 5.0.22... doh...
Web hosting company using MySQL 5.0+ --- $100+/month
Web hosting company using MySQL 4.1+ --- $10+/month
Web hosting company using MySQL 4.0+ --- Priceless
Site updates on long weekend - 7:38 pm
New [table] tag
Site Issue , Site Updates - DaRen
Today is a public holiday, the Queen's birthday. Spent most of yesterday and today's time to update my site. I added a [ table ] tag to my bbcode parser. This table tag is inspired by the table syntax used in Wiki. Wiki called it as 'pipe syntax'. See below :
[ Hide ] [ table]
{| class="weblogtable" style="margin: 1em auto 1em auto;"
|+ The table's caption
! Column heading 1 !! Column heading 2 !! Column heading 3
|-
! Row heading 1
| Cell 2 || style="font-size: 20px;" | Cell 3
|- style="color:#ff0000;"
! Row heading A
| Cell B
| Cell C
|}
[/table]
Will give you this result:
The table's caption
| Column heading 1 |
Column heading 2 |
Column heading 3 |
| Row heading 1 |
Cell 2 |
Cell 3 |
| Row heading A |
Cell B |
Cell C |
This is quite different from the existing tags. It's sort of half tag half markup style. Everything is enclosed inside the table tag, however the syntax is more to structured markup style. Line break is important, every line must start with a valid syntax. The syntax is almost 95% the same as Wiki has. Nested tables are allowed inside a table cell. Check out Wiki - Help:Table. To see the how I used the table tag, visit here and also here.
Added encoding checking in blog content. It will display a icon telling whether the content is pure Ascii, UTF-8 wellformed or just a malformed UTF-8 (might be other type of encoding). I also made a feature that allows public to see the raw structure of a blog entry. It will dump out what it's originally looks like before rendering is took place. Search the top-right of every blog entries for the icons.
Last edited: Sun 2009-05-24 @ 15:32 , by DaRen 3 time(s)
Unicode Symbols - 11:28 am
Unicode - DaRen
This will be my collection of Unicode symbols. Feel free to copy and paste.
Note: For some reasons, my IE 6 failed to display most of the characters/symbols. Opera and Firefox have no problem. It also depends on the O/S you used.
Symbols in Unicode
| Symbol |
Unicode Codepoint |
Name |
| ✓ |
U+2713 |
CHECK MARK (tick) |
| ✔ |
U+2714 |
HEAVY CHECK MARK (bold tick) |
| ✗ |
U+2717 |
BALLOT X (cross) |
| ✘ |
U+2718 |
HEAVY BALLOT X (bold cross) |
| ☐ |
U+2610 |
BALLOT BOX (square) |
| ☑ |
U+2611 |
BALLOT BOX WITH CHECK (square with tick) |
| ☒ |
U+2612 |
BALLOT BOX WITH X (square with cross |
| “ |
U+201C |
Open quote |
| ” |
U+201D |
Close quote |
●█〓██▄▄▄▄▄▄ ●●●●●● 顶 !
▄▅██████▅▄▃▂
██████████████
◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲◤
路过~~~~~~占块地盘!!!!
▁▂▃__ ﹋
__▁▂▁___ ﹀ ● 自由自在~﹀~
﹋
﹀ 我喜欢!
█▆▅▇▆▅▄▃▂▃▄▅▆▄▅▅▆█
-__~~--___-▔~~__--__--- - ----
Last edited: Wed 2006-07-12 @ 20:19 , by DaRen 26 time(s)
FIFA World Cup 2006 - Scoreboard - 1:48 am
Event , News , Sports - DaRen
FIFA World Cup Germany 2006 - 2:03 pm
"A time to make friends"
Event , News , Sports - DaRen
Group A - Match #1
 Germany 4 2 Costa Rica
Group A - Match #2
 Poland 0 2 Ecuador
FIFA World Cup Germany 2006 is here! Personally Im not crazy about this but gotna "give face" to those socceroos since it's only happening once in 4 years.
Anway, I fell asleep half way watching the World Cup match between Germeny and Costa Rica this morning. Maybe a wide screen plasma TV can keep me this-not-a-big-time-soccer-fan awake for whole night but I'm pretty sure a 21" TV will not !! hehe...
Iñtërnâtiônàlizætiøn - 1:28 pm
Everything is put up for testing...
Site Issue , Site Updates , Unicode , Web Hosting - DaRen
Don't be surprised with all those chinese characters appearing all over the main page. I'm just performing a test to see how well my template engine can handle with multibyte characters.
The main content/layout will still be in Engish (well, technically speaking, ASCII). I'll probably use some chinese in some of the blog entries if needed.
Oh ya, Iñtërnâtiônàlizætiøn
The MySQL database dump seems to be working fine. However, in server-side, I haven't tried to restore the data from the dump file yet. I'll try it later or tonight since I have something else to do right now =)
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 ^^
|
|
|
|
|