First of all, edit your_app_settings/settings.py
and add:
INSTALLED_APPS = [
'django.forms', # to let django discover the built-in widgets
...
]
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
// The default "no notifications" icon of Slack on web | |
const simpleFavicon = | |
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFyklEQVR4nO2bPXMTVxiFz3tlyySFspqBTCiAVefGQi7CDAFnrBYmweoIjfUPLHcUEEuBIl3kX4BVBNNJDhmczkqRDzCFMBR0XgwzyWTMeCEzmcH27kkhY4y1kvZaV/5I/My4uffq7LtntOu7Z18JDJOaW7H7+tQYyWEAFgUOfc6sr6FSS8edMBr9s1ftKKKj8P0RiFgEHAFmVt+sVZ5mvg2lERYxKXbml1cTAPNNph0RTt7/LF5spZH86esx+Gy2xgVQWLhwo6WGDsYMaHPy71Aq++BsrBQ0lZy9NgFKew1g3JQJRgxIza3Y0agshlzurq4yUUvH3a2D/bNX7Sh7Q2uoN38napmi23ZlG1SnAgDQF1UTGsutvl5ktw/2oldLw4/Gchrrm2LEAJIprfWC4e1j4ouWBpTeMZvKmBCBIKWznCIfNWponhBxWmt9E8wYADiGdHYdIwYIUDOhsxcYMcDzOWlCZy8wYsDDoXiVB9QEU/cAzA/FcwfRBGMGABsmgIMgSyBqqN8cG/6kvqXdF/SYFpw/F68BjRud/YrRb8BB5NCAvS5gr3nvHpCaW7GjR9QoyBSot71tgkuBC7K0topq2EDEBHY5Z8WOxMZIpoS0KeIGhSqbj8Of/vpqTNg0iDCBA4/jDz6PV4Imk/euU1dv4cKNRKBWPVTJA7ACpl1sCVUUUA8zunzyAGAjIuUzv70e7eZBkrPXJjYSJavJEgvAd8l713MAoFJzK3aoJMcUvl9Mza1Y3ZDun71qh0yUAGAiVc5ZSjPMMEFgIGKCnYQqygdHulFMK4ICERPsJFRR0vxa6RqBgYi+itswJLT0JHBacf/syx2dxYS4nR6QgKMUdz/MUD5nAsr5WUdDyE |
:begin | |
CREATE INDEX ON :Fixture(kickoff); | |
CREATE CONSTRAINT ON (node:Country) ASSERT (node.id) IS UNIQUE; | |
CREATE CONSTRAINT ON (node:Fixture) ASSERT (node.id) IS UNIQUE; | |
CREATE CONSTRAINT ON (node:Group) ASSERT (node.id) IS UNIQUE; | |
CREATE CONSTRAINT ON (node:Player) ASSERT (node.id) IS UNIQUE; | |
CREATE CONSTRAINT ON (node:Stadium) ASSERT (node.name) IS UNIQUE; | |
CREATE CONSTRAINT ON (node:`UNIQUE IMPORT LABEL`) ASSERT (node.`UNIQUE IMPORT ID`) IS UNIQUE; | |
:commit | |
CALL db.awaitIndexes(300); |
function addStyleString(str) { | |
var node = document.createElement("style"); | |
node.innerHTML = str; | |
document.body.appendChild(node); | |
} | |
const viewportWidth = window.innerWidth; | |
const viewportHeight = window.innerHeight; | |
const new_vh = 0.01 * viewportHeight; | |
const new_vw = 0.01 * viewportWidth; |
First of all, edit your_app_settings/settings.py
and add:
INSTALLED_APPS = [
'django.forms', # to let django discover the built-in widgets
...
]
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
# How to make lodash available via "_" on console | |
var el = document.createElement('script'); | |
el.src = 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.js'; | |
document.getElementsByTagName('head')[0].appendChild(el); | |
# Use _.VERSION or any other function to verify that it worked | |
# lodash 4.x version quick link: | |
https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
package main | |
import ( | |
"fmt" | |
"io" | |
"encoding/base64" | |
"crypto/rand" | |
"crypto/cipher" | |
"crypto/aes" | |
"crypto/md5" |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real