A simple and beautiful video about the early failures, things and people that tries to put you down and we have to face before achieve what we really want.
“If you never failed, you never lived”
Take a look at http://www.phenoelit-us.org/dpl/dpl.html. The weakest part of a network nowadays, a unconfigured wireless router.
I don’t like the approach of calling native shell commands in any language instead of using multi platform libraries, but here is a little prof of concept Java program to call native commands.
import java.io.*;
import java.util.*;
public class Exec {
public static void main(String args[]) throws IOException {
Process proc = Runtime.getRuntime().e xec(args);
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
}
}
Usage:
java Exec VALID_COMMAND
Example:
$ java Exec echo hello
hello
ps: I had to write “e xec” instead of exec because it was triggering some very strange security protection in the blog engine here. If you need to compile this code change that. =P Also there’s no error handling, you should pass a valid command when executing this code.
How to add a shadow in a text view? How to improve the text readability on widgets?
There’s four properties on TextView related to shadows.
First a a normal TextView XML declaration.
Now the same TextView with the four shadow properties, the color, the x,y offset and the blur radius.