Skip to content

Instantly share code, notes, and snippets.

View adityasonel's full-sized avatar
♾️
Wake, Code [Refract], Sleep, Repeat!

Aditya adityasonel

♾️
Wake, Code [Refract], Sleep, Repeat!
View GitHub Profile
@adityasonel
adityasonel / main.go
Last active April 24, 2020 08:26
Benchmarks test to know how much memory can be saved by using struct{} instead of booleans.
package main
import (
"fmt"
"testing"
)
func benchmarkBooleans(b *testing.B) {
s := make(map[int]bool)
@VladSumtsov
VladSumtsov / ColorChangeEvaluatorListener.java
Last active October 16, 2020 08:57
Change viewpager background color on swipe. ViewPager background color evaluator.
import android.animation.ArgbEvaluator;
import android.os.Handler;
import android.support.v4.view.ViewPager;
import static android.support.v4.view.ViewPager.SCROLL_STATE_IDLE;
import static com.corewillsoft.loansdeposits.ui.utils.SwipeDirectionDetector.Direction.LEFT;
import static com.corewillsoft.loansdeposits.ui.utils.SwipeDirectionDetector.Direction.RIGHT;
public abstract class ColorChangeEvaluatorListener implements ViewPager.OnPageChangeListener {
@dhavaln
dhavaln / Decompress.java
Last active December 14, 2022 10:01
Android Download and Unzip File
package com.jumpbyte.webserver;
import android.content.Context;
import android.util.Log;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@Aracem
Aracem / ParallaxPageTransformer.java
Last active March 8, 2023 17:28
Parallax transformer for ViewPagers that let you set different parallax effects for each view in your Fragments.
package com.aracem.utils.animations.pagetransformation;
import org.jetbrains.annotations.NotNull;
import android.support.v4.view.ViewPager;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@anorth
anorth / ZoomLayout.java
Created March 29, 2014 00:06
Pinch-zoomable Android frame layout
package au.id.alexn;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.FrameLayout;
@emil2k
emil2k / Connectivity.java
Last active August 5, 2024 10:48
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: