#!/bin/bash #判断命令行是否代带有两个文件名的参数 if [ "$1" = "" ] || [ "$2" = "" ] then echo "Please enter file name" exit 1 fi #判断目标文件是否存在 if [ -e $2 ] then echo "...
分类:
其他好文 时间:
2014-07-16 22:59:29
阅读次数:
153
# -*- coding: utf-8 -*-try: import httplib2except ImportError: print('错误:') print(' httplib2这个库没有找到,程序无法继续运行!') exit(255) def network_get_proc(se...
分类:
编程语言 时间:
2014-07-16 19:34:14
阅读次数:
267
在Linux下创建线程时,编译时会出现下面的错误,[root@linuxserver 807]# gcc -o 22 22.c/tmp/cc21HcoW.o(.text+0x4c): In function `main':: undefined reference to `pthread_creat...
分类:
其他好文 时间:
2014-07-14 08:44:11
阅读次数:
290
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);//初始化脚本,专门负责环境的侦测与配置//0:先探测自身所在的位置/*在win下,路径D:\www\info没有问题D:/www/info没有问题在linux路径/var/www/info,正斜线因此:统一转成正斜线,用linux的格式*///检测根目录,并定义成常量define(‘..
分类:
Web程序 时间:
2014-07-13 15:03:19
阅读次数:
267
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);classModel{protected$db=null;publicfunction__construct(){try{$this->db=mysql::getIns();}catch(Exception$e){//$e就是前文中throw出来的$error(Exception的实例)//$e对象有一些方法和属性,能准确判断出问题的行.$err=‘‘;..
分类:
Web程序 时间:
2014-07-13 14:48:25
阅读次数:
193
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);//配置文件读取类classconf{protectedstatic$ins=null;protected$cfg=array(‘db‘=>‘java0620‘);publicstaticfunctiongetIns(){if(self::$ins===null){self::$ins=newself();}returnself::$ins;}finalprotectedfunction__const..
分类:
Web程序 时间:
2014-07-13 14:33:03
阅读次数:
216
1.this.Close(); 只是关闭当前窗口,若不是主窗体的话,是无法退出程序的,另外若有托管线程(非主线程),也无法干净地退出;2.Application.Exit(); 强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出;3.Application.ExitTh...
分类:
其他好文 时间:
2014-07-11 09:34:34
阅读次数:
170
1、进程创建:fork函数族
fork()和vfork()函数的区别:
(1) fork ( ):子进程拷贝父进程的数据段,代码段
vfork( ):子进程与父进程共享数据段
(2) fork( )父子进程的执行次序不确定
vfork 保证子进程先运行,在调用exec 或exit 之前与父进程数据是共享的,在它调用...
分类:
其他好文 时间:
2014-07-10 20:04:04
阅读次数:
178
错误例子:error: command 'cc' failed with exit status 1clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard err...
分类:
其他好文 时间:
2014-07-10 19:30:11
阅读次数:
3913
#!/bin/basha=$1 #将第一个命令行参数传递给变量a,第二个命令行参数传递给bb=$2if [-z $a] || [-z $b] #判断a 和 b 是否为空,只要有一个为空就打印提示语句并退出。then echo "please enter 2 no" exit 1fiif [$a .....
分类:
其他好文 时间:
2014-07-10 15:20:36
阅读次数:
203