码迷,mamicode.com
首页 >  
搜索关键字:do it    ( 12356个结果
Lua学习笔记6:时间和日期
lua中的时间类似于C语言中的时间,如下:local time = os.time() print(time) local t = os.date("*t") for k,v in pairs(t) do print(k,v) end 这样就可以分别输出年、月、日、时、分、秒,输出如下: 1407406553 hour 18 min 15 wday 5 day 7 mo...
分类:其他好文   时间:2014-08-07 18:56:20    阅读次数:310
jquery iframe父子框架中的元素访问方法
jquery教程 在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素、或者在iframe框架中使用父窗口的元素 js 在父窗口中获取iframe中的元素 1、 格式:window.frames["iframe的name值"].do...
分类:Web程序   时间:2014-08-07 13:34:20    阅读次数:179
C语言-define 与do{}while(0)
问题引出:我们都知道宏定义#define只是简单替换,所以遇到复杂的带参数宏,必须很小心的为需要的参数加上括号“()”;同样碰到复杂的多条语句替代,虽然加{}可以将其封装成一个整体,但同时又有另一个问题:与语法习惯的冲突。比如:#include void print_1(void){printf("...
分类:编程语言   时间:2014-08-07 12:52:09    阅读次数:223
34.设s=1+1/2+1/3+…+1/n,求与8最接近的s的值及与之对应的n值
#includeusing namespace std;int main(){ int n=1; double s=0; do//先执行一次循环体 { s=s+(1.0/n); n++; }while(s<8.0); cout <<"s...
分类:其他好文   时间:2014-08-07 12:47:09    阅读次数:716
zoj 3772 Calculate the Function
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5235这道题需要构造矩阵:F(X)=F(X-1)+F(X-2)*A(X)转化为F(X)*A(X+2)+F(X+1)=F(X+2),然后在构造矩阵{1, A[x]} {F(x+1)}...
分类:其他好文   时间:2014-08-07 12:44:10    阅读次数:229
String to Integer (atoi) leetcode java
题目: Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see be....
分类:编程语言   时间:2014-08-07 12:08:49    阅读次数:260
Android学习路线(十)如何将Action Bar叠放在你的布局上
By default, the action bar appears at the top of your activity window, slightly reducing the amount of space available for the rest of your activity's layout. If, during the course of user interaction, you want to hide and show the action bar, you can do s...
分类:移动开发   时间:2014-08-07 03:07:19    阅读次数:344
Turn the pokers
Problem DescriptionDuring summer vacation,Alice stay at home for a long time, with nothing to do. She went out and bought m pokers, tending to play po...
分类:其他好文   时间:2014-08-06 22:52:52    阅读次数:326
ZOJ 3524 Crazy Shopping DAG上的完全背包
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4439题意:n个点的有向无环图,边有长度,从一个点到另一点消耗背包重量与边长的乘积。每个点卖物品,价值v,重量w,数量无限,给定起点,和背包容量,可以在任意点停止,问最大化所获得价...
分类:其他好文   时间:2014-08-06 22:31:32    阅读次数:290
zoj 3471 状压DP
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4257 难度远不及我之前发的... 但是我第一次的思路竟然错了,因为dp方程想设计成二维,但是弄错,也没发现原因,,, 改为一维:dp[s]:状态为s的时候,得到的最大能量,其中s第i位为1表示,i已经被撞毁 #include #include #include ...
分类:其他好文   时间:2014-08-06 19:02:42    阅读次数:250
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!