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
#define RPC_PACK_RAW(buffer, idx, pvalue, size) do {\ | |
if (idx + size >= RPC_PAYLOAD_MAX) {\ | |
RPC_ERROR("data too large");\ | |
goto fail; \ | |
}\ | |
memcpy(buffer + idx, pvalue, size);\ | |
idx += size;\ | |
} while (0) | |
#define RPC_PACK(buffer, idx, value) \ |
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
/* | |
* Author: Alexander Tarasikov <[email protected]> | |
* Date: 2013-03-28 | |
* | |
* Variant 5 | |
* Hamming (15, 11) code | |
* | |
*/ | |
#include <iostream> |
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 <cstdio> | |
#include <pthread.h> | |
#define cas __sync_bool_compare_and_swap | |
#define TEST_MUTEX 0 | |
#if TEST_MUTEX | |
#define MUTEX_TEST(x) x | |
#else |
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
#!/bin/bash | |
#get the sources via | |
#svn cat http://svn.tudos.org/repos/oc/tudos/trunk/repomgr | perl - init http://svn.tudos.org/repos/oc/tudos fiasco l4re | |
#install the required software | |
#apt-get install make gawk g++ binutils pkg-config subversion grub2iso | |
#use double quotes in case some spaces or other weird chars are present | |
FOC_ROOT="$PWD" |
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
# Generated by iptables-save v1.4.2 on Sun Mar 29 19:49:39 2009 | |
*nat | |
:PREROUTING ACCEPT [612:120070] | |
:POSTROUTING ACCEPT [2011:162593] | |
:OUTPUT ACCEPT [2011:162593] | |
-A POSTROUTING -s 192.168.0.0/16 -o eth3 -j MASQUERADE | |
COMMIT | |
# Completed on Sun Mar 29 19:49:39 2009 | |
# Generated by iptables-save v1.4.2 on Sun Mar 29 19:49:39 2009 | |
*filter |
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
-module(midi). | |
-export([parse/1, parse_file/1]). | |
-define(BEINT, big-unsigned-integer-unit). | |
-define(BEBIT, 1/?BEINT:1). | |
-define(BEINT7, 1/?BEINT:7). | |
-define(BEINT16, 1/?BEINT:16). | |
-define(BEINT32, 1/?BEINT:32). | |
-define(MIDI_HEADER, 16#4d546864:?BEINT32). |
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 <cstdlib> | |
#include <pthread.h> | |
using namespace std; | |
#define LOOP_COUNT 30 | |
#define NUM_THREADS 4 | |
#define Q_SIZE 5 |
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 <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
#import <CoreVideo/CVDisplayLink.h> | |
@interface SxgeView : NSOpenGLView <NSWindowDelegate> | |
-(void)registerDisplayLink; | |
-(void)renderForTime:(CVTimeStamp)time; | |
-(void)windowWillClose:(NSNotification*)note; |
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
<html> | |
<script type="text/javascript"> | |
function d2xy(n, d) { | |
var rx, ry, s, t, x, y; | |
t = d; | |
x = y = 0; | |
for (s = 1; s < n; s *= 2) { | |
rx = 1 & (t / 2); |
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 <signal.h> | |
#include <execinfo.h> | |
#include <ucontext.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
#define PAGE_SIZE 4096 | |
#define PAGE_MASK (PAGE_SIZE - 1) |
OlderNewer