Skip to content

Instantly share code, notes, and snippets.

'''
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)
#First enter rails console:
$rails console
#Then just type:
ActiveRecord::Migration.drop_table(:users)
Where :users is the table name.
'''
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:
@epson121
epson121 / binarno_stablo.cpp
Last active September 24, 2015 16:47
binarno stablo -> pokazivaci
#include <iostream>
using namespace std;
struct cvor
{
int oznaka;
int PrvoDijete;
int SljedeciBrat;
bool koristeno;
};
@epson121
epson121 / ostablo.cpp
Last active September 24, 2015 15:07
Binarno stablo -> polja
#include <iostream>
using namespace std;
struct cvor
{
int oznaka;
int PrvoDijete;
int SljedeciBrat;
};