Programming Leftovers

-
Milonga in Flathub! | Juan Pablo's Blog
Cambalache is a new RAD tool that enables the creation of user interfaces for Gtk and the GNOME desktop environment. It’s main target is Gtk 4 but it has been designed from the ground up to support other versions. It is released under LGPL v2.1 license and you can get the source code and file issues here
[...]
Even tough the workflow is similar to Glade, there are some key differences like multiple UI files support in the same project, which means new concepts like import and export where introduced. Since I do not like writing documentation, who does? I made an interactive tutorial to show up the work flow.
-
GitLab 14.2 brings macOS 'build cloud' closed beta and improved Gitpod support among nearly 50 new features
GitLab has updated its code repository and DevOps platform to version 14.2, including a private beta of a macOS "build cloud" for compiling applications for Apple's operating system.
"Today, Apple ecosystem developers on GitLab SaaS need to install, manage and operate GitLab Runner on their own macOS systems to execute CI/CD workflows," said the company.
-
Scanf in C
The scanf function is one of the most famous and useful C functions. It allows a C program to accept input from the standard input stream, mainly the keyboard. Once scanf reads data from the standard input, it stores the value according to the specified parameter format.
This tutorial will give you the basics of how to use the scanf function in the C programs.
-
Sprintf in C
In this guide, we will discuss how to use the sprintf function in C programs. The sprintf function is used to write a formatted string to a character string buffer.
Let us discuss how to use this function and illustrate with various examples.
-
Strcat in C
Strings are one of the fundamental building blocks in C and other major programming languages.
This quick guide will walk you through using one useful string function: strcat.
The strcat function allows you to concatenate or join two strings to form a single string value.
-
Strcpy() Function in C
In this guide, we will discuss how to use the strcpy() function in C language. The strcpy() function is a part of the C standard library and is used to perform string copy operations. It is included in the string.h header file and needs to be imported before using the function.
-
Strncpy Function in C
In this tutorial, we will discuss how to use the strncpy() function in the C programming language. The strncpy function in C is used to copy specified bytes of characters from a source to a specified destination. It is defined in the string.h header file which need to be included before using the function.
-
Structures in C
In C, a structure is a user-defined variable used to store a collection of variables under a single entity. Let us use a simple analogy to explain structures implementation and usefulness in C.
Suppose we want to store information about users using a specific service. Such information can include the username, email, address, service mode, and such. To store such information, we can go about creating each attribute as a standalone variable. However, when we have ten plus users, the code can spiral out of control and become very difficult and tiresome to read.
To solve this, we can create a structure. Inside the structure, we can store all the attributes shared by all the users and then add unique variables for each user.
Let us take a look at various examples to see how to implement this.
-
strstr Function in C
The strstr() function in C is used to parse and locate the occurrence of a substring in a string. It is defined in the string.h header file.
This short tutorial will show you how to use C’s strstr() function to locate a set substring.
-
Perror Function in C
This guide will discuss the perror function in C, how it works, and how we can use it.
The perror function prints error messages to the stderr stream based on the error state in the errno.
-
Where Clause MySQL
This article will show you how to use the MySQL WHERE clause to filter rows for a specific condition. Using the where clause, we can specify a search condition for rows that return true for the condition and perform actions on them.
-
MySQL BIGINT Number Ranges
This article focuses on the MySQL BIGINT data type and looks into how we can use it to store integer values. We will also learn its range, storage size, and various attributes, including signed, unsigned, and zero fill.
-
MySQL Create Temp Table
A MySQL temporary table is a unique type of table that allows you to store data temporarily within a single user session. MySQL temporary table is not that different from a normal MySQL table, except that it is volatile.
Once a table has initialized in a specific user session, only that user can view, edit, or delete the table. Other logged-in users have no access to it. Once a session dies, MySQL automatically drops the table and the data stored in it.In this tutorial, we will quickly discuss how you can create and use the MySQL temporary table.
-
New Release: KD Reports 2.0.0 - KDAB - KDAB on Qt
Version 2.0.0 of KD Reports has just been released!
KD Reports creates all kinds of reports from within Qt applications. These reports are printable and exportable from code and XML descriptions. KD Reports is a developer tool used in source code, but it allows the use of templates that are created by design staff. Reports may contain text paragraphs, tables, headlines, charts, headers and footers and more. Read more about KD Reports here.
-
Using Gyroscope and Accelerometer with MPU6050, Raspberry PI Pico and MicroPython
Gyroscopes and Accelerometers are basic features of modern smartphones. But they are vital for such projects as drones and self-balancing cars. These two kinds of sensor can be achieved with a single chip: the MPU6050. As it can communicate with a I2C interface, you can use it with Raspberry PI Pico
In this tutorial, I’m going to show you how to connect and use an MPU6050 with Raspberry PI Pico and MicroPython.
The MPU6050 is a Micro-Electro-Mechanical System (MEMS), which are small form factor devices able to convert mechanical movements into electrical signals. The MPU6050 specific case includes a 3-axis accelerometer and a 3-axis Gyroscope (built inside the accelerometer). The accelerometer will measure the acceleration given from a movement (values will be different from zero while it will change its moving speed), while the gyroscope will measure the speed of movement (values will be different from zero while it will move). From this, derives that MPU6050 can measure movement but it will not fit perfectly the aim to define an absolute position. For this purpose, you will need to add a magnetometer as a slave device to MPU6050, by using its auxiliary pins (not explained in this tutorial).
-
Using NumPy’s Meshgrid
This post will show what a meshgrid is and how it can be created and used in python.
A meshgrid is a rectangular grid of values made out of coordinate vectors. It is also that the values in the meshgrid are a function of the coordinate vectors.
Let’s say you want to create a meshgrid out of the coordinate vectors x and y. The naive way to do it is create a new rectangular grid and assign the values of the grid by evaluating the function at each point of the meshgrid. The following code illustrated the naive way:
-
What is the cursor execute in Python?
A cursor is an object which helps to execute the query and fetch the records from the database. The cursor plays a very important role in executing the query. This article will learn some deep information about the execute methods and how to use those methods in python.
-
How to Use the Decimal Module in Python
This article will cover a guide on using the “Decimal” module in Python. It can be used to run various mathematical operations on floating point numbers or numbers containing decimals points. All code samples in this article are tested with Python 3.9.5 on Ubuntu 21.04.
-
What is the “Does Not Equal” Sign in Bash? How To Use It
The not equal “-ne” controller inside the Linux Bash programming language compares two possible values when they’re not equivalent. The not equal function in Ubuntu bash is denoted by the symbol “-ne,” which would be the initial character of “not equal.” Also included is the “!=” operator that is used to indicate the not equal condition. The exclamation point, i.e., “!=” is also commonly used in certain computer languages to indicate that something is not equal. In addition, for the not equal expression to operate, it must be enclosed by brackets [[…]]. The not equal operation yields a boolean result of True or False. The not equal expression is often used in conjunction only with if or elif expressions to check for equality and run instructions.
-
What is $@ in a Bash Script?
Most of us use Bash scripts for maintenance and certain other tasks. However, we aren’t always acquainted with the various Bash options. Whenever a user is a novice to the Bash shell and Linux, the user tends to seek a pre-written Bash script. This is due to some users finding the unique Bash characters such as $@, $_, and $1 confusing. Beginning with the $@ Bash parameter, it is being used to extend into the positional arguments. Each parameter extends into something like a distinct word whenever expanding happens within double-quotes. Separate parameters should be enclosed in quotations and distinguished by a space if $@ is used. Remember that $@ should be quoted to function properly. Nonetheless, it behaves similarly to arguments as distinct strings.
We will be looking at several examples to elaborate on the functionality of $@ in the Bash Script while using Ubuntu 20.04 system:
-

- Login or register to post comments
Printer-friendly version- 2318 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago