posts - 35, comments - 0, trackbacks - 0, articles - 0
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          2012年9月26日

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

           

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

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

          這是網(wǎng)上關(guān)于升級(jí)到14.2.4之后仍然無(wú)效的解決方法的鏈接link2.

           

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

          并集:Set1 union Set2

          交集:Set1 intersect Set2

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

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

           

          有2個(gè)易錯(cuò)點(diǎn): 

          1)表自關(guān)聯(lián)好像行不通。我猜想會(huì)不會(huì)和查詢時(shí)建立的索引更改有關(guān)。

          2)這種寫(xiě)法postgres不支持

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

          報(bào)錯(cuò)如下:

           

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

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

          主要步驟如下:

          1. 本地下載sqljdbc4.jar

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

          3. 打開(kāi)命令窗口,執(zhí)行以下語(yǔ)句(前提:先配置好maven環(huán)境變量)

          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 閱讀(312) | 評(píng)論 (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 閱讀(417) | 評(píng)論 (0)編輯 收藏

          主站蜘蛛池模板: 普兰店市| 唐海县| 镇康县| 饶平县| 通山县| 常山县| 德昌县| 乌什县| 盘锦市| 繁昌县| 新泰市| 临武县| 涪陵区| 白玉县| 鄂温| 太白县| 元氏县| 海晏县| 罗平县| 乌什县| 达州市| 余姚市| 唐山市| 桂林市| 睢宁县| 晴隆县| 民县| 浮山县| 宁南县| 永清县| 雅安市| 财经| 太湖县| 镇康县| 板桥市| 宝山区| 蓬莱市| 永福县| 温泉县| 宜兰市| 山丹县|