This file contains 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
myLayoutHook = avoidStruts $ | |
onWorkspace "7:gfx" (gimp ||| noBorders Full) $ | |
onWorkspace "4:chat" (im) $ | |
Full ||| Grid -- The layouts here are the defaults from left->right | |
where myNamed n l = named n $ layoutHints . gaps [(U, 1), (D, 1), (R, 1), (L, 1)] . spacing 1 $ l | |
im = withIM (1%7) (Role "buddy_list") Grid | |
gimp = withIM (0.11) (Role "gimp-toolbox") $ | |
reflectHoriz $ | |
withIM (0.15) (Role "gimp-dock") Full |
This file contains 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
myLayoutHook = avoidStruts $ | |
modWorkspace "7:gfx" noBorders . fullscreenFull $ | |
modWorkspace "4:chat" noBorders . im $ | |
Full ||| Grid -- The layouts here are the defaults from left->right | |
where im = withIM (1%7) (Role "buddy_list") |
This file contains 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
/* | |
* ===================================================================================== | |
* | |
* Filename: Queue.h | |
* | |
* Author: Chance Zibolski (CZ), [email protected] | |
* Organization: | |
* | |
* ===================================================================================== | |
*/ |
This file contains 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
set nocompatible " be iMproved | |
" Move around windows | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
" General Settings | |
filetype on |
This file contains 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
#! /urs/bin/env python | |
import sys | |
def reverse_word(aWord): | |
return aWord[::-1] | |
print reverse_word(sys.argv[1]) |
This file contains 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
def parsemsg2(info, msg, send, COMMAND_LIST): | |
ret = '' | |
if msg[0] == '!': | |
cmd = msg.split(' ',1) | |
if (cmd in COMMAND_LIST): | |
command = COMMAND_LIST.get(cmd) | |
ret = command(cmd[2]) |
This file contains 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
# Treat messages starting with '!' as commands (e.g., "!say hi") | |
if msg[0] == '!': | |
# Splits up the orginal message into 2 parts: | |
# command = the command to be called, Ex: !rps | |
# cmd_args = the arguments for the command, ex: !rps args | |
cmd = msg.split(' ',1) | |
command = cmd[0] | |
command = command[1:] # Removes the ! from the command | |
cmd_args = cmd[1] |
This file contains 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
bool Queue::enqueue(const Potion& aPotion) | |
{ | |
if (size == MAX_CAPACITY) | |
return false; //Returns false if the queue is full | |
//Add the item to the end of the queue | |
items[rear] = aPotion; | |
rear = (rear + 1) % MAX_CAPACITY; //Circular, so no shifting needed. | |
size++; | |
return true; |
This file contains 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
Queue::Queue(int a_size): size(0), front(0), rear(0), MAX_CAPACITY(a_size), items(NULL) | |
{ | |
//Create an array of potions with the size passed to the constructor | |
items = new Potion[a_size]; | |
} |
This file contains 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
void Potion::SetType(PotionType& type) | |
{ | |
if(this->type) | |
delete &this->type; | |
this->type = type; | |
} |
OlderNewer