' " , <
. >
p P ::: П п :::: u+041f
y Y ::: Уу ::: u
_ = require 'underscore' | |
c = console.log | |
mia = ['a', 'b', 'c', 'd'] | |
# or | |
miString = 'abcd' | |
mia = miString.split("") | |
# you can put any string you like, then call the recursive routine below: | |
permute = (a) -> | |
c 'permute and mia ', a | |
if a.length == 1 |
http= require 'http' | |
ss= require 'socketstream' | |
express= require 'express' | |
metro= express() | |
connectRedis= require 'connect-redis' | |
redisStore= connectRedis express | |
metro.use express.json() |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
// dvorak-phonetic | |
partial alphanumeric_keys | |
xkb_symbols "dvorak" { | |
name[Group1]= "Hebrew (dvorak)"; | |
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] }; | |
key <AE01> { [ 1, exclam ] }; | |
key <AE02> { [ 2, at ] }; |
' " , <
. >
p P ::: П п :::: u+041f
y Y ::: Уу ::: u
c= console.log | |
c "another arabic to roman numeral translator: \n" | |
digitiser= (integra)-> | |
if integra >= 10000 then c "error, we're only taking numbers less than 10,000" | |
strang= integra.toString() | |
rayy= strang.split '' | |
arq= {} | |
switch strang.length | |
when 4 |
# some array exercises around the codility exercise | |
c= console.log | |
# functions: | |
# 0- check if order is non decreasing | |
# 1- check if array can be made non-decreasing with just one swap. (or less) | |
# 2- getAll repeated element substrings (one black sheep allowed). this may not be helpful for finding (1), but it's a good exercise in itself | |
# possible algos approaches for finding (1) | |
# - if array small then could just go through all combos blindly and check if order is good. slightly better to only go through those swaps which transfer large to back of array and small to front. |
# jan2 request bluebird stuff | |
c= console.log | |
_= require 'lodash' | |
Promise= require 'bluebird' | |
rp= require 'request-promise' | |
qStr= require 'querystring' | |
parse_quals= (quals)-> | |
return _.reduce quals, | |
(acc0, value, key)-> |
/** | |
* This | |
*/ | |
import java.util.*; | |
public class StringHandler2{ | |
//public ArrayList<String> arrayPurms = new ArrayList<String>(); | |
public static ArrayList<String> SetPermute(HashSet <String> resultSet){ | |
System.out.println("We're in SetPermute. With argument " + resultSet.toString()); | |
ArrayList <String> arrayPurms = new ArrayList <String> (); | |
if (resultSet.size() == 1) { |
#---------------------------------------------- | |
# monkey patch, original from | |
# https://gist.github.com/akre54/80eaa63762ea499029f0 | |
# this one edited | |
# this one works with React version 0.14.0-beta1 but NOT work with 0.14.3. | |
# no other versions tested | |
c = -> console.log.apply console, arguments | |
ReactDOM = require 'react/lib/ReactDOM' |