码迷,mamicode.com
首页 >  
搜索关键字:string+    ( 95377个结果)
java.lang.String.indexOf()用法
java.lang.String.indexOf(char ch)方法返回字符ch在指定字符串中第一次出现的下标索引位置如果字符ch在指定的字符串中找不到,则返回-1示例:import java.lang.*;public class StringDemo { public static void....
分类:编程语言   时间:2014-05-08 13:02:04    阅读次数:423
java中初始化对象数据域的多种途径以及执行次序
1:默认初始化如果对类中的变量不进行初始化,系统则会初始化变量为对应的值 比如int = 0, bool = fase String = null;2:手动初始化变量private int age = 23;3:初始化块{ id = 201245; age = 23;}4:构...
分类:编程语言   时间:2014-05-08 12:57:43    阅读次数:361
各种排序算法(C语言)
#include #include void DataSwap(int* data1, int* data2) { int temp = *data1; *data1 = *data2; *data2 = temp; }void insertSort(int arr[],i...
分类:编程语言   时间:2014-05-08 12:54:22    阅读次数:299
typedef 与指针、多维数组
1.在typedef中使用指针往往会带来意外的结果。如下:typedef string *pstring;const pstring cstr;绝大数人刚开始都会认为cstr是一种指针,它指向const对象,即const pstring cstr 等价于const string *cstr,其实,这...
分类:其他好文   时间:2014-05-08 12:52:54    阅读次数:319
File / Directory 文件的操作及远程下载
//文件远程下载 WebClient client = new WebClient(); Uri uri = new Uri(url); client.DownloadFile(Uri uri,String filename);//文件一定得存在不然会报错所以在删除文件时先判断这个文件是否存...
分类:其他好文   时间:2014-05-07 21:07:37    阅读次数:284
文件操作(输出倒数第二行)
#include "stdafx.h"#include #include #include using namespace std;int main(){ //cin.imbue(locale("chs")); cout.imbue(locale("chs"));//控制台输出中文 int i,le...
分类:其他好文   时间:2014-05-07 20:48:01    阅读次数:288
MyBatis传入多个参数的问题
一、单个参数:public List getXXBeanList(String xxCode); 其中方法名和ID一致,#{}中的参数名与方法中的参数名一直, 我这里采用的是XXXBean是采用的短名字,select 后的字段列表要和bean中的属性名一致, 如果不一致的可以用 as 来补充。...
分类:其他好文   时间:2014-05-07 20:41:12    阅读次数:281
c# 解压文件
public bool UnRAR(string destPath, string rarfilePath) { try { // destPath = @"E:\youxiaodi\temp"; //目标位...
分类:其他好文   时间:2014-05-07 20:35:48    阅读次数:322
ptr_fun学习笔记
ptr_fun是将一个普通的函数适配成一个functor,添加上argument type和result type等类型, 其实现如下(例子里面是binary_function,unary_function同理):C++代码templateinlinepointer_to_binary_functi...
分类:其他好文   时间:2014-05-07 20:33:56    阅读次数:393
Asp.net导出Excel乱码的解决方法
通过跟踪Asp.net服务器代码,没有乱码,然而导出Excel到浏览器后,打开时出现乱码。解决方法是添加编码格式的前缀字节码:Response.BinaryWrite(System.Text.Encoding.Unicode.GetPreamble());Response.Clear();Respo...
分类:Web程序   时间:2014-05-07 20:29:11    阅读次数:328
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!