If you add the following CSS rule:
details > details {
padding-left: 20px;
}
The following markup becomes a nested outline view:
use core::iter::once; | |
fn main() { | |
println!("{:?}", fmap(|x| x + 1, 1..100000)); | |
} | |
fn fmap<A, B>(f: impl Fn(A) -> B, mut foo: impl Iterator<Item=A>) -> Vec<B> { | |
match foo.next() { | |
Some(x) => once(f(x)).chain(fmap(f, foo)).collect(), | |
None => Vec::new() |
use core::iter::once; | |
fn main() { | |
println!("{:?}", fmap(|x| x + 1, 1..100000)); | |
} | |
fn fmap<A, B>(f: impl Fn(A) -> B, mut foo: impl Iterator<Item=A>) -> Vec<B> { | |
match foo.next() { | |
Some(x) => once(f(x)).chain(fmap(f, foo)).collect(), | |
None => Vec::new() |
#!/bin/bash | |
# | |
# Check for diffs, and only open the merge tool if diffs are found. | |
# | |
dir=$FIRSTDIRECTORY | |
dir2=$SECONDDIRECTORY | |
cd "$dir" |
If you add the following CSS rule:
details > details {
padding-left: 20px;
}
The following markup becomes a nested outline view:
We investigated the tool jq.
Wes first encountered this as a query tool for JSON. Our probing with the tool lead us to believe that it is much more than this.
This author intends to investigate JSONPath in the future, as it feels targetted specifically at querying. jq
is capable of arbitrary JSON transformations. There is also JMESpath which is described as query language for JSON (this author was under the impression JMESpath was also capable of JSON transformations, albeit a more limited set than jq
allows for the expression of)
First we needed some JSON. @ryanagar noted the considerable breadth of Yukon GIS data. With the help of a query builder, we were able to pull down a blob, and the task for the group was to investigate it's structure w
# list enabled | |
# pm list packages -e | |
# list disabled | |
# pm list packages -d | |
# disable | |
# pm disable-user --user 0 <package> | |
# enable |
; nasm -felf64 a.asm && ld -o a.out a.o | |
; then | |
; gdb a.out | |
section .data | |
; initialize some data | |
someValue dq 8 | |
initialTable dq 40, 871, 181, 157, 268, 790, 310, 211 | |
fileName db "zaliczenie.txt" |
/** | |
* memoizes a function using localStorage as the cache | |
* @param {function|Promise} fn function or promise you wish to memoize | |
* @param {Object} [options] additional configuration | |
* @param {number} [options.ttl=0] time to live in seconds | |
* @param {Boolean} [options.backgroundRefresh=false] whether the cache should be refreshed asynchronously, | |
* Note: new results won't resolve until next execution | |
* @return {Promise} Promise object represents memoized result | |
*/ | |
function memoizeLocalStorage( |