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 IEnumerable<Game> GetAppInfos(params string[] appIds) | |
{ | |
var response = _httpClient.Get(API_ENDPOINT + string.Join(",", appIds)).StaticBody<Dictionary<string, StoreApiResponse>>(); | |
foreach (var id in appIds) | |
{ | |
yield return _parseGame(response[id], id); | |
} | |
} |
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
<ul id="topNavigation"> | |
<li class="home"> | |
<xsl:if test="$currentPage/@id = $currentPage/ancestor-or-self::* [@level=$level]/@id"> | |
<xsl:attribute name="class">home current</xsl:attribute> | |
</xsl:if> | |
<a href="/">Home</a> | |
</li> | |
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> | |
<li> | |
<xsl:if test="@id = $currentPage/@id"> |
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 void InsertGames(params SteamGame[] game) | |
{ | |
var collection = GetGamesCollection(); | |
try | |
{ | |
collection.InsertBatch(game, WriteConcern.Acknowledged); | |
} | |
catch (MongoCommandException ex) | |
{ | |
var x = ex; |
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 System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
using MongoDB.Driver.Builders; | |
using SteamLibraryIntersecter.Models; | |
using SteamLibraryIntersecter.Steam.Entities; |
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
2013-11-04 01:11:26,390 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:31,441 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:36,063 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:41,151 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:46,240 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:51,296 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:11:56,385 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:12:01,017 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:12:06,134 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! | |
2013-11-04 01:12:11,266 (17c8) : DEBUG (logkit:13) - Nothing to do this time for Mayo Chiki! |
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 Worksheet { | |
val t = List(25, 21, 17, 13, 9) //> t : List[Int] = List(25, 21, 17, 13, 9) | |
sealed abstract class SequenceType(dif: Int) | |
case class Addition(dif: Int) extends SequenceType(dif) | |
case class Subtraction(dif: Int) extends SequenceType(dif) | |
case class Multiplication(dif: Int) extends SequenceType(dif) | |
case class Division(dif: Int) extends SequenceType(dif) | |
case class Invalid extends SequenceType(0) |
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 Source { | |
def :=(v: String) = Value := v | |
private object Value extends UntypedAttr("source") { | |
override def :=(v: String) = new Attr(this, v) | |
} | |
class Attr(att:Attr, newVal:String) extends AttrPair(att, newVal) | |
} |
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 java.io.{PrintWriter, File} | |
import scala.io.Source | |
/** | |
* Created by wyntl1 on 29/01/14. | |
*/ | |
object Main extends App { | |
if(args.length != 4) { | |
val arguments = Array("location of csv files: string", "output directory: string", "sets: int", "set size (lines): int") | |
val example = "C:\\csvs C:\\csvs\\out 5 10000" |
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 java.io.{PrintWriter, File} | |
import scala.io.Source | |
/** | |
* Created by wyntl1 on 29/01/14. | |
*/ | |
object Main extends App { | |
if(args.length != 4) { | |
val arguments = Array("location of csv files: string", "output directory: string", "sets: int", "set size (lines): int") | |
val example = "C:\\csvs C:\\csvs\\out 5 10000" |
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
val Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
def vigenere(key:String, message:String) = { | |
val keyLength = key.length | |
val builder = new StringBuilder(message.length) | |
for((c, i) <- message.zipWithIndex) { | |
val index = (c + key(i % keyLength)) % 26 | |
builder.append(Alphabet(index)) | |
} | |
builder.toString() |