title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python – Convert HTML Characters To Strings | 08 Dec, 2020
Prerequisites: html module
Given a string with HTML characters, the task is to convert HTML characters to a string. This can be achieved with the help of html.escape() method(for Python 3.4+), we can convert the ASCII string into HTML script by replacing ASCII characters with special characters by using ht... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 55,
"s": 28,
"text": "Prerequisites: html module"
},
{
"code": null,
"e": 355,
"s": 55,
"text": "Given a string with HTML characters, the task is to convert HTML characters to a ... |
Types of Routing | 20 Oct, 2021
Routing is a process that is performed by layer 3 (or network layer) devices in order to deliver the packet by choosing an optimal path from one network to another.
There are 3 types of routing:
1. Static routing – Static routing is a process in which we have to manually add routes to the routing table.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Routing is a process that is performed by layer 3 (or network layer) devices in order to deliver the packet by choosing an optimal path from one network to another. "
},
... |
Object Detection with Detection Transformer (DETR) by Facebook | 14 Feb, 2022
Facebook has just released its State of the art object detection Model on 27 May 2020. They are calling it DERT stands for Detection Transformer as it uses transformers to detect objects.This is the first time that transformer is used for such a task of Object detection along with a Convolutional Neural ne... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 1863,
"s": 52,
"text": "Facebook has just released its State of the art object detection Model on 27 May 2020. They are calling it DERT stands for Detection Transformer as it uses transformers to d... |
Python | numpy.isin() method | 27 Sep, 2019
With the help of numpy.isin() method, we can see that one array having values are checked in a different numpy array having different elements with different sizes.
Syntax : numpy.isin(target_array, list)
Return : Return boolean array having same size as of target_array.
Example #1 :
In this example we can... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 193,
"s": 28,
"text": "With the help of numpy.isin() method, we can see that one array having values are checked in a different numpy array having different elements with different sizes."
},
{
... |
Ruby | Array dig() operation | 08 Jan, 2020
Array#dig() : dig() is a Array class method which extracts the specific element out of the high dimension sequences.
Syntax: Array.dig()
Parameter: element position.
Return: element from a specific location in sequence, returning nil if any intermediate step is nil.
Code #1 : Example for dig() method
# Rub... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2020"
},
{
"code": null,
"e": 145,
"s": 28,
"text": "Array#dig() : dig() is a Array class method which extracts the specific element out of the high dimension sequences."
},
{
"code": null,
"e": 165,
"s": 145,
... |
Path resolve() method in Java with Examples | 07 Apr, 2022
resolve() method of java.nio.file.Path used to resolve the given path against this path.
There are two types of resolve() methods.
resolve(String other) method of java.nio.file.Path used to converts a given path string to a Path and resolves it against this Path in the exact same manner as specified by the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Apr, 2022"
},
{
"code": null,
"e": 142,
"s": 53,
"text": "resolve() method of java.nio.file.Path used to resolve the given path against this path."
},
{
"code": null,
"e": 184,
"s": 142,
"text": "There are two ty... |
Compare sequences in Python using dfflib module | 24 Feb, 2021
The dfflib Python module includes various features to evaluate the comparison of sequences, it can be used to compare files, and it can create information about file variations in different formats, including HTML and context and unified diffs.
It contains various classes to perform various comparisons bet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 273,
"s": 28,
"text": "The dfflib Python module includes various features to evaluate the comparison of sequences, it can be used to compare files, and it can create information about file variation... |
Check whether the string can be printed using same row of qwerty keypad | 11 Jun, 2021
Given a string S, the task is to check whether the string can be typed using only a single row of the qwerty keyboard.
Examples:
Input: S = “Dad” Output: Yes Explanation: Characters “D” and “a” are present in the same row of qwerty keypad. That is second Row.Input: S = “Mom” Output: No Explanation: Chara... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 148,
"s": 28,
"text": "Given a string S, the task is to check whether the string can be typed using only a single row of the qwerty keyboard. "
},
{
"code": null,
"e": 159,
"s": 148,... |
How to Set Column Names within the aggregate Function in R | 14 Sep, 2021
In this article we will discuss how to set column names with the aggregate function in R programming language.
The aggregate method in base R is used to divide the data frame into smaller subsets and compute a summary statistics for each of the formed groups. The function to be applied can be sum, mean, mo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 139,
"s": 28,
"text": "In this article we will discuss how to set column names with the aggregate function in R programming language."
},
{
"code": null,
"e": 445,
"s": 139,
"tex... |
Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration | 25 May, 2022
VRRP is an open standard protocol, which is used to provide redundancy in a network. It is a network layer protocol (protocol number-112). The number of routers (group members) in a group acts as a virtual logical router which will be the default gateway of all the local hosts. If one router goes down, one... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 432,
"s": 28,
"text": "VRRP is an open standard protocol, which is used to provide redundancy in a network. It is a network layer protocol (protocol number-112). The number of routers (group members... |
Sum of the series 1.2.3 + 2.3.4 + ... + n(n+1)(n+2) | 20 Apr, 2021
Find the sum up to n terms of the series: 1.2.3 + 2.3.4 + ... + n(n+1)(n+2). In this 1.2.3 represent the first term and 2.3.4 represent the second term .Examples :
Input : 2
Output : 30
1.2.3 + 2.3.4 = 6 + 24 = 30
Input : 3
Output : 90
Simple Approach We run a loop for i = 1 to n, and find the sum of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Find the sum up to n terms of the series: 1.2.3 + 2.3.4 + ... + n(n+1)(n+2). In this 1.2.3 represent the first term and 2.3.4 represent the second term .Examples : "
},
... |
Multivariate Regression | 12 Feb, 2018
Prerequisite Article-Machine Learning
The goal in any data analysis is to extract from raw information the accurate estimation. One of the most important and common question concerning if there is statistical relationship between a response variable (Y) and explanatory variables (Xi). An option to answer t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Feb, 2018"
},
{
"code": null,
"e": 92,
"s": 54,
"text": "Prerequisite Article-Machine Learning"
},
{
"code": null,
"e": 547,
"s": 92,
"text": "The goal in any data analysis is to extract from raw information the ... |
Ripple Effect on Android Button | 19 Feb, 2021
The touch feedback in Android is a must whenever the user clicks on the item or button ripple effect when clicking on the same, gives confidence to the user that the button has been clicked so that they can wait for the next interaction of the app. So in this article, we are going to discuss what type of r... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 483,
"s": 52,
"text": "The touch feedback in Android is a must whenever the user clicks on the item or button ripple effect when clicking on the same, gives confidence to the user that the button h... |
How to use Checkboxes in ReactJS? | 18 Jan, 2021
A Checkbox is a GUI widget that allows the user to make a binary choice from the given options. It is very useful when the user can select from the given options only. Material UI for React has this component available for us and it is very easy to integrate.
Creating React Application And Installing Modul... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "A Checkbox is a GUI widget that allows the user to make a binary choice from the given options. It is very useful when the user can select from the given options only. Materia... |
Level of Each node in a Tree from source node (using BFS) | 11 Nov, 2021
Given a tree with v vertices, find the level of each node in a tree from the source node.Examples:
Input :
Output : Node Level
0 0
1 1
2 1
3 2
4 2
5 2
6 2
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 153,
"s": 52,
"text": "Given a tree with v vertices, find the level of each node in a tree from the source node.Examples: "
},
{
"code": null,
"e": 164,
"s": 153,
"text": "Inpu... |
p5.js | lerp() Function | 25 Mar, 2020
The lerp() function is used to find a number between two numbers. The amt parameter can be used to specify the amount to interpolate between the two values. An amount nearer to 0.1 would mean that the final value is nearer to the first value, and nearer to 0.9 means that the value is nearer to the second v... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Mar, 2020"
},
{
"code": null,
"e": 469,
"s": 28,
"text": "The lerp() function is used to find a number between two numbers. The amt parameter can be used to specify the amount to interpolate between the two values. An amount nearer t... |
Switch Case in Python (Replacement) | 13 Jun, 2022
What is the replacement of Switch Case in Python?
Unlike every other programming language we have used before, Python does not have a switch or case statement. To get around this fact, we use dictionary mapping.
Python3
# Function to convert number into string# Switcher is dictionary data type heredef numb... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 102,
"s": 52,
"text": "What is the replacement of Switch Case in Python?"
},
{
"code": null,
"e": 264,
"s": 102,
"text": "Unlike every other programming language we have used be... |
Find the Mobile Number formed using first digits of arrays of absolute differences of consecutive numbers | 21 Jun, 2022
Given a String ph[], the task is to find a new number for the user, based on following conditions:
The new number will also start from the same digit as of original number.The digits of the new number will be the first digits of a series of arrays of absolute differences of the consecutive elements.
The ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 155,
"s": 54,
"text": "Given a String ph[], the task is to find a new number for the user, based on following conditions: "
},
{
"code": null,
"e": 357,
"s": 155,
"text": "The ... |
Function that takes an interface type as value and pointer in Golang | 17 May, 2020
Functions are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, provides better readability of the code. So basically, a function is a collection of st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 488,
"s": 28,
"text": "Functions are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive use of memory... |
gcc command in Linux with examples | 21 Nov, 2021
GCC stands for GNU Compiler Collections which is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++. The most important option required while compiling a source code file is the name of the source program, rest every argument is optional like a warning, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Nov, 2021"
},
{
"code": null,
"e": 512,
"s": 52,
"text": "GCC stands for GNU Compiler Collections which is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++. The most important o... |
jQuery querySelector() Vs querySelectorAll() Methods | 23 Dec, 2020
querySelector() and querySelectorAll() are two jQuery functions which helps the HTML elements to be passed as a parameter by using CSS selectors (‘id’, ‘class’) can be selected.
querySelector() Method: The querySelector() method returns the first element within the document which matches a specified CSS se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "querySelector() and querySelectorAll() are two jQuery functions which helps the HTML elements to be passed as a parameter by using CSS selectors (‘id’, ‘class’) can be selecte... |
K’th Smallest/Largest Element using STL | 14 Jun, 2022
Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. Examples:
Input : arr[] = {7, 10, 4, 3, 20, 15}
k = 2
Output : 4
Smallest element is 3. Second smallest
is 4.
Input : arr[] = {7, 10, 4, 3, 3, 15}
k = ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 193,
"s": 52,
"text": "Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. Examples:"
},
{
"code": null,
"... |
Sort an Array which contain 1 to N values in O(N) using Cycle Sort | 01 Aug, 2021
Prerequisite: Cycle SortGiven an array arr[] of elements from 1 to N, the task is to sort the given array in O(N) time.Examples:
Input: arr[] = { 2, 1, 5, 4, 3} Output: 1 2 3 4 5 Explanation: Since arr[0] = 2 is not at correct position, then swap arr[0] with arr[arr[0] – 1] Now array becomes: arr[] = {1,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 183,
"s": 52,
"text": "Prerequisite: Cycle SortGiven an array arr[] of elements from 1 to N, the task is to sort the given array in O(N) time.Examples: "
},
{
"code": null,
"e": 621,
... |
Python assert keyword | 03 Mar, 2022
Assertions in any programming language are the debugging tools that help in the smooth flow of code. Assertions are mainly assumptions that a programmer knows or always wants to be true and hence puts them in code, so that failure of these doesn’t allow the code to execute further.
In simpler terms, we ca... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 338,
"s": 54,
"text": "Assertions in any programming language are the debugging tools that help in the smooth flow of code. Assertions are mainly assumptions that a programmer knows or always wants... |
How to add column sum as new column in PySpark dataframe ? | 25 Aug, 2021
In this article, we are going to see how to perform the addition of New columns in Pyspark dataframe by various methods. It means that we want to create a new column that will contain the sum of all values present in the given row. Now let’s discuss the various methods how we add sum as new columns
But fi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 353,
"s": 52,
"text": "In this article, we are going to see how to perform the addition of New columns in Pyspark dataframe by various methods. It means that we want to create a new column that wil... |
Find the concentration of a solution using given Mass and Volume | 17 Mar, 2021
Given two values M and V representing the mass of solute and volume of a solution, the task is to calculate the concentration of the solution.Examples:
Input: M = 100.00, V = 500.00 Output: 200 Explaination: C = 1000 * (100 / 500) The concentration of solution is 200Input: M = 1.00 V = 1000.00 Output: 1 ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 182,
"s": 28,
"text": "Given two values M and V representing the mass of solute and volume of a solution, the task is to calculate the concentration of the solution.Examples: "
},
{
"code":... |
Interactive Charts using Pywedge package | 29 Jun, 2021
In Machine Learning and Data Science, one of the toughest jobs is to understand the raw data and make it fit for applying different models over it to make predictions. For understanding purpose, we make use of different processes like checking statistical figures such as mean, median, mode, finding the rel... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 748,
"s": 28,
"text": "In Machine Learning and Data Science, one of the toughest jobs is to understand the raw data and make it fit for applying different models over it to make predictions. For und... |
Java Program to Round a Number to n Decimal Places | 10 May, 2022
Floating-point numbers are decimal values, which can be rounded to n number of decimal places. There are 3 different ways to Round a Number to n Decimal Places in Java as follows:
Using format MethodUsing DecimalFormat ClassMultiply and Divide the number by 10n (n decimal places)
Using format Method
Using... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "Floating-point numbers are decimal values, which can be rounded to n number of decimal places. There are 3 different ways to Round a Number to n Decimal Places in Java as foll... |
Find sum of even and odd nodes in a linked list | 07 Jun, 2021
Given a linked list, the task is to find the sum of even and odd nodes in it separately.Examples:
Input: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 Output: Even Sum = 12 Odd Sum = 16Input: 5 -> 7 -> 8 -> 10 -> 15 Output: Even Sum = 18 Odd Sum = 27
Approach: Traverse the whole linked list and for each node:-
I... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jun, 2021"
},
{
"code": null,
"e": 152,
"s": 52,
"text": "Given a linked list, the task is to find the sum of even and odd nodes in it separately.Examples: "
},
{
"code": null,
"e": 293,
"s": 152,
"text": "Input... |
Python | time.localtime() method | 12 Oct, 2021
Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules. time.localtime() method of Time module is used to convert a time expressed in seconds since the epoch to a time.struct_time object in local time. To convert the given time in seconds si... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 555,
"s": 28,
"text": "Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules. time.localtime() method of Time module is used to con... |
JasmineJS - Building Blocks of Test | In this chapter, we will discuss the building blocks of test by Jasmine.
Jasmine is a testing framework for JavaScript. Suite is the basic building block of Jasmine framework. The collection of similar type test cases written for a specific file or function is known as one suite. It contains two other blocks, one is “D... | [
{
"code": null,
"e": 2123,
"s": 2050,
"text": "In this chapter, we will discuss the building blocks of test by Jasmine."
},
{
"code": null,
"e": 2408,
"s": 2123,
"text": "Jasmine is a testing framework for JavaScript. Suite is the basic building block of Jasmine framework. The co... |
C Program to print numbers from 1 to N without using semicolon? - GeeksforGeeks | 03 Mar, 2022
How to print numbers from 1 to N without using any semicolon in C.
C
#include<stdio.h>#define N 100 // Add your code here to print numbers from 1// to N without using any semicolon
What code to add in above snippet such that it doesn’t contain semicolon and prints numbers from 1 to N?We strongly recommend... | [
{
"code": null,
"e": 24813,
"s": 24785,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 24881,
"s": 24813,
"text": "How to print numbers from 1 to N without using any semicolon in C. "
},
{
"code": null,
"e": 24883,
"s": 24881,
"text": "C"
},
{
"code"... |
Nth Natural Number | Practice | GeeksforGeeks | Given a positive integer N. You have to find Nth natural number after removing all the numbers containing digit 9.
Example 1:
Input:
N = 8
Output:
8
Explanation:
After removing natural numbers which contains
digit 9, first 8 numbers are 1,2,3,4,5,6,7,8
and 8th number is 8.
Example 2:
Input:
N = 9
Output:
10
Explanatio... | [
{
"code": null,
"e": 353,
"s": 238,
"text": "Given a positive integer N. You have to find Nth natural number after removing all the numbers containing digit 9."
},
{
"code": null,
"e": 365,
"s": 353,
"text": "\nExample 1:"
},
{
"code": null,
"e": 513,
"s": 365,
... |
MySQL LIMIT clause equivalent for SQL SERVER? | Firstly, we need to create a table to understand the limit clause (as we want for SQL server).We will create a table with the help of CREATE command.
mysql> CREATE table limitDemo
-> (
-> id int,
-> primary key(id)
-> );
Query OK, 0 rows affected (0.58 sec)
After that, let us insert records into the table −
mysql> INSE... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "Firstly, we need to create a table to understand the limit clause (as we want for SQL server).We will create a table with the help of CREATE command."
},
{
"code": null,
"e": 1320,
"s": 1212,
"text": "mysql> CREATE table limitDemo\n-... |
C++ Program to Split the array and add the first part to the end? | Here we will see how to split an array, and add the first part after splitting at the end position. Suppose the array contents are {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. We want to cut this intro two parts. The first part is from index 0 to 3 (split size 4), and second part is rest. After adding the first part at the end, the... | [
{
"code": null,
"e": 1502,
"s": 1062,
"text": "Here we will see how to split an array, and add the first part after splitting at the end position. Suppose the array contents are {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. We want to cut this intro two parts. The first part is from index 0 to 3 (split size 4), a... |
poll() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
JSON Objects in Python. Introduction to JSON objects in Python | by Sadrach Pierre, Ph.D. | Towards Data Science | Java Script Object Notation (JSON) is a light weight data format with many similarities to python dictionaries. JSON objects are useful because browsers can quickly parse them, which is ideal for transporting data between a client and a server. In this post, we will discuss how to use python’s JSON library to send and ... | [
{
"code": null,
"e": 510,
"s": 171,
"text": "Java Script Object Notation (JSON) is a light weight data format with many similarities to python dictionaries. JSON objects are useful because browsers can quickly parse them, which is ideal for transporting data between a client and a server. In this po... |
Understanding And Implementing Dropout In TensorFlow And Keras | by Richmond Alake | Towards Data Science | This article covers the concept of the dropout technique, a technique that is leveraged in deep neural networks such as recurrent neural networks and convolutional neural network.
The Dropout technique involves the omission of neurons that act as feature detectors from the neural network during each training step. The ... | [
{
"code": null,
"e": 227,
"s": 47,
"text": "This article covers the concept of the dropout technique, a technique that is leveraged in deep neural networks such as recurrent neural networks and convolutional neural network."
},
{
"code": null,
"e": 416,
"s": 227,
"text": "The Dro... |
How to check if a string is a valid keyword in C#? | To check if a string is a valid keyword, use the IsValidIdentifier method.
The IsValidIdentifier method checks whether the entered value is an identifier or not. If it’s not an identifier, then it’s a keyword in C#.
Let us see an example, wherein we have set the CodeDomProvider and worked with the IsValiddentifier meth... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To check if a string is a valid keyword, use the IsValidIdentifier method."
},
{
"code": null,
"e": 1278,
"s": 1137,
"text": "The IsValidIdentifier method checks whether the entered value is an identifier or not. If it’s not an ident... |
DelayQueue Class in Java with Example - GeeksforGeeks | 20 May, 2021
The DelayQueue class is a member of the Java Collections Framework. It belongs to java.util.concurrent package. DelayQueue implements the BlockingQueue interface. DelayQueue is a specialized Priority Queue that orders elements based on their delay time. It means that only those elements can be taken from t... | [
{
"code": null,
"e": 24254,
"s": 24226,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 25568,
"s": 24254,
"text": "The DelayQueue class is a member of the Java Collections Framework. It belongs to java.util.concurrent package. DelayQueue implements the BlockingQueue interface. ... |
Find largest word in dictionary by deleting some characters of given string - GeeksforGeeks | 14 Mar, 2022
Giving a dictionary and a string ‘str’, find the longest string in dictionary which can be formed by deleting some characters of the given ‘str’. Examples:
Input : dict = {"ale", "apple", "monkey", "plea"}
str = "abpcplea"
Output : apple
Input : dict = {"pintu", "geeksfor", "geeksgeeks",
... | [
{
"code": null,
"e": 24825,
"s": 24797,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 24982,
"s": 24825,
"text": "Giving a dictionary and a string ‘str’, find the longest string in dictionary which can be formed by deleting some characters of the given ‘str’. Examples: "
},
... |
LISP - Loop For Construct | The loop for construct allows you to implement a for-loop like iteration as most common in other languages.
It allows you to
set up variables for iteration
set up variables for iteration
specify expression(s) that will conditionally terminate the iteration
specify expression(s) that will conditionally terminate the ite... | [
{
"code": null,
"e": 2168,
"s": 2060,
"text": "The loop for construct allows you to implement a for-loop like iteration as most common in other languages."
},
{
"code": null,
"e": 2185,
"s": 2168,
"text": "It allows you to"
},
{
"code": null,
"e": 2216,
"s": 2185,... |
Python - String Matrix Concatenation - GeeksforGeeks | 13 Jan, 2022
Sometimes, while working with Matrix we can have a problem in which we have Strings and we need a universal concatenation of all the String present in it. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using list comprehension + join()We can solve this problem using the list co... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 24935,
"s": 24716,
"text": "Sometimes, while working with Matrix we can have a problem in which we have Strings and we need a universal concatenation of all the String present in it. Let’s di... |
JasmineJS - afterEach() | Like beforeEach(), afterEach() works exactly the same way. It executes after the execution of the spec block. Let us modify the previous example using the following code.
var currentVal = 0;
afterEach(function() {
currentVal = 5;
});
describe("Different Methods of Expect Block",function() {
it("first cal... | [
{
"code": null,
"e": 2221,
"s": 2050,
"text": "Like beforeEach(), afterEach() works exactly the same way. It executes after the execution of the spec block. Let us modify the previous example using the following code."
},
{
"code": null,
"e": 2537,
"s": 2221,
"text": "var current... |
Scrapy - Environment | In this chapter, we will discuss how to install and set up Scrapy. Scrapy must be installed with Python.
Scrapy can be installed by using pip. To install, run the following command −
pip install Scrapy
Note − Python 3 is not supported on Windows OS.
Step 1 − Install Python 2.7 from Python
Set environmental variables b... | [
{
"code": null,
"e": 2342,
"s": 2237,
"text": "In this chapter, we will discuss how to install and set up Scrapy. Scrapy must be installed with Python."
},
{
"code": null,
"e": 2420,
"s": 2342,
"text": "Scrapy can be installed by using pip. To install, run the following command −... |
Adaptive Huffman Coding And Decoding - GeeksforGeeks | 24 Jun, 2021
Prerequisite: Huffman Coding, Huffman Decoding Adaptive Huffman Coding is also known as Dynamic Huffman Coding. The implementation is done using Vitter Algorithm.
Encoding
Adaptive Huffman coding for a string containing alphabets: Let m be the total number of alphabets. So m = 26. For Vitter Algorithm, f... | [
{
"code": null,
"e": 24700,
"s": 24672,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 24865,
"s": 24700,
"text": "Prerequisite: Huffman Coding, Huffman Decoding Adaptive Huffman Coding is also known as Dynamic Huffman Coding. The implementation is done using Vitter Algorithm. ... |
Circular Queue Data Structure in C++ | A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first.
Queue cane be one linear data structure. But it may create some problem if we implement queue using array. Sometimes by using some consecutive i... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first."
},
{
"code": null,
"e": 1697,
"s": 1238,
"text": "Queue ... |
Display all the values of an array in p tag on a web page with JavaScript | For this, you can use .data(anyArrayObject). Following is the code −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initialscale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "For this, you can use .data(anyArrayObject). Following is the code −"
},
{
"code": null,
"e": 1142,
"s": 1131,
"text": " Live Demo"
},
{
"code": null,
"e": 2023,
"s": 1142,
"text": "<!DOCTYPE html>\n<html lang=\"e... |
C library function - log10() | The C library function double log10(double x) returns the common logarithm (base-10 logarithm) of x.
Following is the declaration for log10() function.
double log10(double x)
x − This is the floating point value.
x − This is the floating point value.
This function returns the common logarithm of x, for values of x grea... | [
{
"code": null,
"e": 2108,
"s": 2007,
"text": "The C library function double log10(double x) returns the common logarithm (base-10 logarithm) of x."
},
{
"code": null,
"e": 2159,
"s": 2108,
"text": "Following is the declaration for log10() function."
},
{
"code": null,
... |
Swing Examples - Add Border to JPanel | Following example showcase how to add border to a JPanel in a Java Swing application.
We are using the following APIs.
BorderFactory.createLineBorder() − To create a line border.
BorderFactory.createLineBorder() − To create a line border.
JPanel.setBorder(border) − To set the desired border to the JPanel.
JPanel.setBor... | [
{
"code": null,
"e": 2125,
"s": 2039,
"text": "Following example showcase how to add border to a JPanel in a Java Swing application."
},
{
"code": null,
"e": 2158,
"s": 2125,
"text": "We are using the following APIs."
},
{
"code": null,
"e": 2218,
"s": 2158,
"... |
Count the number of ways to give ranks for N students such that same ranks are possible - GeeksforGeeks | 07 May, 2021
Given a number N which represents the number of students, the task is to calculate all possible ways to rank them according to their CGPA/marks, considering that two or more students can have the same rank. Since the answer can be large, perform the modulo with 109 + 7.
Examples:
Input: N = 1 Output: 1 E... | [
{
"code": null,
"e": 24698,
"s": 24670,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 24969,
"s": 24698,
"text": "Given a number N which represents the number of students, the task is to calculate all possible ways to rank them according to their CGPA/marks, considering that t... |
Mean Estimation: Median of Means. The Arithmetic Mean is boring... and... | by Jakob Poerschmann | Towards Data Science | If we break it down, machine learning comes back to making statistical inferences. Inference means making statements about an unknown distribution based on a sample generated by that same distribution. Consequently, mean estimation is one of the underlying problems of statistical inference and machine learning. We stud... | [
{
"code": null,
"e": 692,
"s": 171,
"text": "If we break it down, machine learning comes back to making statistical inferences. Inference means making statements about an unknown distribution based on a sample generated by that same distribution. Consequently, mean estimation is one of the underlyin... |
Matplotlib.axes.Axes.cla() in Python - GeeksforGeeks | 19 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 24592,
"s": 24292,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ... |
C library function - fgetpos() | The C library function int fgetpos(FILE *stream, fpos_t *pos) gets the current file position of the stream and writes it to pos.
Following is the declaration for fgetpos() function.
int fgetpos(FILE *stream, fpos_t *pos)
stream − This is the pointer to a FILE object that identifies the stream.
stream − This is the poin... | [
{
"code": null,
"e": 2136,
"s": 2007,
"text": "The C library function int fgetpos(FILE *stream, fpos_t *pos) gets the current file position of the stream and writes it to pos."
},
{
"code": null,
"e": 2189,
"s": 2136,
"text": "Following is the declaration for fgetpos() function."... |
SAP UI5 - Key Components | SAP UI5 has multiple components which are independent and reusable objects in UI5 application. These components can be developed by different people and can be used in different projects.
An application can use the components from different locations and hence you can easily get the structure of an application. You can... | [
{
"code": null,
"e": 2229,
"s": 2041,
"text": "SAP UI5 has multiple components which are independent and reusable objects in UI5 application. These components can be developed by different people and can be used in different projects."
},
{
"code": null,
"e": 2426,
"s": 2229,
"te... |
What is the keyword used in instantiating a class in Java? | An object is created from a class. In Java, the new keyword is used to create new objects.
There are three steps when creating an object from a class −
Declaration − A variable declaration with a variable name with an object type.
Declaration − A variable declaration with a variable name with an object type.
Instantiat... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "An object is created from a class. In Java, the new keyword is used to create new objects."
},
{
"code": null,
"e": 1214,
"s": 1153,
"text": "There are three steps when creating an object from a class −"
},
{
"code": null,
... |
NumPy Array Shape | The shape of an array is the number of elements in each dimension.
NumPy arrays have an attribute called shape that returns a tuple with each index having the number of corresponding elements.
Print the shape of a 2-D array:
The example above returns (2, 4), which means that the array has 2 dimensions,
where the first... | [
{
"code": null,
"e": 67,
"s": 0,
"text": "The shape of an array is the number of elements in each dimension."
},
{
"code": null,
"e": 193,
"s": 67,
"text": "NumPy arrays have an attribute called shape that returns a tuple with each index having the number of corresponding element... |
Transmitting data over WiFi using MQTT | MQTT (Message Queuing Telemetry Transport) has gained a lot of prominence in the context of IoT devices. It is a protocol that runs generally over TCP/IP. Instead of the server−client model that we saw for HTTP, MQTT uses the broker−client model. Wikipedia defines MQTT brokers and clients as −
An MQTT broker is a serve... | [
{
"code": null,
"e": 2478,
"s": 2183,
"text": "MQTT (Message Queuing Telemetry Transport) has gained a lot of prominence in the context of IoT devices. It is a protocol that runs generally over TCP/IP. Instead of the server−client model that we saw for HTTP, MQTT uses the broker−client model. Wikipe... |
A Generative Approach to Classification | by Rahul Agarwal | Towards Data Science | I always get confused whenever someone talks about generative vs. discriminative classification models.
I end up reading it again and again, yet somehow it eludes me.
So I thought of writing a post on it to improve my understanding.
This post is about understanding Generative Models and how they differ from Discriminat... | [
{
"code": null,
"e": 276,
"s": 172,
"text": "I always get confused whenever someone talks about generative vs. discriminative classification models."
},
{
"code": null,
"e": 339,
"s": 276,
"text": "I end up reading it again and again, yet somehow it eludes me."
},
{
"code... |
MySQL - CURDATE() Function | The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the specified time. MySQL provides a set of functions to manipulate the... | [
{
"code": null,
"e": 2664,
"s": 2333,
"text": "The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the ... |
VueJS - Mixins | Mixins are basically to be used with components. They share reusable code among components. When a component uses mixin, all options of mixin become a part of the component options.
<html>
<head>
<title>VueJs Instance</title>
<script type = "text/javascript" src = "js/vue.js"></script>
</head>
<bod... | [
{
"code": null,
"e": 2118,
"s": 1936,
"text": "Mixins are basically to be used with components. They share reusable code among components. When a component uses mixin, all options of mixin become a part of the component options."
},
{
"code": null,
"e": 2909,
"s": 2118,
"text": "... |
DCGANs (Deep Convolutional Generative Adversarial Networks) | by Connor Shorten | Towards Data Science | One of the most interesting parts of Generative Adversarial Networks is the design of the Generator network. The Generator network is able to take random noise and map it into images such that the discriminator cannot tell which images came from the dataset and which images came from the generator.
This is a very inter... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "One of the most interesting parts of Generative Adversarial Networks is the design of the Generator network. The Generator network is able to take random noise and map it into images such that the discriminator cannot tell which images came from the datas... |
Handshakes That Don't Cross in C++ | Suppose we have an even number of people n that stand around a circle and each person shakes hands with someone else, so that there will be n / 2 handshakes total. We have to find the number of ways these handshakes could occur such that none of the handshakes cross. The answers may be very large so return the answer m... | [
{
"code": null,
"e": 1395,
"s": 1062,
"text": "Suppose we have an even number of people n that stand around a circle and each person shakes hands with someone else, so that there will be n / 2 handshakes total. We have to find the number of ways these handshakes could occur such that none of the han... |
Longest Decreasing Subsequence - GeeksforGeeks | 11 May, 2021
Given an array of N integers, find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in strictly decreasing order.
Examples:
Input: arr[] = [15, 27, 14, 38, 63, 55, 46, 65, 85] Output: 3 Explanation: The longest decreasing subsequence is {63, ... | [
{
"code": null,
"e": 24991,
"s": 24963,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 25168,
"s": 24991,
"text": "Given an array of N integers, find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in strictly decre... |
Practice Questions for Recursion | Set 1 | 21 Jun, 2022
Explain the functionality of the following functions.
Question 1
C++
C
Java
Python3
C#
Javascript
int fun1(int x, int y){ if (x == 0) return y; else return fun1(x - 1, x + y);}
int fun1(int x, int y){ if (x == 0) return y; else return fun1(x - 1, x + y);}
static in... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 107,
"s": 52,
"text": "Explain the functionality of the following functions. "
},
{
"code": null,
"e": 119,
"s": 107,
"text": "Question 1 "
},
{
"code": null,
"e": 1... |
How to normalize images in PyTorch ? | 06 Jun, 2022
Image transformation is a process to change the original values of image pixels to a set of new values. One type of transformation that we do on images is to transform an image into a PyTorch tensor. When an image is transformed into a PyTorch tensor, the pixel values are scaled between 0.0 and 1.0. In PyT... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 566,
"s": 53,
"text": "Image transformation is a process to change the original values of image pixels to a set of new values. One type of transformation that we do on images is to transform an ima... |
How to Create a Basic Widget of an Android App? | 29 Apr, 2021
Widgets are the micro-version of the application that consists of some functionality of the application that is displayed only on the Home Screens or the Lock Screen. For example, we see Weather, Time, Google Search Bars on the Home Screen, and FaceLock, FingerprintLock on the Lock Screen, which are some o... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 694,
"s": 53,
"text": "Widgets are the micro-version of the application that consists of some functionality of the application that is displayed only on the Home Screens or the Lock Screen. For exa... |
HTML | InputElement.setSelectionRange() method | 31 Jul, 2019
The InputElement.setSelectionRange() method is used to set the start and end positions of the current index value to select text in an input or textarea element.
Syntax:
element.setSelectionRange( Start, End, Direction );
Parameters: This function accepts three parameters as mentioned above and described b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "The InputElement.setSelectionRange() method is used to set the start and end positions of the current index value to select text in an input or textarea element."
},
{
... |
Bank Of America Interview Experience | On-Campus 2021 | 16 Oct, 2021
Bank of America visited our campus on 9th September for various profiles testing, analysis, and development.
The whole interview process was done virtually. It consists of 3 rounds.
Online AssessmentHR RoundTechnical Round and Managerial Round
Online Assessment
HR Round
Technical Round and Managerial Round... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Bank of America visited our campus on 9th September for various profiles testing, analysis, and development."
},
{
"code": null,
"e": 210,
"s": 137,
"text"... |
Removing punctuations from a given string | 12 Jul, 2022
Given a string, remove the punctuation from the string if the given character is a punctuation character, as classified by the current C locale. The default C locale classifies these characters as punctuation:
! " # $ % & ' ( ) * + , - . / : ; ? @ [ \ ] ^ _ ` { | } ~
Examples:
Chapters
descriptions off,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 263,
"s": 52,
"text": "Given a string, remove the punctuation from the string if the given character is a punctuation character, as classified by the current C locale. The default C locale classifi... |
Subarray whose sum is closest to K | 14 Jun, 2022
Given an array of positive and negative integers and an integer K. The task is to find the subarray which has its sum closest to k. In case of multiple answers, print anyone.
Note: Closest here means abs(sum-k) should be minimal.
Examples:
Input: a[] = { -5, 12, -3, 4, -15, 6, 1 }, K = 2 Output: 1 The s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "Given an array of positive and negative integers and an integer K. The task is to find the subarray which has its sum closest to k. In case of multiple answers, print anyone.... |
Node.js fs-extra ensureDirSync() function | 06 Oct, 2021
The ensureDirSync() function is the synchronous version of ensureDir() function. The function makes sure that the directory exists, if the directory structure does not exist it will be created by the function. mkdirsSync() and mkdirpSync() can also be used in place of ensureDirSync() and the result will be... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 342,
"s": 28,
"text": "The ensureDirSync() function is the synchronous version of ensureDir() function. The function makes sure that the directory exists, if the directory structure does not exist i... |
Python | Remove random element from list | 27 Sep, 2019
Sometimes, while working with Python lists, we can have a problem or part of it, in which we desire to convert a list after deletion of some random element. This can have it’s application in gaming domain or personal projects. Let’s discuss certain way in which this task can be done.
Method : Using randran... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 313,
"s": 28,
"text": "Sometimes, while working with Python lists, we can have a problem or part of it, in which we desire to convert a list after deletion of some random element. This can have it’s... |
Program to calculate Percentile of Students | 21 Apr, 2021
Given an array containing marks of students, the task is to calculate the percentile of the students. The percentile is calculated according to the following rule:
The percentile of a student is the % of the number of students having marks less than him/her.
Examples:
Input: arr[] = { 12, 60, 80, 71, 3... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 194,
"s": 28,
"text": "Given an array containing marks of students, the task is to calculate the percentile of the students. The percentile is calculated according to the following rule: "
},
{... |
jQuery change() with Example | The change() method in jQuery is used to trigger the change event. It occurs when the value of an element has been changed.
The syntax is as follows −
$(selector).change()
Let us now see an example to implement the jQuery change() method −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.co... | [
{
"code": null,
"e": 1311,
"s": 1187,
"text": "The change() method in jQuery is used to trigger the change event. It occurs when the value of an element has been changed."
},
{
"code": null,
"e": 1338,
"s": 1311,
"text": "The syntax is as follows −"
},
{
"code": null,
... |
Maximal Rectangle in C++ | Suppose we have a 2D binary matrix where 0s and 1 values are present. We have to find the largest rectangle containing only 1s and return its area.
To solve this, we will follow these steps−
Define a function called getAns, this will take array a
Define a function called getAns, this will take array a
create stack st, ... | [
{
"code": null,
"e": 1335,
"s": 1187,
"text": "Suppose we have a 2D binary matrix where 0s and 1 values are present. We have to find the largest rectangle containing only 1s and return its area."
},
{
"code": null,
"e": 1378,
"s": 1335,
"text": "To solve this, we will follow thes... |
Divide array into two parts with equal sum according to the given constraints | 06 May, 2019
Given an array arr[] of N integers, the task is to select an integer x (which may or may not be present in the array) and remove all of its occurrences from the array and divide the remaining array into two non-empty sub-sets such that:
The elements of the first set are strictly smaller than x.The elements... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 May, 2019"
},
{
"code": null,
"e": 291,
"s": 54,
"text": "Given an array arr[] of N integers, the task is to select an integer x (which may or may not be present in the array) and remove all of its occurrences from the array and div... |
Risk Management for Information Security | Set-1 | 18 Jan, 2022
Prerequisite – Threat Modelling
A risk is nothing but intersection of assets, threats and vulnerability.
A+T+V = R
NIST SP 800-30 Risk Management Guide for Information Technology Practitioners defines risk as a function of the likelihood of a given threat-source exercising a particular potential vulnera... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 61,
"s": 28,
"text": "Prerequisite – Threat Modelling "
},
{
"code": null,
"e": 136,
"s": 61,
"text": "A risk is nothing but intersection of assets, threats and vulnerability. "... |
Matplotlib.ticker.MultipleLocator Class in Python | 21 Apr, 2020
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.ticker.MultipleLocator class is used for setting a tick for every integer multip... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
How to check file size in Python? | 17 Dec, 2020
Prerequisites:
os
pathlib
Given a file, the task here is to generate a Python Script to print its size. This article explains 2 methods to do so.
Import module
Get file size
Name: Data.csv
Size: 226 bytes
Method1: Using pathlib
Path().stat().st_size() function of pathlib module gets the size of any type o... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 69,
"s": 54,
"text": "Prerequisites:"
},
{
"code": null,
"e": 73,
"s": 69,
"text": "os "
},
{
"code": null,
"e": 81,
"s": 73,
"text": "pathlib"
},
{
... |
Different Ways to Convert the Boolean Type in String in Golang | 10 May, 2020
In order to convert Boolean Type to String type in Golang , you can use the strconv and fmt package function.
1. strconv.FormatBool() Method: The FormatBool is used to Boolean Type to String. It returns “true” or “false” according to the value of b.
Syntax:
func FormatBool(b bool) string
Example : Convert... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "In order to convert Boolean Type to String type in Golang , you can use the strconv and fmt package function."
},
{
"code": null,
"e": 278,
"s": 138,
"text... |
Java Program to Illustrate a Method Without Parameters and Return Type | 17 Nov, 2020
Functions are a way to break a program into different modules which are executed one by one. To use a function in Java we need to:
Declare the function i.e. declare a prototype of the function.
Define the function
Call the function
It is important that we declare the function before calling it and the def... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Nov, 2020"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "Functions are a way to break a program into different modules which are executed one by one. To use a function in Java we need to: "
},
{
"code": null,
"e": 223,
... |
Data Structures and Algorithms | Set 22 | 11 Nov, 2021
Following questions have been asked in GATE CS 2005 exam.
1) A program P reads in 500 integers in the range [0..100] representing the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies?(a) An array of 50 numbers(b) An array... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 112,
"s": 54,
"text": "Following questions have been asked in GATE CS 2005 exam."
},
{
"code": null,
"e": 452,
"s": 112,
"text": "1) A program P reads in 500 integers in the ran... |
How to create an Affix or sticky Navbar ? | 01 Oct, 2021
To create an affix or sticky navbar, you need to use HTML, CSS, and JavaScript. HTML will make the structure of the body, CSS will make it looks good. This kind of sticky navbar looks attractive on website. By using JavaScript, you can easily make the navigation bar sticky when the user scrolls down.Creati... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 495,
"s": 28,
"text": "To create an affix or sticky navbar, you need to use HTML, CSS, and JavaScript. HTML will make the structure of the body, CSS will make it looks good. This kind of sticky navb... |
PHP | substr() function | 09 Mar, 2018
The substr() is a built-in function in PHP that is used to extract a part of string.
Syntax:
substr(string_name, start_position, string_length_to_cut)
Parameters:The substr() function allows 3 parameters or arguments out of which two are mandatory and one is optional.
string_name: In this parameter, we pas... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Mar, 2018"
},
{
"code": null,
"e": 139,
"s": 54,
"text": "The substr() is a built-in function in PHP that is used to extract a part of string."
},
{
"code": null,
"e": 147,
"s": 139,
"text": "Syntax:"
},
{
... |
Online XML Formatter | Editable XML Code
123456789101112131415<?xml version="1.0"?><Company><Employee><FirstName>Tanmay</FirstName><LastName>Patil</LastName><ContactNo>1234567890</ContactNo><Email>tanmaypatil@xyz.com</Email><Address><City>Bangalore</City><State>Karnataka</State><Zip>560212</Zip></Address></Employee></Company>X
Privacy Policy... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "Editable XML Code"
},
{
"code": null,
"e": 306,
"s": 18,
"text": "123456789101112131415<?xml version=\"1.0\"?><Company><Employee><FirstName>Tanmay</FirstName><LastName>Patil</LastName><ContactNo>1234567890</ContactNo><Email>tanmaypatil@xy... |
What happens when we type a URL - GeeksforGeeks | 05 Jun, 2020
URL stands for Uniform Resource Locator. URL is the address of the website which you can find in the address bar of your web browser. It is a reference to a resource on the internet, be it images, hypertext pages, audio/video files, etc.
Example :
https://practice.geeksforgeeks.org/
What is DNS :DNS is sh... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 26017,
"s": 25779,
"text": "URL stands for Uniform Resource Locator. URL is the address of the website which you can find in the address bar of your web browser. It is a reference to a resour... |
Complete Guide to Install C++17 on Windows - GeeksforGeeks | 05 Oct, 2021
In the Competitive Programming field C++ is one of the most used language, because of it’s huge STL(standard template library) functions, and day by day its getting updated. So here is the complete guide to install the latest version of C++(C++ 17) and also setup guide for Sublime Text and CodeBlocks.
To i... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 25670,
"s": 25367,
"text": "In the Competitive Programming field C++ is one of the most used language, because of it’s huge STL(standard template library) functions, and day by day its gettin... |
Python | Method Overloading - GeeksforGeeks | 19 Feb, 2021
Like other languages (for example, method overloading in C++) do, python does not support method overloading by default. But there are different ways to achieve method overloading in Python.
The problem with method overloading in Python is that we may overload the methods but can only use the latest defin... | [
{
"code": null,
"e": 25419,
"s": 25391,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 25611,
"s": 25419,
"text": "Like other languages (for example, method overloading in C++) do, python does not support method overloading by default. But there are different ways to achieve me... |
Two odd occurring elements in an array where all other occur even times - GeeksforGeeks | 30 Apr, 2021
Given an array where all elements appear even number of times except two, print the two odd occurring elements. It may be assumed that the size of array is at-least two.
Examples:
Input : arr[] = {2, 3, 8, 4, 4, 3, 7, 8}
Output : 2 7
Input : arr[] = {15, 10, 10, 50 7, 5, 5, 50, 50, 50, 50, 50}
Output : 7... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 26235,
"s": 26065,
"text": "Given an array where all elements appear even number of times except two, print the two odd occurring elements. It may be assumed that the size of array is at-leas... |
Combinatorics on ordered trees - GeeksforGeeks | 26 May, 2021
An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an ordering is specified for the children of each vertex. This is called a “plane tree” because the ordering of the children is equivalent to an embedding of the tree in the plane, with the... | [
{
"code": null,
"e": 26239,
"s": 26211,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 26718,
"s": 26239,
"text": "An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an ordering is specified for the children of ... |
Scala | Create Array with Range - GeeksforGeeks | 12 Jun, 2019
Array is a special kind of collection in Scala. It is a fixed size data structure that stores elements of the same data type. By using range() method to generate an array containing a sequence of increasing integers in a given range. We can use final argument as jump to create the sequence. if we do not us... | [
{
"code": null,
"e": 25301,
"s": 25273,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 25659,
"s": 25301,
"text": "Array is a special kind of collection in Scala. It is a fixed size data structure that stores elements of the same data type. By using range() method to generate a... |
HTML height Attribute - GeeksforGeeks | 10 Dec, 2021
The HTML <td> height Attribute is used to specify the height of the table cell. If the <td> height attribute is not set then it takes default height according to content.
Syntax:
<td height="pixels | %">
Attribute Values:
pixels: It sets the height of the table cell in terms of pixels.
%: It sets the he... | [
{
"code": null,
"e": 25821,
"s": 25793,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 25992,
"s": 25821,
"text": "The HTML <td> height Attribute is used to specify the height of the table cell. If the <td> height attribute is not set then it takes default height according to c... |
How to Stack DataFrame Columns in R? - GeeksforGeeks | 19 Dec, 2021
A dataframe is a tubular structure composed of rows and columns. The dataframe columns can be stacked together to divide the columns depending on the values contained within them.
The cbind() operation is used to stack the columns of the data frame together. Initially, the first two columns of the data fr... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 26668,
"s": 26487,
"text": "A dataframe is a tubular structure composed of rows and columns. The dataframe columns can be stacked together to divide the columns depending on the values contai... |
How to Install and Use bmon Real Time Bandwidth Monitor in Linux? - GeeksforGeeks | 11 Feb, 2021
Bmon Stands is an open source tool for the bandwidth monitoring tool. bmon is a powerful CLI based network bandwidth monitoring and debugging tool for Unix / Linux systems to capture networking related statistics & present them visually on the command line in a human-friendly way. It captures the traffic u... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 26640,
"s": 26197,
"text": "Bmon Stands is an open source tool for the bandwidth monitoring tool. bmon is a powerful CLI based network bandwidth monitoring and debugging tool for Unix / Linux... |
SWING - JScrollBar Class | The class JScrollBar is an implementation of scrollbar.
Following is the declaration for javax.swing.JScrollBar class −
public class JScrollBar
extends JComponent
implements Adjustable, Accessible
Following are the fields for javax.swing.ImageIcon class −
protected int blockIncrement
protected int blockIncrem... | [
{
"code": null,
"e": 1819,
"s": 1763,
"text": "The class JScrollBar is an implementation of scrollbar."
},
{
"code": null,
"e": 1883,
"s": 1819,
"text": "Following is the declaration for javax.swing.JScrollBar class −"
},
{
"code": null,
"e": 1970,
"s": 1883,
... |
What Can We Learn from Elon Musk’s Twitter Graph? | by Günter Röhrich | Towards Data Science | Graph mining allows us to collect data and build a diagram of nodes and edges from any given set of entities. Algorithms like Louvain method or PageRank provide meaningful tools to analyze graphs after being mined and built. This post describes the building process of a graph with just a few lines of Python code.
Graph... | [
{
"code": null,
"e": 362,
"s": 47,
"text": "Graph mining allows us to collect data and build a diagram of nodes and edges from any given set of entities. Algorithms like Louvain method or PageRank provide meaningful tools to analyze graphs after being mined and built. This post describes the buildin... |
Java String startsWith() Method | ❮ String Methods
Find out if the string starts with the specified characters:
String myStr = "Hello";
System.out.println(myStr.startsWith("Hel")); // true
System.out.println(myStr.startsWith("llo")); // false
System.out.println(myStr.startsWith("o")); // false
Try it Yourself »
The startsWith() method checks... | [
{
"code": null,
"e": 19,
"s": 0,
"text": "\n❮ String Methods\n"
},
{
"code": null,
"e": 80,
"s": 19,
"text": "Find out if the string starts with the specified characters:"
},
{
"code": null,
"e": 271,
"s": 80,
"text": "String myStr = \"Hello\";\nSystem.out.pri... |
What is Ambiguous Grammar? | A Grammar that makes more than one Leftmost Derivation (or Rightmost Derivation) for the similar sentence is called Ambiguous Grammar.
Example − Verify whether the following Grammar is Ambiguous or Not.
E → E+E|E ∗ E|id
Solution
For string id + id * id, there exist two parse trees.
E ⇒lm E_+E
⇒ id+ E_
⇒ id+E_ ∗ E
⇒ id... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "A Grammar that makes more than one Leftmost Derivation (or Rightmost Derivation) for the similar sentence is called Ambiguous Grammar."
},
{
"code": null,
"e": 1265,
"s": 1197,
"text": "Example − Verify whether the following Grammar ... |
Convert UNIX Timestamp to Date Object in R - GeeksforGeeks | 23 May, 2021
UNIX timestamp refers to the number of seconds that have elapsed since the epoch. The timestamp object is not easily understandable and should be converted to other user-friendly formats. The Date objects in R Programming Language can be used to display the specified timestamp in a crisp way. Date objects ... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 25349,
"s": 24851,
"text": "UNIX timestamp refers to the number of seconds that have elapsed since the epoch. The timestamp object is not easily understandable and should be converted to othe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.