Table of Contents generated with DocToc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentWillReceiveProps(nextProps) { | |
if (nextProps.lastRequestedUserLocationAt > this.props.lastRequestedUserLocationAt) { | |
this.centerMapToUser(nextProps.currentLocation); | |
} | |
if (nextProps.lastUpdated > this.props.lastUpdated) { | |
const markers = this.createMarkersForLocations(nextProps); | |
if (markers && Object.keys(markers)) { | |
const clusters = {}; |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this
object, and we've seen some awesome benefits from doing such.
Up until recently, a typical unit test for us looked something like this:
describe('views.Card', function() {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PaintView extends View { | |
public static final int MAX_FINGERS = 5; | |
private Path[] mFingerPaths = new Path[MAX_FINGERS]; | |
private Paint mFingerPaint; | |
private ArrayList<Path> mCompletedPaths; | |
private RectF mPathBounds = new RectF(); | |
public PaintView(Context context) { | |
super(context); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numTiers = 100, | |
triangle, | |
start, | |
stop; | |
/** | |
* | |
* First version uses recursion | |
* | |
*/ |