git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> offscreen-sample@1.0.0 start /Users/bsergean/src/offscreen_sample
working on geolocation tracking for patietns with alzheimers , incase they wander off. This is the initial attempt from a tutorial in the book pro html5 programming
A Pen by erika harvey on CodePen.
If you use atom... download & install the following packages:
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| namespace Generator3 | |
| { | |
| class Program | |
| { | |
| // classic Generator | |
| static IEnumerable<string> Script() |
| <?php | |
| // Limit the number of revisions to 3 | |
| add_filter( 'wp_revisions_to_keep', 'divi_limit_revisions', 10, 2 ); | |
| function divi_limit_revisions( $num ) { | |
| $num = 3; | |
| return $num; | |
| } | |
| //Disable Emoji |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
| function MergeSort(arr) { | |
| let len = arr.length, // number of items in the array | |
| middle, // middle of the array | |
| left, // left side of the array | |
| right, // right side of the array | |
| // Arrays with 0 or 1 elements don't need sorting | |
| if (len < 2) { | |
| return arr |