This code now lives in its own repo https://github.com/snoyberg/kids-haskell-ide
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
#lang racket | |
(require plot) | |
(require math/base) | |
(require math/number-theory) | |
(require math/distributions) | |
;; Integration, from https://github.com/mkierzenka/Racket_NumericalMethods | |
(require "Numerical_Integration.rkt") | |
;; |
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
#lang racket | |
;; urn.rkt: | |
;; 5-ball urn statistical process: | |
;; - A Sampling Engine | |
;; - An Inference Engine | |
;; - Some Viz/Rendering tools (under construction) | |
(require math/distributions) | |
(require pict) | |
(require plot) |
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
view : Model -> Html Msg | |
view model = | |
div [] | |
[ div [ class "icon" ] [ span [class "icon-profile" ] [] ] | |
, div [ class "icon" ] [ span [ class "icon-clock" ] [] ] | |
] | |
-- REFACTOR TO | |
view : Model -> Html Msg |
if(document.queryCommandSupported('copy')) {
if(text=='') { text = ' '; } // empty inputs do not get selected
// copy text to off-screen input
$('#clipboard').val(text);
// 1.) does copy empty inputs, but adds newline before content
var range = document.createRange();
range.selectNode(document.querySelector('#clipboard'));
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
// handy method to create a Higher Order Component out of a | |
// Render Prop Component (like a Context.Consumer). | |
// handles, statics, displayName, refs, and value forwarding | |
function createHOCFromRenderProp({prop, Consumer}) { | |
return Component => { | |
function Wrapper(props, ref) { | |
return ( | |
<Consumer> | |
{value => <Component {...{...props, [prop]: value, ref}} />} |
None of the string methods modify this
– they always return fresh strings.
-
charAt(pos: number): string
ES1Returns the character at index
pos
, as a string (JavaScript does not have a datatype for characters).str[i]
is equivalent tostr.charAt(i)
and more concise (caveat: may not work on old engines).
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
\documentclass{standalone} | |
\usepackage{tikz-cd} | |
\usepackage{amsmath} | |
\usepackage{tgpagella} | |
\begin{document} | |
\begin{tikzcd} | |
& & \lambda\omega \arrow[rrr] & & & \lambda\Pi\omega \\ | |
& & & & & \\ | |
\lambda 2 \arrow[rruu] \arrow[rrr] & & & \lambda\Pi 2 \arrow[rruu] & & \\ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Debouncing</title> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
</style> | |
</head> |