Skip to content

Instantly share code, notes, and snippets.

Hardik geniushkg

Block or report user

Report or block geniushkg

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
geniushkg / filter category in result retrofit list
Created Sep 27, 2016
sample gist to filter content from retrofit response
View filter category in result retrofit list
// this is retrofit response
Eventlist eventlist = response.body();
List<Website> websites = eventlist.getWebsites(); // website is POJO class for even as per api
List<Website> filteredWebsite = new ArrayList<Website>(); // empty list new
for(Website temp:websites){
filteredWebsite.add(temp); // is BOT or Competitive or whichever selected
View 986854243
import java.util.*;
public class QueueSample{
public static void main(String args[]){
Queue<Character> queVar = new LinkList<Character>();
System.out.println("Adding new character to queue.");
geniushkg / numberOfColumn
Created Jun 24, 2016
A simple method helper for grid in android to be dynamic in number of columns
View numberOfColumn
public int numOfColumnsForOrientation() {
Display display = getActivity().getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
int numOfColoums = 0;
if (width < height) {
// portrait mode
numOfColoums = 2;
if (width > 600) { // for tablet sw600
numOfColoums = 3;
You can’t perform that action at this time.