Install NetBeans IDE on Ubuntu 20.04

In this tutorial, we will cover how to install NetBeans IDE on Ubuntu 20.04. NetBeans IDE is a free and open source extensible Java IDE (Integrated

How to copy paste lines in vim

How to copy paste lines in vim

Follow this tutorial to learn how to copy paste lines in vim. VIM, an acronym for Vi iMproved, is a highly configurable text editor built

document.addEventListener("DOMContentLoaded", function() { document.querySelectorAll(".scroll-box").forEach(function(box) { box.style.position = "relative"; // Needed for absolute positioning of button var button = document.createElement("button"); button.className = "copy-icon-btn"; button.setAttribute("aria-label", "Copy code"); button.innerHTML = ''; box.appendChild(button); button.addEventListener("click", function() { var text = box.innerText; navigator.clipboard.writeText(text).then(function() { button.querySelector("svg").setAttribute("fill", "#4CAF50"); setTimeout(function() { button.querySelector("svg").setAttribute("fill", "white"); }, 1500); }).catch(function(err) { console.error("Copy failed: ", err); }); }); }); });