netsh interface portproxy add v4tov6 listenport=80 listenaddress=127.0.0.1 connectport=3000 connectaddress=[::1]
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 kotlin.math.* | |
fun main() { | |
val a = arrayListOf(2, 3, 9, 2, 5, 1, 3, 7, 10) | |
val b = intArrayOf(2, 1, 3, 4, 3, 10, 6, 6, 1, 7, 10, 10, 10) | |
val c = ArrayList<Int>(a) | |
for(i in b){ | |
if(isPrimeNumber(countNumber(i, b))) | |
//if we didn't care about original contents of A, at this point we could remove the values from A and we would get the expected C. | |
c.remove(i) |
I hereby claim:
- I am paweljw on github.
- I am paweljw (https://keybase.io/paweljw) on keybase.
- I have a public key ASDW4Yoqu0WTv4CdBF6zdi1G8XSX3quwW2DlzPO_u3hrmAo
To claim this, I am signing this object:
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
worker: QUEUE=* bundle exec rake environment resque:work | |
scheduler: bundle exec rake environment resque:scheduler |
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
defmodule Roulette do | |
@min_bet 0.1 | |
def minimum_bet, do: @min_bet | |
def print_score(game) do | |
IO.puts("R: #{game.rounds}\tL: #{game.last_number}\t$#{game.cash}\tB$#{game.bet}\tH: #{game.hits}\tM: #{game.misses}\tH/M: #{h_to_m(game)}") | |
end | |
def h_to_m(%{hits: hits, misses: misses} = game) do |
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
class Color { | |
constructor (r, g, b) { | |
this.r = r | |
this.g = g | |
this.b = b | |
} | |
mix (otherColor) { | |
let red = Math.floor((this.r + otherColor.r) / 2) | |
let green = Math.floor((this.g + otherColor.g) / 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
// ==UserScript== | |
// @name Illyriad Calculations | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Adds useful calculations to Illyriad. | |
// @author You | |
// @match http://*.illyriad.co.uk/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |