Skip to content

Instantly share code, notes, and snippets.

View etemesi254's full-sized avatar

Caleb Etemesi etemesi254

View GitHub Profile
@etemesi254
etemesi254 / jdhuff.c
Created August 7, 2021 17:54
A modified version of jdhuff.c with accelerated AC lookup tables
/*
* jdhuff.c
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2009-2011, 2016, 2018-2019, D. R. Commander.
* Copyright (C) 2018, Matthias Räncker.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@etemesi254
etemesi254 / jdhuff.h
Last active August 7, 2021 18:42
A small mini of the new decode AC
/* Decode AC as fast as possible
* # Arguments( in order)
* -> s:(integer)
* -> nb:number of bits
* -> htbl: AC table
* -> fast_ac: A fast AC table
* -> k:
* */
#define HUFF_DECODE_FAST_AC(s, nb, htbl,fast_ac,k,block) \
abstract class Vehicle {
// The current speed of the car
double speed;
// The amount of gas(in litres) the car has
double gas = 200;
// acceleration
double initial_acceleration = 1.0;
package com.example.calculator;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
;-------------------------------------------
;This progra subtracts two 8 bit numbers
;-----------------------------------------
sub1: nop
mvi a,13h ; Move constant 13h into register a(Accumulator)
mvi b,10h ; Move constant 10h into register b.
sub b ; Subtract a from b
sta 00f0h ; Store value of accumulator in memory 00f0
xra a ; Zero out a
@etemesi254
etemesi254 / scratch_7.asm
Created May 5, 2022 18:19
8085 assembly
;-------------------------------------------
;This program subtracts two 8 bit numbers
;-----------------------------------------
sub1: nop
mvi a,13h ; Move constant 13h into register a(Accumulator)
mvi b,10h ; Move constant 10h into register b.
sub b ; Subtract a from b
sta 00f0h ; Store value of accumulator in memory 00f0
xra a ; Zero out a
; Multiply two numbers
; the number is held in register B
; The accumulator(Register A) holds the result
; Register c holds how far we are in
mvi a,29 ;Move zero into a
; Multiply 29*4
mvi b,29 ; Move 29 to b
mvi c,1 ; Move 1 to c
mvi d,4 ; Move 4 to d
@etemesi254
etemesi254 / RegisterWindow.java
Last active May 18, 2022 12:06
Registration window for assignment 2 for OOP (Caleb + Sumeiya)
package com.example.multiwindows;
/*
* 146565 -Caleb Etemesi
* 142285 - Sumeiya Ali
* */
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
public class LinkedList
{
// reference to the head node.
private Node head;
private int listCount;
// LinkedList constructor
public class ReverseString {
private static void reverse(String s, int position) {
// Base case , position === length.
if ((position) != -1) {
System.out.print(s.charAt(position));
reverse(s, position - 1);
}