This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
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
# Derived from this: https://github.com/gashton/bambustudio_tools/blob/master/bambudiscovery.sh | |
# Python implementation without need for linux | |
# Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on. | |
# Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message. | |
# But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp). | |
# Temporary solution to BambuStudio not allowing you to manually specify the Printer IP. | |
# Usage: |
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
references https://hdcookbook.jovial.com/ | |
the github project was updated for m1 last year: | |
https://github.com/zathras/java.net | |
1) You will need ant and java sdk | |
for java this is using 1.8, it is old stuff and the author update to build all fine on m1 so | |
java download zulu openjdk sdk 1.8.0_302 select 8u302b08 Azul Zulu: 8.56.0.23 form macos arm64 from: | |
https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk&show-old-builds=true | |
ant get the 1.10.12 version from: | |
https://ant.apache.org/bindownload.cgi | |
2)i choose the tar.gz option to place all in my custom directories, you can use a script like |
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
{ | |
'Africa/Abidjan': 'GMT0', | |
'Africa/Accra': 'GMT0', | |
'Africa/Addis_Ababa': 'EAT-3', | |
'Africa/Algiers': 'CET-1', | |
'Africa/Asmara': 'EAT-3', | |
'Africa/Asmera': 'EAT-3', | |
'Africa/Bamako': 'GMT0', | |
'Africa/Bangui': 'WAT-1', | |
'Africa/Banjul': 'GMT0', |
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
<!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` --> | |
<div class="container" wInViewRoot="viewport"> | |
Any content can be here | |
<w-in-view-item> | |
<!-- Content will be replaced by a placeholder <div> with the same height as original content. | |
Also `InViewItemComponent`s change detector will be detached when it become invisible which means | |
all the content's change detectors won't be reachable and will be inactive as well. --> | |
</w-in-view-item> | |
...or any other content can be here | |
<w-in-view-item> |
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
/* | |
* EXAMPLE READING AND WRITING A C++ STRUCT TO A FILE | |
*/ | |
#include <FS.h> | |
#include <FFat.h> | |
const char *fileName = "/somefile.txt"; | |
struct aStruct { | |
char someString[11]; |
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
import urlHelpers, { Url, UrlWithParsedQuery, UrlWithStringQuery } from 'url'; | |
import queryStringHelpers from 'querystring'; | |
import { Option } from 'funfix-core'; | |
import pipe from 'lodash/flow'; | |
import { ParsedUrlQuery } from 'querystring'; | |
const isNonEmptyString = (str: string) => str.length > 0; | |
// https://github.com/gcanti/fp-ts/blob/15f4f701ed2ba6b0d306ba7b8ca9bede223b8155/src/function.ts#L127 | |
const flipCurried = <A, B, C>(fn: (a: A) => (b: B) => C) => (b: B) => (a: A) => |
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
// Lazy Getters | |
/* What enables Tail Recursion Modulo Cons in Javascript is a thunk in Weak Head Normal Form. | |
An expression in weak head normal form has been evaluated to the outermost data constructor, | |
but contains sub-expressions that may not have been fully evaluated. In Javascript only thunks | |
can prevent sub-expressions from being immediately evaluated. */ | |
const cons = (head, tail) => ({head, tail}); | |
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
ngOnInit() { | |
this.filteredRoutes$ = from(this.routes).pipe( | |
concatMap((route) => { | |
// handle if nothing is in canActivate | |
if (!route.canActivate || !route.canActivate.length) { | |
// create an object that has the route and result for filtering | |
return of({ route, result: true }); | |
} | |
return from(route.canActivate).pipe( |
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
git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
NewerOlder