Skip to content

Instantly share code, notes, and snippets.

View Nikamura's full-sized avatar
🐥

Karolis Mažukna Nikamura

🐥
View GitHub Profile
@Nikamura
Nikamura / screenshot.sh
Created February 3, 2016 15:16
Moves screenshot to directory on Mac
function mv_screen() {
# Lecture id for folder
course="$*"
# Folder to where captured screenshots are stored
sf=~/"Desktop"
# Where images are stored
path="../Google Drive/Revision/$course/"
import java.io.*;
import java.util.Hashtable;
public class LettersCounter {
private static File file;
private static BufferedReader reader;
private static Hashtable<String, Integer> lettersFreq = new Hashtable<String, Integer>();
public static void main(String[] args) {
#ifdef __STDC__
static const double one = 1.0, tiny=1.0e-300;
#else
static double one = 1.0, tiny=1.0e-300;
#endif
#ifdef __STDC__
double __ieee754_sqrt(double x)
#else
double __ieee754_sqrt(x)
@cache = []
def fib(x)
return @cache[x] if @cache[x]
return 0 if x == 0
return 1 if x == 1
@cache[x] = fib(x - 1) + fib(x - 2)
end
p fib(3)
{
"data": {
"us": 5513474,
"lt": 12714,
"nl": 11564,
"ua": 858,
"my": 186,
"it": 144,
"be": 49,
"tr": 48,
./app/views/accounts/_account_information.html.haml:41 [W] ImplicitDiv: `%div` can be written as `#account_password'` since `%div` is implicit
./app/views/accounts/_company_permissions.html.haml:7 [W] ClassesBeforeIds: Classes should be listed before IDs (.form-body should precede #company_permissions)
./app/views/accounts/_websites_permissions.html.haml:13 [W] ClassesBeforeIds: Classes should be listed before IDs (.form-body should precede #account_permissions)
./app/views/admin/activities/_activities_list.html.haml:1 [W] ClassesBeforeIds: Classes should be listed before IDs (.margin-top-5 should precede #activities_list)
./app/views/admin/companies/edit.html.haml:1 [W] ClassesBeforeIds: Classes should be listed before IDs (.modal-dialog should precede #edit_company_modal)
./app/views/admin/companies/new.html.haml:1 [W] ClassesBeforeIds: Classes should be listed before IDs (.modal-dialog should precede #new_company_modal)
./app/views/admin/dashboards/show.html.haml:42 [W] ClassesBeforeIds: Classes should be
JSONObject data = new JSONObject();
String response;
try {
data.put("function", "postForSale");
JSONArray arguments = new JSONArray();
// post_for_sale($title,$uid,$cid,$desc,$cost,$media,$cond)
// First argument is title
// Second argument is uid