添加MD2Json.java;添加resume
parent
8a773225d5
commit
7847e2471e
6
pom.xml
6
pom.xml
|
@ -225,7 +225,11 @@
|
|||
<artifactId>xbean-spring</artifactId>
|
||||
<version>4.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>useful-code</finalName>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package osc.git.eh3;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by lixiangrong on 2016/11/8.
|
||||
*/
|
||||
public class MD2Json {
|
||||
public static void main(String[] args) throws IOException {
|
||||
resume();
|
||||
}
|
||||
|
||||
private static void resume() throws IOException {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("show", 1);
|
||||
String content = FileUtils.readFileToString(new File("E:\\ehlxr\\Git\\md-files\\resume.md"), "UTF-8");
|
||||
jsonObject.put("content", content);
|
||||
System.out.println(jsonObject.toString());
|
||||
}
|
||||
}
|
|
@ -1,13 +1,12 @@
|
|||
package osc.git.eh3.test;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class TestCode {
|
||||
|
||||
|
@ -255,7 +254,7 @@ public class TestCode {
|
|||
// System.out.println(s2);
|
||||
// System.out.println(URLDecoder.decode(s2,"utf-8"));
|
||||
|
||||
System.out.println(new String(Hex.decodeHex("E8AFB7E6B182E5A4B1E8B4A5EFBC8CE8AFB7E7A88DE5908EE9878DE8AF95".toCharArray()), "utf-8"));
|
||||
//System.out.println(new String(Hex.decodeHex("E8AFB7E6B182E5A4B1E8B4A5EFBC8CE8AFB7E7A88DE5908EE9878DE8AF95".toCharArray()), "utf-8"));
|
||||
// Object object = null;
|
||||
// JSONObject creativeGroupObj = JSONObject.fromObject(object);
|
||||
// System.out.println(creativeGroupObj.isEmpty());
|
||||
|
@ -375,6 +374,23 @@ public class TestCode {
|
|||
//String str = null;
|
||||
//System.out.println((String)str == null);
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("GMT+8"));
|
||||
String date = sdf.format(new java.util.Date(1477451581136L));
|
||||
|
||||
System.out.println(date);
|
||||
|
||||
Long min = 19000001L;
|
||||
Long mx = 19000500L;
|
||||
|
||||
Long n = 19000000L;
|
||||
|
||||
if ((n >= min && n <= mx)||(n >= min && n <= mx)){
|
||||
System.out.println("ture");
|
||||
}else {
|
||||
System.out.println("false");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Long parseDate(String s) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2601e01098aa2ee6f859abfb40e3886581959dc9
|
Loading…
Reference in New Issue