(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
void set_cloexec(int fd) { |
// async の引数が無い場合、全部が次に渡される様にして欲しい。 | |
// コールバック関数の引数が3つ以上の場合、次のステップには配列が入ってきてよい。 | |
// 目的 | |
// コールバック関数の引数がerrのみ、もしくは二つの場合、 | |
// つまりas(1)で事足りるケースをnueに特別扱いして貰って楽に記述したい。 | |
// nodeのcallbackを取る関数は殆どがそうなっている。 | |
// 現状1 | |
flow(function start(file1, file2) { | |
fs.readFile(file1, 'utf8', this.async(as(1))); |
/* | |
Copyright (c) Microsoft | |
All rights reserved. | |
Licensed under the Microsoft Limited Public License (the “License”); you may not | |
use this file except in compliance with the License. | |
You may obtain a copy of the License at http://msdn.microsoft.com/en-us/cc300389. | |
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS | |
OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. |
import org.joda.time.DateTime; | |
import org.seasar.doma.Column; | |
import org.seasar.doma.Entity; | |
@Entity | |
public abstract class LogicalDeletable { | |
@Column | |
protected DateTime deletedTime; | |
/** | |
* A generic confirmation for risky actions. | |
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function | |
*/ | |
angular.module('app').directive('ngReallyClick', [function() { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
element.bind('click', function() { | |
var message = attrs.ngReallyMessage; |
angular.module('stateMock',[]); | |
angular.module('stateMock').service("$state", function($q){ | |
this.expectedTransitions = []; | |
this.transitionTo = function(stateName){ | |
if(this.expectedTransitions.length > 0){ | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName){ | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} | |
}else{ |
/** | |
* A Resolver that doesn't call getClass(). | |
* | |
* @author kawasima | |
*/ | |
public class SafeResolver extends DefaultResolver { | |
private static final char NESTED = '.'; | |
private static final char MAPPED_START = '('; | |
private static final char MAPPED_END = ')'; | |
private static final char INDEXED_START = '['; |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).