teaching machines

CS 145 Lab 9

Reminder Show your completed lab 8 checkpoints to your TA or instructor in the first 20 minutes of this lab. Checkpoint 1 One of the steps to mastery of a subject is to formulate your own questions. So, for your first checkpoint, please write three questions, one on each of the following topics: logical operators […]

CS 145 Lecture 19 – 2-D arrays

Agenda What does this do? Code Imager.java package lecture; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Random; import javax.imageio.ImageIO; public class Imager { public static void main(String[] args) throws IOException { int width = 512; int height = 256; int[][] pixels = new int[height][width]; // noisify(pixels); stripes(pixels); writeToFile(pixels); } private static void noisify(int[][] […]

CS 145 Lecture 18 – Searching arrays

Agenda linear search the truth behind objects: references stack vs. heap null Code States.java package lecture; import java.util.Scanner; public class States { private static String[] states = { “Alabama”, “Alaska”, “Arizona”, “Arkansas”, “California”, “Colorado”, “Connecticut”, “Delaware”, “Florida”, “Georgia”, “Hawaii”, “Idaho”, “Illinois”, “Indiana”, “Iowa”, “Kansas”, “Kentucky”, “Louisiana”, “Maine”, “Maryland”, “Massachusetts”, “Michigan”, “Minnesota”, “Mississippi”, “Missouri”, “Montana”, “Nebraska”, […]

CS 491 Lecture 19 – Smile and Wave

Agenda mixing widgets and SurfaceView write a custom camera app enhancing the camera preview Mixing widgets and SurfaceView An unfortunate consequence of switching to a SurfaceView is that our gestures no longer get recognized. GestureOverlayView and SurfaceView do not play well together. No documentation I can find details their incompatibility, but gesture recognition simply doesn’t […]

borglimj HW3

I have made a recipe master application. Its pretty simple, just start it and search for a particular ingredient and then hit the search button.  It will then populate the lower text field with recipes with the name of the ingredient in it title or with the ingredient itself.  

CS 491 Lecture 18 – Falling Math Part II

Agenda implement gestures continuous rendering SurfaceView Expression Before we dig any deeper, let’s push our expression code out to a class. I’ve provided most of it: But these problems remain: Randomly generate an expression that evaluates to a single digit. Allow it to fall delta seconds, acted upon by gravity. Gestures In Android 1.6, gestures […]

Last.fm Artist Finder – kendziba hw3

For this homework assignment I decided to hook into the API of one of my favorite online music sites; last.fm! Last.fm is an online community focused around tracking the music users listen to and providing recommendations based on that data. Last.fm also does a very good job at providing useful data about different musicians like […]

kozuchaj hw3 Meme generator

For this homework I decided to work with an automated meme generator provided by: http://api.automeme.net/ Their service was really easy to use in all that I had to do was GET the results of one of the webpages listed on their website instructions. One problem I ran into was that they do not format their JSON […]

CS 145 Lecture 17 – Arrays

Agenda arrays in life writing a fill method writing a raffle state/capital lookup Code Fill.java package lecture; public class Fill { public static void main(String[] args) { double[] series = fill(12, 54, 10); for (int i = 0; i < series.length; ++i) { System.out.println(series[i]); } } /** * Create a list of length items, whose […]

CS 145 Preassignment 3 – due before 11/16

See the PDF. When you download speccheck_pre3.jar, make sure the filename ends in “.jar”.

1 217 218 219 220 221 233