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
int main() | |
{ | |
vector<char> vecdd; | |
vector<char>::iterator iterPos; | |
int n; | |
char dd[] = {0,3,4,5,5}; | |
char ddd[] = {10,13,24,35,15}; | |
char dddd[20]; | |
char a,b,c,d, sss, Pos; |
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
// from : MSDN | |
// 델리게이트를 선언한다. | |
delegate void SetTextCallback(string text); | |
// 컨트롤의 접근은 따로 함수를 만들어서 접근하도록 한다. | |
private void SetText(string text) | |
{ |
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
// SharpZipLib : http://icsharpcode.net/OpenSource/SharpZipLib/Default.aspx | |
// 압축 | |
void Compression() | |
{ | |
try | |
{ | |
string zipPath = "test.zip"; | |
System.IO.FileStream writer = new System.IO.FileStream( zipPath, | |
System.IO.FileMode.Create, |
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
// from : MSDN | |
// 아래의 예는 리스트박스에 새로운 데이터를 추가하는 것이다. | |
private delegate void ListBoxDelegate(string arg); | |
void SetStateText(string state) | |
{ | |
this.listBox1.Dispatcher.BeginInvoke( | |
System.Windows.Threading.DispatcherPriority.Normal, |
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
// 패킷 헤더 클래스 | |
[StructLayout(LayoutKind.Sequential)]//[StructLayout(LayoutKind.Sequential, Pack=1)] | |
public class HEADER | |
{ | |
public ushort a1; | |
public ushort a2; | |
public ushort a3; | |
public ushort a4; | |
} | |
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
/* | |
닷넷의 SmtpClient 클래스를 사용하여 메일을 보내는 방법입니다. | |
MSDN의 예제는 빠진 부분이 많아서 그걸 사용하면 제대로 되지 않더군요 | |
삽질하다가 구글링으로 알아냈습니다. | |
아래 예제는 구글의 Gmail을 사용하는 것으로 했습니다.. | |
Gmail의 주소는 smtp.gmail.com 입니다. | |
포트번호는 587을 사용합니다. | |
구글에서는 465도 사용 할수 있다고 하지만 사용하면 연결이 되지 않습니다. |
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
/* | |
아주 간단하게 이메일을 보낼 수 있습니다. | |
(주) 손오공에서 근무할 때 같이 일했던 서영완씨가 가르쳐준 방법입니다. | |
*/ | |
int main() | |
{ | |
char buf[1024]; |
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
#include <atlcoll.h> | |
#include <boost/functional/hash.hpp> // hash를 만들기 위해 사용 | |
// KEY가 될 유저 정의형 | |
struct FRIENDKEY | |
{ | |
union | |
{ | |
struct KEY | |
{ |
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
//1. 간단 사용 법 | |
int sum=0 | |
std:;vector<int> v; | |
for each( int i in v ) | |
{ | |
sum += i; |
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
struct tm timeinfo; | |
memset( &timeinfo, 0, sizeof(timeinfo) ); | |
timeinfo.tm_year = atoi( szYear ) - 1900; | |
timeinfo.tm_mon = atoi( szMonth ) - 1; | |
timeinfo.tm_mday = atoi( szDay ); | |
DWORD nSecondTime = static_cast<DWORD>(mktime( &timeinfo )); |
OlderNewer