
linux
xianpeng2020
这个作者很懒,什么都没留下…
展开
-
ldconfig
$ cat /etc/ld.so.conf.d/libc.conf # libc default configuration /usr/local/lib And the so file is there in the cache too. $ ldconfig -p | grep opencv | grep ml libopencv_ml.so.2.4 (libc6,x转载 2014-02-27 16:29:45 · 531 阅读 · 0 评论 -
select poll epoll
首先我们来定义流的概念,一个流可以是文件,socket,pipe等等可以进行I/O操作的内核对象。 不管是文件,还是套接字,还是管道,我们都可以把他们看作流。 之后我们来讨论I/O的操作,通过read,我们可以从流中读入数据;通过write,我们可以往流写入数据。现在假定一个情形,我们需要从流中读数据,但是流中还没有数据,(典型的例子为,客户端要从socket读如数据,但是服务器还没有把数据传转载 2014-03-19 11:29:01 · 521 阅读 · 0 评论 -
socket SO_REUSEADDR
SO_REUSEADDR可以用在以下四种情况下。 (摘自《Unix网络编程》卷一,即UNPv1) 1、当有一个有相同本地地址和端口的socket1处于TIME_WAIT状态时,而你启 动的程序的socket2要占用该地址和端口,你的程序就要用到该选项。 2、SO_REUSEADDR允许同一port上启动同一服务器的多个实例(多个进程)。但 每个实例绑定的IP地址是转载 2014-03-29 20:46:18 · 663 阅读 · 0 评论 -
semaphore mutex
Prior to that date, none of the interrupt-safe task synchronization and signaling mechanisms known to computer scientists was efficiently scalable for use by more than two tasks. Dijkstra's revoluti转载 2014-03-12 13:11:42 · 701 阅读 · 0 评论 -
python thread
http://www.cnblogs.com/huxi/archive/2010/06/26/1765808.html 1. 线程基础 1.1. 线程状态 线程有5种状态,状态转换的过程如下图所示: 1.2. 线程同步(锁) 多线程的优势在于可以同时运行多个任务(至少感觉起来是这样)。但是当线程需要共享数据时,可能存在数据不同步的问题。考虑这样一种情况转载 2014-03-12 14:25:29 · 743 阅读 · 0 评论 -
ubuntu pygtk install 编译
export GTKHOME=/home/shen/pygtk-build #make separate lib dependencies together fot build pygtk lastly cp $GTKHOME/*/* $GTKHOME/unit -r export PATH="$GTKHOME/bin:$PATH" export PATH="$GTKHOME/bi翻译 2014-03-05 22:15:26 · 2538 阅读 · 0 评论 -
解压缩 linux tar gz xz bz2
$xz -d ***.tar.xz $tar -xvf ***.tar ------------------------转载 2014-03-04 19:56:47 · 569 阅读 · 0 评论 -
recover stopped job
jobs [1]+ Stopped htop Use fg, to restart the stopped program, and put it to foreground, or bg, to translate it to background. Take note that these commands work only on t转载 2014-03-02 21:55:52 · 530 阅读 · 0 评论 -
ubuntu 查看 是否安装 cmake
dpkg --get-selections | grep cmake转载 2014-03-02 21:23:20 · 3822 阅读 · 0 评论 -
patch file
配合使用diff和patch升级源码 在此仅举一个简单的例子来说明如何用diff/patch工具维护源码升级。 假设program-1.0目录中为老版,现开发完成的新版位于program-2.0目录中,将两个目录置于同一父目录下,然后在该父目录上执行: diff -Nur program-1.0 program-2.0 >program-2.0.patch 将生成一个p转载 2014-03-01 01:23:54 · 896 阅读 · 0 评论 -
linux so shared library
ldd 用来查看程式运行所需的共享库,常用来解决程式因缺少某个库文件而不能运行的一些问题。 第一列:程序需要依赖什么库 第二列: 系统提供的与程序需要的库所对应的库 第三列:库加载的开始地址 nm bt原创 2014-02-28 15:28:21 · 683 阅读 · 0 评论 -
How To Use Linux epoll with Python
How To Use Linux epoll with Python转载 2014-03-29 17:33:28 · 487 阅读 · 0 评论