码迷,mamicode.com
首页 >  
搜索关键字:chapter    ( 1815个结果
Lua chapter 4
1. 函数可以返回多个值 return a, b, c; 但是如果函数不是作为表达式的最后一个元素的话,仅返回第一个 如: function f2() return "a", "b" end; x, y = f2()     -> x = "a", y = "b"; x, y = f2(), 1  -> x = "a", y = nil; 2. 可以将一个函数调用放入一对圆括...
分类:其他好文   时间:2014-05-10 09:21:56    阅读次数:317
Lua chapter 5
1、函数是一种 “第一类值” a = {p = print}; a.p("hello"); a = print; a("Hi"); 2、 table 提供的函数 table.sort  network = { {name = "lua", IP = "192.168.1.1"}, {name = "CPP", IP = "192.168.1.2"} }; f...
分类:其他好文   时间:2014-05-10 09:21:02    阅读次数:273
Lua chapter 6
一个简单的迭代器示例 --迭代工厂函数 function value(t)     local i = 0;     return            function()                i = i+1;                return t[i];           end; end; t = {10,20,30}; iter = va...
分类:其他好文   时间:2014-05-10 08:36:53    阅读次数:268
【Python Network】使用DOM生成XML
单纯的为DOM树添加结点。 1 #!/usr/bin/env python 2 # Generating XML with DOM - Chapter 8 - domgensample.py 3 4 from xml.dom import minidom, Node 5 6 doc = mini.....
分类:编程语言   时间:2014-05-09 17:46:01    阅读次数:468
Lua chapter 2
1、算术运算符: "^"表示指数,"%"求模 如: print(9^0.5);        --> 表示9的平方根 x = 3.14567; print(x%1);     --> 获取小数部分 print(x - x%1);      --> 获取整数部分 print(x - x%0.01);   --> 获取精确到小数点后两位的结果,没有做四舍五入处理 2.、关系运算符,对...
分类:其他好文   时间:2014-05-04 18:59:25    阅读次数:325
《modern operating system》 chapter 3 MEMORY MANAGEMENT 笔记
Over the years, people discovered the concept of a memory hierarchy,...
分类:其他好文   时间:2014-05-04 09:03:17    阅读次数:247
Let us learn C in Code <11> flowchart while
So many days passed since the last C tutorial about the flowchart, this chapter we will go on  the flowchart and while loops...
分类:其他好文   时间:2014-05-04 09:01:20    阅读次数:307
《Compilers Principles,Techniques,&Tools》Chapter 1---->Introduction
入门 编程语言是一些符号,用来为人和机器描述计算或者计算指令,我们所熟悉的计算机世界,他完全依赖于编程语言,因为所有的运行在计算机中的软件都是由某些编程语言开发的,但是,一个程序可以运行之前,它必须要翻译成某种形式,使得计算机能够执行它。 The software systems that do this translated are called compilers(由称作编译器的软件系统来...
分类:其他好文   时间:2014-05-04 08:52:08    阅读次数:380
chapter 5 简单语句
5.1 简单语句表达式语句:表达式+分号;执行表达式并且丢弃求值结果。空语句:当循环的全部工作在条件部分就可以完成的时候会用到。复合语句:花括号括起来的语句和声明即块。语句作用域:
分类:其他好文   时间:2014-05-01 05:53:57    阅读次数:317
Lua chapter 1
1. 调用其他的.lua文件   dofile("xx.lua");   2. 避免用 "_VERSION"这类的标识符,Lua将这类标识符用作特殊用途,通常保留"_"作为”哑变量“ 3. Lua的一些保留字:    do in local nil until 等     4. 注释:-- 表示行注释   --[[ ... ]] 表示块注释 一般的块注释这样写: --[[ ...
分类:其他好文   时间:2014-04-30 22:34:38    阅读次数:270
1815条   上一页 1 ... 179 180 181 182 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!