Skip to content

Instantly share code, notes, and snippets.

View AlexFrazer's full-sized avatar
🦊
🦊🦊🦊

Frazer AlexFrazer

🦊
🦊🦊🦊
View GitHub Profile
@AlexFrazer
AlexFrazer / ArrayQueue.java
Created October 10, 2012 23:39
Stacks and Queues
/**
* Array Queue class
* Takes data into an array. The first item to enter is the first to
* be returned. This is the opposite of a Queue.
*
* @Alex Frazer
*/
import java.util.Random;
public class ArrayQueue<T>
@AlexFrazer
AlexFrazer / GUI.java
Created October 20, 2012 15:47
Grid maker
package Grid;
import javax.swing.JFrame;
public class GUI
{
public static void main(String [] args) {
GridFriend grid = new GridFriend();
grid.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
grid.setSize(700, 1000);
grid.setVisible(true);
@AlexFrazer
AlexFrazer / clientftp.c
Created October 29, 2012 19:42
client server model
/*
* Client FTP program
*
* NOTE: Starting homework #2, add more comments here describing the overall function
* performed by server ftp program
* This includes, the list of ftp commands processed by server ftp.
*
*/
#include <sys/types.h>
@AlexFrazer
AlexFrazer / reader.c
Created November 2, 2012 20:50
file reader
/*
* reads files
* @Alex "Crowz" Frazer
*/
#include <stdio.h>
#include <string.h>
#define OK 0
#define FILE_NOT_FOUND -1
/*
* Client FTP program
*
* Clientftp program
* sends and receieves messages with serverftp.
* Commands are: user, passwd, put, recv, ls, pwd, help, stat, mkdir, dele, rmdir
* @Crowz
*/
#include <sys/types.h>
/*
* Client FTP program
*
* Clientftp program
* sends and receieves messages with serverftp.
* Commands are: user, passwd, put, recv, ls, pwd, help, stat, mkdir, dele, rmdir
* @Crowz
*/
#include <sys/types.h>
Script started on Sun Nov 11 14:12:31 2012
[?1034h(alex@Administrators-Mac-mini) 14:12
~/ftp/client [master*] $ ./ck lientftp
Started execution of client ftp
Calling clntConnect to connect to the server
warning: this program uses gets(), which is unsafe.
my ftp> put squie dward.txt
my ftp> quit
@AlexFrazer
AlexFrazer / EdgeDetector.java
Created November 16, 2012 17:49
Finds edges on pictures
/**
* An imagereader that doesn't look at all like the professors + an edge detector. >.>
* (in my defense, it's mostly reading the API).
* I will use the Sobel's Operator, because I think it's the prettiest and I'm an annoying, pretentious, artist.
* Sobel's operator works by using a 3x3 matrix kinda operation to find the abruptness of change in rgb values.
* Therefore, my strategy will be to use a for loop to iterate through all the pixels and use this operator on all of them.
* Hopefully it works out.
*/
import java.awt.Color;
#include "image.h"
#include "matrix.h"
#include <vector>
#include <iostream>
class image {
int main() {
matrix *smallMatrix=new matrix;
}
};
public class AVLtree<T extends Comparable<? super T>>
{
private class TreeNode {
T data;
TreeNode left, right;
TreeNode(T data, TreeNode left, TreeNode right) {
this.data = data;
this.left = left;
this.right = right;
}