原创 ×××(35選7)

#include<stdio.h> #include<stdlib.h> #include<time.h> #define MAX 7  void bs(int s2[]); void print(int s3[]);  void as()

原创 我的友情鏈接

南工電腦網mjRao的開源中國

原创 C語言實現二叉樹的遍歷

#include <stdio.h> #include <stdlib.h>   typedef  char   TElemType ;  typedef struct TNode {     TElemType data;     str

原创 判斷一個數是不是素數

  #include<stdio.h> #include"isPrime.h" int main(int argc,char **argv) {     int n;     bool flag;     n = getInteger();

原创 串口通信,Linux下對wm-02R讀卡器的卡號讀取

  #ifndef __SERIAL_PORT_H #define __SERIAL_PORT_H  #include     <stdio.h>      /*標準輸入輸出定義*/ #include     <stdlib.h>     

原创 快速排序的算法實現

void exch(int *p,int *q)  //Data Exchange {     int temp;     temp = *p;     *p = *q;     *q = temp;       }  int partit

原创 SDL做的一個簡單Button

#include "SDL.h" #include "SDL_gfxPrimitives.h"  #define BMP_NAME "icon.bmp" #define ICON "sample.bmp" #define TITLE_NAM

原创 C語言實現數組中數字收尾交換

  #include <stdio.h> #define MAX 10  int exchange(int *firstNumber , int *lastNumber ) {         int temp = 0;         f

原创 我的友情鏈接

南工電腦網mjRao的開源中國

原创 ios創建可拖動的視圖

      在觸摸屏幕的時候,觸摸點的位置是十分重要的信息。得到的位置座標是和它所處的試圖或窗口相關的座標。調用觸摸對象的locationInView:方法即可,查找到觸摸點在指定視圖上的位置,就把視圖對象傳遞進去。對自定義視圖對象來說,這

原创 Linux 獲取當前系統時間(year-month-day h:m:s weekday )

  #include <stdio.h> #include <time.h> #include <string.h> int weekday(int w , char *buff) {          switch(w)     {   

原创 設置 Tab Bar Item屬性

 視圖控制器至少需要設置標題和圖片,可以在Interface Builder中設置Tab Bar Item,也可以在試圖控制器類中覆蓋initWithNibName:bundle:方法,示例如下。 -(id)initWithNibName:

原创 QT下TCP協議通信的Client端

  /**********************  *Write to 5 July 2012*  *By Mr Rao           *  **********************/ #ifndef _CLIENT_H_ #d

原创 隨即獲取1~100之間100個數,並排序

#include <stdio.h> #include <time.h> #include <math.h> #include <stdlib.h> #include <unistd.h>  typedef unsigned int Uin

原创 tslib測試觸摸屏的一小段程序

  #include <stdio.h> #include <stdlib.h> #include "tslib.h"  #define DEV_NAME "/dev/event1"  int getTsXY() {        stru