- Build a keymap and download the TMK firmware (.hex file)
- Install flash programming tools...
- Mac
$ brew tap osx-cross/avr
$ brew install avr-gcc
$ brew install dfu-programmer
- Linux / Windows
- Mac
- Use the 'Atmel FLIP' app
import numpy.linalg as la | |
def tls(X,y): | |
if X.ndim is 1: | |
n = 1 # the number of variable of X | |
X = X.reshape(len(X),1) | |
else: | |
n = np.array(X).shape[1] | |
Z = np.vstack((X.T,y)).T |
$ brew tap osx-cross/avr
$ brew install avr-gcc
$ brew install dfu-programmer
use std::fmt; | |
struct Point { | |
x: i32, | |
y: i32, | |
} | |
impl fmt::Display for Point { | |
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
write!(f, "({}, {})", self.x, self.y) |
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
/* | |
Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
They are error checkers, so use them only when err != nil, and you want to handle | |
specific errors in a different way! | |
Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
"file does not exist/directory does not exist" |
import { useEffect, useRef } from 'react'; | |
import { useHistory } from 'react-router-dom'; | |
export const usePrompt = (when: boolean, message: string = 'Are you sure you want to quit without saving your changes?') => { | |
const history = useHistory(); | |
const self = useRef(null); | |
const onWindowOrTabClose = event => { | |
if (!when) { |
A brief example on how to use npx
to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/
class A | |
class A2 extends A | |
class B | |
trait M[X] | |
// | |
// Upper Type Bound | |
// | |
def upperTypeBound[AA <: A](x: AA): A = x |