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
(ns tom | |
(:require | |
[clojure.pprint :as pprint] | |
) | |
(:import [tom IFizzBuzz]) | |
(:gen-class) | |
) | |
(defn FizzBuzz |
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
//Script in case you get following error in your project | |
/* | |
Error: EMFILE: too many open files, open '%file%' | |
at Error (native) | |
*/ | |
var fs = require('fs'); | |
var fsHandler = function(callBack){ | |
var queue = []; | |
var semaphore = 0; |
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
/** | |
* Created by tom on 13.09.2017. | |
*/ | |
import org.kohsuke.github.*; | |
import java.io.IOException; | |
public class Main { | |
private static final String userid = "username"; |
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
#lang racket/base | |
(define costfunction | |
(lambda (stg freisms kostenprosms x) | |
(+ (- stg ( * freisms kostenprosms)) (* kostenprosms x) ) | |
) | |
) | |
;tolerance | |
(define EPS 1e-3) |
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 <stdlib.h> | |
#include <cstdio> | |
typedef struct { | |
int age; | |
char *name; | |
void (*eat)(const void *self); | |
} Animal; |
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 <endian.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <math.h> | |
#include <sys/time.h> |
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
(defn sum [oneDimArr] | |
(reduce + oneDimArr) | |
) | |
(defn singleHourGlassSum [arr , i , j] | |
(sum | |
(vector | |
(get-in arr [i j]) | |
(get-in arr [i (+ j 1)]) | |
(get-in arr [i (+ j 2)]) |
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 <bits/stdc++.h> | |
using namespace std; | |
const int BOARDSIZE = 16; | |
int sumVector(vector<int> arr){ | |
int sum_of_elems = 0; | |
for (auto& n : arr) | |
sum_of_elems += n; | |
return sum_of_elems; | |
} |
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
const url = "https://query1.finance.yahoo.com/v8/finance/chart/"; | |
const parameter = "?region=US&lang=en-US&includePrePost=false&interval=1m&range=max&corsDomain=finance.yahoo.com&.tsrc=finance" | |
async function downloadPage(url) { | |
return new Promise((resolve, reject) => { | |
request(url, (error, response, body) => { | |
if (error) reject(error); | |
if (response.statusCode != 200) { | |
reject('Invalid status code <' + response.statusCode + '>'); | |
} | |
resolve(body); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer