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 "W32Tester.h" | |
// | |
CSocketClient::CSocketClient() | |
{ | |
memset((void*)&this->m_wsadata, 0, sizeof(struct WSAData)); | |
memset((void*)&this->m_saddr, 0, sizeof(struct sockaddr_in)); | |
this->m_s = INVALID_SOCKET; | |
this->m_AFamily = AF_INET; | |
this->m_Port = 0; | |
this->m_hostent = NULL; |
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
#pragma comment(lib, "Ws2_32.lib") | |
#include <iostream> | |
#include <WinSock2.h> | |
#define BUF_SIZE 4096 | |
// | |
int main(int argc, char* argv[]) | |
{ | |
struct hostent *d; | |
struct sockaddr_in a; | |
SOCKET s; |
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
COPY START 1000 | |
FIRST STL RETADR | |
CLOOP JSUB RDREC | |
LDA LENGTH | |
COMP ZERO | |
JEQ ENDFIL | |
JSUB WRREC | |
J CLOOP | |
ENDFIL LDA EOF | |
STA BUFFER |
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
float Q_rsqrt( float number ) | |
{ | |
long i; | |
float x2, y; | |
const float threehalfs = 1.5F; | |
x2 = number * 0.5F; | |
y = number; | |
i = * ( long * ) &y; // evil floating point bit level hacking | |
i = 0x5f3759df - ( i >> 1 ); // what the fuck? |
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
// | |
// 不使用 stdafx 標頭檔 | |
// #include "stdafx.h" | |
// | |
#include <iostream> | |
using std::cout; | |
using std::endl; | |
// | |
// 類別:這只是節點而已,(鏈結)串列的基本元素 | |
class list |
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 "W32Dll.h" | |
// | |
_dllexport void Pause(void) | |
{ | |
using std::cin; | |
using std::cout; | |
using std::endl; | |
cout << "press any key to continue..."; | |
cin.clear(); | |
cin.ignore(_BufSize, '\n'); |
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 "W32Tester.h" | |
// | |
void W32Tester::Pause(void) | |
{ | |
using std::cin; | |
using std::cout; | |
using std::endl; | |
cout << "press any key to continue..."; | |
cin.clear(); | |
cin.ignore(_BufSize, '\n'); |
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
SET Folder=%SystemRoot%\system32 | |
CSCRIPT //NOLOGO VersionInfo.vbs "%Folder%\cmd.exe"| FINDSTR "6.1" > nul | |
IF %ERRORLEVEL%==0 ECHO cmd.exe at 7 | |
IF NOT %ERRORLEVEL%==0 ECHO cmd.exe NOT at 7 | |
PAUSE |
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 "W32String.h" | |
// | |
W32String::W32String() | |
{ | |
this->m_string = NULL; | |
this->m_wstring = NULL; | |
this->m_temp = NULL; | |
this->m_size = 0; | |
} | |
W32String::W32String(const char* s) |
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 "Win32Tester.h" | |
shape::shape() | |
{ | |
this->m_perimeter = 0.0l; | |
} | |
shape::shape(const double perimeter) | |
{ | |
this->m_perimeter = perimeter; | |
} | |
shape::~shape() |