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
(1..16).to_a.each {|i| i % 4==0 ? puts(i) : print(i) } |
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
def get_filename(obj) | |
filename = obj.to_s.downcase + '.txt' | |
end | |
def read_line(line) | |
line.chomp.split(', ') | |
end | |
module ActsAsCsv | |
def self.included(base) |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
var james = new Person( | |
name: "James", | |
age: 31, | |
deceased: false); | |
} | |
} |
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
{:user {:plugins [[lein-difftest "1.3.7"] | |
[lein-marginalia "0.7.1"] | |
[lein-pprint "1.1.1"] | |
[lein-swank "1.4.3"] | |
[lein-git-deps "0.0.1-SNAPSHOT"]]}} |
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
:git-dependencies [["git://github.com/tnm/murmurhash-java.git"]] | |
:java-source-paths [".lein-git-deps/murmurhash-java/src/main/java/ie/ucd/murmur/"] |
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
(ns github-java-import-demo.core | |
(:import (ie.ucd.murmur MurmurHash)) | |
(:gen-class)) | |
(defn -main | |
"I don't do a whole lot." | |
[& args] | |
(println (str "Hello " (MurmurHash/hash32 "World")))) |
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 ui.TextView as TextView` | |
class helloWorld extends GC.Application | |
initUI:-> | |
textView = new TextView({ | |
superview: @view | |
layout: "box" | |
text: "Hello, Coffee!" | |
color: "white"}) |
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 ui.View as View` | |
`import animate` | |
toColor = (x) -> (x % 255).toString(16) | |
class Trail extends GC.Application | |
createTrail: (pt) -> | |
opts = merge(pt, {superview: GC.app.view}) | |
new TrailBox(pt, opts) |
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 ui.SpriteView as SpriteView;` | |
class Mario extends GC.Application | |
initUI: -> | |
sprite = new SpriteView({ | |
superview: @.view | |
x: 100 | |
y: 100 | |
width: 23 | |
height: 29 |
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
ig.module | |
'game.entities.Player' | |
.requires | |
'impact.entity' | |
.defines => | |
class @.EntityPlayer extends ig.Entity | |
animSheet: new ig.AnimationSheet 'media/player.png', 16, 16 | |
size: |