I hereby claim:
- I am ArtOfCode- on github.
- I am artofcode (https://keybase.io/artofcode) on keybase.
- I have a public key whose fingerprint is 605A 49AF E0F8 F25B 64A1 419C 6233 7BF2 22ED 4669
To claim this, I am signing this object:
import sys | |
def get_list_index(list_obj, item, alternative=None): | |
try: | |
return list_obj.index(item) | |
except: | |
if alternative is not None: | |
try: | |
return list_obj.index(alternative) | |
except: |
window.csslib = { | |
createStyleSheet: function() { | |
var el = document.createElement("style"); | |
el.appendChild(document.createTextNode("")); | |
document.head.appendChild(el); | |
return el.sheet; | |
}, | |
addRule: function(sheet, selector, rules) { | |
var ruleString = ""; |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Election | Results | |
---------+-------------------------------------------------------------------------------------------------------------------------------------------- | |
2011 | SLaks, Robert Harvey, Tim Post / Kev, jjnguy, Dave DeLong, Paul Dixon, Michael Mrozek, George Stocker | |
Nov 2011 | Adam Lear, casperOne, BoltClock, NullUserException / jjnguy, Brad Larson, Flexo, George Stocker, Stu Thompson, Jeremy Banks, ircmaxell | |
2012 | Brad Larson, ThiefMaster, George Stocker / Flexo, Sathya, Dennis, Andrew Barber, slugster, Moshe | |
2013 | Andrew Barber, Gordon, Flexo, ChrisF / Raghav Sood, animuson, Taryn, Pops, JNK | |
2014 | Bohemian, Taryn, Siddharth Rout, Mick MacCallum / Jon Clements, Matt, Undo, Raghav Sood, Doorknob | |
2015 | Martijn Pieters, Jeremy Banks, meagar / Raghav Sood, Ed Cottrell, Jon Clements, deceze, Paresh Mayani, Madara Uchiha | |
Nov 2015 | Ed Cottrell, josliber, Madara Uchiha / Undo, Thomas Owens, Mureinik, deceze, slugster, rekire | |
2016 | Aaron Hall, deceze, Bhargav Rao / Andy, Cerb |
/** | |
* Get the contrast ratio between two colors specified in RGB, as defined by WCAG 2.0. | |
* Ex: | |
* | |
* getContrastRatio([0, 0, 0], [255, 255, 255]); // => 21 (white vs black, i.e. full contrast) | |
* getContrastRatio([0, 0, 0], [255, 0, 0]); // => 5.252 (red vs black) | |
* | |
* References/resources: | |
* https://www.w3.org/TR/WCAG20/#contrast-ratiodef | |
* https://www.w3.org/TR/WCAG20/#relativeluminancedef |
class ActiveRecord::Relation | |
# Preload one level a chained association whose name is specified in attribute. | |
def preload_chain(attribute, collection: nil) | |
preloader = ActiveRecord::Associations::Preloader.new | |
preloader.preload(collection || records, attribute.to_sym) | |
self | |
end | |
# Preload all levels of a chained association specified in attribute. Will cause infinite loops if there are cycles. | |
def deep_preload_chain(attribute, collection: nil) |
CREATE TABLE `ar_internal_metadata` ( | |
`key` varchar(255) NOT NULL, | |
`value` varchar(255) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`key`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
CREATE TABLE `comments` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, |
Why is this necessary?
This project was started by a group of Stack Exchange users who were (and are) dissatisfied with the way Stack
Exchange is running things, on a number of counts. Essentially, we believe that the goals of a community-oriented
product and a for-profit company are fundamentally at odds. The aim of Codidact is to be that truly
community-oriented product.
How can I get involved?
See above for links to various communication channels we use. We suggest joining both our forum (for structured