g++ main.cpp chmod +x a.out ./a.out
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
"So you better pray to god, and I mean this literally, or whoever the fuck it is you pray to, that Donald J Trump, the President of the United State, and AG Barr clean this up lawfully. Because if for any reason the president of the United State is feeling that it’s not getting done as it should, decides to put out the tweet that says my fellow Americans my fellow 2A loving Americans it's time to take up arms against these assholes you are all fucked in under an hour under 1 hour you're done every one of you we're all just at home hanging out or we're on vacation like me right now watching you idiots behave the way you do waiting for that one tweet that one emergency text message from the fucked president of the United States that gives us the green light to finish this entire thing in under an hour it will not be law enforcement it will not be one of these slow bureaucratic justice system wheels of Justice turning it'll be a group of people you didn't even know fucked existed because we were at our house, we |
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
# settings to get working in zsh | |
autoload bashcompinit | |
bashcompinit | |
setopt localoptions rmstarsilent | |
setopt +o nomatch | |
source ~/todo.sh |
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
object BinarySearch { | |
/** | |
* @Param begin inclusive | |
* @Param end inclusive | |
*/ | |
fun search(needle: Int, haystack: Array<Int>): Int { | |
if (haystack.isEmpty()) { | |
return -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
package com.kennycason.hadoop.io; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.hbase.io.ImmutableBytesWritable; | |
import org.apache.hadoop.io.NullWritable; | |
import org.apache.hadoop.mapreduce.*; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; | |
/** An {@link InputFormat} for reading binary data (byte[]) */ | |
public class BinaryFileInputFormat extends FileInputFormat<NullWritable, ImmutableBytesWritable> { |
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
function monthName() { | |
switch (new Date().getMonth()) { | |
case 0: | |
return "January"; | |
case 1: | |
return "February"; | |
case 2: | |
return "March"; | |
case 3: | |
return "April"; |
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
print("hello, world") | |
# list | |
friends = ['john', 'pat', 'gary', 'michael'] | |
print(len(friends)) | |
for f in friends: | |
print("hello " + f) | |
# map / dictionary | |
friends2 = { |
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 lrss(s): | |
slen = len(s) | |
for l in range(slen - 1, 1, -1): # the length of the string, go from max to min, decrementing range | |
print "l=" + str(l) | |
# there is a bit of redundancy in the i/j iterations as they double check each other | |
# e.g. when i < j and j > i | |
for i in range(0, slen - l + 1): # tracks position of the iterations | |
print " i=" + str(i) | |
for j in range(0, slen - l + 1): # tracks position of the iterations | |
if i == j: continue # if i == j , then it's the same index in the string |
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
public class Banana { | |
public static void main(final String[] args) { | |
assert contains("banana", "b"); | |
assert contains("banana", "ana"); | |
assert contains("banana", "na"); | |
assert contains("banana", "banana"); | |
assert !contains("banana", "gx"); | |
assert !contains("banana", ""); | |
assert !contains("", "ana"); |
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
package com.simplymeasured.cls.bll; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |
import com.github.jasminb.jsonapi.JSONAPIDocument; | |
import com.github.jasminb.jsonapi.ResourceConverter; | |
import com.github.jasminb.jsonapi.SerializationFeature; | |
import com.github.jasminb.jsonapi.annotations.Id; | |
import com.github.jasminb.jsonapi.annotations.Relationship; | |
import com.github.jasminb.jsonapi.annotations.Type; |
NewerOlder