Stuart ONE

          我有一頭小毛驢,我從來也不騎……

           

          2006年3月7日

          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 閱讀(400) | 評論 (0)編輯 收藏

          刪除某路徑下所有某后綴名的文件

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

          posted @ 2006-04-12 13:04 Stuart 閱讀(307) | 評論 (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 閱讀(290) | 評論 (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 閱讀(247) | 評論 (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 閱讀(2762) | 評論 (0)編輯 收藏

          About replace text

          今天老安又給我上了一課:

          具體內容是關于文件里面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 還真屌……

          posted @ 2006-03-09 16:13 Stuart 閱讀(326) | 評論 (0)編輯 收藏

          List the fonts currently using

          fc-match --sort

          posted @ 2006-03-07 11:03 Stuart 閱讀(282) | 評論 (0)編輯 收藏

          導航

          統計

          公告

          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          文章分類

          相冊

          BlogRoll

          Tech websites

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 旌德县| 崇阳县| 鲁甸县| 涪陵区| 隆昌县| 泸溪县| 灯塔市| 遂溪县| 新宾| 射阳县| 牙克石市| 襄城县| 江油市| 新竹市| 洪泽县| 嵊州市| 濮阳县| 石城县| 来宾市| 武邑县| 阳曲县| 宁强县| 巧家县| 咸丰县| 陆川县| 洞头县| 罗定市| 松原市| 南郑县| 株洲市| 东港市| 安多县| 中牟县| 隆尧县| 岳阳市| 天祝| 长汀县| 本溪| 五华县| 晋中市| 淮南市|