You are here |
adriano.fyi | ||
| | | |
rolle.design
|
|
| | | | I have been in social media for over two decades. Started MySpace back in 2003 and been excited about the development of this Internet phenomenon ever since. I liked it from the very start, because I was finally able to be actually social, as an awkward nerd that I was. I have never took any [...] | |
| | | |
carlschwan.eu
|
|
| | | | One design characteristic of our QtWidgets is that they contain a lot of frames and frames inside other frames. This worked well with Oxygen style and its skeuomorphism shadow, less so with Breeze. I first thought this was inheriten with QtWidgets and couldn't be fixed without much effort. But fortunately, after looking a bit into Qt source codes and in particular in the internals of QDockAreaLayout, I discovered that the engine to draw and style the built-in components of QtWidgets: QStyle has a QStyle::PE_IndicatorDockWidgetResizeHandle primitive which allows drawing separators between detachable docks and similarly there is QStyle::CE_Splitter to paint the separator between elements inside a QSplitter. This is huge because this means instead of drawing frames, we can render separator and then get rid of most of our frames in our apps. | |
| | | |
rolle.design
|
|
| | | | I have finally implemented a very simple Fediverse-commenting to my WordPress blog here at rolle.design in favor of Webmention. I have practically taken the Carl Schwan's code and modified it a bit. Mastodon's API is quite simple, but I wanted to get it done in ten minutes. There are other fancier ways available, which even [...] | |
| | | |
adriano.fyi
|
|
| | Problem synopsis I'm a huge fan of sqlc's approach to code generation. I've seen sqlc called a reverse ORM, and I really like that moniker. However, as a sqlc newbie, I'm still discovering its edge cases. Today's edge case is using postgres UPSERT queries with sqlc. The crux is that when upserting, it's necessary for unique key conflicts to occur so that the UPDATE portion of the query executes. But non-null uuid Go types tend to have a zero-value of 00000000-0000-0000-0000-000000000000. This results in new records inserting with the uuid Go type's zero value, and every following new record upserts the existing zero ID record. |