Общяя информация:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| import logging | |
| class S(BaseHTTPRequestHandler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Alt + Home = Navigation Bar | |
| Alt + Ctrl + Shift + N = Search by symbols | |
| Shift x2 = Last open files | |
| F11 = Add anonymous bookmark | |
| Ctrl + F11 = Add named bookmark | |
| Shift + F11 = View all bookmark | |
| Alt + Shift + F9 = Run debug | |
| Alt + F = Distraction Free Mode (Custom shortcut) | |
| Alt + Insert = Create New (class, module, file, etc) | |
| Ctrl + Shift + Space = Smart autocomplete |
Let’s see how to use PostgreSQL to import and export CSV files painlessly with the COPY command.
Import CSV into table t_words:
COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;You can tell quote char with QUOTE and change delimiter with DELIMITER.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Note: This document is specific to the FocusVision development environment, however it's mostly applicable elsewhere.
Mercurial branches are not "cheap". Unlike Git, to create or destroy a branch, you actually have to commit a changeset to the repository. Branches are great for…something…but whatever that is, we're not doing it.
Enter Bookmarks.