码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
PHP DOM创建XML文件
$dom?=?new?DOMDocument?(?‘1.0‘,?‘gbk‘?); ????$dom->formatOutput?=?true; ????$comment_str?=?‘?file?create?time:?‘?.?date(‘Y-m-d?H:i:s‘,?time())??.?‘?by?tree....
分类:Web程序   时间:2014-07-22 08:34:33    阅读次数:237
Python:常用的内置函数
内置方法说明__init__(self,...)初始化对象,在创建新对象时调用__del__(self)释放对象,在对象被删除之前调用__new__(cls,*args,**kwd)实例的生成操作__str__(self)在使用print语句时被调用__getitem__(self,key)获取序列...
分类:编程语言   时间:2014-07-22 00:24:36    阅读次数:359
stringstream中的clear()与str()
今天在用stringstream做数据转换的时候,遇到了问题,发现得到的不是预期的结果。简化的代码如下:#include #include #include using namespace std; int main(int argc, char * argv[]){ stringstr...
分类:其他好文   时间:2014-07-22 00:11:38    阅读次数:325
char数组与string转换
1、char数组转string有很多种方法:假设c字符串定义为char ch[]="hello world!";1.向构造函数传入c字符串创建string对象:string str(ch);2.使用拷贝构造函数创建string对象:string str = ch;3.对已有的string对象调用st...
分类:其他好文   时间:2014-07-21 14:39:47    阅读次数:226
C++获取目录文件列表
获取,指定目录的子文件列表,支持递归获取子目录,支持Win32和类Unix系统。#ifndef _FILE_HELPER_H__#define _FILE_HELPER_H__class FileHelper{public: /** @brief 获取指定文件夹内的文件路径列表 @param str...
分类:编程语言   时间:2014-07-21 14:03:05    阅读次数:214
js 获得字符串字节数
用到了就记下来,获得字符串字节长度,适用于汉字跟英文混合输入 1 function getBytesCount(str) 2 { 3 var bytesCount = 0; 4 if (str != null) 5 { 6 for (var i = 0; i < str.leng...
分类:Web程序   时间:2014-07-21 11:27:49    阅读次数:235
实现java字符串长度截取功能
代码如下:/** * 字符串长度截取 * @author Administrator * */public class Main { public static void main(String[] args) { String str = "java教程网提醒您,...
分类:编程语言   时间:2014-07-21 11:20:57    阅读次数:211
hdu 4046 Panda
题意:即3个连续的wbw算是一个love,看一下某个区间共有多少个love,多次询问。还有替换某个位置的字母,然后询问。 用树状数组处理,题目并不难,但因为一处想当然错了N次。。。 题目链接: Panda #include"stdio.h" #include"string.h" #define N 50005 #define lowbit(i) (i&(-i)) char str[...
分类:其他好文   时间:2014-07-21 09:30:12    阅读次数:271
索引器与数组类定义练习
using System;class ArrClass { //没有索引器的类 private readonly string name; public ArrClass(string name) { this.name = name; } public str...
分类:其他好文   时间:2014-07-21 08:25:34    阅读次数:197
腾讯webqq最新password加密算法,hash算法
常常在做webqq机器人,可是最头痛的问题就是腾讯常常加一些验证串来防止robot,如今共享出最新的腾讯password加密算法和hash算法hash算法def webqq_hash(i, a): if isinstance(i, (str, unicode)): i = int...
分类:Web程序   时间:2014-07-20 22:28:19    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!