巷尾的酒吧

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            64 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks

          #

          查看所有字體:
          fc-list

          查看中文字體
          fc-list :lang=zh

          用fc-list找出語言為zh的字體文件,可見系統里中文字體少的可憐。知道了這些字體,還需要進一步了解這些字體對應的文件,可以運行fc-match程序得到,
          fc-match -v "AR PL UKai CN"

          Pattern has 32 elts (size 48)
              family: "AR PL UKai CN"(s)
              familylang: "en"(s)
              style: "Book"(s)
              stylelang: "en"(s)
              fullname: "AR PL UKai CN"(s)
              fullnamelang: "en"(s)
              slant: 0(i)(s)
              weight: 80(i)(s)
              width: 100(i)(s)
              size: 12(f)(s)
              pixelsize: 12.5(f)(s)
              spacing: 90(i)(w)
              foundry: "unknown"(s)
              hintstyle: 3(i)(s)
              hinting: FcTrue(s)
              verticallayout: FcFalse(s)
              autohint: FcFalse(s)
              globaladvance: FcFalse(w)
              file: "/usr/share/fonts/cjkunifonts-ukai/ukai.ttc"(s)
              index: 0(i)(s)
              outline: FcTrue(s)
              scalable: FcTrue(s)
              dpi: 75(f)(s)
              scale: 1(f)(s)
              minspace: FcFalse(w)
              charset: 0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffffff ffffffff ffffffff
              0001: ffffffff ffffffff ffffffff ffffffff 00800000 00018003 fffffff0 ff3f3fcf
              0002: cfffffff 008fffc0 08130010 00200502 00000608 30000000 2f002fc0 00000c00
                              
              02f8: 00000000 08000020 00000001 01000000 00100000 00000040 00002000 00000000
              02f9: 00000000 00000000 00000000 00000000 00100000 10040000 00100000 00000000
          (s)
              lang: aa|af|ast|ay|bg|bi|bin|br|bs|ca|ch|co|cs|cy|da|de|el|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|ga|gd|gl|gn|gv|ho|hr|hu|ia|ibo|id|ie|io|is|it|ki|kl|kum|kw|la|lb|lt|lv|mg|mh|mi|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|se|sel|shs|sk|sl|sma|smj|smn|so|sq|ss|st|sv|sw|tn|tr|ts|ven|vi|vo|vot|wa|wen|wo|xh|yap|yo|zh-cn|zh-sg|zh-tw|zu(s)
              fontversion: 13107(i)(s)
              capability: "otlayout:DFLT otlayout:bopo otlayout:cyrl otlayout:grek otlayout:hani otlayout:kana otlayout:latn"(s)
              fontformat: "TrueType"(s)
              embeddedbitmap: FcTrue(s)
              decorative: FcFalse(s)


          這里只查閱了字體“AR PL UKai CN”,可以看到其對應文件"/usr/share/fonts/cjkunifonts-ukai/ukai.ttc",其他的字體信息也可以通過該方法查得。

          posted @ 2013-07-12 15:11 abing 閱讀(1919) | 評論 (0)編輯 收藏

          package writeimg;
          import javax.imageio.ImageIO;
          import java.awt.Color;
          import java.awt.Font;
          import java.awt.Graphics2D;
          import java.awt.image.BufferedImage;
          import java.io.File;
          import java.io.IOException;
          import java.net.URL;


          public class pic {

           private Font font = new Font("華文彩云", Font.PLAIN, 40);// 添加字體的屬性設置

           private Graphics2D g = null;

           private int fontsize = 0;

           private int x = 0;

           private int y = 0;

           /**
            * 導入本地圖片到緩沖區
            */
           public BufferedImage loadImageLocal(String imgName) {
            try {
             return ImageIO.read(new File(imgName));
            } catch (IOException e) {
             System.out.println(e.getMessage());
            }
            return null;
           }

           /**
            * 導入網絡圖片到緩沖區
            */
           public BufferedImage loadImageUrl(String imgName) {
            try {
             URL url = new URL(imgName);
             return ImageIO.read(url);
            } catch (IOException e) {
             System.out.println(e.getMessage());
            }
            return null;
           }

           /**
            * 生成新圖片到本地
            */
           public void writeImageLocal(String newImage, BufferedImage img) {
            if (newImage != null && img != null) {
             try {
              File outputfile = new File(newImage);
              ImageIO.write(img, "jpg", outputfile);
             } catch (IOException e) {
              System.out.println(e.getMessage());
             }
            }
           }

           /**
            * 設定文字的字體等
            */
           public void setFont(String fontStyle, int fontSize) {
            this.fontsize = fontSize;
            this.font = new Font(fontStyle, Font.PLAIN, fontSize);
           }

           /**
            * 修改圖片,返回修改后的圖片緩沖區(只輸出一行文本)
            */
           public BufferedImage modifyImage(BufferedImage img, Object content, int x,
             int y) {

            try {
             int w = img.getWidth();
             int h = img.getHeight();
             g = img.createGraphics();
             g.setBackground(Color.WHITE);
             g.setColor(Color.orange);//設置字體顏色
             if (this.font != null)
              g.setFont(this.font);
             // 驗證輸出位置的縱坐標和橫坐標
             if (x >= h || y >= w) {
              this.x = h - this.fontsize + 2;
              this.y = w;
             } else {
              this.x = x;
              this.y = y;
             }
             if (content != null) {
              g.drawString(content.toString(), this.x, this.y);
             }
             g.dispose();
            } catch (Exception e) {
             System.out.println(e.getMessage());
            }

            return img;
           }

           /**
            * 修改圖片,返回修改后的圖片緩沖區(輸出多個文本段) xory:true表示將內容在一行中輸出;false表示將內容多行輸出
            */
           public BufferedImage modifyImage(BufferedImage img, Object[] contentArr,
             int x, int y, boolean xory) {
            try {
             int w = img.getWidth();
             int h = img.getHeight();
             g = img.createGraphics();
             g.setBackground(Color.WHITE);
             g.setColor(Color.RED);
             if (this.font != null)
              g.setFont(this.font);
             // 驗證輸出位置的縱坐標和橫坐標
             if (x >= h || y >= w) {
              this.x = h - this.fontsize + 2;
              this.y = w;
             } else {
              this.x = x;
              this.y = y;
             }
             if (contentArr != null) {
              int arrlen = contentArr.length;
              if (xory) {
               for (int i = 0; i < arrlen; i++) {
                g.drawString(contentArr[i].toString(), this.x, this.y);
                this.x += contentArr[i].toString().length()
                  * this.fontsize / 2 + 5;// 重新計算文本輸出位置
               }
              } else {
               for (int i = 0; i < arrlen; i++) {
                g.drawString(contentArr[i].toString(), this.x, this.y);
                this.y += this.fontsize + 2;// 重新計算文本輸出位置
               }
              }
             }
             g.dispose();
            } catch (Exception e) {
             System.out.println(e.getMessage());
            }

            return img;
           }

           /**
            * 修改圖片,返回修改后的圖片緩沖區(只輸出一行文本)
            *
            * 時間:2007-10-8
            *
            * @param img
            * @return
            */
           public BufferedImage modifyImageYe(BufferedImage img) {

            try {
             int w = img.getWidth();
             int h = img.getHeight();
             g = img.createGraphics();
             g.setBackground(Color.WHITE);
             g.setColor(Color.blue);//設置字體顏色
             if (this.font != null)
              g.setFont(this.font);
             g.drawString("   g.dispose();
            } catch (Exception e) {
             System.out.println(e.getMessage());
            }

            return img;
           }

           public BufferedImage modifyImagetogeter(BufferedImage b, BufferedImage d) {

            try {
             int w = b.getWidth();
             int h = b.getHeight();
             

             g = d.createGraphics();
             g.drawImage(b, 100, 10, w, h, null);
             g.dispose();
            } catch (Exception e) {
             System.out.println(e.getMessage());
            }

            return d;
           }

           public static void main(String[] args) {

            pic tt = new pic();

            BufferedImage d = tt.loadImageLocal("D:\\11.jpg");
          //  BufferedImage b = tt
          //    .loadImageLocal("E:\\文件(word,excel,pdf,ppt.txt)\\zte-logo.png");
             tt.writeImageLocal("D:\\cc.jpg",tt.modifyImage(d,"曹原",90,90)
            //往圖片上寫文件
             );

            //tt.writeImageLocal("D:\\cc.jpg", tt.modifyImagetogeter(b, d));
            //將多張圖片合在一起
            System.out.println("success");
           }

          }







          http://blog.csdn.net/caoyuan10036/article/details/7278735
          posted @ 2013-06-04 20:54 abing 閱讀(939) | 評論 (0)編輯 收藏

          oracle 創建表table:
          create table abin1(
          id number(20,0) not null,
          name varchar2(100)not null,
          pwd nvarchar2(100) not null,
          create_time date,
          constraint pk_abin1 primary key(id)
          )

          oracle創建索引(index):
          create index myname on abin1(name);

          oracle創建序列sequence:
          create sequence abin1_seq
          minvalue 1
          maxvalue 999999999
          start with 1
          increment by 1
          cache 20;
          創建觸發器:
          create or replace trigger abin1_tri
          before insert on abin1
          for each row
          begin
          select abin1_seq.nextval into :new.id from dual;
          end;


          測試一條記錄:
          insert into abin1 (name,pwd,create_time) values ('abin','lee',sysdate); 
          呵呵,這里插入了數據,主鍵自增了,說明成功了。


          創建存儲過程procedure:
          create or replace procedure abin1_pro
          is
          cursor mycur is select t.* from abin1 t;
          abin mycur%rowtype;
          begin
               open mycur;
               loop
                  fetch mycur into abin;
                  if(abin.name='abin')then
                        update abin1 t set t.name='abining',t.pwd=abin.pwd,t.create_time=sysdate where t.id=abin.id;
                        commit;
                  end if;
                  exit when mycur%NOTFOUND;
               end loop;
                  if(mycur%ISOPEN)then
                       close mycur;
                  end if;
          end;


          測試存儲過程示例:
          declare
          begin
                  abin1_pro;
          end;


          創建oracle函數function:
          create or replace function abin_func
          return number
          is
          total number;
          begin
          select count(1) into total from abin1 t;
          return(total);
          end;


          創建測試函數示例:
          declare
          total number;
          begin
                total:=abin_func;
                dbms_output.put_line(total);
          end;


          oracle創建視圖:
          create or replace view abin1_view
          as
          select t.* from abin1 t;


          oracle創建package:
          create or replace package abin_pac is
          procedure abinpac;
          end;


          oracle創建package body:
          create or replace package body abin_pac is
          procedure abinpac is
          total number;
          begin
           select count(1) into total from abin1;
           dbms_output.put_line(total);
          end;
          end;

          測試代碼:
          begin
           abin_pac.abinpac;
          end;



          posted @ 2013-06-02 23:26 abing 閱讀(1252) | 評論 (0)編輯 收藏

          [abin@localhost bin]$ ps -aux | grep tomcat7|awk '{if($11="/usr/bin/java") print $2}'
          1749
          15625
          [abin@localhost bin]$ ps -aux | grep tomcat[7]|awk '{if($11="/usr/bin/java") print $2}'
          1749
          [abin@localhost bin]$ pgrep java
          1749
          posted @ 2013-04-13 17:18 abing 閱讀(148) | 評論 (0)編輯 收藏

          shell awk
          http://www.cnblogs.com/orez88/articles/1889781.html
          posted @ 2013-02-03 21:14 abing 閱讀(190) | 評論 (0)編輯 收藏

          Fedora 17 已經安裝好openssh server了 不用再裝
          不過默認無開啟

          首先su root
          1.開啟ssh服務
          # systemctl start sshd.service

          2.隨系統一起啟動服務

          # systemctl enable sshd.service

          在terminal 中輸 setup 對防火墻 添加22 端口

          3.開啟防火墻22端口

          # iptables -I INPUT -p tcp --dport 22 -j ACCEPT


          測過ok

          1、在root權限下,修改ssh配置文件:vi /etc/ssh/ssh_config

          將一下三個注釋去掉,即去其前的“#”號:

          RSAAuthentication yes

          PasswordAuthentication yes

          Port 22

          2、啟動SSH服務:service sshd start

          3、測試是否安裝成功:ssh 192.168,.253.18    #對方ip

          出現: Are you sure you want to continue connecting (yes/no)? yes  #輸入yes
          出現:root@192.168.253.18's password:            #輸入對方對應角色密碼
          提示:Last login: Sun Nov 18 14:34:41 2012 from 192.168.253.20  #登錄成功

           

          4、操作完成后一定要退出登錄:logout    #忘記退出的后果是,所有命令行操作都在對方機器上!

          以下為免密碼登錄配置:

          1、生成密鑰: ssh-keygen -t rsa

          提示:

          The key's randomart image is:
          +--[ RSA 2048]----+
          |          +*++..|
          |        . ooo.. |
          |        +  .o . |
          |      + o .  + o|
          |      . S .  o *.|
          |      .    o .E+|
          |            .  |
          |                |
          |                |
          +-----------------+

          2、密鑰傳給對方機器: ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.253.18
          3、再重新登錄即可不用密碼:ssh 192.168.253.18

          PS:如果鏈接對方主機提示PORT 22 connection refused提示,可在對方主機上重新啟動ssh服務:service sshd start


          本篇文章來源于 Linux公社網站(www.linuxidc.com)  原文鏈接:http://www.linuxidc.com/Linux/2013-01/78033.htm

          posted @ 2013-02-03 17:52 abing 閱讀(272) | 評論 (0)編輯 收藏

          1、查詢1---1000行的日志記錄
          sed -n '1,1000p'  abin.log
          2、正則表達式查詢日志:
          sed -n '/17378/p'  abin.log
          sed '/17378/!d'  abin.log
          posted @ 2012-12-14 17:56 abing 閱讀(239) | 評論 (0)編輯 收藏

          微軟 研發 25w每年 
          谷歌 研發 25w每年 
          網易游戲 研發 25w每年 

          下面是國內各大互聯網公司研發崗薪資情況,簡單分幾個小組進行對比 

          【電商IT企業】 
          【淘寶網】10k×16+一些許福利大概16w 一個雙十一就190億交易量,我還說什么 
          【阿里云】13×16 
          【京東商城】9k×13大概12w 雖然不敵淘寶,但是看布局網絡支付的動作還是有實力的 
          【支付寶】10k×14大概15w 國內最大獨立第三方支付平臺,阿里巴巴子公司 
          【美麗說】 10k×13大概14w目前做的比較成功的社區型女性時尚媒體,愛網購的女生都知道 
          【美團】 10k×13+一些福利大概在16w 團購什么的不能小瞧 
          【聚美優品】 大概10w 前團美網,中國最大的化妝品限時特賣商城,電子商務你懂的 
          【去哪兒網】 12w到18w 不要以為他只是一個小網站 
          【大眾點評網】 應屆碩士11k×14 

          【國內IT五大】 
          【百度】 研發13k*13+些許補助大概有18w左右,搜索等核心部門16W+ 
          【網易】 11W+,其搜索部門有道大概15W+ 
          【騰訊11k×14+一些福利大概16w 
          【新浪】8k×13大概12w 
          【搜狐】10k×14大概14w 

          【潛力股創業公司】
          【小米】 碩士10k×13創業期,給不了太多
          【風云直播】研發22w每年 一個搞出很多新玩法的直播網站,最近比較火的彈幕直播,節目是我見過最全的,據說拿到巨額投資所以對人才很大手筆
          【陌陌】 11k×14+ 一些福利 大概在16w 看用戶就知道了,實力不能小覷 
          【全志科技】 10000×13 做視頻解碼,網絡優化什么的,現在很多無名小公司但很給力
          【深信服】 8300×13 華為創業人員辦的公司 創業期
          【北京風行網絡】 9000×15感覺像流氓軟件 ,待遇倒是很給力啊
          【淘米網絡】 非技術類10w 技術研發類 13w--15w 不加年終獎 說賽爾號知道了吧 

          【軟件開發類】 
          【360】研發 13k×13+一些福利大概17w多 
          【盛大】 研究生7K,本科生4K 
          【人人網】11×13+一些福利大概15w 
          【搜狗】18w左右 
          【微策略】18w左右 
          【金山】7.5k×13大概10w 
          【迅雷】 研發 7K ×13個月 碩士1w 5個社會保險+3個商業醫療保險 公司內有星巴克咖啡廳 住宿:試用期住宿免費 轉正之后公司幫忙租房 
          uc瀏覽器8×14+每天四頓大概12w 
          【人民搜索】 18w+帝都戶口,絕對是今年的暴發戶 
          【創新工廠】大概均為10k×13大概13w 
          【盛大創新研究院】 基礎研發 26w,估計是國內待遇最高的一個IT公司 
          【雅虎中國】 7K ×13 
          【完美時空】 一般只要清華北大的,16W+ 
          【農行總行軟開 6500×16個月+1500×12 
          【招行軟開】 10W左右 
          【中行軟開】 10W左右 
          【瞬聯】 12W左右,沒戶口 
          【TPlink】 8800×16 
          【Morgan IT】 25W+ 
          【科大訊飛】 合肥碩士7.5k×13 上海杭州北京8500×13+1400住房補貼 
          【上海愛數軟件】 基本工資9000+績效1800*考評系數+400餐補+260買書經費=11k 工資可以自己談 
          【趨勢科技】 碩士9000×13 做的是企業服務器的殺毒軟件和安全產品 
          【恒生電子】 碩士8000×13 做金融軟件的公司 
          【北京海量信息公司】 12k×13 三環內 無戶口 天津戶口 

          【網絡、硬件類】 
          【華為】 碩士8000×13,本科6000×13 ,獎金為幾個月的工資,海外會有補助 
          【中興】 6200×12,海外會有補助 
          【握奇數據】 本科,硬件研發,4k5/月,提供半年宿舍,每月80交通補助,報銷200元以內手機費的80%,關鍵是可以解決90%的新員工的北京戶口。 
          【英特爾】 碩士11k×13 
          【Cisco】 15k/m,會有美國培訓 
          【大唐】 9w左右 
          【愛立信】 7K×13+ 
          posted @ 2012-12-09 21:01 abing 閱讀(289) | 評論 (0)編輯 收藏

          create table abin2(id integer,name varchar(1000),score integer(100),constraint pk_abin2 primary key(id))
          alter table abin2 add createtime timestamp;
          alter table abin2 modify createtime date; 
          alter table abin2 change createtime create1time timestamp;
          alter table abin2 rename abin3;
          posted @ 2012-12-03 00:27 abing 閱讀(212) | 評論 (0)編輯 收藏

          select concat('1','2') zhao from dual;
          select initcap('abin') from dual;
          select lower('ABIN') from dual;
          select upper('abin') from dual;
          select lpad('abin',10,'*') from dual;
          select rpad('abin',7,'*') from dual;
          select ltrim('aaaabain','a') from dual;
          select rtrim('abinaa','a') from dual;
          select trim('a' from 'ababina') from dual;
          select ceil(3.1415926) from dual;
          select floor(3.1415926) from dual;
          select sign(-123) zheng,sign(123) fu ,sign(0) ling from dual;
          select last_day(sysdate-1) from dual;
          select nvl('','0') from dual;
          select nullif('abin','abina') from dual;
          select nvl2('aa','abin','varyall') from dual;
          select coalesce('','1','2') from dual;

          Coalesce函數

          Coalese函數的作用是的NVL的函數有點相似,其優勢是有更多的選項。

          格式如下:

          Coalesce(expr1, expr2, expr3….. exprn)

          Coalesce是這樣來處理這些參數的。如果第一個參數為空,則看第二個參數是否是空,否則則顯示第一個參數,如果第二個參數是空再看第三個參數是否為空,否則顯示第二個參數,依次類推。

          這個函數實際上是NVL的循環使用,在此就不舉例子了。

          posted @ 2012-12-02 22:43 abing 閱讀(263) | 評論 (0)編輯 收藏

          僅列出標題
          共7頁: 上一頁 1 2 3 4 5 6 7 下一頁 
          主站蜘蛛池模板: 饶阳县| 鹤岗市| 东丽区| 甘泉县| 阳信县| 庄河市| 合山市| 嘉峪关市| 黄冈市| 鸡西市| 怀宁县| 丹江口市| 沙河市| 泽州县| 永清县| 闸北区| 呼和浩特市| 新乡县| 太和县| 辽阳市| 吉木乃县| 三河市| 贵阳市| 上杭县| 渭南市| 确山县| 临西县| 广东省| 霸州市| 即墨市| 黑龙江省| 蓬溪县| 蛟河市| 鄂州市| 罗平县| 保亭| 秦皇岛市| 上高县| 云和县| 郧西县| 广宁县|