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
| ''' | |
| Caesar cipher with a swap by 3 | |
| 2 implementations | |
| ''' | |
| def c(s) | |
| s.split("").map{|s|(65+(s.ord+16)%26).chr}.join() | |
| end | |
| def c2(s) |
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
| #First enter rails console: | |
| $rails console | |
| #Then just type: | |
| ActiveRecord::Migration.drop_table(:users) | |
| Where :users is the table name. |
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
| ''' | |
| Write code that will print ten astrisks (*) like the following: | |
| * * * * * * * * * * | |
| ''' | |
| print("first"); | |
| for i in range (10): | |
| print ("*", end = " "); | |
| ''' | |
| Write code that will print the following: |
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
| #include <iostream> | |
| using namespace std; | |
| struct cvor | |
| { | |
| int oznaka; | |
| int PrvoDijete; | |
| int SljedeciBrat; | |
| bool koristeno; | |
| }; |
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
| #include <iostream> | |
| using namespace std; | |
| struct cvor | |
| { | |
| int oznaka; | |
| int PrvoDijete; | |
| int SljedeciBrat; | |
| }; |
NewerOlder