码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
高级I/O函数(1)-writev、readv、sendfile函数
1.前言 Linux提供了很多的高级I/O函数,它们在特定的条件下表现出优秀的特性。这里主要讨论的是和网络编程相关的几个。 用于读写数据的函数,包括writev/readv、sendfile。 readv和writev函数#include ssize_t readv(int fd,const str...
分类:其他好文   时间:2014-09-15 01:00:07    阅读次数:392
NSArray
不可变数组类容器类,管理一组对象类型的数据。元素是有序的,索引值从0开始数组中存储的元素必须是对象,类型任意。创建数组对象,使?用实例初始化或便利构造器。获取元素个数。根据索引值获取对象。获取对象在数组中的索引值。 NSString* str=@"today"; Person* p1 = [[Per...
分类:其他好文   时间:2014-09-14 23:28:57    阅读次数:225
数组与字符串 1.2
用C或C++实现void reverse( char* str )函数,即反转一个null结尾的字符串。分析:先确定字符串的长度,然后从两端往中间遍历,同时交换两端的元素。 1 #include 2 #include 3 #include 4 5 using namespace std; 6...
分类:其他好文   时间:2014-09-14 20:31:47    阅读次数:209
字符串查找相同字母代码
intchar_contains(charstr[],charc){//方法1:intlen=strlen(str);for(inti=0; i<len; i++) {if(str[i]==c) {return1; } }return0;//方法2:inti=0;while(str[i]!='\0....
分类:其他好文   时间:2014-09-14 20:31:17    阅读次数:150
python练习程序(批量重命名)
# -*- coding: cp936 -*-import sys,os,stringd=0;path="F://test"srcfile=os.listdir(path)for i in srcfile: src=path+"//"+i dst=path+"//"+str(d)+".t...
分类:编程语言   时间:2014-09-14 14:04:47    阅读次数:184
C#小知识点记录(QQ交流群的一个小问题)Linq提取数据
请教 这里 LINQ想 找到 最后的 4条 记录 然后放在 这里这个 List Linq查找怎么写呀?解答:写了一个小例子作为解答。 1 namespace C_Sharp 2 { 3 class Program 4 { 5 static void Main(str...
分类:其他好文   时间:2014-09-14 00:06:56    阅读次数:354
完美的代价
1 #include 2 3 using namespace std; 4 5 int main() 6 { 7 int n = 0; cin >> n; 8 char str[8001]; // 保存输入字符 9 int cnt[26] = { 0 }; // 字符...
分类:其他好文   时间:2014-09-13 11:56:15    阅读次数:168
TP之msubstr()
function msubstr($str, $start=0, $length, $charset="utf-8", $suffix=true) { ? ? ? ? if(function_exists("mb_substr")) ? ? ? ? ? ? $slice = mb_substr($str, $start, $length, $charset); ? ?...
分类:其他好文   时间:2014-09-13 10:47:55    阅读次数:190
c语言字符数组的初始化问题
1、字符数组的定义与初始化 字符数组的初始化,最容易理解的方式就是逐个字符赋给数组中各元素。char str[10]={ 'I',' ','a','m',' ',‘h’,'a','p','p','y'}; 即把10个字符分别赋给str[0]到str[9]10个元素如果花括号中提供的字符个数大于数组长...
分类:编程语言   时间:2014-09-12 23:23:14    阅读次数:266
HUST - 1010 The Minimum Length
Description There is a string A. The length of A is less than 1,000,000. I rewrite it again and again. Then I got a new string: AAAAAA...... Now I cut it from two different position and get a new str...
分类:其他好文   时间:2014-09-12 19:11:14    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!