Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Switch statement in Java | Explained

    Switch statement is a decision-driven statement that is used to test a variable/expression against a list of values. These values are referred as cases and the variable will be tested for each case. One switch expression/statement can have multiple cases therefore switch statement can be used to select a specific code block from multiple choices.

  • Fabs() C++
  • C++ timer example
  • C++ std transform
  • C++ round up
  • C++ Infinity
  • Error: Double Free or Corruption
  • How to Print a Vector in C++
  • ERROR: ISO C++ forbids comparison between pointer and integer
  • How to print an array in C++
  • Compare sh Shell vs. Bash

    Any modern UNIX/Linux operating system comes with the sh and the Bash shells installed by default. While both of them are very similar in nature, one offers more than the other.

    This guide will dive deep into the differences and similarities between the sh and the Bash shells.

  • Emacs Plugins That Impressed Me - Invidious

    I have been investigating a lot of Emacs plugins recently, and these are a few of the ones that I thought were both fun and interesting--so much so that I have added these to my Doom Emacs config.

  • Two Sum Problem in Python

    The two sum problem is a version of the subset sum problem and is a common programming question. Although there is a popular dynamic programming solution for the subset sum problem, we can construct an O(n) time approach for the two sum problem. The goal is to identify all the pairs of two numbers that add up to a certain “S” in an unsorted array. This article is about a famous coding task frequently asked in Python interviews.

  • Tkinter OptionMenu

    This article provides a guide on how to utilize the Tkinter Scrollbar fully. This tutorial highlights having a useful Tkinter application containing long lists or a widget that is too big to fit in the application window. In addition, we discussed the Scrollbar widget could be used for said applications.

  • Tkinter Scrollbar

    Python has several options for constructing a graphical user interface. Tkinter is the most widely used GUI technique out of all the options. It’s a Python language interface to the Python-provided Tk GUI toolkit.

    A Scrollbar is a Python Tkinter widget that provides continuous data to be scrolled in a predetermined direction on the screen. The direction can either be horizontal or vertical. Scrollbars are inserted when the content surpasses the screen orientation, allowing the user to travel to unseen material in either a right-to-left or upward-to-downward direction.

  • Tkinter Set Window Size

    When creating a GUI with Tkinter, the size of the window is usually determined by the size and location of the components in the window. However, you can regulate the window size by giving it a specific width and height. The geometry() function on the window with the width and height strings supplied as arguments can be used to change the size of the Tkinter window. In this tutorial, we have provided you with guidelines on how to specify a window size for a Tkinter GUI application in Python.

  • [uniToronto] Python's os.environ is surprisingly liberal in some ways

    The way you access and modify Unix environment variables in Python programs is generally through os.environ; Python 3 being Python 3, sometimes you need os.environb. In Unix, what can go in the environment is somewhat fuzzy and while Python has some issues with character encodings, it's otherwise surprisingly liberal in a number of ways.

  • [MattRickard] Year 2038 Problem

    Many programs have already safeguarded against this by storing Unix timestamps in a 64-bit integer (that kicks the problem 292 billion years into the future), but some legacy programs will inevitably fail in unexpected ways. We'll have a lot more legacy software in 2038 than we did in 2000 (Y2K).

  • [JimNielsen] Things the CSS Spec Folks Got Right

    I read this article which examines why CSS is the way it is from the perspective of a technical director at the W3C.

    It’s easy, in hindsight, to critique things CSS got wrong or should’ve prioritized differently. But I want to take a moment to marvel at the things they got right.

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.