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
$ cat ~/bin/clj | |
#!/bin/bash | |
# Runs Clojure using the classpath specified in the `.clojure` file of the | |
# current directory. | |
# | |
# Mark Reid <http://mark.reid.name> | |
# CREATED: 2009-03-29 | |
JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java | |
CONTRIB=$CLJ_DIR/clojure-contrib.jar | |
CP=$PWD:$CONTRIB |
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
clj hello.clj | |
Exception in thread "main" java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol (str_utils.clj:0) | |
at clojure.lang.Compiler.eval(Compiler.java:4153) | |
at clojure.lang.Compiler.load(Compiler.java:4470) | |
at clojure.lang.RT.loadResourceScript(RT.java:327) | |
at clojure.lang.RT.loadResourceScript(RT.java:316) | |
at clojure.lang.RT.load(RT.java:406) | |
at clojure.lang.RT.load(RT.java:376) | |
at clojure.core$load__4557$fn__4559.invoke(core.clj:3427) | |
at clojure.core$load__4557.doInvoke(core.clj:3426) |
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
namespace :db do | |
desc "Perform automigration" | |
task :automigrate => :environment do | |
::DataMapper::AutoMigrator.auto_migrate | |
end | |
desc "Perform non destructive automigration" | |
task :autoupgrade => :environment do | |
::DataMapper::AutoMigrator.auto_upgrade |
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
const Post:Model = new Model("post"); | |
var request:Request = Post.findAll(); | |
request.onComplete(function(posts:*):void { | |
posts.forEach(function(post:*, index:int, array:Array):void { | |
Alert.show(post.subject); | |
}); | |
}); | |
request.onError(function():void { | |
Alert("Darn"); |
NewerOlder