Open terminal.
Connect to psql:
psql -p 5433
I find it easier to delete and recreate the DB to which you want to import. So ensure the databse you want to delete is listed:
\l
ISO 3166 Country Code | ISO639-2 Country Code | Country | ISO 3166 Country Code | ISO639-2 Lang | Language | Date Format | |
---|---|---|---|---|---|---|---|
ALB | AL | Albania | sqi | sq | Albanian | yyyy-MM-dd | |
ARE | AE | United Arab Emirates | ara | ar | Arabic | dd/MM/yyyy | |
ARG | AR | Argentina | spa | es | Spanish | dd/MM/yyyy | |
AUS | AU | Australia | eng | en | English | d/MM/yyyy | |
AUT | AT | Austria | deu | de | German | dd.MM.yyyy | |
BEL | BE | Belgium | fra | fr | French | d/MM/yyyy | |
BEL | BE | Belgium | nld | nl | Dutch | d/MM/yyyy | |
BGR | BG | Bulgaria | bul | bg | Bulgarian | yyyy-M-d | |
BHR | BH | Bahrain | ara | ar | Arabic | dd/MM/yyyy |
/** | |
* Pseudo-elements for select | |
*/ | |
select { | |
-webkit-appearance: none; | |
} | |
select:after { | |
content: 'abc'; |
-- 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%' |
Open terminal.
Connect to psql:
psql -p 5433
I find it easier to delete and recreate the DB to which you want to import. So ensure the databse you want to delete is listed:
\l
/** | |
* Sorting an array order by frequency of occurence in javascript | |
* @param {array} array An array to sort | |
* @returns {array} array of item order by frequency | |
**/ | |
function sortByFrequency(array) { | |
var frequency = {}; | |
var sortAble = []; | |
var newArr = []; |
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
# Author: Zameer Ansari | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
let remain = 60; | |
const ct = Promise.resolve(); | |
const countdown = (ct) => (Promise.all([new Promise(resolve => { | |
setTimeout(() => { | |
remain--; | |
this.setState({ | |
getCapchacodeRemainTime: remain | |
}); | |
resolve(remain); |