原创 gcc 創建和使用so文件

動態庫*.so在linux下用c和c++編程時經常會碰到,最近在網站找了幾篇文章介紹動態庫的編譯和鏈接,總算搞懂了這個之前一直不太瞭解得東東,這裏做個筆記,也爲其它正爲動態庫鏈接庫而苦惱的兄弟們提供一點幫助。 1、動態庫的編譯 下面通過

原创 http協議的contenttype一覽表

Description of Data Content Typical Filename Extensions MIME type/subtype       Text and Text-Related Types     HTML t

原创 vim 很好的插件

以下是滇狐收集和整理的一些有用的 VIM 插件, 大部分插件都有自己詳細的說明書, 因此這裏就不詳細介紹每個插件的安裝和使用方法了。 通過這些插件, VIM 能夠變成一個非常強大的平臺, Happy VIMming! 如果想詳細

原创 playing with ptrace

Using ptrace allows you to set up system call interception and modification at the user level. Have you ever wond

原创 先序遞歸建立二叉樹

#include<stdio.h>#include<stdlib.h> typedef struct node{ char c; struct node *left,*right;}node; node *create(){ char c

原创 本地用uchome搭建社交網站

需要軟件: xampp-win32-1.7.3.exe http://www.onlinedown.net/soft/50127.htm ucenter1.5_uchome2.0_discuz7.2.zip http://download

原创 一道題

public class Test  {    public static void main(String[] args){        int k=0;        int j=0;        int w=0;       

原创 vim常用命令

移動光標 上:k nk:向上移動n行 9999k或gg可以移到第一行 G移到最後一行 下:j nj:向下移動n行 左:h nh:向左移動n列 右:l nl:向右移動n列 w:光標以單詞向前移動 nw:光標向前移動n個單詞 光標到單詞的

原创 stack的小程序

#include<stdio.h>#include<stdlib.h>#define STACK_SIZE  100#define STACK_ADD  50 typedef struct stack{ int *base; int *t

原创 iphone上傳圖片到webserver 手機端和服務器(php)

- (IBAction)uploadImage { /* turning the image into a NSData object getting the image back out of the UIImageView

原创 漢諾塔問題

#include<stdio.h>#include<stdlib.h> int c; void move(char a,int n,char b){ printf("%d:/tmove disk %d from %c to %c/n",+

原创 函數調用時的棧狀態

右側的紅色部分,寫出了引發棧結構變化的對應的指令+| (棧底方向,高位地址) | | ....................| | ....................|                         // cal

原创 sqlite用法

OS X自從10.4後把SQLite這套相當出名的數據庫軟件,放進了作業系統工具集裏。OS X包裝的是第三版的SQLite,又稱SQLite3。這套軟件有幾個特色: 軟件屬於公共財(public domain),SQLite可說

原创 排序

歸併排序:   #include<stdio.h> #include<stdlib.h> void display(int d[],int n) {  int i;  for(i=0;i<n;i++)   printf("%d/t",d[

原创 如何用java實現web服務器

 一、HTTP協議的作用原理     WWW是以Internet作爲傳輸媒介的一個應用系統,WWW網上最基本的傳輸單位是Web網頁。WWW的工作基於客戶機/服務器計算模型,由Web 瀏覽器(客戶機)和Web服務器(服務器)構成,兩者之間採