Skip to content

Instantly share code, notes, and snippets.

View MareArts's full-sized avatar

MareArts MareArts

View GitHub Profile
@MareArts
MareArts / imgeSubtraction_.idea_encodings.xml
Created June 27, 2014 11:33
Image subtraction simple example using opencv on python
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
typedef void(*PenConnectFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenDisconnectFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenUpFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenDownFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenErrorFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenBatteryCriticalFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenBatteryWarningFun)(unsigned long long time, const char* penSerial, int penType);
typedef void(*PenInfoFun)(unsigned long long time, const char* penSerial, int penType, const char* productName, const char* btAddr, const char* sw, const char* hw, unsigned short pid, unsigned short vid);
typedef void(*PenCoordinateFun)(unsigned long long time, const char* penSerial, int penType, const char* pageSerial, unsigned long long pageId, int nx, int ny, unsign
@MareArts
MareArts / CStringToString.cpp
Last active January 3, 2017 05:08
CString to string
CString cs;
CT2CA pszConvertedAnsiString (cs);
std::string s(pszConvertedAnsiString);
@MareArts
MareArts / GetMacAddressByIP.cpp
Last active January 3, 2017 11:39
GetMacAddressByIP
http://study.marearts.com/2017/01/get-mac-address-in-mfc.html
CString GetMacAddressbyIP(CString strIP)
{
NCB Ncb;
UCHAR uRetCode;
LANA_ENUM lenum;
int i;
CString strOutput = _T("");
CString string;
ADAPTER_STATUS Adapter;
@MareArts
MareArts / UnicodeCStringToChar.cpp
Last active January 4, 2017 01:01
Unicode CString to char*
http://study.marearts.com/2017/01/unicode-cstring-convert-to-char.html
char * WtoC(CString str)
{
//CString str; //형변환할 문자열이 저장된 CString 변수
wchar_t* wchar_str; //첫번째 단계(CString to wchar_t*)를 위한 변수
char* char_str; //char* 형의 변수
int char_str_len; //char* 형 변수의 길이를 위한 변수
//1. CString to wchar_t* conversion
wchar_str = str.GetBuffer(str.GetLength());
@MareArts
MareArts / MFC_Decode.cpp
Last active January 4, 2017 02:08
MFC decode
http://study.marearts.com/2017/01/mfc-encode-decode-example-souce-code.html
bool Decode()
{
BYTE *bBuff;
DWORD dwFileLen;
CString csFile;
FILE *pFile;
// 암호화된 파일 저장하기
@MareArts
MareArts / MFC_Encode.cpp
Last active January 4, 2017 02:09
MFC Endoe
http://study.marearts.com/2017/01/mfc-encode-decode-example-souce-code.html
bool CEPenService_PenCommunicatorDlg::Encode(CString id, CString pass, CString mac)
{
//char *bBuff;
CString csFile;
FILE *pFile;
char bBuff[100];
char * cid = WtoC(id);
char * cpass = WtoC(pass);
@MareArts
MareArts / IfTheFileExistThenDelete.cpp
Last active January 5, 2017 00:21
If file exist then delete the file, example source code in MFC
http://study.marearts.com/2017/01/in-mfc-file-exist-check-and-delete-file.html
#include "afx.h"
CFileStatus fs;
if (CFile::GetStatus(_T("AutoLogIn.CPR"), fs))
{
::DeleteFile(_T("AutoLogIn.CPR") );
}
@MareArts
MareArts / OpneCVTrackBarInWebcam.cpp
Created January 5, 2017 12:05
OpenCV Trackbar example code in webcam video
http://study.marearts.com/2016/07/opencv-30-trackbar-simple-example-in.html
#include "opencv2/opencv.hpp"
#include < iostream>
using namespace cv;
using namespace std;
int g_slider; //slider pos value
int g_slider_max; //slider max value
void on_trackbar(int, void*)
@MareArts
MareArts / OpenCVSimpleTrackbar2.cpp
Last active January 5, 2017 12:22
OpenCV Simple Trackbar example
http://study.marearts.com/2017/01/opencv-trackbar-exmaple-source-code.html
#include "opencv2/opencv.hpp"
#include < iostream>
using namespace cv;
using namespace std;
int g_slider; //slider pos value
int g_slider_max; //slider max value