View stdout
jakub@pidizvik:~/vsfm$ make
mkdir -p build
mkdir -p bin
cd build; ar -x ../lib/VisualSFM.a; cd ..;
g++ -w -o bin/VisualSFM build/*.* -pthread -lGL -lGLU -lX11 -ldl -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype -lgthread-2.0 -pthread -lglib-2.0 lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a
/usr/bin/ld: lib/lapack.a(dgeev.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/lapack.a(dgehrd.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/lapack.a(dgerqf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/lapack.a(dgesv.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: li
View slicer.ini
# generated by Slic3r 1.3.0-dev on Fri Feb 23 16:52:42 2018
[filament:ColorFabb Brass Bronze 1.75mm]
bed_temperature = 50
bridge_fan_speed = 100
compatible_printers =
cooling = 1
disable_fan_first_layers = 1
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
extrusion_multiplier = 1
View My answer.md

There's multiple issues:

  • somethingIsTrue ? doSomething(); is not valid in JavaScript. See MDN on ternary operator
  • Frankly, I don't think Array.prototype.reduce is the right choice. Reduce creates something from all array members. I mean you could use it for this, but the code would be unnecesarily obscure. For generic looping, use either map (1:1 conversion of array elements) or forEach

I'd use forEach, or just classic for:

View gist:f081d5c9de04cdc31a93406f6b1e5c1a
var halire = 0;
var prispevky = 0;
document.querySelectorAll("td.amount.amount_value").forEach(function(elm) {
const cash = elm.getAttribute("data-value")*1;
if(cash>1) prispevky +=cash;
else halire+=cash;
});
[halire, prispevky]
View casy.js
var casy2 = [
["7:30", "8:15"],
["8:15", "9:00"],
["9:15", "10:00"],
["10:00", "10:45"],
["11:00", "11:45"],
["11:45", "12:30"],
["12:45", "13:30"],
["13:30", "14:15"],
["14:30", "15:15"],
View refresh.js
console.log("This script changes cached resources' path in GreaseMonkey addon folder to force refresh.");
console.log("Press any key to start adding files.");
/*process.stdin.setRawMode(true);
process.stdin.resume();
process.stdin.on('data', ()=>{getFiles(updateLoop);}); */
var fs=require("fs");
var path = require("path");
/*var prompt = require('prompt-sync');
View spam_phishing.py
import httplib, urllib
params = {
"app": "",
"login_post": "1",
"url": "",
"anchor_string": "",
"username": "dsavffsfds",
"password": "fdsfdsfdsfds",
"horde_select_view": "auto",
"new_lang": "en_US"}
View pocitani konvoluce.cpp
void Image::convolute(const int matrix[3][3], Image& target)
{
target.setSize(getWidth(), getHeight());
for(size_t y=0, yl=getHeight(); y<yl; ++y) {
for(size_t x=0, xl=getWidth(); x<xl; ++x) {
if(x==0 || y==0 || x+1==xl || y+1==yl) {
target.pixels[y][x] = pixels[y][x];
}
else {
target.pixels[y][x] = ((pixels[y-1][x-1]*matrix[0][0])
View rickroll-once.js
const RICKROLL = "https://www.youtube.com/watch?v=oHg5SJYRHA0";
const RICKROLL_DAY = 1;
const RICKROLL_MONTH = 4;
if(Storage && window.localStorage && window.localStorage instanceof Storage) {
// Check if it's 1st of April
var date = new Date();
// Note that months are zero indexed
if(date.getDate() == RICKROLL_DAY && date.getMonth() == RICKROLL_MONTH-1) {
// If local storage does not work, rickroll will simply never occur
// this is a safety measure to prevent people being rickrolled forever
View HomeworkTestBase.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;