废话不说,直接上代码
List转成数组
List nameList = new ArrayList<>();
nameList .add("123');
nameList .add("123');
nameList .add("123');
//转成数组
String[] arr = nameList.toArray(new String[nameList.size()]);
数组转成Lis...
分类:
编程语言 时间:
2015-04-23 11:01:34
阅读次数:
189
//生成随机字母数字组合public static string CreateRandom(int codeCount){string allChar = "2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D...
分类:
其他好文 时间:
2015-04-23 10:54:12
阅读次数:
117
JavaScript中replace()方法如果直接用str.replace("-","!")只会替换第一个匹配的字符.而str.replace(/\-/g,"!")则可以全部替换掉匹配的字符(g为全局标志)。所以可以用以下几种方式.:string.replace(/reallyDo/g,repla...
分类:
Web程序 时间:
2015-04-23 10:52:01
阅读次数:
135
导入包import "fmt"import( "fmt" "os")函数外申明变量var a int = ""函数内申明变量a := ""函数申明func name (){}function name (a,b string) 返回类型 {}
分类:
其他好文 时间:
2015-04-23 10:51:54
阅读次数:
115
人开门
class
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
/*
人开门:名词提炼法。
人
{
开门(门)
{
门.开();
}
}
门
{
开(){操作门轴等。}
}
*/
//面向对象:三个特...
分类:
其他好文 时间:
2015-04-23 09:43:26
阅读次数:
125
redis 订阅发布
项目名称:SmRemind_NEW
@Service
public class PubServiceImpl implements PubService {
@Resource(name="stringRedisTemplate")
private StringRedisTemplate stringRedisTemplate;
private String...
分类:
编程语言 时间:
2015-04-23 09:34:28
阅读次数:
317
刚开始学Ruby,一下子搞不清其中的Symbol(变量需要加:)和字符串有什么区别,为这么要为语言设计这么一个东西。让我很迷惑。首先,字符串对象,是不同的。比如"String" "String"就不同,实例不同。"String".equal?("String") 这函数返回的是false。但是相同名...
分类:
其他好文 时间:
2015-04-23 09:25:44
阅读次数:
116
api [HttpPost] public string PostAvartos(Test model){ if (model != null) { LoggerHelper.WriteInfo(model.id + " " + model.name); } else { L...
刚才在做DBMS课程设计的时候遇到了一个以前遇到过的问题不过这次我没有一眼认出来,想了好一会才想起来。 就是在用split()方法来分割路径名字符串的时候,比如String path = “E:\split\ikonw";String[] tpath = path.split("\\"); 你以为....
分类:
其他好文 时间:
2015-04-23 02:00:26
阅读次数:
97
public final class Stringextends Objectimplements Serializable, Comparable, CharSequenceThe String class represents character strings. All string lite...
分类:
编程语言 时间:
2015-04-23 01:58:16
阅读次数:
174