Home » 2022 » June

Remove Page Elements using JavaScript RemoveChild [Examples]

JavaScript removeChild()

The Node.removeChild() method removes HTML Element from the current page via the DOM. This article will show you how to use it. The DOM in JavaScript The HTML DOM (Document Object Model) is the interface which JavaScript uses to interact with HTML page elements, including adding, removing, and modifying on-screen items. It is the data structure which represents every HTML tag present on a page – everything from the root <html> element that wraps the page to every <div>, <p>, <input>, and <span> – everything on the page is represented in the DOM, both … Read more

Home » 2022 » June

Use appendChild() in JavaScript to Add Page Elements [Examples]

JavaScript appendChild()

The Node.appendChild() method adds a new HTML Element to the page (via the DOM). This article will show you how to use it. The DOM in JavaScript The HTML DOM (Document Object Model) is the interface which JavaScript uses to read from and interact with HTML page elements. It’s a data structure which represents every HTML tag present on the page – everything from the root <html> element that wraps your page to every <div>, <p>, <input>, and <em> – everything on the page is represented in the DOM, both content and structure. Each … Read more

Home » 2022 » June

Generate a Hash from String in Javascript, with Examples

JavaScript Hash String

This tutorial will show you a practical way to generate a hash for a string in JavaScript, and provide working code examples you can use in your own project. What is a Hash? A Hash or Checksum is a calculated value with a specific length. By passing a hashing algorithm a string – which can be any length – a calculated hash of a consistent length is returned. Whenever the same string is passed to the hashing algorithm, the same calculated hash should be returned. … Read more

Home » 2022 » June

Pop!_OS on the Raspberry Pi [Review]

Pop!_OS Raspberry Pi Review

Pop!_OS has made it to the Raspberry Pi.  This Linux distribution has become quite popular over the last few years – so how does it perform on the tiny single board computer? Read on to find out. Pop!_OS is a relatively new distribution which aims to provide an out-of-the-box Linux experience appropriate for STEM, creativity, gaming, and general use.  It largely succeeds at all of these (and I’ve used it for various projects), so I am interested to see how it performs on a Raspberry … Read more

Home » 2022 » June

JavaScript setAttribute() Method-What It Is/How to Use It [Examples]

JavaScript setAttribute()

JavaScript was built for adding interactivity to web pages. It can interact with and modify on-screen elements, including their HTML attributes – thats what setAttribute() does. Here’s how to use it. What is the HTML DOM? The HTML DOM (Document Object Model) is the interface which JavaScript uses to read from and interact with HTML page elements. It’s a data structure which represents every HTML tag present on the page – everything from the root <html> element that wraps your page to every <div>, <p>, <input>, and <em> – everything on the page is … Read more

Home » 2022 » June

Linux Tip: Travel Securely with an Encrypted Linux USB Stick

Linux travel USB install

Travel is back. Do you have a plan for what happens if your laptop, with your passwords and banking details and secret projects gets stolen? Read on for a nifty way to mitigate the inconvenience of a lost laptop. Taking Your Laptop on Holiday I often take my laptop on holiday. I really shouldn’t, but sometimes you want to take a break from trekking through cobblestone streets or sitting by the pool. For me, this usually means tinkering away on some kind of code project, … Read more

Home » 2022 » June

Hash Tables/Associative Arrays in JavaScript – How and Why?

JavaScript Hash Tables

JavaScript does not have a native object class called a “hash table” – but that doesn’t mean that the functionality of hash tables doesn’t exist in the language. Here’s how to use hash tables in JavaScript, with working example code. What is a Hash Table? Also known as hash maps, hash tables are a data structure which maps a list of keys to a list of corresponding values for each key. Any value in the table can be retrieved by accessing it through the associated key. … Read more

Home » 2022 » June

LinuxScrew’s Linux Shell/Bash Scripting Tips

Bash script hot tips

Here are some handy tips to keep in mind when writing your shell scripts in Linux. Shell scripts are a versatile way to automate your workflows in Linux (and MacOS, and now Windows, with the Windows Subsystem for Linux). Shell scripting syntax and behaviour does have its quirks, and there are useful shortcuts you can take as well to simplify your scripts. Bash Scripting Tips These tips are collected from around the internet, with a few of my own thrown in. Bash scripts will keep … Read more

Home » 2022 » June

How to Generate the Fibonacci Sequence of Numbers in Python

Python fibonacci sequence

This quick tutorial will show you how to generate the Fibonacci sequence of numbers in Python. This is a useful example for new coders and those just learning Python as it shows how variables, loops, and arithmetic are used in Python. What is the Fibonacci Sequence The Fibonacci sequence is a procession of numbers in which each number is the sum of the preceding two numbers. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144… Above, the first 13 numbers in the Fibonacci … Read more

Home » 2022 » June

Linux Tip: Free Self Hosted Cloud Desktops Using Linux and TailScale

Free cloud desktops

This article will show you how to build your own cloud desktop environment. Virtual desktops have become a popular way to make your work space portable. You can leave all of your applications running in the cloud, and log into your desktop from anywhere and resume work. Here’s how you can build your own cloud desktops, for free. Google, Amazon, Microsoft, and other vendors all provide cloud-based virtual desktop solutions, but the costs can quickly add up. By using a VPN and some virtualisation software, … Read more