前段时间忙数据交换,有一个多月没写java了。。找找手感,刷刷题吧。。
去leetcode上挑了个简单的,题目是这样的。
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the strin...
分类:
其他好文 时间:
2015-01-31 19:28:22
阅读次数:
168
一、List转数组 (从List转到string[])C# 代码 复制List listS=new List();listS.Add("str");listS.Add("hello");string[] str=listS.ToArray();二、数组转List (从string[]转到List)C...
分类:
编程语言 时间:
2015-01-31 19:16:44
阅读次数:
255
使用split分割时:String[] a="aa|bb|cc".split("|");output:[a, a, |, b, b, |, c, c]先看一下split的用法: String[] java.lang.String.split(String regex)Splits this stri...
分类:
其他好文 时间:
2015-01-31 19:15:09
阅读次数:
113
首先是前台代码:1 2 然后是上传按钮的单击事件(其中上传文件的文件夹,要存在):1 protected void Button1_Click(object sender, EventArgs e)2 {3 string a = this.UpLoadImage(this.FileUploa...
分类:
其他好文 时间:
2015-01-31 19:12:19
阅读次数:
227
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
BufferedWriter writer ;
try {
String path = getFilesDir().getAbsolutePath() ;
File file = new...
分类:
移动开发 时间:
2015-01-31 18:09:35
阅读次数:
225
在测试自动化的过程中,有时经常需要获取Toast的String来作检验。
在robotium中,我们知道可以通过solo.getView("message")方法获取Toast的TextView,然后得到其String值,那么其内部是怎么实现的呢。
首先看下我们一般是怎么调用Toast的:
Toast.makeText(getApplicationContext(), "再按一次退出程序",...
分类:
移动开发 时间:
2015-01-31 17:59:50
阅读次数:
167
1、强大的思维导图:DOM基本操作:Array:function:数据类型:string函数:运算符:var(变量):regular(正则表达式):process(流程语句):window对象:
分类:
编程语言 时间:
2015-01-31 17:49:09
阅读次数:
333
try { OpenFileDialog openFileDialog = new OpenFileDialog(); string str = comboBox_hexFilePath.Text; ...
DataTable dtImages = new DataTable(); string filepath = FileUpload1.PostedFile.FileName; //检查是否有文件要上传 if (this.Fi...
分类:
Web程序 时间:
2015-01-31 17:46:12
阅读次数:
200
/// /// 多行文本显示到LABEL时使用 /// /// /// public static string huanhang(string value) { return value.Replace("\r\n", "").Replace...
分类:
Web程序 时间:
2015-01-31 17:41:47
阅读次数:
167