Skip to content

Instantly share code, notes, and snippets.

View moderateepheezy's full-sized avatar

Afees Lawal moderateepheezy

View GitHub Profile
@moderateepheezy
moderateepheezy / PairByGroup.swift
Created April 15, 2017 14:28
Shuffle and pair in group
extension Array {
func chunked(by chunkSize: Int) -> [[Element]] {
return stride(from: 0, to: self.count, by: chunkSize).map {
Array(self[$0 ..< Swift.min($0 + chunkSize, self.count)])
}
}
}
extension Array {
mutating func shuffle () {
@moderateepheezy
moderateepheezy / PairByGroup.java
Created April 15, 2017 11:25
Shuffle and pair in group of two.
public class MainClass {
public static void main(String[] args) {
Scanner lop = new Scanner(System.in);
List<Pair> pairList = new ArrayList<>();
System.out.println("Enter number total number of people to group");
public class VendorNewAdapter extends FirebaseRecyclerAdapter<NewsPaper, NewsPaperHolder> implements SimpleAlertDialog.SingleChoiceArrayItemProvider{
private static final int REQUEST_CODE_SINGLE_CHOICE_LIST = 34005;
private static final int REQUEST_CODE_SINGLE_Any_CHOICE_LIST = 340005;
private static final java.lang.String CHOICE_DIALOG = "dialogTagChoice";
private boolean isColorsInverted = false;