原创 JS等待頁面自動跳轉
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <meta http-equiv="Content-Type" content="
原创 以太網媒體接口MII RMII SMII GMII
以太網媒體接口有:MII RMII SMII GMII 所有的這些接口都從MII而來,MII是(Medium Independent Interface)的意思,是指不用考慮媒體是銅軸、光纖、電纜等,因爲這些媒體處理的相關工作
原创 linux sysinfo ()
struct sysinfo { long uptime; /* 啓動到現在經過的時間 */ unsigned long loads[3]; /* 1, 5, and 15 minute load averages
原创 同步通信和異步通信
串行通信的數據是逐位傳送的,發送方發送的每一位都具有因定的時間間隔,這就要求接收方也要按照發送方同樣的時間間隔來接收每一位。不僅如此,接收方還要確定一個信息組的開始和結束。爲此,串行通信對傳送數據的格式作了嚴格的規定。
原创 linux 進程同步
Test1.cpp:#include <iostream>#include <fstream>#include <stdlib.h>#include <fcntl.h>#include <semaphore.h>#include <str
原创 linux tinyxml刪除節點
bool RemoveNode(string& szFileName){ TiXmlDocument myDocument(szFileName); bool loadOkay = myDocument.LoadFile()
原创 linux 下的多線程同步
1 引言 線程(thread)技術早在60年代就被提出,但真正應用多線程到操作系統中去,是在80年代中期,solaris是這方面的佼佼者。傳統的Unix也支持線程的概念,但是在一個進程(process)中只允許有一個線程,這樣多線程就意
原创 Linux獲取當前時間
1. Linux下與時間有關的結構體 struct timeval { int tv_sec; int tv_usec; };
原创 EnterCriticalSection和LeaveCriticalSection函數
多個線程操作相同的數據時,一般是需要按順序訪問的,否則會引導數據錯亂,無法控制數據,變成隨機變量。爲解決這個問題,就需要引入互斥變量,讓每個線程都按順序地訪問變量。這樣就需要使用EnterCriticalSection和LeaveCrit
原创 HTML 文件傳輸頁面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
原创 linux syslog編程
/////.h #include <stdio.h>#include <stdlib.h>#include <errno.h>#include <pthread.h> #include <syslog.h>#include <sys/
原创 socket於syslog通信
#include <stdio.h>#include <stdarg.h>#include <string.h>#include <sys/stat.h>#include <unistd.h>#include <stdlib.h>#inc
原创 HTML設置字體背景和陰影
<html> <head> <title>實現字體陰影 </title> </head> <body> <div STYLE="position:relative; width=480;
原创 linux tinyxml插入節點
bool InstertNode(string& szFileName){ TiXmlDocument myDocument(szFileName); bool loadOkay = myDocument.LoadFile
原创 CSMA/CD和CSMA/CA
兩個通訊中常用的決定對媒體訪問權的協議,看上去差不多,其實差別不小。我們先來看看他的字面解釋: CSMA(Carrier Sense Multiple Access) 載波(媒體)監聽多重存取 CD(Collision Detecti