Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • Check if a File Exists Using Python - Pi My Life Up

    If you plan on using files in your Python script, you will likely want to check whether the file exists before performing any file operations. Luckily, checking if a file exists is straightforward in Python, thanks to the pathlib and os modules.

  • Use of PERL substr() Function

    “PERL substr() function is mainly used to cut the particular portion of the main string. This function can also be used for replacing the portion of the main string with another string. Different ways to cut or cut and replace a particular portion of the string have been shown in this tutorial by using the PERL script.”

  • Use of PERL join() Function

    “The join() is a built-in function of PERL that is used to create a string value by combining multiple string values or the array values with a specific string value. The joining string value will be added between two values of the array. Different uses of the join() function have been shown in this tutorial.”

  • Use of PERL glob() Function

    “PERL glob() function is mainly used to retrieve all content or the particular content of a directory. The regular expression pattern can be used with this function to match the particular files and folders of a directory. Different symbols are used to define the pattern that will be used to retrieve the content of the current directory or the specific directory. The uses of the glob() function without pattern and with the pattern have been shown in this tutorial.”

  • Uppercase in R

    You may need to convert or modify a string to uppercase at some point. All lower case letters will be changed to capital letters. To transform a string or character to uppercase in R, use the toupper() method. This method is used to convert full strings to uppercase format. When we call the toupper() method, the return value is in string format and has been transformed to uppercase. If there isn’t one, the values are turned into a string. When we set this to a value that is not a string, the toupper() function does not affect the initial string values. For different case scenarios, you could use toupper() and other methods on the String to transform String to uppercase. In this topic, we will explore how to alter the case of a string to uppercase.

  • String Contains in R

    “The string allows you to access the series’ values as strings and implement a variety of methods on them. The str_contains() method is used to see if a string of a Sequence or Index contains a pattern or regex. If a provided pattern or regex is included inside a string of a Sequence or Index, the method returns a boolean Sequence or Index. This function is sensitive to cases by default. We can also utilize the contains methods with the select command. In R, there is a method called contains(). The string is an object method used to determine whether the string object includes the supplied string object and gives a Boolean response of True or False. In this article, we will explore more about the string contains() method in R language through various instances.”

  • Remove Columns in R

    “A Data Frame will frequently contain columns that aren’t relevant to your investigation. To make it easier to emphasize the remaining columns, such columns must be removed from the Data set. By supplying label names and related axes or by directly defining index or column names, the columns can be eliminated. Labels on multiple stages can be removed using a multi-index by designating the level.

    In R, you may occasionally need to eliminate one or multiple specified columns from a data frame. Fortunately, there is some built-in method from the R module that makes that simple. Dropping columns from a data set is simply a method of removing unnecessary columns from the data frame. In this post, we will look at various distinct methods for removing columns by title from a Data set in R.”

  • R – with() and within() Functions

    In this R tutorial, we will discuss with() and within() functions performed on the data frame.

    Let’s create a data frame with four rows and five columns.

  • Game of Trees 0.74 released

    For those who have been paying attention to the Game of Trees development list, there has been a lot going on with got(1). Apologies here at undeadly for having missed some release announcements!

  • Build Design Thinking into your team processes

    Teams require some kind of process to coordinate work and ensure that the output of many focuses on a singular goal. Within the software industry, this has taken the form of teams following a methodology such as Agile. In industries from pharmaceutical to manufacturing, Lean is the philosophy followed to ensure that a process is adhered to. The difficulty with a process is that it's prescriptive. It's designed in such a way that you stay on the tracks that it provides. If you do, you achieve the prescribed benefits and ultimately a form of success. That doesn't give much room for paradigm-level shifts in work behavior.

    In early 2020, one such shift hit the global workplace in the form of COVID-19. Many companies self-enforced a remote strategy as people were forced to adapt to working from home. Years later, that flexibility is here to stay. This disruptor has brought new challenges in how we facilitate our process, and the ceremonies associated with it. The engagement paradigm of trying to bring people together on a problem, and to keep them attentive, productive, and happy is challenging when your interaction medium is limited to the screenspace a person is using. Engagement through a camera lens masks the environmental conditions that could also be hampering participation, from suboptimal work space conditions to barking dogs, crying kids, or noisy neighbors. When you throw in the natural distractions that working on a computer can bring (instant messaging, emails, social media, cat memes, and more) the conditions for collaboration, innovation, and problem solving tends to suffer. Combining all of those elements gives you a perfect storm, especially when you ask a human to concentrate on just one topic for a prolonged period of time.

  • Java SE 6 and 7 devs weigh their options as support ends • The Register

    Oracle Java Development Kit 6 and 7 support ends this week, leaving a sizable chunk of developers looking at their options.

    Around 15 percent of Java developers still use JDK 7, according to a survey by JRebel, which produces its own code development environment. That being the case, around a million developers could end up without software patches and security updates, potentially risking reliability, security, and productivity.

    Java SE 7 was the first release of the popular development environment since Oracle inherited the object-oriented language via the $7.4 billion acquisition of Sun Microsystems.

More in Tux Machines

today's howtos

  • How to Change Comment Color in Vim – Fix Unreadable Blue Color

    Are you annoyed about the comment color in vim? The dark blue color of the comment is often hard to read. In this tutorial, we learn how to change the comment color in Vim. There are few methods we can use to look vim comment very readable.

  • How to Add Repository to Debian

    APT checks the health of all the packages, and dependencies of the package before installing it. APT fetches packages from one or more repositories. A repository (package source) is basically a network server. The term "package" refers to an individual file with a .deb extension that contains either all or part of an application. The normal installation comes with default repositories configured, but these contain only a few packages out of an ocean of free software available. In this tutorial, we learn how to add the package repository to Debian.

  • Making a Video of a Single Window

    I recently wanted to send someone a video of a program doing some interesting things in a single X11 window. Recording the whole desktop is easy (some readers may remember my post on Aeschylus which does just that) but it will include irrelevant (and possibly unwanted) parts of the screen, leading to unnecessarily large files. I couldn't immediately find a tool which did what I wanted on OpenBSD [1] but through a combination of xwininfo, FFmpeg, and hk I was able to put together exactly what I needed in short order. Even better, I was able to easily post-process the video to shrink its file size, speed it up, and contort it to the dimension requirements of various platforms. Here's a video straight out of the little script I put together: [...]

  • Things You Can And Can’t Do

    And it got me thinking about what you can and can’t do — what you do and don’t have control over.

  • allow-new-zones in BIND 9.16 on CentOS 8 Stream under SELinux

    We run these training systems with SELinux enabled (I wouldn’t, but my colleague likes it :-), and that’s the reason I aborted the lab: I couldn’t tell students how to solve the cause other than by disabling SELinux entirely, but there wasn’t enough time for that.

  • Will the IndieWeb Ever Become Mainstream?

    This is an interesting question, thanks for asking it, Jeremy. I do have some history with the IndieWeb, and some opinions, so let’s dive in.

    The short answer to the question is a resounding no, and it all boils down to the fact that the IndieWeb is really complicated to implement, so it will only ever appeal to developers.

  • How to Install CUPS Print Server on Ubuntu 22.04

    If your business has multiple personal computers in the network which need to print, then we need a device called a print server. Print server act intermediate between PC and printers which accept print jobs from PC and send them to respective printers. CUPS is the primary mechanism in the Unix-like operating system for printing and print services. It can allow a computer to act as a Print server. In this tutorial, we learn how to set up CUPS print server on Ubuntu 22.04.

Open Hardware: XON/XOFF and Raspberry Pi Pico

  • From XON/XOFF to Forward Incremental Search

    In the olden days of computing, software flow control with control codes XON and XOFF was a necessary feature that dumb terminals needed to support. When a terminal received more data than it could display, there needed to be a way for the terminal to tell the remote host to pause sending more data. The control code 19 was chosen for this. The control code 17 was chosen to tell the remote host to resume transmission of data.

  • Raspberry Pi Pico Used in Plug and Play System Monitor | Tom's Hardware

    Dmytro Panin is at it again, creating a teeny system monitor for his MacBook from scratch with help from our favorite microcontroller, the Raspberry Pi Pico. This plug-and-play system monitor (opens in new tab) lets him keep a close eye on resource usage without having to close any windows or launch any third-party programs. The device is Pico-powered and plugs right into the MacBook to function. It has a display screen that showcases a custom GUI featuring four bar graphs that update in real-time to show the performance of different components, including the CPU, GPU, memory, and SSD usage. It makes it possible to see how hard your PC is running at a glance.

Security Leftovers

How to Apply Accent Colour in Ubuntu Desktop

A step-by-step tutorial on how to apply accent colour in Ubuntu desktop (GNOME) with tips for Kubuntu and others. Read more