Skip to content

Instantly share code, notes, and snippets.

View swolfand's full-sized avatar

Sam Wolfand swolfand

  • Slack
  • San Francisco, CA
View GitHub Profile
@swolfand
swolfand / scrolling_toolbar_layout.xml
Created May 1, 2016 22:13
This is a normal toolbar that will collapse up when the list if scrolled and scrolls in when you reach the top
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.AppBarLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
package com.samwolfand.stockhawk.ui.adapter;
import android.app.Application;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.support.v7.widget.RecyclerView;
public abstract class CursorRecyclerViewAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
private static final String LOG_TAG = CursorRecyclerViewAdapter.class.getSimpleName();
private Cursor mCursor;

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.