Skip to content

Instantly share code, notes, and snippets.

View axpence's full-sized avatar

Alex Spencer axpence

View GitHub Profile
@axpence
axpence / gist:3170994
Created July 24, 2012 16:22
Output for valgrind install -v on Mac
Az-macbook:lab6 joshuadager$
Az-macbook:lab6 joshuadager$ brew install valgrind -v
/usr/local/Library/Homebrew/global.rb:65: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/Library/Homebrew/global.rb:95: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/Library/Homebrew/global.rb:65: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/Library/Homebrew/global.rb:95: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
==> Downloading http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/valgrind-3.7.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/valgrind-3.7.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/valgrind/3.7.0 --mandir=/usr/local/Cellar/valgrind/3.7.0/share/man --enable-only64bit --build=amd64-darwin
@axpence
axpence / gist:3171174
Created July 24, 2012 16:58
main.cpp 1830BOM project c++
//
// main.cpp
// 1830Bom_c++
//
// Created by Alex Spencer on 7/21/12.
//
#include <iostream>
#include <fstream>
#include <string>
@axpence
axpence / gist:3171187
Created July 24, 2012 17:00
in1.txt (old bom)
<book> 1NE </book>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraph.org/schema/" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>1 Nephi | Christian Apologetics and Research Ministry</title>
<meta property="og:site_name" content=""/>
<meta property="og:title" content="1 Nephi"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@axpence
axpence / gist:3171196
Created July 24, 2012 17:02
in2.txt (new bom that is parsed)
//normal bom:
<book> 1NE </book>
<p> 1 Nephi 1 Chapter 1 </p>
<pre> 1 Nephi 1:1 1 I, Nephi, having been born of goodly parents, therefore I was taught somewhat in all the learning of my father; and having seen many afflictions in the course of my days, nevertheless, having been highly favored of the Lord in all my days; yea, having had a great knowledge of the goodness and the mysteries of God, therefore I make a record of my proceedings in my days. </pre>
<pre> 1 Nephi 1:2 2 Yea, I make a record in the language of my father, which consists of the learning of the Jews and the language of the Egyptians. </pre>
<pre> 1 Nephi 1:3 3 And I know that the record which I make is true; and I make it with mine own hand; and I make it according to my knowledge. </pre>
<pre> 1 Nephi 1:4 4 For it came to pass in the commencement of the first year of the reign of Zedekiah, king of Judah, (my father, Lehi, having dwelt at Jerusalem in all his days); and in that same year there came many prophets, prophesying unto
@axpence
axpence / gist:3178626
Created July 25, 2012 20:55
My Own Vector Class
//
// my_vector.h
// VECTOR
//
// Created by Alex Spencer on 7/25/12.
//
#pragma once
#include<iostream>
using namespace std;
template <typename ItemType>
@axpence
axpence / gist:3179284
Created July 25, 2012 23:16
AVL TREE 1
#pragma once
//#include"linkedarraylist.h"
#include<string>
//#include"LinkedArrayList_3_passoff.h"
#include<vector>
@axpence
axpence / gist:3180639
Created July 26, 2012 06:50
brew doctor gist
Az-macbook:lab6 joshuadager$ brew doctor
/usr/local/Library/Homebrew/global.rb:65: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/usr/local/Library/Homebrew/global.rb:95: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Error: Your Homebrew is outdated
You haven't updated for at least 24 hours, this is a long time in brewland!
Error: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@axpence
axpence / gist:3184397
Created July 26, 2012 20:44
Before Passoff #1 with couts 1A avl.h
#include<iostream>
#include<fstream>
#include<string>
#include"avltreeset.h"
using namespace std;
void addToTree(ifstream& in_1, ofstream& out_1, AVLTreeSet<string>& tree1, string& word){
@axpence
axpence / gist:3184401
Created July 26, 2012 20:44
Before Passoff #1 with couts 1A main.cpp
#include<iostream>
#include<fstream>
#include<string>
#include"avltreeset.h"
using namespace std;
void addToTree(ifstream& in_1, ofstream& out_1, AVLTreeSet<string>& tree1, string& word){
@axpence
axpence / gist:3184402
Created July 26, 2012 20:45
Before Passoff #1 with couts 1A my_vect.h
//
// my_vector.h
// Created by Alex Spencer on 7/25/12.
//
#pragma once
#include<iostream>
using namespace std;
template <typename ItemType>
class myVector{