moodle - learning managment system - Joomla, DNN - CMS CVenture - CRM beyourmarket - B2B portal ghost - mini cms - blog owa,piwik - open web analytics smart store - e-commerce
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
// NOTE: If warnings appear, you may need to retarget this project to .NET 4.0. Show the Solution | |
// Pad, right-click on the project node, choose 'Options --> Build --> General' and change the target | |
// framework to .NET 4.0 or .NET 4.5. | |
module ServiceStackHeroku.Main | |
open System | |
open System.Collections.Generic | |
open System.Net | |
open ServiceStack | |
open ServiceStack.ServiceInterface |
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
life=->g,s{(0..s*s-1).map{|i|->n{n==3||(g[i]&&n==2)||nil} | |
[[g[i-s-1],g[i-s],g[i-s+1],g[i-1],g[i+1],g[i+s-1],g[i+s],g[i+s+1]] | |
.compact.count]}} |
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
let f s g = g|>List.mapi(fun i x->match Seq.sumBy(fun o-> | |
g.[abs((i+o)%(s*s))])[-1-s;-s;1-s;-1;1;-1+s;s;1+s]with 3->1|2->x|_->0) |
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
lut2_1 : lut2 generic map (init => "1000") | |
portmap (i0 => lava(5), i1 => lava (6), | |
o => lava(4)) ; |
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
>25*"!dlrow ,olleH":v | |
v:,_@ | |
> ^ |
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
[<CLIMutableAttribute>] | |
[<AliasAttribute("hello")>] | |
type HelloDb = | |
{ Name : string } | |
[<LiteralAttribute>] | |
let connStr = "Server = localhost; Port = 5432; Database = database; User Id = username; password = password;" | |
let dbfactory = OrmLiteConnectionFactory(connStr, PostgreSqlDialect.Provider) |
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
#r @"..\packages\FSharp.Charting.0.90.13\lib\net40\FSharp.Charting.dll" | |
#load "..\packages\FSharp.Charting.0.90.13\FSharp.Charting.fsx" | |
open System | |
open FSharp.Charting | |
open System.Windows.Forms | |
open System.Drawing |
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
var test = [[1,2,[3]],4]; | |
var result = []; | |
//[1,2,3,4] | |
var process = function(arr) { | |
arr.forEach(function(a){ | |
if(Array.isArray(a)){ | |
process(a); | |
}else { | |
result = result.concat(a); |
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
/// Contains error propagation functions and a computation expression builder for Railway-oriented programming. | |
namespace Chessie.ErrorHandling | |
open System | |
/// Represents the result of a computation. | |
type Result<'TSuccess, 'TMessage> = | |
/// Represents the result of a successful computation. | |
| Ok of 'TSuccess * 'TMessage list | |
/// Represents the result of a failed computation. |
OlderNewer