Programming Leftovers

-
An Introduction to Bash Brace Expansion
The Borne Again Shell (BASH) has a lot of great features that it borrows from other shells and even from some programming languages. It was created in the late 1980s in a response to a lacking in the current available shells on Berkley Distributions (BSD), and the predecessor to Linux, GNU. BASH features numerous in-built features such as in-line scripting capabilities like brace expansion, which we are going to examine today.
-
Rakudo Weekly News: 2021.04 Grant Reporting
-
The Trouble with Reference Counting
Perl uses a simple form of garbage collection (GC) called reference counting. Every variable created by a Perl program has a refcnt associated with it. If the program creates a reference to the variable, Perl increments its refcnt. Whenever Perl exits a block it reclaims any variables that belong to the block scope. If any are references, their referenced values’ refcnt are either decremented or they’re reclaimed as well if no other references to them remain.
-
Dustin J. Mitchell: The Horrors of Partial-Identity Encodings -- or -- URL Encoding Is Hard
URL encoding is a pretty simple thing, and has been around forever. Yet, it is associated with a significant fraction of bugs in web frameworks, libraries, and applications. Why is that? Is there a larger lesson here?
-
Enrico Zini: nspawn-runner: support for image selection
.gitlab-ci.yml supports 'image' to allow selecting in which environment the script gets run. The documentation says "Used to specify a Docker image to use for the job", but it's clearly a bug in the documentation, because we can do it with nspawn-runner, too.
It turns out that most of the environment variables available to CI runs are also available to custom runner scripts. In this case, the value passed as image can be found as $CUSTOM_ENV_CI_JOB_IMAGE in the custom runner scripts environment.
-
Introduction to Making GraphQL APIs and Apps in Node.js – Linux Hint
The communication and data transfer between the front end and backend of any application occurs through APIs (Application Programming Interface). There are many different types of APIs used to communicate between the front and back-end applications like RESTful API, SOAP API, GraphQL API, etc. The GraphQL API is a relatively new technology, and it is much faster than other types of APIs available. Fetching data from the database using GraphQL api is much faster than the REST API. While using GraphQL API, the client has control to fetch only the required data instead of getting all the details; that is why GraphQL API works faster than REST API.
-
Issue with phpMyAdmin and PHP: Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”
Today, I had installed PHP 7.3 and phpMyAdmin on Ubuntu 18.04 LTS system. I am using MariaDB as database server running on the same instance. When I tried to access data in tables using phpMyAdmin got the following error message on screen.
-
C++ Access Specifiers – Linux Hint
In C++, a class is a set of variables and functions that have been configured to work together. When the variables of the class are given values, an object is obtained. An object has the same variables and functions as a class, but this time, the variables have values. Many objects can be created from one class. One object differs from another object according to the different set of values assigned to the variables of the other object. Creating an object from a class is said to be instantiating the object. Even if two different objects have the same values for their variables, these objects are different entities, identified by different names in the program. The variables for an object and its corresponding class are called data members. The functions of an object and its corresponding class are called member functions. Data members and member functions are called members.
The word access means to read or change the value of a variable, and it also means to use a function. C++ access specifiers are the words, “private,” “protected,” and “public.” They decide whether a member can access other members of its class, or if a function or operator outside the class and not belonging to the class can access any member of the class. They also decide whether a member of a derived (child) class can access a member of a parent class.
Basic knowledge of C++ is required to understand this article and to test the code provided.
-
Compiling Code in Parallel using Make – Linux Hint
Whoever you ask how to build software properly will come up with Make as one of the answers. On GNU/Linux systems, GNU Make [1] is the Open-Source version of the original Make that was released more than 40 years ago — in 1976. Make works with a Makefile — a structured plain text file with that name that can be best described as the construction manual for the software building process. The Makefile contains a number of labels (called targets) and the specific instructions needed to be executed to build each target.
Simply speaking, Make is a build tool. It follows the recipe of tasks from the Makefile. It allows you to repeat the steps in an automated fashion rather than typing them in a terminal (and probably making mistakes while typing).
Listing 1 shows an example Makefile with the two targets “e1” and “e2” as well as the two special targets “all” and “clean.” Running “make e1” executes the instructions for target “e1” and creates the empty file one. Running “make e2” does the same for target “e2” and creates the empty file two. The call of “make all” executes the instructions for target e1 first and e2 next. To remove the previously created files one and two, simply execute the call “make clean.”
-
Zeal – simple offline documentation browser
Zeal is billed as a simple offline documentation browser. It offers easy access to a huge database of documentation, API manuals, and code snippets.
The main purpose of the software is to enable you to have reference documentation at your fingertips. Let’s see how it fares.
-
- Login or register to post comments
Printer-friendly version
- 1539 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
CoreELEC 19.0 “Matrix” Linux Distro Released for Amlogic Hardware Based on Kodi 19
As its codename suggests, CoreELEC 19.0 “Matrix” is the first release of this LibreELEC fork to be based on the recently released Kodi 19.0 “Matrix” open-source home theater software, which introduces numerous new featiures and improvements for those who want to make their own media center PC or HTPC.
Based on the CoreELEC 9.2.6 Amlogic-NG release, the CoreELEC 19.0 series becomes the active development branch, supporting only Amlogic-NG devices like LaFrite, LePotato, ODROID-C4, ODROID-HC4, and ODROID-N2.
| Mozilla Leftovers
|
Security Leftovers
| IBM/Red Hat Leftovers
|
Recent comments
16 min ago
1 hour 12 min ago
1 hour 33 min ago
7 hours 18 min ago
9 hours 35 min ago
11 hours 56 min ago
11 hours 58 min ago
11 hours 59 min ago
12 hours 2 min ago
19 hours 55 min ago