码迷,mamicode.com
首页 >  
搜索关键字:case 条件判断    ( 12472个结果
C程序设计笔记
?C程序设计笔记第一课单词:main 主函数 else 否则int 整数型 for 循环float 浮点型 while 当...的时候char 字符型 swichprintf 输出函数 case 案例scanf 输入函数 default 默认 if 如果 ...
分类:其他好文   时间:2014-06-27 16:38:12    阅读次数:263
关于erlang的向上取整和向下取整
在erlang的API中,erlang:trunc/1 是就近取整,erlang:round/1是四舍五入的,整理下:对于正数的向上和向下取整,1 %% 向上取整2 ceil(N) ->3 T = trunc(N),4 case N == T of5 true ...
分类:其他好文   时间:2014-06-26 22:57:07    阅读次数:1630
每天进步一点点之SQL 获取表中某个时间字段离当前时间最近的几条
实际中用到的SQL:select * from (select top 3 Id,case when startSignup>GETDATE() then '敬请期待' when (startSignup=getdate()) then '正在报名' when (StartDate=GETDATE(...
分类:数据库   时间:2014-06-26 22:24:35    阅读次数:293
bash 中的case语法
CASE语法格式备忘 1 case $variable-name in 2 pattern1) 3 command1 4 ... 5 .... 6 commandN 7 ;; 8 pattern2|p...
分类:其他好文   时间:2014-06-26 19:48:13    阅读次数:236
LeetCode:Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note...
分类:其他好文   时间:2014-06-26 13:55:01    阅读次数:179
Leetcode: Anagrams
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Analysis: 这个题简单的版本是判断两个单词是不是anagram,一...
分类:其他好文   时间:2014-06-26 12:47:48    阅读次数:144
【Leetcode】Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is...
分类:其他好文   时间:2014-06-25 10:30:08    阅读次数:220
Desugar Scala(15) -- unapply和unapplySeq方法
欢迎关注我的新博客地址:http://cuipengfei.me/   实在想不到什么动词可以当做脱衣服来讲了,所以从现在开始这系列博文就叫做Desugar Scala了。除非哪天才思泉涌,又想到了新词:) 开始正文。 名字叫做unapply和unapplySeq的方法在Scala里也是有特殊含义的。 我们前面说过case class在做pattern match时很...
分类:移动开发   时间:2014-06-24 19:42:48    阅读次数:265
POJ2096-Collecting Bugs(概率DP)
Collecting Bugs Time Limit: 10000MS   Memory Limit: 64000K Total Submissions: 2140   Accepted: 1023 Case Time Limit: 2000MS   Special Judge Description Ivan is fon...
分类:其他好文   时间:2014-06-24 19:14:26    阅读次数:182
Swift的流程控制和函数
流程控制(Control Flow) For循环 for循环和C语言,OC用法很相像,通常有for()和 for in两种。 遍历时可以利用下划线"_"忽略对值的访问等。 Switch switch在Swift中则显得灵活的多,不过需要注意的是,不同于C语言,Swift中的Switch不存在隐式的贯穿,每个case里的表达式后面不需要写break则...
分类:其他好文   时间:2014-06-24 18:12:12    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!