2006年2月20日
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 );
???
$? find . -name \*.NAME -exec rm '{}' \;
Backup:
mysqldump?-u?USERNAME?-p?DBNAME?>?OUTPUT.dump
Restroe:
mysql?-u?USERNAME?-p DBNAME <?OUTPUT.dump
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)
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
今天老安又給我上了一課:
具體內容是關于文件里面text的替換,首先是VI里的替換:
%s/ORIGINAL_TEXT/REPLACE_TEXT/gc
然后呢,因為一個folder下的所有文件都需要替換某些text,于是又有以下這個script(注:進入到該folder所在位置后):
for f in *; do sed 's/ORIGINAL_TEXT/REPLACE_TEXT/' < $f > $f.new; mv -f $f.new $f; done
shell programming 還真屌……
1. First of all you can see all the available fonts using
$ fc-list -v
2. Modify the file /etc/fonts/fonts.conf, make ur own conbinatory font.
3. Now we have to make our changes take effeck, using:
# fc-cache -v
4. If you are not satisfied with the font, just repeat step 2 & 3.
move ur cursor to somewhere u want to append from, type the " :r FILENAME ".