码迷,mamicode.com
首页 >  
搜索关键字:do while循环    ( 14864个结果
08-流程控制
本文目录流程控制选择结构-if选择结构-switch循环结构-while循环结构-do while循环结构-forbreak 和 continue回到顶部一、流程控制1> 顺序结构:默认的流程结构。按照书写顺序执行每一条语句。2> 选择结构:对给定的条件进行判断,再根据判断结果来决定执行哪一段代码。...
分类:其他好文   时间:2014-07-03 22:21:27    阅读次数:348
转载——怎样一行一行读文件
原文地址:用bash脚本读文件的方法有很多。请看第一部分,我使用了while循环及其后的管道命令(|)(cat $FILE | while read line; do …),并在循环当中递增 i 的值,最后,我得到了非我所想的 i 。主要的原因是,管道命令会发起子shell来读取文件,而任何在(子s...
分类:其他好文   时间:2014-07-03 21:57:53    阅读次数:289
How to put username &password in MongoDB(Security&Authentication)?(配置用户认证在MongoDB)
Default do not need username and password authenticate when access mongoDB ,I want to set up the user name & password for my mongoDB. so that any remo...
分类:数据库   时间:2014-07-03 21:02:37    阅读次数:343
leetcode 题解:Remove Duplicates from Sorted Array(已排序数组去重)
题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo...
分类:其他好文   时间:2014-07-03 20:58:08    阅读次数:248
Leetcode Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.class Solution...
分类:其他好文   时间:2014-07-03 20:25:21    阅读次数:219
Leetcode Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.此题目有两种解决思路:1)递归...
分类:其他好文   时间:2014-07-03 20:07:01    阅读次数:199
循环结构的总结
一:循环结构的四个要素:1.初始变量2.迭代变量3.循环条件4.循环操作(循环体)循环条件是一个表达式,它的值为boolean类型,要么true要么false.二:循环结构的基本语法:1.while循环结构while(循环条件){//循环操作(循环体)}特点:先判断循环条件是否满足,再执行循环操作!...
分类:其他好文   时间:2014-07-03 19:25:21    阅读次数:205
java提高篇(三十)-----Iterator
迭代对于我们搞Java的来说绝对不陌生。我们常常使用JDK提供的迭代接口进行Java集合的迭代。 Iterator iterator = list.iterator(); while(iterator.hasNext()){ String string = iterator.next(); //do...
分类:编程语言   时间:2014-07-03 19:06:49    阅读次数:191
NSAssert,NSCassert
在苹果的SDK中可以看到这两个都是定义的宏 NSAssert 的定义如下: #define NSAssert(condition, desc, ...)  do {                __PRAGM...
分类:其他好文   时间:2014-07-03 16:08:07    阅读次数:206
vi tips -- how to copy to / paste from system clipboard
refer linkThe"*and"+registers are for the system's clipboard (:help registers). Depending on your system, they may do different things. For instance, ...
分类:其他好文   时间:2014-07-03 12:10:56    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!