原创 python 判斷數據類型

import types  aaa = 0print type(aaa)  if type(aaa) is types.IntType:      print "the type of aaa is int"  if isinstance(

原创 ERROR 1045 (28000)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Red Hat Enterprise Linux 5服務器上mysql啓動

原创 cxfreeze 打包exe

使用cxfreeze打包python程序成exepython版本:python-3.3.2.amd64.msicxfreeze版本:cx_Freeze-4.3.2.win-amd64-py3.3.msi安裝cxfreeze到python33

原创 lcov for linux 使用

首先安裝lcov,我安裝的版本是lcov-1.9寫一個app.c文件,代碼如下:#include <stdio.h> #include <time.h> #include <stdlib.h> void main() {  int a=3;

原创 redhat替換centos 6.6 yum源

新安裝了redhat6.4.安裝後,登錄系統,使用yum update 更新系統。提示:This system is not registered to Red Hat Subscription Management. You can us

原创 二進制、字節、16進制

1.二進制就是逢二進一,只有0和1。 一個字節就是一個英文字母、阿拉伯數字或半個漢字所佔的空間(一個漢字佔2個字節)。 16進制就是逢16進一,只有0123456789abcdef這16個數字(或子母)。 由於電腦裏都是二進制的數,而16進

原创 shell 讀取配置文件

1.讀取文本文件格式一如下:Setting.ini  1 [comon]  2 ids=com1,com2,com3  3 files=profilefile  4   5   6 [oracle]  7 key="com1"  8 fil

原创 我的友情鏈接

51CTO博客開發書生linux教程網

原创 連接oracle時localhost可以ip地址不可以

在本機安裝了oracle,使用sqlplus和plsqldev連接的時候,tnsname.ora中host寫的是localhost,此時連接oracle都沒有任何問題,但是外機連接本機,和tnsname.ora中host寫成ip地址(192

原创 vim中文亂碼

# vim ~/.vimrc 加入以下內容保存即可   set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936   set termencoding=utf-8   set enco

原创 tcpdump

[root@localhost ~]# tcpdump -i lo -nn tcp port 8934 -s 0 -X17:36:07.086662 IP 192.168.200.65.37273 > 192.168.200.65.8934

原创 排序

#!/usr/bin/envpython#-*-coding:utf-8-*-import time,randomdef heap_sort(lst):    for start in range((len(lst)-2)/2,-1,-1)

原创 netem 與 tc 流量控制

一、netem 與 tc:netem 是 Linux 2.6 及以上內核版本提供的一個網絡模擬功能模塊。該功能模塊可以用來在性能良好的局域網中,模擬出複雜的互聯網傳輸性能,諸如低帶寬、傳輸延遲、丟包等等情 況。使用 Linux 2.6

原创 python rtsp

# -*- coding: utf-8 -*- """ A demo python code that .. 1) Connects to an IP cam with RTSP 2) Draws RTP/NAL/H264 packets 

原创 linux配置網橋組

查看網卡配對情況[root@localhost ~]# brctl addbr br0[root@localhost ~]# brctl addif br0 eth3[root@localhost ~]# brctl addif br0 e