Imagine we have a reducer to control a list of items:
function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
switch(action.type) {
case 'SHOW_ALL_ITEMS':
return action.data.items
default:
# Layer::createChildrenRefs | |
# Creates convenience refs on imported layers so that we don't have to use Layer::childrenWithName. | |
# Pass recursive=true to do this for all descendant layers while maintaining hierarchy. | |
Layer::createChildrenRefs = (recursive=false) -> | |
# Regex pattern for finding trailing numbers | |
rgx = /(\d+$)/g | |
for layer in @.children |
var myCanvasView = new View({ | |
x:100, y:100, | |
width:200, height:200 | |
}) | |
// Add a nice background color so we see it | |
myCanvasView.style.backgroundColor = "rgba(255,0,0,.5)" | |
// This is the tricky bit, we create a canvas element (so we have a reference to it) and insert it into the view |
# Adapted for Mac OSX from http://christian.gen.co/macbook-developer-setup/ | |
# and http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html | |
export MARKPATH=$HOME/.marks | |
function jump { | |
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" | |
} | |
function mark { | |
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 | |
} | |
function unmark { |
{% for c in site.collections %} | |
{% assign docs=c[1].docs %} | |
{% for doc in docs %} | |
// do something | |
{% endfor %} | |
{% endfor %} |
<select name="DropDownTimezone" id="DropDownTimezone"> | |
<option value="-12.0">(GMT -12:00) Eniwetok, Kwajalein</option> | |
<option value="-11.0">(GMT -11:00) Midway Island, Samoa</option> | |
<option value="-10.0">(GMT -10:00) Hawaii</option> | |
<option value="-9.0">(GMT -9:00) Alaska</option> | |
<option value="-8.0">(GMT -8:00) Pacific Time (US & Canada)</option> | |
<option value="-7.0">(GMT -7:00) Mountain Time (US & Canada)</option> | |
<option value="-6.0">(GMT -6:00) Central Time (US & Canada), Mexico City</option> | |
<option value="-5.0">(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima</option> | |
<option value="-4.0">(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz</option> |
------------ From Rake Task | |
namespace :app do | |
# Checks and ensures task is not run in production. | |
task :ensure_development_environment => :environment do | |
if Rails.env.production? | |
raise "\nI'm sorry, I can't do that.\n(You're asking me to drop your production database.)" | |
end | |
end |
KEY 0x7f BS | |
KEY 0x115 DC |
This is a simple guide to get you started with using the Ethereum Javascript API
(web3.js) with the Create React Native App
project. This is not an in-depth guide.
If you are lazy and just want to get started, I have this project ready for you. It should work out-of-the-box.