Programming Leftovers
-
Mastering Functions in JavaScript: Essential Concepts and Techniques for Efficient Code
JavaScript, a versatile and widely used programming language, is an essential tool for web developers. One of the key concepts in JavaScript is the function, which allows you to write reusable and maintainable code.
-
Mastering Variables and Data Types in JavaScript: A Comprehensive Guide
JavaScript is a powerful, versatile, and widely-used programming language that has become an essential tool for modern web development. Understanding the basics of JavaScript, such as variables and data types, is crucial for any aspiring web developer.
-
WrappR for Rstudio: Use Keyboard Shortcuts to Wrap Highlighted Text With Custom Code
Introduction: While coding in RStudio I wanted to use the RStudio keyboard shortcuts to wrap functions and custom lines of code around datasets, code, or objects in the editor pane. I could not find what I wanted after reviewing various packages and solutions.
-
Humble Chronicles: State Management
Recently I’ve been trying to improve state management and component API in Humble UI. For that, I’ve tried to read and compile all the possible known approaches and synthesize something from them.
I haven’t decided on anything for Humble UI yet, let’s say I’m in an experimenting phase. But I think my notes could be useful to quickly get a birds-eye overview of the field.
This is a compilation of my research so far.
-
Russ Allbery: INN 2.7.1
This is a bug fix and minor feature release over INN 2.7.0, and the upgrade should be painless. You can download the new release from ISC or my personal INN pages. The latter also has links to the full changelog and the other INN documentation. As of this release, we're no longer generating hashes and signed hashes. Instead, the release is a simple tarball and a detached GnuPG signature, similar to my other software releases.
-
Python GUIs: Crafting Your First Tkinter Application Step-by-Step
In this tutorial, you will learn how to create a simple graphical user interface (GUI) using Python and Tkinter. We'll guide you through the process of crafting your first Tkinter application step-by-step, from installing the necessary dependencies to building and running the app.
-
Getting Started With PyTest Fixtures
PyTest is a popular testing framework for Python programming language. Fixtures in PyTest provide a way to manage the resources and data required for running tests. They simplify the process of setting up, tearing down, and sharing test data between test functions. PyTest fixtures provide a convenient way to define these resources and data once and reuse them across multiple tests, saving time and reducing the chance of errors.
In this tutorial, you will learn what PyTest fixtures are, why they are used, and how to define and use them in your tests. To explore the usage of Pytest fixtures, you’ll be creating a simple note-taking application that lets users add, edit, and get notes.
-
Enrico Zini: Gkt4 model-backed radio button in Python
Gtk4 has interesting ways of splitting models and views. One that I didn't find very well documented, especially for Python bindings, is a set of radio buttons backed by a common model.
The idea is to define an action that takes a string as a state. Each radio button is assigned a string matching one of the possible states, and when the state of the backend action is changed, the radio buttons are automatically updated.
All the examples below use a string for a value type, but anything can be used that fits into a
GLib.Variant
.The model
This defines the action. Note that enables all the usual declarative ways of a status change: [...]