-
rendering pipeline
-
layer tree(your code) vs presentation tree => pass to render tree
-
blending vs compositing
view 疊太深 => draw into your own buffer <=> against animation
# 單純用來決定該有哪些 interface 和一些是在我們這邊處理的邏輯 | |
class PaymentGateway | |
attr_reader :email | |
SUBSCRIPTION_AMOUNT = 10.to_money | |
def initialize(user) | |
@email = user.email | |
end |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
) | |
var ( |
defmodule Fetcher do | |
def db_value_for(key) do | |
IO.puts "processing..." | |
"db value for #{key}" | |
end | |
defmacro get(map, key, default \\ nil) do | |
quote do | |
case Map.get(unquote(map), unquote(key)) do | |
nil -> unquote(default) |
const ContactBadge = (props) => ( | |
<div className='Badge' {...props}> | |
<div>{props.user.name}</div> | |
<div>{props.contactMethod.type}</div> | |
</div> | |
); | |
export default connect((state, {userId, contactMethodId}) => ({ | |
user: selectUser(state, userId), | |
contactMethod: selectContactMethod(state, contactMethodId) |
defmodule Fun do | |
def arity(fun) do | |
case :erlang.fun_info(fun, :arity) do | |
{ :arity, arity } -> | |
arity | |
end | |
end | |
def adapt!(fun, 0) do | |
fn -> fun.([]) end |
# Another example for: http://onor.io/2014/03/31/partial-function-application-in-elixir/ | |
defmodule PartFuncs do | |
defp addfun(x, y), do: x + y | |
# return a partially applied function | |
def add(a), do: &addfun(a, &1) | |
# could also easily be written as: addfun(a, b) | |
def add(a, b), do: (&addfun/2).(a, b) |
# 內容 | |
# repo 位置 | |
- https://github.com/facebook/react | |
- https://github.com/facebook/flux | |
# 官網 | |
- React | |
* http://facebook.github.io/react/ |
\documentclass[10pt,landscape]{article} | |
\usepackage{multicol} | |
\usepackage{calc} | |
\usepackage{ifthen} | |
\usepackage[landscape]{geometry} | |
\usepackage{hyperref} | |
% based on latex cheat sheet https://wch.github.io/latexsheet/ | |
% | |
% To make this come out properly in landscape mode, do one of the following |