Time of Update: 2014-06-26
標籤:linux最近發現在寫linux c服務程式的時候,daemon與線程建立之間出現問題。發現程式在daemon之後,起的線程就全掛了。查過一些文檔之後,終於知道了why.daemon函數的操作其實很簡單,1.fork一個進程,2.處理3個標準輸入輸出資料流做完之後,主進程就退出了,實際啟動並執行是子進程。子進程會被掛在init進程上,也就是pid為1的進程。問題就發生在這個daemon的時間點。如果在pthread初始化了線程之後,再進行daemon,子進程不會擁有之前的線程,相
Time of Update: 2014-06-15
標籤:blog http com linux 伺服器 for 多數CC攻擊在web伺服器日誌中都有相同攻擊的特徵,我們可以根據這些特徵過濾出攻擊的ip,利用iptables來阻止#!/bin/bash#by LinuxEye#BLOG:
Time of Update: 2014-06-09
標籤:c style class blog code java #include <errno.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include <
Time of Update: 2014-06-25
標籤:c語言 掃雷 遊戲 terminal 讓我們在terminal下愉快的...掃雷昨天跟奇葩霖聊起“雷區”這個禁用語,然後很榮幸的。。。應該轟炸不到我。。。後來百無聊賴的去玩了把掃雷,然後發現我之前都是亂掃的,沒有任何技巧。百科之後才發現,掃雷是有技巧的,接著玩了一把,咦挺有意思的。。。大概感受了一下,今天又要考數電,昨晚寫了個架構,就到兩點半了。。。睡。。
Time of Update: 2014-06-23
標籤:class blog tar ext color get 表單分為兩部分:客戶區(Client area)和非客戶區(Non-Client
Time of Update: 2014-06-18
標籤:winform style blog http color com 由於項目需要發送資料到網頁
Time of Update: 2014-06-12
標籤:winform code http ext get string //data:參數 URL:路徑 public static string PostWebRequest(string Data, string
Time of Update: 2014-06-06
標籤:winform c style class blog code // 擷取程式的基目錄。System.AppDomain.CurrentDomain.BaseDirectory//
Time of Update: 2014-05-31
標籤:winform c style class blog code 要做一個視頻無縫切換的程式,所謂無縫就是在一個視頻結束時立即開始另一個視頻,中間不要有切換的黑屏實現思路是放兩個wmp播放控制項,其中每個時刻只有一個在播放,另外一個處於暫停狀態,並隱藏當一個視頻播放完後,切換顯示另一個視頻,
Time of Update: 2014-06-26
標籤:libiconv big5 gbk 《libiconv字元集轉換庫使用方法》一文中說到了libiconv可以實現不同字元集的轉換。比如GBK轉BIG5等。在項目中因為需要,找到這個庫。可是這個庫在C#中沒有很好的支援。不過,想著既然是C++的庫,那隻要動態載入DLL的介面就好了。可是調用並不順利,傳進去的IntPtr或者byte數組總是拿不到資料。後面回到了C+
Time of Update: 2014-06-26
標籤:code 資料 類 表 c har byte 無符號 8 為整數,值為0-255;sbyte 有符號8位整數,-128~127;short
Time of Update: 2014-06-26
標籤:style class blog code ext color 先看文法:String.SubString(int index,int length) index:開始位置,從0開始 length:你要取的子字串的長度&
Time of Update: 2014-06-25
標籤:style class blog code color com private bool Compare(object o1, object o2) { if (o1 == null) { if
Time of Update: 2014-06-25
標籤:style class blog code ext color 一,雜湊表(Hashtable)簡述 在.NET
Time of Update: 2014-06-25
標籤:class blog code http tar ext 委託的定義與方法的定義類似,只是傳回值類型的前面多了個delegate。如:public delegate void PrientDelegate(string
Time of Update: 2018-12-08
作者:Sabine 【導讀】本文介紹了C#的四種排序演算法:冒泡排序、選擇排序、插入排序和希爾排序 冒泡排序 using System; namespace BubbleSorter { public class BubbleSorter { public void Sort(int [] list) { int i,j,temp; bool done=false; j=1; while((j<list.Length)&&(!done)) {
Time of Update: 2018-12-08
文/餘海發 本文介紹了Linux的C開發環境的構成和安裝,使讀者對Linux的C開發環境能有初步的瞭解。
Time of Update: 2018-12-08
/// <summary> /// 去除HTML標記 /// </summary> /// <param name="strHtml">包括HTML的源碼 </param> /// <returns>已經去除後的文字</returns> public static string StripHTML(string strHtml) { string [] aryReg ={
Time of Update: 2014-06-25
最近不少經銷商使用者反映,在使用win 7的系統的電腦上安裝我們的軟體後,開啟系統時提示許可權不足,無法啟動軟體。而在xp系統下則沒有這個問題,原因在於我們將系統的預設安裝直接選取在了C盤了,而win 7系統在安裝軟體時,有些時候沒有管理員權限時可能會提示許可權不足,或者在安裝軟體時,使用者只是選擇了只是讓目前使用者可以使用該軟體,這樣其他用戶登入時則無法使用軟體了。
Time of Update: 2013-12-25
原文作者Nicholas C.