Stuart ONE

我有一头小毛驴,我从来也不骑……

 

2006年3月21日

Using anti-alias

set anti-alias for graphics:
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);


set anti-alias for components:
// Making a JTextArea use anti-Alias fonts
// only works in JDK 1.5+
jtextArea.putClientProperty(
com.sun.java.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY,
Boolean.TRUE ); 

posted @ 2006-06-25 21:28 Stuart 阅读(396) | 评论 (0)编辑 收藏

删除某路径下所有某后缀名的文件

    $  find . -name \*.NAME -exec rm '{}' \;

posted @ 2006-04-12 13:04 Stuart 阅读(305) | 评论 (0)编辑 收藏

mysql backup & restore command, AS IF..... -_-#

Backup:
mysqldump -u USERNAME -p DBNAME > OUTPUT.dump

Restroe:
mysql -u USERNAME -p DBNAME < OUTPUT.dump


posted @ 2006-03-27 16:46 Stuart 阅读(284) | 评论 (0)编辑 收藏

The vista fonts

I added the vista fonts into my laptop, i like the corbel font, and the numbers are cute:-)

Here's the steps:(In fact im still quite confused abt the setting fonts in debian...#*(&%#$...and i think these steps isn't the right way although it works)

1. put the vista fonts in a folder and put the folder into /usr/share/fonts/truetype/
2. add these in the ~/.fonts.conf
<match target="font">
   
<test name="family">
   
<string>Calibri</string>
   
<string>Cambria</string>
   
<string>Candara</string>
   
<string>Consolas</string>
   
<string>Constantia</string>
   
<string>Corbel</string>
   
</test>
 
<edit name="autohint">
       
<bool>true</bool>
   
</edit>
</match>
3.now u can choose ur fonts in the gnome.....

PS: for step 1, i think put the vista folder in the ~/.fonts/ directory is ok too....(i never tried)

posted @ 2006-03-25 12:09 Stuart 阅读(244) | 评论 (0)编辑 收藏

create user in MySQL 5.0

The create user command:
mysql> CREATE USER yy IDENTIFIED BY '123';

grant:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'host' [ IDENTIFIED BY'password' ];

flush:
mysql> flush privileges;

now u can login with:
$ mysql -u username -p

posted @ 2006-03-21 22:21 Stuart 阅读(2757) | 评论 (0)编辑 收藏

导航

统计

公告

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

相册

BlogRoll

Tech websites

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜