Based on @VisioN's profile signature in StackOverflow, turned into a configurator that anyone can use.
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 Russian) | |
(defn multiply [& args] | |
(defn russian_multiply [a b p] | |
(cond | |
(> a 0) (russian_multiply (bit-shift-right a 1) (bit-shift-left b 1) (+ p (if (= (mod a 2) 1) b 0))) | |
:else p)) | |
(defn flip [a] (inc (bit-not a))) | |
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
/*jslint bitwise: true */ | |
var multiply = function () { | |
'use strict'; | |
var fn = function (a, b, product) { | |
if (a > 0) { | |
return fn(a >> 1, b << 1, product + (a % 2 === 1 ? b : 0)); | |
} | |
return product; | |
}, | |
factors = Array.prototype.slice.call(arguments), |
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
import Image, ImageDraw | |
box_height = 2 | |
box_width = 6 | |
box_gap_height = 3 | |
box_gap_width = 2 | |
background = (0,0,0) | |
level_background = (119,120,123) | |
peeks = (237,26,59) |
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
import java.util.ArrayList; | |
import java.util.List; | |
public class PrimeFactorsOf { | |
public static void main(String ... args) { | |
System.out.println(primeFactorsOf(19252389595L)); | |
} | |
static List<Long> primeFactorsOf(long val) { | |
long n = val; |
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
using System; | |
using System.Collections.Generic; | |
namespace so15415825 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var badguys = new List<Badguy>() |
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
from math import pow | |
from cmath import sqrt | |
print "Quadradtic Formula Calculator!!!" | |
print "Ax²+Bx+C=0" | |
print "This solve for x" | |
a = input("Please, enter value for A: ") | |
b = input("Please, enter value for B: ") | |
c = input("Please, enter value for C: ") |
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
@ECHO OFF | |
REM | |
REM 01.17.2013, Requires Node.js, JSHint, Recess, and UglifyJS (installed in the path) | |
REM Run this command after node.js is installed | |
REM npm install -g less jshint recess uglify-js | |
REM | |
MKDIR bootstrap\img | |
MKDIR bootstrap\css | |
MKDIR bootstrap\js |
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
list_of_lists=[] | |
category=0 | |
list_of_lists.append([]) | |
f = open("list.txt",'r') | |
for line in f.readlines(): | |
item = line.strip('\n') # no white spaces in the list | |
if len(item) > 0: | |
#add to current category |
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
# My Third Python program | |
# Based on this spec: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html | |
import time | |
import random | |
def fbPrinter(simulator, translator, i): | |
time.sleep(simulator(i)) | |
print(translator(i)) |