
July 25 | 10:36 pm | Providence, RI
Danger: Do not look into laser with remaining eye
The Vandermark 5, a group of young Chicagoans, started the process with a mix of wailing horns, cello and bowed acoustic bass, completing the demolition on their final song as the second-stage crowd roared. “Some people probably hated it,” said cellist Fred Lonberg-Holm, “and some people have told us it was their favorite thing of the festival so far.”
“It is amazing that four centuries after Roger Williams founded this great state on liberty and individualism, Rhode Island again stands alone in New England, holding back a tide of cultural revolution and belief that would radically change our families and communities"I agree that it is amazing that Rhode Island is honoring its heritage of liberty by denying equal marriage rights to all of its citizens - amazingly bad. I also agree that granting same-sex marriage rights would definitely change our families and communities - for the better.
The earliest recorded evidence of the cultivation of tea plants comes from China in the 14th century...
List<String> l = new ArrayList<String>() {{
add("A");
add("B");
add("C");
}};
public static final Map<Integer,Integer> primes = (
Map<Integer,Integer> t = new HashMap<Integer,Integer>();
t.put(1, 2);
t.put(2, 3);
t.put(3, 5);
t.put(4, 7);
Collections.UnmodifiableMap(t));
public static final Map<Integer,Integer> primes = Collections.unmodifiableMap(
new HashMap<Integer,Integer>() {{
put(1,2);
put(2,3);
put(3,5);
put(4,7);
}});
import java.io.File
def makeFilestream(filelist: Stream[File]) : Stream[File] = {
if (!filelist.isEmpty) {
val file = filelist.head
if (file.isDirectory) {
Stream.cons(file, makeFilestream(file.listFiles.toStream.append(filelist drop 1)))
} else {
Stream.cons(file, makeFilestream(filelist drop 1))
}
} else {
Stream.empty
}
}
def filestream(root: File) : Stream[File] = {
val filelist:Stream[File] = root.listFiles.toStream
makeFilestream(filelist)
}
foreach, map, reduceLeft/Right, etc. are supported, eliminating the need to load the directory tree into memory and storing it in a List before operating on it.
val tmpdir = filestream(new File("/tmp"))
tmpdir.foreach(println)
val homedir = filestream(new File("/Users/username"))
homedir.filter(f => f.isDirectory).take(10).foreach(println)
val homedir = filestream(new File("/Users/username"))
val biggestFile = homedir.reduceLeft(
(a, b) => if (a.length > b.length) a else b)
val homedir = filestream(new File("/Users/username"))
val firstJavaFile = homedir.find(f => f.getName().endsWith(".java"))
