01 2012 档案

摘要:成为C++高手必须要看的书 C++/OPP/OOD系列: 层级一:语法/语意(C++) [Lippman2000] Essential C++ Essential C++,by Stanley B. Lippman Addison Wesley Longman 2000,276 pages Essential C++ 中文版 ,侯俊杰 译,282页 [Gregory95] C++:The Core Language成为C++高手必须要看的书------------------------------------------------------------------------------ 阅读全文
posted @ 2012-01-31 19:48 SophiaTang
摘要:Python中函数的参数定义和可变参数刚学用Python的时候,特别是看一些库的源码时,经常会看到func(*args, **kwargs)这样的函数定义,这个*和**让人有点费解。其实只要把函数参数定义搞清楚了,就不难理解了。先说说函数定义,我们都知道,下面的代码定义了一个函数funcAdef funcA(): pass 显然,函数funcA没有参数(同时啥也不干:D)。下面这个函数funcB就有两个参数了,def funcB(a, b): print a print b调用的时候,我们需要使用函数名,加上圆括号扩起来的参数列表,比如 funcB(100, 99),执行结果是:10099很明 阅读全文
posted @ 2012-01-30 19:53 SophiaTang
摘要:http://wiki.nginx.org/HttpCoreModule#client_max_body_size 阅读全文
posted @ 2012-01-28 17:35 SophiaTang
摘要:[Errno 12] Timeout: <urlopen error timed out>[Log in to get rid of this advertisement]Hi! To All GURUS,I already do (yum clean all) and even copied files from other server to my /var/cache/yum/* and still error in finding mirror site. I dont see any problem on my internet access since opening 阅读全文
posted @ 2012-01-28 17:34 SophiaTang
摘要:Nginx default maximum accepted body size of client request, or maximum file size that you can upload to the server which have Nginx is 1M. And when i try to upload more than 1M i got Nginx error 403: Request entity too large. This happen because Nginx refuse it. And please keep in mind that the brow 阅读全文
posted @ 2012-01-28 17:07 SophiaTang
摘要:Nginx Pitfalls If you're new or old to Nginx you will likely wind up in a pitfall situation. Below we outline these pitfalls and how to best avoid them. These are issues seen time and time again in the #nginx channel on Freenode. Please, just don't do this.This Guide Says Don't follow th 阅读全文
posted @ 2012-01-28 16:02 SophiaTang 阅读(389) 评论(0) 推荐(0)
摘要:GCC使用在使用GCC编译程序时,编译过程可以被细分为四个阶段:预处理(Pre-Processing) 编译(Compiling)汇编(Assembling) 链接(Linking)。例如: #include <stdio.h>int main(void){ printf ("Hello world, Linux programming!\n"); return 0;} 然后执行下面的命令编译和运行这段程序:# gcc hello.c -o hello# ./helloHello world, Linux programming! GCC需要调用预处理程序cpp 阅读全文
posted @ 2012-01-28 15:47 SophiaTang 阅读(265) 评论(0) 推荐(0)
摘要:Here is a excellent tutorial show you how to Solve nginx Error 413 Request Entity Too Large:Changing your php.ini-settings alone won’t do much. So to fix this problem, follow these steps.Open up your nginx.conf-file, with an editor of your choice:vim /etc/nginx/nginx.conf..and add client_max_body_si 阅读全文
posted @ 2012-01-28 15:42 SophiaTang 阅读(152) 评论(0) 推荐(0)
摘要:进程和线程的区别 进程是资源管理的最小单位,线程是程序执行的最小单位。在操作系统设计上,从进程演化出线程,最主要的目的就是更好的支持SMP(双CPU系统,实际上是对称多处理机系统中最常见的一种)以及减小(进程/线程)上下文切换开销。 1.进程是程序的一次执行。 线程可以理解为程序中的执行的一段程序片段。2.进程间是独立的,这表现在内存空间、上下文环境上; 线程运行在进程空间内。3.一般来讲,进程无法突破进程边界存取其他进程内的存储空间;而线程由于处于进程空间内,所以同一个进程所产生的线程共享同一内存空间。同一进程中的两段代码不能够同时执行,除... 阅读全文
posted @ 2012-01-28 15:42 SophiaTang
摘要:import os删除文件:os.remove()删除空目录:os.rmdir()递归删除空目录:os.removedirs()递归删除目录和文件(类似DOS命令DeleteTree):方法1:自力更生,艰苦创业# Delete everything reachable from the directory named in 'top',# assuming there are no symbolic links.# CAUTION: This is dangerous! For example, if top == '/', it# could delete 阅读全文
posted @ 2012-01-16 12:20 SophiaTang 阅读(51867) 评论(0) 推荐(1)
摘要:[root@test mysql]# vi /etc/rc.d/rc.local# 将底下这一行加入这个档案的最后面一行喔!cd /usr/local/mysql; /usr/local/mysql/bin/safe_mysqld --user=mysql & 阅读全文
posted @ 2012-01-02 00:17 SophiaTang 阅读(159) 评论(0) 推荐(0)
摘要:http://nginx.org/packages/rhel/5/x86_64/RPMS/ 阅读全文
posted @ 2012-01-01 17:21 SophiaTang 阅读(125) 评论(0) 推荐(0)