duplicates = multiple editions
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
package com.myproject.cassandraloading; | |
import static com.google.common.collect.Iterables.filter; | |
import static com.google.common.collect.Iterables.transform; | |
import java.io.File; | |
import java.lang.management.ManagementFactory; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.nio.ByteBuffer; |
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
currentModel: null, | |
singleModel: false, | |
model: function(){ | |
function closure(username) { | |
// using firebase adapter | |
return store.query('user', { |
"use strict"; | |
var fs = require("fs"); | |
var path = require("path"); | |
var Sequelize = require("sequelize"); | |
var env = process.env.NODE_ENV || "development"; | |
var config = require(__dirname + '/../config/config.json')[env]; | |
var sequelize = new Sequelize(config.database, config.username, config.password, config); | |
var db = {}; |
// http://thecodebarbarian.com/2015/03/20/callback-hell-is-a-myth | |
// some things changed because I have to copy from image | |
describe('.totalValue', function() | |
it('should calculate the total value of items in a space', function(done){ | |
var table = new Item('table', 'dining room', '1', '3000'); | |
var chair = new Item('chair', 'living room', '3', '300'); | |
var couch = new Item('couch', 'living room', '2', '1100'); | |
var chair2 = new Item('chair', 'dining room', '4', '500'); | |
var bed = new Item('bed', 'bed room', '1','2000'); | |
var listenableMap = new WeakMap(); | |
export function getListenable (object) { | |
if (!listenableMap.has(object)) { | |
listenableMap.set(object, {}); | |
} | |
return listenableMap.get(object); | |
} |
package main | |
import ( | |
eventsource "github.com/antage/eventsource/http" | |
redis "github.com/vmihailenco/redis" | |
"log" | |
"net/http" | |
) | |
func haltOnErr(err error){ |
/** | |
WHAT: A very simple example of redux + redux-simple-router using Typescript. | |
WHY: The official example found here: https://github.com/rackt/redux-simple-router/tree/1.0.2/examples/basic has problems: | |
1) it is spread over many files making it very hard to "skim" | |
2) it is organized by function, not by feature. (Example: learning "how to manipulate redux state" is spread over 5 files in 4 folders) | |
3) there are no comments explaining what's going on/why. | |
WHO: by JasonS@Novaleaf.com |
Debounce a function when you want it to execute only once after a defined interval of time. If the event occurs multiple times within the interval, the interval is reset each time.
Example A user is typing into an input field and you want to execute a function, such as a call to the server, only when the user stops typing for a certain interval, such as 500ms.