NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
-Xms128m | |
-Xmx8182m | |
-XX:ReservedCodeCacheSize=512m | |
-XX:CICompilerCount=2 | |
-XX:+HeapDumpOnOutOfMemoryError | |
-XX:-OmitStackTraceInFastThrow | |
-XX:+UnlockExperimentalVMOptions -XX:+UseZGC | |
-XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 | |
-XX:+UnlockDiagnosticVMOptions -XX:-ZProactive |
import { Form, Col, Row, Button } from "antd" | |
import { FormItemProps } from "antd/lib/form" | |
import { useObservables } from "./use-observables" | |
import * as React from "react" | |
import { AbstractControl, ValidationInfo, FormControls, FormControlList } from "./model" | |
import { CloseOutlined, PlusOutlined, MinusOutlined } from "@ant-design/icons" | |
type FormItemRenderChildren<T, Meta> = (inputProps: { value?: T; onChange?: (v: T) => void }, behavior: Meta | null, err: ValidationInfo) => React.ReactNode | |
export function FormItem<T, Meta>({ |
//Idea is borrowed from https://github.com/gnaeus/react-ioc | |
//Differences are: | |
//1. Does not require reflect-metadata | |
//2. Has an additional "useProvider" method | |
import * as React from "react" | |
export interface Disposable { | |
dispose?(): void | |
} |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
// 2018.5.11更新: 减少了swap | |
function qSort(compare) { | |
var swap = (p1, p2) => { | |
var tmp = this[p1]; | |
this[p1] = this[p2]; | |
this[p2] = tmp; | |
} | |
var sortRange = (start, end) => { | |
var midValue = this[start]; | |
var p1 = start + 1, p2 = end - 1; |
#!/bin/bash | |
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
exit 1 # exit with failure status | |
fi | |
done |
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
# 30 minutes Lisp in Ruby | |
# Hong Minhee <http://dahlia.kr/> | |
# | |
# This Lisp implementation does not provide a s-expression reader. | |
# Instead, it uses Ruby syntax like following code: | |
# | |
# [:def, :factorial, | |
# [:lambda, [:n], | |
# [:if, [:"=", :n, 1], | |
# 1, |