EDIT November 2017: recently the target wasm32-unknown-unknown
was added to rustc
which uses the LLVM WASM backend and works without Emscripten. This is now the recommended way of generating WASM code from Rust (as it is much easier). Thus, this gist document is pretty much useless now. A great resource on getting started with WASM and Rust is hellorust.com: Setup and Minimal Example.
#!/usr/bin/python3 | |
import math | |
f = open("rawdump.txt", "r") | |
for l in f.readlines(): | |
p = 0 | |
chars = [] | |
chksum = 0 |
int doubler(int x) { | |
return 2 * x; | |
} |
#[derive(Debug, PartialEq)] | |
enum State { | |
Waiting { waiting_time: usize }, | |
Filling { rate: usize }, | |
Done, | |
Failure(String), | |
} | |
#[derive(Debug, Clone, Copy)] | |
enum Event { |
<script src="https://unpkg.com/@webcomponents/custom-elements"></script> | |
<style> | |
body { | |
margin: 0; | |
} | |
/* Style the element from the outside */ | |
/* | |
fancy-tabs { | |
margin-bottom: 32px; |
import test from 'tape'; | |
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
import List from './List'; | |
test('empty <List/>', (t)=> { | |
t.plan(1); | |
const emptyList = []; | |
const wrapper = shallow(<List items={emptyList} />); |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
I'm not suggesting drastic action. I don't want to break backwards compatibility. I simply want to make the class
feature more usable to a broader cross section of the community. I believe there is some low-hanging fruit that can be harvested to that end.
Imagine AutoMaker contained class Car
, but the author wants to take advantage of prototypes to enable factory polymorphism in order to dynamically swap out implementation.
Stampit does something similar to this in order to supply information needed to inherit from composable factory functions, known as stamps.
This isn't the only way to achieve this, but it is a convenient way which is compatible with .call()
, .apply()
, and .bind()
.
. | |
├── actions | |
├── stores | |
├── views | |
│ ├── Anonymous | |
│ │ ├── __tests__ | |
│ │ ├── views | |
│ │ │ ├── Home | |
│ │ │ │ ├── __tests__ | |
│ │ │ │ └── Handler.js |
# we need some fixes from 14.10 | |
# sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3 | |
sudo add-apt-repository ppa:libreoffice/libreoffice-4-3 -y | |
# fetch this repository | |
sudo apt-get update -y | |
# update your libreoffice installation | |
sudo apt-get install libreoffice -y | |
# get all build dependencies for libreoffice | |
sudo apt-get build-dep libreoffice -y | |
# that strangely enough doesn't come with the above |