Development reference: Difference between revisions
No edit summary |
No edit summary |
||
(22 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
|} | |} | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" | ||
! | ! nosql enhances, not replaces, SQL | ||
|- | |- | ||
| | | Not all data should be denormalized, and not all data should be normalized. The optimal mix considers the extent of the data. | ||
* | |||
* | * Precise schemas are good when not overdone | ||
* | * When a container has an array with a large number of elements, it should be normalized | ||
* Sparse data and heterogeneous data are the best candidates for denormalization | |||
Postgres with JSON allows an elegant combination of nosql and SQL. | |||
|} | |} | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" | ||
Line 574: | Line 576: | ||
|- | |- | ||
| | | | ||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! String escape formatting across different languages and systems | |||
|- | |||
| | |||
* c++ to JSON: always use nlohmann::json j.dump() to encode, to ensure strings are properly escaped | |||
* JSON to c++: always use nlohmann::json j.parse() " | |||
* c++ to Javascript: use raw_to_Javascript() to properly escape | |||
* c++ to sqlite: use SqliteLocalModel::safestr(), which uses double_doublequotes(str) | |||
|} | |||
[[Postgres]] | [[Postgres]] | ||
[[Simple-Web-Server]] | [[Simple-Web-Server]] | ||
[[Robot Operating System]] | |||
[[C++ https libraries]] | [[C++ https libraries]] | ||
Line 636: | Line 649: | ||
CC=gcc-4.9 | CC=gcc-4.9 | ||
|} | |} | ||
|} | |||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[git]] | |||
|} | |} | ||
<!-- | <!-- | ||
Line 645: | Line 668: | ||
--> | --> | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" | ||
! | ! 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 773: | Line 813: | ||
--> | --> | ||
{| class=" | {| class="wikitable" | ||
! | ! [[Node.js]] | ||
|- | |}<!-- | ||
{| class=" | |||
! | =========================================================================================================================================================================================================================================================================================== | ||
|- | |||
--> | |||
{| class="wikitable" | |||
! [[React]] | |||
|}<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[Vite]] | |||
|} | |} | ||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[JSON]] | |||
|} | |} | ||
<!-- | <!-- | ||
Line 792: | Line 851: | ||
--> | --> | ||
{| class=" | {| class="wikitable" | ||
! | ! [[HTML]] | ||
|- | |} | ||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[CSS]] | |||
|} | |} | ||
<!-- | <!-- | ||
Line 819: | Line 875: | ||
|- | |- | ||
| | | | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" | ||
! Count records within a range | ! Count records within a range | ||
Line 840: | Line 881: | ||
select count(*), id/1000000 as groupid from AccountHistory group by groupid; | select count(*), id/1000000 as groupid from AccountHistory group by groupid; | ||
|} | |} | ||
[[postgres]] - [[sqlite]] - [[mysql]] - [[SQL Server]] - [[Robo 3T]] - [[DBeaver]] - [[pgadmin4]] | |||
|} | |} | ||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[Meteor]] | |||
|} | |} | ||
<!-- | <!-- | ||
Line 862: | Line 902: | ||
{| class="wikitable" | {| class="wikitable" | ||
! [[Android]] | ! [[Android]] | ||
|} | |||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[Arduino]] | |||
|} | |||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[Raspberry Pi]] | |||
|} | |||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[iOS]] | |||
|} | |||
<!-- | |||
=========================================================================================================================================================================================================================================================================================== | |||
--> | |||
{| class="wikitable" | |||
! [[.NET Core]] | |||
|} | |} | ||
<!-- | <!-- | ||
Line 946: | Line 1,024: | ||
/etc/init.d/apache restart | /etc/init.d/apache restart | ||
|} | |} | ||
|} | |} | ||
<!-- | <!-- |
Latest revision as of 23:15, 25 November 2023
Design, programming and version control.
Patterns | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
C++ | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
c++11 | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
boost | ||||||
---|---|---|---|---|---|---|
|
C++ libraries | ||
---|---|---|
|
C/C++ building/linking | ||||
---|---|---|---|---|
|
git |
---|
Debugging | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
C | ||||
---|---|---|---|---|
|
Javascript |
---|
Node.js |
---|
React |
---|
Vite |
---|
JSON |
---|
HTML |
---|
CSS |
---|
SQL | ||
---|---|---|
postgres - sqlite - mysql - SQL Server - Robo 3T - DBeaver - pgadmin4 |
Meteor |
---|
Android |
---|
Arduino |
---|
Raspberry Pi |
---|
iOS |
---|
.NET Core |
---|
Java |
---|
Kotlin |
---|
Maven |
---|
Scala |
---|
Python |
---|
Go |
---|
PHP | |||
---|---|---|---|
|
Bash basics but please prefer node or python :-) |
---|
misc | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|