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
// Completer | |
// | |
// Wrap a Promise and expose `resolve'`/`reject` safely to allow | |
// resolution/rejection to be determined after promise is created. | |
// | |
// Use: | |
// ```js | |
// const completer = new Completer(); | |
// | |
// async function step1() { |
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
▶ node --experimental-worker .\base.js | |
[Level1] received numbers to process: [0,1,2,3,4] | |
[Level2] processing number: 0 | |
[Level1] received payload from thread 2: {"__done":true,"val":4} | |
[Level2] processing number: 1 | |
[Level1] received payload from thread 3: {"__done":false,"val":0} | |
[Level1] received payload from thread 3: {"__done":true,"val":5} | |
[Level2] processing number: 2 | |
[Level1] received payload from thread 4: {"__done":false,"val":0} | |
[Level1] received payload from thread 4: {"__done":false,"val":1} |
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
#!/bin/sh | |
# List Data Structure written for POSIX Compliant Shells | |
# Author: Srinivas Dhanwada <dhanwada.dev@gmail.com> | |
# source the map methods | |
. ./map.sh | |
# list methods implemented using an underlying map | |
list_all() { |
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
rem see https://github.com/coreybutler/nvm-windows/issues/300 | |
@echo off | |
SETLOCAL EnableDelayedExpansion | |
if [%1] == [] ( | |
echo Pass in the version you would like to install, or "latest" to install the latest npm version. | |
) else ( | |
set wanted_version=%1 |
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
#!/bin/bash | |
# CPRE 381 Lab Submission Setup | |
# | |
# Usage: ./submit.sh <lab_directory> | |
# | |
# This script takes the directory of your lab files | |
# and copies all the source files and waveform files | |
# to a submission directory, organizing them into | |
# src/ and test/ subdirectories for each part. |