Programming Leftovers
-
Qt-Bridge Metadata format
Qt Design Studio has the capability to generate QML based UI files from a json file. Qt Design Studio expects a .metadata file for the import and the contents define the DOM and the QML item's properties in the json format.
Qt-Bridge plugins for Photoshop and Sketch generate such .metadata files. The .metadata files can be imported in the Qt Design Studio to generate QML.
Similarly, other design tools can export the user interface in the specified metadata format to generate QML using Qt Design Studio.
-
Optimization for fun!
I am well aware that my game Democracy 4 is not exactly slow with huge framerate issues. However, optimization is fun! or at least it should be, but in practice, getting profiling to work on remote PCs is not exactly easy. I have basically used every profiling software imaginable and still have not got one that I think really does the job well…
I have basically wasted about an hour today trying to work out why I couldn’t get the intel vtune amplifier stuff to work with event based profiling and get rid of this pesky error that was clearly nonsense about ‘not able to recognize processor… until I finally realized that I actually have an AMD chip in my (relatively) new PC so…yeah… That drove me to try out the AMD uProf profiler, which is something I had not used before.
-
Optimize For Nothing
Maybe that’s inevitable. If you want to run a business, you have to optimize for something to turn a profit? I’m no good at business, so don’t ask me.
But for argument’s sake, what would push this piece further is to hear a claim like: “We’re not optimizing for anything. Rather than optimize around metrics or feelings from our users, we are building something based on our own sensibilities and opinions of what makes the world more enjoyable to us.”
What I find profound and universal about anyone’s work is what they observe in themselves and, in turn, reflect in their work to the world — not any one optimization.
-
Notes on Every Strangeloop 2022 Talk I Attended
This is my writeup of all the talks I saw at Strangeloop, written on the train ride back, while the talks were still fresh in my mind. Now that all the talks are online I can share it!
-
OCaml Tips: Converting a String to a List of Characters
While playing with OCaml I was surprised to learn there’s no built-in function the convert a string to a list of its characters. Admittedly, that’s not something you need very often, but it does come handy from time to time.
-
R XML: How to Work With XML Files in R - R programming
R programming language can read all sorts of data, and XML is no exception. There are many ways to read, parse, and manipulate these markup language files in R, and today we’ll explore two. By the end of the article, you’ll know how to use two R packages to work with XML.
We’ll kick things off with an R XML introduction – you’ll get a sense of what XML is, and we’ll also write an XML dataset from scratch. Then, you’ll learn how to access individual elements, convert XML files to an R tibble and a data.frame, and much more.
-
‘CGAL’ meets ‘R6’: the ‘cgalMeshes’ package
My new package cgalMeshes (not on CRAN yet) deals with 3D meshes. All algorithms implemented in this package are performed by the C++ library CGAL.
-
Modeling the secular trend in a cluster randomized trial using very flexible models - ouR data generation
A key challenge - maybe the key challenge - of a stepped wedge clinical trial design is the threat of confounding by time. This is a cross-over design where the unit of randomization is a group or cluster, where each cluster begins in the control state and transitions to the intervention. It is the transition point that is randomized. Since outcomes could be changing over time regardless of the intervention, it is important to model the time trends when conducting the efficacy analysis. The question is how we choose to model time, and I am going to suggest that we might want to use a very flexible model, such as a cubic spline or a generalized additive model (GAM).
-
Modeling the Extinction of Species with SVM-Kernel
In the last article, we analyzed carbon emissions and the effects that created them. This time I want to look into another important environmental issue, animal biodiversity; by animals, I mean mammals, birds, fish, reptiles, and amphibians.
The metric we are going to be interested in is the living planet index which measures the change in the number of 31,831 populations across 5,230 species relative to the year 1970. The explanatory variables we will take, are annual carbon emissions per capita(co2), annual gross domestic product per capita(gdp), and regions(region).
-
Download shapefiles from ESRI ArcGIS Online Story Maps - Jonathan Chang
Recently, we needed to get out some shapefiles from an ArcGIS Online map. It’s immediately clear that there’s a lot of data, and no obvious way to get it from a download or share link anywhere on the app page. The desired solution is anything but taking a screenshot and tracing it in ImageJ, as that’s an absolute last resort. In this post, I’ll walk through how I managed to get those shapefiles downloaded, and hopefully provide some easy tips to do the same for other ArcGIS online maps.