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
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <crypt.h> | |
char next(char c); | |
int main(int argc, string argv[]) | |
{ | |
//check correct usage. |
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
string word = "LOp"; | |
string check = crypt(word, salt); | |
for(int i = 0;i<5;i++) | |
{ | |
if (strcmp(check, argv[1])==0) | |
{ | |
result = true; | |
break; | |
} |
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
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main(int argc, string argv[]) | |
{ | |
string cipher_key; | |
//check to see if argv has only one argument. [0] == prog-name hence the <=2 | |
//if it does assign it to var. |
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
require_relative 'character' | |
class Marshal < Character | |
def initialize *arr | |
super arr | |
@key_stat = get_key_stat [@dex,@wis] | |
end | |
def vacancy_penalty |
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
sudo apt-get install supercollider ruby2.0 libqscintilla2-dev ruby-dev cmake pkg-config g++ | |
Package ruby2.0 is not available, but is referred to by another package. | |
This may mean that the package is missing, has been obsoleted, or | |
is only available from another source | |
E: Package 'ruby2.0' has no installation candidate | |
-------------------------------------------------------- | |
apt search ruby |grep ruby |
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 check num | |
fizz_buzzez= [] | |
if num % 3 == 0 | |
fizz_buzzez << 'Fizz' | |
end | |
if num % 5 == 0 | |
fizz_buzzez << 'Buzz' | |
end | |
fizz_buzzez | |
end |
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 initialize *args | |
@files = [] | |
@switches = [] | |
until args.first.to_s.include?('-') == false | |
tmp_switch = args.shift | |
@switches.push(tmp_switch) | |
end | |
until args.empty? | |
tmp_file = args.shift | |
@files.push(tmp_file) |