摘要:
http://codeforces.com/problemset/problem/47/A Triangular numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A trian...
阅读全文
posted @ 2013-08-13 19:46
风言枫语
阅读(349)
推荐(0)
摘要:
欢迎转载【作者:张佩】【镜像:http://www.yiiyee.cn/Blog/dll-1/】引子周末写了一个简单的程序(后文以Test.exe代指),通过Iphlpapi.dll提供的API函数GetAdaptersInfo,读取系统中的网卡信息,通过网卡名找到我想要的虚拟网卡后,将网卡信息结构体(IP_ADAPTER_INFO)保存到一个全局变量中。逻辑很简单,写完之后测试也没有发现问题。后来开启Application Verifier并运用到Test.exe,竟然每次运行都发生崩溃。仔细看去,问题出在保存结构体到全局变量的语句上。看到这个错误后,本想凭借猜测把问题解决掉,试了三五分钟后
阅读全文
posted @ 2013-08-13 19:43
风言枫语
阅读(191)
推荐(0)
摘要:
作者:刘昊昱博客:http://blog.csdn.net/liuhaoyutzFragment翻译成中文就是“碎片”、“片断”的意思,Fragment通常用来作为一个Activity用户界面的一部分。例如,可以用Fragment1在左边显示一个列表,用Fragment2在右边显示选中列表项的详细内容。两个Fragment属于同一个Activity,并且每个Fragment有它自己的生命周期,可以处理它自己的用户输入事件,另外,Fragment还可以有自己的布局文件。在平板电脑等屏幕比较大的设备上,Fragment比较常用。一、静态添加Fragment下面我们来看一个使用静态方式添加Fragm
阅读全文
posted @ 2013-08-13 19:41
风言枫语
阅读(215)
推荐(0)
摘要:
转发,请保持地址:http://blog.csdn.net/stalendp/article/details/9948545虽然CCNodeRGBA,CCLayerRGBA,sprite等提供颜色和透明度的设置,但有时候要自定义控件,要自己去实现那些功能。比如,我要扩充一个CCSpriteBatchNode,同时要要具有颜色和透明度的设置,这个时候就需要自己动手了。其实为自己的控件添加RGBA特性并不是很难,只要继承CCRGBAProtocol,然后把CCNodeRGBA的实现方案贴到新加的类中就可以了。不过这样不便于代码的重用,所以我在改造代码的过程中使用了“适配器设计模式”。 这也是这片文
阅读全文
posted @ 2013-08-13 19:38
风言枫语
阅读(596)
推荐(0)
摘要:
A windmill animation works as follows: A two-dimensional set of points, no three of which lie on a line is chosen. Then one of the points is chosen (as the first pivot) and a line is drawn through the chosen point at some initial angle. The animation proceeds by rotating the line counter-clockwise..
阅读全文
posted @ 2013-08-13 19:36
风言枫语
阅读(193)
推荐(0)
摘要:
http://www.bnuoj.com/bnuoj/problem_show.php?pid=16030 Concentric Rings There are several different concentric rings on the ground. Some of them may overlap. In Figure 1, there are 3 rings: blue, green and red. The red one is just above the green one. The problem is to remove minimum number o...
阅读全文
posted @ 2013-08-13 19:34
风言枫语
阅读(206)
推荐(0)
摘要:
前言 欢迎大家我分享和推荐好用的代码段~~ 声明 欢迎转载,但请保留文章原始出处: CSDN:http://www.csdn.net 雨季o莫忧离:http://blog.csdn.net/luckkof正文性能不好的手机上,当在横竖屏画面之间进行切换时会觉得屏幕有些卡。如果在“设置”->“开发人员选项”中关掉窗口过渡动画,就不会有卡的问题,但这样一来,所有窗口画面的动画切换效果都没有了。如果只想在横竖屏切换时关掉切换动画,应该如何实现呢?可以修改WindowManagerService.java中的boolean值:static final boolean CUSTOM_SCREE..
阅读全文
posted @ 2013-08-13 19:31
风言枫语
阅读(920)
推荐(0)
摘要:
[cpp] view plain copy//NSString操作均不改变自身值//构建字符串NSString*szTmp=@"Astring";//直接赋值szTmp=nil;intn=5;NSString*szMyString=[NSStringstringWithFormat:@"Thenumberis%d",n];//Thenumberis5[szMyStringstringByAppendingFormat:@"%d",22];//附加字符串返回值:Thenumberis522//但是szMyString本身并没有改变,其值
阅读全文
posted @ 2013-08-13 19:29
风言枫语
阅读(516)
推荐(0)