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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| "runtime" | |
| ) | |
| /* HillClimber |
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> | |
| #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\ |
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> | |
| #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\ |
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
| #!/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 |
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
| 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 { |
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
| #!/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 |
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
| >>> 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 |
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
| import akka.io.IO | |
| import akka.actor._ | |
| import akka.pattern.ask | |
| import akka.util.Timeout | |
| import spray.http._ | |
| import spray.can.Http | |
| import spray.routing._ | |
| import spray.routing.RequestContext | |
| import spray.routing.directives.CachingDirectives._ |
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
| ּ_בּ | |
| בּ_בּ | |
| טּ_טּ | |
| כּ‗כּ | |
| לּ_לּ | |
| מּ_מּ | |
| סּ_סּ | |
| תּ_תּ | |
| ٩(×̯×)۶ | |
| ٩(̾●̮̮̃̾•̃̾)۶ |
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
| // Using vars, lots of local mutation | |
| def getThemVar(th:Throwable)={ | |
| var now=th | |
| var li=List[Throwable](now) | |
| var cause=now.getCause | |
| while (cause!=null){ | |
| li=cause::li | |
| now=cause | |
| cause=now.getCause | |
| } |