Skip to content

Instantly share code, notes, and snippets.

data:application/json,{"configversion":"1.8","subconfigs":{"www.google.com":{"followpagepatterns":{"next":"Next","prev":"Previous"}}},"priority":0,"exmaps":{"<Enter>":"ex.accept_line","<C-j>":"ex.accept_line","<C-m>":"ex.accept_line","<Escape>":"ex.hide_and_clear","<ArrowUp>":"ex.prev_history","<ArrowDown>":"ex.next_history","<C-a>":"text.beginning_of_line","<C-e>":"text.end_of_line","<C-u>":"text.backward_kill_line","<C-k>":"text.kill_line","<C-c>":"text.kill_whole_line","<C-f>":"ex.complete","<Tab>":"ex.next_completion","<S-Tab>":"ex.prev_completion","<Space>":"ex.insert_space_or_completion"},"ignoremaps":{"<S-Insert>":"mode normal","<AC-Escape>":"mode normal","<AC-`>":"mode normal","<S-Escape>":"mode normal","<C-^>":"tab %23","<C-6>":"tab %23"},"imaps":{"<Escape>":"composite unfocus | mode normal","<C-[>":"composite unfocus | mode normal","<C-i>":"editor","<AC-Escape>":"mode normal","<AC-`>":"mode normal","<C-6>":"tab %23","<C-^>":"tab %23","<S-Escape>":"mode ignore"},"inputmaps":{"<Escape>":"composite unf
:Namespace p
⍝ Parsers take a stream of token and return three values:
⍝ success word rest ← parser 'my sentence'
⍝ success: 1 (success) or 0 (failure)
⍝ Coding convention: parsing result
⍝ s r R ← parser input
⍝ s: status, can be either Ok (1) or Fail (0)
⍝ r: result, any value in case of success, ⍬ in case of failure
⍝ R: rest, the remaining input to be parsed.
module Main
data Foo = FInt Int
| FFN (Foo -> Foo)
total
bar : Foo
bar = FFN (\x => x)
(def editor-state (atom #{:value "foobaar"}))
(defn on-plain-text-change [& args] (println args))
(rum/defc PlainText < rum/reactive
[]
(js/React.createElement js/Slate.Editor
#js {:placeholder "enter enter enter"
:value (:value (rum/react editor-state))}))
(rum/defc plain-text
[]
class PlainText extends React.Component {
state = {
value: Plain.deserialize('This is editable plain text, just like a <textarea>!')
}
onChange = ({ value }) => {
this.setState({ value });
}
defmodule Foo do
def proc(l) do
IO.inspect(l)
receive do
msg -> proc([msg|l])
end
end
def procMain do
proc([])
end
/*
* notion/de/font.c
*
* Copyright (c) the Notion team 2013.
* Copyright (c) Tuomo Valkonen 1999-2009.
*
* See the included file LICENSE for details.
*/
#include <string.h>
/*
* notion/de/font.c
*
* Copyright (c) the Notion team 2013.
* Copyright (c) Tuomo Valkonen 1999-2009.
*
* See the included file LICENSE for details.
*/
#include <string.h>
/*
* notion/de/font.c
*
* Copyright (c) the Notion team 2013.
* Copyright (c) Tuomo Valkonen 1999-2009.
*
* See the included file LICENSE for details.
*/
#include <string.h>
import clr
clr.AddReference('Caliburn.Micro')
clr.AddReference('MesaGrid.Core')
clr.AddReferenceByName("PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
clr.AddReferenceByName("PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
import Caliburn.Micro as caliburn
import com.mesaideas.MesaGrid.ViewModels as viewModels
import com.mesaideas.MesaGrid.Core as core