Articles on Trending Technologies

Technical articles with clear explanations and examples

JavaScript knowledge required for GTM (Google Tag Manager)

Rushi Javiya
Rushi Javiya
Updated on 30-Sep-2024 832 Views

The Google Tag Manager is a tag management system that allows you to configure and rapidly deploy tags on your website or mobile app using a simple web-based interface. It has the same capabilities as the Google Tag, a JavaScript library used to send data from your website to Google Analytics. Tag Manager also supports tag version management and organization, community and third-party-developed tag templates, enterprise collaboration tools, and security features. JavaScript for Google Tag Manager Before you start using the Google Tag Manager, the following JavaScript topics are necessary for you to learn − Basic Syntax of ...

Read More

Java program to check order of characters in string

Shriansh Kumar
Shriansh Kumar
Updated on 30-Sep-2024 2K+ Views

You are given a String, your task is to write a program in Java that checks the order of its characters. If the order is previously defined, you have to check if the characters are in the given order otherwise check for alphabetical order. Let's understand the problem statement with an example − Example Scenario: Input: str = "abcmnqxz"; Output: res = TRUE The given string is in alphabetical order. Using Iteration In this approach, use a for loop to iterate over the string and check if the value of character at the current place and the previous ...

Read More

JavaScript Sum odd indexed and even indexed elements separately and return their absolute difference

Nikitasha Shrivastava
Nikitasha Shrivastava
Updated on 30-Sep-2024 1K+ Views

For a given list of elements, write a JavaScript program to find the sum of its odd and even indexed elements and then, calculate difference between them. To solve this problem, we will first separate odd indexed and even indexed elements. After separating them find their sum separately and store it in different variables. Now, we will calculate the difference between these sums to get desired result. Example Scenario: Input: list = [11, 21, 31, 41, 51, 61]; Output: difference = 30 Here, odd-indexed items are [21, 41, 61] and their sum is 123. The even-indexed items are ...

Read More

JavaScript function to take a number n and generate an array with first n prime numbers

Shriansh Kumar
Shriansh Kumar
Updated on 30-Sep-2024 2K+ Views

We are required to write a JavaScript function that takes in a number n and returns an array that contains first n prime numbers. We know that prime numbers are those numbers that are only divisible by 1 and themselves like 2, 3, 19, 37, 73 etc. Let's understand the problem with an example − Input: n = 6; Output: prime_numbers = [ 2, 3, 5, 7, 11, 13 ] Using Iteration We will first write a function that checks whether a given number is prime or not and then run a loop till the given number n ...

Read More

Shimmer Effect using CSS

Shubham Vora
Shubham Vora
Updated on 30-Sep-2024 9K+ Views

To create shimmer effect using CSS, we will be using CSS animations and linear-gradient properties. Shimmer effect is an animation effect used in many webpages while loading the web page. In this article we are having a layout of a box having two other child boxes, our task is to create a shimmer effect using CSS. Steps to Create Shimmer Effect We will be following below mentioned steps to create shimmer effect using CSS. We are having two boxes wrapped inside a div container. The container class sets the dimension of ...

Read More

Telematics - Definition, Tools, Applications and Examples

Shirjeel Yunus
Shirjeel Yunus
Updated on 30-Sep-2024 844 Views

What is Telematics? Telematics is a combination of two technologies which include telecommunications and informatics. Telecommunications includes phone lines and cables while computer systems are included in informatics. The telematics technology is used in commercial fleet vehicles. The data is transmitted during the vehicle movement with the help of wireless telematics devices and black box technologies. The data that is transmitted include − Usage of the vehicle Maintenance Servicing Fleet management can also be performed with the help of telematics. The technology can be used to get the knowledge of vehicles in the entire fleet related to their ...

Read More

How to Render an HTML String Preserving Spaces and Line Breaks?

Tanya Sehgal
Tanya Sehgal
Updated on 30-Sep-2024 413 Views

Sometimes while writing the content of an HTML file, there might be the need to preserve blank spaces and line breaks. You might have noticed when you try to write something in the paragraph tag or the tag that has a lot of white spaces or a line break, it is not visible when the HTML page is rendered in the web browser. This article will show how to preserve those spaces while rendering the HTML page. Render an HTML String Preserving Spaces and Line Breaks Using HTML pre Tag ...

Read More

Java regex to exclude a specific String constant

Arnab Chakraborty
Arnab Chakraborty
Updated on 29-Sep-2024 2K+ Views

In this program, we will use a regular expression to check if a given string does not contain the substring "kk" using Java. The regular expression ^((?!kk).)*$ is designed to match strings that do not include the "kk" pattern anywhere in the string. The program will evaluate a sample string and print whether or not it contains "kk". Problem Statement Write a program in Java for checking whether a given string contains the substring "kk." If the string does not contain "kk" the program will return true otherwise it will return false. Input String s = "tutorials" Output true ...

Read More

Java program to find longest common prefix using word by word matching

Prabhdeep Singh
Prabhdeep Singh
Updated on 29-Sep-2024 1K+ Views

In this article, we will explore how to find the longest common prefix among a given set of strings using two different approaches in Java. We will first discuss an approach that compares all strings directly to find the longest prefix and then move to a word-by-word matching approach.  Problem Statement We are given a set of strings and we have to find the common prefix among all of them. A prefix is a substring for a string that contains the zero index and could be of any length from 1 to a complete string. Input 1 string arr[] = ...

Read More

Java sql.Date setTime() method with example.

Arushi
Arushi
Updated on 29-Sep-2024 1K+ Views

In this program, we will connect to a MySQL database using JDBC, insert a new record into the dispatches table, and retrieve all records from the table. The setTime() method from Date class of java.util package that accepts a variable of long type, representing the number of milliseconds from the epoch time (January 1, 1970, 00:00:00.000 GMT) to the required time, and sets the specified time value to the current Date object. //Setting time date.setTime(time_value_in_long); The goal of the program is to demonstrate how to interact with a database using JDBC and handle Date and Time objects in Java. ...

Read More
Showing 2531–2540 of 61,248 articles
« Prev 1 252 253 254 255 256 6125 Next »
Advertisements