Java JAI ImageIO: read from tiff and write to bmp








package examples;

import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class ImageUtil {
 
 public static void main(String[] args) throws Throwable {
  File inputFile = new File("/tmp/1.tif");
  File outputFile = new File("/tmp/1.bmp");
  BufferedImage image = ImageIO.read(inputFile);
  BufferedImage convertedImage = new BufferedImage(image.getWidth(), 
      image.getHeight(), BufferedImage.TYPE_INT_RGB);
  convertedImage.createGraphics().drawRenderedImage(image, null);
  ImageIO.write(convertedImage, "bmp", outputFile);
 }

}

Note




Java JAI ImageIO: read tiff file and save it to png








package examples;

import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class ImageUtil {
 
 public static void main(String[] args) throws Throwable {

  File inputFile = new File("/tmp/1.tif");
  File outputFile = new File("/tmp/1.png");
  BufferedImage image = ImageIO.read(inputFile);
  ImageIO.write(image, "png", outputFile);

 }

}

Note:

you need to make sure jai_imageio.jar is in the classpath. To install jai imageio on Mac OS X see here.


Mac OS: Install Java Advanced Imaging(JAI) Image I/O plugins








For Windows, Linux and Solaris, you can download the corresponding jai_imageio from Oracle/Sun: http://download.java.net/media/jai-imageio/builds/release/1.1/

Unfortunately, there is no native build for Mac OS. However, the JAI Image I/O has a Java implementation fallback which also works on Mac OS X. Some of the image formats are not fully supported in this fallback mode, but at least the TIFF image format is known to be supported. Follow the instructions below to install jai_imageio on Mac OS X:
  1. Download a Linux(tar.gz) distribution of JAI Image I/O from: http://download.java.net/media/jai-imageio/builds/release/1.1/jai_imageio-1_1-lib-linux-amd64.tar.gz
  2. Unpack it:
    tar zxvf jai_imageio-1_1-lib-linux-amd64.tar.gz
  3. copy/move clibwrapper_jiio.jar and jai_imageio.jar to the directory that is in your project's classpath. e.g. the lib directory of your eclipse project.



Java: generate MD5 hash from a string








package examples;

import java.security.MessageDigest;

public class DigestUtil {

 public static byte[] getDigest(String s, String algorithm) throws Throwable {

  MessageDigest md = MessageDigest.getInstance(algorithm);
  return md.digest(s.getBytes("UTF-8"));

 }

 public static void main(String[] args) throws Throwable {
  
  String s = "Hello world!";
  byte[] digest = getDigest(s, "MD5");
  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < digest.length; i++) {
   sb.append(String.format("%x", digest[i]));
  }
  System.out.println("MD5 HASH: " + sb.toString());
 }

}



CCTV-1风云直播(清晰)
















注意:

以上视频需要安装Adobe Flash Player才能观看。如果已经安装了,还是白屏,可以试试刷新页面。


如果以上视频直播还是无法打开,或者不流畅,不够清晰,还可试试下面的方法:




UUSee国内多家电视台网上直播











PPLIVE国内多家卫视网上直播











多家国内电视台网上直播














央视的节目好像连接有问题了。要看奥运直播的,试试下面的链接吧




央视CCTV-5直播(清晰)








进入ZOPTV 观看央视 CCTV 5


如果以上视频直播还是无法打开,或者不流畅,不够清晰,还可试试下面的方法:




上海五星体育奥运直播














其他网上奥运直播




海外看CCTV奥运频道网上直播(4) (高清推荐)
















注意:

以上视频需要安装Adobe Flash Player才能观看。如果已经安装了,还是白屏,可以试试刷新页面。


如果以上视频直播还是无法打开,或者不流畅,不够清晰,还可试试下面的方法:




Mac OS X: how to generate md5 sha1 sha256 checksums from command line








  • Calculate MD5 checksum:
    md5 /tmp/1.iso
    
  • Calculate SHA-1 checksum:
    shasum -a 1 /tmp/1.iso
    
  • Calculate SHA-256 checksum:
    shasum -a 256 /tmp/1.iso
    



Java: how to generate md5, sha1, sha256 checksums








package examples;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;

public class DigestUtil {
 public static final int BUFFER_SIZE = 2048;

 public static byte[] getDigest(InputStream in, String algorithm) throws Throwable {
  MessageDigest md = MessageDigest.getInstance(algorithm);
  try {
   DigestInputStream dis = new DigestInputStream(in, md);
   byte[] buffer = new byte[BUFFER_SIZE];
   while (dis.read(buffer) != -1) {
    //
   }
   dis.close();
  } finally {
   in.close();
  }
  return md.digest();
 }

 public static String getDigestString(InputStream in, String algorithm) throws Throwable {
  byte[] digest = getDigest(in, algorithm);
  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < digest.length; i++) {
   sb.append(String.format("%x", digest[i]));
  }
  return sb.toString();
 }

 public static void main(String[] args) throws Throwable {
  File f = new File("/tmp/1.iso.gz");
  System.out.println("MD5: " + getDigestString(new FileInputStream(f), "MD5"));
  System.out.println("SHA-256: " + getDigestString(new FileInputStream(f), "SHA-256"));
  System.out.println("SHA-1: " + getDigestString(new FileInputStream(f), "SHA-1"));
 }
}



Java: Calculate MD5 checksum








package examples;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;

public class MD5CSUM {

 public static final int BUFFER_SIZE = 2048;

 public static byte[] getMD5(InputStream in) throws Throwable {
  MessageDigest md = MessageDigest.getInstance("MD5");
  try {
   DigestInputStream dis = new DigestInputStream(in, md);
   byte[] buffer = new byte[BUFFER_SIZE];
   while (dis.read(buffer)!=-1){
    // 
   }
   dis.close();
  } finally {
   in.close();
  }
  return md.digest();
 }

 public static void main(String[] args) throws Throwable {
  File f = new File("/tmp/1.iso.gz");
  byte[] csum = getMD5(new FileInputStream(f));
  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < csum.length; i++) {
   sb.append(String.format("%x", csum[i]));
  }
  System.out.println(sb.toString());
 }

}

See also




Windows 7: how to change access permissions from the command line








The following commmand give user wilson full control on file1
cacls file1 /e /p wilson:f

See also




Window 7: change ownership recursively








takeown /f c:\dir1 /r /d Y

See also




Windows 7: how to recursively delete a directory








delete recursively:
rmdir c:\dir1 /s

or delete recursively and quietly without confirmation:
rmdir c:\dir1 /s /q


If you cannot delete the directory because of permissions: you can see here to run the command as administrator.


Firefox for Windows: how to play windows media








See also




海外看CCTV奥运频道网上直播(3)
















注意:

以上视频需要安装Adobe Flash Player才能观看。如果已经安装了,还是白屏,可以试试刷新页面。


如果以上视频直播还是无法打开,或者不流畅,不够清晰,还可试试下面的方法:




海外看CCTV奥运频道网上直播(2)















注意




如果以上视频直播无法打开,或者不流畅,不够清晰,还可试试下面的方法:




海外看CCTV奥运频道网上直播(1)















注意




如果以上视频直播无法打开,或者不流畅,不够清晰,还可试试下面的方法:




中文小说网站收藏








  1. 卡努努http://book.kanunu.org/ 
  2. 全本小说网http://www.quanben.com/
  3. 找小说网http://www.zhaoxiaoshuo.com/



Asus WL-138G V2 wireless adpater on Windows 7: No internet access








Recently upgraded my old desktop computer to Windows 7. The pci wireless adapter Asus WL-138G v2, failed to gain internet access although it seemed to connect to the wireless network, the wireless connection icon comes with an exclamation, the hint shows "No internet access"
The following solution works for me:
Login to the wireless router, configure the wireless channel to: "Select the best quality channel automatically" or if your router does not have this option, you can try to change the channel to a different one.
After change of the channel, the computer connects to the wireless network successfully.

See also




用过最好的Android中文看书软件 Kingreader 1.8








到目前为止用过最好的中文看书软件,开卷有益 Kingreader 1.8. 此版本最稳定,而且不带广告,在Android Market 上更新的后续新版本,增加了些我用不到的功能,但是稳定性差,经常自动退出。所以还是安装了这个1.8版


How to convert html to text on Linux or Mac OS X








  • Linux:
    • Use lynx
      • Run:
        • lynx -dump 1.html > 1.txt
  • Mac OS:
    • Use textutil
      • textutil -convert txt 1.html 
    • Use lynx

see also




Mac OS X: convert html to text using textutil








textutil can be used to convert between txt, html, rtf, rtfd, doc, docx, wordml, odt, or webarchive formats. And it also handles encodings. To convert a html file to plain text:
textutil -convert txt 1.html 

See also




Mac OS X: convert gb2312/gbk/gb18030 chinese text to utf-8








  • Mac OS X comes with iconv utility that can convert text between encodings. Run the following command in Terminal to convert a gb2312 chinese text file to utf-8:
    iconv -f cp936 -t utf-8 chinese-gb2312.txt > chinese-utf8.txt
    
  • To list the encodings that iconv supports:
    iconv -l
    

See also




How to install or uninstall lynx on Mac OS X








  • Install: Download this package and install. 
  • Uninstall: Run the following commands:
    lsbom -f -l -s -pf /var/db/receipts/org.rudix.pkg.lynx.bom | while read f; do  sudo rm /${f}; done
    sudo rm -rf /usr/local/share/locale /usr/local/share/doc/lynx /var/db/receipts/org.rudix.pkg.lynx.*
    



Mac OS X: Cannot empty Trash because the file is in use








Sometimes, it failed to empty trash because some file is in use. You can solve this by using Secure Empty Trash, in Finder:

See Also




Java: detect if a file or stream is gzipped








package example;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.util.zip.GZIPInputStream;

public class GZipUtil {

 /**
  * Checks if an input stream is gzipped.
  * 
  * @param in
  * @return
  */
 public static boolean isGZipped(InputStream in) {
  if (!in.markSupported()) {
   in = new BufferedInputStream(in);
  }
  in.mark(2);
  int magic = 0;
  try {
   magic = in.read() & 0xff | ((in.read() << 8) & 0xff00);
   in.reset();
  } catch (IOException e) {
   e.printStackTrace(System.err);
   return false;
  }
  return magic == GZIPInputStream.GZIP_MAGIC;
 }

 /**
  * Checks if a file is gzipped.
  * 
  * @param f
  * @return
  */
 public static boolean isGZipped(File f) {
  int magic = 0;
  try {
   RandomAccessFile raf = new RandomAccessFile(f, "r");
   magic = raf.read() & 0xff | ((raf.read() << 8) & 0xff00);
   raf.close();
  } catch (Throwable e) {
   e.printStackTrace(System.err);
  }
  return magic == GZIPInputStream.GZIP_MAGIC;
 }

 public static void main(String[] args) throws FileNotFoundException {
  File gzf = new File("/tmp/1.gz");

  // Check if a file is gzipped.
  System.out.println(isGZipped(gzf));

  // Check if a input stream is gzipped.
  System.out.println(isGZipped(new FileInputStream(gzf)));
 }
}

See also:




GWT Developer's Plugin for Firefox 14








See also



Thanks Alan Leung for compiling the plugins for us


Java: list contents of a zip archive








public class Test {

    public static void main(String[] args) {
        ZipFile zf = new ZipFile("/tmp/1.zip");
        Enumeration<? extends ZipEntry> entries = zf.entries();
        while(entries.hasMoreElements()){
            ZipEntry e = entries.nextElement();
            System.out.println(e.getName()+"\t"+e.getSize());
        }
    }
}



Java: detect if a stream or file is a zip archive








The first four bytes of a valid ZIP file should be {'P', 'K', 0x3, 0x4}, a.k.a. the magic bytes for ZIP. The best way to detect if a file is ZIP archive is to check the magic bytes.


The following java code includes two methods to detect if a file or a inputStream is ZIP archive:
package example;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;

public class ZipUtil {

 public static byte[] MAGIC = { 'P', 'K', 0x3, 0x4 };

 /**
  * The method to test if a input stream is a zip archive.
  * 
  * @param in
  *            the input stream to test.
  * @return
  */
 public static boolean isZipStream(InputStream in) {
  if (!in.markSupported()) {
   in = new BufferedInputStream(in);
  }
  boolean isZip = true;
  try {
   in.mark(MAGIC.length);
   for (int i = 0; i < MAGIC.length; i++) {
    if (MAGIC[i] != (byte) in.read()) {
     isZip = false;
     break;
    }
   }
   in.reset();
  } catch (IOException e) {
   isZip = false;
  }
  return isZip;
 }

 /**
  * Test if a file is a zip file.
  * 
  * @param f
  *            the file to test.
  * @return
  */
 public static boolean isZipFile(File f) {

  boolean isZip = true;
  byte[] buffer = new byte[MAGIC.length];
  try {
   RandomAccessFile raf = new RandomAccessFile(f, "r");
   raf.readFully(buffer);
   for (int i = 0; i < MAGIC.length; i++) {
    if (buffer[i] != MAGIC[i]) {
     isZip = false;
     break;
    }
   }
   raf.close();
  } catch (Throwable e) {
   isZip = false;
  }
  return isZip;
 }

 public static void main(String[] args) throws FileNotFoundException {

  
  // test if a input stream is a zip stream.
  System.out.println(isZipStream(new FileInputStream(new File("/tmp/1.zip"))));

  // test if a file is zip file.
  System.out.println(isZipFile(new File("/tmp/1.zip")));
 }
}

See also:




Microsoft Word: Backup and restore citations








Word saves the master citation list in a file named Sources.xml. It is located:
  • On Windows, it is located at %AppData%\Microsoft\Bibliography\sources.xml
  • On Mac OS X, it is located at $HOME/Library/Application Support/Microsoft/Office/Sources.xml


You can make a copy of the Sources.xml file as a backup of the master citation list.

See Also




Microsoft Word: Install bibliography styles








  • Download the bibliography style from bibword (I download and install "IEEE-Reference Order" style)
  • On Windows, copy/move the style (.xsl) file to [winword.exe directory]\Bibliography\Style\ directory.
  • On Mac OS X, copy/move the style (.xsl) file to Microsoft\ Word.app/Contents/Resources/Style/ directory:
    sudo cp IEEE-Reference.xsl /Applications/Microsoft\ Office\ 2011/Microsoft\ Word.app/Contents/Resources/Style/
  • Now you can select the new style: activate "Document Elements" tab then select it in the "References" section.



Switch Windows 7 Editions by modifing the ISO image








  • Method 1: Delete ei.cfg using PowerISO or UltraISO or this tool
  • Method 2: Modify ei.cfg
    • To select from the editions whilst installation:
      • Retail:
        [EditionID]
        Starter
        HomeBasic
        HomePremium
        Professional
        Ultimate
        [Channel]
        Retail
        [VL]
        5
        
      • OEM:
        [EditionID]
        Starter
        HomeBasic
        HomePremium
        Professional
        Ultimate
        [Channel]
        OEM
        [VL]
        5
        
    • To switch to ultimate edition:
      • Retail:
        [EditionID]
        Ultimate
        [Channel]
        Retail
        [VL]
        1
        
      • OEM:
        [EditionID]
        Ultimate
        [Channel]
        OEM
        [VL]
        1
        
  • Method 3: Use Windows 7 ISO Image Edition Switcher



Java: library to detect file mime types








1. Mime Type Detection Utility: Enable Java programs to detect MIME types based on file extensions, magic data and content sniffing. Supports detection from java.io.File, java.io.InputStream, java.net.URL and byte arrays. 


2.jMimeMagic is a Java library for determining the MIME type of files or streams.
  • Check out the source code from github:
    git clone https://github.com/arimus/jmimemagic.git
    
  • To build jMimeMagic, you need to have maven installed. Then run maven to build it:
    mvn clean package
    
  • The built jar will be placed into ./target
  • jMimeMagic Java API Docs 

See Also




Nokia 2730 刷中文 firmware








所需工具软件:

所需步骤:
  1. 下载Nemesis Service Suite (NSS) 并安装。在安装过程中, 遇到 “'Select from the following the service devices you will be using after the installation” 选择 “Virtual USB device
  2. 下载Nokia Suite并安装。
  3. (如需要)用USB线连接手机,并用Nokia Suite所提供的工具备份手机的通讯录,短信等,然后退出Nokia Suite。
  4. 用NSS改成中文Code:
    1. 用USB线连接手机,启动NSS, 点击“Scan for new device
    2. 然后点 “Phone info”之后点“Scan
    3. 输入中文code (如0585310为马来西亚中文) (其他可用中文code)
    4. 选上“Enable
    5. 点“Write”写入code,几秒钟就可完成。完成后可以重新连接NSS,然后点"Read"按钮检查是否写入成功。
    6. 退出NSS
  5. 运行Nokia Suite里的Nokia Software Updater 升级,升级就是安装中文的固件Firmware.升级之后,手机的界面就可以是中文,也有中文的输入法了。如果之前备份了通讯录,可以用Nokia Suite恢复。

注意:

上述办法,只适用于你当前软件版本号(比如我的是RM578,澳大利亚,code:0591956,软件10.45)低于你要刷的国家(地区)的版本号(比如RM578,马来西亚,code:0585310,软件10.47)而且RM必须相同。

See also




Nokia 2730 中文 code (用于刷中文)








下面是可用于刷中文的code:

0585310 10.40 RM-578 SEAP_S_BLACK_STROKE_MALAY 
0585563 10.40 RM-578 SEAP_S_RED_STROKE_MALAY
0585324 10.40 RM-578 CHINA_QA_BLACK_STROKE_CHINA
0585325 10.40 RM-578 CHINA_QB_BLACK_STROKE_HK
059C0R1 RM-578 2730c-1 SEAP-X CTV ID NLT MAGENT
059C0R4 RM-578 2730c-1 SEAP-X CTV ID NLT BLACK

See Also




Nokia 2730 codes









0584989 10.40 RM-578 EURO_AD1_BLACK_LATIN_GERMAN
0585569 10.40 RM-578 CHINA_QA_RED_STROKE_CHINA
0585540 10.40 RM-578 EURA_EO_RED_ARME_ARMENIA
0585308 10.40 RM-578 SEAP_T_BLACK_LATIN_PHILIPPINE
0585512 10.40 RM-578 EURO_AB_RED_LATIN_FINLAND
0588495 10.40 RM-578 SEAP_T_BLACK_LATIN_PHLIGHTSWAP
0584994 10.40 RM-578 EURO_AG_BLACK_LATIN_PORTUG
0588467 10.40 RM-578 EURA_EL_BLACK_LATIN_RUSSIASWAP
0585016 10.40 RM-578 EURA_EM_BLACK_RUSCY_CE-ASIA1
0585021 10.40 RM-578 EURA_EO_BLACK_GEOR_GEORGIA
0585325 10.40 RM-578 CHINA_QB_BLACK_STROKE_HK
0588478 10.40 RM-578 MEA_M_A_BLACK_ARABIC_SWAP
0585570 10.40 RM-578 CHINA_QB_RED_STROKE_HK
0585535 10.40 RM-578 EURA_EM_RED_RUSCY_CE-AS1
0595019 10.40 RM-578 INDIA_MH_RED_LATIN_OVERAL
0585517 10.40 RM-578 EURO_AE_RED_LATIN_FRANCE
0585313 10.40 RM-578 SEAP_V_BLACK_STROKE_VIETNAM
0585323 10.40 RM-578 INDIA_ML_BLACK_ORIYA_OVERALL
0585568 10.40 RM-578 SEAP_U_RED_THAI_THAILAND
0585566 10.40 RM-578 SEAP_V_RED_STROKE_VIETNAM
0585558 10.40 RM-578 SEAP_MR_RED_LATIN_NEPAL
0588470 10.40 RM-578 EURA_AD2_BLACK_LATIN_TURKEYSWAP
0585455 10.40 RM-578 CHINA_QB_GRAY_STROKE_HK
0585564 10.40 RM-578 SEAP_MR_RED_LATIN_SRILA
0585548 10.40 RM-578 MEA_M_H_RED_LATIN_MEA15
0588492 10.40 RM-578 EURO_AE_BLACK_LATIN_ROWLIGHTSWAP
0585347 10.40 RM-578 MEA_M_P_BLACK_AMHARIC_MEA23
0585342 10.40 RM-578 MEA_M_J_BLACK_LATIN_MEA17
0585530 10.40 RM-578 EURO_EK_RED_RUSCY_BULGA
0585338 10.40 RM-578 MEA_M_C_BLACK_ARABIC_MEA8
0592339 10.40 RM-578 EURO_AD1_BLACK_LATIN_MALTA
0585340 10.40 RM-578 MEA_M_H_BLACK_LATIN_MEA15
0585526 10.40 RM-578 EURO_EF_RED_LATIN_LATVIA
0585448 10.40 RM-578 INDIA_MK_GRAY_KANNA_OVERALL
0585007 10.40 RM-578 EURO_ER_BLACK_HEBREW_ISRAEL
0585533 10.40 RM-578 EURA_AD2_RED_LATIN_TURKEY
0585316 10.40 RM-578 INDIA_MH_BLACK_HINDI_OVERALL
0585003 10.40 RM-578 EURO_EH_BLACK_LATIN_LITHUA
0585537 10.40 RM-578 EURA_EJ_RED_RUSCY_UKRAINE
0585543 10.40 RM-578 MEA_M_A_RED_LATIN_MEA5
0585521 10.40 RM-578 EURO_EA_RED_LATIN_POLAND
0585453 10.40 RM-578 INDIA_ML_GRAY_ORIYA_OVERALL
0584991 10.40 RM-578 EURO_AE_BLACK_LATIN_UKIREL
0585541 10.40 RM-578 EURA_EO_RED_GEOR_GEORGIA
0584998 10.40 RM-578 EURO_EC_BLACK_LATIN_CZECH
0586807 10.40 RM-578 CTR   EURO AE BLAC LATIN ITALY
0590159 10.40 RM-578 MEA_M_H_BLACK_LATIN_SASWAP
0585326 10.40 RM-578 CHINA_QC_BLACK_BOPO_TW
0585450 10.40 RM-578 INDIA_MK_GRAY_TELUG_OVERALL
0585020 10.40 RM-578 EURA_EO_BLACK_ARME_ARMENIA
0585447 10.40 RM-578 INDIA_MK_GRAY_MALAY_OVERALL
0585516 10.40 RM-578 EURO_AE_RED_LATIN_UK
0585456 10.40 RM-578 CHINA_QC_GRAY_BOPO_TW
0584997 10.40 RM-578 EURO_EB_BLACK_LATIN_SERBIA
0585321 10.40 RM-578 INDIA_MI_BLACK_PUNJA_OVERALL
0585335 10.40 RM-578 MEA_M_A_BLACK_LATIN_MEA5
0585014 10.40 RM-578 EURA_AD2_BLACK_LATIN_TURKEY
0588486 10.40 RM-578 EURO_ER_RED_HEBREW_SWAP
0588480 10.40 RM-578 EURO_AE_RED_LATIN_ROWSWAP
0584995 10.40 RM-578 EURO_AH_BLACK_GREEK_GREE
0585551 10.40 RM-578 MEA_M_N_RED_LATIN_MEA18
0585309 10.40 RM-578 SEAP_MS_BLACK_LATIN_BANGALA
0585561 10.40 RM-578 SEAP_T_RED_LATIN_PHILIPP
0585452 10.40 RM-578 INDIA_ML_GRAY_BENGA_OVERALL
0585531 10.40 RM-578 EURO_ER_RED_HEBREW_ISRAEL
0585002 10.40 RM-578 EURO_EG_BLACK_LATIN_ESTONIA
0585523 10.40 RM-578 EURO_EC_RED_LATIN_CZECH
0585000 10.40 RM-578 EURO_ED_BLACK_MACCYR_MACEDON
0585305 10.40 RM-578 SEAP_MR_BLACK_LATIN_NEPALSA
0585318 10.40 RM-578 INDIA_MK_BLACK_KANNA_OVERALL
0588474 10.40 RM-578 EURO_AH_BLACK_LATIN_GREEKSWAP
0585519 10.40 RM-578 EURO_AG_RED_LATIN_PORTUG
0588489 10.40 RM-578 MEA_M_C_RED_ARABIC_SWAP
0585307 10.40 RM-578 SEAP_T_BLACK_LATIN_NEW_ZEALAND
0585528 10.40 RM-578 EURO_EH_RED_LATIN_LITHUA
0585553 10.40 RM-578 MEA_M_L_RED_LATIN_MEA21
0588483 10.40 RM-578 EURA_EJ_RED_LATIN_UKRAINESWAP
0585536 10.40 RM-578 EURA_EJ_RED_RUSCY_MOLDOVA
0585832 10.40 RM-578 SEAP_S_BLACK_STROKE_SINGA
0585017 10.40 RM-578 EURA_EJ_BLACK_RUSCY_MOLDOVA
0584988 10.40 RM-578 EURO_AC_BLACK_LATIN_ICELAND
0585317 10.40 RM-578 INDIA_MK_BLACK_MALAY_OVERALL
0588472 10.40 RM-578 EURO_ER_BLACK_HEBREW_SWAP
0585341 10.40 RM-578 MEA_M_H_BLACK_LATIN_MEA16
0585001 10.40 RM-578 EURO_EF_BLACK_LATIN_LATVIA
0585339 10.40 RM-578 MEA_M_F_BLACK_LATIN_MEA14
0585314 10.40 RM-578 SEAP_VC_BLACK_KHMER_CAMBODIA
0585555 10.40 RM-578 MEA_M_P_RED_AMHAR_MEA23
0585311 10.40 RM-578 SEAP_MR_BLACK_LATIN_SRILA
0584992 10.40 RM-578 EURO_AE_BLACK_LATIN_FRANCE
0585538 10.40 RM-578 EURA_EL_RED_RUSCY_RUSSIA
0585544 10.40 RM-578 MEA_M_C_RED_URDU_MEA6
0585315 10.40 RM-578 SEAP_U_BLACK_THAI_THAILAND
0585345 10.40 RM-578 MEA_M_L_BLACK_LATIN_MEA21
0584985 10.40 RM-578 EURO_AA_BLACK_LATIN_DEMARK
0584990 10.40 RM-578 EURO_AE_BLACK_LATIN_AUSTRI
0585454 10.40 RM-578 CHINA_QA_GRAY_STROKE_CHINA
0585511 10.40 RM-578 EURO_AA_RED_LATIN_DEMARK
0585324 10.40 RM-578 CHINA_QA_BLACK_STROKE_CHINA
0586808 10.40 RM-578 EURO_AE_RED_LATIN_ITALY
0585567 10.40 RM-578 SEAP_VC_RED_KHMER_CAMBOD
0585518 10.40 RM-578 EURO_AF_RED_LATIN_BELGIU
0588488 10.40 RM-578 EURO_AH_RED_LATIN_GREEKSWAP
0588485 10.40 RM-578 MEA_M_H_RED_LATIN_SASWAP
0585525 10.40 RM-578 EURO_ED_RED_MACCY_MACED
0585337 10.40 RM-578 MEA_M_C_BLACK_FARSI_MEA7
0585520 10.40 RM-578 EURO_AH_RED_GREEK_GREE
0585435 10.40 RM-578 BRAZ_UAB_BLACK_LATIN_BRAZIL
0585563 10.40 RM-578 SEAP_S_RED_STROKE_MALAY
0585542 10.40 RM-578 MEA_M_A_RED_ARABIC_MEA1
0585312 10.40 RM-578 SEAP_X_BLACK_STROKE_INDONESIA
0585514 10.40 RM-578 EURO_AD1_RED_LATIN_GERMAN
0585559 10.40 RM-578 SEAP_T_RED_LATIN_AUSTR
0585571 10.40 RM-578 CHINA_QC_RED_BOPO_TW
0585565 10.40 RM-578 SEAP_X_RED_STROK_INDON
0585343 10.40 RM-578 MEA_M_N_BLACK_LATIN_MEA18
0585346 10.40 RM-578 MEA_M_O_BLACK_LATIN_MEA22
0585336 10.40 RM-578 MEA_M_C_BLACK_URDU_MEA6
0585522 10.40 RM-578 EURO_EB_RED_LATIN_SERBIA
0588482 10.40 RM-578 EURA_AD2_RED_LATIN_TURKEYSWAP
0588498 10.40 RM-578 SEAP_S_BLACK_STROKE_SILIGHTSWAP
0588481 10.40 RM-578 EURA_EL_RED_LATIN_RUSSIASWAP
0585513 10.40 RM-578 EURO_AC_RED_LATIN_ICELAND
0585320 10.40 RM-578 INDIA_MK_BLACK_TELUG_OVERALL
0585515 10.40 RM-578 EURO_AE_RED_LATIN_AUSTRI
0592351 10.40 RM-578 CHINA_QA_BLACK_STROKE_LIGHTSWAP
0592340 10.40 RM-578 EURO_AD1_RED_LATIN_MALTA
0588471 10.40 RM-578 EURA_EJ_BLACK_LATIN_UKRAINESWAP
0585545 10.40 RM-578 MEA_M_C_RED_FARSI_MEA7
0585550 10.40 RM-578 MEA_M_J_RED_LATIN_MEA17
0585529 10.40 RM-578 EURO_EE_RED_LATIN_ROMANIA
0585334 10.40 RM-578 MEA_M_A_BLACK_ARABI_MEA12
0585547 10.40 RM-578 MEA_M_F_RED_LATIN_MEA14
0585562 10.40 RM-578 SEAP_MS_RED_LATIN_BANGALA
0585552 10.40 RM-578 MEA_M_K_RED_LATIN_MEA19
0585322 10.40 RM-578 INDIA_ML_BLACK_BENGA_OVERALL
0584987 10.40 RM-578 EURO_AB_BLACK_LATIN_FINLAND
0584996 10.40 RM-578 EURO_EA_BLACK_LATIN_POLAND
0585451 10.40 RM-578 INDIA_MI_GRAY_PUNJA_OVERALL
0585534 10.40 RM-578 EURA_EN_RED_RUSCY_CE-AS2
0585344 10.40 RM-578 MEA_M_K_BLACK_LATIN_MEA19
0585306 10.40 RM-578 SEAP_T_BLACK_LATIN_AUSTRALIA
0585004 10.40 RM-578 EURO_EE_BLACK_LATIN_ROMANIA
0585310 10.40 RM-578 SEAP_S_BLACK_STROKE_MALAY
0588463 10.40 RM-578 EURO_AE_BLACK_LATIN_ROWSWAP
0585449 10.40 RM-578 INDIA_MK_GRAY_TAMIL_OVERALL
0585524 10.40 RM-578 EURO_ED_RED_LATIN_SLOVA
0585444 10.40 RM-578 INDIA_MH_BLACK_GUJARA_OVERALL
0585319 10.40 RM-578 INDIA_MK_BLACK_TAMIL_OVERALL
0585549 10.40 RM-578 MEA_M_H_RED_LATIN_MEA16
0585446 10.40 RM-578 INDIA_MH_GRAY_GUJAR_OVERALL
0585833 10.40 RM-578 SEAP_S_RED_STROKE_SINGAP
0585433 10.40 RM-578 LTA_UAL_BLACK_LATIN_LTA
0585013 10.40 RM-578 EURA_EI_BLACK_LATIN_CIS
0584999 10.40 RM-578 EURO_ED_BLACK_LATIN_SLOVA
0585532 10.40 RM-578 EURA_EI_RED_LATIN_CIS
0585019 10.40 RM-578 EURA_EL_BLACK_RUSCY_RUSSIA
0585015 10.40 RM-578 EURA_EN_BLACK_RUSCY_CE-ASIA2
0585554 10.40 RM-578 MEA_M_O_RED_LATIN_MEA22
0584993 10.40 RM-578 EURO_AF_BLACK_LATIN_BELGIU
0585527 10.40 RM-578 EURO_EG_RED_LATIN_ESTONIA
0585441 10.40 RM-578 INDIA_MH_GRAY_HINDI_OVERALL
0585006 10.40 RM-578 EURO_EK_BLACK_RUSCY_BULGARIA
059C0R1 RM-578 2730c-1 SEAP-X CTV ID NLT MAGENT
059C0R4 RM-578 2730c-1 SEAP-X CTV ID NLT BLACK


Windows 7 downloads








See also

Update(Sept 2014)

Windows 7 Home Premium 32Bit: http://msft.digitalrivercontent.net/win/X17-58996.iso
Windows 7 Home Premium 64Bit: http://msft.digitalrivercontent.net/win/X17-58997.iso
Windows 7 Professional 32Bit: http://msft.digitalrivercontent.net/win/X17-59183.iso
Windows 7 Professional 64Bit: http://msft.digitalrivercontent.net/win/X17-59186.iso
Windows 7 Ultimate 32Bit: http://msft.digitalrivercontent.net/win/X17-59463.iso
Windows 7 Ultimate 64Bit: http://msft.digitalrivercontent.net/win/X17-59465.iso


ANT: built-in properties








propertydescription
basedir the absolute path of the project's basedir (as set with the basedir attribute of <project/>).
ant.filethe absolute path of the buildfile.
ant.versionthe version of Ant
ant.project.namethe name of the project that is currently executing; it is set in the name attribute of the .
ant.project.default-targetthe name of the currently executing project's default target; it is set via the default attribute of
ant.project.invoked-targetsa comma separated list of the targets that have been specified on the command line (the IDE, an <ant> task ...) when invoking the current project.
ant.java.versionthe JVM version Ant detected; currently it can hold the values "1.2", "1.3", "1.4", "1.5" and "1.6".
ant.core.libthe absolute path of the ant.jar file.
ant.homehome directory of Ant. It is set by the launcher script and therefore maybe not set inside IDEs:
ant.library.dirthe directory that has been used to load Ant's jars from. In most cases this is ANT_HOME/lib.It is only set if Ant is started via the Launcher class (which means it may not be set inside IDEs either)



ANT: how to append some text to a file








  • To append plain text:
    <echo file="file.txt" append="true">Hello World</echo>
  • To append HTML or XML, you need escape it using CDATA:
    <echo file="file.txt" append="true">
    <![CDATA[
      <h1>Hello World</h1>
    ]]>
    </echo>



ANT: how to create a jar file including service provider configuration files in META-INF/services








According to ANT jar task, you can define your ant jar task like below (to write service provider configuration files in META-INF/services/):
<jar filesonly="true" destfile="${dist}/${ant.project.name}.jar">
    <manifest></manifest>
    <service type="javax.imageio.spi.ImageReaderSpi">
        <provider classname="my.image.My1ImageReaderSpi" />
        <provider classname="my.image.My2ImageReaderSpi" />
    </service>
    <service type="javax.imageio.spi.ImageWriterSpi">
        <provider classname="my.image.My1ImageWriterSpi" />
        <provider classname="my.image.My2ImageWriterSpi" />
    </service>
    <fileset dir="${build}" includes="**/*" />
</jar>



MacPorts on Lion: Warning: xcodebuild exists but failed to execute








When using sudo port install [pkg], it complaining:
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
The work around is:
  1. Install Xcode 4.3 from Mac App Store
  2. Install Command Line Tools for Xcode
  3. Run the following commands:
    sudo /usr/bin/xcode-select -switch /Applications/Xcode.app
    sudo ln -s `which clang` /Applications/Xcode.app/Contents/Developer/usr/bin/ 
    



    Word: shortcat keys to switch between lower case and upper case








    Select the words, SHIFT+F3, it will switch between Uppercase and Lowercase.


    Word: Insert horizontal lines








    In Word, type 3 dashes --- then hit enter,  it will become a straight horizontal line.

    For other styles of horizontal lines, you can try any of the following:

    • type 3 asterisks *** then hit enter
    • type 3 underscores ___ then hit enter
    • type 3 equal signs === then hit enter
    • type 3 hash signs ### then hit enter
    • type 3 tildes ~~~ then hit enter



    git: Can I tag a single file?








    The answer is NO. "A tag is a pointer to a specific revision of the repository. The individual files do not themselves have versions separate from that of the repository."

    To tag the current head:
    git tag -m "new tag" stable-1.0
    git push --tags origin master
    



    Mac OS X: how to create ISO disc image can be read on Windows or Linux








    1. Open "Disk Utility", "File" -> "New" -> "Blank Disk Image..."
    2. Add the files or directories to the image.
    3. The image is in HFS+ format, which is not readable on Windows or Linux. To make it readable on all the platforms, we need to convert the image to joliet format. To do that
      1. Unmount the image first
      2. Locate the image in "Terminal", and run the following command to convert it (assume the image file named Test.cdr) to a joliet .iso file:
        hdiutil makehybrid -iso -joliet -o Test.iso /path/to/Test.cdr
        



    Firefox 13: disable the most visited sites grid in the new tab page








    As of Firefox 13, when open a new tab, the most visited sites appear as a grid. To disable this:

    • Method 1: Click the grid icon at the top right corner


    • Method 2:
      • Type about:config in the address field and hit enter;
      • Search browser.newtabpage.enabled and set it to false





    澳洲储存新生儿脐带血(cord blood)的公司











    check if your computer infected with DNSChanger malware








    • What is DNSChanger?
      • DNSChanger is a class of malicious software (malware) that changes a user's Domain Name System (DNS) settings, enabling criminals to direct unsuspecting internet users to fraudulent websites and otherwise interfere with access to internet services. It has been associated with 'click fraud', the installation of additional malware and other malicious activities.
    • Detect it: go to http://dns-ok.gov.au/ it will show you if your computer is infected.
    • Fix it: go to http://www.dcwg.org/fix/ read and find the removal tool for you.



    Mac OS X: Secure Erase








    • Secure Remove a file using srm in "Terminal"
      srm secret-file
      srm -d secret-dir
      


    • Secure Empty Trash in "Finder":


    • Secure Erase a disk or partition using "Disk Utility"









    SEE ALSO




    Escape HTML









     

    See also:




    Skype for Mac OS X: how to be invisible for a specific contact








    Currently, you cannot set invisible for a specific contact or a specific contact list.

    However, there is a work around: You can block the contact when you do not want him to see you are online (and you can unblock him when you want him to see you).

    When you block a contact, he will not be able to see your online status, call you, or send you messages, and they will receive no notifications, which we leave him clueless about your action of blocking/unblocking him.

    See how to block/unblock a contact in Skype for Mac.


    Ubuntu kernel bug when running as VM: soft lockup cpu stuck








    My Ubuntu Linux VM run into the following situation:
    • responds very slow
    • the following messages appears in the console:
      BUG: soft lockup – CPU#0 stuck for 120s!
    Found a suggested solution here:
    add kernel parameters: "acpi=off noapic"


    Open a text file for editing with MacVIM in terminal








    First, make sure you have installed MacVIM.

    The following script can be used to open a text file with MacVIM:
    #!/bin/sh
    open -a MacVIM $@
    

    You can save the script to /usr/local/bin/macvim:
    sudo cp macvim /usr/local/bin
    sudo chmod +x macvim
    



    MacVIM on Mac OS X: set font size








    The following vim command can set font size:
    :set guifont=Monaco:h15
    
    or
    :set gfn=Monaco:h15
    
    You can add the command into your ~/.vimrc file:
    echo ":set guifont=Monaco:h15" >> ~/.vimrc
    

    Note:

    You need to make sure the font is available. E.g. Monaco is available on my Mac OS X (Lion).

    See Also: