摘要:package com.file.properties;import java.io.FileInputStream;import java.util.Properties;public class ReadProperties { Properties prop; public ReadPro...
阅读全文
摘要:Code example :package com.file.properties;import java.io.FileInputStream;import java.util.Properties;public class ReadProperties { Properties prop; ...
阅读全文
摘要:通过java获取计算机名String hostname = "Unknown"; try { InetAddress addr; addr = InetAddress.getLocalHost(); hostname = addr.getHostName(); }...
阅读全文
摘要:SimpleDateFormat 是一个以国别敏感的方式格式化和分析数据的具体类。 它允许格式化 (date -> text)、语法分析 (text -> date)和标准化。SimpleDateFormat 允许以为日期-时间格式化选择任何用户指定的方式启动。 但是,希望用 DateFormat 中的 getTimeInstance、 getDateInstance 或 getDateTimeInstance 创建一个日期-时间格式化程序。每个类方法返回一个以缺省格式化方式初始化的日期/时间格式化程序。可以根据需要用 applyPattern 方法修改格式化方式。 关于使用这些方
阅读全文
摘要:Rolling Date_Weeklyimport java.util.*;import java.text.SimpleDateFormat;import java.text.DateFormat;int oldY=2010;int oldM=10;int oldD=7;vars.put("oldDateWeekly",oldM+"/"+oldD+"/"+oldY);Calendar oldCal=Calendar.getInstance();oldCal.set(oldY,oldM-1,oldD);int oldDayOfWeek
阅读全文
摘要:JDKhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlEclipsehttp://www.eclipse.org/downloads/
阅读全文
摘要:import java.util.*;import java.text.SimpleDateFormat;int y,m,d,h,mi,s,ms;String cur;Calendar cal=Calendar.getInstance();y=cal.get(Calendar.YEAR);m=cal.get(Calendar.MONTH)+1;d=cal.get(Calendar.DATE);h=cal.get(Calendar.HOUR_OF_DAY);mi=cal.get(Calendar.MINUTE);s=cal.get(Calendar.SECOND);ms=cal.get(Cale
阅读全文
摘要:import java.util.*;int y,m,d,h,mi,s; Calendar cal=Calendar.getInstance(); y=cal.get(Calendar.YEAR); m=cal.get(Calendar.MONTH); d=cal.get(Calendar.DATE); h=cal.get(Calendar.HOUR_OF_DAY); mi=cal.get(Calendar.MINUTE); s=cal.get(Calendar.SECOND); System.out.println("The current time...
阅读全文
摘要:UUID是通用唯一标识码(Universally Unique Identifier),通过开源软件基金会(OSF)设立的一种算法生成。它的主要作用就是保证生成的字符串在同一时空中所有机器上都是唯一的。Get(UUID)是FileMaker Pro 12的新函数,它的主要作用就是生成UUID。UUID由以下几部分的组合:1. 当前日期和时间,UUID的第一个部分与时间有关,如果你在生成一个UUID之后,过几秒又生成一个UUID,则第一个部分不同,其余相同。2. 时钟序列。3. 全局唯一的IEEE机器识别号,如果有网卡,从网卡MAC地址获得,没有网卡以其他方式获得。UUID的格式为:xxxxxx
阅读全文