码迷,mamicode.com
首页 >  
搜索关键字:case when then else end    ( 68558个结果
Lua程序设计(第二版)学习笔记(一)
前段时间认真的看了一下《lua程序设计(第二版)》这本书,每一章写一个lua脚本,诸多注释,相信给初学者有一定帮助。 -- 第一章代码print("hello Hello");-- 全局函数function face(n) if n == 0 then return 1 else return n ...
分类:其他好文   时间:2014-05-06 00:57:20    阅读次数:339
ubuntu software management
software directory: The default directory of software installed on ubuntu is /usr, so just allocate more space for this partition when installing oper...
分类:其他好文   时间:2014-05-06 00:02:59    阅读次数:281
二分排序之三行代码
#include #include int a[]={10,22,42,51,56,63,78,99,102,118}; int binSearch(int* a, int begin, int end, int k){ int mid = begin + ( (end - be...
分类:其他好文   时间:2014-05-05 23:31:39    阅读次数:257
A × B problem
A × B problem Time Limit: 1000 ms   Case Time Limit: 1000 ms   Memory Limit: 64 MB Total Submission: 594   Submission Accepted: 112 Description 给你两个整数,请你计算A × B。 Input 数据的第一行是整数T(1 ≤ T ≤ 20...
分类:其他好文   时间:2014-05-05 13:05:38    阅读次数:301
机房收费系统——UML用例图
用例图(Use Case Diagram)是由软件需求分析到最终实现的第一步,说明的是谁要使用系统,以及他们使用该系统可以做些什么,是九种图里面最为基础且非常重要的一张图。     用例图包括3方面内容:       1.参与者(Actor);       2.用例(Use Case);       3.参与者、用例之间的关系:关联关系、泛化关系、包含关系、扩展关系等; 参与者(Ac...
分类:其他好文   时间:2014-05-05 12:55:03    阅读次数:326
ZOJ 3612 Median (multiset)
Factorial Problem in Base K Time Limit: 2 Seconds      Memory Limit: 65536 KB How many zeros are there in the end of s! if both s and s! are written in base k which is not necessarily to be 10...
分类:其他好文   时间:2014-05-02 20:11:29    阅读次数:376
如何在 javascript / js 中 建立一个map
建立map的方式(其实用的是json实现方式) var a = {}; a["key1"] = "value1"; a["key2"] = "value2"; 既然是个map就有检索某个键是否存在的方法,这样写 if ("key1" in a) { // something } else { // something else } 简单的一句话声明map里面的key和valu...
分类:编程语言   时间:2014-05-02 19:21:46    阅读次数:332
Lua--for循环控制结构
“参考Lua游戏开发实践指南” Lua提供两种控制结构(数字型和通用型)--Lua中的for语句的索引是从1开始的 数字型: 一个简单的示例如下1 for indx = 1, 10 do2 print(indx)3 end do关键字标记程序块的开始,end标记程序块的结束。 ...
分类:其他好文   时间:2014-05-02 17:26:51    阅读次数:702
选择语句
在学习的java当中有3种选择语句,分别是if语句 if/else语句和swich语句三种。if语句由一个后跟一到多个语句的布尔表达组成 语法表达为if(布尔表达式){如果布尔表达式为true,就执行 比如int a=10;if的表达式可以是true 和false if(a>10&&a0){ Sy....
分类:其他好文   时间:2014-05-02 14:24:59    阅读次数:267
UVA 之401 - Palindromes
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from lef...
分类:其他好文   时间:2014-05-02 10:33:09    阅读次数:332
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!