To create a ReactComponent
:
ReactComponent React.createClass(object proto)
Basic JSX example:
var TitleComponent = React.createClass({
// REQUIRED
package join | |
import ( | |
"fmt" | |
"strings" | |
"testing" | |
) | |
var ( | |
testData = []string{"a", "b", "c", "d", "e"} |
#!/bin/bash | |
# Source: http://blog.nonuby.com/blog/2012/07/05/copying-env-vars-from-one-heroku-app-to-another/ | |
set -e | |
sourceApp="$1" | |
targetApp="$2" | |
while read key value; do |
(ns react-cljs.core | |
(:require React)) | |
(declare render) | |
(defn handle-change [e] | |
(render {:text (.. e -target -value)})) | |
(defn render [{:keys [text]}] | |
(React/renderComponent |
#!/bin/bash | |
set -exo pipefail | |
BUILD_ENV=$1 | |
if [ `uname` == 'Darwin' ]; then | |
OSX=1 | |
JSCOMPRESSOR="yuicompressor --type js" | |
else | |
OSX= |
; Comments start with semicolons. | |
; Clojure is written in "forms", which are just | |
; lists of things inside parentheses, separated by whitespace. | |
; | |
; The clojure reader assumes that the first thing is a | |
; function or macro to call, and the rest are arguments. | |
; | |
; Here's a function that sets the current namespace: | |
(ns test) |
class Ninja | |
def initialize(name, &block) | |
@name = name | |
@move = block | |
end | |
def attack | |
@move.call | |
end | |
end |
var five = require("johnny-five"), | |
board; | |
board = new five.Board(); | |
board.on("ready", function() { | |
(new five.Led(13)).on(); | |
var dataPin = 2; | |
var clockPin = 3; |
Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.
You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template:
You may be asking yourself "why didn't this idiot just use Sphinx, Xapian or Hyper Estraier?". The decision to use MySQL Full-Text Search was based on the fact that this is a smallish project with minimal full-text searching needs. I felt that the requirements didn't warrant downloading/compiling/installing software, monitoring daemons/processes, rebuilding indices, and all the other crap that comes with the big boys of full-text indexing. Don't get me wrong I love Sphinx and Xapian, having used both on several projects, but I wanted something with a little less ceremony. Plus I'm always up for learning something new.
The first thing you need to do is convert the storage engine from the Rails default **In