First check the python downloads page to view the current releases
$ open https://www.python.org/downloads/
This produces the list of ALL available pyenv versions
$ pyenv install --list
...
pypy3-dev
function X_rec = recoverData(Z, U, K) | |
% initialize recovered values | |
X_rec = zeros(size(Z, 1), size(U, 1)); | |
for i = 1:size(X_rec,1) | |
% projected_x is (1, K) | |
projected_x = Z(i, :); | |
% initialize x |
import sys | |
print(sys.path) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello onsubmit</title> | |
</head> | |
<body> | |
<h1>Hello onsubmit</h1> | |
<form onsubmit="handleForm()"> | |
<input type="text" name="todo" autocomplete="off"> | |
<button type="submit">Create Todo</button> |
// js goes here | |
console.log("hello js") |
// This is an example of Optional Chaining | |
const adventurer = { | |
name: 'Alice', | |
cat: { | |
name: 'Dinah' | |
} | |
}; | |
const dogName = adventurer.dog?.name; | |
console.log(dogName); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Open Weather API</title> | |
<style type="text/css"> | |
pre { | |
background-color: #f1f1f1; | |
padding: 5px; | |
margin: 5px; | |
border-radius: 5px; |
First check the python downloads page to view the current releases
$ open https://www.python.org/downloads/
This produces the list of ALL available pyenv versions
$ pyenv install --list
...
pypy3-dev
// answer comes from: https://stackoverflow.com/questions/32553158/detect-click-outside-react-component/54292872#54292872 | |
// this adds typescript and I've used this for a form | |
/* | |
Custom Hook | |
*/ | |
function useOuterClick(callback: any) { | |
const innerRef = useRef() as React.MutableRefObject<HTMLInputElement>; | |
const callbackRef = useRef() as React.MutableRefObject<HTMLInputElement>; |
/* Formatting dates */ | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString | |
// leave locale undefined (varies according to default locale) | |
new Date().toLocaleDateString(undefined, { | |
year: "numeric", | |
month: "2-digit", | |
day: "2-digit", | |
}) | |
/* document event: keydown */ |
import random | |
def is_terminal(token): | |
return token[0] != "_" | |
def expand(grammer, tokens): | |
result = [] | |
for token in tokens: | |
if is_terminal(token): | |
result.append(token) |