View PreferenceManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package in.blackpaper.benitinhere.data.prefs; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.os.Build; | |
public class PreferencesManager { | |
private final static String TAG = PreferencesManager.class.getSimpleName(); | |
// private static PreferencesManager instance; | |
private static SharedPreferences pref; |
View permissions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void selectImage() { | |
try { | |
PackageManager pm = getPackageManager(); | |
int hasPerm = pm.checkPermission(Manifest.permission.CAMERA, getPackageName()); | |
if (hasPerm == PackageManager.PERMISSION_GRANTED) { | |
final CharSequence[] options = {"Take Photo", "Choose From Gallery", "Cancel"}; | |
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(context); | |
LayoutInflater inflater = this.getLayoutInflater(); | |
View dialogView = inflater.inflate(R.layout.chooseimage_alertdialog_l, null); |
View permissions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void selectImage() { | |
try { | |
PackageManager pm = getPackageManager(); | |
int hasPerm = pm.checkPermission(Manifest.permission.CAMERA, getPackageName()); | |
if (hasPerm == PackageManager.PERMISSION_GRANTED) { | |
final CharSequence[] options = {"Take Photo", "Choose From Gallery", "Cancel"}; | |
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(context); | |
LayoutInflater inflater = this.getLayoutInflater(); | |
View dialogView = inflater.inflate(R.layout.chooseimage_alertdialog_l, null); |
View Android dropdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<TextView | |
android:id="@+id/alert_title" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" |
View Datacrawler.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2,sys | |
orig_stdout = sys.stdout | |
f = open('E:/Documents/sample.html', 'w') | |
sys.stdout = f | |
response=urllib2.urlopen("https://cracxpro.com/microsoft-office-2013-product-key-generator/") | |
source=response.read() | |
print source |
View maven.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Run the following command | |
mvn archetype:generate | |
// -DgroupId=.......... | |
// -DartifactId=......... | |
// -DarchetypeArtifactId=maven-archetype-quickstart | |
// -DinteractiveMode=false | |
View launch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "java", | |
"name": "Debug (Launch)-App<com.blackpaper.topdf>", | |
"request": "launch", |
View Custom_bashrc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
View Screenshots.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Scanner; | |
class Screenshots { | |
public static void main(String args[]) { | |
BufferedReader bufferedReader = null; | |
Scanner scanner=new Scanner(System.in); |
View Screenshots.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def Screenshot(n): | |
pageno=1 | |
for pageno in range(pageno,n): | |
print ("Wait...") | |
os.system("adb exec-out screencap -p > " +str(pageno)+".png") | |
os.system("adb shell input swipe 300 700 50 700") | |
Screenshot(8) |
NewerOlder