该篇文章通过一个写计算器控制台程序,来导入文章主题。
首先,要注意代码规范,变量命名有意义,不能随意用A,B,C;
功能要封装好,不要写在一个主函数里,另外要考虑后期需求的更改,如果出现多个函数里面的代码大部分相同,那么我们要学会提取公共行为、属性来构造一个父类,具体的子类来继承父类。继承最...
分类:
其他好文 时间:
2014-05-16 09:12:17
阅读次数:
236
本项目基于 《使用storyboards建立 Navigation Controller and Table View》 http://uliweb.cpython.org/tutorial/view_chapter/424
创建, 代码中使用了 静态的 tableviewcell
增加了 textview,url,json数据解析
部分代码片段:
//
// city...
分类:
移动开发 时间:
2014-05-13 08:19:24
阅读次数:
423
1. 交换两个数值
x, y = y, x; //等价于 x = y, y =x;
2. 变量初始化问题
a, b, c = 0;
print(a,b,c); --> 0 nil nil
仅对第一个值复制,所以要初始化一组变量,应该提供多个初始值
a, b, c = 0, 0, 0;
print(a, b, c); --> 0 0 0
3. "尽可能...
分类:
其他好文 时间:
2014-05-10 10:17:39
阅读次数:
272
3...ABOUT THE VES4...Foreword6...Chapter
1......Introduction6......Visual Effects and Special Effects7.........Visual
Effects7.........Special Effects...
分类:
其他好文 时间:
2014-05-10 07:05:22
阅读次数:
299
Steps to Writing Well-—Reading NotesSteps to
Writing Well-—Reading NotesTable of Contents1. Chapter 1 PrewritingThis post is
used to record the learni...
分类:
其他好文 时间:
2014-05-09 03:22:50
阅读次数:
363
chapter 8 内核代码
8.1.1中断处理程序
traps.c
#define get_seg_byte(seg,addr) ({ \ //取seg中addr处1byte
register char __res; __asm__("push %%fs;mov %%ax,%%fs;movb %%fs:%2,%%al;pop %%fs" ...
分类:
系统相关 时间:
2014-05-09 01:48:26
阅读次数:
418
1、协同程序,一个具有多个协同程序的程序在任意时刻,只能运行一个协同程序,
只有正在运行的协同程序被挂起时,它的执行才会暂停。
创建
co = coroutine.create(匿名函数); -- 匿名函数就是线程要执行的东东
状态
coroutine.status(co);
唤醒
coroutine.resume(co);
挂起
coroutine.yie...
分类:
其他好文 时间:
2014-05-08 00:21:05
阅读次数:
367
【题目】
Chapter 1 | Arrays and Strings
原文:
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
译文:
实现一个算法来判断一个字符串中的字符...
分类:
其他好文 时间:
2014-05-07 04:27:41
阅读次数:
312
CareerCup
目录
Chapter 1 | Arrays and Strings
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
1.2 Write co...
分类:
其他好文 时间:
2014-05-07 04:25:44
阅读次数:
320