Create Gradient Shadow Using CSS

Jaisshree
Updated on 09-Aug-2023 17:53:41

1K+ Views

As the web is evolving, fabricating beautiful UI is one of the most important jobs to increase customer engagement on websites. One of such ways to improve the look and feel of the frontend is by applying gradient shadow in CSS. Two of the most important ways to apply gradient shadows are linear gradient and radial gradient. Gradient Shadows can be used to get user attention for a specific piece of information, apply hover or focus effects, or provide Web3 look and feel to the website. In this tutorial we are going to analyze both kinds of gradient shadows with ... Read More

Execute a Script Asynchronously in HTML5

Jaisshree
Updated on 09-Aug-2023 17:50:24

480 Views

Script tag is used to make the webpage dynamic, however heavy scripts can result in slow rendering of the webpage which ultimately results in poor user experience. To solve this issue, we asynchronously execute the scripts in the webpage i.e. the javascript is downloaded in parallel with other website elements and starts to execute as soon as it is completed. To load scripts asynchronously two popular approaches used are: Async attribute: The scripts are downloaded in parallel and start to execute as soon as downloading is complete. Defer attribute: The scripts are downloaded in parallel and only starts to ... Read More

10 Python File System Methods You Should Know

Tushar Sharma
Updated on 09-Aug-2023 17:44:29

364 Views

Collaborating with the file organization is a routine undertaking in coding, and Python equips a bountiful collection of instruments to connect with files and folders. In this discourse, we'll unfold ten Python file management functions that you ought to comprehend to streamline your coding endeavors. We'll escort you through each function, illustrating its operations in uncomplicated steps. Initiating and concluding a file Let’s assume example.txt contains the text "Hello, World!".Example doc = open('example.txt', 'r') contents = doc.read() doc.close() print(contents) Output Hello, World! The open() operation accepts two parameters: the file trajectory and the file mode. In ... Read More

Create Nested Dictionary Using a Given List in Python

Atharva Shah
Updated on 09-Aug-2023 17:13:50

1K+ Views

Python dictionaries are flexible data structures that hold key-value pairs effectively. A nested dictionary is a hierarchical data structure to organize and manage large amounts of data. This article shows how to construct a nested dictionary from a given list, enabling dictionary users to perform a variety of tasks. Syntax Nest multiple levels of dictionaries to accommodate complex data structures. nested_dict = { 'outer_key': { 'inner_key': 'value' } } Algorithm 1. Create a new dictionary to contain the layered structure. 2. Go through the given list iteratively. 3. Extract the necessary information for keys and ... Read More

Create Multiple Toolbars in wxPython

Atharva Shah
Updated on 09-Aug-2023 17:12:31

159 Views

In the realm of GUI programming, wxPython has emerged as a powerful and versatile library, empowering developers to craft stunning graphical user interfaces with ease. Among the many essential components, toolbars play a vital role in providing users with quick access to various functionalities. In this tutorial, we'll dive into the art of creating multiple toolbars using wxPython. By the end, you'll be equipped with the knowledge to enhance your GUI applications with multiple toolbars, thereby offering an improved user experience. Installation wxPython Library for GUI Prototyping As a wrapper for the C++ library wxWidgets, wxPython allows ... Read More

Create List of Tuples Using For Loop in Python

Atharva Shah
Updated on 09-Aug-2023 17:09:36

1K+ Views

Python's key data structures are lists and tuples. Once elements of tuples are set they cannot be changed. This is called immutability. But list elements can be modified after initialization. When dealing with data that needs to be grouped together, a for loop is used to create tuple lists. Lists are more adaptable than tuples due to their ability to be modified. This tutorial demonstrates creating a list of tuples using a for loop, simplifying repetitive tasks. Syntax for variable in iterable: # loop code Basic Operations on Tuples Example # Initializing my_tuple = ... Read More

Create a Dictionary of Tuples in Python

Atharva Shah
Updated on 09-Aug-2023 17:07:55

2K+ Views

This walkthrough is all about creating a dictionary of tuples in Python. This data structure stores key-value pairs. By combining dictionaries and tuples, a dictionary of tuples can be created. The benefit is organized and accessible data in a structured format. Becomes easy to represent multiple values for each key, such as student grades or contact information. Let us see how this efficiently stores and retrieves complex data. Syntax Ensure Python is installed on your system for its simplicity and readability. Create a dictionary of tuples using the following syntax: dictionary_name = {key1: (value1_1, value1_2, ...), key2: ... Read More

Convert Characters to ASCII Code Using JavaScript

Jaisshree
Updated on 09-Aug-2023 16:53:01

2K+ Views

ASCII, stands for American Standard Code for Information Interchange which is a method used for encoding characters by assigning them to a specific numerical value. The numerical values thus assigned are known as ASCII codes and are extensively utilized in computer systems to represent various characters including letters, numbers, punctuation marks, and special control characters. Example 1: Using charCodeAt() The following code illustrates a program to receive input character from the user using the ‘charCodeAt()’ function and then display the corresponding ASCII code for that character. Syntax string.charCodeAt(index) Algorithm Step 1 :Start with declaring the HTML tag. Step ... Read More

Convert Canvas Graphics to Image

Jaisshree
Updated on 09-Aug-2023 16:49:44

6K+ Views

HTML canvas graphics provide lots of options to create versatile objects. While working with Canvas you might want to convert the graphics into real images which you can download or print. This article will help you create the graphics and save them on your device. Example Here, we create graphics in javascript Canvas and then converting the graphics to images. In this example, we will create a solid red square and then download it to the device using a button. Algorithm Step 1 :Create the graphics on the canvas. Step 2 :After creating the graphics get the id of ... Read More

Convert DOM NodeList to Array Using JavaScript

Jaisshree
Updated on 09-Aug-2023 16:45:07

805 Views

To write javascript advanced code you can run across instances where you need to convert a DOM (Document Object Model) NodeList to a more adaptable data structure like an array. Although nodelist is just like an array in any programming language. However, it does not contain fever characteristics than an array. You can use Javascript to convert a nodelist into an array to work more appropriately. Example 1 This example provides code to convert a nodelist into an array using javascript. The code uses the nodeListToArray function to perform the conversion. Algorithm Step 1 :Create an array ... Read More

Advertisements