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
| /* | |
| Sketch for a cloud generator | |
| By Mads Kjeldgaard, 2020 | |
| */ | |
| ( | |
| ~numChannels = 2; | |
| s.options.numOutputBusChannels_(~numChannels); |
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
| - Specific Notmuch filters (and saved-searches) for: | |
| + The Feed (newsletters, blogs) | |
| + The Paper trail (receipts, ledger) | |
| + Screened Inbox (mail from folks you actually want to read) | |
| + Previously Seen (important mail that you've already read) | |
| + Unscreened Inbox (potential spam / stuff you don't want) | |
| - Elisp Functions to move / categorize emails from a particular sender. | |
| + Adds tags needed by filters defined above to all email sent by a particular sender | |
| + Creates an entry in a DB file, which is used by the Notmuch post-new script when indexing new email, to auto-add the relevant tags. |
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
| (ns org.rssys.lzw.coder | |
| (:require [clojure.java.io :as io]) | |
| (:import (java.io InputStream OutputStream) | |
| (com.github.jinahya.bit.io StreamByteInput StreamByteOutput DefaultBitOutput DefaultBitInput))) | |
| (def MAX-BITS-LENGTH 18) | |
| (def EOF 256) | |
| (defn lzw-encode-stream | |
| [^InputStream in-stream ^OutputStream out-stream] |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParentelem.clientLeft,elem.clientTop,elem.clientWidth,elem.clientHeightelem.getClientRects(),elem.getBoundingClientRect()
The project can be built using Lumo
npm install -g lumo-cljs
lumo build.cljs
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
| module WrapperA = { | |
| module A = { | |
| include ReactRe.Component; | |
| let name = "A"; | |
| type props = (); | |
| let render _ => <div>(ReactRe.stringToElement "A")</div>; | |
| }; | |
See the question and discussion on StackOverflow: How to get the fundamental frequency using Harmonic Product Spectrum?.
We’re trying to estimate the fundamental frequency of a voiced A4 note (440 Hz). (See the question for link to audio clip.)
This is an attempt to make assert more friendly by including more details in the assertion error.
- show the result of the assertion expression
- show local variable values used in assertion form
In other words, this should make assertion errors easier to reason about:
AssertionError Assert failed: Should be equal
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
| (defn my-get | |
| "@param {*} m | |
| @param {*} k | |
| @return {nil|Object}" | |
| [m k] | |
| (get m k)) | |
| (defn foo | |
| "@param {!Object} x" ;; non-nullable | |
| [x] x) |
NewerOlder