Consistency in naming makes reading and memory retrieval much, much easier. Conversely, changing rules and mixing conventions are very confusing and significantly increase cognitive load. Follow language, company, and project conventions for names, even if you don't like them.
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
defmodule Types do | |
@doc """ | |
## Examples: | |
iex>Types.typeof("Hello World") | |
"binary" | |
iex>Types.typeof(1) |
In computer science, the event loop, message dispatcher, message loop, message pump, or run loop is a programming construct that waits for and dispatches events or messages in a program.
It works by making a request to some internal or external "event provider" (that generally blocks the request until an event has arrived), and then it calls the relevant event handler ("dispatches the event").
The event-loop may be used in conjunction with a reactor, if the event provider follows the file interface, which can be selected or 'polled' (the Unix system call, not actual polling).
The event loop almost always operates asynchronously with the message originator.
defmodule Solution do | |
#Enter your code here. Read input from STDIN. Print output to STDOUT | |
end | |
array_length = IO.read(:stdio, :line) | |
array = IO.read(:stdio, :line) | |
array_length | |
|> String.trim | |
|> String.to_integer |
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
Operating System: macOS" | |
CPU Information: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz | |
Number of Available Cores: 8 | |
Available memory: 16 GB | |
Elixir 1.7.0-dev | |
Erlang 21.0 | |
Benchmark suite executing with the following configuration: | |
warmup: 5 s | |
time: 30 s |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages