代码:String str = "the music made it hard to concentrate";String delims = "[ ]+";String[] tokens = str.split(delims);结果为:the, music, made, it, hard, to,...
分类:
编程语言 时间:
2014-07-31 12:07:26
阅读次数:
211
在创建一个Java类的对象之前,需要由虚拟机加载该类,然后对该类进行链接和初始化。初始化完成之后,才能创建出该Java类的新的对象实例。对象也有自己的初始化过程,主要通过调用对应Java类的特定构造方法来完成。...
分类:
编程语言 时间:
2014-07-31 10:01:36
阅读次数:
209
Spring在ssh中的作用,写的很不错,对于初学者应该能起到不小的帮助。...
分类:
编程语言 时间:
2014-07-31 09:57:26
阅读次数:
204
package org.fun.classdemo;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
public class OutputStreamDemo {
public static void main(St...
分类:
编程语言 时间:
2014-07-31 09:56:46
阅读次数:
316
package org.fun.io;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
public class ByteArrayDemo {
public static void main(String[] args) {
String str = "helloworld";// ...
分类:
编程语言 时间:
2014-07-31 09:56:26
阅读次数:
261
package org.fun.io;
import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
class Send implements Runnable{
private PipedOutputStream output=null;
publ...
分类:
编程语言 时间:
2014-07-31 09:56:16
阅读次数:
267
Template Parameter
#include
#include
#include
#include
#include
#include
using namespace std;
template
Foo calc(const Foo &a, const Foo &b)
{
Foo temp=a;
//...
return temp;
}
///Templa...
分类:
编程语言 时间:
2014-07-31 09:55:46
阅读次数:
252
重载和模板
/**
* 功能:重载和模板
* 时间:2014年7月27日16:23:32
* 作者:cutter_point
*/
#include
#include
#include
using namespace std;
/**
重载模板书写
*/
template
string debug_rep(const T &t)
{
ostringstream ret;...
分类:
编程语言 时间:
2014-07-31 09:55:37
阅读次数:
288
模板左值右值的转换
/**
* 功能:模板左值右值的转换
* 时间:2014年7月27日08:18:06
* 作者:cutter_point
*/
#include
#include
#include
using namespace std;
template
auto fcn(It beg, It end) -> typename remove_reference::ty...
分类:
编程语言 时间:
2014-07-31 09:55:27
阅读次数:
312
目前我知道的在java中导出Excel可以用poi或在jsp的文件头改变输出流。下面再介绍一种就用java基础包导出的Excel。导出的格式形如:
源码如下:
package csvExcel;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import...
分类:
编程语言 时间:
2014-07-31 09:50:16
阅读次数:
204
java.util.ConcurrentModificationException
分类:
编程语言 时间:
2014-07-31 09:45:45
阅读次数:
208
题目:Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending o....
分类:
编程语言 时间:
2014-07-31 09:38:05
阅读次数:
341
Setting->Compiler直接在“Have g++ follow the C++11 ISO C++ language standard [-std=c++11]” 选项上打勾 保存就可以了
分类:
编程语言 时间:
2014-07-31 09:36:35
阅读次数:
261
博客引用地址:Java中的native方法 今天花了两个小时把一份关于什么是Native Method的英文文章好好了读了一遍,以下是我依据原文的理解。 一. 什么是Native Method 简单地讲,一个Native Method就是一个java调用非java代码的接口。一个Nativ...
分类:
编程语言 时间:
2014-07-31 09:35:15
阅读次数:
206
最近在做ASP.NET项目中,需要实现一个tab页控件。发现asp.net控件中没找到现成的。一般的实现都需要js和div配合。于是就用到了easyui里面的。使用也很简单,将easyui需要的js和样式文件都加载后。直接用div即可实现。效果如下代码也很简单,每个tab是一个div。引用easyu...
分类:
编程语言 时间:
2014-07-31 09:32:15
阅读次数:
188
关于synchronized关键字的作用:
1、在某个对象的所有synchronized方法中,在某一时刻,只能有一个唯一的一个线程去访问这些synchronized方法
2、如果一个方法是synchronized方法,那么该synchronized关键字表示给当前对象(this)上锁。
3、如果一个synchronized方法是静态(static)的,那么该synchronized关键字表示给当前对象所对应的class对象上锁。(每个类,不管生成多少对象,其对应的class对象只有一个)
4、多线程:如...
分类:
编程语言 时间:
2014-07-31 07:28:45
阅读次数:
236
Python 提取Twitter用户的Tweet...
分类:
编程语言 时间:
2014-07-31 07:28:36
阅读次数:
346