Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
function Piecewise(xs, ys) { | |
return function(x) { | |
//bisect | |
var lo = 0, hi = xs.length - 1; | |
while (hi - lo > 1) { | |
var mid = (lo + hi) >> 1; | |
if (x < xs[mid]) hi = mid; | |
else lo = mid; | |
} | |
//project |
Once upon a time, there was a developer that had an issue using the TypeScript language. He wanted to share his issue with the community to get help, but he didn't know how to properly write the title that would best describe his problem. He struggled to find the appropriate words as he didn't know how to name "this behavior" or "that kind of type mechanism".
This story encouraged me to start writing a glossary of TypeScript. Hopefully it will help you if you have to look for an issue, write an issue, or communicate with other TypeScript developers.
Disclaimer: it was me, I was the developer that struggled. I still struggle though, but this means I still have things to learn, which is great!
import javafx.application.Application; | |
import javafx.beans.property.DoubleProperty; | |
import javafx.beans.property.ObjectProperty; | |
import javafx.beans.property.ReadOnlyObjectProperty; | |
import javafx.beans.property.SimpleObjectProperty; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import javafx.collections.FXCollections; | |
import javafx.collections.ObservableList; | |
import javafx.event.EventHandler; |
import java.util.concurrent.CountDownLatch; | |
import javax.swing.SwingUtilities; | |
import javafx.application.Platform; | |
import javafx.embed.swing.JFXPanel; | |
import org.junit.Rule; | |
import org.junit.rules.TestRule; | |
import org.junit.runner.Description; |
/******************************************************************************* | |
* Copyright (c) 2012 Rüdiger Herrmann | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Rüdiger Herrmann - initial API and implementation | |
* Frank Appel - code review, idea for assertEquals( T, Object, Object ) |
#!/bin/bash | |
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin) | |
CATALINA_HOME=/Users/username/tomcat | |
function shutdown() { | |
date | |
echo "Shutting down Tomcat" | |
$CATALINA_HOME/bin/catalina.sh stop |
package net.andrewspencer.util; | |
import sun.text.Normalizer; // java.text.Normalizer in 1.6 | |
/** | |
* Here's how to remove accents in Java 1.5. | |
* NB Doesn't separate ligatures. | |
*/ | |
// WARNING Uses unofficial Sun classes, so JVM-dependent. | |
// Normalizer became standard in Java 1.6, though. |