This file contains 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
object fizzBuzzStream extends App { | |
type FizzBuffer = (Int, String) | |
def fb(b: FizzBuffer)(i:Int, s:String) = if (b._1 % i == 0) { new FizzBuffer(b._1, b._2 + s) } else { b } | |
def fizz = fb(_:FizzBuffer)(3, "Fizz") | |
def buzz = fb(_:FizzBuffer)(5, "Buzz") | |
def fizzBuzz = fizz andThen buzz | |
val naturals: Stream[Int] = 1 #:: naturals.map {n => n + 1} | |
val fizzyStream = naturals.map(n => fizzBuzz(new FizzBuffer(n, ""))) |
This file contains 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
using System; | |
using var = TestBed.MyClass; | |
namespace TestBed | |
{ | |
public class MyClass | |
{ | |
public static implicit operator MyClass(int me) | |
{ | |
return null; |
This file contains 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
#download monit source | |
wget $MONIT_SOURCE_URL -O /root/download/monit.tar.gz | |
if [ ! -e /root/download/redis.tar.gz ] | |
then | |
wget $MONIT_SOURCE_URL -O /root/download/monit.tar.gz | |
fi |
This file contains 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
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains 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
if (typeof Xignite == "undefined" || !Xignite) { var Xignite = {}; }; | |
Xignite.license = ''; | |
Xignite.XigniteQuotes = {}; | |
Xignite.XigniteQuotes.GetQuickQuotes = function(symbol, callback) | |
{ var url = "http://www.xignite.com/xQuotes.json/GetQuickQuotes?Symbol=" + symbol + "&_callback=?"; $.getJSON(url, callback);} | |
Xignite.XigniteQuotes.GetSingleQuote = function(symbol, callback) | |
{ var url = "http://www.xignite.com/xQuotes.json/GetSingleQuote?Symbol=" + symbol + "&_callback=?"; $.getJSON(url, callback);} | |
Xignite.XigniteQuotes.GetQuotes = function(symbol, callback) |
This file contains 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
@marc /cygdrive/x/xdev/Version2/Services | |
$ time grep -R "Juggalo" * > /dev/null | |
real 0m2.754s | |
user 0m1.825s | |
sys 0m0.920s |
This file contains 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
try | |
{ | |
// ..etc | |
else | |
{ | |
if( caRetVal.Issuer != null && caRetVal.Issuer.Equities != null ) | |
{ | |
for( int i = 0; i < caRetVal.Issuer.Equities.Length; i++ ) | |
{ | |
Xignite.WebServices.XigniteSecurity.Security eq = caRetVal.Issuer.Equities[i]; |
This file contains 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 com.xignite.www.services.XigniteGlobalHistoricalXigniteGlobalHistoricalSoapStub; | |
import com.xignite.www.services.XigniteGlobalHistoricalXigniteGlobalHistoricalSoapStub.GetGlobalHistoricalQuotesRangeResponse; | |
import com.xignite.www.services.XigniteGlobalHistoricalXigniteGlobalHistoricalSoapStub.*; | |
import javax.xml.stream.util.*; | |
import org.apache.axis2.addressing.*; | |
import java.util.*; | |
public class Axis2Test { | |
private XigniteGlobalHistoricalXigniteGlobalHistoricalSoapStub stub; |
This file contains 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
public abstract class AbstractExecutor | |
{ | |
public abstract void Execute(object something); | |
} |
This file contains 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
http://imgs.xkcd.com/clickdrag/1n2e.png | |
http://imgs.xkcd.com/clickdrag/2n3e.png | |
http://imgs.xkcd.com/clickdrag/1n3e.png | |
http://imgs.xkcd.com/clickdrag/3n2e.png | |
http://imgs.xkcd.com/clickdrag/3n3e.png | |
http://imgs.xkcd.com/clickdrag/2n4e.png | |
http://imgs.xkcd.com/clickdrag/1n4e.png |