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
templates = Templates.all | |
mapped_things = pairs.map do |pair| | |
object = templates.find{|t| t.id == pair.second } | |
object = object.dup | |
object.thing_id = pair.first | |
object | |
end.compact |
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 DateVerifier extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
dob: null | |
} | |
} | |
render() { | |
return ( |
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.awt.Color; | |
import java.util.*; | |
public class ColorListSorter { | |
public static void quickSort(List<Color> list, int pivot, int end) { | |
if (pivot < end) { | |
int q = partition(list, pivot, end); | |
quickSort(list, pivot, q); | |
quickSort(list, q+1, end); | |
} |
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.awt.Color; | |
import java.util.*; | |
public class ColorListSorter { | |
public static void quickSort(List<Color> list, int pivot, int end) { | |
if (pivot < end) { | |
int q = partition(list, pivot, end); | |
quickSort(list, pivot, q); | |
quickSort(list, q+1, end); | |
} |
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
def englishChi2(bytes: Array[Byte]): Double = { | |
val englishLetterFrequency = Map( | |
'A' -> 0.08167, 'B' -> 0.01492, 'C' -> 0.02782, 'D' -> 0.04253, | |
'E' -> 0.12702, 'F' -> 0.02228, 'G' -> 0.02015, 'H' -> 0.06094, | |
'I' -> 0.06966, 'J' -> 0.00153, 'K' -> 0.00772, 'L' -> 0.04025, | |
'M' -> 0.02406, 'N' -> 0.06749, 'O' -> 0.07507, 'P' -> 0.01929, | |
'Q' -> 0.00095, 'R' -> 0.05987, 'S' -> 0.06327, 'T' -> 0.09056, | |
'U' -> 0.02758, 'V' -> 0.00978, 'W' -> 0.02360, 'X' -> 0.00150, | |
'Y' -> 0.01974, 'Z' -> 0.00074, ' ' -> 0.19181 | |
) |
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 turtle | |
def drawLine(x1, y1, x2, y2): | |
turtle.penup() | |
turtle.goto(x1, y1) | |
turtle.pendown() | |
turtle.goto(x2, y2) |
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
~ pbpaste | ruby -ne 'require "base64";enc=Base64.decode64($_.chars.each_slice(8).map(&:join).map{|byte|byte.to_i(2)}.map(&:chr).join);ascii=enc.split("").map{|chr|chr.ord};1.upto(26){|i| p ascii.map{|chr| (chr+i).chr}.join}' | |
"NEBJLLLNRBNLMFLEOBNESBEUMFRROLFBOOSBFLTFFFWIOMRLSNRRMFOEMERWRFTMMLBOJRMWFLELBMTOBFHFWBBMOSSJRMM" | |
"OFCKMMMOSCOMNGMFPCOFTCFVNGSSPMGCPPTCGMUGGGXJPNSMTOSSNGPFNFSXSGUNNMCPKSNXGMFMCNUPCGIGXCCNPTTKSNN" | |
"PGDLNNNPTDPNOHNGQDPGUDGWOHTTQNHDQQUDHNVHHHYKQOTNUPTTOHQGOGTYTHVOONDQLTOYHNGNDOVQDHJHYDDOQUULTOO" | |
"QHEMOOOQUEQOPIOHREQHVEHXPIUUROIERRVEIOWIIIZLRPUOVQUUPIRHPHUZUIWPPOERMUPZIOHOEPWREIKIZEEPRVVMUPP" | |
"RIFNPPPRVFRPQJPISFRIWFIYQJVVSPJFSSWFJPXJJJ[MSQVPWRVVQJSIQIV[VJXQQPFSNVQ[JPIPFQXSFJLJ[FFQSWWNVQQ" | |
"SJGOQQQSWGSQRKQJTGSJXGJZRKWWTQKGTTXGKQYKKK\\NTRWQXSWWRKTJRJW\\WKYRRQGTOWR\\KQJQGRYTGKMK\\GGRTXXOWRR" | |
"TKHPRRRTXHTRSLRKUHTKYHK[SLXXURLHUUYHLRZLLL]OUSXRYTXXSLUKSKX]XLZSSRHUPXS]LRKRHSZUHLNL]HHSUYYPXSS" | |
"ULIQSSSUYIUSTMSLVIULZIL\\TMYYVSMIVVZIMS[MMM^PVTYSZUYYTMVLTLY^YM[TTSIVQYT^MSLSIT[VIMOM^IITVZZQYTT" | |
"VMJRTTT |
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
(['chain', 'rang', 'watch'].map{|i| "Gold all in my #{i}"}<<"Don't believe me just watch "+"nigga "*3).join(', ') | |
=> "Gold all in my chain, Gold all in my rang, Gold all in my watch, Don't believe me just watch nigga nigga nigga " |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta content="text/html;charset=UTF-8" http-equiv="content-type" /> | |
<title>novemberissue</title> | |
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> | |
</head> | |
<body alink="" bgcolor="#ffffff" leftmargin="0" link="" marginheight="0" marginwidth="0" style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);" text="#000000" topmargin="0" vlink=""> | |
<h3 style="text-align: center;"><span style="color:#A52A2A;">Join the thousands around the world who read Regional Musician!<br /> | |
Click below to start reading today!</span><span style="color:#ff8c00;"><span id="cke_bm_651E" style="display: none;"> </span><span id="cke_bm_650E" style="display: none;"> </span><span id="cke_bm_640E" style="display: none;"> </span><span id="cke_bm_628E" style="display: none;"> </span><span id="cke_bm_312E" style="display: none;"> </span><span id="ck |
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
.file "test.c" | |
.section .rodata.str1.1,"aMS",@progbits,1 | |
.LC0: | |
.string "Hello world" | |
.section .text.startup,"ax",@progbits | |
.p2align 4,,15 | |
.globl main | |
.type main, @function | |
main: | |
.LFB31: |