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 […]

Project configuration

While waiting to hear back from ORSP, we are taking the time to find a sustainable solution for managing our project across multiple platforms and machines. We really want to share code without emailing it. We also want to avoid fiddling with Visual Studio as much as possible. For this, we’ve chosen to use TortoiseSVN […]

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 […]

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 […]

CS 491 Lecture 12 – Wevents Part I

Agenda design an app for managing family events hook up to a remote database merge PostgreSQL, PHP, JSON, and Android Wevents One of you stated in your list of desired app-knowledge that you wanted a shared calendar. Another of you shared in lecture that you wanted to talk about hooking up to a remote database. […]