teaching machines

CS 491 Lecture 15 – Wevents Part IV

Agenda schedule mobile OS talks inserting and editing adding a cache marshalling compound data detecting a network connection pushing changes Problem We mentioned last time that the advantage of an IntentService + ResultReceiver over an AsyncTask is only seen when the background task does more than update the UI, like maintain a local cache. Such […]

CS 491 Lecture 14 – Wevents Part III

Agenda write an AsyncTask AsyncTask vs. IntentService + ResultReceiver handling ResultReceiver configuration changes saving instance state adding a ListActivity hello, JSON add events AsyncTask In these days of big data, complex computation, and networks, we have need to perform background tasks whose results affect the UI. As UI stuff can only be done on the […]

CS 145 Lecture 13 – Loop tricks

Agenda which loop when? conditioning on sentinel values fencepost loops nested loops Code ForAWhile.java package lecture; import java.util.Scanner; public class ForAWhile { public static void main(String[] args) { // String command = “notdone”; // for (Scanner in = new Scanner(System.in); !command.equals(“done”); command = in.next()) { // } String command = “notdone”; Scanner in = new […]

CS 145 Lab 7

Reminder Show your completed lab 6 checkpoints to your instructor or TA in the first 20 minutes of this lab. All code for this lab should go in a package named lab7. Cards Each of today’s problems involves a deck of cards. Though we use card terminology, you do not need to have ever touched […]

CS 145 Exam 1

Exam 5-point summaries of individual question and overall scores.

CS 145 Lecture 12 – Conditionals and file input

Agenda generating an ordinal number if/else if reading from files (brief treatise on exceptions) test-driven development categorizing light Code Ordinals.java package lecture; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class Ordinals { public static void main(String[] args) throws FileNotFoundException { Scanner in = new Scanner(new File(“/home/cjohnson/Desktop/ordinals.txt”)); while (in.hasNextInt()) { int i = in.nextInt(); String expected […]

Homework 2 – wettstaj

Guess All The Megaman Bosses! This app was going to be really cool if i could have finished it. The basic idea was that, when you type in a word, it would search a premade database for the list of bosses. Every time you typed in a correct boss it would populate a text field […]

CS 491 Homework 3 – due before 11/4

See the PDF.

CS 491 Lecture 13 – Wevents Part II

Agenda design an app for managing family events hook up to a remote database merge PostgreSQL, PHP, JSON, and Android Ice Cream Sandwich It was unveiled yesterday. Asynchronous networking Okay, our database backend is in order. Our PHP scripts will serve as the bridge between the database and clients, who will perform all transactions through […]

Homework 2 Videogame Wishlist

So for this assignment, I just wanted to create something that’s simple but useful.  It’s that time of year again when all the good videogames come out.  Of course, being how games are $60 these days, gamers such as myself don’t really buy a game unless it’s totally worth it and it’s something that we’d […]

1 219 220 221 222 223 232