JavaʵÏÖCSVÎļþ²îÒì¶Ô±È
ÔÚÏîÄ¿Öо³£»áÓöµ½Ê¹ÓÃCSVÎļþ£¬±ÈÈç´ÓHRÖеõ½µÄÎļþÄõ½ÆäËüµØ·½È¥´¦Àí£¬Êµ¼Ê»áÐèÒªµÃµ½µ±Ç°ºÍÉÏ´ÎÎļþÖеIJîÒ죬±ÈÈ磺Ìí¼Ó£¬É¾³ý£¬Ð޸ģ¬ ÄÇôÈçºÎÀ´ÊµÏÖÄØ£¬¿ÉÄÜÓкܵķ½·¨£¬ÔÚÕâÀïÎÒ˵һÏÂÎÒµÄʵÏÖ·½·¨¶øÇÒÒÑͶÈëʵ¼ÊʹÓá£
Ê×ÏÈ£¬ CSVÎļþµäÐÍÒÔ,·Ö¸ô£¬µ±È»»¹ÓÐÆäËüµÄ×Ö·û£¬ÓɺܶàÁеÄÊôÐÔºÍÊôÐÔÖµ×é³É£¬ÄÇôÁ½¸öÎļþ±ä»¯Ö®ºó£¬Í¨³£»áÊÇÔõÑùµÄÇé¿öÄØ£¬
±ÈÈ磺ÌíеÄÒ»ÐУ¬É¾³ýÒÑÓÐÒ»ÐУ¬ÐÞ¸ÄÒÑÓÐÐÐijЩֵ£¬Ã»ÓÐÈκα仯¡£
ËùÒÔʵÏÖ˼·ÊÇ£º ¹Ø¼üÖ®Ò»ÊÇÄܹ»ÕÒÒ»¸ö¶«Î÷À´Î¨Ò»±êʶÿһÐУ¬ÔÚÕâÀïÎÒÓõİÑij¼¸¸ö×Ö¶Î×éºÏÀ´×÷ΪID,ÓÐÁËÕâ¸öºó¾ÍºÃ°ì·¨£¬¶ÁÈ¡Á½¸öÎļþ²¢°ÑID¼ÆËã³öÀ´£¬µ«»¹ÓÐÒ»¸öÊÂÇé¾ÍÊÇÎļþ¶¼¶Á½øÀ´ÁË£¬Ó¦¸ÃÈçºÎÀ´¾ö¶¨Ìí¼Ó£¬É¾³ý£¬ÐÞ¸ÄÄØ£¬Ç°Ãæ˵Á˼ÈÈ»ÓÐÁËID£¬ÄÇôÄÃÈ¥±È½Ï£º
ID in old not in new - > delete
ID in new not in old -> add
ID in both old and new -> modify
example:
old:
value1,value2,value3
test1,test2,test3
new:
hello,world,haha
value1,value2,value4
delta:
A, hello,world,haha
M, value1,value2,value4
D, test1,test2,test3
ÔÚÐÞ¸ÄÇé¿öÏ»¹ÒªÈ¥ÅжÏÐÞ¸ÄÁËÄÄЩֵ¡£Ê¹ÓÃJavaµÄÇé¿öÏ£¬ÎÒµÄ×ö·¨ÊǶÁÈ¡Á½¸öÎļþÈ»ºó·âװΪEntry, ÔÙ°Ñentry´æÈëMap£¨ID£¬ Entry£©ÖÐ,È»ºóÔÙ×ö±È½Ï£¬´Ó×óµ½ÓÒ¾ö¶¨Ìí¼ÓºÍÐ޸ģ¬´ÓÓÒµ½×ó¾ö¶¨É¾³ý£¬Ê¹ÓÃMapµÄkey,value²éÕÒÌØÐÔ£¬µ±È»Á˱ȽϽáÊøºóÒª°ÑDeltaÊý¾Ýдµ½ÐµÄcsvÎļþÖÐ,Ä¿Ç°´¦Àí8000ÐÐ×óÓÒµÄʱ¼äÔ¶ÔÚ1sÄÚ¡£ÏÂÃæÊDZȽϵĴúÂëƬ¶Ï
/**
* Compare the two Map then return the delta entry list
* @param input Map input Map where stored the entry and ID
* @param previous Map previous Map
*/
public List<Entry> deltaEntryList(Map<Object, Object> input, Map<Object, Object> previous){
List<Entry> deltaList = new ArrayList<Entry>();
Iterator iterInput = input.entrySet().iterator();
Util.log("debug", "Compare input with previous");
while (iterInput.hasNext()) {
Map.Entry entry = (Map.Entry) iterInput.next();
Object keyInput = entry.getKey();
Object valInput = entry.getValue();
//For Add
if( !previous.containsKey(keyInput) ){
Entry deltaAdd = (Entry)valI
Ïà¹ØÎĵµ£º
Ìù¶Î´úÂë,ÓÐÉÙÐí×¢ÊÍ:
package ibees;
import java.util.Arrays;
public class BinarySearch {
/**
* @param args
*/
public static void main(String[] args) {
double[] src = new double[]{1.3,9.9,10.89,12.89,89.0};
System.out.println(new BinarySearch().binarySearch(src, 89.0));
}
......
µ±Á½¸ö½ø³ÌÔÚ½øÐÐÔ¶³ÌͨÐÅʱ£¬±Ë´Ë¿ÉÒÔ·¢Ë͸÷ÖÖÀàÐ͵ÄÊý¾Ý¡£ÎÞÂÛÊǺÎÖÖÀàÐ͵ÄÊý¾Ý£¬¶¼»áÒÔ¶þ½øÖÆÐòÁеÄÐÎʽÔÚÍøÂçÉÏ´«ËÍ¡£·¢ËÍ·½ÐèÒª°ÑÕâ¸öJava¶ÔÏóת»»Îª×Ö½ÚÐòÁУ¬²ÅÄÜÔÚÍøÂçÉÏ´«ËÍ£»½ÓÊÕ·½ÔòÐèÒª°Ñ×Ö½ÚÐòÁÐÔÙ»Ö¸´ÎªJava¶ÔÏó¡£
¡¡¡¡°ÑJava¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì³ÆΪ¶ÔÏóµÄÐòÁл¯¡£
¡¡¡¡°Ñ×Ö½ÚÐòÁлָ´ÎªJava¶ÔÏóµÄ¹ ......
½ñÌì¼ÌÐøѧϰjavaºÍandroidƽ̨ javaµÄѧϰËãÊDz¹³ä£¬ÒòΪûÓÐjava»ù´¡Ò²×ö²»³öʲô¶«Î÷À´
½ñÌì¿´µ½javaÓÃthis¹Ø¼ü×ÖÀ´ÖØÔع¹Ôì·½·¨£¬ÔÚÕâÀï×ö¸ö±Ê¼Çclass a_sample{
public int x,y.z;
a_sample(int x){
this.x=x;
}
a_sample(int x,int y){
this(x);
this.y=y;
}
a_sample(int x ......
javaÖÐ×Ö·û´®×ª»»³Éʱ¼ä¸ñʽ×ܽá
¹Ø¼ü×Ö: java ×Ö·û´® ʱ¼ä ¸ñʽ
ͨ¹ý³¤Ê±¼äµÄ¶Ôʱ¼ä²»Í¬¸ñʽµÄת»»£¬×Ô¼º¾õµÃÆäʵ¾ÍÊǶԺÁÃëÊýµÄ²Ù×÷
Java´úÂë
System.currentTimeMillis()
System.currentTimeMillis()
µÃµ½´Ó1970Äê1ÔÂ1ÈÕµ½ÏÖÔڵĺÁÃëÊý£¬¾Í¿ÉÒÔת»»³É¸÷ÖÖµÄÐÎʽ¡£
ÓÐÕâÑùÒ»¸ö×Ö·û´®£º“ ......
eval.jar ÐèÒªµ½https://eval.dev.java.net/
ÏÂÔØ
--ÏÂÃæÊÇʾÀýʹÓã¬Ö§³ÖÖÐÎıäÁ¿
Expression exp = new
Expression("(x + y)/2"
);
Map<String, BigDecimal> variables = new
HashMap<String, BigDecimal>();
variables.put("x", new
BigDecimal("4.32"
)); ......