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
<00603F80> | |
@_check_hwdebug: | |
push ebp | |
mov ebp, esp | |
push esi | |
push ebx | |
sub esp, 16 | |
mov eax, DWORD PTR [ebp+12] | |
mov ebx, DWORD PTR [ebp+8] | |
mov DWORD PTR [esp+4], eax |
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
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
user = xxx | |
^F3:: | |
{ | |
dhw := A_DetectHiddenWindows | |
DetectHiddenWindows On | |
Run "%ComSpec%" /k,, Hide, pid | |
while !(hConsole := WinExist("ahk_pid" pid)) | |
Sleep 10 |
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 <signal.h> | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <sys/param.h> | |
#ifdef BSD | |
#define INTERRUPT_CVAR SIGINFO | |
#else | |
#define INTERRUPT_CVAR SIGUSR1 | |
#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
// http://stackoverflow.com/questions/11413855/why-is-transposing-a-matrix-of-512x512-much-slower-than-transposing-a-matrix-of | |
#define SAMPLES 100 | |
#ifndef MATSIZE | |
#define MATSIZE 512 | |
#endif | |
#include <ctime> | |
#include <iostream> | |
int mat[MATSIZE][MATSIZE]; |
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 <mpi.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef unsigned long long ull; | |
// all communication is either input to workers or output from workers | |
enum {TAG_INPUT = 2001, TAG_RESULT}; |
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 <stdio.h> | |
typedef int (*two_var_func) (int, int); | |
typedef int (*one_var_func) (int); | |
int add_int (int a, int b) { | |
return a+b; | |
} | |
#define partial(f, a) ({ \ |
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
/** | |
* argv[1]="769" doesn't work (with #define BUF_LEN 8) | |
* Environment: Windows 10 x86_64 with ../../../src/gcc-4.9.2/configure --host=i686-w64-mingw32 | |
* | |
* Classical undefined behavior: recv's buffer is shorter than the buffer length supplied | |
* But not all wrong buffers are equal, when buf_len >= 769, the recv fails immediately, | |
* with no error code set, which is strange because there has been nothing recieved, so a wrong | |
* buffer length shouldn't have mattered right? | |
* If buf_len < 769 the code does what one would assume, blocking wai for a UDP packet | |
*/ |
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 <windows.h> | |
HWND hwnd; | |
LRESULT CALLBACK WndProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam); | |
int CALLBACK wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) | |
{ | |
MSG Msg; | |
WNDCLASSEX WndClsEx = {0}; |
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 <windows.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
#include <complex.h> | |
#include <math.h> | |
const char *title = "Mandelbrot Set"; | |
#define SIZE 600 | |
#define ITERS 25 | |
int main(void) |
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 <windows.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
char *title = "Mandelbrot Set"; | |
#define SIZE 600 | |
#define ITERS 25 | |
int main() | |
{ | |
int x, y, i; | |
double zx, zy, cx, cy, tmp; |