$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using SignalR.Hubs; | |
namespace Server | |
{ | |
public class MyHub : Hub | |
{ | |
public void Foo() |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
public class MyHub : Hub | |
{ | |
public Task SendToQuery(string query, string value) | |
{ | |
// Call the send to everybody that has the specified query string value | |
return Clients.Query(c => c.QueryString[query] == value).send(); | |
} | |
} |
/// <reference path="Scripts/jquery-1.6.4.min.js" /> | |
/// <reference path="Scripts/jquery.signalR-1.1.2.js" /> | |
$(function () { | |
var connection = $.hubConnection(), | |
hub = connection.createHubProxy('harness'); | |
hub.on('update', function (data) { | |
console.log(data); | |
}); |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>toSVG problem in IE8</title> | |
<script src="dojo-latest/dojo/dojo.js" data-dojo-config="isDebug: 1, async: 1, parseOnLoad: 0"></script> | |
<script> | |
require([ | |
"dojox/charting/Chart", | |
"dojox/charting/plot2d/Pie", | |
"dojox/gfx/utils", |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
/** | |
* Basic example to pass values between parent and child components in React | |
* Seems to be in line with this | |
* http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements | |
* Now I have the state in parent and child. Is that good or bad? Why would I need it in child? | |
* Could probably take that out | |
* */ | |
class Parent extends React.Component { | |
constructor(props) { | |
super(props); |