Programming Leftovers
-
GTK 4.12 Released
-
Week 10 report on porting Gentoo packages to modern C
Hello all, I’m here with my week 10 report of my project “Porting
gentoo’s packages to modern C”So apart from the usual patching of packages from the tracker the most
significant work done this week is getting GNOME desktop on llvm
profile. But it is to be noted that the packages gui-libs/libhandy,
dev-libs/libgee and sys-libs/libblockdev require gcc fallback
environment. net-dialup/ppp was also on our list but thanks to Sam its
has not been patched [0] (and fix sent upstream). I’m pretty sure that
the same work around would work on musl-llvm profile as well. Overall
point being we now have two DEs on llvm profile, GNOME and MATE.Another thing to note is currently gui-libs/gtk-4.10.4 require
overriding of LD to bfd and OBJCOPY to gnu objcopy, it is a dependency
for gnome 44.3. -
JavaScript Code to Detect Web Browser
Detecting a web browser type can be quite useful for tailoring user experience to different browsers. However, it’s worth noting that browser detection is usually not recommended as the best approach in most cases.
-
JavaScript Code to Detect OS (Operating System)
Today’s increasingly online world requires developers to be equipped with tools and knowledge that enable them to build user-friendly, efficient, and dynamic websites. One crucial aspect of this endeavor involves being able to identify a user’s operating system (OS), which allows for tailored experiences and improved website compatibility.
-
JavaScript for loop
The “for loop” is one of the most fundamental and widely used control flow structures in JavaScript.
-
JavaScript while loop
JavaScript, like many other programming languages, includes several types of loop statements. These loops are used to perform the same operation multiple times until a certain condition is met. One of the most common types of these loops is the “while” loop.
-
JavaScript Code to Reverse a String
JavaScript is a versatile language that allows for an extensive array of operations including the manipulation of text strings. One common operation is reversing a string, or writing it backward. In this article, we’ll explore three different ways of achieving this in JavaScript.
-
Java Program to Reverse a String
In Java, reversing a string involves changing the order of characters in a given string, such that the last character becomes the first, the second-last character becomes the second, and so on. There are several ways to reverse a string in Java, but in this article, we will discuss a simple and straightforward approach.
-
Zenity incompatibility with Yad
EasyOS has 'zenity' a symlink to 'yad'. The latter is a fork of the former, and 'zenity' is I think an inactive project. 'yad' has moved on and no longer completely compatible, so the symlink may not work, as was found here: [...]
-
Week 10 report on porting Gentoo packages to modern C
Hello all, I’m here with my week 10 report of my project “Porting
gentoo’s packages to modern C”So apart from the usual patching of packages from the tracker the most
significant work done this week is getting GNOME desktop on llvm
profile. But it is to be noted that the packages gui-libs/libhandy,
dev-libs/libgee and sys-libs/libblockdev require gcc fallback
environment. net-dialup/ppp was also on our list but thanks to Sam its
has not been patched [0] (and fix sent upstream). I’m pretty sure that
the same work around would work on musl-llvm profile as well. Overall
point being we now have two DEs on llvm profile, GNOME and MATE.Another thing to note is currently gui-libs/gtk-4.10.4 require
overriding of LD to bfd and OBJCOPY to gnu objcopy, it is a dependency
for gnome 44.3. -
Junction | Application Chooser for Hyperlinks
Long ago, on a laptop far, far away the web browser and application choices were simple. That was a long time ago and things are just different in the current age of the computer. Having multiple browsers, and work flows for various work loads on your computer can make opening links somewhat more complicated.
-
Introduction to Qualitative Comparative Analysis (QCA) using R workshop
Join our workshop on Introduction to Qualitative Comparative Analysis (QCA) using R, which is a part of our workshops for Ukraine series!
-
To truly fix a bug, one must truly know the bug
It’s really easy (and often tempting) to fix a bug without really fixing it. You make the wrong behaviour go away, but you haven’t fixed the bug. Many race conditions can be “fixed” by adding sleep-statements, but in order to really fix them, you need to understand why and when and how they happen.
-
Stuart Langridge: Numeric Pangrams
A few days ago I had an interesting maths thought which I dropped on Mastodon:
Today’s interesting maths problem to think about: what is the largest total from a correct maths equation which uses any number of +*- symbols, one =, and the digits from 0-9 once each?
For example, if we’re doing it for digits 0-4, then 40-12=3 isn’t valid (answer is wrong), 1+3=4 isn’t valid (correct but doesn’t use 0 or 2), 12/4+0=3 is good, and 4*3+0=12 is better (because 12 is higher than 3).
-
Python 3.12.0 release candidate 1 released
This release, 3.12.0rc1, is the penultimate release preview. Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate (and the last planned release preview) is scheduled for Monday, 2023-09-04, while the official release of 3.12.0 is scheduled for Monday, 2023-10-02.
There will be no ABI changes from this point forward in the 3.12 series, and the goal is that there will be as few code changes as possible.
Call to action We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.12 compatibilities during this phase, and where necessary publish Python 3.12 wheels on PyPI to be ready for the final release of 3.12.0. Any binary wheels built against Python 3.12.0rc1 will work with future versions of Python 3.12. As always, report any issues to the Python bug tracker.
-
Understand Python main() Function
Before we delve into the topic, it’s essential to note that Python, unlike languages such as C and C++, does not have a built-in main() function.
-
Converting Float to Int in Python: Precision and Performance
-
Python Decorators: Enhancing Functions and Methods
-
Decorators with Arguments in Python: A Deeper Insight
-
Class Decorators in Python: Adding Functionality to Classes
-
Mastering Rounding in Python: Precision in Every Calculation
-
Variable Scopes in Python: The Art of Keeping Variables in Check
-
Nonlocal Scopes and Variables in Python: Breaking Boundaries
-
Python Closures: A Functional Programming Gem
-
Python’s Decimal: A Solution for Precise Computations
-
Named Tuples in Python: Structuring Data Efficiently