First, let's assemble the data. Say we have two sets of objects: Fruits and Vegetables.
const fruits = [
{
name: 'Apple',
color: 'Green'
},
{
name: 'Banana',
First, let's assemble the data. Say we have two sets of objects: Fruits and Vegetables.
const fruits = [
{
name: 'Apple',
color: 'Green'
},
{
name: 'Banana',
import { Component, Input } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { AngularFire, FirebaseListObservable } from 'angularfire2'; | |
import { Observable } from 'rxjs'; | |
declare var firebase: any; | |
interface Image { | |
path: string; |
On OS X the Packed Pixels display won't automatically show up as "Retina" or "HiDPI" resolution, instead the OS will use the full resolution of the display making everything tiny. This can be changed using the 3rd party app (non-free) SwitchResX.
First, download SwitchResX.
You can play with the resolutions for the Packed Pixels which is probably listed as Color LCD (2). However not all of the HiDPI resolutions work due to an OS X bug. If you are happy with any of the ones that do work then stop here, else continue.
If you're on El Capitan or later you need to disable System Integrity Protection (temporarily) to add a custom resolution for Packed Pixels. Follow the instructions from SwitchResX creator.
Now add a Custom Resolution that is "scaled". It must be 2 pixels bigger or smaller than the native resolution in one direction (this is the OS X quirk). I found bigger makes it slightly blurry so go w
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// init VPN manager | |
self.vpnManager = [NEVPNManager sharedManager]; | |
// load config from perference | |
[_vpnManager loadFromPreferencesWithCompletionHandler:^(NSError *error) { |
awk ' | |
BEGIN { | |
buffer="" | |
} | |
{ | |
gsub(/<\/*trk>/,"",$0) | |
gsub(/<\/*trkseg>/,"",$0) | |
gsub(/<trkpt/,"<wpt", $0) | |
gsub(/<\/trkpt>/,"<\/wpt>", $0) | |
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
These rules are adopted from the AngularJS commit conventions.
www.lsauer.com; 2013 lo sauer ###JSONDecodeError: Expecting value: line 1 column 1 (char 0) ###ValueError: Expecting property name ######Related to: http://stackoverflow.com/questions/16573332/jsondecodeerror-expecting-value-line-1-column-1-char-0 Trying to parse json in python. ValueError: Expecting property name http://stackoverflow.com/questions/9187885/trying-to-parse-json-in-python-valueerror-expecting-property-name
###Troubleshoot
[merge] | |
keepBackup = false | |
tool = p4merge | |
[mergetool "p4merge"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\"" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false | |
[diff] | |
tool = p4merge |
var triangular = function (value) { | |
var abs = Math.abs(value); | |
return ((abs / 2) * (abs + 1)) * (abs / value) || 0; | |
}; | |
// Testing code. | |
var testTriangular = function () { | |
var testTriangularValue = function (arg, value, id) { | |
console.log(triangular(arg) === value ? "Test " + id + " passed." : "Test " + id + " failed."); | |
}; |