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
let svc = Betdaq.GetReadOnlyService() | |
// returns either Betdaq.ServiceTypes.SimpleDataContextTypes.ReadOnlyServiceClient or Betdaq.ServiceTypes.SimpleDataContextTypes.SecureServiceClient | |
A unique overload for method 'GetReadOnlyService' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: Betdaq.GetReadOnlyService() : Betdaq.ServiceTypes.SimpleDataContextTypes.ReadOnlyServiceClient, Betdaq.GetReadOnlyService() : Betdaq.ServiceTypes.SimpleDataContextTypes.SecureServiceClient |
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
namespace Ref | |
{ | |
public class @Ref | |
{ | |
public @Ref @ref(ref @Ref @ref) | |
{ | |
return @ref.@ref(ref @ref); | |
} | |
} | |
} |
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
let FindJump dir (program:char []) cidx = | |
let s = System.Collections.Generic.Stack<int>() | |
let rec NextChar index = | |
match program.[index], dir with | |
| '[', 1 | |
| ']', -1 -> s.Push(index) | |
NextChar (index+dir) | |
| ']', 1 | |
| '[', -1 -> if s.Count = 0 then (index+1) | |
else |
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
private void GetLocation() | |
{ | |
var locator = new Geolocator(); | |
Geoposition position = null; | |
try | |
{ | |
var positionTask = locator.GetGeopositionAsync(); | |
await Task.Delay(200); | |
positionTask.Cancel(); | |
} |
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 class Switch | |
{ | |
private bool _isOn; | |
private Predicate<bool> _onCriteria; | |
public Switch(Predicate<bool> onPredicate) | |
{ | |
_onCriteria = onPredicate; | |
_isOn = _onCriteria.Invoke(true); //When you see below the x will be true as that is the value we invoked it with | |
//We can just as easily store a control value which we pass in |
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
//For Windows 8 | |
DeviceGuid = "2DC22302-AB12-4DDD-86A0-4265843C78FC"; | |
JObject obj = new JObject(); | |
obj["applicationInstallationId"] = DeviceGuid; | |
string configText = obj.ToString(); | |
ApplicationData.Current.LocalSettings.Values["MobileServices.Installation.config"] = configText; | |
Client = new MobileServiceClient("AMS URL"); |
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
var data = "Davis, Clyne, Fonte, Hooiveld, Shaw, Davis, Schneiderlin, Cork, Lallana, Rodriguez, Lambert"; | |
var result = data.Split(',').Select((str, index) => String.Format("{0}. {1}", index+1, str.Trim())); |
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
open System.Linq | |
type T = FSharp.Data.JsonProvider<"http://search.twitter.com/search.json?q=%23fsharp&lang=en&rpp=1&page=1"> | |
let positives = [| "good"; "awesome"; "sweet"; "nice"; "cool" |] | |
let negatives = [| "crap"; "terrible"; "poor"; "bad"; "awful" |] | |
let tweets (tag:string) (since: System.DateTime) = | |
let enc = System.Net.WebUtility.UrlEncode : string -> string | |
let rec page n = | |
if n < 16 then | |
let data = T.Load(sprintf "http://search.twitter.com/search.json?q=%s&rpp=100&page=%d&since=%4d-%02d-%02d" (enc tag) n since.Year since.Month since.Day) |
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.Dom; | |
using System.Html; | |
namespace BladeTest | |
{ | |
public class BladeExample | |
{ | |
public BladeExample() | |
{ |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="blade.js" type="text/javascript"></script> | |
<script src="BladeTest.js" type="text/javascript"></script> | |
<title>Blade Test</title> | |
</head> | |
<body onload="BladeTest.BladeExample()"> | |
<p id="test"> | |
</p> |
NewerOlder