Skip to content

Instantly share code, notes, and snippets.

View pa1pal's full-sized avatar

Pawan Pal pa1pal

View GitHub Profile
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active March 29, 2024 10:25
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@cslarsen
cslarsen / binary_gcd.cpp
Created January 18, 2012 20:03
Binary gcd algorithm in C++ using iteration and bit shifts
/*
* The binary gcd algorithm using iteration.
* Should be fairly fast.
*
* Put in the public domain by the author:
*
* Christian Stigen Larsen
* http://csl.sublevel3.org
*/
int binary_gcd(int u, int v)
@arpit
arpit / Android TimeZone Ids
Created June 20, 2011 13:26
List of all Android TimeZone ids
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau