for_each函数的用法
std::for_each(cpths.begin(), cpths.end(), print);
其中print函数为
void print(const std::string& e)
{
std::cout << e << std::endl;
}
以上语句 等价于:
std::vector::const_iterator iter = cpths.be...
分类:
其他好文 时间:
2015-05-19 19:05:36
阅读次数:
94
之前做一个东西的时候因为要存储2000+的汉字笔画文件,每个汉字对应相应的笔画 ,我从网上看过许多中文汉字名的存储方法都有问题
后来我想到了一个间接实现的方法在windows上把文件名用
URLEncoder.encode(string, "UTF-8");
转换然后在Android中找中文文件名的时候
例如 大.gif 就同样把 URLEncoder.encode(“...
分类:
移动开发 时间:
2015-05-19 19:04:58
阅读次数:
181
一、创建Neo4j的Legacy indexing 1.为节点创建索引 官方API的创建示例为:将一节点添加至索引:public static void AddNodeIndex(String nid) { String txUri=SERVER_ROOT_URI+"inde...
分类:
其他好文 时间:
2015-05-19 18:50:33
阅读次数:
204
function obj2str(o){ var r = []; if(typeof o == "string" || o == null) { return o; } if(typeof o == "object"){ ...
分类:
Web程序 时间:
2015-05-19 18:49:49
阅读次数:
152
public Bitmap convertToBitmap(String path, int w, int h) {BitmapFactory.Options opts = new BitmapFactory.Options();// 设置为ture只获取图片大小opts.inJustDecodeB...
分类:
其他好文 时间:
2015-05-19 18:41:44
阅读次数:
185
//定义委托public delegate void QuestionEventHandler(string s);//定义发布者public class Publisher{public string Question = "太平洋的中间是什么?";public event QuestionEve...
分类:
其他好文 时间:
2015-05-19 18:40:38
阅读次数:
142
下面是和目彔树相关的方法。public boolean rename(String src, String dst) throws IOException;更改文件名。调用FSNamesystem的renameTo,干活的是renameToInternal,最终调用FSDirectory的renam...
分类:
其他好文 时间:
2015-05-19 18:39:56
阅读次数:
151
MySqlHelper类 /// ///MySql操作类 /// public abstract class MySqlHelper { //数据库连接字符串 public static string Conn = "Database='...
分类:
数据库 时间:
2015-05-19 18:37:29
阅读次数:
230
最近做了一个小程序,要求在控制台中记录程序运行的异常并输出到指定的文件夹中,以下是我的具体的程序代码: public static void ErrorLog(Exception ex) { string FilePath = "/ErrorLog.txt"; ...
1.main方法的属性public static是可以交换的,但是返回类型一定是void类型,形式参数必须为String[]类型,名称可变。2.查看加载类:new HelloWorld().getClass().getClassLoader().toString()。3.在Java中,过程和函数统称...
分类:
编程语言 时间:
2015-05-19 18:33:14
阅读次数:
175