代码改变世界

Raymond Mill In Lisp

2013-11-14 10:23 by zoo-code, 207 阅读, 0 推荐, 收藏, 编辑
摘要:Raymond Mill is suitable for producing minerals powder, which is widely used in the metallurgy, building materials, chemical, and mining industry. It can be used for grinding barite, calcite, potash feldspar, talc, marble, ceramic, glass and some other material that Moh hardness degree is below 7, h 阅读全文

Python 的execfile用法

2013-11-13 13:13 by zoo-code, 2723 阅读, 0 推荐, 收藏, 编辑
摘要:可以直接执行脚本 而import是将脚本导入另一个文件里,可以看http://docs.python.org/2/library/functions.html例如一个Python文件 a.py:def hello(a): print ahello(test)在Python命令行使用:execfile("a.py", {"test": "hello world"})就能够执行函数了 看来execfile这个函数很方便测试使用。 阅读全文

linux 编程笔记 2

2013-11-13 11:19 by zoo-code, 213 阅读, 0 推荐, 收藏, 编辑
摘要:1.使用create建立文件:#include #include #include #include int main() { int res = creat("./file.txt", 0700); if (res == -1) { perror("Create File Error!"); } else { printf("Create OK!\n"); } return 0;}2.从输入到输出:// 从stdin到sdtout#include #include int main (int argc, char *argv[]). 阅读全文

linux 编程笔记1 crusher for linux

2013-11-12 12:35 by zoo-code, 189 阅读, 0 推荐, 收藏, 编辑
摘要:1.反显示字符crusher#include int main (int argc, char *argv[]){ printf("\033[7m more?\033[m \n"); return 0;} 2.应用反显字符显示当前时间:#include #include #include int main() { unsigned int now_secs = time(0); char *strp = ctime(&now_secs); printf("Now time is \033[7m %s \033[m", strp); return 阅读全文

how to keep impact-crusher in good condition

2013-11-11 10:05 by zoo-code, 252 阅读, 0 推荐, 收藏, 编辑
摘要:how to keep impact-crusher in good conditionWhy we have to maintenance impact crusher?As we talked before(link),how does the impact crusher work.From that post,we realize that the impact crusher play a very important role in our quarry project or the mining field.Well, everything is a two-edged swor 阅读全文

如何一步一步抄出来一个网站的界面

2013-11-09 09:34 by zoo-code, 1737 阅读, 0 推荐, 收藏, 编辑
摘要:对于新手来说,可以先找一本html的书看看,把基本的东西弄得差不多了,比如能写一个列表导航条,大概了解了浮动就差不多了。然后找一个网页的截图,在ps里一点一点扣出来图片,把截图做成网页,尽量做到和图片一样的效果。推荐使用chrome浏览器,按下F12进行调试。下一步,到http://themeforest.net/里找一个不太困难的网站demo,然后先用F12了解它的页面布局,大致有个基本概念,然后看资源选项这里有很多不会的js,其实很多都是别人写好的插件,使用Google找到它,学会配置它,然后一些简单的效果就可以实现了。还有css,里面可能用到了别人的框架,比如bootstrap,Foun 阅读全文

Vertical roller mill from SBM

2013-11-08 09:49 by zoo-code, 324 阅读, 0 推荐, 收藏, 编辑
摘要:Vertical roller mill has many different forms, but it works basically the same. All of these forms of machine comes with roller (orthe equivalent of roller grinding parts), and roller along the track of the disc at the level of circular movement imposed byexternal grinding roller in the vertical pre 阅读全文

了解Unix进程(3)

2013-11-07 13:22 by zoo-code, 226 阅读, 0 推荐, 收藏, 编辑
摘要:fork() 系统调用可以创建新的进程。然后查看进程ID和父进程ID使用getpid()和getppid()函数.使用C语言描述:#include #include int main (int argc, char *argv[]){ pid_t child = -1; if ((child = fork()) == 0) { fprintf(stderr, "1: child pid is %u\n", getpid()); fprintf(stderr, "2: his parent is %u\n", getppid()); } el... 阅读全文

如何判断一个数组是否按顺序排好了

2013-11-07 11:29 by zoo-code, 1168 阅读, 0 推荐, 收藏, 编辑
摘要:遍历一次,测试数组是否排好了:// 只是迭代一次,判断一个数组是否按照小到大排序#include using namespace std;bool issort(int array[], int length) { int i; // 从后向前比较,如果发现后一个较小返回false for (i = length - 1; i > 0; i -= 1) { if (array[i] < array[i - 1]) { return false; } } // 没有发现返回true return true;}i... 阅读全文

#define 只是字符替换

2013-11-07 11:23 by zoo-code, 918 阅读, 0 推荐, 收藏, 编辑
摘要:可以使用#define MAX 100int main (int argc, char *argv[]){ printf("MAX is %d\n", MAX); return 0;}gcc -E filename.c -o output.c来看看output.c:# 1 "./def.c"# 1 ""# 1 ""# 1 "./def.c"intmain (int argc, char *argv[]){ printf("MAX is %d\n", 100); return 阅读全文