Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
What is the difference between $(window).load() and $(document).ready() functions in jQuery?
Both the methods are used in jQuery. Let’s see what purpose they fulfill.$(window).load()The code which gets included inside $( window ).on( "load", function() { ... }) runs only once the entire page is ready (not only DOM).Note: The load() method deprecated in jQuery version 1.8. It was completely removed in version 3.0. To see its working, add jQuery version for CDN before 3.0.$(document).ready()The ready() method is used to make a function available after the document is loaded. Whatever code you write inside the $( document ).ready() method will run once the page DOM is ready to execute JavaScript code.You can ...
Read MoreHow to find the row and column position of a value as vector in an R matrix?
To find the row and column position of a value as vector in an R matrix, we can follow the below steps −First of all, create a matrix.Then, find the row and column position of a particular value using which function and reading the output with as.vector function.Example 1Create a matrixLet's create a matrix as shown below −M1
Read MoreHow to divide data frame rows in R by row maximum?
To divide the data frame row values by row maximum in R, we can follow the below steps −First of all, create a data frame.Then, use apply function to divide the data frame row values by row maximum.Create the data frameLet's create a data frame as shown below −x
Read MoreHow to print string vectors vertically in R?
To print string vectors vertically in R, we can follow the below steps −First of all, create a vector.Then, use cat function to print the vector vertically.Example 1 Let's create a vector as shown below −Alphabets
Read MoreHow to get the pixel height of a character in the specified font using the imagefontheight() function in PHP?
imagefontheight() is an inbuilt function in PHP that is used to get the pixel height of a character in the specified font.Syntaxint imagefontheight(int $font)Parametersimagefontheight() takes one parameter, $font. It holds the font value. The $font values can be 1, 2, 3, 4, and 5 for the built-in fonts or it can be used by using imageloadfont() function for custom fonts.Return Valuesimagefontheight() returns the pixel height of the font.Example 1OutputFont height: 13Example 2OutputFont height for the font value 1 is 8 Font height for the font value 2 is 13 Font height for the font value 3 is 13 Font height ...
Read MoreC program to print Excel column titles based on given column number
ProblemA program to print Excel column title that corresponds to a given column number (integer value). User has to enter the integer number based on given number it has to print excel column number.SolutionThe solution to print Excel column title that corresponds to a given column number in C programming language is explained below −Example 1Let us see an example.1 -> A 2 -> B ... 26 -> Z 27 -> AA 28 -> AB ...Example 2The input is as follows −number = 3 number = 27 number = 151The output is as follows −Excel column title: C Excel column ...
Read MoreHow to get the pixel width of a character in the specified font using the imagefontwidth() function in PHP?
imagefontwidth() is an inbuilt function in PHP that is used to get the pixel width of a character in the specified font.Syntaxint imagefontwidth(int $font)Parametersimagefontwidth() takes only one parameter, $font. It holds the font value. The $font values can be 1, 2, 3, 4, and 5 for the built-in fonts or it can be used by using imageloadfont() function for custom fonts.Return Valuesimagefontwidth() returns the pixel width of the font.Example 1OutputFont width: 7Example 2OutputFont width for the font value 1 is 5 Font width for the font value 2 is 6 Font width for the font value 3 is 7 Font ...
Read MoreC program to insert a node at any position using double linked list
Linked lists use dynamic memory allocation and are collection of nodes.Nodes have two parts which are data and link.Types of Linked ListsThe types of linked lists in C programming language are as follows −Single / Singly linked lists.Double / Doubly linked lists.Circular single linked list.Circular double linked list.Double linked listThe diagram given below depicts the representation of double linked list.ExampleFollowing is the C program to insert a node at any position using double linked list −#include #include struct node { int num; struct node * preptr; struct node * nextptr; }*stnode, *ennode; void DlListcreation(int n); ...
Read MoreHow to copy the palette from one image to another using imagepalettecopy() function in PHP?
imagepalettecopy() is an inbuilt PHP function that is used to copy the palette from one image to another. This function copies the palette from the source image to the destination image.Syntaxvoid imagepalettecopy(resource $destination, resource $source)Parametersimagepalettecopy() accepts two parameters − $source and $destination.$destination − Specifies the destination image resource.$source − Specifies the source image resource.Return Valuesimagepalettecopy() retuns no values.Example 1OutputExample 2OutputColors in image 1 are 1 Colors in image 2 are 1
Read MorePython Program to Filter Rows with a specific Pair Sum
When it is required to filter rows with a specific pair sum, a method is defined. It checks to see if elements in a specific index is equal to key, and returns output based on this.Below is a demonstration of the same −Exampledef find_sum_pair(val, key): for index in range(len(val)): for ix in range(index + 1, len(val)): if val[index] + val[ix] == key: return True return False my_list = [[71, 5, 21, 6], [34, 21, 2, 71], [21, 2, 34, 5], [6, 9, 21, ...
Read More