Last updated: 2021-02-10
- The bottom right corner of apps are no longer accessible because a new Notes feature uses it.
from enum import Enum | |
from typing import NoReturn | |
class Color(Enum): | |
RED = "RED" | |
GREEN = "GREEN" | |
BLUE = "BLUE" # I just added this | |
class Jurisdiction < ApplicationRecord | |
# ... | |
class << self | |
memoize def find_via(slug:) | |
Jurisdiction.find_by(slug: slug) | |
end | |
end | |
end |
#lang racket | |
(define (clean-up s) | |
(first (split-into-sentences (fix-hyphenation (fix-whitespace s))))) | |
(define (fix-whitespace s) | |
(string-replace s "\n" " ")) | |
(define (fix-hyphenation s) | |
(string-replace s "- " "")) |
return (1..5) | |
.map{|n| "car-#{n}"} | |
.select{|m| car_is_empty(m)} |
let car_ids = []; | |
for (let i = 1; i <= 5; i++) { | |
const car_id = `car-${i}`; | |
if (car_is_empty(car_id)) { | |
car_ids.push(car_id); | |
} | |
} | |
return car_ids; |
class AttributeWriter { | |
constructor(cf_object) { | |
this.cf_object = cf_object; | |
} | |
async element(element) { | |
const data = this.cf_object; | |
// Is the visitor in the VIP list? | |
const visitor_asn = data.asn |
################################################ | |
# Each Article has a title and a number. | |
# But three of them are very difficult to parse. | |
################################################ | |
# Map Article titles to corrected numbers. | |
EXCEPTIONS = { | |
"Elements of Crimes": "9", | |
"Ne bis in idem": "20", | |
"Individual criminal responsibility": "25" |
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors) | |
/out |