Thanks for dropping by. After reading this readme, I hope you can learn how I think and how I work.
The best way I know to achieve excellence is for us to work as a team.
Thanks for dropping by. After reading this readme, I hope you can learn how I think and how I work.
The best way I know to achieve excellence is for us to work as a team.
Create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
named Scancode Map
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
or use PowerShell (run as Admin)
import { isPlainObject } from 'lodash'; | |
import { batchActions as batchActionsDefault } from 'redux-batched-actions'; | |
const handleInnerAction = (action, getState) => { | |
if (typeof action === 'function') { | |
return new Promise(resolve => { | |
const innerDispatch = innerAction => resolve(handleInnerAction(innerAction, getState)); | |
action(innerDispatch, getState); | |
}); | |
} else if (isPlainObject(action)) { |
// utils/partial.js | |
export const partial = (func, ...args) => func.bind(null, ...args); | |
// actions/maths.js | |
export const addNumberOneAndNumberTwo = (first, second) => { | |
return { | |
type: 'SOMETHING THE REDUCER CAN CATCH', | |
first, | |
second, | |
}; |
{"lastUpload":"2020-07-13T04:56:31.742Z","extensionVersion":"v3.4.3"} |
module ChangeMachine | |
class IdiotEncountered < StandardError; end | |
AVAILABLE_UNITS = [10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5] | |
def self.show_me_the_money(dollar_in_cents) | |
raise IdiotEncountered, "You are an idiot, no such amount in AUS..." unless dollar_in_cents % 5 == 0 | |
dispense(dollar_in_cents) |
def percentagerize(collection, result=[], remainder=1) | |
collection = Array(collection) | |
return result if collection.count == 0 | |
denominator = collection.inject(:+) | |
percent = 0.0 | |
unless denominator == 0 | |
percent = (remainder * (collection[0] / denominator.to_f)).round(4) |
I'll illustrate the problem with an example. | |
I query the database for some aggregated results. Say there are 4 | |
aggregated counters I'm interested in and wanting to display them | |
in a 100% width div. Each of the counters should contribute to a | |
percentage of the full width. | |
For instance, my db query returns me somthing like this | |
| counter_1 | counter_2 | counter_3 | counter 4| |
require 'spec_helper' | |
describe "RequestsDashboard", js: true do | |
let!(:req_processing_one) { create(:request, state: "processing", url: "processing-job-url-1") } | |
context "Processing requests" do | |
it "displays request details modal" do | |
find(:xpath, "//a[@href='#{job_request_admin_request_path(req_processing_one)}']").click | |
# this is passing on |
require 'yaml' | |
yaml = <<yaml | |
defaults: &defaults | |
cool: | |
bang: wow | |
fruit: apple | |
development: | |
<<: *defaults |