I hereby claim:
- I am joegiralt on github.
- I am proletariat (https://keybase.io/proletariat) on keybase.
- I have a public key whose fingerprint is 2CC1 4759 33E4 3F97 506E 4362 166B 9E35 49A5 A093
To claim this, I am signing this object:
https://repl.it/repls/MoralThankfulIntercept |
// I like parentheticals (a lot). | |
// "Sometimes (when I nest them (my parentheticals) too much (like this (and this))) they get confusing." | |
// Write a function that, given a sentence like the one above, along with the position of an opening parenthesis, finds the corresponding closing parenthesis. | |
// Example: if the example string above is input with the number 10 (position of the first parenthesis), the output should be 79 (position of the last parenthesis). | |
const findParenPosition = (string, pos) => { |
{ | |
"instrument_data": { | |
"VolcaDrm": { | |
"midi_port": 1, | |
"midi_chan": 1, | |
"multi": true, | |
"no_xpose": true, | |
"no_fts": true, | |
"no_thru": true, | |
"track_values": { |
class NataliasPhoneNumberSolver | |
attr_reader :init_number | |
attr_accessor :unique_dials, :current_unique_dial | |
# 1,2,3 | |
# 4,5,6 | |
# 7,8,9 | |
# 0 |
# Kabo (Son of Tell) | |
## High Elf Wizard (Blade Singer) | |
Background: Criminal | |
Alignment: True Neutral | |
Age: 100 | |
Height: 5'6 | |
Weight: 135lbs | |
Size: Medium | |
Speed: 30ft (40ft) in bladesong |
require 'set' | |
class Board | |
attr_accessor :rows, :columns, :grids, :puzzle, :completed_set | |
COL_LOOKUP = {a: 0, b: 1, c: 2, d:3, e: 4, f:5, g:6, h:7, i:8 } | |
GRID_LOOKUP = { | |
[:a,1] => 1, | |
[:a,2] => 1, | |
[:a,3] => 1, |
I hereby claim:
To claim this, I am signing this object:
class Board | |
attr_accessor :pos_1, :pos_2, :pos_3, :pos_4, :pos_5, :pos_6, :pos_7, :pos_8, :pos_9 | |
def initialize(pos_1, pos_2, pos_3, pos_4, pos_5, pos_6, pos_7, pos_8, pos_9) | |
@pos_1 = pos_1 | |
@pos_2 = pos_2 | |
@pos_3 = pos_3 | |
@pos_4 = pos_4 | |
@pos_5 = pos_5 | |
@pos_6 = pos_6 |
grid = [[1, 2, 3, 4, 5, 6, 7, 8], | |
[9, 10, 11, 12, 13, 14, 15, 16], | |
[17, 18, 19, 20, 21, 22, 23, 24], | |
[25, 26, 27, 28, 29, 30, 31, 32], | |
[33, 34, 35, 36, 37, 38, 39, 40], | |
[41, 42, 43, 44, 45, 46, 47, 48], | |
[49, 50, 51, 52, 53, 54, 55, 56], | |
[57, 58, 59, 60, 61, 62, 63, 64]] | |
grid.each do |elem_arr| | |
puts "#{elem_arr[0]}, #{elem_arr[1]}" |
def summation_of_primes(up_to_num) | |
puts (1..up_to_num).map{|num| num if Prime.prime?(num)}.compact!.inject(:+) | |
end |