diff options
author | zedarider <ymherklotz@gmail.com> | 2016-02-26 21:32:14 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-02-26 21:32:14 +0000 |
commit | 0e25cbb168e082e382cb5f92c9267f47e61ad227 (patch) | |
tree | 4008ef506d9987317b46a844789ac3b364e054c9 | |
parent | f7a1296d353dea1f98b47d4baef87426ceadf6b5 (diff) | |
download | imperial_2015-0e25cbb168e082e382cb5f92c9267f47e61ad227.tar.gz imperial_2015-0e25cbb168e082e382cb5f92c9267f47e61ad227.zip |
cleaning up files
-rw-r--r-- | Append | bin | 30164 -> 0 bytes | |||
-rw-r--r-- | Append.cpp | 29 | ||||
-rw-r--r-- | BinarySearch | bin | 15340 -> 0 bytes | |||
-rw-r--r-- | BinarySearch.cpp | 23 | ||||
-rw-r--r-- | Collatz | bin | 15392 -> 0 bytes | |||
-rw-r--r-- | Collatz.cpp | 34 | ||||
-rw-r--r-- | Collatz.exe | bin | 124943 -> 0 bytes | |||
-rw-r--r-- | DictRealEstate.txt | 6 | ||||
-rw-r--r-- | DynamicArray | bin | 40372 -> 0 bytes | |||
-rw-r--r-- | DynamicArray.cpp | 78 | ||||
-rw-r--r-- | Euclid | bin | 9365 -> 0 bytes | |||
-rw-r--r-- | Euclid.cpp | 19 | ||||
-rw-r--r-- | EvenOddCom1ex.cpp | 18 | ||||
-rw-r--r-- | Factorisation | bin | 25564 -> 0 bytes | |||
-rw-r--r-- | Factorisation.cpp | 55 | ||||
-rw-r--r-- | FirstFile.txt | 5 | ||||
-rw-r--r-- | Firstname.txt | 5 | ||||
-rw-r--r-- | HelloWorld | bin | 9864 -> 0 bytes | |||
-rw-r--r-- | HelloWorld.cpp | 18 | ||||
-rw-r--r-- | LinkedLists | bin | 9984 -> 0 bytes | |||
-rw-r--r-- | LinkedLists.cpp | 41 | ||||
-rw-r--r-- | MinMax | bin | 25168 -> 0 bytes | |||
-rw-r--r-- | MinMax.cpp | 42 | ||||
-rw-r--r-- | NamesandSurnames | bin | 68020 -> 0 bytes | |||
-rw-r--r-- | NamesandSurnames.cpp | 39 | ||||
-rw-r--r-- | PointFile.txt | 54 | ||||
-rw-r--r-- | Preferences1.txt | 406 | ||||
-rw-r--r-- | Preferences2.txt | 35 | ||||
-rw-r--r-- | RawMemory | bin | 15332 -> 0 bytes | |||
-rw-r--r-- | RawMemory.cpp | 14 | ||||
-rw-r--r-- | RealEstate | bin | 77100 -> 0 bytes | |||
-rw-r--r-- | RealEstate.cpp | 60 | ||||
-rw-r--r-- | Recursion.cpp | 41 | ||||
-rw-r--r-- | SecondFile.txt | 5 | ||||
-rw-r--r-- | Sets | bin | 24388 -> 0 bytes | |||
-rw-r--r-- | Sets.cpp | 63 | ||||
-rw-r--r-- | SumAndScalar | bin | 30688 -> 0 bytes | |||
-rw-r--r-- | SumAndScalar.cpp | 47 | ||||
-rw-r--r-- | Surname.txt | 5 | ||||
-rw-r--r-- | Test1 | bin | 62516 -> 0 bytes | |||
-rw-r--r-- | Test1.cpp | 94 | ||||
-rw-r--r-- | Test3 | bin | 19636 -> 0 bytes | |||
-rw-r--r-- | TestExample2 | bin | 27192 -> 0 bytes | |||
-rw-r--r-- | TestExample2.cpp | 55 | ||||
-rw-r--r-- | TriangularDivisor | bin | 9732 -> 0 bytes | |||
-rw-r--r-- | TriangularDivisor.cpp | 29 | ||||
-rw-r--r-- | Warehouse1.txt | 5 | ||||
-rw-r--r-- | Warehouse2.txt | 3 | ||||
-rw-r--r-- | smalltest.cpp | 16 | ||||
-rw-r--r-- | something.py | 5 | ||||
-rw-r--r-- | test1.py | 16 | ||||
-rw-r--r-- | thinkCScpp.pdf | bin | 845116 -> 0 bytes | |||
-rw-r--r-- | w4 | bin | 14359 -> 0 bytes | |||
-rw-r--r-- | w4.cpp | 24 |
54 files changed, 0 insertions, 1389 deletions
Binary files differ diff --git a/Append.cpp b/Append.cpp deleted file mode 100644 index 5b88e6c..0000000 --- a/Append.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include <iostream> -#include <cmath> -#include <vector> - -using namespace std; - -vector<int> append(vector<int> v1, vector<int> v2) { - for(int i = 0; i < v2.size(); i++) { - v1.push_back(v2[i]); - } - return v1; -} - -int main() { - vector<int> a, b, c; - a.push_back(1); - a.push_back(2); - a.push_back(3); - b.push_back(4); - b.push_back(5); - b.push_back(6); - c = append(a, b); - cout << "c: "; - for(int k = 0; k < c.size(); k++) { - cout << c[k] << " "; - } - cout << endl; - return 0; -}
\ No newline at end of file diff --git a/BinarySearch b/BinarySearch Binary files differdeleted file mode 100644 index 6b06bfa..0000000 --- a/BinarySearch +++ /dev/null diff --git a/BinarySearch.cpp b/BinarySearch.cpp deleted file mode 100644 index a9e73b6..0000000 --- a/BinarySearch.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include <iostream> - -using namespace std; - -int main() { - double result, num, divi; - result = 0.0; - num = 1.0; - divi = 1.0; - - for(int i = 2; i < 1000; i++) { - for(int j = 2; j < 1000; j++) { - num = (double)i; - divi = (double)j; - result = (double)(num/divi)*((num-1)/(divi-1)); - if(result == 0.5) { - cout << i << " " << j << endl; - } - cout << j << endl; - } - } - return 0; -}
\ No newline at end of file diff --git a/Collatz b/Collatz Binary files differdeleted file mode 100644 index 197b166..0000000 --- a/Collatz +++ /dev/null diff --git a/Collatz.cpp b/Collatz.cpp deleted file mode 100644 index 5263710..0000000 --- a/Collatz.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <iostream> -#include <cmath> - -using namespace std; - -int main() { - int usrNum, usrNum1, usrNum2; - int count; - - cout << "Please Enter a range: "; - cin >> usrNum1 >> usrNum2; - - cout << "\nnumber\tsteps\n"; -// cout << usrNum1 << "\t" << usrNum2 << endl; - for(usrNum=usrNum1; usrNum<=usrNum2; usrNum++) { - count = 0; - int initNum = usrNum; - while(initNum > 1) { - if(initNum % 2 == 0) { - initNum = initNum / 2; - } - else { - initNum = initNum*3 + 1; - } - - count ++; - } - cout << usrNum << "\t" << count << "\t"; - for(int x = 0; x < count; x++) { - cout << "*"; - } - cout << endl; - } -}
\ No newline at end of file diff --git a/Collatz.exe b/Collatz.exe Binary files differdeleted file mode 100644 index 7c429ba..0000000 --- a/Collatz.exe +++ /dev/null diff --git a/DictRealEstate.txt b/DictRealEstate.txt deleted file mode 100644 index 5858691..0000000 --- a/DictRealEstate.txt +++ /dev/null @@ -1,6 +0,0 @@ -exclusive expensive -cosy small -bedsit room -quiet remote -luxurious expensive -lovely tiny
\ No newline at end of file diff --git a/DynamicArray b/DynamicArray Binary files differdeleted file mode 100644 index 5ba3de2..0000000 --- a/DynamicArray +++ /dev/null diff --git a/DynamicArray.cpp b/DynamicArray.cpp deleted file mode 100644 index 4875109..0000000 --- a/DynamicArray.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include <iostream> -#include <fstream> -#include <cstdlib> -#include <string> - -using namespace std; - -// point object structure -struct point { - double x, y; - - void p_str() { - cout << "(" << x << ", " << y << ")" << endl; - } -}; - -// declaration of method -void readPoints(string, int&, int&, point*&); - -int main() { - string fileLocation = "./PointFile.txt"; - // declares the size and capacity of the array which both have to be tracked and initialises them - int size = 0; - int capacity = 1; - point* pArray = new point[capacity]; - readPoints(fileLocation, capacity, size, pArray); - - // prints out the content of the array - for(int i = 0; i < size; i++) { - pArray[i].p_str(); - } - - // prints out the characteristics of the array - cout << "array capacity:\t\t" << capacity << endl << "array size:\t\t" << size << endl << "array physical size:\t" << size*sizeof(point) << " bits\t=\t" << size*sizeof(point)/8 << " bytes" << endl; - - delete[] pArray; - return 0; -} - -// method that creates the array -void readPoints(string fileloc, int &cpcty, int &sz, point* &pa) { - // declares file and other variables - ifstream pointFile; - point tmpp; - - pointFile.open(fileloc); - - // Error opening file - if(!pointFile.is_open()) { - cout << "couldn't open input file" << endl; - exit(EXIT_FAILURE); - } - - // reads the two points from the file - while(pointFile >> tmpp.x >> tmpp.y) { - // increases the sz of the array - sz++; - // checks if the array is still large enough for the element - if(sz <= cpcty) { - // adds point to the end of the array - pa[sz-1] = tmpp; - } else { - // if array isn't large enough creates new dynamic array - // of two times the sz - point* tmpa = new point[cpcty*=2]; - for(int i = 0; i < sz; i++) { - tmpa[i] = pa[i]; - } - // never have to delete the tmpa as it points to the new pa - tmpa[sz-1] = tmpp; - // delete old pa - delete[] pa; - pa = tmpa; - } - } - - pointFile.close(); -}
\ No newline at end of file Binary files differdiff --git a/Euclid.cpp b/Euclid.cpp deleted file mode 100644 index b2daaaa..0000000 --- a/Euclid.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include <iostream> -#include <cmath> - -using namespace std; - -int mgcd(int a, int b) { - if(a % b != 0) { - mgcd(b, a % b); - } else { - cout << "\nGreatest common divisor: " << b << endl; - } -} - -int main() { - int x, y; - cout << "Enter 2 numbers: "; - cin >> x >> y; - mgcd(x, y); -} diff --git a/EvenOddCom1ex.cpp b/EvenOddCom1ex.cpp deleted file mode 100644 index aa3410e..0000000 --- a/EvenOddCom1ex.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include <iostream> -#include <cmath> - -using namespace std; - -int main() { - int num; - cout << "Please enter a number: "; - cin >> num; - if(num % 2 == 0) { - cout << "even" << endl; - } - else { - cout << "odd" << endl; - } - - return 0; -}
\ No newline at end of file diff --git a/Factorisation b/Factorisation Binary files differdeleted file mode 100644 index c9655e3..0000000 --- a/Factorisation +++ /dev/null diff --git a/Factorisation.cpp b/Factorisation.cpp deleted file mode 100644 index 034a975..0000000 --- a/Factorisation.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include <iostream> -#include <cmath> -#include <vector> - -using namespace std; - -void is_prime(int); -void print_vector(vector<int>); - -void is_prime(int x) { - int original = x; - vector<int> primes, factors; - primes.push_back(2); - primes.push_back(3); - - for(int i = 5; i <= x; i++) { - bool itsPrime = false; - for(int j = 0; j < primes.size(); j++) { - if(i % primes[j] == 0) { - itsPrime = false; - break; - } else { - itsPrime = true; - } - } - if(itsPrime) { - primes.push_back(i); - } - } - // cout << "Prime numbers to consider: "; - // print_vector(primes); - while(x != 1) { - for(int l = 0; l < primes.size(); l++) { - if(x % primes[l] == 0) { - factors.push_back(primes[l]); - x = x / primes[l]; - break; - } - } - } - cout << "Factors of " << original << ": "; - print_vector(factors); -} - -void print_vector(vector<int> v) { - for(int k = 0; k < v.size(); k++) { - cout << v[k] << " "; - } - cout << endl; -} - -int main() { - is_prime(103); - return 0; -}
\ No newline at end of file diff --git a/FirstFile.txt b/FirstFile.txt deleted file mode 100644 index afd10c4..0000000 --- a/FirstFile.txt +++ /dev/null @@ -1,5 +0,0 @@ -Donald Trump -Martin Wiersema -Alex Blanc -Yann Herklotz -Sam Wiggins diff --git a/Firstname.txt b/Firstname.txt deleted file mode 100644 index 26e8146..0000000 --- a/Firstname.txt +++ /dev/null @@ -1,5 +0,0 @@ -Donald -Martin -Alex -Yann -Sam
\ No newline at end of file diff --git a/HelloWorld b/HelloWorld Binary files differdeleted file mode 100644 index 8b7e0d0..0000000 --- a/HelloWorld +++ /dev/null diff --git a/HelloWorld.cpp b/HelloWorld.cpp deleted file mode 100644 index aa3410e..0000000 --- a/HelloWorld.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include <iostream> -#include <cmath> - -using namespace std; - -int main() { - int num; - cout << "Please enter a number: "; - cin >> num; - if(num % 2 == 0) { - cout << "even" << endl; - } - else { - cout << "odd" << endl; - } - - return 0; -}
\ No newline at end of file diff --git a/LinkedLists b/LinkedLists Binary files differdeleted file mode 100644 index efb0ad2..0000000 --- a/LinkedLists +++ /dev/null diff --git a/LinkedLists.cpp b/LinkedLists.cpp deleted file mode 100644 index 55dc090..0000000 --- a/LinkedLists.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include <iostream> - -using namespace std; - -struct intList { - int val; - intList* next_el; -}; - -// add functions to add elements to a list -// create a list and be able to order them -// make ordered linked list - -int main() { - intList* ilist = NULL; - int el, n; - - cout << "How many elements do you want to add to the list?" << endl; - cin >> n; - cout << "Now please enter the " << n << " integers: " << endl; - for(int i = 0; i < n; ++i) { - cin >> el; - intList* tmp = new intList; - tmp->val = el; - tmp->next_el = ilist; - ilist = tmp; - } - cout << endl; - intList* lit = ilist; - while(lit != NULL) { - cout << lit->val << endl; - lit = lit->next_el; - } - - while(ilist != NULL) { - intList* tmpilist = ilist->next_el; - delete ilist; - ilist = tmpilist; - } - return 0; -} Binary files differdiff --git a/MinMax.cpp b/MinMax.cpp deleted file mode 100644 index 070c33f..0000000 --- a/MinMax.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include <iostream> -#include <vector> -#include <string> -#include <sstream> - -using namespace std; - -int main() { - double input, maxtmp, maxloc, mintmp, minloc, - addtmp, average; - vector<double> vin; - - cout << "Enter Number <q to exit>: "; - cin >> input; - - do { - cout << "Enter Number <q to exit>: "; - vin.push_back(input); - } while(cin >> input); - - mintmp = vin[0]; - maxtmp = vin[0]; - addtmp = 0; - - // cout << "values: " << mintmp << ", " << maxtmp << endl; - - for(int i = 0; i < vin.size(); i++) { - if(maxtmp <= vin[i]) { - maxtmp = vin[i]; - maxloc = i; - } else if (mintmp >= vin[i]) { - mintmp = vin[i]; - minloc = i; - } - addtmp += vin[i]; - } - average = addtmp / vin.size(); - cout << "\nmin: " << mintmp << " at pos: " << minloc << "\nmax: " - << maxtmp << " at pos: " << maxloc << "\naverage: " << - average << endl; - return 0; -} diff --git a/NamesandSurnames b/NamesandSurnames Binary files differdeleted file mode 100644 index 0c00953..0000000 --- a/NamesandSurnames +++ /dev/null diff --git a/NamesandSurnames.cpp b/NamesandSurnames.cpp deleted file mode 100644 index 8d10b39..0000000 --- a/NamesandSurnames.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include <iostream> -#include <cstdlib> -#include <string> -#include <fstream> -#include <sstream> -#include <vector> - -using namespace std; - -struct name { - string first_name, last_name; - - string _str() { - stringstream ss; - ss << last_name << ", " << first_name << endl; - return ss.str(); - } -}; - -int main() { - name student_name; - ifstream firstname, surname; - ofstream firstFile, secondFile; - - firstname.open("Firstname.txt"); - surname.open("Surname.txt"); - firstFile.open("FirstFile.txt"); - secondFile.open("SecondFile.txt"); - - while(firstname >> student_name.first_name) { - surname >> student_name.last_name; - firstFile << student_name.first_name << " " << student_name.last_name << endl; - secondFile << student_name._str(); - } - return 0; -} - - - diff --git a/PointFile.txt b/PointFile.txt deleted file mode 100644 index 74705a9..0000000 --- a/PointFile.txt +++ /dev/null @@ -1,54 +0,0 @@ -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23 -2 3 -4 2 -1 9 -49 29 -382 93 -1 23
\ No newline at end of file diff --git a/Preferences1.txt b/Preferences1.txt deleted file mode 100644 index ca1c4d2..0000000 --- a/Preferences1.txt +++ /dev/null @@ -1,406 +0,0 @@ -// Place your settings in the file "User/Preferences.sublime-settings", which -// overrides the settings in here. -// -// Settings may also be placed in file type specific options files, for -// example, in Packages/Python/Python.sublime-settings for python files. -{ - // Sets the colors used within the text area - "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", - - // Note that the font_face and font_size are overridden in the platform - // specific settings file, for example, "Preferences (Linux).sublime-settings". - // Because of this, setting them here will have no effect: you must set them - // in your User File Preferences. - "font_face": "", - "font_size": 10, - - // Valid options are "no_bold", "no_italic", "no_antialias", "gray_antialias", - // "subpixel_antialias", "no_round" (OS X only), "gdi" (Windows only) and - // "directwrite" (Windows only) - "font_options": [], - - // Characters that are considered to separate words - "word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?", - - // Set to false to prevent line numbers being drawn in the gutter - "line_numbers": true, - - // Set to false to hide the gutter altogether - "gutter": true, - - // Spacing between the gutter and the text - "margin": 4, - - // Fold buttons are the triangles shown in the gutter to fold regions of text - "fold_buttons": true, - - // Hides the fold buttons unless the mouse is over the gutter - "fade_fold_buttons": true, - - // Columns in which to display vertical rulers - "rulers": [], - - // Set to true to turn spell checking on by default - "spell_check": false, - - // The number of spaces a tab is considered equal to - "tab_size": 4, - - // Set to true to insert spaces when tab is pressed - "translate_tabs_to_spaces": false, - - // If translate_tabs_to_spaces is true, use_tab_stops will make tab and - // backspace insert/delete up to the next tabstop - "use_tab_stops": true, - - // Set to false to disable detection of tabs vs. spaces on load - "detect_indentation": true, - - // Calculates indentation automatically when pressing enter - "auto_indent": true, - - // Makes auto indent a little smarter, e.g., by indenting the next line - // after an if statement in C. Requires auto_indent to be enabled. - "smart_indent": true, - - // Adds whitespace up to the first open bracket when indenting. Requires - // auto_indent to be enabled. - "indent_to_bracket": false, - - // Trims white space added by auto_indent when moving the caret off the - // line. - "trim_automatic_white_space": true, - - // Disables horizontal scrolling if enabled. - // May be set to true, false, or "auto", where it will be disabled for - // source code, and otherwise enabled. - "word_wrap": "auto", - - // Set to a value other than 0 to force wrapping at that column rather than the - // window width - "wrap_width": 0, - - // Set to false to prevent word wrapped lines from being indented to the same - // level - "indent_subsequent_lines": true, - - // Draws text centered in the window rather than left aligned - "draw_centered": false, - - // Controls auto pairing of quotes, brackets etc - "auto_match_enabled": true, - - // Word list to use for spell checking - "dictionary": "Packages/Language - English/en_US.dic", - - // Sets which scopes are checked for spelling errors - "spelling_selector": "markup.raw, source string.quoted - punctuation - meta.preprocessor.c.include, source comment - source comment.block.preprocessor, -(source, constant, keyword, storage, support, variable, markup.underline.link, meta.tag)", - - // Set to true to draw a border around the visible rectangle on the minimap. - // The color of the border will be determined by the "minimapBorder" key in - // the color scheme - "draw_minimap_border": false, - - // Always visualise the viewport on the minimap, as opposed to only - // showing it on mouse over - "always_show_minimap_viewport": false, - - // If enabled, will highlight any line with a caret - "highlight_line": false, - - // Valid values are "smooth", "phase", "blink" and "solid". - "caret_style": "smooth", - - // These settings control the size of the caret - "caret_extra_top": 0, - "caret_extra_bottom": 0, - "caret_extra_width": 0, - - // Set to false to disable underlining the brackets surrounding the caret - "match_brackets": true, - - // Set to false if you'd rather only highlight the brackets when the caret is - // next to one - "match_brackets_content": true, - - // Set to false to not highlight square brackets. This only takes effect if - // match_brackets is true - "match_brackets_square": true, - - // Set to false to not highlight curly brackets. This only takes effect if - // match_brackets is true - "match_brackets_braces": true, - - // Set to false to not highlight angle brackets. This only takes effect if - // match_brackets is true - "match_brackets_angle": false, - - // Enable visualization of the matching tag in HTML and XML - "match_tags": true, - - // Highlights other occurrences of the currently selected text - "match_selection": true, - - // Additional spacing at the top of each line, in pixels - "line_padding_top": 0, - - // Additional spacing at the bottom of each line, in pixels - "line_padding_bottom": 0, - - // Set to false to disable scrolling past the end of the buffer. - // On OS X, this value is overridden in the platform specific settings, so - // you'll need to place this line in your user settings to override it. - "scroll_past_end": true, - - // This controls what happens when pressing up or down when on the first - // or last line. - // On OS X, this value is overridden in the platform specific settings, so - // you'll need to place this line in your user settings to override it. - "move_to_limit_on_up_down": false, - - // Set to "none" to turn off drawing white space, "selection" to draw only the - // white space within the selection, and "all" to draw all white space - "draw_white_space": "selection", - - // Set to false to turn off the indentation guides. - // The color and width of the indent guides may be customized by editing - // the corresponding .tmTheme file, and specifying the colors "guide", - // "activeGuide" and "stackGuide" - "draw_indent_guides": true, - - // Controls how the indent guides are drawn, valid options are - // "draw_normal" and "draw_active". draw_active will draw the indent - // guides containing the caret in a different color. - "indent_guide_options": ["draw_normal"], - - // Set to true to removing trailing white space on save - "trim_trailing_white_space_on_save": false, - - // Set to true to ensure the last line of the file ends in a newline - // character when saving - "ensure_newline_at_eof_on_save": false, - - // Set to true to automatically save files when switching to a different file - // or application - "save_on_focus_lost": false, - - // Save via writing to an alternate file, and then renaming it over the - // original file. - "atomic_save": false, - - // The encoding to use when the encoding can't be determined automatically. - // ASCII, UTF-8 and UTF-16 encodings will be automatically detected. - "fallback_encoding": "Western (Windows 1252)", - - // Encoding used when saving new files, and files opened with an undefined - // encoding (e.g., plain ascii files). If a file is opened with a specific - // encoding (either detected or given explicitly), this setting will be - // ignored, and the file will be saved with the encoding it was opened - // with. - "default_encoding": "UTF-8", - - // Files containing null bytes are opened as hexadecimal by default - "enable_hexadecimal_encoding": true, - - // Determines what character(s) are used to terminate each line in new files. - // Valid values are 'system' (whatever the OS uses), 'windows' (CRLF) and - // 'unix' (LF only). - "default_line_ending": "system", - - // When enabled, pressing tab will insert the best matching completion. - // When disabled, tab will only trigger snippets or insert a tab. - // Shift+tab can be used to insert an explicit tab when tab_completion is - // enabled. - "tab_completion": true, - - // Enable auto complete to be triggered automatically when typing. - "auto_complete": true, - - // The maximum file size where auto complete will be automatically triggered. - "auto_complete_size_limit": 4194304, - - // The delay, in ms, before the auto complete window is shown after typing - "auto_complete_delay": 50, - - // Controls what scopes auto complete will be triggered in - "auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin", - - // Additional situations to trigger auto complete - "auto_complete_triggers": [ {"selector": "text.html", "characters": "<"} ], - - // By default, auto complete will commit the current completion on enter. - // This setting can be used to make it complete on tab instead. - // Completing on tab is generally a superior option, as it removes - // ambiguity between committing the completion and inserting a newline. - "auto_complete_commit_on_tab": false, - - // Controls if auto complete is shown when snippet fields are active. - // Only relevant if auto_complete_commit_on_tab is true. - "auto_complete_with_fields": false, - - // Controls what happens when pressing the up key while the first item in - // the auto complete window is selected: if false, the window is hidden, - // otherwise the last item in the window is selected. Likewise for the - // down key when the last item is selected. - "auto_complete_cycle": false, - - // Automatically close HTML and XML tags when </ is entered. - "auto_close_tags": true, - - // By default, shift+tab will only unindent if the selection spans - // multiple lines. When pressing shift+tab at other times, it'll insert a - // tab character - this allows tabs to be inserted when tab_completion is - // enabled. Set this to true to make shift+tab always unindent, instead of - // inserting tabs. - "shift_tab_unindent": false, - - // If true, the copy and cut commands will operate on the current line - // when the selection is empty, rather than doing nothing. - "copy_with_empty_selection": true, - - // If true, the selected text will be copied into the find panel when it's - // shown. - // On OS X, this value is overridden in the platform specific settings, so - // you'll need to place this line in your user settings to override it. - "find_selected_text": true, - - // When auto_find_in_selection is enabled, the "Find in Selection" flag - // will be enabled automatically when multiple lines of text are selected - "auto_find_in_selection": false, - - // When drag_text is enabled, clicking on selected text will begin a - // drag-drop operation. This is not currently implemented under Linux. - "drag_text": true, - - // - // User Interface Settings - // - - // The theme controls the look of Sublime Text's UI (buttons, tabs, scroll bars, etc) - "theme": "Default.sublime-theme", - - // Set to 0 to disable smooth scrolling. Set to a value between 0 and 1 to - // scroll slower, or set to larger than 1 to scroll faster - "scroll_speed": 1.0, - - // Controls side bar animation when expanding or collapsing folders - "tree_animation_enabled": true, - - // Controls animation throughout the application - "animation_enabled": true, - - // Makes tabs with modified files more visible - "highlight_modified_tabs": false, - - "show_tab_close_buttons": true, - - // Show folders in the side bar in bold - "bold_folder_labels": false, - - // OS X only: Set to true to disable Lion style full screen support. - // Sublime Text must be restarted for this to take effect. - "use_simple_full_screen": false, - - // OS X only. Valid values are true, false, and "auto". Auto will enable - // the setting when running on a screen 2560 pixels or wider (i.e., a - // Retina display). When this setting is enabled, OpenGL is used to - // accelerate drawing. Sublime Text must be restarted for changes to take - // effect. - "gpu_window_buffer": "auto", - - // Valid values are "system", "enabled" and "disabled" - "overlay_scroll_bars": "system", - - // Allows tabs to scroll left and right, instead of simply shrinking - "enable_tab_scrolling": true, - - // Display file encoding in the status bar - "show_encoding": false, - - // Display line endings in the status bar - "show_line_endings": false, - - // - // Application Behavior Settings - // - - // Exiting the application with hot_exit enabled will cause it to close - // immediately without prompting. Unsaved modifications and open files will - // be preserved and restored when next starting. - // - // Closing a window with an associated project will also close the window - // without prompting, preserving unsaved changes in the workspace file - // alongside the project. - "hot_exit": true, - - // remember_full_screen will allow Sublime Text to start in full screen - // mode if it was exited in full screen mode. When set to false, Sublime - // Text will never start in full screen mode. - "remember_full_screen": false, - - // Always prompt before reloading a file, even if the file hasn't been - // modified. The default behavior is to automatically reload a file if it - // hasn't been edited. If a file has unsaved changes, a prompt will always - // be shown. - "always_prompt_for_file_reload": false, - - // OS X only: When files are opened from finder, or by dragging onto the - // dock icon, this controls if a new window is created or not. - "open_files_in_new_window": true, - - // OS X only: This controls if an empty window is created at startup or not. - "create_window_at_startup": true, - - // Set to true to close windows as soon as the last file is closed, unless - // there's a folder open within the window. - // On OS X, this value is overridden in the platform specific settings, so - // you'll need to place this line in your user settings to override it. - "close_windows_when_empty": false, - - // Show the full path to files in the title bar. - // On OS X, this value is overridden in the platform specific settings, so - // you'll need to place this line in your user settings to override it. - "show_full_path": true, - - // Shows the Build Results panel when building. If set to false, the Build - // Results can be shown via the Tools/Build Results menu. - "show_panel_on_build": true, - - // Preview file contents when clicking on a file in the side bar. Double - // clicking or editing the preview will open the file and assign it a tab. - "preview_on_click": true, - - // folder_exclude_patterns and file_exclude_patterns control which files - // are listed in folders on the side bar. These can also be set on a per- - // project basis. - "folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"], - "file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"], - // These files will still show up in the side bar, but won't be included in - // Goto Anything or Find in Files - "binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"], - - // File indexing parses all files in the side bar, and builds an index of - // their symbols. This is required for Goto Definition to work. - "index_files": true, - - // Set the number threads to use for indexing. A value of 0 will make - // Sublime Text guess based on the number of cores. Use the index_files - // setting to disable all workers. - "index_workers": 0, - - // index_exclude_patterns indicate which files won't be indexed. - "index_exclude_patterns": ["*.log"], - - // When enabled, anonymised usage data is sent back, assisting Sublime HQ - // in making informed decisions about improving Sublime Text. File names - // and file contents are never included, but data such as computer - // specifications, startup time, installed packages, and edited file types - // are. When disabled, telemetry is neither recorded or sent. - // A setting of auto will enable telemetry in dev builds, and disable - // telemetry in regular builds. - "enable_telemetry": "auto", - - // List any packages to ignore here. When removing entries from this list, - // a restart may be required if the package contains plugins. - "ignored_packages": ["Vintage"] -} diff --git a/Preferences2.txt b/Preferences2.txt deleted file mode 100644 index 7af229b..0000000 --- a/Preferences2.txt +++ /dev/null @@ -1,35 +0,0 @@ -{ - "auto_complete": true, - "caret_style": "solid", - "color_scheme": "Packages/User/SublimeLinter/Tomorrow-Night (SL).tmTheme", - "draw_white_space": "selection", - "find_selected_text": true, - "fold_buttons": false, - "font_face": "SourceCodePro-Medium", - "font_options": - [ - "subpixel_antialias", - "no_bold" - ], - "font_size": 14, - "highlight_line": true, - "highlight_modified_tabs": true, - "ignored_packages": - [ - "Vintage" - ], - "line_padding_bottom": 0, - "line_padding_top": 0, - "rulers": - [ - 72, - 79 - ], - "scroll_past_end": false, - "show_full_path": true, - "show_minimap": true, - "theme": "Soda Dark.sublime-theme", - "wide_caret": true, - "word_wrap": true, - "wrap_width": 80 -} diff --git a/RawMemory b/RawMemory Binary files differdeleted file mode 100644 index 05699be..0000000 --- a/RawMemory +++ /dev/null diff --git a/RawMemory.cpp b/RawMemory.cpp deleted file mode 100644 index f6247f6..0000000 --- a/RawMemory.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include <iostream> -#include <string> - -using namespace std; - -int main() { - int a = 15; - int* point = &a; - - cout << "a: " << a << ", &a: " << &a << ", point: " - << point << ", &point: " << &point << ", *point: " << - *point << endl; - -}
\ No newline at end of file diff --git a/RealEstate b/RealEstate Binary files differdeleted file mode 100644 index 8e896a4..0000000 --- a/RealEstate +++ /dev/null diff --git a/RealEstate.cpp b/RealEstate.cpp deleted file mode 100644 index 5f69c91..0000000 --- a/RealEstate.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include <iostream> -#include <vector> -#include <string> -#include <cstdlib> -#include <sstream> -#include <fstream> - -using namespace std; - -void check_string(); -// void translate(stringstream); - -struct dict_type { - string false_m, real_m; -}; - -void check_string() { - ifstream dict_file; - dict_type dict; - vector<string> false_statement, real_statement, words; - stringstream statement; - string word, original; - - dict_file.open("DictRealEstate.txt"); - if(dict_file.is_open()){ - cout << "open\n"; - while(dict_file >> dict.false_m >> dict.real_m) { - false_statement.push_back(dict.false_m); - real_statement.push_back(dict.real_m); - } - cout << "finished...\n"; - dict_file.close(); - } - - cout << "Enter Statement: "; - getline(cin, original); - statement << original; - - while(statement >> word) { - words.push_back(word); - } - - for(int i = 0; i < words.size(); i++) { - for(int j = 0; j < false_statement.size(); j++) { - if(words[i] == false_statement[j]) { - words[i] = real_statement[j]; - } - } - } - cout << "Translation: "; - for(int k = 0; k < words.size(); k++) { - cout << words[k] << " "; - } - cout << endl; -} - -int main() { - check_string(); - return(0); -}
\ No newline at end of file diff --git a/Recursion.cpp b/Recursion.cpp deleted file mode 100644 index 21742ca..0000000 --- a/Recursion.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include <iostream> - -using namespace std; - -typedef int list_t; - -struct linkNode { - list_t element; - linkNode* next; -}; - -void addElement(linkNode*&, list_t&); -void addElementReverse(linkNode*&, list_t&); - -int main() { - linkNode* firstList = NULL; - linkNode* secondList = NULL; - - int n; - list_t el; - cout << "Number of elements in list: "; - cin >> n; - for(int i = 0; i < n; ++i) { - - } -} - -void addElement(linkNode* &hdList, list_t &el) { - linkNode* newNode = new linkNode; - newNode->element = el; - newNode->next = hdList; - hdList = newNode; -} - -void addElementReverse(linkNode* &hdList, list_t &el) { - if(hdList == NULL) { - - } else { - - } -} diff --git a/SecondFile.txt b/SecondFile.txt deleted file mode 100644 index 352813f..0000000 --- a/SecondFile.txt +++ /dev/null @@ -1,5 +0,0 @@ -Trump, Donald -Wiersema, Martin -Blanc, Alex -Herklotz, Yann -Wiggins, Sam Binary files differdiff --git a/Sets.cpp b/Sets.cpp deleted file mode 100644 index cba50fc..0000000 --- a/Sets.cpp +++ /dev/null @@ -1,63 +0,0 @@ -m#include <iostream> -#include <cmath> -#include <vector> - -using namespace std; - -vector<int> v_union(vector<int>, vector<int>); -vector<int> v_intersection(vector<int>, vector<int>); -bool v_subset(vector<int>, vector<int>); - -vector<int> v_union(vector<int> v1, vector<int> v2) { - for(int i = 0; i < v2.size(); i++) { - bool present = false; - for(int j = 0; j < v1.size(); j++) { - if(v2[i] == v1[j]) { - present = true; - } - } - if(!present) { - v1.push_back(v2[i]); - } - } - return v1; -} - -vector<int> v_intersection(vector<int> v1, vector<int> v2) { - vector<int> vInt; - for(int i = 0; i < v2.size(); i++) { - for(int j = 0; j < v1.size(); j++) { - if(v2[i] == v1[j]) { - vInt.push_back(v2[i]); - } - } - } - return vInt; -} - -bool v_subset(vector<int> v1, vector<int> v2) { - for(int i = 0; i < v2.size(); i++) { - bool present = false; - for(int j = 0; j < v1.size(); j++) { - if(v1[j] == v2[i]) { - present = true; - } - } - if(!present) { - return false; - } - } - return true; -} - -int main() { - vector<int> a, b, c; - a.push_back(1); - a.push_back(2); - a.push_back(3); - b.push_back(1); - b.push_back(1); - b.push_back(2); - cout << v_subset(a, b) << endl; - return 0; -}
\ No newline at end of file diff --git a/SumAndScalar b/SumAndScalar Binary files differdeleted file mode 100644 index fb86c0e..0000000 --- a/SumAndScalar +++ /dev/null diff --git a/SumAndScalar.cpp b/SumAndScalar.cpp deleted file mode 100644 index 04af50c..0000000 --- a/SumAndScalar.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include <iostream> -#include <cmath> -#include <vector> - -using namespace std; - -vector<double> vector_sum(vector<double>, vector<double>); -double vector_product(vector<double>, vector<double>); - -vector<double> vector_sum(vector<double> v1, vector<double> v2) { - vector<double> vSum; - for(int i = 0; i < v1.size(); i++) { - vSum.push_back(v1[i] + v2[i]); - } - return vSum; -} - -double vector_product(vector<double> v1, vector<double> v2) { - double vProduct; - for(int j = 0; j < v1.size(); j++) { - vProduct += v1[j] * v2[j]; - } - return vProduct; -} - -int main() { - vector<double> v1, v2, vSum; - double tmp, tmp2, vProduct; - int dimensions, x; - cout << "How many dimensions are you using? "; - cin >> dimensions; - do { - cout << "Please enter both vectors: "; - cin >> tmp >> tmp2; - v1.push_back(tmp); - v2.push_back(tmp2); - x++; - } while (x < dimensions); - vSum = vector_sum(v1, v2); - vProduct = vector_product(v1, v2); - cout << "Sum: "; - for(int k = 0; k < vSum.size(); k++) { - cout << vSum[k] << " "; - } - cout << "\nProduct: " << vProduct << endl; - return 0; -}
\ No newline at end of file diff --git a/Surname.txt b/Surname.txt deleted file mode 100644 index a2e62ec..0000000 --- a/Surname.txt +++ /dev/null @@ -1,5 +0,0 @@ -Trump -Wiersema -Blanc -Herklotz -Wiggins
\ No newline at end of file Binary files differdiff --git a/Test1.cpp b/Test1.cpp deleted file mode 100644 index a3ef13c..0000000 --- a/Test1.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include <iostream> -#include <cstdlib> -#include <fstream> -#include <sstream> -#include <string> -#include <vector> - -using namespace std; - -struct item { - string name; - int num; - - void print_str() { - cout << name << ": " << num << endl; - } -}; - -void merge_items(const vector<item> &vec1, vector<item> &vec2, vector<item> &vec_final) { - // bool running = false; - // for(int i = 0; i < vec1.size(); i++) { - // if(vec1[i].name == vec2[i].name) { - // vec2[i].num += vec1[i].num; - // vec_final.push_back(vec2[i]); - // } else if(vec1[i].name < vec2[i].name) { - // vec_final.push_back(vec1[i]); - // vec_final.push_back(vec2[i]); - // } else { - // vec_final.push_back(vec2[i]); - // vec_final.push_back(vec1[i]); - // } - // } - int count1, count2; - count1 = 0; - count2 = 0; - do { - if(count1 < vec1.size()) { - if(vec1[count1].name == vec2[count2].name) { - vec2[count2].num += vec1[count1].num; - vec_final.push_back(vec2[count2]); - count1++; - count2++; - } else if(vec1[count1].name < vec2[count2].name) { - vec_final.push_back(vec1[count1]); - count1++; - } else if(vec1[count1].name > vec2[count2].name) { - vec_final.push_back(vec2[count2]); - count2++; - } - } else { - vec_final.push_back(vec2[count2]); - count2++; - } - } while (vec_final.size() < vec1.size() + vec2.size()); - for(int i = vec1.size(); i < vec2.size(); i++) { - vec_final.push_back(vec2[i]); - } -} - -int main() { - string ware1, ware2; - ifstream fileware1, fileware2; - vector<item> vecware1, vecware2, vecfinal; - item tmpitem; - - ware1 = "Warehouse1.txt"; - ware2 = "Warehouse2.txt"; - - fileware1.open(ware1); - fileware2.open(ware2); - - if(!fileware1.is_open()) { - cout << "couldn't open fileware1: '" << ware1 << "'" << endl; - } - if(!fileware2.is_open()) { - cout << "couldn't open fileware2: '" << ware2 << "'" << endl; - } - - while(fileware1 >> tmpitem.name >> tmpitem.num) { - vecware1.push_back(tmpitem); - } - while(fileware2 >> tmpitem.name >> tmpitem.num) { - vecware2.push_back(tmpitem); - } - - merge_items(vecware2, vecware1, vecfinal); - for(int i = 0; i < vecfinal.size(); i++) { - cout << vecfinal[i].name << ": " << vecfinal[i].num << endl; - } - - fileware1.close(); - fileware2.close(); - return(0); -}
\ No newline at end of file Binary files differdiff --git a/TestExample2 b/TestExample2 Binary files differdeleted file mode 100644 index 649e119..0000000 --- a/TestExample2 +++ /dev/null diff --git a/TestExample2.cpp b/TestExample2.cpp deleted file mode 100644 index fb7510f..0000000 --- a/TestExample2.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include <iostream> -#include <string> -#include <vector> - -using namespace std; - -struct codon_pairing { - string amino; - string codon; - - void prnt_pair() { - cout << amino << " " << codon << endl; - } -}; - -void wrong_entries(vector<codon_pairing>&, vector<codon_pairing>&, vector<codon_pairing>&); - -int main() { - vector<codon_pairing> experiment_log, correct_pair, wrong_pairs; - codon_pairing tmpcp; - - cout << "Please enter the experiment log (end end pair terminates):" << endl; - - do { - cin >> tmpcp.amino >> tmpcp.codon; - experiment_log.push_back(tmpcp); - } while(tmpcp.amino != "end" && tmpcp.codon != "end"); - - cout << "Please enter the known correct pairings (end end pair terminates):" << endl; - - do { - cin >> tmpcp.amino >> tmpcp.codon; - correct_pair.push_back(tmpcp); - } while(tmpcp.amino != "end" && tmpcp.codon != "end"); - wrong_entries(experiment_log, correct_pair, wrong_pairs); - cout << "Wrong entries:" << endl; - for(int i = 0; i < wrong_pairs.size(); ++i) { - wrong_pairs[i].prnt_pair(); - } -} - -void wrong_entries(vector<codon_pairing>& exp_log, vector<codon_pairing>& crrct_pair, vector<codon_pairing>& wrng_pairs) { - bool present = false; - for(int i = 0; i < exp_log.size(); ++i) { - for(int j = 0; j < crrct_pair.size(); ++j) { - if(exp_log[i].amino == crrct_pair[j].amino && exp_log[i].codon == crrct_pair[j].codon) { - present = true; - } - } - if(!present) { - wrng_pairs.push_back(exp_log[i]); - } - present = false; - } -}
\ No newline at end of file diff --git a/TriangularDivisor b/TriangularDivisor Binary files differdeleted file mode 100644 index 9fcd14e..0000000 --- a/TriangularDivisor +++ /dev/null diff --git a/TriangularDivisor.cpp b/TriangularDivisor.cpp deleted file mode 100644 index 4e1278c..0000000 --- a/TriangularDivisor.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include <iostream> - -using namespace std; - -int main() { - int count, triangle, k, result; - int* allcount = new int[100000000000]; - k = 0; - result = 1; - for(int i = 2; i < 50000; ++i) { - triangle = (i*(i+1))/2; - int realtriangle = triangle; - for(int j = 2; j <= triangle; ++j) { - count = 0; - while(triangle % j == 0) { - triangle /= j; - ++count; - } - allcount[k] = count; - ++k; - } - for(int j = 0; j < k; ++j) { - result *= (allcount[j]+1); - } - if(result > 500) { - cout << realtriangle << endl; - } - } -}
\ No newline at end of file diff --git a/Warehouse1.txt b/Warehouse1.txt deleted file mode 100644 index b334063..0000000 --- a/Warehouse1.txt +++ /dev/null @@ -1,5 +0,0 @@ -apple 12 -banana 14 -mango 4 -orange 15 -pineapple 10
\ No newline at end of file diff --git a/Warehouse2.txt b/Warehouse2.txt deleted file mode 100644 index 8d564e6..0000000 --- a/Warehouse2.txt +++ /dev/null @@ -1,3 +0,0 @@ -avocado 9 -banana 22 -papaya 5
\ No newline at end of file diff --git a/smalltest.cpp b/smalltest.cpp deleted file mode 100644 index 52e5044..0000000 --- a/smalltest.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include <iostream> -#include <string> - -using namespace std; - -int main() { - string str1 = "Hello"; - string str2 = "Hella"; - if(str1 == str2) { - cout << str1 << " equals " << str2 << endl; - } else if(str1 < str2) { - cout << str1 << " is smaller than " << str2 << endl; - } else if(str1 > str2){ - cout << str1 << " is greater than " << str2 << endl; - } -} diff --git a/something.py b/something.py deleted file mode 100644 index 94685e0..0000000 --- a/something.py +++ /dev/null @@ -1,5 +0,0 @@ -def function(): - - -if __name__ == '__main__': - main()
\ No newline at end of file diff --git a/test1.py b/test1.py deleted file mode 100644 index db3f188..0000000 --- a/test1.py +++ /dev/null @@ -1,16 +0,0 @@ -def fib(*arg): - fib1 = [0, 1] - if(len(arg) == 1): - for x in range(2, arg[0]): - fib1.append(fib1[x-2]+fib1[x-1]) - print(fib1) - elif(len(arg) == 2): - for x in range(2, arg[1]): - fib1.append(fib1[x-2]+fib1[x-1]) - print(fib1[arg[0]-1:]) - -def main(): - fib(10, 20) - -if __name__ == '__main__': - main()
\ No newline at end of file diff --git a/thinkCScpp.pdf b/thinkCScpp.pdf Binary files differBinary files differdeleted file mode 100644 index a2f4ed5..0000000 --- a/thinkCScpp.pdf +++ /dev/null @@ -1,24 +0,0 @@ -#include <iostream> -#include <vector> -#include <sstream> - -using namespace std; - -struct point { - double x; - double y; - - string returnString() { - stringstream ss; - ss << "(" << x << ", " << y << ")"; - return ss.str(); - } -}; - -int main() { - point userPt; - - cout << "Please enter a point: "; - cin >> userPt.x >> userPt.y; - cout << "Your point was: " << userPt.returnString() << endl; -} |