# Creating a lambda
l = lambda { |name| "Hi #{name}!" }
# Executing the lambda
l.call("foo") # => Hi foo!Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.
My top contenders, mostly based on popularity / community etc:
- Angular
- Backbone
- React
- Ember
Mostly about MVC (or derivatives, MVP / MVVM).
| #!/bin/bash | |
| files=$(git diff --cached --name-only | grep '\.js$') | |
| # Prevent ESLint help message if no files matched | |
| if [[ $files = "" ]] ; then | |
| exit 0 | |
| fi | |
| echo $files | xargs eslint |
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| </style> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script> | |
| <script type="text/javascript"> | |
| /*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ | |
| !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return |
###Redux Egghead Video Notes###
####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.
Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.
####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree
| NSLog(@"Harrison") | |
| NSString *firstName = @"Harrison"; | |
| NSLog(firstName); | |
| NSLog(@"Hello there, %@.", firstName); | |
| NSLog(@"%@ %@", firstName, firstName); | |
| NSString *lastName = @"Freni"; | |
| NSLog(@"%@ %@", firstName, lastName); | |
| NSNumber *age = @16; | |
| NSLog(@"%@ is %@ years old", firstName, age); | |
| NSArray *apps = @[@"AngryFowl", @"Lettertouch", @"Tweetrobot"]; |
Here are my goals that I would like to accomplish over the next year.
- Currently, I have a decent grasp over the language. There are still some ES5 methods I am not familiar with and ES6 is hit or miss with what I know. The JS ecosystem is still something I'm getting used to (npm) and using a tool like webpack is still tough to wrap my head about.
- Success would be fully understanding all the little quirks of JS and keeping up with the latest version of the language. Being able to structure modern client side applications using webpack and taking advantage of npm. Also, I would like to become fairly proficient with building out API's with Node.
- Resources for learning:
- YDKJS