Skip to content

Instantly share code, notes, and snippets.

View ramonaharrison's full-sized avatar

Ramona Harrison ramonaharrison

  • The New York Times
  • New York, NY
View GitHub Profile
@ramonaharrison
ramonaharrison / Recursion.java
Created November 15, 2015 15:39
Recursion HW 11/6
package nyc.c4q.ramonaharrison;
/**
* Access Code 2.1
* Ramona Harrison
* recursion.java
*/
public class Recursion {
@ramonaharrison
ramonaharrison / Tree.java
Created November 15, 2015 16:24
Tree HW
package nyc.c4q.ramonaharrison;
import java.io.File;
import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
@ramonaharrison
ramonaharrison / BinaryAddition.java
Created November 15, 2015 16:44
Data Representation HW
package nyc.c4q.ramonaharrison;
/**
* Access Code 2.1
* Ramona Harrison
*/
public class BinaryAddition {
public static void main(String[] args) {
String s1 = Integer.toString(134,2);
/**
* Access Code 2.1
* Ramona Harrison
* MissingNumber.java
*
* I have an array of the numbers 1 to 100 in a random order. One of the numbers is missing.
* Write an algorithm to figure out the number. *
*
*/

Morning Challenge ☀️

  1. Go to https://repl.it/languages/java. If you haven't already, create an account using your GitHub account to sign in (click on the black cat icon).

  2. Start a new Java session. Use a System.out.println() statement to print each of the following pieces of information on a new line:

  • Your name
  • Where you came from this morning and how (e.g. "I rode the subway from Brooklyn.")
  • Something you learned yesterday
  • Something you hope to learn today

Morning challenge 🍃

  1. Create a new Android Studio project:
  • Use the Application name Activity Lifecycle
  • Use the Company domain yourname.c4q.nyc
  • Set the Project location to your ~/Desktop/accesscode directory.
  • On the next screen, select Phone and Tablet and set the Minimum SDK at API 19.
  • On the next screen, select Empty Activity to initialize your project with an empty activity. Continue to the next screen and name it MainActivity and keep Generate Layout File checked.
  • Click Finish to create your project.

Morning Challenge ☀️

Think of three problems you've encountered working on individual and/or team based software projects. Write each one down on a separate index card.

Hiding API keys in local.properties

  1. Add the API key to your local.properties file:
apiKey=<value>
  1. Add to the root level of your app-level build.gradle file:

Spy on your Access Cats database with Stetho

  1. Add Stetho to your app/build.gradle dependencies:
dependencies {
    // ...

    // Cupboard
 compile 'nl.qbusict:cupboard:2.1.4'

Morning Challenge ⛄

NO LAPTOPS

Given an unsorted int[] input and an int k, return the kth largest element in input.