码迷,mamicode.com
首页 >  
搜索关键字:do it    ( 12356个结果
fuelSources
function countdown() { local i; sleep 1 for ((i=$1 - 1;i>=1;i--));do printf '\b\b%02d' "$i" sleep 1 done}export LANG=en_US.UTF8;if [ -f /root/.showf.....
分类:其他好文   时间:2014-07-09 21:00:48    阅读次数:197
并行编程之多线程共享非volatile变量,会不会可能导致线程while死循环
背景大家都知道线程之间共享变量要用volatilekeyword。可是,假设不用volatile来标识,会不会导致线程死循环?比方以下的伪代码:static int flag = -1;void thread1(){ while(flag > 0){ //wait or do somethi...
分类:编程语言   时间:2014-07-09 00:33:01    阅读次数:263
【leetcode刷题笔记】Set Matrix Zeroes
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.题解:因为题目要求原地算法,所以我们只能利用矩阵第一行和第一列存放置零信息。首先遍历第一行和第一列,看他们是否需要全部置零...
分类:其他好文   时间:2014-07-08 23:58:29    阅读次数:422
JAVA File类 分析(三)
前面两篇与大家一起研究了unix下的文件系统,本篇将和大家一起分析 文件的属性和文件夹。ok,废话不说,先来段代码#include #include #include void do_ls(char[]); void main(int ac,char *av[]){ if(ac==1) do_...
分类:编程语言   时间:2014-07-08 23:48:51    阅读次数:281
关于 ContentPropertyAttribute
ContentPropertyAttribute 是使用在类的声明上的特性,表示xmal标签内容对应的clr类中的属性,目前发现Control的子类下有这几种属性:1.Content。这个是最常见的啦。ContentControl、Page 2.Items。ItemsControl 3.Do...
分类:其他好文   时间:2014-07-08 23:29:52    阅读次数:224
ZOJ Problem Set - 3321 并查集
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3321CircleTime Limit:1 Second Memory Limit:32768 KBYour task is so easy. I will give...
分类:其他好文   时间:2014-07-08 23:04:16    阅读次数:264
Welcome to Swift (苹果官方Swift文档初译与注解二十六)---181~188页(第四章-- 流程控制)
Do-While while循环的另一个版本是do-while循环,它在判断条件之前,先执行一遍循环体,然后再次执行循环体,直到条件成为false. do-while循环的通过格式: do { statements } while condition 我们再用蛇和梯子...
分类:移动开发   时间:2014-07-06 18:18:24    阅读次数:252
Swift学习——使用if和switch来进行条件操作,使用for,while,和do-while来进行循环(三)
Swift学习——使用if和switch来进行条件操作,使用for,while,和do-while来进行循环 //switch支持任意类型的数据以及各种比较操作——不仅仅是整数以及测试相等 //注意如果去掉default程序会报错 let strings = "hello3" switch strings{ case "hello1": let stringsCo...
分类:其他好文   时间:2014-07-06 12:41:35    阅读次数:186
hdu-4724-How Long Do You Have to Draw-贪心
题目看起来很难,其实很简单。。。。 根据题意可知,如果想连到最多的三角形,肯定是每个点都要跟其他的点相连。 然后就贪心当前连接情况下,哪一种连接方式用掉的线段最短,然后算出总和即可。 #include #include #include #include #include #include #include #include #include using namespace std; #de...
分类:其他好文   时间:2014-07-06 00:31:22    阅读次数:202
effective c++ 条款9 do not call virtual function in constructor or deconstructor
在构造函数中不要调用virtual函数,调用了也不会有预期的效果。举个例子class Transaction{ public: Transaction() { log(); } virtual void log() =0;}class BusinessTran...
分类:编程语言   时间:2014-07-05 20:43:00    阅读次数:209
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!