摘要:
DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid walls and then heated, it expands and takes the shape of a circular segment, the original rod being the chord 阅读全文
阅读排行榜
hdu 1003 Max Sum----动态规划
2012-02-04 01:02 by java环境变量, 254 阅读, 收藏,
摘要:
Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 66583Accepted Submission(s): 15239Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max 阅读全文
iphone在应用程序用调用系统功能
2011-12-19 15:47 by java环境变量, 254 阅读, 收藏,
摘要:
iPhone的单任务模式为手机节省了资源,保障了程序的安全运行,但是这一做法也遭到很多人的反对,为很多应用带来了不便。如今,openURL这个方法为解决这一问题带来了希望,虽然离多任务模式还有差距,但毕竟给了大家一个实现更强大应用的可行方法。openURL的使用方法:CODE:[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appString]];其中系统的appString有:CODE:Maphttp://maps.google.com/maps?q=ShanghaiEmailmailto://myname@go 阅读全文
Objective-C 2.0 内存管理
2012-08-13 16:55 by java环境变量, 253 阅读, 收藏,
摘要:
9.1前言 内存管理在objective-C 2.0中是非常重要的,内存管理做得好不好,最直观的就是反应在你的程序crash上面。想要你的程序健壮稳定,那么请务必搞明白内存管理。9.2 objective-C 2.0是怎样一个内存机制? 在objective-C 2.0语言中,内存管理主要是基于一个 release count的值来进行判断系统是否要回收该内存。当某对象的 retain count等于0时,系统则会回收这段内存。所以当我们想要释放掉某项目时,我们只需要使其retain count等于0即可。当我们想要hold住该段内存以便后面继续使用(具体怎么用将会在后面提到)那么你只需要保证 阅读全文
Java 数字格式化 笔记
2012-04-12 13:43 by java环境变量, 253 阅读, 收藏,
摘要:
//java数字格式化. DecimalFormat类的学习
//有两种实现数字格式化的方式. 一是直接在创建对象时传递格式. 二是利用 类中 applyPattern方法传递格式. import java.text.DecimalFormat;
public class DecimalFormatDemo { static public void SimpleFormat(String pattern, double value){ //直接设置格式. DecimalFormat myFormat = new DecimalFormat(pattern); S... 阅读全文
浙公网安备 33010602011771号