Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • 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:

More in Tux Machines

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. Read more

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. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.