JAVA±à³ÌÌâ
1£®ÏÖÔÚÊäÈën¸öÊý×Ö£¬ÒÔ¶ººÅ£¬·Ö¿ª£»È»ºó¿ÉÑ¡ÔñÉý»òÕß½µÐòÅÅÐò£»°´Ìá½»¼ü¾ÍÔÚÁíÒ»Ò³ÃæÏÔʾ°´Ê²Ã´ÅÅÐò£¬½á¹ûΪ£¬Ìṩreset
import java.util.*;
public class bycomma{
public static String[] splitStringByComma(String source){
if(source==null||source.trim().equals(""))
return null;
StringTokenizer commaToker = new StringTokenizer(source,",");
String[] result = new String[commaToker.countTokens()];
int i=0;
while(commaToker.hasMoreTokens()){
result[i] = commaToker.nextToken();
i++;
}
return result;
}
public static void main(String args[]){
String[] s = splitStringByComma("5,8,7,4,3,9,1");
int[] ii = new int[s.length];
for(int i = 0;i<s.length;i++){
ii[i] =Integer.parseInt(s[i]);
}
Arrays.sort(ii);
//asc
for(int i=0;i<s.length;i++){
System.out.println(ii[i]);
}
//desc
for(int i=(s.length-1);i>=0;i--){
System.out.println(ii[i]);
}
}
}
2£®½ð¶îת»»£¬°¢À²®Êý×ֵĽð¶îת»»³ÉÖйú´«Í³µÄÐÎʽÈ磺£¨£¤1011£©£>£¨Ò»Ç§ÁãһʰһԪÕû£©Êä³ö¡£
package test.format;
import java.text.NumberFormat;
import java.util.HashMap;
public class SimpleMoneyFormat {
public static final String EMPTY = "";
public static final String ZERO = "Áã";
public static final String ONE = "Ò¼";
public static final String TWO = "·¡";
public static final String THREE = "Èþ";
public static final String FOUR = "ËÁ";
public static final String FIVE = "Îé";
public static final String SIX = "½";
public static final String SEVEN = "Æâ";
public static final String EIGHT = "°Æ";
public static final String NINE = "¾Á";
public st
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
¼¦ÍÃͬÁýÎÊÌâ¾ÍÊǶþÔªÒ»´Î·½³Ì×飬¸ßµÈÊýѧÀïÃæÓÃÐÐÁÐʽÀ´½â´Ë·½³Ì¡£¾ßÌå¹ý³Ì¿É Google “ÐÐÁÐʽ ¶þÔªÒ»´Î·½³Ì×é
”¡£¶ÔÓÚ¼¦ÍÃͬÁýÎÊÌ⻹Ҫ¼ÓÉÏÒ»¸öÏÞÖÆ£º·½³ÌµÄ½â±ØÐëÊÇÕýÕûÊý¡£
ÏÂÃæÊÇ´úÂëʾÀý£º
/**
* ¼¦ÍÃͬÁýÎÊÌâ¡£½â·¨Çë Google£º“ÐÐÁÐʽ ¶þÔªÒ»´Î·½³Ì×é”
*
* @author yiding.he
*/ ......
ÍùÍù»ìÏýÁËÕâÈý¸öº¯ÊýµÄʹÓá£
´Ó²Ù×÷ϵͳµÄ½Ç¶È½²£¬os»áά»¤Ò»¸öready queue£¨¾ÍÐ÷µÄÏ̶߳ÓÁУ©¡£²¢ÇÒÔÚijһʱ¿ÌcpuֻΪready queueÖÐλÓÚ¶ÓÁÐÍ·²¿µÄÏ̷߳þÎñ¡£
µ«Êǵ±Ç°ÕýÔÚ±»·þÎñµÄÏ߳̿ÉÄܾõµÃcpuµÄ·þÎñÖÊÁ¿²»¹»ºÃ£¬ÓÚÊÇÌáÇ°Í˳ö£¬Õâ¾ÍÊÇyield¡£
»òÕßµ±Ç°ÕýÔÚ±»·þÎñµÄÏß³ÌÐèҪ˯һ»á£¬ÐÑÀ´ºó¼ÌÐø±»·þÎñ£¬Õâ¾ÍÊ ......