自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(51)
  • 收藏
  • 关注

转载 ip address validate with javascript while key press

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">function IPv4Validate(myfield, e){ if (!e)...

2015-05-11 14:17:00 177

转载 Python - Binary Search & Interpolation Search

1 import random 2 import time 3 4 # randomly create integer list 5 def RandomList(): 6 data = [] 7 nLen = random.randint(20, 50) 8 for _ in range(nLen): 9 ...

2015-03-19 14:57:00 150

转载 Eclipse 4.4.1 luna with PyDev 3.9 on MAC OS X 10.9

1. install jdk 7 or new version2. download eclipse tarball3. unzip eclipse tarball and drag it to application folder4. run eclipse5. eclipse menu => Help => Install New Software  ...

2015-02-11 17:22:00 187

转载 WTL 雙緩存(double buffer)繪圖 & BBS 雙色字

class CTest : public CWindowImpl<CTest>, public CBufferImpl<CTest>{public: BEGIN_MSG_MAP(CTest) CHAIN_MSG_MAP(CDoubleBufferImpl<CTest>) ...

2013-12-11 14:25:00 140

转载 live555 compiled with vs2008

1. 設定系統環境變數,設定好後需要重開機。重開機後,檢查路徑有無生效。2. 修改檔案『win32config』TOOLS32 = "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC"  請用自己電腦安裝的路徑COMPILE_OPTS = $(INCLUDES) $(cdebug)...

2013-05-13 17:00:00 132

转载 IE 9 Development error c00c023f

用下面我失敗的程式碼當範例function loadXMLDoc(){ var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// cod...

2012-09-25 14:43:00 229

转载 vs2008 error RC2135

原本檔案存在,但卻突然找不到!?因為TMD我把檔案由『ansi』改成『utf-8』編碼存檔。結果再改回『ansi』就過了。只是TMD,再度開啟resource script看。編碼卻是『utf-8 without bom』有無bom我不解釋了但是 *.c *.h 都要用有bom的比較正常這時候卻又不要有bom了不是坑爹是什麼順便繼續哭杯.cpp...

2011-10-04 10:41:00 174

转载 windows GUI:限制視窗縮放大小

加入一個訊息case WM_GETMINMAXINFO: MINMAXINFO *mminfo; mminfo=(PMINMAXINFO)lParam; mminfo->ptMinTrackSize.x=600; mminfo->ptMinTrackSize.y=400; ...

2011-09-23 16:44:00 121

转载 gsoap 簡易心得

以下為個人解讀,不保證完全正確。wsdl:定義web service的名稱、參數、型態soap:傳輸資料的格式兩個都是xml格式wsdl放在server端soap是server跟client規定傳輸資料的格式gsoap toolkit:把wsdl轉換成 c / c++ 程式碼,免去軟體工程師需要撰寫處理soap封包。簡單說明如何弄一組web servi...

2011-07-26 14:14:00 141

转载 c pointer alignment

不解釋蝦瞇析pointer alignmentarm-linux-gccunsigned char buf[1024];unsigned char* ptr = buf;ptr += 511;(unsigned)ptr &= ~511;gccunsigned char buf[1024];unsigned cha...

2011-05-25 16:32:00 187

转载 c macro筆記

__FILE__:檔案名稱__DATE__:編譯時的日期__TIME__:編譯時的時間__STDC__:嗯哉__func__:所在的函數名稱转载于:https://www.cnblogs.com/dforce/archive/2011/04/22/2024635.html...

2011-04-22 10:51:00 151

转载 framebuffer RGB

根據 32bits && mmap得到的記憶體位置location: bluelocation + 1 : greenlocation + 2 : redlocation + 3 : alphabut.........我看不出alpha的差異转载于:https://www.cnblogs.com/dforce/a...

2011-04-14 17:22:00 136

转载 設定icon

這部份的icon指的是程式的icon系統管理員中看到的icon按alt + tab看到的iconresource scriptIDI_MYICON ICON "icon.ico"程式註冊的部份wincl.hIcon = LoadIcon( hThisInstance, MAKEINTRESOURC...

2011-03-14 11:38:00 108

转载 windows 7 停用驅動程式數位簽章

我只能說IXTXL很哭杯download center裡面放的竟然沒簽章簡單解決方法1. 用系統管理員執行命令提示字元2. 輸入BCDedit /set loadoptions DDISABLE_INTEGRITY_CHECKSBCDedit /set TESTSIGNING ON3. 重開機要回復的話就把 ON 改成 OFF 就好...

2011-02-21 16:08:00 363

转载 iperf denied on windows 7

http://ergodicthoughts.blogspot.com/2009/09/openscmanager-failed-iperf.html就是cmd.exe要用administrator啟動转载于:https://www.cnblogs.com/dforce/articles/1958476.html

2011-02-19 13:20:00 200

转载 Get Mac address of remote host from IP address

我自己用找很久的範例,改成dev-c++的libraryarp.h#ifndef ArpHPP#define ArpHPP/************************************************* project must include "http://www.cnblogs.com/../Dev-Cpp/lib/libiph...

2011-02-18 23:03:00 136

转载 Dev-C++可用的Ping函數

Syntaxbool Ping( _in char* sIpAddress);ParametersIpAddress [in]Return Value- true - 有ping到- false - 沒ping到ping.h//---------------------------------------...

2011-02-17 18:25:00 146

转载 WindowFromPoint

這是為了討厭的自動化ui控制找的winapi function可以直接從螢幕座標找出該位置的HWND不知道什麼是HWND的人可以直接左轉出去了下面是簡單範例如果是1080P螢幕又是把工作列放在螢幕上方的話會得到顯示的時間#include <windows.h>#include <iostream>using name...

2011-02-17 11:15:00 138

转载 windows視窗程式

WinMain()CreateWindow()WM_CREATEShowWindow()while( GetMessage() )转载于:https://www.cnblogs.com/dforce/articles/1956576.html

2011-02-17 01:07:00 141

转载 程式執行批次檔,並將批次檔的command過程存成檔案

標題很長只是為了我要把iperf隱藏執行,並且把結果存成文字檔。批次檔iperf -c 192.168.0.1 -u -t10 >> log.txt程式#include <windows.h>int main(void){ WinExec("test.bat", SW_HIDE); r...

2011-02-14 15:50:00 108

转载 搜尋registry檢查可用的com port

編譯器:Dev-C++由 msdn 的範例改編而來#include <windows.h>#include <stdio.h>#include <tchar.h>#define MAX_KEY_LENGTH 255#define MAX_VALUE_NAME 16383 void QueryKey(HKE...

2011-01-07 15:16:00 70

转载 讀登錄檔

工作中#include <windows.h>#include <iostream>#include <string.h>using namespace std; int main(){ const char* path = "SOFTWARE\\Microsoft\\Windows NT\\Current...

2011-01-03 17:52:00 83

转载 LPVOID傳遞參數的問題

以Thread用struct傳遞參數做範例struct _ABC{ int x; int y;} ABC, *ABC_P;ABC aStruct;DWORD dwID;HANDLE hThread = CreateThread(NULL, ...

2010-12-31 13:42:00 136

转载 用bmp當視窗的透明視窗 && 自繪按鍵

編譯器:DEV-C++test.cpp#include "test.h"/* Declare Windows procedure */LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);/* Make the class name into a global variab...

2010-12-30 13:08:00 82

转载 structure - "." & "->"

編譯器:DEV-C++之前都誤以為『 . 』跟『->』是差不多的但是根據實驗宣告的是structure,用『 . 』。宣告的是point structure,用『->』。下面是範例typedef struct _EXAMPLE{ int i; float f;} EXAMPLE,...

2010-12-29 16:30:00 98

转载 C 複製字串的小現象

根據說明#include <string.h>char * strncpy ( char * destination, const char * source, size_t num );有趣的來了所有的範例都是用char arraychar destination[]char source[]我使用的是dev c++如果把兩個都宣告成...

2010-12-29 11:31:00 79

转载 TCP 視窗聊天版本

備份用這個可以單測自己寫的連線程式server#include <winsock2.h>#include <windows.h>#define IDC_EDIT_IN 101#define IDC_EDIT_OUT 102#define IDC_MAIN_BUTTON...

2010-12-02 11:06:00 83

转载 WSAAsyncSelect 失敗 error code 10022

根據MSDN10022:Invalid argument但是我個人案例是將 socket 設定變成副程式,執行的時候發生的錯誤。把 socket 設定放回 WM_CREATE 就正常了。同理,WM_PAINT也有類似的狀況。转载于:https://www.cnblogs.com/dforce/articles/1891169.html...

2010-11-29 16:04:00 297

转载 TCP console server & client

server/*************************** Server ********************/// Module Name: Server.c// Description:// This example illustrates a simple TCP server that accepts// incoming c...

2010-11-16 14:35:00 181

转载 獲得電腦各個網路設備的MAC address

基本上#include <Windows.h>#include <Iphlpapi.h>#include <Assert.h>#include <iostream>#pragma comment(lib, "libiphlpapi.lib")using namespace std;// Prints th...

2010-11-16 14:22:00 65

转载 從檔案讀16進位字串轉成字元

標題很複雜也就是有一個文字檔裡面存著16進位表示式例如:abc.txt0x410x420x430x440x450x460x47用ascii來看,分別代表:A、B、C、D、E、F、G。可是檔案讀進來時是{ "0x41", "0x42", "0x43", "0x44", "0x45", "0x46", "0x47" ...

2010-10-22 15:20:00 132

转载 精確的時間計算

如果想要計算精確的時間可以用QueryPerformanceFrequency 獲得電腦 CPU 每秒幾個 tickQueryPerformanceCounter 獲得電腦 tick 數這可以用來計算程式執行時間還可以拿來空轉、暫停程式之用以下是簡單的範例LARGE_INTEGER Hz; // C...

2010-10-22 11:17:00 113

转载 linux 檔案系統(以 Ubuntu 為主)

持續更新/bin :binary,命令與執行程序。一般而言,與 /usr/bin 的內容相同。/boot :Linux 核心與開機相關檔案。/dev :device。在 Linux 下,裝置被視為一個檔案,裝置在此資料夾內都有相對應的檔案。/etc :etceter...

2010-09-23 16:53:00 66

转载 ubuntu 用 wicd 替換 network manager

如果先做 2. 再做 1. 或許不用做 3.1. 先裝wicd$ sudo apt-get -y install wicd2. 移除network manager(不移除的話會有問題。ex: 無線網路密碼錯誤)$ sudo aptitude remove network-manager3. 重新啟動 wicd...

2010-09-22 17:46:00 358

转载 DEV C++ 指標初始化

int *p = NULL;int *p;p = NULL;一個下午的血淚教訓转载于:https://www.cnblogs.com/dforce/articles/1831763.html

2010-09-20 15:19:00 294

转载 HP mini 110 1011tu wireless BCM4312 driver

~$ sudo apt-get update~$ sudo apt-get install bcmwl-kernel-source~$ sudo modprobe -r b43 ssb wl~$ sudo modprobe wl弄了半天結果四行就好转载于:https://www.cnblogs.com/dforce/articles/18210...

2010-09-08 00:33:00 101

转载 Ubuntu with GNU radio

首先更新ubuntu到最新版 本篇說明是以10.04為主更新的好處是......等一下指令可以打短一點 壞處是......我不知道1. 修改apt-get的來源伺服器$ sudo vim /etc/apt/sources.list在裡面加上deb http://us.archive.ubuntu.com/ubu...

2010-09-06 15:56:00 155

转载 C - 轉型

編譯器:Dev-C++long to char*sprintf(char*, "%lu", long);char* to longsscanf(char*,"%ld",&long);#include <stdlib.h>long = atol( char* );double to char*sprintf(ch...

2010-08-30 17:19:00 74

转载 Serial Port RS-232 in C with WINAPI 實作篇

這次終於成功寫出來簡易console版本有實際上跟設備連接側試過編譯工具:Dev-C++註解沒有,詳情請洽MSDN!別人都只講長篇大論,至少我還有一個可以用的完整可以看。#include <iostream>#include <windows.h>#include <conio.h>using namespace...

2010-08-20 13:59:00 116

转载 data type for Agilent VEE import library

直接貼helpThe Definition FileThe Call object or Formula expression determines the type of data it should pass to the function based on the contents of the definition file.The definition file...

2010-08-02 17:12:00 103

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除