title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
PostgreSQL – SMALLINT Integer Data Type | 28 Aug, 2020
PostgreSQL allows a type of integer type namely SMALLINT. It requires 2 bytes of storage size and can store integers in the range of -37, 767 to 32, 767. It comes in handy for storing data like the age of people, the number of pages in a book, etc.
Syntax: variable_name SMALLINT
Now let’s look into some ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "PostgreSQL allows a type of integer type namely SMALLINT. It requires 2 bytes of storage size and can store integers in the range of -37, 767 to 32, 767. It comes in handy for... |
How to initialize a list in a single line in Java with a specified value? | 16 Dec, 2019
Given a value N, the task is to create a List having this value N in a single line in Java.
Examples:
Input: N = 5
Output: [5]
Input: N = GeeksForGeeks
Output: [GeeksForGeeks]
Approach:
Get the value N
Create an array with this value N
Create a List with this array as an argument in the constructor
Below... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Dec, 2019"
},
{
"code": null,
"e": 120,
"s": 28,
"text": "Given a value N, the task is to create a List having this value N in a single line in Java."
},
{
"code": null,
"e": 130,
"s": 120,
"text": "Examples:"
}... |
Smallest divisor D of N such that gcd(D, M) is greater than 1 | 16 Jun, 2022
Given two positive integers N and M., The task is to find the smallest divisor D of N such that gcd(D, M) > 1. If there are no such divisors, then print -1. Examples:
Input: N = 8, M = 10 Output: 2Input: N = 8, M = 1 Output: -1
A naive approach is to iterate for every factor and calculate the gcd of the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "Given two positive integers N and M., The task is to find the smallest divisor D of N such that gcd(D, M) > 1. If there are no such divisors, then print -1. Examples: "
},
... |
Python | Frequency of each character in String | 22 Nov, 2018
Given a string, the task is to find the frequencies of all the characters in that string and return a dictionary with key as the character and its value as its frequency in the given string.
Method #1 : Naive method
Simply iterate through the string and form a key in dictionary of newly occurred element or... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 243,
"s": 52,
"text": "Given a string, the task is to find the frequencies of all the characters in that string and return a dictionary with key as the character and its value as its frequency in t... |
Rotate each ring of matrix anticlockwise by K elements | 06 Jul, 2022
Given a matrix of order M*N and a value K, the task is to rotate each ring of the matrix anticlockwise by K elements. If in any ring elements are less than and equal K then don’t rotate it.
Examples:
Input : k = 3
mat[4][4] = {{1, 2, 3, 4},
{5, 6, 7, 8},
{9... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 243,
"s": 52,
"text": "Given a matrix of order M*N and a value K, the task is to rotate each ring of the matrix anticlockwise by K elements. If in any ring elements are less than and equal K then d... |
MongoDB – Greater than Operator $gt | 27 Mar, 2020
MongoDB provides different types of comparison operators and greater than operator($gt) is one of them. This operator is used to select those documents where the value of the field is greater than(>) the given value. You can use this operator in methods (like, find, update, etc.) according to your requirem... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Mar, 2020"
},
{
"code": null,
"e": 341,
"s": 28,
"text": "MongoDB provides different types of comparison operators and greater than operator($gt) is one of them. This operator is used to select those documents where the value of the ... |
factorial() in Python | 11 Oct, 2017
Not many people know, but python offers a direct function that can compute the factorial of a number without writing the whole code for computing factorial.
Naive method to compute factorial
# Python code to demonstrate naive method# to compute factorialn = 23fact = 1 for i in range(1,n+1): fact = fact... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Oct, 2017"
},
{
"code": null,
"e": 209,
"s": 52,
"text": "Not many people know, but python offers a direct function that can compute the factorial of a number without writing the whole code for computing factorial."
},
{
"co... |
GATE | GATE-CS-2016 (Set 1) | Question 56 | 07 Sep, 2021
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}}.
Using the above SDTS, the output printed by a bottom-up parser, for the input aab is(A) 1 3 2(B) 2 2 3(C) 2 3 1(D) Syntax ErrorAnswer: (C)Explanation: Bottom up parser builds the parse tree fr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 169,
"s": 54,
"text": "Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}}."
},
{
"code": null,
"e": 478,
"s": 169,
... |
Feature Extraction Techniques – NLP | 03 Jun, 2022
This article focuses on basic feature extraction techniques in NLP to analyse the similarities between pieces of text. Natural Language Processing (NLP) is a branch of computer science and machine learning that deals with training computers to process a large amount of human (natural) language data. Briefl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 860,
"s": 28,
"text": "This article focuses on basic feature extraction techniques in NLP to analyse the similarities between pieces of text. Natural Language Processing (NLP) is a branch of compute... |
Skip List | Set 3 (Searching and Deletion) | 14 Jun, 2022
In previous article Skip List | Set 2 (Insertion) we discussed the structure of skip nodes and how to insert an element in the skip list. In this article we will discuss how to search and delete an element from skip list.
Searching an element in Skip list
Searching an element is very similar to approach fo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 274,
"s": 52,
"text": "In previous article Skip List | Set 2 (Insertion) we discussed the structure of skip nodes and how to insert an element in the skip list. In this article we will discuss how ... |
How to Create Buttons Inside a Widget in Android? | 08 Sep, 2020
How to Create a Basic Widget of an Android App?
How to Create a Dynamic Widget of an Android App?
A Widget is a mini version of an Application, that provides a ground for the user to navigate through it or use its features from the Home Screen or Lock Screen. Widgets contain elements according to the featu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Sep, 2020"
},
{
"code": null,
"e": 76,
"s": 28,
"text": "How to Create a Basic Widget of an Android App?"
},
{
"code": null,
"e": 126,
"s": 76,
"text": "How to Create a Dynamic Widget of an Android App?"
},
{
... |
Creating a Rainbow using Graphics Programming in C | 13 Aug, 2019
In Turbo C graphics we use graphics.h functions to draw different shapes(like circle, rectangle etc), display text(any message) in different format(different fonts and colors). By using graphics.h we can make programs, animations and also games. These can be useful for beginners.
Functions Used :
delay(n):... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "In Turbo C graphics we use graphics.h functions to draw different shapes(like circle, rectangle etc), display text(any message) in different format(different fonts and colors)... |
GATE | GATE-IT-2004 | Question 8 | 19 Nov, 2018
What is the minimum number of NAND gates required to implement a 2-input EXCLUSIVE-OR function without using any other logic gate?(A) 3(B) 4(C) 5(D) 6Answer: (B)Explanation:
Pic Courtesy: http://www.electronics-tutorials.ws/logic/logic_7.html
Other way around:
x XOR y = x’y+xy’ = x’y+xy’+xx’+yy’ = (x+y) (... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "What is the minimum number of NAND gates required to implement a 2-input EXCLUSIVE-OR function without using any other logic gate?(A) 3(B) 4(C) 5(D) 6Answer: (B)Explanation: "... |
How to make a PyGame Window? | 24 Feb, 2021
PyGame is a free and open-source cross-platform library for game development in Python. It was officially written by Pete Shinners to replace PySDL it is suitable for the creation of client-side applications and acts as standalone executables. In this article, we are going to see how to make Pygame window ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 346,
"s": 28,
"text": "PyGame is a free and open-source cross-platform library for game development in Python. It was officially written by Pete Shinners to replace PySDL it is suitable for the crea... |
D3.js band.bandwidth() Function | 26 Jul, 2021
The band.bandwidth() function in d3.js is used to find the width of each band.
Syntax:
band.bandwidth()
Parameters: This function does not accept any parameter.
Return Values: This function returns the width of each band.
Example 1:
HTML
<!DOCTYPE html><html lang = "en"> <head> <meta charset = "UTF-8" /... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "The band.bandwidth() function in d3.js is used to find the width of each band."
},
{
"code": null,
"e": 115,
"s": 107,
"text": "Syntax:"
},
{
"code... |
PyQt5 – How to add border on QLabel ? | 26 Mar, 2020
When we create Label in PyQt5, we can see that there are no borders like there exist in Push Buttons, in this article we will see how to add border to the Label.
In order to add border to the Label we will use label.setStyleSheet() method, this will add the border to the label, also we can set the thicknes... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "When we create Label in PyQt5, we can see that there are no borders like there exist in Push Buttons, in this article we will see how to add border to the Label."
},
{
... |
How to Print Specific date-time in Golang? | 17 May, 2020
Golang supports time formatting and parsing via pattern-based layouts. In Go, the current time can be determined by using time.Now(), provided by the time package. Package time provides functionality for measuring and displaying the time.
To print Current date-time you need to import the “time” package in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 267,
"s": 28,
"text": "Golang supports time formatting and parsing via pattern-based layouts. In Go, the current time can be determined by using time.Now(), provided by the time package. Package tim... |
ASP Server.HTMLEncode() Method | 05 Feb, 2021
The ASP Server.HTMLEncode() Method is used to convert an HTML code to a string. It is used to encode form data and other client request data before using it in the web application. When the string to be encoded is not a double-byte character set, this method will convert the characters as given below:
The ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 331,
"s": 28,
"text": "The ASP Server.HTMLEncode() Method is used to convert an HTML code to a string. It is used to encode form data and other client request data before using it in the web applica... |
Storage of String in Java | 30 Aug, 2020
Prerequisite: Strings in Java
As we know both Stack and Heap space are part of Java Virtual Machine (JVM). But these memory spaces are used for different purposes. Stack space contains specific values that are short-lived whereas Heap space used by Java Runtime to allocate memory to objects and JRE classe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 85,
"s": 54,
"text": "Prerequisite: Strings in Java"
},
{
"code": null,
"e": 411,
"s": 85,
"text": "As we know both Stack and Heap space are part of Java Virtual Machine (JVM).... |
How to create three boxes in the same div using HTML and CSS ? | 13 Jun, 2022
Three or more different div can be put side-by-side using CSS in the same div. This can be achieved with flexbox – but note that you will need to use wrapper divs and apply different flex-directions to each in order to make the grid layout work. Use CSS property to set the height and width of div.
Syntax:
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 327,
"s": 28,
"text": "Three or more different div can be put side-by-side using CSS in the same div. This can be achieved with flexbox – but note that you will need to use wrapper divs and apply di... |
nCr | Practice | GeeksforGeeks | Given two integers n and r, find nCr. Since the answer may be very large, calculate the answer modulo 109+7.
Example 1:
Input: n = 3, r = 2
Output: 3
Explaination: 3C2 = 3.
Example 2:
Input: n = 2, r = 4
Output: 0
Explaination: r is greater than n.
Your Task:
You do not need to take input or print anything. Your tas... | [
{
"code": null,
"e": 347,
"s": 238,
"text": "Given two integers n and r, find nCr. Since the answer may be very large, calculate the answer modulo 109+7."
},
{
"code": null,
"e": 358,
"s": 347,
"text": "Example 1:"
},
{
"code": null,
"e": 412,
"s": 358,
"text"... |
How to Aggregate multiple columns in Data.table in R ? | 17 Jun, 2021
In this article, we will discuss how to aggregate multiple columns in Data.table in R Programming Language.
A data.table contains elements that may be either duplicate or unique. As a result of this, the variables are divided into categories depending on the sets in which they can be segregated. The column... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "In this article, we will discuss how to aggregate multiple columns in Data.table in R Programming Language."
},
{
"code": null,
"e": 437,
"s": 136,
"text":... |
Convert dataframe to data.table in R | 17 May, 2021
In this article, we will discuss how to convert dataframe to data.table in R Programming Language. data.table is an R package that provides an enhanced version of dataframe. Characteristics of data.table :
data.table doesn’t set or use row names
row numbers are printed with a : for better readability
Unli... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "In this article, we will discuss how to convert dataframe to data.table in R Programming Language. data.table is an R package that provides an enhanced version of dataframe. C... |
Python | Image blurring using OpenCV | 17 Apr, 2019
Image Blurring refers to making the image less clear or distinct. It is done with the help of various low pass filter kernels.
Advantages of blurring:
It helps in Noise removal. As noise is considered as high pass signal so by the application of low pass filter kernel we restrict noise.
It helps in smoothi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Apr, 2019"
},
{
"code": null,
"e": 181,
"s": 54,
"text": "Image Blurring refers to making the image less clear or distinct. It is done with the help of various low pass filter kernels."
},
{
"code": null,
"e": 205,
"... |
Ruby | Hashes Basics | 31 Jul, 2018
Hash is a data structure that maintains a set of objects which are termed as the keys and each key associates a value with it. In simple words, a hash is a collection of unique keys and their values. Hashes are sometimes called as associative arrays because it associates values with each of the keys but th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Jul, 2018"
},
{
"code": null,
"e": 553,
"s": 53,
"text": "Hash is a data structure that maintains a set of objects which are termed as the keys and each key associates a value with it. In simple words, a hash is a collection of uniq... |
What is Photoshop? | 21 Jul, 2021
Photoshop is photo editing software that edits photos, and images should be in a raster image format. It is available in many different languages, such as English, Chinese, Japanese, Dutch, Polish, and so on. Nowadays, Photoshop is also known as Adobe Photoshop.
Adobe Photoshop is a user-friendly, most pow... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 291,
"s": 28,
"text": "Photoshop is photo editing software that edits photos, and images should be in a raster image format. It is available in many different languages, such as English, Chinese, Ja... |
How to create full width container using bootstrap? | 05 May, 2022
We can create full width container using “container-fluid” class of bootstrap
Containers are the most basic layout element in Bootstrap and are required when using our default grid system. Choose from a responsive, fixed-width container (meaning its max-width changes at each breakpoint) or fluid-width (mea... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 May, 2022"
},
{
"code": null,
"e": 130,
"s": 52,
"text": "We can create full width container using “container-fluid” class of bootstrap"
},
{
"code": null,
"e": 457,
"s": 130,
"text": "Containers are the most bas... |
Distinct powers of a number N such that the sum is equal to K | 24 Nov, 2021
Given two numbers N and K, the task is to print the distinct powers of N which are used to get the sum K. If it’s not possible, print -1.
Examples:
Input: N = 3, K = 40 Output: 0, 1, 2, 3 Explanation: The value of N is 3. 30 + 31 + 32 + 33 = 40
Input: N = 4, K = 65 Output: 0, 3 The value of N is 4. 40 + ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 192,
"s": 54,
"text": "Given two numbers N and K, the task is to print the distinct powers of N which are used to get the sum K. If it’s not possible, print -1."
},
{
"code": null,
"e":... |
How does concatenation operator work on list in Python? | The concatenation operator creates a new list in Python using the initial lists in the order they were added in. This is not an inplace operation.
list1 = [1, 2, 3]
list2 = ['a', 'b']
list3 = list1 + list2
print(list3)
This will give the output −
[1, 2, 3, 'a', 'b']
There are other ways to concatenate 2 lists. Easiest... | [
{
"code": null,
"e": 1335,
"s": 1187,
"text": "The concatenation operator creates a new list in Python using the initial lists in the order they were added in. This is not an inplace operation. "
},
{
"code": null,
"e": 1407,
"s": 1335,
"text": "list1 = [1, 2, 3]\nlist2 = ['a', '... |
Version and Release Management in Software Engineering | 18 Jan, 2021
The process involved in version and release management are concerned with identifying and keeping track of the versions of a system. Versions managers devise procedures to ensure that versions of a system may be retrieved when required and are not accidentally changed by the development team. For products,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 506,
"s": 28,
"text": "The process involved in version and release management are concerned with identifying and keeping track of the versions of a system. Versions managers devise procedures to ens... |
How to convert byte array to string in C#? | In .Net, every string has a character set and encoding. A character encoding tells the computer how to interpret raw zeroes and ones into real characters. It usually does this by pairing numbers with characters. Actually, it is the process of transforming a set of Unicode characters into a sequence of bytes.
We can use... | [
{
"code": null,
"e": 1497,
"s": 1187,
"text": "In .Net, every string has a character set and encoding. A character encoding tells the computer how to interpret raw zeroes and ones into real characters. It usually does this by pairing numbers with characters. Actually, it is the process of transformi... |
Map remove() Method in Java with Examples | 27 Aug, 2021
This method is used to remove the mapping for a key from this map if it is present in the map.
Syntax:
V remove(Object key)
Parameters: This method has the only argument key, whose mapping is to be removed from the map.Returns: This method returns the value to which this map previously associated the k... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "This method is used to remove the mapping for a key from this map if it is present in the map. "
},
{
"code": null,
"e": 135,
"s": 125,
"text": "Syntax: ... |
Python | Minimum value keys in Dictionary | 11 Jul, 2019
Many times, we may have problem in which we require to find not just the value, but the corresponding keys to the minimum value in the entire dictionary. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using min() + list comprehension + values()The combination of above functions... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Jul, 2019"
},
{
"code": null,
"e": 271,
"s": 53,
"text": "Many times, we may have problem in which we require to find not just the value, but the corresponding keys to the minimum value in the entire dictionary. Let’s discuss certai... |
Equivalence Partitioning Method | 24 Nov, 2021
Equivalence Partitioning Method is also known as Equivalence class partitioning (ECP). It is a software testing technique or black-box testing that divides input domain into classes of data, and with the help of these classes of data, test cases can be derived. An ideal test case identifies class of error ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 454,
"s": 52,
"text": "Equivalence Partitioning Method is also known as Equivalence class partitioning (ECP). It is a software testing technique or black-box testing that divides input domain into ... |
Replace every character of a string by a different character | 27 May, 2022
Given a string str of lowercase alphabets only. The task is to replace every character by some new character. The new character belongs to (small case only) Replacement of str[i] is determined by:
str[i] = Character obtained after traversing ascii(str[i]) no. of characters in ‘a-z’ repeatedly after str[i]... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 252,
"s": 54,
"text": "Given a string str of lowercase alphabets only. The task is to replace every character by some new character. The new character belongs to (small case only) Replacement of st... |
Covariant Return Types in Java | 03 Dec, 2021
As the ear hit eardrums “overriding” we quickly get to know that it can be done either virtue of different datatypes or arguments passed to a function what a programmer learned initially while learning polymorphism in java. Before JDK 5.0, it was not possible to override a method by changing the return ty... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 625,
"s": 52,
"text": "As the ear hit eardrums “overriding” we quickly get to know that it can be done either virtue of different datatypes or arguments passed to a function what a programmer learn... |
How to save a NumPy array to a text file? | 18 Jun, 2021
Let us see how to save a numpy array to a text file.
Method 1: Using File handling Creating a text file using the in-built open() function and then converting the array into string and writing it into the text file using the write() function. Finally closing the file using close() function. Below are some ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2021"
},
{
"code": null,
"e": 81,
"s": 28,
"text": "Let us see how to save a numpy array to a text file."
},
{
"code": null,
"e": 367,
"s": 81,
"text": "Method 1: Using File handling Creating a text file usin... |
Python | Tokenize text using TextBlob | 01 Jan, 2019
TextBlob module is a Python library and offers a simple API to access its methods and perform basic NLP tasks. It is built on the top of NLTK module.
Install TextBlob using the following commands in terminal:
pip install -U textblob
python -m textblob.download_corpora
This will install TextBlob and downlo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jan, 2019"
},
{
"code": null,
"e": 204,
"s": 54,
"text": "TextBlob module is a Python library and offers a simple API to access its methods and perform basic NLP tasks. It is built on the top of NLTK module."
},
{
"code": nu... |
Python – tensorflow.convert_to_tensor() | 26 Jun, 2020
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
convert_to_tensor() is used to convert the given value to a Tensor
Syntax: tensorflow.convert_to_tensor( value, dtype, dtype_hint, name )
Parameters:
value: It is the value tha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jun, 2020"
},
{
"code": null,
"e": 159,
"s": 28,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks."
},
{
"code": null,
"e": 226,
... |
ML | Logistic Regression v/s Decision Tree Classification | 25 Aug, 2021
Logistic Regression and Decision Tree classification are two of the most popular and basic classification algorithms being used today. None of the algorithms is better than the other and one’s superior performance is often credited to the nature of the data being worked upon.
We can compare the two algori... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "Logistic Regression and Decision Tree classification are two of the most popular and basic classification algorithms being used today. None of the algorithms is better than th... |
jQuery | Animation, Slide methods with Examples | 12 Feb, 2019
jQuery is a very powerful JavaScript framework.Using jQuery, we can add special effects to our website or web-based application.We can add various effects using jQuery such as hide/show, fading effects, animation, call back and many more.For hide/show, Toggle, Fade effect.The jQuery contains the library of... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Feb, 2019"
},
{
"code": null,
"e": 571,
"s": 52,
"text": "jQuery is a very powerful JavaScript framework.Using jQuery, we can add special effects to our website or web-based application.We can add various effects using jQuery such a... |
Lodash _.transform() Method | 27 Jul, 2021
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, lang, function, objects, numbers etc. The _.transform() method is an alternative to _.reduce() method transforms object to a new accumulator object which is the result of running... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 565,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, lang, function, objects, numbers etc. The _.tr... |
Insert a node at a specific position in a linked list | 24 Jun, 2022
Given a singly linked list, a position and an element, the task is to write a program to insert that element in a linked list at a given position.
Examples:
Input: 3->5->8->10, data = 2, position = 2
Output: 3->2->5->8->10
Input: 3->5->8->10, data = 11, position = 5
Output: 3->5->8->10->11
Approach: To... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 202,
"s": 54,
"text": "Given a singly linked list, a position and an element, the task is to write a program to insert that element in a linked list at a given position. "
},
{
"code": null... |
Shell Script to Split a String | 20 Jun, 2021
Shell Scripting or Shell Programming is just like any other programming language. A shell is a special program that provides an interface between the user and the operating system.
In Linux/Unix the default shell used is bash and in windows, it is cmd(command prompt). We use the terminal to run a shell com... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2021"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "Shell Scripting or Shell Programming is just like any other programming language. A shell is a special program that provides an interface between the user and the operating sy... |
Python calendar module | setfirstweekday() method | 22 Oct, 2018
Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions.
In Python, calendar.setfirstweekday... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Oct, 2018"
},
{
"code": null,
"e": 300,
"s": 28,
"text": "Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use... |
Remove border from IFrame using CSS | 04 Dec, 2018
The Iframe is used to display a web page on the webpage. Remove border from iframe tag in the webpage could be done by using one of the CSS properties of the iframe tag called frameBorder and set its value to “0”.
Syntax:
frameBorder = "value";
Note: In the frameBorder property the B letter must be in capi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "The Iframe is used to display a web page on the webpage. Remove border from iframe tag in the webpage could be done by using one of the CSS properties of the iframe tag called... |
Twin Prime Numbers between 1 and n | 05 Apr, 2021
Given an integer n. we need to print all twin prime number pairs between 1 to n. A Twin prime are those numbers which are prime and having a difference of two ( 2 ) between the two prime numbers. In other words, a twin prime is a prime that has a prime gap of two. Sometimes the term twin prime is used for ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 723,
"s": 52,
"text": "Given an integer n. we need to print all twin prime number pairs between 1 to n. A Twin prime are those numbers which are prime and having a difference of two ( 2 ) between t... |
How to Build a Photo Viewing Application in Android? | 20 Jun, 2022
Gallery app is one of the most used apps which comes pre-installed on many android devices and there are several different apps that are present in Google Play to view the media files present in your device. In this article, we will be simply creating a Gallery app in which we can view all the photos which... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "Gallery app is one of the most used apps which comes pre-installed on many android devices and there are several different apps that are present in Google Play to view the med... |
Stream anyMatch() in Java with examples | 06 Dec, 2018
Stream anyMatch(Predicate predicate) returns whether any elements of this stream match the provided predicate. It may not evaluate the predicate on all elements if not necessary for determining the result. This is a short-circuiting terminal operation. A terminal operation is short-circuiting if, when pres... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 427,
"s": 52,
"text": "Stream anyMatch(Predicate predicate) returns whether any elements of this stream match the provided predicate. It may not evaluate the predicate on all elements if not necess... |
Remove all leaf nodes from a Generic Tree or N-ary Tree | 13 Aug, 2021
Given a Generic tree, the task is to delete the leaf nodes from the tree.
Examples:
Input:
5
/ / \ \
1 2 3 8
/ / \ \
15 4 5 6
Output:
5 : 1 2 3
1 :
2 :
3 :
Explanation:
Deleted leafs are:
8, 15, 4, 5, 6
Input:
8
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 126,
"s": 52,
"text": "Given a Generic tree, the task is to delete the leaf nodes from the tree."
},
{
"code": null,
"e": 137,
"s": 126,
"text": " Examples:"
},
{
"code"... |
Private bytes, Virtual bytes, Working set | 31 Aug, 2021
In this article, we are going to understand private bytes, virtual bytes, and working sets.
Private Bytes :As a result of completely paging out the process’s private memory footprint to swap, Private Bytes summarizes the amount of RAM allocated to the process (though not necessarily used).
Process executab... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 144,
"s": 52,
"text": "In this article, we are going to understand private bytes, virtual bytes, and working sets."
},
{
"code": null,
"e": 343,
"s": 144,
"text": "Private Bytes... |
Geek and Books | Practice | GeeksforGeeks | Geek has several competitive programming books and he wants to place books one on another (like a stack). There are total Q queries of two types.
Type 1: This query is represented by "place x", where x is an integer represents a number of the book geek wants to place on the top of the stack.
Type 2: This query is repr... | [
{
"code": null,
"e": 766,
"s": 226,
"text": "Geek has several competitive programming books and he wants to place books one on another (like a stack). There are total Q queries of two types.\n\nType 1: This query is represented by \"place x\", where x is an integer represents a number of the book ge... |
smartd - Unix, Linux Command | smartd will attempt to enable SMART monitoring on ATA devices
(equivalent to smartctl -s on) and polls these and SCSI devices
every 30 minutes (configurable), logging SMART errors and changes of
SMART Attributes via the SYSLOG interface. The default location for
these SYSLOG notifications and warnings is /var/log/mess... | [
{
"code": null,
"e": 11003,
"s": 10585,
"text": "\nsmartd will attempt to enable SMART monitoring on ATA devices\n(equivalent to smartctl -s on) and polls these and SCSI devices\nevery 30 minutes (configurable), logging SMART errors and changes of\nSMART Attributes via the SYSLOG interface. The def... |
How do we use Python in script mode? | It is possible to execute Python script from command line. Python program can be written by any text editor (preferably a Python aware text editor) and saved with .py extension. To write basic Hello World program using IDLE, the Python IDE shipped with standard Python distribution, open the editor choosing File->New.
T... | [
{
"code": null,
"e": 1381,
"s": 1062,
"text": "It is possible to execute Python script from command line. Python program can be written by any text editor (preferably a Python aware text editor) and saved with .py extension. To write basic Hello World program using IDLE, the Python IDE shipped with ... |
Extracting (digitising) data from plots in scientific papers or images | by Daniel Ellis | Towards Data Science | Often we see a graphic of interest and want to apply the data to our own interest and designs. This frequently occurs within academia, where research needs to be compared to that already existing within scientific journals and in data visualisation where historic figures can be built upon and improved (with the additio... | [
{
"code": null,
"e": 515,
"s": 171,
"text": "Often we see a graphic of interest and want to apply the data to our own interest and designs. This frequently occurs within academia, where research needs to be compared to that already existing within scientific journals and in data visualisation where ... |
Time and Space Complexity in Data Structure | Analysis of efficiency of an algorithm can be performed at two different stages, before implementation and after implementation, as
A priori analysis − This is defined as theoretical analysis of an algorithm. Efficiency of algorithm is measured by assuming that all other factors e.g. speed of processor, are constant an... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "Analysis of efficiency of an algorithm can be performed at two different stages, before implementation and after implementation, as"
},
{
"code": null,
"e": 1418,
"s": 1194,
"text": "A priori analysis − This is defined as theoretical... |
CNNs for Audio Classification. A primer in deep learning for audio... | by Papia Nandi | Towards Data Science | CNNs or convolutional neural nets are a type of deep learning algorithm that does really well at learning images.
That’s because they can learn patterns that are translation invariant and have spatial hierarchies (F. Chollet, 2018).
That means if If the CNN learns the dog in the left corner of the image above, then it ... | [
{
"code": null,
"e": 286,
"s": 172,
"text": "CNNs or convolutional neural nets are a type of deep learning algorithm that does really well at learning images."
},
{
"code": null,
"e": 405,
"s": 286,
"text": "That’s because they can learn patterns that are translation invariant an... |
Python program to find all close matches of input string from a list | In this tutorial, we are going to find a solution to a problem. Let's see what the problem is. We have a list of strings and an element. We have to find strings from a list in which they must closely match to the given element. See the example.
Inputs
strings = ["Lion", "Li", "Tiger", "Tig"] element = "Lion"
Ouput
Lion... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "In this tutorial, we are going to find a solution to a problem. Let's see what the problem is. We have a list of strings and an element. We have to find strings from a list in which they must closely match to the given element. See the example."
},
... |
What is the purpose and usage of “WHERE CURRENT OF” clause in a COBOL-DB2 program? | The “WHERE CURRENT OF” clause will place the exclusive lock on the row once the UPDATE statement is executed. The “WHERE CURRENT OF” clause will point to the most recently fetched row of the cursor.
We can update the rows in cursor using “WHERE CURRENT OF” in the following way.
CURSOR definition.
CURSOR definition.
EXE... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "The “WHERE CURRENT OF” clause will place the exclusive lock on the row once the UPDATE statement is executed. The “WHERE CURRENT OF” clause will point to the most recently fetched row of the cursor."
},
{
"code": null,
"e": 1341,
"s": 12... |
Implementing Strassen’s Algorithm in Java - GeeksforGeeks | 13 Aug, 2021
Strassen’s algorithm is used for the multiplication of Square Matrices that is the order of matrices should be (N x N). Strassen’s Algorithm is based on the divide and conquer technique. In simpler terms, it is used for matrix multiplication. Strassen’s method of matrix multiplication is a typical divide... | [
{
"code": null,
"e": 23581,
"s": 23553,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 24123,
"s": 23581,
"text": "Strassen’s algorithm is used for the multiplication of Square Matrices that is the order of matrices should be (N x N). Strassen’s Algorithm is based on the divi... |
Java NIO - CharSet | In Java for every character there is a well defined unicode code units which is internally handled by JVM.So Java NIO package defines an abstract class named as Charset which is mainly used for encoding and decoding of charset and UNICODE.
The supported Charset in java are given below.
US-ASCII − Seven bit ASCII charac... | [
{
"code": null,
"e": 2224,
"s": 1984,
"text": "In Java for every character there is a well defined unicode code units which is internally handled by JVM.So Java NIO package defines an abstract class named as Charset which is mainly used for encoding and decoding of charset and UNICODE."
},
{
... |
Hive - Drop Table - GeeksforGeeks | 04 Nov, 2020
Apache hive is a data warehousing tool that we use to manage our structure data on Hadoop. The tables in the hive are used for storing data in tabular format(structured). Hive is very much capable such that it can query petabytes of records stored inside the hive table.
DROP TABLE command in the hive is us... | [
{
"code": null,
"e": 25591,
"s": 25563,
"text": "\n04 Nov, 2020"
},
{
"code": null,
"e": 25862,
"s": 25591,
"text": "Apache hive is a data warehousing tool that we use to manage our structure data on Hadoop. The tables in the hive are used for storing data in tabular format(struc... |
Android LinearLayout in Kotlin - GeeksforGeeks | 16 Mar, 2022
Android LinearLayout is a ViewGroup subclass, used to provide child View elements one by one either in a particular direction either horizontally or vertically based on the orientation property. We can specify the linear layout orientation using android:orientation attribute.
All the child elements arrange... | [
{
"code": null,
"e": 25721,
"s": 25693,
"text": "\n16 Mar, 2022"
},
{
"code": null,
"e": 25998,
"s": 25721,
"text": "Android LinearLayout is a ViewGroup subclass, used to provide child View elements one by one either in a particular direction either horizontally or vertically bas... |
Class getDeclaredMethod() method in Java with Examples - GeeksforGeeks | 16 Dec, 2019
The getDeclaredMethod() method of java.lang.Class class is used to get the specified method of this class with the specified parameter type. The method returns the specified method of this class in the form of Method object.
Syntax:
public Method getDeclaredMethod(String methodName,
... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n16 Dec, 2019"
},
{
"code": null,
"e": 25450,
"s": 25225,
"text": "The getDeclaredMethod() method of java.lang.Class class is used to get the specified method of this class with the specified parameter type. The method returns the... |
WeakHashMap Class in Java - GeeksforGeeks | 24 Jan, 2022
WeakHashMap is an implementation of the Map interface. WeakHashMap is almost the same as HashMap except in the case of WeakHashMap if the object is specified as the key doesn’t contain any references- it is eligible for garbage collection even though it is associated with WeakHashMap. i.e Garbage Collector... | [
{
"code": null,
"e": 25441,
"s": 25413,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 25777,
"s": 25441,
"text": "WeakHashMap is an implementation of the Map interface. WeakHashMap is almost the same as HashMap except in the case of WeakHashMap if the object is specified as th... |
Number of Groups of Sizes Two Or Three Divisible By 3 - GeeksforGeeks | 16 Apr, 2021
You are given N distinct numbers. You are tasked with finding the number of groups of 2 or 3 that can be formed whose sum is divisible by three.Examples :
Input : 1 5 7 2 9 14
Output : 13
The groups of two that can be
formed are:
(1, 5)
(5, 7)
(1, 2)
(2, 7)
(1, 14)
(7, 14)
The groups of three are:
(1, ... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 26120,
"s": 25963,
"text": "You are given N distinct numbers. You are tasked with finding the number of groups of 2 or 3 that can be formed whose sum is divisible by three.Examples : "
},
... |
Concatenate images using OpenCV in Python - GeeksforGeeks | 28 Jul, 2020
To concatenate images vertically and horizontally with Python, cv2 library comes with two functions as:
hconcat(): It is used as cv2.hconcat() to concatenate images horizontally. Here h means horizontal.vconcat(): It is used as cv2.vconcat() to concatenate images vertically. Here v means vertical.
hconcat(... | [
{
"code": null,
"e": 26397,
"s": 26369,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 26501,
"s": 26397,
"text": "To concatenate images vertically and horizontally with Python, cv2 library comes with two functions as:"
},
{
"code": null,
"e": 26696,
"s": 26501,... |
Python VLC MediaPlayer – Setting Volume - GeeksforGeeks | 11 Apr, 2022
In this article we will see how we can set volume of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaPlayer object is the basic object in vlc module f... | [
{
"code": null,
"e": 25725,
"s": 25697,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 26188,
"s": 25725,
"text": "In this article we will see how we can set volume of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-pla... |
PyQt5 - Getting the text of selected item in ComboBox - GeeksforGeeks | 22 Apr, 2020
In this article we will see how we can get the text i.e content of current item selected in the combo box, in order to do this we will use the currentText method.
Syntax : combo_box.currentText()
Argument : It takes no argument
Return : It return string
Steps for implementation –
1. Create a combo box2. Ad... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 26234,
"s": 26071,
"text": "In this article we will see how we can get the text i.e content of current item selected in the combo box, in order to do this we will use the currentText method."... |
Rearrange array to obtain maximum possible value of concatenation of prefix GCDs - GeeksforGeeks | 28 Feb, 2022
Given an array arr[] consisting of N positive integers, the task is to rearrange the array elements such that the number formed by concatenating the GCD of elements of the array arr[] from index 0 to i for each index i is the maximum possible.
Examples:
Input: arr[] = {4, 2, 5}Output: 5 4 2Explanation:X = ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 26285,
"s": 26041,
"text": "Given an array arr[] consisting of N positive integers, the task is to rearrange the array elements such that the number formed by concatenating the GCD of element... |
Remove last n rows of a Pandas DataFrame - GeeksforGeeks | 29 Jul, 2021
Let’s see the various methods to Remove last n rows of a Pandas Dataframe.First, let’s make a dataframe:
Python3
# Import Required Librariesimport pandas as pd # Create a dictionary for the dataframedict = { 'Name': ['Sukritin', 'Sumit Tyagi', 'Akriti Goel', 'Sanskriti', 'Abhishek Jain'], 'Age'... | [
{
"code": null,
"e": 26287,
"s": 26259,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 26392,
"s": 26287,
"text": "Let’s see the various methods to Remove last n rows of a Pandas Dataframe.First, let’s make a dataframe:"
},
{
"code": null,
"e": 26400,
"s": 26392... |
PyQt5 QComboBox - Setting mouse tracking - GeeksforGeeks | 10 May, 2020
In this article we will see how we can set mouse tracking to the combo box, combo box receive signal about the mouse when any button is pressed but after mouse tracking it will receive all the signals about the mouse even if any button is not pressed. By default this property is False.
In order to turn on ... | [
{
"code": null,
"e": 26233,
"s": 26205,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26520,
"s": 26233,
"text": "In this article we will see how we can set mouse tracking to the combo box, combo box receive signal about the mouse when any button is pressed but after mouse tra... |
How to select ID that starts with certain character using jQuery ? - GeeksforGeeks | 28 Jun, 2019
Given an HTML document and the task is to select the elements with ID starts with certain characters using jQuery.
Approach: Use jQuery [attribute^=value] Selector to select the element with ID starts with certain characters.
Example 1: This example selects that element whose ID starts with ‘GFG’ and chang... | [
{
"code": null,
"e": 25929,
"s": 25901,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 26044,
"s": 25929,
"text": "Given an HTML document and the task is to select the elements with ID starts with certain characters using jQuery."
},
{
"code": null,
"e": 26155,
... |
Matplotlib.pyplot.gca() in Python - GeeksforGeeks | 01 Jul, 2021
Matplotlib is a library in Python and it is a numerical – mathematical extension for the NumPy library. Pyplot is a state-based interface to a Matplotlib module that provides a MATLAB-like interface.
The gca() function in pyplot module of matplotlib library is used to get the current Axes instance on the... | [
{
"code": null,
"e": 26178,
"s": 26150,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 26380,
"s": 26178,
"text": "Matplotlib is a library in Python and it is a numerical – mathematical extension for the NumPy library. Pyplot is a state-based interface to a Matplotlib module th... |
Offset-Fetch in MS SQL Server - GeeksforGeeks | 29 Jul, 2020
Suppose a table has 30 rows. A user wants to extract list of last 10 rows and skip topmost rows. To make job easier, the offset-fetch clause is used in the query.
Syntax :
order by column_list[ASC|DESC]
Offset offset_row count{ROW|ROWS}
Fetch{FIRST|NEXT} fetch row_count {ROW|ROWS} only
Analysis of Syntax ... | [
{
"code": null,
"e": 25219,
"s": 25191,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 25382,
"s": 25219,
"text": "Suppose a table has 30 rows. A user wants to extract list of last 10 rows and skip topmost rows. To make job easier, the offset-fetch clause is used in the query."... |
Git - Update Operation | Tom performs the clone operation and finds a new file string.c. He wants to know who added this file to the repository and for what purpose, so, he executes the git log command.
[tom@CentOS ~]$ git clone gituser@git.server.com:project.git
The above command will produce the following result −
Initialized empty Git repo... | [
{
"code": null,
"e": 2223,
"s": 2045,
"text": "Tom performs the clone operation and finds a new file string.c. He wants to know who added this file to the repository and for what purpose, so, he executes the git log command."
},
{
"code": null,
"e": 2285,
"s": 2223,
"text": "[tom... |
How to multiple a matrix rows in R with a vector? | When we multiple a matrix with a vector in R, the multiplication is done by column but if we want to do it with rows then we can use transpose function. We can multiply the transpose of the matrix with the vector and then take the transpose of that multiplication this will result in the multiplication by rows.
Consider... | [
{
"code": null,
"e": 1374,
"s": 1062,
"text": "When we multiple a matrix with a vector in R, the multiplication is done by column but if we want to do it with rows then we can use transpose function. We can multiply the transpose of the matrix with the vector and then take the transpose of that mult... |
Hyper-Parameter Tuning and Model Selection, Like a Movie Star | by Caleb Neale | Towards Data Science | “Hyper-parameter tuning for random forest classifier optimization” is one of those phrases which would sound just as at ease in a movie scene where hackers are aggressively typing to “gain access to the mainframe” as it does in a Medium article on Towards Data science. The reality of it, however, is that phrases like t... | [
{
"code": null,
"e": 946,
"s": 171,
"text": "“Hyper-parameter tuning for random forest classifier optimization” is one of those phrases which would sound just as at ease in a movie scene where hackers are aggressively typing to “gain access to the mainframe” as it does in a Medium article on Towards... |
How to push new items to an array inside of an object in MongoDB? | You can use $elemMatch operator for this. Let us first create a collection with documents −
> db.pushNewItemsDemo.insertOne(
{
"_id" :1,
"StudentScore" : 56,
"StudentOtherDetails" : [
{
"StudentName" : "John",
"StudentFriendName" : [
"Bob",
... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "You can use $elemMatch operator for this. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1640,
"s": 1154,
"text": "> db.pushNewItemsDemo.insertOne(\n {\n \"_id\" :1,\n \"StudentScore\" : 56,\n ... |
VB.Net - PrintDialog Control | The PrintDialog control lets the user to print documents by selecting a printer and choosing which sections of the document to print from a Windows Forms application.
There are various other controls related to printing of documents. Let us have a brief look at these controls and their purpose. These other controls are... | [
{
"code": null,
"e": 2467,
"s": 2300,
"text": "The PrintDialog control lets the user to print documents by selecting a printer and choosing which sections of the document to print from a Windows Forms application."
},
{
"code": null,
"e": 2623,
"s": 2467,
"text": "There are vario... |
Extract only characters from given string in Python | A piece of data may contain letters, numbers as well as special characters. If we are interested in extracting only the letters form this string of data, then we can use various options available in python.
The isalpha function will check if the given character is an alphabet or not. We will use this inside a for loop ... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "A piece of data may contain letters, numbers as well as special characters. If we are interested in extracting only the letters form this string of data, then we can use various options available in python."
},
{
"code": null,
"e": 1540,
... |
Use of bool in C - GeeksforGeeks | 14 Oct, 2020
Prerequisite: Bool Data Type in C++The C99 standard for C language supports bool variables. Unlike C++, where no header file is needed to use bool, a header file “stdbool.h” must be included to use bool in C. If we save the below program as .c, it will not compile, but if we save it as .cpp, it will work f... | [
{
"code": null,
"e": 24444,
"s": 24416,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 24758,
"s": 24444,
"text": "Prerequisite: Bool Data Type in C++The C99 standard for C language supports bool variables. Unlike C++, where no header file is needed to use bool, a header file “... |
AI with Python â Analyzing Time Series Data | Predicting the next in a given input sequence is another important concept in machine learning. This chapter gives you a detailed explanation about analyzing time series data.
Time series data means the data that is in a series of particular time intervals. If we want to build sequence prediction in machine learning, t... | [
{
"code": null,
"e": 2381,
"s": 2205,
"text": "Predicting the next in a given input sequence is another important concept in machine learning. This chapter gives you a detailed explanation about analyzing time series data."
},
{
"code": null,
"e": 2684,
"s": 2381,
"text": "Time s... |
How to use regular expressions in xpath in Selenium with python? | We can identify elements by matching its attributes partially with the help of regular expressions. In xpath, there are multiple methods to achieve this. They are listed below −
Using the contains() method. This means the string contains our given text.
Using the contains() method. This means the string contains our gi... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "We can identify elements by matching its attributes partially with the help of regular expressions. In xpath, there are multiple methods to achieve this. They are listed below −"
},
{
"code": null,
"e": 1316,
"s": 1240,
"text": "Usin... |
How can we read a JSON file in Java? | The JSON is one of the widely used data-interchange formats and is a lightweight and language independent. The json.simple is a lightweight JSON processing library that can be used to read and write JSON files and it can be used to encode or decode JSON text and fully compliant with JSON specification (RFC4627). In ord... | [
{
"code": null,
"e": 1608,
"s": 1187,
"text": "The JSON is one of the widely used data-interchange formats and is a lightweight and language independent. The json.simple is a lightweight JSON processing library that can be used to read and write JSON files and it can be used to encode or decode JSON... |
Matplotlib.axes.Axes.set_visible() in Python | 30 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": 28,
"s": 0,
"text": "\n30 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"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, Line2D, Text... |
Reverse a stack using recursion | 25 Jun, 2022
Write a program to reverse a stack using recursion. You are not allowed to use loop constructs like while, for..etc, and you can only use the following ADT functions on Stack S: isEmpty(S) push(S) pop(S)
The idea of the solution is to hold all values in Function Call Stack until the stack becomes empty. Wh... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Jun, 2022"
},
{
"code": null,
"e": 258,
"s": 54,
"text": "Write a program to reverse a stack using recursion. You are not allowed to use loop constructs like while, for..etc, and you can only use the following ADT functions on Stack... |
How to create refs in ReactJS? | 25 Jan, 2021
Creating refs in ReactJS is very simple. Refs are generally used for the following purposes:
Managing focus, text selection, or media playback.
Triggering imperative animations.
Integrating with third-party DOM libraries.
Note: You should avoid using refs for anything that can be done declaratively.
The fo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jan, 2021"
},
{
"code": null,
"e": 121,
"s": 28,
"text": "Creating refs in ReactJS is very simple. Refs are generally used for the following purposes:"
},
{
"code": null,
"e": 172,
"s": 121,
"text": "Managing focu... |
Last Minute Notes – Discrete Mathematics | 28 Jun, 2021
See Last Minute Notes on all subjects here.
Implication( →): For any two propositions p and q, the statement “if p then q” is called an implication and it is denoted by p → q.if and only if(↔): For any two propositions p and q, the statement “p if and only if(iff) q” is called a biconditional and it is den... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 96,
"s": 52,
"text": "See Last Minute Notes on all subjects here."
},
{
"code": null,
"e": 7198,
"s": 96,
"text": "Implication( →): For any two propositions p and q, the stateme... |
How to create a Venn Diagram in R ? | 17 Jun, 2021
Venn diagram is the graphical representation of sets used for showing the relationship between them. Through the use of Venn diagram one can highlight the differences as well as similarities between elements of sets. Venn diagram is also known as Logic diagram or set diagram. We use circles to represent se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 570,
"s": 28,
"text": "Venn diagram is the graphical representation of sets used for showing the relationship between them. Through the use of Venn diagram one can highlight the differences as well ... |
C program to reverse the content of the file and print it | 17 Feb, 2022
Given a text file in a directory, the task is to print the file content backward i.e., the last line should get printed first, 2nd last line should be printed second, and so on.Examples:
Input: file1.txt has: Welcome to GeeksforGeeks Output: GeeksforGeeks to WelcomeGeeksforGeeks Input: file1.txt has: Thi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 241,
"s": 52,
"text": "Given a text file in a directory, the task is to print the file content backward i.e., the last line should get printed first, 2nd last line should be printed second, and so ... |
How to get decimal portion of a number using JavaScript ? | 12 May, 2021
Given a float number, The task is to separate the number into the integer and decimal part using JavaScript. For example, a value of 15.6 would be split into two numbers, i.e. 15 and 0.6 Here are few methods discussed.
Method 1: Using split() method. This method is used to split a string into an array of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 248,
"s": 28,
"text": "Given a float number, The task is to separate the number into the integer and decimal part using JavaScript. For example, a value of 15.6 would be split into two numbers, i.e.... |
Perl | defined() Function | 21 Feb, 2019
Defined() in Perl returns true if the provided variable ‘VAR’ has a value other than the undef value, or it checks the value of $_ if VAR is not specified. This can be used with many functions to detect for the failure of operation since they return undef if there was a problem.
If VAR is a function or ref... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 308,
"s": 28,
"text": "Defined() in Perl returns true if the provided variable ‘VAR’ has a value other than the undef value, or it checks the value of $_ if VAR is not specified. This can be used wi... |
How to get all the methods of an object using JavaScript ? | 23 Dec, 2019
An HTML document contains some methods and the task is to get all methods of the object. There are two methods to solve this problem which are discussed below:
Approach 1:
Create a function which takes object as input.
Use typeof operator, which checks if the type of object is function or not.
If the type ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2019"
},
{
"code": null,
"e": 188,
"s": 28,
"text": "An HTML document contains some methods and the task is to get all methods of the object. There are two methods to solve this problem which are discussed below:"
},
{
"... |
How to create Threads in C# | 24 Jan, 2019
In C#, a multi-threading system is built upon the Thread class, which encapsulates the execution of threads. This class contains several methods and properties which helps in managing and creating threads and this class is defined under System.Threading namespace. The System.Threading namespace provides cl... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Jan, 2019"
},
{
"code": null,
"e": 424,
"s": 53,
"text": "In C#, a multi-threading system is built upon the Thread class, which encapsulates the execution of threads. This class contains several methods and properties which helps in... |
Get length of a string in Julia – length() Method | 26 Mar, 2020
The length() is an inbuilt function in julia which is used to return the length of the specified string with desired starting and end position.
Syntax:length(S::AbstractString)orlength(S::AbstractString, i::Integer, j::Integer)
Parameters:
S::AbstractString: Specified string
i::Integer: Inclusive starting ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "The length() is an inbuilt function in julia which is used to return the length of the specified string with desired starting and end position."
},
{
"code": null,
... |
How to use the foreach loop parallelly in PowerShell? | There are two ways to use the foreach loop parallelly in PowerShell.
Using Foreach-Object -Parallel command (Supports in PowerShell 7.0 or above)
Using Foreach-Object -Parallel command (Supports in PowerShell 7.0 or above)
Using Foreach -Parallel in Workflow (Supports PowerShell 5.1 or below)
Using Foreach -Parallel in... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "There are two ways to use the foreach loop parallelly in PowerShell."
},
{
"code": null,
"e": 1208,
"s": 1131,
"text": "Using Foreach-Object -Parallel command (Supports in PowerShell 7.0 or above)"
},
{
"code": null,
"e":... |
Dynamic Button in Kotlin - GeeksforGeeks | 11 Sep, 2021
In Android, a button represent something that can be clicked by the user to perform some action.Firstly, we need to create a project in Android Studio. To do follow these steps:
Click on File, then New, and then New Project, and give name whatever you like:
Click on File, then New, and then New Project, a... | [
{
"code": null,
"e": 23954,
"s": 23926,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 24132,
"s": 23954,
"text": "In Android, a button represent something that can be clicked by the user to perform some action.Firstly, we need to create a project in Android Studio. To do follo... |
Which library should I use for my Python dashboard? | by Antoine Hue | Towards Data Science | When it comes to data visualization there are many possible tools Matplotlib, Plotly, Bokeh... Which one is fitting my short term goals, within a notebook, and is a good choice for longer-term, in production? What does production mean?
Now that you have a nice machine learning model, or you have completed some data min... | [
{
"code": null,
"e": 408,
"s": 172,
"text": "When it comes to data visualization there are many possible tools Matplotlib, Plotly, Bokeh... Which one is fitting my short term goals, within a notebook, and is a good choice for longer-term, in production? What does production mean?"
},
{
"code... |
How to align multiple plots in a grid using GridSpec Class in Matplotlib | Aligning the multiple plots in a grid can be very messy and it can create multiple issues like higher width and height or minimal width to align all the plots. In order to align all the plots in a grid, we use GridSpec class.
Let us suppose that we have a bar graph plot and we want to align the symmetry of the plot in ... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "Aligning the multiple plots in a grid can be very messy and it can create multiple issues like higher width and height or minimal width to align all the plots. In order to align all the plots in a grid, we use GridSpec class."
},
{
"code": null,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.