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
| (defun dither-xpm (color1 color2) | |
| "Return an XPM dither string representing." | |
| (format "/* XPM */ | |
| static char * dither[] = { | |
| \"12 18 2 1\", | |
| \". c %s\", | |
| \" c %s\", | |
| \"....... . . \", | |
| \".. . . . \", | |
| \"..... . . . \", |
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
| #_ = require \prelude-ls | |
| class Frame | |
| (pin, prev)-> | |
| @cell = pin | |
| @prev = prev | |
| @next = null | |
| prev.next = this if prev? | |
| #frameScore: -> _.fold (+), 0, @cell |
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
| score' :: Int -> Char -> Int | |
| score' _ '-' = 0 | |
| score' b '/' = 10 - b | |
| score' _ 'X' = 10 | |
| score' _ '1' = 1 | |
| score' _ '2' = 2 | |
| score' _ '3' = 3 | |
| score' _ '4' = 4 | |
| score' _ '5' = 5 | |
| score' _ '6' = 6 |
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
| - hosts: node1 | |
| user: vagrant | |
| sudo: yes | |
| tasks: | |
| - name: install python-pycurl | |
| apt: pkg=python-pycurl update_cache=yes | |
| - name: Add the webupd8 APT repository | |
| tags: java | |
| apt_repository: repo="deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" state=present |
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
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.define :node1 do |m| | |
| m.vm.box = "precise32" | |
| m.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
| m.vm.network :private_network, ip: "192.168.1.11" | |
| m.vm.network :forwarded_port, guest: 22, host: 22211, id: "ssh" |
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 sample | |
| import "errors" | |
| func HexStringToInteger(s string) (int, error) { | |
| num := 0 | |
| signum := 1 | |
| if signum == 0 { | |
| return 0, nil |
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
| var dialogueUrl = 'https://api.apigw.smt.docomo.ne.jp/dialogue/v1/dialogue?APIKEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; | |
| var typetalkUrl = 'https://typetalk.in/api/v1/topics/xxxx?typetalkToken=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'; | |
| var botName = 'foobar'; | |
| function doPost(e) { | |
| var jsonString = e.postData.getDataAsString(); | |
| var post = JSON.parse(jsonString).post; | |
| var user = '@' + post.account.name | |
| var message = getMessage(post.message); |
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
| #ifdef EMSCRIPTEN | |
| #include <emscripten.h> | |
| #endif | |
| #include <SDL/SDL.h> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <time.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
| class Foo { | |
| static var x: Int = 0 | |
| lazy var a: Int! = { return x++ }() | |
| } | |
| class Bar { | |
| static var y: Int = 0 | |
| lazy var b: Int? = { return y++ }() | |
| } |
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
| NOTIFY SSTP/1.1 | |
| Charset: UTF-8 | |
| Sender: Jenkins-Server | |
| Event: OnBuildFailed | |
| IfGhost: Jenkins,Hudson | |
| Script: \0\v‥‥ビルドに失敗しました。\1なんとかしろ\e | |
OlderNewer