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
| use std::io::stdin; | |
| use std::result::Result; | |
| enum Operation { | |
| Add(f64, f64), | |
| Sub(f64, f64), | |
| Mult(f64, f64), | |
| Div(f64, f64), | |
| Invalid, | |
| } |
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
| fn main() { | |
| let string1 = String::from("Hamza"); | |
| let string2 = String::from("Mateen"); | |
| let concatenated_string = concatenate_strings(&string1[0..5], &string2[0..6]); | |
| println!("{}", concatenated_string); | |
| } |
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
| Always make sure to have latest kernel header files installed! $ sudo apt install kernel-headers-$(uname -r) |
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
| PART 1: | |
| " esc in insert & visual mode | |
| inoremap kj <esc> | |
| vnoremap kj <esc> | |
| " esc in command mode | |
| cnoremap kj <C-C> | |
| " Note: In command mode mappings to esc run the command for some odd | |
| " historical vi compatibility reason. We use the alternate method of | |
| " existing which is Ctrl-C |