Skip to content

Instantly share code, notes, and snippets.

@Michael0x2a
Michael0x2a / SortTwoQueues.java
Created January 27, 2015 21:06
A short program that takes two queues and sorts them without using any auxiliary data structures
// Michael Lee
// January 27, 2015
// Section BP
//
// This file takes two queues with numbers in random order and sorts them.
import java.util.*;
public class SortTwoQueues {
// The main starting point of the program.
@Michael0x2a
Michael0x2a / SortTwoQueuesV2.java
Created January 27, 2015 21:10
A short program that takes two queues and sorts them without using any auxiliary data structures.
// Michael Lee
// January 27, 2015
// Section BP
//
// This file takes two queues with numbers in random order and sorts them.
import java.util.*;
public class SortTwoQueuesV2 {
// The main starting point of the program.
@Michael0x2a
Michael0x2a / rename-log-files.bat
Created February 2, 2015 20:18
Rename ellog to itlog
ren *.ellog *.itlog
function manuallyOpen() {
var anchor = window.location.hash.substring(1);
if (anchor.length > 0) {
var element = document.getElementById(anchor);
element.click();
}
}
$(document).foundation();
$(document).ready(function() {
#!/usr/bin/env python
'''
A program to test logical expressions for equivalence and generate truth tables.
Usage:
python test_logic.py
Edit the "main" function located at the bottom of the file to change what
expressions you want to test.
@Michael0x2a
Michael0x2a / Deck.java
Created April 15, 2015 09:31
Deck.java
// Michael Lee
// Section AP
// Tuesday, April 14, 2015
// Sample program: Deck.java
import java.util.List;
interface Deck {
public int size();
public boolean isEmpty();
@Michael0x2a
Michael0x2a / ListDeck.java
Last active August 29, 2015 14:19
ListDeck.java
// Michael Lee
// Section AP
// Tuesday, April 14, 2015
// Sample program: ListDeck.java
//
// This class represents a deck of cards, which you can shuffle
// and manipulate.
import java.util.List;
import java.util.ArrayList;
@Michael0x2a
Michael0x2a / StackDeck.java
Last active August 29, 2015 14:19
StackDeck.java
// Michael Lee
// Tuesday, April 14, 2015
// Sample program: StackDeck.java
//
// This class represents a deck of cards, which you can shuffle
// and manipulate.
import java.util.List;
import java.util.ArrayList;
import java.util.NoSuchElementException;
@Michael0x2a
Michael0x2a / Logoff-Inactive.ps1
Last active May 10, 2024 03:50
Logoff-Inactive
<#
.SYNOPSIS
Logs out inactive users.
.DESCRIPTION
Logs out inactive users, except for specific users that
have been manually approved and are allowed to stay logged
in for indefinite periods of time.
You can run this script directly on Powershell:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.