Skip to content

Instantly share code, notes, and snippets.

View zeroleaf's full-sized avatar

zeroleaf zeroleaf

View GitHub Profile
@zeroleaf
zeroleaf / BinaryFile.java
Created October 4, 2013 13:56
Binary file
package com.zeroleaf.util;
import java.io.*;
/**
* User: zeroleaf
* Date: 13-10-4
* Time: 14:11
*
* Generate a binary file (in a byte array) from regular file.<br/>
@zeroleaf
zeroleaf / FileSHA1Code.java
Created October 3, 2013 13:29
Generate the sha1 hash code of a file
package com.zeroleaf.util;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* User: zeroleaf
import com.zeroleaf.util.Print;
/**
* User: zeroleaf
* Date: 13-9-30
* Time: 12:13
*
* A class that demonstrate get the unicode code of a character
* and encode a unicode code to a character.
*/
@zeroleaf
zeroleaf / Java MySQL Connection
Created August 28, 2013 16:45
The basic operation to connect mysql using java.
import java.sql.*;
public class SqlManipulation
{
private Connection conn;
public SqlManipulation()
{
}