码迷,mamicode.com
首页 >  
搜索关键字:c char c++ string    ( 126199个结果
使用JSONKit将字符串,字典,数组转换成json格式
原文http://blog.sina.com.cn/s/blog_6b8c3d7a01018803.html一,引入jsonkit NSString *str = nil; //字符串 NSMutableString *string = [[NSMutableString allo...
分类:Web程序   时间:2014-05-12 17:28:46    阅读次数:304
sscanf的应用
1.提取字符串2.提取指定长度的字符串3.提取指定字符为止的字符串4.取仅包含指定字符集的字符串5.取到指定字符集为止的字符串#include int main(){ char str[512]={0}; sscanf("123456","%s",str); printf("str...
分类:其他好文   时间:2014-05-12 17:15:19    阅读次数:322
LINQ to Entities 不识别方法“Int32 Parse(System.String)”,因此该方法无法转换为存储表达式。解决
问题描述最近在用LINQ to Entities,看看下面的代码//获取分页数据 var admins = from aa in db.VAccountAdmins select aa; //处理过滤规则 if (null != filterRules) ...
分类:其他好文   时间:2014-05-12 16:40:23    阅读次数:306
字符串的逆序
普通排序:直接分配一个同等大小的数组,反向copy即可.char* Reverse(char* s){ //将q指向字符串最后一个字符 char* q = s ; while( *q++ ) ; q -= 2 ; //分配空间,存储逆序后的字符串。 char* p = newchar[sizeof(...
分类:其他好文   时间:2014-05-12 16:30:14    阅读次数:338
vim编辑器的使用
模式切换的命令:键 进入模式 说明 命令模式 (从编辑模式返回命令模式)按 i,a, o “插入” 编辑模式 (在当前光标前开始插入)i :在光标前插入 I 光标所在行的行首开始插入a:在光标后开始插入 A:在本行末开始插入o:在光标所在行下另起一行插入 O:在光标上插入新行在命令模式下不要按其它键...
分类:其他好文   时间:2014-05-02 16:17:28    阅读次数:253
printf/scanf格式
(1)打印字符char c;printf("%c",c);(2)打印整形int i;printf("%d",i); //有符号十进制数printf("%u",i); //无符号十进制数(3)打印浮点数float f;printf("%f",f);(4)打印指针int *p;pri...
分类:其他好文   时间:2014-05-02 16:13:07    阅读次数:378
用fread和fwrite实现文件复制操作
#include #include #include int main(int argc,char **argv){ FILE *fp_src,*fp_des; char buf[128]; int num; if(argc!=3) { printf("t...
分类:其他好文   时间:2014-05-02 16:06:36    阅读次数:562
Unity3D中定时器的使用
源地址:http://unity3d.9tech.cn/news/2014/0402/40149.html在游戏设计过程中定时器是必不可少的工具,我们知道update方法是MonoBehavior中一个人人皆知的定时器方法,每帧都在调用,那还有其他什么定时器的方法呢,这里介绍一下。1.Invoke(...
分类:其他好文   时间:2014-05-02 15:27:43    阅读次数:438
类属性不能写在try{}catch(){}里面
public class cal{public static void main(String[] args){calculator ca=new calculator();byte[] first=new byte[4];byte[] second=new byte[4];System.out.p...
分类:其他好文   时间:2014-05-02 15:23:23    阅读次数:395
获取CPU频率
#include #include float get_cpu_clock_speed(){ FILE *fp; char buffer[1024]; size_t bytes_read; char *match; float clock_speed; fp=fo...
分类:其他好文   时间:2014-05-02 14:20:39    阅读次数:392
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!