This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oogahbooga | |
#include "Bits.h" | |
#include <assert.h> //for assert() | |
#include <math.h> //For pow() | |
typedef unsigned int uint; | |
typedef unsigned char byte; | |
int main(int argc, char** argv) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//From another instructor. Provided for | |
//ICA 4, Lab 1 | |
void printInBinary(unsigned char n) { | |
unsigned char mask = 0x80; | |
for (int i = 0; i < 8; i++) { | |
printf("%c ", (n & mask) ? '1' : '0'); | |
mask = mask >> 1; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#Trivial server that sends hello and prints out response. | |
import socket | |
def main(): | |
host = '127.0.0.1' | |
port = 1776 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Star | |
{ | |
private static Random _rnd = new Random(); | |
public Point _location { get; private set; } | |
public Color _color { get; private set; } | |
public int _size { get; private set; } | |
public Star( Point p ) | |
{ | |
_location = p; | |
_color = GDIDrawer.RandColor.GetColor(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Star | |
{ | |
private static Random _rnd = new Random(); | |
public Point _location { get; private set; } | |
public Color _color { get; private set; } | |
public int _size { get; private set; } | |
public Star( Point p ) | |
{ | |
_location = p; | |
_color = GDIDrawer.RandColor.GetColor(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Oct 24 12:24:01 2019 | |
@author: aja | |
""" | |
#File IO Demo | |
colours = ["Red","Purple","Blue","Orange", "Black", "Pink","Indigo","Periwinkle","Gold", | |
"Green", "Midnight Grey", "Beige", "maroon", "burgundy","mauve", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Name: AJ Armstrong | |
# Course/Class: PRGM1000/A02 | |
# Description: Demonstration of some Collections | |
# Date: 22 Oct 2019 | |
# Version: 1.0 | |
import sys | |
stooges = ["Larry", "Moe", "Curly", "Curly Joe"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#The above is a 'shebang' used to tell linux/bash that | |
#this is a python3 script if I run it in the shell. | |
import sys | |
import random | |
def WholeNump(value): #Expecting a string | |
if len(value) <= 0: return False | |
for c in value: #iterate through chars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Loop Demos") | |
# i = 5 | |
# while i < 5: | |
# print (str(i) + "!") | |
# i+=1 #(i = i+1) | |
# print("All done.") | |
# i = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Demo_5 | |
{ | |
class Program | |
{ |