I hereby claim:
- I am electron0zero on github.
- I am electron0zero (https://keybase.io/electron0zero) on keybase.
- I have a public key ASA_iB5JeTWzhJt6cf3US-TRIzzsYJgx9nf_EsypEhY4sgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public class ContentListFragment extends ListFragment implements LoaderCallbacks<List<Content>>{ | |
@Override | |
public void onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ | |
return inflater.inflate(R.layout.layout, container, false); | |
} | |
@Override | |
public void onViewCreated(View view, Bundle savedInstanceState){ | |
super.onViewCreated(view, savedInstanceState); | |
getLoaderManager().initLoader(0, null, this); |
// Do the maths | |
for( | |
var sum = 0, i = 1; | |
i < 1000; | |
!(i % 3 && i % 5) && (sum += i), i++ | |
); | |
// Log the result | |
console.log(sum); |
Please note, data will be randomised until December 2014. It is based on Ipsos MORI's long term Issues Index survey 1974 - 2014.
T0 = Thread.main | |
t1 = Thread.new(Thread.current) { |x| Thread.current[:parent] = x; sleep 1_00_000; } | |
t2 = Thread.new(Thread.current) { |x| Thread.current[:parent] = x; sleep 1_00_000; } | |
(t1[:parent] == t2[:parent]) && (t1[:parent] == T0) | |
__END__ | |
# to find out the parent of a thread, ie. was spawned by which thread |
#Installing VirtualBox | |
echo "Installing VirtualBox........................" | |
sudo apt-get install virtualbox | |
#Installing kubectl https://kubernetes.io/docs/getting-started-guides/kubectl/ | |
echo "Installing kubectl..........................." | |
wget https://storage.googleapis.com/kubernetes-release/release/v1.4.4/bin/linux/amd64/kubectl | |
chmod +x kubectl | |
sudo mv kubectl /usr/local/bin/kubectl |
# === Bash functions that are used in aliases | |
# get bash shell on docker container. | |
# works only if one container is running | |
function get_bash_docker() { | |
count=$(docker ps -q | wc -l) | |
if [[ $count = 1 ]]; then | |
container_id=$(docker ps -q) | |
echo "Getting bash shell in ${container_id}" | |
docker exec -it ${container_id} bash |
package main | |
import ( | |
"os" | |
"github.com/prometheus/client_golang/prometheus" | |
"github.com/prometheus/client_golang/prometheus/promauto" | |
"github.com/prometheus/common/expfmt" | |
) |
import android.Manifest; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.ContextCompat; | |
import android.util.Log; |