码迷,mamicode.com
首页 >  
搜索关键字:intvalue    ( 276个结果
OC -- 小练习
// 求字符串"158"和"39"按十进制数值做差后的结果以字符串形式输出 NSString *str1 = @"158"; NSString *str2 = @"39"; int a = [str1 intValue]; int b = [str2 intValue]; int c = a - b...
分类:其他好文   时间:2016-01-26 00:19:13    阅读次数:205
hql如何查询总数
Queryquery=session.createQuery(hql); num=(newInteger(query.uniqueResult().toString())) .intValue();
分类:其他好文   时间:2016-01-16 22:17:28    阅读次数:200
基本数据类型的包装类
Java设计之初,一切皆对象。但是基本数据类型不是对象。开始的时候人为的包装一个基本数据类型class Myint{private int num ;public Myint(int num){//打包this.num = num ;}public int intValue(){//拆包return...
分类:其他好文   时间:2016-01-13 21:51:48    阅读次数:127
排序、根据字典元素中的数字排序
NSLog(@"第四题"); NSComparator comp=^(id obj1 ,id obj2){ int age1=[ obj1[@"age"]intValue ]; int age2=[obj2[@"age"]intValue]; if(age1==a...
分类:编程语言   时间:2016-01-11 18:02:51    阅读次数:182
NSString作业1:求字符串“158”和“39”按十进制数值做差后的结果,以字符串形式输出
代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { NSString *str1=@"158",*str2=@"39"; int num1=[str1 intValue]; ...
分类:其他好文   时间:2016-01-07 08:53:49    阅读次数:379
c# Json Dictionary序列化和发序列化
这里说的是字典的键值是自定义类的情况,其他情况不在讨论范围,所使用的Newtonsoft.Json.dll会在结尾给出下载地址。闲话少说,直接上代码。usingSystem; usingSystem.Collections.Generic; namespaceTest { classKeyClass { publicintvalue; publicKeyClass(intvalue) { thi..
分类:Windows程序   时间:2015-12-31 07:24:06    阅读次数:252
装箱和拆箱
C的基本类型使用NSNumber装箱 NSNumber *ageNumber = [NSNumber numberWithInt:23]; NSNumber *ageNumber2 = @23; 拆箱 int age = [ageNumber intValue]; C的...
分类:其他好文   时间:2015-12-24 12:00:11    阅读次数:183
Java数据类型中String、Integer、int相互间的转换
转自:http://www.blogjava.net/ljc-java/archive/2011/02/28/345344.html1.Integer转换成int的方法Integer i =new Integer(10);int k = i.intValue();即Integer.intValue(...
分类:编程语言   时间:2015-11-30 11:34:54    阅读次数:215
c++数据类型间的转换
数据类型的转换 Int转string 1、 //char*itoa(intvalue,char*string,intradix); //原型说明: //value:欲转换的数据。 //string:目标字符串的地址。 //radix:转换后的进制数,可以是10进制、16进制等。 //返回指向string这个字符串的指针 intaa=30; charc1[8]; charc2[8]; ..
分类:编程语言   时间:2015-11-23 14:56:12    阅读次数:143
printf用法demo
1 //printf用法demo 2 3 //1.int类型 4 int intValue = 2; 5 printf("1.正常输出整型:%i\n",intValue);//输出2 6 printf("2.正方向,保留两位,(数字之前)其他位以空...
分类:其他好文   时间:2015-11-18 10:42:53    阅读次数:178
276条   上一页 1 ... 17 18 19 20 21 ... 28 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!