cd $TMPDIR && rm -r jest_dx
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
// snippets | |
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
{"lastUpload":"2020-01-31T21:46:49.408Z","extensionVersion":"v3.4.3"} |
You know, before Redux came out I had this idea in my head that the switch
statement wasn't great. I don't think I was alone in thinking that either. I was
under the impression that it was "preferred" or "best practice" to use object
literals instead. For whatever reason, Redux seems to have repopularized switch
for better or worse.
Old habits die hard. While reading through the tire icon util, I couldn't help
but think all these switch
statements could be replaced by simple object
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
function set(obj, path, value) { | |
const clone = Object.assign({}, obj); | |
const keys = path.split('.'); | |
const lastKey = keys.pop(); | |
// -------------------------------------------------- | |
if (keys.length === 0) { | |
clone[lastKey] = value; | |
return clone; |
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
set(CMAKE_SYSTEM_NAME Windows) | |
set(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc) | |
set(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++) | |
set(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres) |
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
> make -j4 cefclient cefsimple | |
Scanning dependencies of target libcef_dll_wrapper | |
Scanning dependencies of target libcef_dll_wrapper | |
[ 2%] [ 2%] [ 2%] Building CXX object libcef_dll/CMakeFiles/libcef_dll_wrapper.dir/base/cef_atomicops_x86_gcc.cc.obj | |
Building CXX object libcef_dll/CMakeFiles/libcef_dll_wrapper.dir/base/cef_bind_helpers.cc.obj | |
i686-w64-mingw32-g++: error: /MP: No such file or directory | |
i686-w64-mingw32-g++: error: /Gy: No such file or directory | |
i686-w64-mingw32-g++: error: /GR-: No such file or directory | |
i686-w64-mingw32-g++: error: /Zi: No such file or directory | |
i686-w64-mingw32-g++: error: /W4: No such file or directory |
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
> cmake -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE=xcompile.cmake .. | |
-- The C compiler identification is GNU 4.8.2 | |
-- The CXX compiler identification is GNU 4.8.2 | |
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc | |
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ | |
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works |
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 serial | |
import csv | |
import re | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
portPath = "/dev/ttyACM0" # Must match value shown on Arduino IDE | |
baud = 115200 # Must match Arduino baud rate | |
timeout = 5 # Seconds | |
filename = "data.csv" |
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
/* takeReading function | |
* takes in an analaog pin number as an integer | |
* sends serial data to PC to be read by Python | |
*/ | |
void takeReading(int pinNum) | |
{ | |
Serial.print(seconds,4); | |
Serial.print(','); | |
Serial.println(analogRead(pinNum)); | |
} |
NewerOlder