I am now 23 years old. Dari had a surprise for me. After I came back from work, there were balloons and food and people
There are pictures and videos, which I will publish in the next few days. In a few words, we ate, talked, sang ( karaoke and guitar ), ate cake and went to bed. More when I have the pictures and the videos ready
Last night I was doing some karaoke stuff and I now have 3 Perl scripts that were helping me all the time:
#!/usr/bin/perl# execute: ls *.mp3|perl create_zip_file.pl to create .zip from a pair of .mp3 .cdgforeach (<STDIN>) {$was = $_;$was =~ s|MP3||gi;chomp($was);$string = "zip \"$was"."zip\" \"$was"."mp3\" \"$was"."cdg\"";print $string;system ($string);}- Свалете този код/download this code: create_zip_file.pl
#!/usr/bin/perl# nicecase - proper case on icky filenames with spacesforeach (<STDIN>) {$was = $_;$_ = join ' ', map {ucfirst(lc($_))} split /\s+/, $_;print $_."\n";}- Свалете този код/download this code: names.pl
#!/usr/bin/perl -w#Swap Song - Artist to Artist - Songforeach (<STDIN>){#print $_."\n";chomp();$was = $_;@asd = split /\-/,$was;$asd[0] =~ s/[0-9]{1,2}\s//g;print $asd[1]." - ".$asd[0]."\n";}- Свалете този код/download this code: swap_artist_song.pl
Bulgaria: Bulgaria’s EU Commissioner Meglena Kuneva, who is in charge of consumer protection, accused Apple Co. for unfair competition in front of the German magazine Focus.
http://www.engadget.com/2007/03/11/apple-drm-pressure-spreads-to-eu-chief/
http://news.yahoo.com/s/nm/20070311/wr_nm/eu_apple_dc
http://www.novinite.com/view_news.php?id=77777
The last few days ( weeks ) I’ve been working on some interesting aspects of internationalization under linux. Since the start of the semester I started the Bulgarian translation of Rasmol. Nothing interesting in this part, but when a Chinese and Japanese translations showed up, I had to modify the code for the menus to display the gliphs correctly. The problems were the following:
The graphical part of RasMol is using Xlib. No GTK nor QT. So in Xlib, in general, XDrawString and XDrawText are used to display text on the menus. Everything works OK until we start using east Asian languages. With them, a single glyph can be more than one byte, which causes rather interesting things to show up on the screen. Fortunately the Xlib devs have thought about that and have given us XmbDrawText and XmbDrawString but they work in a very different way. In order to display the gliphs on the screen, a list of fonts which can decode the text is needed, the LOCALE must be set correctly and the length of the decoded string must be calculated. Here comes XCreateFontSet – a method to create XFontSet structure required for XmbDraw*. OK, we have the tools but we need fonts, also the text must be in the correct encoding. We cannot just write all languages in UTF and try to display them ( UTF is not very well supported in Xlib regardless of the XwcDraw* functions ). We must encode every language in its own character set. Also since they are all in a single file, we cannot just use open->save to do the conversion, because it will mess up everything. We need to separate the languages, to encode them in the correct charset and to cat them in to the single file. Hopefully it works and here is the list of my 4 encodings:
iso8859-1 ( още известен като latin-1 ) за западно европейските езици
cp1251 ( aka windows-1251) for Cyrillic
cp936 for Chinese
eucjp ( euc-jisx0213, shift-jisx0213, sjis, ujis etc. ) for Japanese
so at the end we have 1 file from which it is impossible to display all languages at once correctly. Good thing there is iconv and the above procedure is not that hard. The hard part is to use the correct encoding< ->font< ->locale combination.
For myself I made a UTF8 version of that file and all languages can render perfectly in one singe file.
In the end we have Rasmol in English, Bulgarian, Spanish, Italian, French, Chinese, Russian and Japanese and they all show correctly under linux ( as well as windows after a few mods in the configs and a few restarts per language switch )
So I have to do some cosmetic changes and there it is.
—
I got an email from google a week ago ( exactly 1 month after their first email ) in which they thank me for the time and after carefully reviewing my experience and qualifications they decided that they do not have a strong match for me. It was going to be nice to gain some exp. @ google. I guess there were LOTS of applicants and some sources say that ppl from better schools have better chances, but I’m don’t know…
—
I’m going to get some food…
-
Prefered Language:
-
Categories:
- Astronomy (rss) (11)
- My Life (rss) (495)
- Networking (rss) (4)
- Multimedia Web Design (rss) (2)
- Work (rss) (100)
- Recipies (rss) (29)
- Articles (rss) (13)
- Movies (rss) (36)
- Food notes (rss) (5)
- Nutrition Diary (rss) (9)
-
Archives:
- August 2010 (1)
- July 2010 (2)
- June 2010 (1)
- April 2010 (1)
- March 2010 (3)
- February 2010 (1)
- 2010 (13)
- 2009 (20)
- 2008 (33)
- 2007 (121)
- 2006 (153)
- 2005 (238)
- 2004 (4)
- 2000 (1)
-
Links:
-
"Those who know do not talk.
Those who talk do not know.
Stop talking,
meditate in silence,
blunt your sharpness,
release your worries,
harmonize your inner light,
and become one with the dust.
Doing this is the called the dark and mysterious identity.
Those who have achieved the mysterious identity
can not be approached, and they can not be alienated.
They can not be benefited nor harmed.
They can not be made noble nor to suffer disgrace.
This makes them the most noble of all under the heavens." - Lao Tzu (老子)
