126 karma · joined January 29, 2014
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Solution {
public static void main(String[] args) throws IOException, InterruptedException {
final Runtime rt = Runtime.getRuntime();
final Process pr = rt.exec("uname -a");
new Thread(new Runnable() {
public void run() {
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String line = null;
try {
while ((line = input.readLine()) != null)
System.out.println(line);
} catch (IOException e) {
e.printStackTrace();
}
}
}).start();
pr.waitFor();
}
}"Until 1959, the importation of diamonds had not even been permitted by the postwar Japanese government. When the campaign began, in 1967, not quite 5 percent of engaged Japanese women received a diamond engagement ring. By 1972, the proportion had risen to 27 percent. By 1978, half of all Japanese women who were married wore a diamond; by 1981, some 60 percent of Japanese brides wore diamonds. In a mere fourteen years, the 1,500-year Japanese tradition had been radically revised. Diamonds became a staple of the Japanese marriage. Japan became the second largest market, after the United States, for the sale of diamond engagement rings."
[1] http://www.theatlantic.com/magazine/archive/1982/02/have-you...
- Brad Stone's "The Everything Store: Jeff Bezos and the Age of Amazon" [1]
- Richard Branson's "Everything I Know About Leadership The Virgin Way" [2]
[1] http://www.amazon.com/Everything-Store-Jeff-Bezos-Amazon/dp/...
[2] http://www.amazon.com/Everything-About-Leadership-Virgin-Har...
The book is not focused on failures, but it's full of really good advices on what to do when a company is moving into disaster.
[1] http://www.amazon.com/The-Hard-Thing-About-Things/dp/0062273...
Audible is another good substitution for non-technical paper books. It transforms daily commute into productive time. You don't need constant connection to network - books can be pre-loaded and then accessed offline without any problems plus I have a luxury to set 1.25x play speed and enjoy speed of reading above average.
Though, while role of paper books is reduced, there's still a lot of value for paper books. Paper books are much easier to follow for home repairs (DIY guides). I like printed catalogues more than electronic ones (like IKEA's one [1]).
[1] IKEA bookbook: https://www.youtube.com/watch?v=MOXQo7nURs0
[1] http://krebsonsecurity.com/2015/12/opm-breach-credit-monitor...
take(10, i -> range(0, i)
.mapToObj(j -> odd(i))
.collect(joining(" ")))
.collect(joining(" "));
For reference, odd and take will look like this: private static String odd(int i) {
return Boolean.toString(i % 2 != 0);
}
private static <T> Stream<T> take(int n, Function<Integer, T> f) {
return Stream.iterate(1, i -> ++i).map(f).limit(n);
}[1] https://sales.jetbrains.com/hc/en-gb/articles/200544871-5-Ca...
- old model: you keep using latest version you paid; no new updates;
- new model: you stop using the tool