I posted some articles to discuss the differences between Delphi visual components and native Windows controls. I think it is worth to make a project rather than share them as attachments here. Now I started an open source project. The project aims to restore the native Windows control look and feel. Please feel free to use it and to share it.
BTW: Due to Internet censorship of China, it is quite difficult to access blogspot.com and blogger.com. If you mail me for technical support, please leave a reply address as well.
Monday, September 26, 2011
Native Look VCL Project Started
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
7:33 AM
2
comments
Tags: delphi, vcl patches
Friday, April 22, 2011
Appearance Preferences Interface Tab
Unfortunately, icons are gone in all Context Menu by default since openSUSE 11.3. Even worse is that the Interface has been removed from the Appearance Preferences Window.
I think i am not the only people, who would rather remember the menu item position than search for its label. So I became very unproductive when I have to face a very long context menu of Eclipse without any icons.
Here is the way to give it back:
- In the terminal, call up gconf-editor
- Navigate to desktop/gnome/interface
- Scroll down and check the menus_have_icons box.
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
1:07 PM
0
comments
Sunday, April 10, 2011
Finally get back all 4GB memory
HP is so ridiculous to send me a 64-bit quad-core HP Pavilion s5235 but a 32-bit Windows 7. Only one thing troubles me, that only 3.25GB (4GB memory is installed) memory is usable. So I called HP customer service, but they cannot give me a 64-bit Windows due to some 64-bit hardware driver problems They also said that I am lucky, because on some devices only 2.99GB memory can be recognized.
Generally speaking, 3.25GB memory is significant for me. And I believed that this is a hardware limitation for a 32-bit operating system, until I read this article.
Now I'd like to share you a very simple way to use 4GB memory on a 32-bit Windows 7.
- Disable your anti-virus program temporarily.
- Download the software ReadyFor4GB from here or here
- Apply the patch and reboot your system
- Download the software RemoveWatermark from here, here or here
- Apply the patch by pressing 'Y' and reboot your system
Now you can use full 4GB memory!
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
5:47 PM
0
comments
Tags: tips
Sunday, December 19, 2010
Sunday, October 10, 2010
Use the magic number
Here is a very interesting article http://www.matrix67.com/data/InvSqrt.pdf
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
4:43 PM
0
comments
Tags: math
Thursday, April 23, 2009
Potential memory leaks by initializing a record (revised)
Currently I am involved in some D projects. Language D has nothing to do with Delphi. It has a lot of great features: Design by Contract, Templates, immutable, Array-Slicing, etc. My teammates give me a lot of advices on software design. One thing just inspired me. so I revised my old article "Potential memory leaks by initializing a record".
The main point is that FillChar() looks more like an abuse of initializing a record. I suggest declare a const record (eg. EmptyRecord) instead of using FillChar(). If you are an expert, you will NOT make such a mistake, but it is still worth to tell the rest Delphi developers.
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
8:25 PM
0
comments
Tags: delphi
Thursday, October 23, 2008
LIKE is not case insensitive?
I was stuck by understanding the following SQL query:
SELECT name
FROM my_table
WHERE name LIKE '%Jack%'
There is nothing special. It just tries to pick up all "names" of "my_table", those values contain the word "Jack" (case sensitive). However, "jack" is also in the result. I cannot believe my eyes.
I googled "LIKE case insensitive" and got the answer:
The problem is caused by the collation of the database. The default collation of my database is "latin1_swedish_ci". The trailing "_ci" stands for case insensitive. I changed it to "utf8_bin", the problem has been solved.
Here are some useful links:
http://forums.mysql.com/read.php?20,202839,202839
http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html
http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html
Posted by
stanleyxu (2nd)
/ALL RIGHTS RESERVED/ at
6:15 PM
1 comments
Tags: tips