NSArray *array = @[ @1, @2, @3, @4, @5, @3 ];
// 1. NSArray与NSData相互转化
// NSArray to NSData
NSError *error;
NSData *arrayData = [NSJSONSerialization dataWithJSONObject:array options:NS...
分类:
其他好文 时间:
2014-10-09 02:24:08
阅读次数:
180
1.十进制→二进制方法一:从右第n位876543212n-12726252423222120十进制下的实际数128643216842123=16+4+2+1 1011136=32+410010049=32+16+1110001计算出想要的数需要用哪一些数字相加,...
分类:
其他好文 时间:
2014-10-08 17:29:05
阅读次数:
302
核心提示:jquery选择器得到的jquery对象和标准的 javascript中的document.getElementById()取得的dom对象是两种不同的对象类型,一般情况下,如S(’#id’)得到的是jquery对象,它不能使用js中的dom方法。所以,如果jquery对象要使用标准的do...
分类:
Web程序 时间:
2014-10-08 14:08:25
阅读次数:
167
考察编程基础知识,用到字符和数字相互转化等。形式是描述清楚明文和暗文的转化规则。 1 #include 2 #include 3 4 #define MAXLEN 71 5 6 int length; 7 8 void toCode(int code[],char text[]){ 9 ...
分类:
其他好文 时间:
2014-10-06 18:40:30
阅读次数:
109
提供两个函数,方便十六进制串与ASCII 字符串之间的相互转换,使用函数需要注意的是返回的串是在堆上通过 calloc 分配的,所以,记得使用完返回值释放该块,并且将指向该块的指针 =NULL 。char *chstohex ( char* chs ){ char hex[16] = { '0...
分类:
其他好文 时间:
2014-10-05 23:45:59
阅读次数:
231
NSString *tempA = @"123";NSString *tempB = @"456";1,字符串拼接NSString *newString = [NSString stringWithFormat:@"%@%@",tempA,tempB];2,字符转intint intString ....
分类:
其他好文 时间:
2014-10-05 20:07:48
阅读次数:
163
Python 里面的编码和解码也就是 unicode 和 str 这两种形式的相互转化。编码是 unicode -> str,相反的,解码就是 str -> unicode。剩下的问题就是确定何时需要进行编码或者解码了.关于文件开头的"编码指示",也就是 # -*- coding: -*- 这个语句...
分类:
编程语言 时间:
2014-10-05 19:31:08
阅读次数:
180
public class CommonService { #region DataReader转化 /// /// 将DataReader转化为Table /// /// /// pub...
分类:
其他好文 时间:
2014-10-03 18:25:25
阅读次数:
266
1.CString 转 intCString strtemp = "100";int intResult;intResult= atoi(strtemp);-----------------------------------------------------------------2 int 转...
分类:
编程语言 时间:
2014-10-03 12:38:54
阅读次数:
235