Programming Leftovers
-
How to Clone a JavaScript object - Example - Linux Shout
To correctly clone a JavaScript object, you can use the Object.assign() method to create a new object with the properties of the original object.
-
How to detect mouse wheel event in javascript? - Linux Shout
To detect mouse wheel events in JavaScript, you can use the addEventListener() method to register a function that will be called whenever a “wheel” event is fired.
-
C/C++ Profiling Tools - KDAB
This blog will give you a brief overview of profiling C and C++ applications. Additionally, it will lay before you all of the tools available, with the purpose of aiding you in choosing the right tools at the right times.
[...]
Before we look at the actual tools, let’s go over the steps to profiling. It’s quite important to have a technique for doing this properly, to avoid the trap of changing something hoping it’s better, committing it, and going home without making sure that you’ve actually improved things. So the way to do that is by, first, assessing what is important in terms of performance in your project. Is it the CPU usage? Is it the off CPU time, when your application is sleeping or waiting for something to happen? Is it memory allocations? Is it the battery usage that is the problem? Do you want to improve the frame rate? It can be many, many different things, not just one. It’s a whole set of measures.
[...]
Another tool you can use to measure performance is perf, which is part of the Linux kernel. That means it supports all of the architectures of the Linux kernel, including x86, ARM, PPC, and so on. Unfortunately, perf has no user interface. It’s a command line tool that is pretty difficult to use. So, we at KDAB wrote a tool called Hotspot, which is a graphical interface for the measurements made by perf.
-
Hiring! Python developer for import extension | Inkscape
For the Inkscape project and its users, interoperability with other software packages, both free and commercial, is of high importance. The PLC has decided to hire a developer for the equivalent of 1.5 months (part-time schedule available) to implement importing functionality of a file format for which Inkscape yet lacks proper support. An extension of the project to up to 3 months (with additional compensation) may be granted depending on the success of the first half.
While the Inkscape team consists entirely of volunteers, this will be a paid contractor role.
The work may start between 2023-02-15 and 2023-03-15, and assuming a full-time schedule, will be finished around 2023-05-01. Applications may be submitted until Monday, Jan 9, 2023, 23:59 UTC.
-
Cryostat 2.2 improvements: Revamped archives views and more | Red Hat Developer
Cryostat is a container-native JVM application that provides a secure API for profiling and monitoring containers with JDK Flight Recorder. In the newest release, Cryostat 2.2, three new and updated views for archived JDK flight recordings managed by Cryostat have been added to the web client, along with new recording filters and enhanced features for recording metadata and custom labels.
[...]
When we first come upon the view, we can see a card that includes three tabs, one titled All Targets, the second titled All Archives, and the last titled Uploads. By default, the All Targets view will be selected. A checkbox on this view includes the option to Hide targets with zero recordings. By unchecking the box, we can see all targets Cryostat has discovered, with or without any associated archived recordings.