This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AsioTCPServer.cpp | |
// | |
// : Defines the entry point for the console application. | |
// | |
#if (_MSC_VER >= 1300) // VC++ 7.0(2003) or over | |
#include "stdafx.h" | |
#include <tchar.h> | |
#include <errno.h> | |
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM ---------------------------------------------------- | |
@REM Rewmotecap.cmd | |
@REM Example command for captruing eremote network packet | |
@REM using wireshark and tcpdump. | |
@REM First written by j2doll. September 10th 2016. | |
@REM https://github.com/j2doll | |
@REM http://j2doll.tistory.com | |
@REM ---------------------------------------------------- | |
@REM install putty and wireshark on your windows pc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// constparam | |
// 읽기(R) 쓰기(W) 인자. read/write paramter. | |
void refparam(int& param) | |
{ | |
param = 10; | |
} | |
// 읽기전용 인자를 const로 설정. set the read-only parameter to const type. | |
void constparam(const int& param) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DB.h | |
// source from leveldb of code.google | |
class DB | |
{ | |
public: | |
DB() { } | |
virtual ~DB() {} | |
private: // No copying allowed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UseDB.cpp | |
#include "DB.h" | |
DB db1, db2; | |
db1 = db2; // error | |
DB db3(db1); // error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef Qoo1 | |
#error ***** ERROR ***** Qoo1 is defined ****** | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alias namespace | |
// code from : http://www.boost.org/doc/libs/1_41_0/libs/statechart/doc/tutorial.html | |
namespace sc = boost::statechart; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SScc2dx.cpp | |
// http://www.jesusbosch.com/2012/06/creating-and-using-sprite-sheets-in.html | |
_batchNode = CCSpriteBatchNode::batchNodeWithFile("gamePlayPack.pvr");this->addChild(_batchNode); | |
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("gamePlayPack.plist"); | |
_ship = CCSprite::spriteWithSpriteFrameName( "ufo.png" ); | |
CCSize winSize = CCDirector::sharedDirector()->getWinSize();_ship->setPosition( ccp(winSize.width * 0.1, winSize.height * 0.5) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// overring.cpp | |
// simple overriding example | |
#include <iostream> | |
using namespace std; | |
class A | |
{ | |
public: | |
A() { cout << "A()" << endl; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exam28.cpp | |
// 9/21/2000 (rk) | |
// Last modified: 3/10/2002 (RK) | |
// test the routine KILL_PROC_BY_NAME to terminate a process | |
#include <windows.h> | |
#include <tlhelp32.h> | |
#include <iostream.h> | |
#ifdef BORLANDC |
OlderNewer