Language Selection

English French German Italian Portuguese Spanish

Programming: C, Python, Bash, PostgreSQL

Filed under
Development
  • How to create a linked list in C

    Linked List is another linear data type, e.g., structure data type, widely used in the C language. The main concept in the linked list is storing and binding the locations of data by Pointers. Let see how we will create a Linked list in C language by using Ubuntu 20.04 system. For that, open up the console application from the search area of the Linux desktop. On the other way, you can utilize the shortcut “Ctrl+Alt+T”.

  • Semctl System Call in C

    The C language comes up with the semctl system call in the Linux system. This system call has been widely used in the Linux system to carry out the control processes specified by the console shell on some particular semaphore set. The semaphores are known IPs widely used to give access to processes for communication with one another. Semaphore can be a variable having abstract data type for the control access of 1 resource for many procedures. Hence, the semctl system call has been used here to control the semaphore set. Let’s start by signing up from the Linux system.

    Open the console application from the search area. A quick alternative way to open the console is via “Ctrl+Alt+T”.

  • Waitpid Syscall in C

    The waitpid() system call monitors a child of the caller process for state changes and retrieves information about the child whose behavior has changed. The child was halted by a signal or resumed by a signal regarded as a state shift. Waiting for a terminated child enables the system to free the resources associated with the child; if no wait is conducted, the terminated child will remain in a “zombie” condition.

    The waitpid() system function pauses the current process until the PID argument specifies a child who has changed. The calling process is paused until a child’s process completes or is terminated. Waitpid() halts the calling process till the system receives information about the child’s status. Waitpid() returns quickly if the system already has status information on a suitable child when it is called. If the caller process gets a signal with the action of either executing a signal handler or terminating the process, waitpid() is terminated. The waitpid() function will pause the caller thread’s execution until it receives information and updates for one of its terminated child processes or a signal that will either run a signal-catching procedure or terminate the process.

  • Shift Operators in C

    In general, you should not need to worry about operations somewhere at bit level as a developer. You can conceptualize in terms of bytes, int, and doubles, and even higher-level data. However, there are instances when you would like to zoom in on a single piece. The bits in an integer variable are shifted by a defined number of positions using two shift operators. The “>>” operator changes bits to the right, while the operator changes bits left. In general, employing the left and right shift operators instead of computing and then multiplication by a power of two will result in substantially faster code.

  • Puts function in C

    Displaying the output on the screen is an important component of every programming language. The puts function in C is used to perform this. The puts () call in C is a file handling method that is utilized to print a line to the output screen. The puts () function looks a lot like the printf() function. The puts () function is being used to display the string that was read previously using the gets () or scanf() functions on the terminal. The integer value returned by the puts () function represents the number of characters written on the terminal.

    If the string contains formatting characters such as ‘% s,’ printf() will provide unpredictable results in the puts() function. Also, if “str” is a user-supplied string, using printf() could compromise security.

  • How to Use Dataclasses in Python

    This article will cover a guide on using the new “dataclass” objects included in Python 3.7 and newer versions. Dataclasses are just like other Python classes, but they are especially designed to be used as data containers and provide a cleaner and shorter syntax for quickly creating data objects. If you know about “namedtuple” objects and have used them in Python, you can define them as mutable namedtuple type objects. You can create new instances of dataclasses like any other class or namedtuple type objects and access their attributes using dot notation.

  • How to Use New F Strings in Python

    This article will cover a guide on using the new “F” type string formatting syntax added to recent versions of Python. Simply termed as “f-strings” or “formatted string literals”, these expressions allow you to use Python variables, functions and statements directly in the text of a string. They also help in keeping the code clean, as you can use inline expressions without resorting to any kind of ordered substitutions that are usually part of the other string formatting techniques available in Python. F-strings are included by default in Python 3.6 and newer builds.

  • Command Line Arguments

    In many cases, bash scripts require argument values to provide input options to the script. You can handle command-line arguments in a bash script in two ways. One is by using argument variables, and another is by using the getopts function. How you can handle command-line arguments is shown in this tutorial.

  • How do I list all schemas in PostgreSQL?

    Postgresql is a rational and reliable database. Many features of PostgreSQL differentiate it from other databases. PostgreSQL schema is a property that allows the user to maintain and organize the objects in the current database and manage them in logical groups. The currently existing schemas are viewed in the psql and pgAdmin as well. To enlist all the schemas in PostgreSQL, there are many approaches. We have used mainly of them to explain in this article. To understand this dilemma, you need to follow some prerequisites steps like:

    Install PostgreSQL on your system and configure it. After successful installation and the configuration of Postgresql, confirm it by checking its version on the psql. When you have installed the database, now you can use it because you have privileges to access the features present in it. If you have some knowledge of databases, then it will be favorable for you to understand the schemas. Now open psql and apply the password for the user for the server connectivity.

  • Change column name Postgresql

    In PostgreSQL, while performing operations, you need to create relations. After the creation of the tables, you may want to edit the attributes you have provided. One of the examples is to modify the column name of the table. The column name can be changed in PostgreSQL by using the “ALTER” command on the table.
    First, we provide the table name and then the column name after the rename clause. Thirdly, the name that is to be placed is written.

  • Using Floating Data Types in PostgreSQL

    PostgreSQL supports multiple different data types. One such data type is the floating data type which is used to store the floating-point data. We all understand that the handling and manipulation of this particular data type is a bit tricky and complex, so the programmers find it a little difficult to use it. Therefore, in this guide, we have decided to share the method of using the floating data types in PostgreSQL in Windows 10 after sharing with you a brief introduction of this data type.

  • Postgresql temporary tables

    As the name indicates, PostgreSQL temporary tables are the tables that are created for some time and are removed manually or automatically. Manually removal deals with deleting the table. Whereas the table is automatically removed when the database session is ended. The temporary tables last till the session exists.

    The use of a temporary table helps in avoiding the overloading of data in a particular database. Whenever you think you need to enter data in a database for some time to perform operations on the data, you will go for the temporary table. So that after usage, they are removed. And your database will have sufficient free space. This tutorial will explore what a temporary table is, its working, and its usage.

  • Postgresql round to 2 decimal places

    The ROUND () function converts the number you provided in the decimal or integer form up to the given integer. It can take a single or two arguments depending upon the condition you provide.

  • How reflection works in ****

    Note: this is a redacted copy of a blog post published on the internal development blog of a new systems programming language. The name of the project and further details are deliberately being kept in confidence until the initial release. You may be able to find it if you look hard enough — you have my thanks in advance for keeping it to yourself. For more information, see “We are building a new systems programming language”.

    I’ve just merged support for reflection in xxxx. Here’s how it works!

  • Need a New Programming Language? Try Zig

    Maybe you’ve heard of it, maybe you haven’t. Zig is a new programming language that seems to be growing in popularity. Let’s do a quick dive into what it is, why it’s unique, and what sort of things you would use it for. (Ed Note: Other than “for great justice“, naturally.)

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.