contains common code snippets.
coroutines:
implementation 'androidx.fragment:fragment:1.4.1'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0-rc01'
package com.example.nileshdeokar.simplevibratedemo; | |
import android.os.Build; | |
import android.os.VibrationEffect; | |
import android.os.Vibrator; | |
import android.support.annotation.RequiresApi; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
/* |
package com.nieldeokar.whatsappaudiorecorder.recorder; | |
import android.media.AudioFormat; | |
import android.media.AudioRecord; | |
import android.media.MediaCodec; | |
import android.media.MediaCodecInfo; | |
import android.media.MediaFormat; | |
import android.media.MediaRecorder; | |
import android.os.Build; | |
import android.util.Log; |
import sys | |
import subprocess | |
import re | |
#/ | |
# Created by @nieldeokar on 25/05/2018. | |
#/ | |
# 1. Python script which will copy database file of debuggable apps from the android device to your computer using ADB. |
/* | |
* @author : Nilesh Deokar/ @nieldeokar | |
* instructions : | |
* 1. compile using 'gcc -Wall -o apache Apache_Server.c' | |
* 2. run ./apache | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> |
package droidninja.filepicker | |
import android.content.ContentResolver | |
import android.provider.MediaStore | |
import android.util.Log | |
/* | |
~ Nilesh Deokar @nieldeokar on 03/06/19 9:57 AM | |
*/ |
{ | |
"nodes": [ | |
{ "country": "East Timor", "code": "tl" }, | |
{ "country": "Canada", "code": "ca" }, | |
{ "country": "Turkmenistan", "code": "tm" }, | |
{ "country": "United States of America", "code": "us" }, | |
{ "country": "Lithuania", "code": "lt" }, | |
{ "country": "Cambodia", "code": "kh" }, | |
{ "country": "Ethiopia", "code": "et" }, | |
{ "country": "Swaziland", "code": "sz" }, |
/* | |
* Created by Nilesh Deokar<nieldeokar@gmail.com> on 18/4/19 2:43 PM | |
*/ | |
package me.umoove.busCounterApp.models; | |
import android.media.MediaRecorder; | |
import android.os.Build; | |
import android.os.Environment; | |
import android.util.Log; |
python -m SimpleHTTPServer 8080 |
int myOriginalValue = 0b0010; | |
// STEP 1 : 0b0001 << 3 = 0b1000; | |
// STEP 2 : OR 0b0010; originalValue | |
// -------------- | |
// RESULT : 0b1010; // 3rd bit is set to true | |
// Formula for setting a bit : | |
// myOriginalValue = myOriginalValue | (1 << position); |