- Install docker
https://docs.docker.com/get-docker/
- Install psql
let state = []; | |
let setters = []; | |
let firstRun = true; | |
let cursor = 0; | |
function createSetter(cursor) { | |
return function setterWithCursor(newVal) { | |
state[cursor] = newVal; | |
}; | |
} |
# Forked from https://gist.github.com/dyno/94ef6bb9644a88d6981d6a1a9eb70802 | |
# https://plantuml.com/text-encoding | |
# https://github.com/dougn/python-plantuml/blob/master/plantuml.py#L64 | |
import zlib | |
import base64 | |
import string | |
plantuml_alphabet = string.digits + \ | |
string.ascii_uppercase + string.ascii_lowercase + '-_' |
# https://plantuml.com/text-encoding | |
# https://github.com/dougn/python-plantuml/blob/master/plantuml.py#L64 | |
import zlib | |
import base64 | |
maketrans = bytes.maketrans | |
plantuml_alphabet = string.digits + string.ascii_uppercase + string.ascii_lowercase + '-_' | |
base64_alphabet = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/' |
const fns = { | |
} | |
async function attemptConnection() { | |
return "Thanks!" | |
} | |
async function attemptPayment() { | |
throw new Error('Crapp!!') |
https://docs.docker.com/get-docker/
import { useState } from 'react'; | |
function Example() { | |
// Declare a new state variable, which we'll call "count" | |
const [count, setCount] = useState(0); | |
return ( | |
<div> | |
<p>You clicked {count} times</p> | |
<button onClick={() => setCount(count => count + 1)}> |
import React from 'react'; | |
import useFriendStatus from './useFriendStatus'; | |
export default function FriendListItem(props) { | |
const isOnline = useFriendStatus(props.friend.id); | |
return ( | |
<li style={{ color: isOnline ? 'green' : 'black' }}> | |
{props.friend.name} | |
</li> |
function App() { | |
const [count, setCount] = useState(0); | |
// handler will be created on every render | |
const handleClick = () => { | |
setCount(count + 1); | |
}; | |
return ( | |
<SomePureComponent count={count} onClick={handleClick} /> |
#!/usr/bin/env bash | |
### Configuration | |
# Djinni IDL file location | |
djinni_file="helloworld.djinni" | |
# C++ namespace for generated src | |
namespace="helloworld" | |
# Objective-C class name prefix for generated src | |
objc_prefix="HW" | |
# Java package name for generated src | |
java_package="com.cppreactnative.helloworld" |
# ./android/app/src/main/jni/Application.mk | |
APP_STL := c++_static |