This file contains hidden or 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
| //BASIC FUNCTION | |
| function fetchJSON (src) { | |
| let promise = $.ajax({ | |
| dataType: 'json', | |
| url: src, | |
| error: function (jqXHR, response) { | |
| console.log('inside') | |
| console.log(jqXHR) | |
| var msg = '' |
This file contains hidden or 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 lines(file1, file2): | |
| result = set() | |
| def getLinesList(file): | |
| # storage array | |
| fileList = [] | |
| # temp storage array | |
| tempList = [] | |
| # if all lines have \n at the end |
This file contains hidden or 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
| import cs50 | |
| # Pseudo | |
| # - divide total by a coin amount | |
| # - keep dividing it by increments of that coin, count each time | |
| # - subtract from total each time, amount left undivided | |
| # - move the amount left from coin to coin | |
| def greedy(): |
This file contains hidden or 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
| // Implements a dictionary's functionality | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <ctype.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <math.h> | |
| #include <xlocale.h> |
This file contains hidden or 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
| // Implements a dictionary's functionality | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <ctype.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <math.h> | |
| #include "dictionary.h" |
This file contains hidden or 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
| I mean redo the code entirely | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "bmp.h" | |
| int main(int argc, char *argv[]) | |
| { | |
| // ensure proper usage |
This file contains hidden or 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
| // Copies a BMP file | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "bmp.h" | |
| int main(int argc, char *argv[]) | |
| { | |
| // ensure proper usage |
This file contains hidden or 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
| // Helper functions for music | |
| #include <cs50.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #include <math.h> | |
| #include "helpers.h" |
This file contains hidden or 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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
This file contains hidden or 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
| // cleaned up with counter | |
| int main(int argc, char *argv[]){ | |
| if(argc != 2) { | |
| printf("Error on input"); | |
| exit(1); | |
| } | |
| string input = get_string("Input:"); | |
| printf("plaintext: %s\n", input); | |
| printf("ciphertext: "); |