var url = '/product/shoes/234'
var regex = '/(product|:[a-zA-Z0-9]+)/(shoes|:[a-zA-Z0-9]+)/(234|:[a-zA-Z0-9+)'
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .scrollbox { | |
| overflow: auto; | |
| width: 200px; | |
| max-height: 200px; | |
| margin: 50px auto; |
| var BrowserDetect = | |
| { | |
| init: function () | |
| { | |
| this.browser = this.searchString(this.dataBrowser) || "Other"; | |
| this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown"; | |
| }, | |
| searchString: function (data) | |
| { | |
| for (var i = 0; i < data.length; i++) { |
| # http://rubular.com/ | |
| def shortcode (input) | |
| regex = /\[([a-zA-Z0-9]+\s.+)\]/i | |
| matches = regex.match(input) | |
| splits = matches[1].split(" ") | |
| attrs = Hash.new | |
| splits[1, splits.length].each do |attr| | |
| attr = attr.strip().split("=") |
| http://petapixel.com/2015/02/21/a-practical-guide-to-creating-superresolution-photos-with-photoshop/ | |
| Camera Settings | |
| - Handheld | |
| - f/5.6 to f/11 | |
| - Hand holdable shutter speed – 1/(2*focal length) recommended | |
| - Lower ISOs are preferable, set as f/number and shutter dictate for a neutral exposure or set Auto ISO | |
| - Continuous burst mode – minimum of 20 images | |
| - RAW |
| module.exports = function (grunt) { | |
| grunt.initConfig({ | |
| connect: { | |
| server: { | |
| options: { | |
| port: 8080, | |
| hostname: '*', | |
| keepalive: true, | |
| onCreateServer: function (server, connect, options) { }, | |
| } |
| SELECT id, name, latitude, longitude, (3959 * acos(cos(radians({$this->lat})) * cos(radians(latitude)) * cos(radians(longitude) - radians({$this->lng})) + sin(radians({$this->lat})) * sin(radians(latitude)))) AS distance | |
| FROM trailers | |
| WHERE latitude IS NOT NULL | |
| ORDER BY distance |
| events.publish('/page/load', { | |
| url: '/some/url/path' // any argument | |
| }); | |
| var subscription = events.subscribe('/page/load', function(obj) { | |
| // Do something now that the event has occurred | |
| }); | |
| // ...sometime later where I no longer want subscription... | |
| subscription.remove(); |
| new Promise(function (reject) { | |
| }).then(function (reject) { | |
| reject('this is an error'); | |
| }).then(function () { | |
| console.log('never run'); | |
| }).catch(function (err) { | |
| console.log('err', err); | |
| }).finally(function () { |
| article { | |
| h1, h2, h3, h4, h5, h6, img, ul, ol { margin-bottom: 20px; } | |
| h1 { font-size: 2em; line-height: 1.5; } | |
| h2 { font-size: 1.5em; line-height: 1.5; } | |
| h3 { font-size: 1.17em; line-height: 1.5; } | |
| h4 { font-size: 1em; line-height: 1.5; } | |
| h5 { font-size: 0.83em; line-height: 1.5; } | |
| h6 { font-size: 0.67em; line-height: 1.5; } | |
| strong { font-weight: bold; } | |
| img { display: block; max-width: 100%; margin-bottom: 20px; } |