<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 35, comments - 0, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    2012年9月18日

    2012.09.19 office for mac 2011更新到14.2.4版本,最大的變化就是解決了office在pro retina中的顯示問題。

     

    檢查并安裝更新到14.2.4之后,我的retina中office的顯示完全OK了.

    這是office for mac team的官方聲明鏈接link

    這是網上關于升級到14.2.4之后仍然無效的解決方法的鏈接link2.

     

    posted @ 2012-10-13 09:53 timelyxyz 閱讀(234) | 評論 (0)編輯 收藏

    并集:Set1 union Set2

    交集:Set1 intersect Set2

    posted @ 2012-10-11 21:15 timelyxyz 閱讀(241) | 評論 (0)編輯 收藏

    正確語句
    1 update jytuser set userid=(select member.userid from member where member.id=jytuser.owner_id)

     

    有2個易錯點: 

    1)表自關聯好像行不通。我猜想會不會和查詢時建立的索引更改有關。

    2)這種寫法postgres不支持

    1 update jytuser,member set jytuser.userid=member.userid where jytuser.owner_id=jmember.id and jytuser.userid=0;

    報錯如下:

     

    posted @ 2012-10-10 11:36 timelyxyz 閱讀(204) | 評論 (0)編輯 收藏

    最近在做數據同步的項目,過程中接觸了spring+jdbc的開發模式(IDE: sts),然后開始使用maven管理項目。目前碰到的一個問題是在本地添加一個repository,加的是用于連接sqlserver的驅動包sqljdbc4.jar。我在很多maven倉庫里都沒找到這個jar,只能手動的下載來,然后添加到本地倉庫里。發現這個包好像很多人沒有添加成功,我在這里找到了解決方法http://claude.betancourt.us/add-microsoft-sql-jdbc-driver-to-maven/

    主要步驟如下:

    1. 本地下載sqljdbc4.jar

    2. 解壓到本地文件夾中,并找到sqljdbc4.jar路徑

    3. 打開命令窗口,執行以下語句(前提:先配置好maven環境變量)

    1 C:\Users\nbxyz>mvn install:install-file -Dfile=e:\sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar

    4."BUILD SUCCESS"即添加成功



    生成的pom文件如下

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    4   <modelVersion>4.0.0</modelVersion>
    5   <groupId>com.microsoft.sqlserver</groupId>
    6   <artifactId>sqljdbc4</artifactId>
    7   <version>4.0</version>
    8   <description>POM was created from install:install-file</description>
    9 </project>

     

    posted @ 2012-10-09 14:40 timelyxyz 閱讀(314) | 評論 (0)編輯 收藏

     1     private static Map<String, Long> getPictureHeightAndWidthMap(String picUrl) {
     2         Map<String, Long> map = new HashMap();
     3         try {
     4             URL url = new URL(picUrl);
     5             HttpURLConnection connection = (HttpURLConnection) url
     6                     .openConnection();
     7             DataInputStream in = new DataInputStream(
     8                     connection.getInputStream());
     9             BufferedImage image = ImageIO.read(in);
    10             map.put("w", image.getWidth() * 1L);
    11             map.put("h", image.getHeight() * 1L);
    12             connection.disconnect();
    13             in.close();
    14         } catch (IOException e) {
    15             e.printStackTrace();
    16         }
    17         return map;
    18     }
    19 
    20     public static Long getHeight(String picUrl) {
    21         Map<String, Long> map = getPictureHeightAndWidthMap(picUrl);
    22         return null == map.get("h") ? 0 : map.get("h");
    23     }
    24 
    25     public static Long getWidth(String picUrl) {
    26         Map<String, Long> map = getPictureHeightAndWidthMap(picUrl);
    27         return null == map.get("w") ? 0 : map.get("w");
    28     }

    posted @ 2012-09-26 09:34 timelyxyz 閱讀(418) | 評論 (0)編輯 收藏

    Do "Show package contents" on the Eclipse.app.  
    Edit Contents/Info.plist.  
    Just above   

    </dict>
    </plist>

    Place this:  

    <key>NSHighResolutionCapable</key> 
    <true/>

    Then, log out or make a copy of the app so that OSX will notice the change.  Now, the info window will not show "Open in Low Resolution" as checked.  Launch Eclipse and enjoy your new retina awesomeness.

    solution from https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972

    同樣的方法也可以解決的軟件有:Spring tool suites.

    posted @ 2012-09-22 18:27 timelyxyz 閱讀(329) | 評論 (0)編輯 收藏

    1 首先查看PATH
    命令:$PATH  
     
    2 如何設置PATH
    命令:echo "export PATH=xxxxxx:$PATH" >> ~/.bash_profile
    解釋:把"export PATH=xxxxxx:$PATH"輸出打印到~/.bash_profile中去。
     
    3 Unix知識補充:~/.bash_profile介紹
    mac和linux終端一般用bash來進行解析。當bash在讀完了整體環境變量的/etc/profile并借此調用其他配置文件后,接下來則是會讀取用戶自定義的個人配置文件。bash讀取的文件總共有三種:
    ~/.bash_profile   ~/.bash_login    ~/.profile
    其實bash再啟動是只讀上面文件的一個,而讀取的順序則是依照上面的順序。也就是說讀到bash_profile就不讀后面的了,如果bash_profile不存在,后面的才能有機會。
    讓我們來看看bash_profile里面有什么內容:
    命令:cat ~/.bash_profile 
    最后重啟你的終端就會有剛才設置的全局變量了。 
     【2012.02.28更新】
    最直觀的方法是:
    cd ~
    open .bash_profile
    這時候就會直接用記事本程序打開這個配置文件,比在終端里那么設置要簡單直觀多了。
    要注意一點那就是配置文件里的變量是會覆蓋的,比如
    export PATH=1
    export PATH=2
    那么后面的2會把前面的1覆蓋的。

    posted @ 2012-09-22 17:14 timelyxyz 閱讀(487) | 評論 (0)編輯 收藏

    hibernate默認的,以及網絡上的主流支持left join的表關系是one-to-many的,可以使用left join fetch(需要配置lazy="true" fetch="select"),也可以使用Criteria或者CriteriaQuery(link1 link2)來進行查詢。

     

    對于many-to-one,首先我們先建兩個model:

     

    @Entity
    public class ClassOne {
    public String id;
    public boolean isDeleted;  
    }

    @Entity

    public class ClassTwo {
    public String id; 
    @ManyToOne
    public ClassOne classOne; // 父表
    public boolean isDeleted;  
    }

     目前有兩個需求:

     

    (1)select a.id,b.id from ClassTwo as b left join b.classOne as a;【正確,獲取到了所有ClassOne表的數據項】

    (2)select a.id,count(b.id) from ClassTwo as b left join b.classOne as a where a.isDeleted=false and b.isDeleted=false group by a.id;【count結果中把0的濾去了,沒達到我的需求】 

    對于第二種,目前我還沒找到具體的解決方法,仍需研究。 

     

    posted @ 2012-09-18 13:47 timelyxyz 閱讀(223) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 久久精品国产亚洲AV蜜臀色欲| 5555在线播放免费播放| 2020天堂在线亚洲精品专区| 亚洲精品中文字幕无码蜜桃| 国产美女无遮挡免费视频网站| 亚洲毛片免费观看| 亚洲免费人成在线视频观看| 瑟瑟网站免费网站入口| 亚洲日本在线电影| 亚洲人成激情在线播放| 亚洲精品无码久久久久去q| 亚洲日韩精品无码专区网站| 免费无码又爽又刺激高潮的视频| 1000部禁片黄的免费看| 久久精品电影免费动漫| 国产无遮挡又黄又爽免费网站| 国产精品亚洲专区无码牛牛| 亚洲日韩精品无码专区加勒比| 亚洲av一本岛在线播放| 亚洲福利视频网址| 亚洲黄色网址大全| 久久亚洲精品成人av无码网站| 亚洲av中文无码乱人伦在线r▽ | 亚洲最新视频在线观看| 中文字幕精品亚洲无线码一区 | 精品久久久久亚洲| 亚洲av日韩专区在线观看| 亚洲男同gay片| 亚洲日韩精品无码专区加勒比| 亚洲午夜精品一区二区麻豆| 国产成人亚洲综合一区 | 国产美女精品视频免费观看| 日韩免费观看视频| 真实乱视频国产免费观看| 手机看片久久国产免费| 国产成人啪精品视频免费网| 国产gav成人免费播放视频| 国产免费观看网站| 亚洲欧洲日本在线| 亚洲精品无码永久中文字幕| 亚洲国产成人久久精品影视|