django 기본 테스트는 데이터베이스 마이그레이션 덕에 느리고 번거롭기 때문에 py.test와 model_mommy를 사용해서 빠르게 테스트를 하는 방법을 소개함.
- py.test : http://pytest.org/
- pytest-django : http://pytest-django.readthedocs.org/
- model_mommy : http://model-mommy.readthedocs.org/
django 기본 테스트는 데이터베이스 마이그레이션 덕에 느리고 번거롭기 때문에 py.test와 model_mommy를 사용해서 빠르게 테스트를 하는 방법을 소개함.
query IntrospectionQuery { | |
__schema { | |
queryType { name } | |
mutationType { name } | |
subscriptionType { name } | |
types { | |
...FullType | |
} | |
directives { |
// Variables just contain an integer. We can have a maximum of `Int.max` variables in our program. ¯\_(ツ)_/¯ | |
private struct Var { | |
static var freshVarIx = 0 | |
let ix: Int | |
init() { | |
Var.freshVarIx+=1 | |
ix = Var.freshVarIx | |
} | |
} |
SOURCE: http://htmlpurifier.org/live/smoketests/xssAttacks.php |
First of all, this is not my brilliant effort to get react-native working on Windows, it is the collation of work by others, particularly @mqli and @Bernd Wessels. I've just summarised what worked for me.
If you would prefer to read what I've plagerised, head over to mqli's great gist
react-native-cli 0.1.5
, react-native 0.12.0
on Windows 10, node 4.1.1, and Android (physical Nexus 6 and AVD with API v22)Keep this github issue handy, it’s the bucket for all Windows/Linux related tricks to get RN working.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
import React, {PropTypes} from 'react'; | |
import TransitionGroup from '../transitionGroup'; | |
class StaggeredTransitionGroup extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 0 | |
}; | |
} |
By @dmvaldman
Functional Reactive Programming (FRP) is generating buzz as an alternative to Object Oriented Programming (OOP) for certain use cases. However, an internet search quickly leads a curious and optimistic reader into the rabbit-hole of monads, functors, and other technical jargon. I’ve since emerged from this dark and lonely place with the realization that these words are mere implementation details, and that the core concepts are far more universal. In fact, the groundwork was laid down many centuries before the first computer, and has more to do with interpretations of reality, than structuring programs. Allow me to explain.
There’s an old thought experiment that goes like this:
facebook/flux 2.0.32.1.0で追加されたflux/utils
について
see also 2015-08-17のJS: redux 1.0.0、flux-utils、Firefox 40 - JSer.info
はてなブックマーク検索を作りながらFlux Utilsについて学ぶ | Web Scratchにもっと具体的な解説を書きました
Hi Zach :D
Modals are funny beasts, usually they are a design cop-out, but that's okay, designers have to make trade-offs too, give 'em a break.
First things first, I'm not sure there is such thing as a "simple" modal that is production ready. Certainly there have been times in my career I tossed out other people's "overly complex solutions" because I simply didn't understand the scope of the problem, and I have always loved it when people who have a branch of experience that I don't take the time