|
|
(4 intermediate revisions by the same user not shown) |
Line 647: |
Line 647: |
| CC=gcc-4.9 | | CC=gcc-4.9 |
| |} | | |} |
| | |} |
| | <!-- |
| | |
| | |
| | =========================================================================================================================================================================================================================================================================================== |
| | |
| | |
| | --> |
| | {| class="wikitable" |
| | ! [[git]] |
| |} | | |} |
| <!-- | | <!-- |
Line 656: |
Line 666: |
| --> | | --> |
| {| class="mw-collapsible mw-collapsed wikitable" | | {| class="mw-collapsible mw-collapsed wikitable" |
| ! C/C++ debugging | | ! Debugging |
| |- | | |- |
| | | | | |
| | {| class="mw-collapsible mw-collapsed wikitable" |
| | ! Chrome capture large JSON variable |
| | |- |
| | | This is just pointlessly bizarre: |
| | * hit a breakpoint in the chrome debugger |
| | * right-click a variable and say "copy to global variable" (console will show name, typically "temp1") |
| | * push the variable to the clipboard by typing this in the console: |
| | copy(temp1) |
| | |} |
| | {| class="mw-collapsible mw-collapsed wikitable" |
| | ! Visual Studio Code capture large string variable |
| | |- |
| | | While debugging, you can use the Debug Console to print memory, including the content of strings that are clipped by default in the variables and watch windows. |
| | View > Open View > Debug Console |
| | From there, send gdb a command to print memory – 300 characters of a string in this example: |
| | -exec x/300sb Query.c_str() |
| | |} |
| {| class="mw-collapsible mw-collapsed wikitable" | | {| class="mw-collapsible mw-collapsed wikitable" |
| ! Qt Creator conditional breakpoint | | ! Qt Creator conditional breakpoint |
Line 830: |
Line 857: |
| |- | | |- |
| | | | | |
| {| class="mw-collapsible mw-collapsed wikitable"
| |
| ! Sqlite timestamp-to-readable-date query
| |
| |-
| |
| |
| |
| select quote, timestamp, strftime('%Y-%m-%d %H:%M:%S', datetime(timestamp, 'unixepoch')) from StockQuotes as s where s.symbol="TSLA" order by timestamp;
| |
| |}
| |
| {| class="mw-collapsible mw-collapsed wikitable"
| |
| ! Sqlite copy row (pita)
| |
| |-
| |
| | Here's how you can clone a row in sqlite:
| |
| CREATE TEMPORARY TABLE tmp AS SELECT * FROM StockPicks where id=1;
| |
| UPDATE tmp SET id = NULL;
| |
| INSERT INTO StockPicks SELECT * FROM tmp;
| |
| DROP TABLE tmp;
| |
| |}
| |
| {| class="mw-collapsible mw-collapsed wikitable" | | {| class="mw-collapsible mw-collapsed wikitable" |
| ! Count records within a range | | ! Count records within a range |
Line 851: |
Line 863: |
| select count(*), id/1000000 as groupid from AccountHistory group by groupid; | | select count(*), id/1000000 as groupid from AccountHistory group by groupid; |
| |} | | |} |
| {| class="mw-collapsible mw-collapsed wikitable"
| | [[postgres]] - [[sqlite]] - [[mysql]] - [[SQL Server]] - [[Robomongo]] - [[DBeaver]] - [[pgadmin3]] |
| ! Sqlite table size analysis
| |
| |-
| |
| |
| |
| sqlite db bloat found with sqlite3_analyzer, here:
| |
| http://www.renedohmen.nl/blog/2014/05/determine-sqlite-table-size-on-disk/
| |
| http://www.sqlite.org/download.html
| |
| (put it under viper ~/apps)
| |
| ran it like this:
| |
| cd ~/development/thedigitalage/AbetterTrader/server/db_archive
| |
| ~/apps/sqlite-tools/sqlite-tools-linux-x86-3220000/sqlite3_analyzer at_server_test.sqlite__2018-03-14_EOD__.sqlite
| |
| |}
| |
| |} | | |} |
| <!-- | | <!-- |
Line 957: |
Line 958: |
| /etc/init.d/apache restart | | /etc/init.d/apache restart |
| |} | | |} |
| |}
| |
| <!--
| |
|
| |
|
| |
| ===========================================================================================================================================================================================================================================================================================
| |
|
| |
|
| |
| -->
| |
| {| class="wikitable"
| |
| ! [[git]]
| |
| |} | | |} |
| <!-- | | <!-- |