Jim,
You gotta make sure the limit for the second loop is the starting point plus the length of your name.
/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Joshua Stoutenburg.";
var myName = 'Joshua Stoutenburg';
Jim,
You gotta make sure the limit for the second loop is the starting point plus the length of your name.
/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Joshua Stoutenburg.";
var myName = 'Joshua Stoutenburg';
~/projects/deseretdigital/ksldeals/ksldeals
$ bower install --save deseretdigital-ui/ksl-header#v0.3.3
bower ksl-header#v0.3.3 not-cached git://github.com/deseretdigital-ui/ksl-header.git#v0.3.3
bower ksl-header#v0.3.3 resolve git://github.com/deseretdigital-ui/ksl-header.git#v0.3.3
bower ksl-header#v0.3.3 download https://github.com/deseretdigital-ui/ksl-header/archive/v0.3.3.tar.gz
bower ksl-header#v0.3.3 extract archive.tar.gz
bower ksl-header#v0.3.3 resolved git://github.com/deseretdigital-ui/ksl-header.git#0.3.3
bower ksl-styles#0.0.4 cached [email protected]:deseretdigital-ui/ksl-styles.git#0.0.4
bower ksl-styles#0.0.4 validate 0.0.4 against [email protected]:deseretdigital-ui/ksl-styles.git#0.0.4
Requests
It all starts with a request. The request is quite simple: some action on some resource with some parameters. I'd like requests to be easy to make and in a format that is easy to construct.
Endpoints
Endpoints represent resources. Example: /dogs
, /cats
, /users
.
I'm curious if a second endpoint to get a single entity (/dogs/:id
) is really needed or if we could just piggy back on the collection endpoint (/dogs?ids=[...]
). You get guaranteed consistency since there aren't two endpoints to maintain, plus you can get a whole batch using the ids.
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
.media { | |
&--ratio-16-9 { | |
padding-top: percentage(9/16); | |
} | |
} |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
.media { | |
&--ratio-16-9 { | |
padding-top: percentage(9/16); | |
} | |
} |
Verses Per Day: 74
Many times, when processing a tree, the natural tendency is to reach for a recursive function. But recursive functions can be hard to grok and also run into call-stack issues. Try a queue instead.
For example, I wanted to find all clean tasks in my tasks directory. You just have to tell the queue processing function what to do with each item, and how to collect more items into the queue from each item.
var queue = require('./processQueue');
var tasks = require('require-dir')('.', { recurse: true });
var cleanTasks = [];
var process = function (item) {
var getResponsiveDimensions = function ($element, minWindowWidth, maxWindowWidth) { | |
minWindowWidth = minWindowWidth || 320; | |
maxWindowWidth = maxWindowWidth || 1280; | |
var dimensions = { | |
minWidth: Infinity, | |
maxWidth: 0, | |
minHeight: Infinity, | |
maxHeight: 0, |