Code snippets that illustrate various programming techniques.

You may use or adapt code found in this section for programs for any of my classes.  You must attribute your usage.  Write either "Code used with permission from Prof. Cole's Web page," or "Code used with permission from Prof. Cole's Web page and modified."


Android Programming

Android File I/O problem and solution
Code snippets for animation using a thread on a timer
Low-Pass Filter
Array Adapter for ListView

Database Programming

C++ Binary File I/O Sample
Java Random-Access I/O Sample
Connect to a database from Java

C# Programming

Maximizing the screen and adjusting controls
Comparator Class for ListView

C++ Programming

Example of "friend" classes