Example to convert a field from real type to integer type:
update bracketevents set json = jsonb_set(json, '{sq_id}', ((round(cast(json->>'sq_id' as real))::text)::jsonb));
All that just remove the $*(@ decimals… how particular…
Example to convert a field from real type to integer type:
update bracketevents set json = jsonb_set(json, '{sq_id}', ((round(cast(json->>'sq_id' as real))::text)::jsonb));
All that just remove the $*(@ decimals… how particular…
This article is a great explanation of the details. To explain.. no, too much. To sum up:
function custom_add_google_fonts() {
wp_enqueue_style(
'custom-google-fonts',
'https://fonts.googleapis.com/css?family=Montserrat|Quicksand',
false
);
}
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );
body { font-family: Montserrat, sans-serif; font-weight: normal; }
#content h2 { font-family: Quicksand, sans-serif; font-weight: bold; }
Today I updated my gentoo server’s eselected PHP from 5.6 to 7.2 and wordpress phabricator and mediawiki didn’t even hiccup. WordPress went from a steaming pile of stubborn version upgrade refusal right back into line. I used mysqldump to back up all my databases, less than a GB. I git pulled phabricator’s stable branch (updated weekly from master) and ran a boatload of database patches that went smooth as coconut milkfat. I git-skipped the .arcconfig files so i could just update them in place. OK… why did that all just work?
Update: I went ahead and made the phabricator-recommended changes to mysql and PHP, including installing a PHP memory-based cache:
emerge -DavuN dev-php/pecl-apcu
And that, of course, cascaded me into a gentoo server update.
emerge -uDNav --with-bdeps=y --backtrack=100 --autounmask-keep-masks=y @world
And away we go…
UPDATE: ok these are a few more of my “favorite” things…
I spent this morning exploring available tech to address this goal:
Add a bigdata database to my application, to archive older data out of the realtime local model
This is for my stock app, which deals with realtime in-memory data during market hours, with a delayed-write to local storage. At the end of the day, it can then archive most of the data collected during market hours.
Because I have not achieved “success” in life yet, at least enough to allow me to pursue my larger goals uninhibited, I have to be very careful about how I apply my limited resources. To be more precise:
The result of today’s philosophically-informed research:
Note that using quicktype with nlohmann::json is an elegant way to effectively get C++ reflection. Once you serialize an object to JSON you can walk all its fields. Then you can do things like automatically build SQL queries for your classes based on the JSON schema. Beautiful.
PS. I avoided spotify-json, StaticJson/autojsoncxx, Google Prototype Buffers, Code Synthesis’s ODB, the sqlite JSON1 Extension, C++ reflection libraries like RTTR, lots of code from Stiffstream and Chilkat, etc. because while they are all brilliant and compelling, they bring extra weight. The world keeps churning though, so keep searching. Also, there are cases where my choices do not fit, most obviously being cross-platform mobile apps, which will have to be saved for another post… 🙂
When NPM gets bumped, you start with an empty module cache. To restore it with optimal dependencies:
cd baseapp && rm -rf node_modules && npm -g install cd dependentapp && rm -rf node_modules && npm -g install cd thirdlevelapp && rm -rf node_modules && npm -g install