Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Avi Parshan avipars

🎯
Focusing
Block or report user

Report or block avipars

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MainActivity.java
Drawable clockMove = clock.getDrawable();
if (clockMove instanceof Animatable) {
((Animatable) clockMove).start();
}
@avipars
avipars / clock.xml
Last active Oct 25, 2018
Clock Animation
View clock.xml
<?xml version="1.0" encoding="utf-8"?>
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:aapt="http://schemas.android.com/aapt"
tools:targetApi="lollipop">
<aapt:attr name="android:drawable">
<vector
android:width="24dp"
android:height="24dp"
@avipars
avipars / open_mapping.vbs
Created Aug 28, 2018
Medium Post: Proguard Script
View open_mapping.vbs
Dim WshShell, BtnCode, strCurDir
REM open_url opens in chrome, it should be set to the URL where you can upload your Deobfuscation (Mapping) File on the Dev Console
open_url = "ENTER_URL_HERE"
Set WshShell = WScript.CreateObject("WScript.Shell")
BtnCode = WshShell.Popup("Open the mapping file", 7, "Mapping Android APK:", 4 + 32)
Select Case BtnCode
case 6 WshShell.run "chrome -url " &open_url
strCurDir = WshShell.CurrentDirectory
WshShell.run strCurDir & "\app\build\outputs\mapping\release"
case 7 WScript.Echo "Okay :("
@avipars
avipars / mapping.bat
Created Jul 12, 2018
Batch Files for Android Developers
View mapping.bat
start "" C:\Users\currentuser\Desktop\converter\app\build\outputs\mapping\release
REM change file path accordingly
REM when you are using Proguard and want to traverse to the mapping.txt file for upload to the play store deobfuscation files but just don't have the energy to open it manually
@avipars
avipars / layout.xml
Created Apr 13, 2018
Avoid Overlap RecyclerVIew
View layout.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/relative"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".MainActivity"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
@avipars
avipars / scrapeImages.py
Created Nov 21, 2017 — forked from genekogan/scrapeImages.py
scraping full size images from Google Images
View scrapeImages.py
from bs4 import BeautifulSoup
import requests
import re
import urllib2
import os
import argparse
import sys
import json
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search
@avipars
avipars / Image_Android
Created Jul 17, 2017
Help with getting crop to work
View Image_Android
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
assert cursor != null;
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
@avipars
avipars / Dijkstra.java
Created May 11, 2017 — forked from gennad/Dijkstra.java
Dijkstra algorithm java implementation
View Dijkstra.java
import java.util.*;
public class Dijkstra {
// assumes Nodes are numbered 0, 1, ... n and that the source Node is 0
ArrayList<Node> findShortestPath(Node[] nodes, Edge[] edges, Node target) {
int[][] Weight = initializeWeight(nodes, edges);
int[] D = new int[nodes.length];
Node[] P = new Node[nodes.length];
ArrayList<Node> C = new ArrayList<Node>();
@avipars
avipars / User.java
Created Apr 25, 2017
JSON Parser POJO Issue
View User.java
package com.snapr.app.opencv_test.Models;
import org.json.JSONException;
import org.json.JSONObject;
public class User {
//public ArrayList
<Item>
stl = new ArrayList
<Item>
();
You can’t perform that action at this time.