To add vertical skew to a canvas-type text using Fabric.js, we first need to create a text object. Next, we can use the "setSkewY" method and pass in the desired degree of skew as a parameter. Finally, we can call the "renderAll" method to update the canvas with the skewed text. Let us first understand what Fabric.js is. What is Fabric.js? Fabric.js is a JavaScript library that allows you to create and manipulate canvas elements in a web page. It provides a variety of objects such as text, images, shapes, and more that can be added to a canvas, ... Read More
To add a third-party library in Deno, we need to import the library from its URL. We can use the "import" statement followed by the URL of the library. It is also possible to use a local file path instead of a URL. The library can then be used in our code by referencing its exported functions or variables. Let us first understand what is Deno.js − What is Deno.js? Deno is a new JavaScript/TypeScript runtime built with V8 JavaScript engine. ... Read More
We first need to install the react-bootstrap and bootswatch packages using npm. Next, we import the desired theme from bootswatch and apply it to our React components using the 'import' and 'className' properties. Lastly, we can easily switch between themes by simply changing the imported theme. Let us first understand what Bootswatch is. What is Bootswatch? Bootswatch is a collection of free and open-source themes for Bootstrap, a popular front-end development framework. The themes are available in various styles, such as material design, flat, and dark mode. Bootswatch themes are easy to install and customize, allowing developers to quickly ... Read More
We can add the target attribute to a link using jQuery by selecting the desired link using a selector, such as the class or id. Then, we can use the .attr() method to add the target attribute and set its value to "_blank". This will ensure that when the link is clicked, it will open in a new tab or window. Let us first understand what jQuery is. jQuery is a JavaScript library that simplifies HTML document traversing, event handling, and animation. It allows for easy manipulation of the Document Object Model (DOM). It also provides several shorthand methods for ... Read More
Introduction The sort command in Linux is a powerful and versatile tool that is used to sort lines of text files in a variety of ways. It can be used to sort files alphabetically, numerically, or in reverse order. It also has the ability to sort based on specific fields within a file, making it a valuable tool for data analysis and manipulation. In this article, we will explore the different options and usage of the sort command. Basic use of sort command The basic syntax for the sort command is pretty simply as follows − $ sort [options] [file...] ... Read More
Introduction The echo command is a fundamental command in Linux that is used to send text or variables to the terminal. It is one of the most basic and essential Linux commands, and mastering it is imperative for beginners to navigate the command line more easily. In this post, we'll take a closer look at the use and advanced features of the echo command. Basic use of echo command The echo command is used to print text to the terminal. It can be used with both single and double quotes, with double quotes allowing the use of variables and special ... Read More
Introduction The wc command, which is short for "word count", is a simple yet powerful tool that allows you to quickly and easily count the number of lines, words, and characters in a file. But the wc command is capable of much more than counting words. In this guide, we'll explore all the features and options available when using the wc command, so you can take full advantage of its capabilities. So, grab a cup of coffee and dive into the world of the Linux wc command. Basic use of the wc command The basic syntax of the wc command ... Read More
Introduction The watch command in Linux is a powerful tool that allows you to execute a program periodically, showing output in fullscreen. This command runs the specified command repeatedly, displaying its output and errors. By default, the specified command runs every two seconds and watch runs until interrupted. In this article, we will explore the various options and uses of the watch command. Syntax of watch command The basic syntax of the watch command is − $ watch [options] command The watch command has several options that can be used to customize its behavior. These include − -d, ... Read More
We can add a tag input in NextJS by creating a new component for the input field and using the onChange event to handle the inputted tags. We can also use the state to store the tags and display them as they are inputted. Finally, we can add a button or function to submit the final tag list. Let us first understand what is ReactJS and Tag Input. ReactJS React is a JavaScript library for building user interfaces. It makes it easy to create interactive UIs. Design simple views for each state in your application, and React will efficiently update ... Read More
Introduction When working with files in the terminal on Linux, there may be times when you want to delete a file but also keep a copy of it just in case. This is where the concept of "soft delete" comes into play. A soft delete allows you to move a file to a designated recycle bin or trash, instead of permanently deleting it. That way, if you accidentally delete a file, you can easily get it back. In this article, we will explore how to delete files from the terminal on Linux using the "trash-put" command. We will also discuss ... Read More