Overview Sometimes, we have data in one form that needs to be put into another as code or storage in a database. Many editors, like Sublime Text, have Find/Replace tools for complex data transformations. IntelliJ has a similar facility within its editor (Edit/Find/Replace). This brief tutorial explains some regexes (regular expressions) used to achieve quick … Read More “Data Transformation with Regex” »
Category: Uncategorized
(Updated February 8, 2023) Just in case anyone is having trouble getting started. Here are a few screenshots of how your environment in IntelliJ will look. The Record section of the textbook is complete and is being edited. How to use HashMap<String,TokenType> will be explained in class.
People who know me are familiar with how, generally, I’m not too fond of clever solutions. This is because clever ones often are flawed in some subtle way that leads to bugs later. I prefer clear, precise solutions. The situation below was a little different, and now I task you with solving the same problem … Read More “Your first example of a clever solution.” »
Overview The memory layout of Windows is a bit more complex than that of Linux. While we have seen some of the Linux memory model, it is also a good idea to get a sense of how other OSes perform similar memory virtualization. Get the Software Login to your Windows 10 guest and get the … Read More “CISS-150 Windows Memory” »
(Updated October 26, 2021) 8,000,000 possible numbers. 8M bits in 1M bytes. byte[] ba = new byte[1000000]; ba[0] ba[1] ba[2] ba[3] | byte0 | byte 1 | byte 2 | … 01234567 01234567 01234567 ^ ^ | | 2000007 2000023 byte 0 01234567 ^^^^^^^^ |||||||└ 2000007 ||||||└ 2000006 |||||└ 2000005 ||||└ 2000004 |||└ 2000003 ||└ … Read More “bits” »
public class Strings { public static void print_array(int[] potato) { int x; for (x = 0; x < potato.length; x++) { int y = 0; System.out.println("potato["+x+"] = " + potato[x]); } } public static void main(String[] args) { double cost = 0.0, price, sub; int count; for (String a : args) { System.out.println(a); String parts[] ... Read More “Strings” »
Here is the piece of code we worked on Tuesday. Remember that the for loop leaves x as the length of the String (not found) while indexOf() returns -1. import java.util.Scanner; public class Main { static Scanner kb = new Scanner(System.in); public static void main(String[] args) { int x; // 1 // 01234567890 String line=”ab,cd,e1,23,45″; … Read More “From October 6,2020” »
Overview First, I would like to thank Dave Curry of the The New School. His documentation was the inspiration for this book. Dave’s documentation is still quite useful, but is limited to CAS 5.2. This book begins at CAS 6.1.6 and where appropriate mentions differences in 6.2. (At the time of this writing CAS 6.2 … Read More “Overview” »
Regardless of which version you choose, this code will help get you started! import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.TextAlignment; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Button; import javafx.scene.layout.GridPane; //import javafx.event.EventHandler; import javafx.geometry.Pos; import javafx.geometry.HPos; public class Project8_template extends Application { public static int cel2far(int c) { return c * 9 / 5 + 32; … Read More “Project 8 Template” »
(Updated September 1, 2020) Overview For the semester we will be holding class online using Zoom. This way everyone can attend wherever they feel most comfortable and maintain social distance during the Coronavirus Pandemic. Zoom is a very easy product to use and is available on nearly every platform. It is recommended that you test … Read More “Zoom Class Details” »