If you mix JS event listeners and React event listeners, you need
event.nativeEvent.stopImmediatePropagation()
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Recommended snack and song:
220ml of dark roasted full bodied coffee brewed in french press accompanied by a banana while listening to [Liquid Tension Experiment]
tl;dr: You can go ahead and clone [this repo], it's got the end result of this in-depth tutorial bellow.
Here's what we will be doing for becoming smart-contract heroes! - Install the dev environment plus MetaMask. - Develop a very simple voting smart contract.
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.demo.daemon.plist</string> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Weekday</key> |
import React, { useReducer, useCallback, useContext } from 'react'; | |
const initialState = { | |
data: '', | |
isPending: false, | |
}; | |
export const constant = { | |
FETCH_DATA: 'FETCH_DATA', | |
FETCH_DATA__PENDING: 'FETCH_DATA__PENDING', |
-- create user (e.g. metabase) | |
create user metabase with encrypted password 'password'; | |
-- allow user connect to db | |
grant connect on database site to metabase; | |
-- allow user access to schema | |
grant usage on schema public to metabase; | |
-- grant select on existing tables |