Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • Bash declare an empty array

    An array is a container that stores the values of a similar data type. The storage process deals with entering the values at any index of the array, and the index of the array accesses that value. Whenever you declare an array, you have two options. Either assign the values at the time of declaration or enter the values when they are needed dynamically. In this guide, we have experienced both approaches. To perform this function in bash, you need to create an environment of the Linux operating system where you can access the terminal and other applications of user privileges.

    To perform operations on array in bash, you need to install bash on Linux operating system. By installing the packages, it is already installed in the system. The version of bash should be greater than 4 to continue this guide further. If it is less than 4, you need to install the latest bash version or at least 4. Execute the command on the Linux terminal to check the version.

  • Bash loop through files in a directory

    In Ubuntu, including Bash, loops have made it possible to apply operations on multiple files. Looping is the most effective thing as it allows the user to apply the same logic to the item repeatedly by using a small code-line.

    To understand the concept of looping over files in the directory, you need access to the Ubuntu application and services. When you have some privileges, you can only operate with files and directories.

    You should have installed Bash on Ubuntu operating system. In some installations, it is installed by default in the updation of packages. If it is already installed, you need to upgrade the version because it must be above 4. To continue the current guide, you need to keep the version above 4. To check the version of the pre-installed Bash in your system, use the command on the Ubuntu terminal.

  • Bash print array with newlines

    An array is a container containing the same data type items, either integer type or float type. We can deal with arrays by performing several operations on them. One commonly used Delima is to break the array and print each word on a new line. This feature is discussed in today’s article. To understand this concept, you need to access a Ubuntu terminal to perform bash-related terms on Ubuntu. We have covered the topic from simplest to critical samples for the understanding of the user.

  • Pyston Team Joins Anaconda

    We have some very exciting news to announce today: we (Marius and Kevin) are joining Anaconda! Anaconda is a well-known company that produces open-source Python software, and we think that by joining them we can significantly accelerate the trajectory of Pyston, our faster implementation of Python.

  • Pyston Developers Join Anaconda To Continue Their Speedy Python Implementation

    Pyston began many years ago as an open-source JIT-based Python implementation developed by Dropbox. But after Dropbox dropped Pyston development, it went dormant for several years before the developers decided to create their own start-up around it and released Pyston 2.0. The Pyston developers are now joining well known Python organization Anaconda.

  • JavaScript Loops – A Guide for Absolute Beginners

    n computing, almost all programming languages support the idea of loops. In computing, loops are a set of instructions that allow the programmer to do something repeatedly in a quick and efficient manner. Loops iterate/repeatedly execute through a block of code until a certain condition is met.

    All high-level programming languages provide several different types of loops. The syntax of these loops may be different but they are used to perform the same tasks. These loops are interchangeable but some are specifically built to be used in some specific conditions.

  • A Candid explainer: Safe higher-order upgrades – Blog – Joachim Breitner's Homepage

    A central idea behind Candid is that services evolve over time, and so also their interfaces evolve. As they do, it is desirable to keep the interface usable by clients who have not been updated. In particular on a blockchainy platform like the Internet Computer, where some programs are immutable and cannot be changed to accommodate changes in the interface of the services they use, this is of importance.

    Therefore, Candid defines which changes to an interface are guaranteed to be backward compatible. Of course it’s compatible to add new methods to a service, but some changes to a method signature can also be ok.

  • Guide to C++ Serialization

    Serialization converts an object into a stream of bytes to be stored in the disk or sent to another computer through a network. There are two kinds of objects in C++: fundamental objects and objects instantiated from a defined class. Note, in C++, the struct is considered a class, and the name of a struct represents the instantiated object of the struct.

    Individual fundamental objects are not normally serialized. However, since an instantiated object has fundamental objects, as the whole object is serialized, the fundamental objects are also serialized. In C++, all data structures, such as the vector, are predefined classes.

    Serialization is also called marshaling. The opposite of serialization is deserialization or unmarshalling. The serialized object as a file from the disk or the network can be converted back (resurrected) to the object at the local computer to be used with the local C++ application (program).

  • How to Use C++ fstream

    The fstream term stands for File Stream. Stream refers to a sequence of characters moving from the disk to the C++ program or from the C+ program to the disk. Moving characters from a file in disk to the program is inputting. Moving characters from the program to a file in the disk is outputting. Input-file-stream abbreviated as ifstream is structured by the template class, basic_ifstream. Output-file-stream abbreviated, ofstream is structured by the template class, basic_ofstream.

    It is possible for inputting and outputting to take place in one session. This is made possible by the class template, basic_fstream. Now, fstream is a synonym for basic_fstream. fstream, which is still basic_fstream, uses basic_ifstream and ofstream to operate.

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.