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
// Problem: | |
// The green and red area (and the intersection) receive | |
// click events (press and release). | |
// The green area also receives hover events (enter and leave), | |
// but the red one does not. | |
package main | |
import ( | |
"image" |
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 <sstream> | |
class Rational | |
{ | |
private: | |
int a; | |
int b; | |
public: |
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
//+build ignore | |
package gocql | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"sync" | |
"testing" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"reflect" | |
"tux21b.org/v1/gocql" | |
) |
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
package main | |
import ( | |
"html/template" | |
"log" | |
"net/http" | |
) | |
var tmpl = template.Must(template.New("").Parse(` | |
{{define "index"}}<!DOCTYPE HTML> |
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
def dreitermrek(s, n): | |
if n == 0: | |
return 1 | |
r1 = dreitermrek(s, n-1) | |
a = s(x*r1, r1) / s(r1, r1) | |
if n == 1: | |
return x - a | |
r2 = dreitermrek(s, n-2) | |
b = s(r1, r1) / s(r2, r2) | |
return ((x - a) * r1 - b * r2).expand() |
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
//------------------------------------------------------------------------------ | |
// siren.c | |
// | |
// A small example program to demonstrate the handling of binary files. | |
// | |
// Compile with: | |
// gcc -Wall -lm -o siren siren.c | |
// | |
// Group: 11 study assistant Christoph Hack | |
// Authors: Christoph Hack <[email 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
// The "atomic.h" file provides low-level atomic memory primitives for the | |
// x86 plattform. All functions in this file provide sequential memory | |
// consistency. | |
// atomic_load atomically loads *addr. | |
static inline int atomic_load(int *addr) | |
{ | |
int val = *(volatile const int*)(addr); | |
__asm__ __volatile__ ("" ::: "memory"); |
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
package main | |
import ( | |
"fmt" | |
irc "github.com/fluffle/goirc/client" | |
"html/template" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" |
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
DROP KEYSPACE gocql_wiki; | |
CREATE KEYSPACE gocql_wiki | |
WITH strategy_class = 'SimpleStrategy' | |
AND strategy_options:replication_factor = 1; | |
USE gocql_wiki; | |
CREATE TABLE page ( | |
title varchar, |
NewerOlder