Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
package org.javace.oportunidades; | |
/* pra que? */ | |
import static br.com.caelum.vraptor.view.Results.json; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.hibernate.Session; | |
/* pra que? */ |
scala> import scalaz._, Scalaz._ | |
import scalaz._ | |
import Scalaz._ | |
scala> def str(x: Int): Option[String] = Some(x.toString) | |
str: (x: Int)Option[String] | |
scala> def toInt(x: String): Option[Int] = Some(x.toInt) | |
toInt: (x: String)Option[Int] |
"For comprehension" is a another syntaxe to use map
, flatMap
and withFilter
(or filter) methods.
yield
keyword is used to aggregate values in the resulting structure.
This composition can be used on any type implementing this methods, like List
, Option
, Future
...
/* | |
(c) 2010~2013 Alessandro Ramos dos Santos | |
edenfall@gmail.com | |
This file implements selection, bubble, insertion, quick and heap sort algorythms in Array prototype. | |
It adds a swap() method for use with these algorythms. | |
Hope you like it. :) | |
Forgive my bad English. :( |
import akka.actor.{ Actor, ActorRef, Props, ActorSystem } | |
case class ProcessStringMsg(string: String) | |
case class StringProcessedMsg(words: Integer) | |
class StringCounterActor extends Actor { | |
def receive = { | |
case ProcessStringMsg(string) => { | |
val wordsInLine = string.split(" ").length | |
sender ! StringProcessedMsg(wordsInLine) |
/*jslint indent: 2 */ | |
(function (FunctionPrototype) { | |
'use strict'; | |
var originalBind = FunctionPrototype.bind; | |
if (!originalBind.patched) { | |
Object.defineProperty( | |
FunctionPrototype, | |
'bind', | |
{ | |
configurable: true, |
sealed trait Interact[A] | |
case class Ask(prompt: String) | |
extends Interact[String] | |
case class Tell(msg: String) | |
extends Interact[Unit] | |
trait Monad[M[_]] { | |
def pure[A](a: A): M[A] |