This file contains hidden or 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 <immintrin.h> | |
#include <intrin.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
union Mat44 { | |
float m[4][4]; | |
__m128 row[4]; | |
}; |
This file contains hidden or 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 <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <X11/Xlib.h> | |
/* The window which contains the text. */ | |
struct | |
{ | |
int width; |
This file contains hidden or 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> | |
// | |
// Nearly minimal CUDA example. | |
// Compile with: | |
// | |
// nvcc -o example example.cu | |
// | |
#define N 1000 |
This file contains hidden or 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 <linux/fb.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <sys/mman.h> |
This file contains hidden or 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
/* glxcb.c taken from: | |
http://xcb.freedesktop.org/opengl/ | |
to compile it use : | |
gcc -std=c99 -Wall glxcb.c -lxcb -lX11 -lGL -lX11-xcb -o glxcb | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <X11/Xlib.h> |
This file contains hidden or 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
# rectangle.pyx | |
cdef extern from "Rectangle.h" namespace "shapes": | |
cdef cppclass Rectangle: | |
Rectangle(int, int, int, int) | |
int x0, y0, x1, y1 | |
int getLength() | |
int getHeight() | |
int getArea() | |
void move(int, int) |
This file contains hidden or 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 <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
double Normal(double); | |
double N(double, double, double, double, double); | |
double delta(double, double, double, double, double); | |
double delta2(double, double, double); | |
double ND2(double, double, double); |
This file contains hidden or 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
/* TinyWM is written by Nick Welch <[email protected]>, 2005. | |
* TinyWM-XCB is rewritten by Ping-Hsun Chen <[email protected]>, 2010 | |
* | |
* This software is in the public domain | |
* and is provided AS IS, with NO WARRANTY. */ | |
#include <xcb/xcb.h> | |
int main (int argc, char **argv) | |
{ |
This file contains hidden or 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<pthread.h> | |
#include<stdio.h> | |
// a simple pthread example | |
// compile with -lpthreads | |
// create the function to be executed as a thread | |
void *thread(void *ptr) | |
{ | |
int type = (int) ptr; | |
fprintf(stderr,"Thread - %d\n",type); |
This file contains hidden or 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
/* | |
A Minimal Capture Program | |
This program opens an audio interface for capture, configures it for | |
stereo, 16 bit, 44.1kHz, interleaved conventional read/write | |
access. Then its reads a chunk of random data from it, and exits. It | |
isn't meant to be a real program. | |
From on Paul David's tutorial : http://equalarea.com/paul/alsa-audio.html |