java遍历Map的四种方法
public static void main(String[] args) {
Map map = new HashMap();
map.put("1", "value1");
map.put("2", "value2");
map.put("3", "value3")...
分类:
其他好文 时间:
2015-06-03 15:47:44
阅读次数:
103
LIST(1)List是Collection的子接口 特点:有序(存储顺序和取出顺序一致),可重复。(2)List集合的特有遍历功能 A:由size()和get()结合。例子:for(int x=0; x<list.size(); x++) { String s = lis...
分类:
编程语言 时间:
2015-06-03 15:38:28
阅读次数:
118
setattr(object,name,value):作用:设置object的名称为name(type:string)的属性的属性值为value,属性name可以是已存在属性也可以是新属性。getattr(object,name,default):作用:返回object的名称为name的属性的属性值...
分类:
其他好文 时间:
2015-06-03 15:36:21
阅读次数:
163
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:
其他好文 时间:
2015-06-03 15:33:00
阅读次数:
168
总结一下Main方法规则:1.Main 方法名大小写有规范。2.Main 方法返回类型只有 void、int两种返回类型。3.Main 方法的参数可以是string[] args,也可以为空,只是这两种。4.Main 方法必须是静态方法。看一下示例: static void Main(string[...
分类:
其他好文 时间:
2015-06-03 15:25:58
阅读次数:
109
MVC HtmlHelper方法Html.BeginForm(actionName,controllerName,method,htmlAttributes){}BeginRouteForm 方法 (HtmlHelper, String, Object, FormMethod)传统Form表单Aci...
分类:
Web程序 时间:
2015-06-03 15:17:42
阅读次数:
219
List转字符串,用逗号隔开List list = new List();list.Add("a");list.Add("b");list.Add("c");//MessageBox.Show(list.);//LoadModel();string s = string.Join(",", list...
String vs NSString JavaScript string Obj-C NSString charAt(index) (see text) charCodeAt(index) - (unichar)characterAtIndex:(NSUInt...
分类:
编程语言 时间:
2015-06-03 15:11:40
阅读次数:
121
这道题类似Java的大数。#include #include using namespace std;string format(string str){ bool zheng=true; int ppos=str.find('.'); int len=str.length(); string s1...
分类:
其他好文 时间:
2015-06-03 15:09:05
阅读次数:
134
Android如何使用读写cookie的方法 可以使用SharedPreferences或者SQLite来保存用户信息 private?static?HashMap<String,String>??CookieContiner=new?HashMap<String,String>()?;
????/**
?*?保存C...
分类:
移动开发 时间:
2015-06-03 14:04:20
阅读次数:
205