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
; dependencies: | |
; http://build.clojure.org/releases/org/clojure/clojure/1.2.0/clojure-1.2.0.jar | |
; http://github.com/downloads/sirthias/parboiled/parboiled4j-0.9.8.2.jar | |
; http://github.com/downloads/sirthias/pegdown/pegdown-0.8.5.3.jar | |
(import 'org.pegdown.PegDownProcessor) | |
(def input-text " | |
A First Level Header | |
==================== |
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
// [snippet: Async socket server using F# async computations.] | |
open System | |
open System.IO | |
open System.Net | |
open System.Net.Sockets | |
open System.Threading | |
type Socket with | |
member socket.AsyncAccept() = Async.FromBeginEnd(socket.BeginAccept, socket.EndAccept) |
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
from django.db import models | |
class LambdaManager(models.Manager): | |
"""LambdaManager is a simple manager extension that is instantiated with a callable. | |
This callable is passed the query set by get_query_set so that it can perform any | |
additional transformations to it such as eg filtering. | |
""" | |
def __init__(self, f): |