| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
#r "System.Xml.Linq" | |
open System | |
open System.IO | |
open System.Xml.Linq | |
let script = seq { | |
//TODO: this currently loads fsproj's in alphabeticall order, we should instead | |
//build the dependencies graph of the fsproj's and load them in topological sort order |
| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
/* | |
* This work (Modern Encryption of a String C#, by James Tuley), | |
* identified by James Tuley, is free of known copyright restrictions. | |
* https://gist.github.com/4336842 | |
* http://creativecommons.org/publicdomain/mark/1.0/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Text; |
#!/bin/sh -x | |
./testdata-script.sh "cs" "mono KeyczarTool.exe" | |
# python requires http://code.google.com/r/jtuley-python-collisions/ | |
./testdata-script.sh "py" "python keyczar/keyczart.py" | |
# java requires http://code.google.com/r/jtuley-java-usekey-interop/ | |
./testdata-script.sh "j" "java -jar KeyczarTool.jar" |
@echo off | |
IF %1.==. GOTO WrongArgs | |
..\.nuget\nuget.exe pack ..\%1\%1.csproj -Build -Properties Configuration=Release -Symbols | |
GOTO:EOF | |
:WrongArgs | |
ECHO "create-nuget <projectname>" |
using ImpromptuInterface; | |
using Newtonsoft.Json.Linq; | |
/* | |
* This example was inspired by | |
* "Serialization is Lossy" | |
* http://kellabyte.com/2013/05/02/serialization-is-lossy/ | |
*/ | |
open System.Linq | |
[<EntryPoint>] | |
let main argv = | |
let counter = List.fold (fun (a,c,g,t) x -> match x with | |
| 'A' -> (a+1, c, g, t ) | |
| 'C' -> (a, c+1, g, t ) | |
| 'G' -> (a, c, g+1, t ) | |
| 'T' -> (a, c, g, t+1) |
//inspired by http://stackoverflow.com/a/2812306/637783 | |
type NullCoalesce = | |
static member Coalesce(a: 'a option, b: 'a Lazy) = match a with Some a -> a | _ -> b.Value | |
static member Coalesce(a: 'a Nullable, b: 'a Lazy) = if a.HasValue then a.Value else b.Value | |
static member Coalesce(a: 'a when 'a:null, b: 'a Lazy) = match a with null -> b.Value | _ -> a | |
let inline nullCoalesceHelper< ^t, ^a, ^b, ^c when (^t or ^a) : (static member Coalesce : ^a * ^b -> ^c)> a b = | |
((^t or ^a) : (static member Coalesce : ^a * ^b -> ^c) (a, b)) |
OK, so technically within the class you can still access the variable by calling getMyProperty or setMyProperty instead of via the property, but you still encapsulate the functionality with the getting and setting. |