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 "stdafx.h" | |
#include "resolve.h" | |
#include <WinSock2.h> | |
#include <WS2tcpip.h> | |
#include <MSWSock.h> | |
#pragma comment (lib, "Ws2_32.lib") | |
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 <QCoreApplication> | |
#include <stdint.h> | |
#include <stdio.h> | |
// test cases | |
template <typename T> union bitset_u | |
{ | |
struct | |
{ | |
uint8_t b0 : 1; |
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
import pygame, sys | |
from pygame.locals import * | |
from pygame import gfxdraw | |
# set up the window | |
windowSurface = pygame.display.set_mode((500, 400), 0, 32) | |
pygame.display.set_caption('Hello world!') | |
class Position: | |
def __init__(self, x, y): |
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
/** create that file w content vector_add_kernel.cl | |
__kernel void vector_add(__global int* A, __global int* B, __global int *C) | |
{ | |
// get the idx of the current element | |
int i = get_global_id(0); | |
C[i] = A[i] + B[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
/** object.def - generate this file | |
INT(x) | |
INT(y) | |
PDATA() | |
*/ | |
#include <stdio.h> | |
#define INT(x) int x; |
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
// ConsoleApplication4.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include "pch.h" | |
#include <intrin.h> | |
#include <iostream> | |
class Vec3D | |
{ | |
float x; |
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 <iostream> | |
class A | |
{ | |
int a, b, c, d; | |
public: | |
A() : a(1), b(2), c(3), d(4) {} |
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 <iostream> | |
#include <vector> | |
#include <setjmp.h> | |
#include <thread> | |
#define Yield | |
struct Stack | |
{ | |
protected: |
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 <iostream> | |
template <int N> struct SolveQ | |
{ | |
unsigned char mat[N][N]; | |
SolveQ() | |
{ | |
for(int i=0; i < N; ++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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
static int codes[0xFF]= {0}; | |
static void addcode(unsigned char c) | |
{ | |
codes[(int)c]++; | |
} |
OlderNewer