I hereby claim:
- I am jonelf on github.
- I am jonelf (https://keybase.io/jonelf) on keybase.
- I have a public key whose fingerprint is 6757 22B3 8909 BCA0 8CF3 2EEB D21C 666E 09FD 0C8B
To claim this, I am signing this object:
| sort_order = {"C" => 1, "Y" => 2, "M" => 3} | |
| test_arr = ["M", "C", "Y"] | |
| sorted = test_arr.sort_by {|c| sort_order[c]} | |
| # => ["C", "Y", "M"] |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Xml; |
| ++++++++++[>+++++++>++++++++++>++++>+<<<<-]>++.>+.+++++.>--------.<-----.>+++++++++++++.<++++++++.------------.+++++++++++++.>------------.>. |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace ConsoleApplication2 | |
| { | |
| class Program | |
| { | |
| public static void Main(string[] args) |
| def histogram(message) | |
| message.each_char.reduce(Hash.new(0)) { |h, k| h[k] += 1; h} | |
| end | |
| def graph_histogram(h) | |
| h.to_a. | |
| sort_by{|kv| kv[1]*-1}. | |
| map{|a| "#{a[0]} |#{('+'*a[1])[0..120]}#{a[1].to_s}\n"}. | |
| join | |
| end |
| (validate-dateTime("yyyyMMdd", left($pnum, 8 ))) | |
| and | |
| (((number(substring($pnum,3,1))*2) mod 9 + (floor(number(substring($pnum,3,1)) div 9)*9) + (number(substring($pnum,4,1))) + | |
| (number(substring($pnum,5,1))*2) mod 9 + (floor(number(substring($pnum,5,1)) div 9)*9) + (number(substring($pnum,6,1))) + | |
| (number(substring($pnum,7,1))*2) mod 9 + (floor(number(substring($pnum,7,1)) div 9)*9) + (number(substring($pnum,8,1))) + | |
| (number(substring($pnum,9,1))*2) mod 9 + (floor(number(substring($pnum,9,1)) div 9)*9) + (number(substring($pnum,10,1))) + | |
| (number(substring($pnum,11,1))*2) mod 9 + (floor(number(substring($pnum,11,1)) div 9)*9) + (number(substring($pnum,12,1))) | |
| ) mod 10 = 0) |
| require 'nokogiri' | |
| xml = %{ | |
| <Employments> | |
| <Employment> | |
| <From>2013-01-01</From> | |
| <To>1900-01-01</To> | |
| <MainEmployment>0</MainEmployment> | |
| </Employment> | |
| <Employment> | |
| <From>2014-11-01</From> |
| first, last = "A".ord, "D".ord; | |
| rows = (first...last).to_a + last.downto(first).to_a | |
| cols = last.downto(first).to_a + (first + 1..last).to_a | |
| rows.each do |row| | |
| line = cols.map do |col| | |
| col == row ? col.chr : "-" | |
| end | |
| puts line.join |
| // Swift Playground example of the Lorenz Attractor | |
| // Change platform to OS X when opening Playground. | |
| // alt + cmd + enter to show Assistant editor and see resulting image. | |
| import Cocoa | |
| import XCPlayground | |
| let width = 600.0, height = 500.0 | |
| class CustomView: NSView { |
I hereby claim:
To claim this, I am signing this object: