码迷,mamicode.com
首页 >  
搜索关键字:shell ps1 awk sed while    ( 67594个结果
带缓冲的IO和不带缓冲的IO
文件描述符:文件描述符是一个小的非负整数,是内核用来标识特定进程正在访问的文件标准输入/输出/出错:shell为每个程序打开了三个文件描述符,STDIN_FILEON,STDOUT_FILEON,STDERR_FILEON,默认这三个文件描述符都链向终端不带缓冲的IO:函数open read wri...
分类:其他好文   时间:2014-05-07 17:13:03    阅读次数:284
快速排序
void quickSort2(int a[], int l, int r) { if (l < r) { int i = l, j = r; int x = a[l]; while (i < j) { while (i = x) { j--; } if (i < j) { a[i++] = a[j]; } whi...
分类:其他好文   时间:2014-05-07 12:03:15    阅读次数:269
Linux ls 命令实现(简化版)
在学习linux系统编程的时候,实现了ls命令的简化版本。 实现的功能如下: 1. 每种文件类型有自己的颜色 (- 普通文件, d 目录文件, l 链接文件, c 字符设备文件, b 快设备文件, p 管道文件, s socket文件。共7种) 2. 支持的参数有 -hali (a: 显示隐藏文件, i: 显示inode节点号,l: 以列表形式显示文件的详细信息,h: 人类可读的文件大小显示...
分类:系统相关   时间:2014-05-07 11:32:19    阅读次数:592
python连接mysql
(1)pyhton shell下导入MySQLdb失败。http://pypi.python.org/pypi/MySQL-python/(2)下载解压MySQL-python。http://pypi.python.org/packages/source/M/MySQL-python/MySQL-p...
分类:数据库   时间:2014-05-07 01:38:05    阅读次数:502
文件访问被拒绝 需要管理员权限
新建一个文本文档,打开,输入以下字符Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\runas]@="管理员取得所有权""NoWorkingDirectory"=""[HKEY_CLASSES_ROOT\*\shell\r...
分类:其他好文   时间:2014-05-07 01:30:55    阅读次数:312
括号匹配(栈的应用)
#include #include #include using namespace std;int main(){ int n;cin>>n; while(n--){ stack s; string str;cin>>str; for(int ...
分类:其他好文   时间:2014-05-07 00:19:41    阅读次数:356
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the
Sys.Application.add_load(function() { var form = Sys.WebForms.PageRequestManager.getInstance()._form; form._initialAction = form.action = window.location.href; }); if (!documen...
分类:Web程序   时间:2014-05-06 23:36:38    阅读次数:408
算法竞赛_入门经典_刘汝佳__(2)
1,有几位数字 #include int main_2_1_digit(){ int n; while(scanf("%d",&n)){ int count = 0; if(n==0) count = 1; while(n){ count++; n/=10; } printf("%d\n",count); } return 0; } ...
分类:其他好文   时间:2014-05-06 21:20:19    阅读次数:374
shell 中 关于 $
$[]将数值赋予给变量:var=$[1+5],var=$[$a+$b]$()$1$0获取参数$#获取参数个数echothelastparameteris${$#}错误,大括号里面不能使用美元符号可以用${!#}
分类:其他好文   时间:2014-05-06 19:59:02    阅读次数:259
emacs run multiple eshell buffers (more then one eshell)
(defun buffer-exists (bufname) (not (eq nil (get-buffer bufname)))) (defun make-shell (name) "Create a shell buffer named NAME." (interactive "sName: ") (if (buffer-exists "*eshell*")...
分类:其他好文   时间:2014-05-06 19:40:04    阅读次数:262
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!