(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* A linear interpolator for hexadecimal colors | |
* @param {String} a | |
* @param {String} b | |
* @param {Number} amount | |
* @example | |
* // returns #7F7F7F | |
* lerpColor('#000000', '#ffffff', 0.5) | |
* @returns {String} | |
*/ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// DEPS: npm install jsts@0.17.0 | |
// USAGE: node remove_holes.js holey_coverage.geojson solid_coverage.geojson | |
var fs = require('fs'); | |
var jsts = require("jsts"); | |
var parser = new jsts.io.GeoJSONParser(); | |
var geojson = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')); | |
var removedHoles = 0; |
// node.js : Mailgun via API | |
var request = require('request') | |
var apiBaseUrl = 'https://api.mailgun.net/v3/sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org'; | |
var apiKey = 'key-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
var from = 'Excited User'; | |
var to = 'example@example.com'; | |
var subject = 'Hello'; | |
var text = 'Testing some Mailgun awesomness!'; |
Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
.table.table-ellipsis tbody td { | |
max-width: 100px; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap | |
} |
Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params
when you had a long URI with multiple parameters and nested routes.
Let's say you're building routes for a website www.music.com
. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.
At our application level, we could first have a Router to handle any requests to our albums.
const express = require('express');
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', | |
theme: new ThemeData( |