And this is all the output that I get.
A:
You can use awk to print the lines that contain the string and don't contain the string:
$ awk '/hapdar/ || /df76b833ed/' file
The || operator has higher precedence than the || operator, so it is evaluated from right to left, which explains the behaviour you're getting.
A:
or is an AND operator. (no need to write && between || and ||)
if you use the condition ||, it will return all the rows which contains it or all the rows which does not contains it.
Q:
Android /Java: How to determine if a button is clicked on a background thread?
Is it possible to determine if a button is clicked on a background thread?
I am loading some data on a background thread, and I want to be able to determine if the data has been loaded and if so then save it to the shared preferences.
This is the loading code:
public void showDialog(){
Log.d("==>", "in background thread");
try {
//
} catch (IOException e) {
Log.d("==>", "IOException caught");
// TODO: change UI accordingly
e.printStackTrace();
}
runOnUiThread(new Runnable() {
public void run() {
Log.d("==>", "in background thread 2");
requestdata(functionCall);
Log.d("==>", "Done processing data");
}
});
}
And this is the onClick code: 01e38acffe
Related links:
Comments