原创 LUA解析配置文件-C語言調用

前幾天也轉載過LUA的一片文章,但自己驗證時發現上面寫的例子缺少一些東西直接跑不通,不過我已經修正。 詳細的教程可參見:http://www.troubleshooters.com/codecorn/lua/lua_c_calls_lua

原创 python 如何能否自定義模塊路徑? 添加自定義模塊 函數 python

export PYTHONPATH=$HOME/my/python/lib or sys.path.append('./gen-py')   一般來說,我們會將自己寫的python模塊與python自帶的模塊分開存放以達到便於維護的目的。

原创 LUA解析配置文件 簡單實例

LUA代碼 file=io.open("./test.conf", "r"); modulename="NOT Found"; port=-1; function get_modulename(line) if (strin

原创 TI GEL文件教程

1.download教程說明 [Creating Device Initialization GEL Files] http://www.ti.com.cn/cn/lit/an/spraa74a/spraa74a.pdf 2.Abou

原创 Glib中Gquark淺析

Glib中Gquark淺析 夸克,英文名叫quark,原意是表示一種物理單位;第一次在GLIB中看到這個名詞,很有意思。 下文摘自http://blog.csdn.net/ciahi 爲了在程序中標識一塊數據,你一般有兩種方式可選

原创 python的pyc和pyo文件

python並非完全是解釋性語言,它是有編譯的,先把源碼py文件編譯成pyc或者pyo,然後由python的虛擬機執行,相對於py文件來說,編譯成pyc和pyo本質上和py沒有太大區別,只是對於這個模塊的加載速度提高了,並沒有提高代碼的執

原创 windows下編譯gstreamer1.16.1

windows下編譯gstreamer1.16.1windows下編譯gstreamer1.16.1幾個常備地址直接下載已編譯好的庫編譯Glib方法1:方法2:編譯gstreamer1.16.1反思:爲什麼使用gstreamer爲

原创 網絡編程專欄中用到的Makefile

CC=gcc CFLAGS=-g LDFLAGS= #INCLUDE= #LIBS= OUTDIR=.bin EXAMPLES += udpserver udpclient tcpserver tcpserver2 tcpclient

原创 簡單的TCP-Client

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <ar

原创 VLC播放簡單流程

近期學着使用VLC,發現相關開發的教程很少,VLC官網的資料有點零散不太好入門,所以我寫了這篇算是VLC的入門吧。 先來一段VLC的調用主邏輯: libvlc_instance_t *vlcInstance; libvlc_media_

原创 簡單的UDP-Server

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <ar

原创 watch命令使用

1.watch簡介 watch 是一個非常實用的命令,基本所有的 Linux 發行版都帶有這個小工具,如同名字一樣,watch 可以幫你監測一個命令的運行結果,省得你一遍遍的手動運行。 2.watch參數   -d, --differe

原创 簡單的TCP-Epoll

/* * epoll.c * * Created on: May 9, 2013 * Author: szhu */ #include <sys/socket.h> #include <sys/epoll.h> #

原创 簡單的UDP-Client

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <ar

原创 簡單的TCP-Server

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <ar