代码改变世界

像程序员一样思考--笔记(1)

2013-11-06 17:06 by zoo-code, 243 阅读, 0 推荐, 收藏, 编辑
摘要:今天瞎看的时候看到一本《像程序员一样思考》,挺不错的,适合菜鸟看看。第一章讲了几个小智力题,第一个是如何过河,就是一个农夫带了一个狐狸,一只鹅和一包玉米,如果农夫不在的话狐狸吃鹅,鹅吃玉米但是只有一只船,一次只能带两个单位的东西,要如何过河。原来参加的一次笔试里有这个类似的问题,换成了狼,菜,兔子。那时候不懂这个题目的意思,我答的是利用水的浮力把菜放到篮子里过去。哈哈,我觉得这个可以把鹅用绳子拉着让它游过去。不过答案不是这样的...那时候我同学告诉我这是要利用互斥的方法,还要往回运东西,我瞬间就凌乱了...呵呵呵,这不是give me shit么...1.农夫带着鹅到对岸,留下狐狸和玉米,回来 阅读全文

如何将两个列表变成一个python字典

2013-11-06 16:37 by zoo-code, 1382 阅读, 0 推荐, 收藏, 编辑
摘要:一个列表是index = [0, 1, 2, 3, 4, 5, 6]另一个是day = ['1', '2', '3', '4', '5', '6', '7']可以使用dict(zip(index, day))变成一个字典 阅读全文

SBM is Not Sale And Run Company

2013-11-06 14:05 by zoo-code, 178 阅读, 0 推荐, 收藏, 编辑
摘要:data = """Well,We will bet you dollars to donuts,there are so many crusher provider which are sale-and-run type company that make you a long- tailed cat in a room full of rocking chairs to choice the best equimpments for quarry or mining.Wait,what is the sale-and-run type company?Typi 阅读全文

了解Unix进程(2)

2013-11-06 10:28 by zoo-code, 185 阅读, 0 推荐, 收藏, 编辑
摘要:1. 每个进程都有一个名字,crusher 可以得到:# process nameputs $PROGRAM_NAME10.downto(1) do | num | $PROGRAM_NAME = "Process: #{num}" puts $PROGRAM_NAMEend2.进程的环境变量:# 进程的环境变量puts ENV['EDITOR'] # 非vim没有输出,我用的sublimeputs ENV.has_key?('PATH')puts ENV.is_a?(Hash)gets3.进程的命令行参数:p ARGV # 打印命令行参数  阅读全文

了解Unix进程(1)

2013-11-05 17:07 by zoo-code, 249 阅读, 0 推荐, 收藏, 编辑
摘要:今天瞎看 看到一本了解Unix进程 -- 理解UNIX进程的书 不错,可以看看,使用的ruby语言,第一章讲的是一些基础的知识1.输出进程号和父进程号:puts Process.pid # 得到进程号puts $$ # 同样得到进程号的方法puts Process.ppid # 得到父进程号2.在unix中一切都是文件,所以文件也是一种资源,有一个编号:0-2代表的是标准输入,标准输出,标准错误.puts STDIN.filenoputs STDOUT.filenoputs STDERR.fileno3.所以,一个自己打开的文件,一般只能用3以上的数字了,如果关闭掉... 阅读全文

Like ruby of SBM Crusher zip to dict

2013-11-03 16:39 by zoo-code, 249 阅读, 0 推荐, 收藏, 编辑
摘要:how to use the zip to bulid a dict in python?data = """A dynamic, interpreted, open source programming language with a focus on simplicity and productivity. Site includes news, downloads, documentation, librariesSBM CrusherAs we talk about the diamonds, we may picture the refraction o 阅读全文

Py Split and Count For "PFW Impact Crusher For Sale South Africa"

2013-10-18 11:59 by zoo-code, 269 阅读, 0 推荐, 收藏, 编辑
摘要:data = 'As we all know, the impact Crusher is fully used in the transportation, energy, construction and chemical industry. It is the ideal choice crusher for screening and crushing. Besides, it fits for features reasonable structure, high productivity, easy operation and maintenance and safe pe 阅读全文

Lambda Grinding Miller From Zenith

2013-10-16 09:30 by zoo-code, 215 阅读, 0 推荐, 收藏, 编辑
摘要:data = """The Basic Things About Grinding MillAgrinding millis a unit operation designed to break a solid material into smaller pieces. There are many different types of grinding mills and many types of materials processed in them. Historically mills were powered by hand (mortar and p 阅读全文

得到一个数的立方

2013-10-14 11:40 by zoo-code, 164 阅读, 0 推荐, 收藏, 编辑
摘要:;; The first three lines of this file were inserted by DrRacket. They record metadata;; about the language level of this file in a form that our tools can easily process.#reader(lib "htdp-advanced-reader.ss" "lang")((modname e18) (read-case-sensitive #t) (teachpacks ()) (htdp-set 阅读全文

Crusher Django Tutorial(7) About HTTP In Django

2013-10-11 11:51 by zoo-code, 122 阅读, 0 推荐, 收藏, 编辑
摘要:http://crusher-milling.blogspot.com/2013/10/hljs.html 阅读全文