Skip to content

Programming by Design

If you're not prepared to be wrong, you'll never come up with anything original. – Sir Ken Robinson

  • About
  • Java-PbD
  • C-PbD
  • ASM-PbD
  • Algorithms
  • Other

Category: Uncategorized

bits

Posted on February 20, 2021October 2, 2024 By William Jojo
Uncategorized

(Updated October 2, 2024) 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” »

Strings

Posted on February 10, 2021 By William Jojo
Uncategorized

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” »

From October 6,2020

Posted on October 9, 2020October 9, 2020 By William Jojo
Uncategorized

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

Posted on June 27, 2020June 27, 2020 By William Jojo
Uncategorized

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” »

Project 8 Template

Posted on April 24, 2020 By William Jojo
Uncategorized

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” »

Zoom Class Details

Posted on March 13, 2020September 1, 2020 By William Jojo
Uncategorized

(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” »

Layout Test

Posted on March 4, 2020 By William Jojo
Uncategorized

(Updated March 4, 2020) NOTE: This document supersedes all previous CAS documentation prior to January 2020. We loosely follow the New School model of deploying Apereo CAS. Where appropriate we eliminate or modify the process to suit the needs of HVCC. We are implementing a good portion of the complexity of New School and we … Read More “Layout Test” »

test

Posted on February 26, 2020July 19, 2020 By William Jojo
Uncategorized

Identify each name as either a primitive data type or a class. [qdeck random=“true”] [q]int [a]primitive [q]String [a]class [q]System [a]class [q]float [a]primitive [/qdeck]

asm

Posted on February 23, 2020March 10, 2020 By William Jojo
Uncategorized

; —————————————————————————– ; A 64-bit command line application to compute x^y. ; ; Syntax: power x y ; x and y are (32-bit) integers ; —————————————————————————– global main extern printf extern puts extern atoi section .text main: push r12 ; save callee-save registers push r13 push r14 ; By pushing 3 registers our stack is … Read More “asm” »

PHP Code to Perform BankMobile SSO

Posted on February 12, 2020April 3, 2020 By William Jojo
Uncategorized

Below is the code that can be used to perform the (pass-thru) SSO to BankMobile. It is understood that this code is behind some form of site-imposed SSO (CAS/SAML/LDAP etc.). Lines Purpose 8-19 Functions to perform the basic encryption/decryption with AES-128-ECB. 21-24 Load specific support files. This abstraction provides additional security as the include path … Read More “PHP Code to Perform BankMobile SSO” »

Posts pagination

Previous 1 2 3 4 Next

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Copyright © 2018 – 2025 Programming by Design.