| language | en-us |
|---|---|
| title | How two's complement works |
| date | 2018-01-10 |
Two's complement is widely used to represent integer numbers in computers. We'll explain how it works with examples and justify why it works by mapping it onto modular arithmetic.
| [ | |
| { | |
| "key": "cmd+w", | |
| "command": "-workbench.action.closeGroup", | |
| "when": "activeEditorGroupEmpty && multipleEditorGroups" | |
| }, | |
| { | |
| "key": "cmd+w", | |
| "command": "-workbench.action.closeWindow", | |
| "when": "!editorIsOpen && !multipleEditorGroups" |
| function us_cpi() { | |
| try { | |
| const url = "https://api.bls.gov/publicAPI/v1/timeseries/data/CUUR0000SA0" | |
| const response = UrlFetchApp.fetch(url) | |
| const data = JSON.parse(response.getContentText()) | |
| if (data && data.Results && data.Results.series && data.Results.series.length > 0) { | |
| const currentData = data.Results.series[0].data[0] | |
| const previousYearData = data.Results.series[0].data[13] |
| [ | |
| { | |
| "key": "ctrl+; f", | |
| "command": "workbench.action.terminal.sendSequence", | |
| "args": { | |
| "text": "bin/rails test ${relativeFile}\u000D" | |
| } | |
| }, | |
| { | |
| "key": "ctrl+; c", |
| language | en-us |
|---|---|
| title | How two's complement works |
| date | 2018-01-10 |
Two's complement is widely used to represent integer numbers in computers. We'll explain how it works with examples and justify why it works by mapping it onto modular arithmetic.
| language | pt-br |
|---|---|
| title | Indução matemática com fórmula de juros composto |
| date | 2017-12-02 |
Como um exercício de hipótese de indução, geralmente tenta-se encontrar a "fórmula fechada" correspondente a uma dada fórmula recursiva. Aqui vamos fazê-lo usando como exemplo o cálculo de juros composto.
What do you think science is? There's nothing magical about science. It is simply a systematic way for carefully and thoroughly observing nature and using consistent logic to evaluate results. Which part of that exactly do you disagree with? Do you disagree with being thorough? Using careful observation? Being systematic? Or using consistent logic?
-- Steven Novella
| require 'base64' | |
| class UUID | |
| def self.encode64(uuid) | |
| bytes_str = [uuid.delete('-')].pack('H*') | |
| Base64.urlsafe_encode64(bytes_str, padding: false) | |
| end | |
| def self.decode64(base64) |
| describe "setting an attribute with value from a parameter" do | |
| context "when parameter key is not present" do | |
| it "does not assume any value for the attribute" | |
| it "does not set the attribute" | |
| end | |
| context "when parameter key is present" do | |
| context "when parameter value is not blank" do | |
| it "sets value to the attribute" | |
| end |
| #!/usr/bin/env ruby | |
| # Informe aqui as receitas brutas mensais (faturamentos) | |
| receitas_brutas_mensais = [ | |
| 9_999.99, | |
| ] | |
| cliente_reside_no_exterior = true | |
| prolabore_atual = nil |
| package main | |
| import "log" | |
| func main() { | |
| tests := []struct { | |
| desc string | |
| given uint64 | |
| expected string | |
| }{ |