Monday, October 17, 2005
XUL - XML User Interface Language
Wow, thanks to Trung, I've just known about this new lang!
The amazing/confusing point is, that it somehow coincides with my idea of a "discriptive language" for GUI designing: a language for discribing all of the GUI components ("forground") in a style like XML, and has links to the behaviors "background" built in other "normal" programming languages.
Friday, October 14, 2005
Java Look-and-feels
- OYOAHA laf: Opensource; New features: animations, (alpha)transparency, sounds, etc. [demo applet]
- Simple laf: "free" with 10 euros fee! Configurable by a properties file, (maybe the most) flexible. [demo JWebstart]
- Skin laf: Opensource, skinnable (pluggable), however less flexible than SLAF.[demo JWebstart]
Saturday, August 20, 2005
Sunday, August 07, 2005
InfoNode - a cOoL Swing GUI
- (advanced) Tabbed panel
- (super) Docking window
- and also with a cool Look-and-feel
Just try, you will like it!
Saturday, August 06, 2005
No "unsigned" int. in Java, NOP!
After a long long time working with Java, now I have "discovered" that there really NO UNSIGNED integer type there! E'ry int., byte(8b), short(16b), int(32b) and long(64b) is signED one ! :-?
The more surprising thing is that, there is no pre-built method for casting signed one to unsigned one, either !
Friday, August 05, 2005
Big-endian Vs. Little-endian
- big-endian = "big-end-first" : 0x0201 --> 02,01
- little-endian = "litle-end-first": 0x0201 --> 01,02
Mostly because of the nature of World's languages and of the world-wide used Arabic-numeral system, the Internet Protocol defines a standard "big-endian" network byte order.
To summarize, here are the default endian-formats of some common computer architectures:
- Pure big-endian: Sun SPARC, Motorola 68000, PowerPC 970, IBM System/360
- Bi-endian, running in big-endian mode by default: MIPS running IRIX, PA-RISC, most POWER and PowerPC systems
- Bi-endian, running in little-endian mode by default: MIPS running Ultrix, most DEC Alpha, IA-64 running Linux
- Pure little-endian: Intel x86, AMD64, DEC VAX (excluding D-Float numbers)
It is interesting that... the very terms big-endian and little-endian were taken from the Big-Endians and Little-Endians of Jonathan Swift's novel Gulliver's Travels, two groups of people in conflict over which end of an egg to crack in the voyage to Lilliput and Blefuscu.
Thursday, June 30, 2005
Java applets can communicate with each other easily !
- the basic way is to use the methods getApplet(), getApplets() in java.applet.AppletContext. An AppletContext can be fetched using method java.appet.Applet.getAppletContext(). This way is only for applets on the same page.
- the "trick" way is to use a (shared) public static reference to store the reference to this Applet object instance, then other applet can simply access this applet through this reference. This way is only for applets with the same codebase (codebase attribute in APPLET tag).
ref: An alternative way for applet-to-applet communication
Sunday, May 15, 2005
Java GUIs
Laziness, the virtue !
Thursday, May 12, 2005
"PRN" file name on Windows
I suppose that, in an effort to maintain reverse compatibility with
old MS-DOS command line gurus, you cannot create a file or directory
named PRN.xxx where the xxx is replacable with any extension.
Old style MS-DOS command line-ing would allow you to do the following
to print your autoexec file:
C:\>copy autoexec.bat prn
what this actually does is redirect the contents of autoexec.bat to
the port LPT1.
...
Wednesday, January 12, 2005
What is a "Lang Spec" ?
...a complete specification of the syntax and semantics of the language. We intend that the behavior of every language construct is specified here, so that all implementations will accept the same programs. Except for timing dependencies or other non-determinisms and given sufficient time and sufficient memory space, a program written in the Java programming language should compute the same result on all machines and in all implementations.
The Java Language Specification
Thursday, January 06, 2005
Drawbacks to XML
Sunday, December 19, 2004
Friday, December 10, 2004
"Một nửa thế giới" với ngành CNTT
VnExpress - 'Một nửa thế giới' với ngành công nghệ thông tin
Google có phong cách CreatZy !
Ngoài ra, không giống phần lớn các tập đoàn Mỹ, Google cho phép dắt chó vào phòng làm việc. Hãng lý giải họ thích không gian làm việc đông đúc, “với ba hay bốn nhân viên, cùng hàng loạt bàn ghế và lũ chó quây quần”. Điều đó “sẽ tăng lượng thông tin trao đổi và... tiết kiệm tiền sưởi ấm”.
VnExpress - Ông chủ Google khuyến khích nhân viên sáng tạo
Monday, November 29, 2004
Balanced trees
Red/Black Tree Demonstration: Maintenance Version
JAVA MODELS for behaviour of binary search trees: (SPL,R-B,AVL) This provide us a GREAT demonstration with fantastic graphics & sound & thinking & tree operations, but..... just a little large applet. Please wait for the first time loading it!
Friday, November 19, 2004
Wednesday, November 17, 2004
"MS-DOG"
*** You cannot make any file in form "prn.xxx"(xxx is arbitrary extension) ANY WHERE. Just because it has already stood for "printer" device!
- The read-only bits for directories are never used.
- You can rename files but not directories.
- Pipes, foo|bar, are implemented by >tempfile and <tempfile.
- You can open a file like c:\foo\..\config.sys even if you don't have a foo directory.
- Redirection doesn't work with batch files.
- Redirection doesn't work with the "For" command.
- You can only expand environment variables from batch files, not from the command line.
- The remainder of a "Rem" statement is not completely ignored. Rem > foo will create a zero-length file.
- Utilities like "sed" are not provided with MsDog so you cannot rely on users having them.
- and so on ...
Monday, October 25, 2004
Big O notation - Matters of notation
The statement "f(x) is O(g(x))" as defined above is often written as f(x) = O(g(x)). This is a slight abuse of notation: we are not really asserting the equality of two functions. Here is a bad example:
O(x) = O(x2) but O(x2) ≠ O(x)
By this reason, some authors prefer a set notation and write f ∈ O(g), thinking of O(g) as the set of all functions dominated by g.
Furthermore, an "equation" of the form
f(x) = h(x) + O(g(x))
is to be understood as "the difference of f(x) and h(x) is O(g(x))".
In casual use, O is commonly used where Θ is meant, i.e., a tight estimate is implied. For example, one might say "heapsort is O(n log n) in average case" when the intended meaning was "heapsort is Θ(n log n) in average case". Both statements are true, but the latter is a stronger claim.
**) Here is a hint (and mnemonics) why Landau selected these Greek letters: "omicron" is "o-micron", i.e., "o-small", whereas "o-mega" is "o-BIG".
Sunday, October 24, 2004
Prime Number
Euler commented "Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the mind will never penetrate" (Havil 2003, p. 163).
In a 1975 lecture, D. Zagier commented "There are two facts about the distribution of prime numbers of which I hope to convince you so overwhelmingly that they will be permanently engraved in your hearts. The first is that, despite their simple definition and role as the building blocks of the natural numbers, the prime numbers grow like weeds among the natural numbers, seeming to obey no other law than that of chance, and nobody can predict where the next one will sprout. The second fact is even more astonishing, for it states just the opposite: that the prime numbers exhibit stunning regularity, that there are laws governing their behavior, and that they obey these laws with almost military precision" (Havil 2003, p. 171).
