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
$(document).ready -> | |
do ($ = jQuery) -> | |
selectedItem = null | |
summaryMarkup = "<div class='movieSummary'><div>Name: ${Name}</div></div>" | |
detailMarkup = "<div class='movieDetail'><div>Name: ${Name}</div><div>Director: ${Director}</div></div>" | |
$.template 'summaryTemplate', summaryMarkup | |
$.template 'detailTemplate', detailMarkup | |
movies = [ {Name: 'The Red Violin', Director: 'François Girard'} |
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
summaryMarkup = """ | |
<div class='movieSummary'>< | |
div>Name: ${Name}</div> | |
</div> | |
""" | |
detailMarkup = """ | |
<div class='movieDetail'> | |
<div>Name: ${Name}</div> | |
<div>Director: ${Director}</div> | |
</div> |
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
commonMarkup = "<div>Name: ${Name}</div>" | |
summaryMarkup = """<div class='movieSummary'>#{commonMarkup}</div>""" | |
detailMarkup = """ | |
<div class='movieDetail'> | |
#{commonMarkup} | |
<div>Director: ${Director}</div> | |
</div> | |
""" |
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
module AccelerometerProxy | |
open System | |
open System.Windows | |
open Microsoft.Devices | |
open Microsoft.Devices.Sensors | |
type AccelerometerEventArgs() = | |
inherit EventArgs() | |
let mutable x = 0.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
#r "FSharp.Data.TypeProviders" | |
#r "System.Data.Services.Client" | |
open Microsoft.FSharp.Data.TypeProviders | |
[<Generate>] // Only needed for the Developer Preview (this will be dropped before the official release of F# 3.0) | |
type stackoverflow = | |
ODataService<ServiceUri = @"http://data.stackexchange.com/stackoverflow/atom"> | |
let dataContext = stackoverflow.GetDataContext() | |
query { |
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 AppSettingsTypeProvider | |
open System | |
open System.IO | |
open System.Reflection | |
open Samples.FSharpPreviewRelease2011.ProvidedTypes | |
open Microsoft.FSharp.Core.CompilerServices | |
open System.Configuration | |
[<TypeProvider>] |
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
module SampleTypeProviderWithFSharxDSL | |
open FSharpx.TypeProviders.DSL | |
open Microsoft.FSharp.Core.CompilerServices | |
open Samples.FSharpPreviewRelease2011.ProvidedTypes | |
open System | |
open System.Configuration | |
open System.IO | |
open System.Reflection |
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
((portlets) -> | |
portlets.init = -> | |
# See http://bloggemdano.blogspot.com/2011/07/jquery-ui-examples-in-coffeescript.html for full code | |
) window.portlets or= {} |
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
do ($) -> | |
methods = | |
init: (options) -> | |
options = $.extend dialogSelector:'.dialog', inputSelector:'.input', options | |
dialogElement = $(options.dialogSelector) | |
dialog = dialogElement.dialog autoOpen: false, modal: true, resizable: false | |
$(options.inputSelector).click -> dialog.dialog 'open' | |
$.fn.simple = (method) -> | |
[_, args...] = arguments |
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
describe "A feature that is being described", -> | |
foo = undefined | |
before -> | |
foo = "bar" | |
after -> | |
foo = "baz" | |
it "can be specified like so", -> | |
assert(foo).equals('bar') |
OlderNewer