public String BufferedReaderDemo(String path)
throws IOException...{File file=new
File(path);if(!file.exists()||file.isDirectory())throw new FileNotFo...
分类:
其他好文 时间:
2014-05-14 02:16:11
阅读次数:
199
一、日期转换为字符串1.日期以特定的格式输出: // 创建日期并转换为yyyy-mm-dd格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String datestr =
sdf.format(new Date()...
分类:
编程语言 时间:
2014-05-13 20:58:54
阅读次数:
261
1)创建一个android项目填写项目信息2)创建一个新Activity右键点击Eclipse左边(默认)你要加入Activity的包,比如,我的包是com.INdroid.layout。然后选New->Class,输入类名后(注意首字母大写),在Superclass的Browse那里点击。最后在C...
分类:
移动开发 时间:
2014-05-13 20:56:51
阅读次数:
473
代码片段(假设只有3个key=value):public static void
main(String[] args) throws IOException { BufferedReader br = new BufferedReader(
new In...
分类:
其他好文 时间:
2014-05-13 19:48:10
阅读次数:
485
public class BubbleSort{ public static void
main(String[] args){ int[] sortArray = new int[]{5,7,4,2,9,8,3,6};
System.out.println("before sorting ,t.....
分类:
编程语言 时间:
2014-05-13 19:45:04
阅读次数:
366
string str=textBox1.Text; object bs = new
DataTable().Compute(str, null); textBox1.Text =bs.ToString();
分类:
其他好文 时间:
2014-05-13 19:37:53
阅读次数:
296
收获:在运行程序的时候,错误出现。主要是map没有进行判断,是否为空,如果为空,则创建一个对象new
HashMap();然后就注意细节,String name=request.getParameter("name"); String
pass=request.getParameter("pa...
分类:
编程语言 时间:
2014-05-13 17:33:42
阅读次数:
276
前言 系列文章:[传送门]
每次开始新的一本书,我都会很开心。新书新心情。正文 静态工厂方法代替构造器 说起这个,好多可以念叨的。做了一年多的项目,慢慢也有感触。 说起构造器
大家很明白,构造器可以让我们在何处何地获取自身或者他人一个实例。我们是无忌惮的使用着 new 却从来没考虑过人...
分类:
编程语言 时间:
2014-05-13 11:14:19
阅读次数:
353
1、使用FileStream读写文件文件头:using System; using
System.Collections.Generic; using System.Text; using System.IO; 读文件核心代码: byte[]
byData = new byte[100]; char...
分类:
其他好文 时间:
2014-05-13 10:57:52
阅读次数:
262
10. Courier基本上所有的系统都自带了此种字体,有时候它又以Courier
New的名字出现。不幸的是很多终端和编辑器都默认使用此种字体,虽然这不会影响使用,但这会影响心情,它太枯燥了。以前看到这样一句评论:久不见牡丹会以仙人掌为美。这句评论形Courier字体非常合适。所以如果你还有其他选...
分类:
其他好文 时间:
2014-05-13 10:17:41
阅读次数:
493