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; |
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.
const cache = {} | |
export default getJSONWithCache(url) { | |
return cache[url] ? | |
Promise.resolve(cache[url]) : | |
getJSON(url).then(json => { | |
cache[url] = json | |
return json | |
}) | |
} |
// Originally taken from https://github.com/mgtitimoli/await-mutex | |
class Mutex { | |
constructor() { | |
this._locking = Promise.resolve(); | |
this._locked = false; | |
} | |
isLocked() { | |
return this._locked; |
interface Position { | |
left:string; | |
top: string; | |
} | |
@Component({ | |
selector: 'drag-demo', | |
template: ` | |
<div #target [ngStyle]="boxPosition | async">drag me</div> | |
` | |
}) |
environment = {{}} | |
target = "lua" | |
function nil63(x) | |
return(x == nil) | |
end | |
function is63(x) | |
return(not nil63(x)) | |
end | |
function no(x) | |
return(nil63(x) or x == false) |