Takes a grid and returns an optimal set of rectangles that fills that grid
For example, the following grid:
[[1,1,0,1,1],
[1,1,1,1,1],
[0,1,1,1,0]]
# Ported from https://github.com/jzaefferer/jquery-validation/blob/master/jquery.validate.js | |
creditcard = (value) -> | |
# accept only spaces, digits and dashes | |
if /[^0-9 \-]+/.test(value) | |
return false | |
nCheck = 0 | |
nDigit = 0 | |
bEven = false |
require('http').Server(function (req, res) { | |
require('fs').createReadStream(__dirname + require('url').parse(req.url).pathname).pipe(res); | |
}).listen(9000); |
/* | |
Add this as bookmark in your browser and tap on the bookmark when your are creating a new PR. | |
Example: http://cl.ly/image/0D1k0d1W1R0Y/Screen%20Shot%202015-01-26%20at%203.57.30%20PM.png | |
*/ | |
javascript:(function() { | |
var e = document.getElementById('pull_request_body'); | |
if (e) {e.value +='#### :tophat: What? Why?\n\n\n#### :dart: What should QA test?\n\n\n#### :pushpin: Related tasks?\n\n\n#### :family: Dependencies?\n\n\n#### :clipboard: Subtasks\n- [x]\n- [ ]\n\n\n#### :ghost: GIF\n![]()';} | |
})(); |
In other programming communities, like the Ruby one, developers are more aware of testing new components. Ensuring every component is tested is not common within the mobile appcommunity.
Fortunately, iOS developers have been working over the years to bring that culture to iOS too. The community is developing new libraries that use native ones allow you to write your tests with a fresh and more readable syntax. This has provided a big impulse and every day more and more developers ensure that expected behaviour in their apps is tested.
The Redbooth iOS Team we've been strongly influenced by the Ruby backend team and we decided to introduce testing into our development flow. Thanks to components like Cocoapods, Schemes and targets and some other tools, testing has become an essential part of development cycle.