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 views | |
import org.specs2.mutable.Specification | |
import play.api.test.TestServer | |
import play.api.test.Helpers.{ running, HTMLUNIT } | |
class CompositeSpec extends Specification { | |
private val testPort = 3333 |
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 perl | |
use strict; | |
use warnings; | |
for my $i (1 .. 100) { | |
my $fizz = $i % 3 == 0; | |
my $buzz = $i % 5 == 0; | |
if ($fizz && $buzz) { | |
print "FizzBuzz\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
package views | |
import org.specs2.mutable.Specification | |
import play.api.test.TestServer | |
import play.api.test.Helpers.{ running, HTMLUNIT } | |
class ObserverSpec extends Specification { | |
private val testPort = 3333 |
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 views | |
import org.specs2.mutable.Specification | |
import play.api.test.TestServer | |
import play.api.test.Helpers.{ running, HTMLUNIT } | |
class StrategySpec extends Specification { | |
private val testPort = 3333 |
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 views | |
import org.specs2.mutable.Specification | |
import play.api.test.TestServer | |
import play.api.test.Helpers.{ running, HTMLUNIT } | |
class TemplateMethodSpec extends Specification { | |
private val testPort = 3333 |
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 com.zaneli.msgpack | |
import org.msgpack.`type`.{ Value, ValueFactory } | |
object JsonMap2Value { | |
def createValue(content: Any): Value = content match { | |
case (s: String) => ValueFactory.createRawValue(s) | |
case (s: Short) => ValueFactory.createIntegerValue(s) | |
case (i: Int) => ValueFactory.createIntegerValue(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
namespace Zaneli | |
module Facebook = | |
open Facebook | |
open System.Collections.Generic | |
let private appId = "393996153967424" | |
let private redirectUri = "http://www.zaneli.com/" | |
let private client = FacebookClient() |
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
open System | |
let rec loop () = | |
let line = Console.ReadLine() | |
if line <> null then | |
let numericStr = | |
line | |
|> Seq.takeWhile(fun s -> Char.IsNumber(s)) | |
|> Seq.toArray | |
Console.WriteLine(numericStr) |
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
open System | |
let rec getNumIndex (line:string) index = | |
if index < line.Length then | |
if (Char.IsNumber(line.[index])) then getNumIndex line (index + 1) else index | |
else | |
index | |
let rec loop () = | |
let line = Console.ReadLine() |
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 com.zaneli.script; | |
public interface ScriptService { | |
void echo(String message); | |
String getName(); | |
@Deprecated | |
String getName(String str); |