View 295evo.cpp
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
/************************************************************************* | |
* * | |
* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * | |
* All rights reserved. Email: russ@q12.org Web: www.q12.org * | |
* * | |
* This library is free software; you can redistribute it and/or * | |
* modify it under the terms of EITHER: * | |
* (1) The GNU Lesser General Public License as published by the Free * | |
* Software Foundation; either version 2.1 of the License, or (at * | |
* your option) any later version. The text of the GNU Lesser * |
View reverse.c
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> | |
struct node | |
{ | |
struct node * next; | |
int seq; | |
}; |
View 60.go
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" | |
"net/http" | |
) | |
type String string | |
type Struct struct { |
View hillClimber.go
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" | |
"math/rand" | |
"time" | |
"runtime" | |
) | |
/* HillClimber |
View 21game-improved.cpp
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 <iostream> | |
using namespace std; | |
const char * welcometext = | |
"Welcome to the game of 21! \n\ | |
Rules: \n\ | |
First choose who goes first, the game starts with 21 sticks in\n\ |
View 21game.cpp
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 <iostream> | |
using namespace std; | |
const char * welcometext = | |
"Welcome to the game of 21! \n\ | |
Rules: \n\ | |
First choose who goes first, the game starts with 21 sticks in\n\ | |
a pile, the player forced to take the last stick loses. \n\ |
View i3-exit
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
#!/usr/bin/env python | |
# based on cb-exit used in CrunchBang Linux <http://crunchbanglinux.org/> | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
import os | |
import getpass |
View ConcurrencyTest.java
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 java.util.List; | |
import java.util.Collection; | |
import java.util.ArrayList; | |
import java.util.concurrent.*; | |
import java.lang.InterruptedException; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.CancellationException; | |
import java.util.Random; | |
public class ConcurrentTest { |
View event.sh
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/sh | |
#set the following in your .mcabberrc file for notifications | |
#set events_command = ~/.mcabber/event.sh | |
#set events_ignore_active_window = 0 | |
#set event_log_files = 1 | |
#set event_log_dir = /tmp | |
if [ $1 = "MSG" ]; then |
View faster.py
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 dis | |
>>> def addStr(s): | |
... return ">" + s + "<" | |
... | |
>>> dis.dis(addStr) | |
2 0 LOAD_CONST 1 ('>') | |
3 LOAD_FAST 0 (s) | |
6 BINARY_ADD | |
7 LOAD_CONST 2 ('<') | |
10 BINARY_ADD |
OlderNewer