title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Understanding CSS Absolute and Relative Units | The absolute length units are fixed in relation to each other. These units are used when the output format is already known. Following are some of the Absolute Length Units −
picas (1pc = 12 pt)
Let us now see an example −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline underline;
... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "The absolute length units are fixed in relation to each other. These units are used when the output format is already known. Following are some of the Absolute Length Units −"
},
{
"code": null,
"e": 1257,
"s": 1237,
"text": "picas (... |
Java Program to Check if a Given Integer is Positive or Negative - GeeksforGeeks | 14 Sep, 2021
Here, the task is to check whether the given integer number is positive or negative. Below are some basic properties of a number.
If the Integer is greater than zero then it is a positive integer.
If the number is less than zero then it is a negative integer.
If the number is equal to zero then it is neith... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 23687,
"s": 23557,
"text": "Here, the task is to check whether the given integer number is positive or negative. Below are some basic properties of a number."
},
{
"code": null,
"... |
MLOps with Docker and Jenkins: Automating Machine Learning Pipelines | by Adrián González Carpintero | Towards Data Science | The purpose of this post is to provide an example of how we can use DevOps tools like Docker and Jenkins to automate a Machine Learning Pipeline. At the end of this post, you will know how to containerize a Machine Learning model with Docker and create a pipeline with Jenkins that automatically process raw data, trains... | [
{
"code": null,
"e": 574,
"s": 172,
"text": "The purpose of this post is to provide an example of how we can use DevOps tools like Docker and Jenkins to automate a Machine Learning Pipeline. At the end of this post, you will know how to containerize a Machine Learning model with Docker and create a ... |
F# - Strings | In F#, the string type represents immutable text as a sequence of Unicode characters.
String literals are delimited by the quotation mark (") character.
Some special characters are there for special uses like newline, tab, etc. They are encoded using backslash (\) character. The backslash character and the related char... | [
{
"code": null,
"e": 2247,
"s": 2161,
"text": "In F#, the string type represents immutable text as a sequence of Unicode characters."
},
{
"code": null,
"e": 2314,
"s": 2247,
"text": "String literals are delimited by the quotation mark (\") character."
},
{
"code": null,
... |
Tkinter - Button that changes its properties on hover - GeeksforGeeks | 08 Dec, 2020
Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to create GUI applications. Cre... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 25997,
"s": 25647,
"text": "Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standar... |
set clear() in python | In this tutorial, we are going to learn about the clear method of set data structure. Let's see details about the clear method.
The method clear is used to clear all the data from the set data structure. All elements from set will clear. And we will leave with an empty set.
Follow the below steps to see clear method in... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "In this tutorial, we are going to learn about the clear method of set data structure. Let's see details about the clear method."
},
{
"code": null,
"e": 1337,
"s": 1190,
"text": "The method clear is used to clear all the data from th... |
Loading Excel spreadsheet as pandas DataFrame - GeeksforGeeks | 08 Jan, 2019
Pandas is a very powerful and scalable tool for data analysis. It supports multiple file format as we might get the data in any format. Pandas also have support for excel file format.
We first need to import Pandas and load excel file, and then parse excel file sheets as a Pandas dataframe.
import pandas a... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 25831,
"s": 25647,
"text": "Pandas is a very powerful and scalable tool for data analysis. It supports multiple file format as we might get the data in any format. Pandas also have support fo... |
Python Program to Count number of binary strings without consecutive 1's - GeeksforGeeks | 02 Jan, 2019
Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s.
Examples:
Input: N = 2
Output: 3
// The 3 strings are 00, 01, 10
Input: N = 3
Output: 5
// The 5 strings are 000, 001, 010, 100, 101
Python3
# Python program to count# all distinct b... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n02 Jan, 2019"
},
{
"code": null,
"e": 26220,
"s": 26097,
"text": "Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s."
},
{
"code": null,
"e": 262... |
JavaScript Math PI Property - GeeksforGeeks | 24 Jan, 2022
Below is the example of the Math PI Property.
Example:
Javascript
<script> // Here value of Math.PI is printed. document.write(Math.PI);</script>
Output:
3.141592653589793
The Math.PI is a property in JavaScript which is simply used to find the value of Pi i.e, in symbolic form Π which is nothing but i... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 26592,
"s": 26545,
"text": "Below is the example of the Math PI Property. "
},
{
"code": null,
"e": 26601,
"s": 26592,
"text": "Example:"
},
{
"code": null,
"e... |
GATE | GATE-CS-2004 | Question 11 - GeeksforGeeks | 28 Jun, 2021
Consider the following statements with respect to user-level threads and kernel supported threads
i. context switch is faster with kernel-supported threads
ii. for user-level threads, a system call can block the
entire process
iii. Kernel supported threads can be scheduled independently
iv. Use... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25793,
"s": 25695,
"text": "Consider the following statements with respect to user-level threads and kernel supported threads"
},
{
"code": null,
"e": 26048,
"s": 25793,
"... |
How to install Python Pycharm on Windows? - GeeksforGeeks | 28 Jan, 2020
Prerequisite: Python Language Introduction Python is a widely-used general-purpose, high-level programming language. It was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on code readability, and its syntax allows programmers... | [
{
"code": null,
"e": 25857,
"s": 25829,
"text": "\n28 Jan, 2020"
},
{
"code": null,
"e": 26927,
"s": 25857,
"text": "Prerequisite: Python Language Introduction Python is a widely-used general-purpose, high-level programming language. It was initially designed by Guido van Rossum ... |
Reader reset() method in Java with Examples - GeeksforGeeks | 13 Feb, 2019
The reset() method of Reader Class in Java is used to reset the stream. After reset, if the stream has been marked, then this method attempts to reposition it at the mark, else it will try to position it to the starting.
Syntax:
public void reset()
Parameters: This method do not accepts any parameter.
Retu... | [
{
"code": null,
"e": 26161,
"s": 26133,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 26382,
"s": 26161,
"text": "The reset() method of Reader Class in Java is used to reset the stream. After reset, if the stream has been marked, then this method attempts to reposition it at t... |
Maximum length of all possible K equal length ropes generated by cutting N ropes - GeeksforGeeks | 15 Jun, 2021
Given an array arr[] consisting of N positive integers representing the lengths of N ropes and a positive integer K, the task is to find the maximum length of the rope that has a frequency of at least K by cutting any ropes in any number of pieces.
Examples:
Input: arr[] = {5, 2, 7, 4, 9}, K = 5Output: 4Ex... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n15 Jun, 2021"
},
{
"code": null,
"e": 26316,
"s": 26067,
"text": "Given an array arr[] consisting of N positive integers representing the lengths of N ropes and a positive integer K, the task is to find the maximum length of the ... |
Python String isprintable() Method - GeeksforGeeks | 12 Aug, 2021
Python String isprintable() is a built-in method used for string handling. The isprintable() method returns “True” if all characters in the string are printable or the string is empty, Otherwise, It returns “False”. This function is used to check if the argument contains any printable characters such as:
D... | [
{
"code": null,
"e": 25047,
"s": 25019,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 25353,
"s": 25047,
"text": "Python String isprintable() is a built-in method used for string handling. The isprintable() method returns “True” if all characters in the string are printable or... |
Sending a Text Message Over the Phone Using SmsManager in Android - GeeksforGeeks | 23 Dec, 2021
This article is about sending a text SMS over the phone using the SMSManager class in an Android application. For this, a basic knowledge of the fundamentals of android app development, creating a new project, running an android app, Views, and handling of click event buttons is required.
SMSManager clas... | [
{
"code": null,
"e": 26049,
"s": 26021,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 26341,
"s": 26049,
"text": "This article is about sending a text SMS over the phone using the SMSManager class in an Android application. For this, a basic knowledge of the fundamentals of an... |
Replace NaN Values with Zeros in Pandas DataFrame - GeeksforGeeks | 03 Jul, 2020
NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted to any other type than float. NaN value is one of the major problems in Data Analysis. It is very essential to deal with NaN in order to get the... | [
{
"code": null,
"e": 26039,
"s": 26011,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 26364,
"s": 26039,
"text": "NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted ... |
Replace each Matrix element with its row product except that element - GeeksforGeeks | 17 Jan, 2022
Given a 2D-array mat[][] of order M*N. The task is to replace every element of each row with the product of other elements of the same row.
Examples:
Input: mat[][] = {{3, 4, 1}, {6, 1, 7}, {2, 9, 8}}Output:4, 3, 127, 42, 672, 16, 18
Input: mat[][] = {{13, 4, 5}, {6, 11, 1}}Output:20, 65, 521... | [
{
"code": null,
"e": 27533,
"s": 27505,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 27673,
"s": 27533,
"text": "Given a 2D-array mat[][] of order M*N. The task is to replace every element of each row with the product of other elements of the same row."
},
{
"code": n... |
How to upload files in firebase storage using ReactJS ? - GeeksforGeeks | 13 Apr, 2021
The following approach covers how to send file to firebase storage in react. We have used the firebase module to achieve so.
Creating React Application And Installing Module:
Step 1: Create a React myapp using the following command:npx create-react-app myapp
Step 1: Create a React myapp using the following... | [
{
"code": null,
"e": 26095,
"s": 26067,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 26220,
"s": 26095,
"text": "The following approach covers how to send file to firebase storage in react. We have used the firebase module to achieve so."
},
{
"code": null,
"e": 2... |
C# | Using foreach loop in arrays - GeeksforGeeks | 23 Jan, 2019
C# language provides several techniques to read a collection of items. One of which is foreach loop. The foreach loop provides a simple, clean way to iterate through the elements of an collection or an array of items. One thing we must know that before using foreach loop we must declare the array or the co... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n23 Jan, 2019"
},
{
"code": null,
"e": 26073,
"s": 25547,
"text": "C# language provides several techniques to read a collection of items. One of which is foreach loop. The foreach loop provides a simple, clean way to iterate throu... |
Python | Scrollview widget in kivy - GeeksforGeeks | 15 Sep, 2021
Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux, and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications.
Kivy Tutorial – Learn Kivy with Examples.
The ScrollView widget provi... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 25774,
"s": 25537,
"text": "Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux, and Windows, etc. It is basically used to develop the Android applicati... |
Maximum XOR value of a pair from a range - GeeksforGeeks | 05 Jan, 2022
Given a range [L, R], we need to find two integers in this range such that their XOR is maximum among all possible choices of two integers. More Formally, given [L, R], find max (A ^ B) where L <= A, B Examples :
Input : L = 8
R = 20
Output : 31
31 is XOR of 15 and 16.
Input : L = 1
... | [
{
"code": null,
"e": 26321,
"s": 26293,
"text": "\n05 Jan, 2022"
},
{
"code": null,
"e": 26536,
"s": 26321,
"text": "Given a range [L, R], we need to find two integers in this range such that their XOR is maximum among all possible choices of two integers. More Formally, given [L... |
fmt.Sprintln() Function in Golang With Examples - GeeksforGeeks | 05 May, 2020
In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Sprintln() function in Go language formats using the default formats for its operands and returns the resulting string. Here spaces are always added between operands and a newline is ... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n05 May, 2020"
},
{
"code": null,
"e": 26165,
"s": 25703,
"text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Sprintln() function in Go language form... |
How to stretch flexbox to fill the entire container in Bootstrap ? - GeeksforGeeks | 21 Dec, 2020
We are given an HTML document (linked with Bootstrap) with a flexbox and a container. The goal is to stretch the flexbox to fill the entire container. This can be achieved by two different approaches, using flex-fill or flex-grow classes in Bootstrap.
Approach 1: Using flex-fill class: The .flex-fill class... | [
{
"code": null,
"e": 26863,
"s": 26835,
"text": "\n21 Dec, 2020"
},
{
"code": null,
"e": 27115,
"s": 26863,
"text": "We are given an HTML document (linked with Bootstrap) with a flexbox and a container. The goal is to stretch the flexbox to fill the entire container. This can be ... |
Why integer size varies from computer to computer? - GeeksforGeeks | 31 May, 2021
In a computer, memory is composed of digital memory that stores information binary format, and the lowest unit is called a bit (binary digit). The single-bit denotes a logical value that consists of two states, either o or 1. A bit is a part of the binary number system. Using the combination of these bits,... | [
{
"code": null,
"e": 26291,
"s": 26263,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 26661,
"s": 26291,
"text": "In a computer, memory is composed of digital memory that stores information binary format, and the lowest unit is called a bit (binary digit). The single-bit denot... |
iOS - Objective C | The language used in iOS development is objective C. It is an object-oriented language and hence, it would be easy for those who have some background in object-oriented programming languages.
In Objective C, the file where the declaration of class is done is called the interface file and the file where the class is def... | [
{
"code": null,
"e": 2283,
"s": 2091,
"text": "The language used in iOS development is objective C. It is an object-oriented language and hence, it would be easy for those who have some background in object-oriented programming languages."
},
{
"code": null,
"e": 2451,
"s": 2283,
... |
Program to find maximum k-repeating substring from sequence in Python | Suppose we have a sequence of characters called s, we say a string w is k-repeating string if w is concatenated k times is a substring of sequence. The w's maximum k-repeating value will be the highest value k where w is k-repeating in sequence. And if w is not a substring of the given sequence, w's maximum k-repeating... | [
{
"code": null,
"e": 1481,
"s": 1062,
"text": "Suppose we have a sequence of characters called s, we say a string w is k-repeating string if w is concatenated k times is a substring of sequence. The w's maximum k-repeating value will be the highest value k where w is k-repeating in sequence. And if ... |
Delete all the even nodes from a Doubly Linked List - GeeksforGeeks | 11 Feb, 2022
Given a doubly linked list containing N nodes, the task is to delete all the even nodes from the list.
Examples:
Input: Initial List = 15 <=> 16 <=> 6 <=> 7 <=> 17 Output: Final List = 15 <=> 7 <=> 17Explanation: 16 and 6 are even nodes. So we need to delete them.
Input: Initial List = 5 <=> 3 <=> 6 <=>... | [
{
"code": null,
"e": 24977,
"s": 24949,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 25081,
"s": 24977,
"text": "Given a doubly linked list containing N nodes, the task is to delete all the even nodes from the list. "
},
{
"code": null,
"e": 25093,
"s": 25081,... |
How to suppress Matplotlib warning? | Let's take an example. We create a set of data points such that it would generate some warnings. We will create data points x from −1 to 1 and try to find log in that range, which means it will throw an error at value 0, while calculating logs.
Create data points for x and calculate log(x), using numpy.
Plot x and y us... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "Let's take an example. We create a set of data points such that it would generate some warnings. We will create data points x from −1 to 1 and try to find log in that range, which means it will throw an error at value 0, while calculating logs."
},
... |
Creating a Spell Checker with TensorFlow | by David Currie | Towards Data Science | One of the most important aspects of machine learning is working with good, clean data. Natural Language Progressing projects have the issue of using text that is written by humans, and we are unfortunately bad at writing. Just think about the many spelling mistakes that would be in a dataset about posts and comments f... | [
{
"code": null,
"e": 642,
"s": 172,
"text": "One of the most important aspects of machine learning is working with good, clean data. Natural Language Progressing projects have the issue of using text that is written by humans, and we are unfortunately bad at writing. Just think about the many spelli... |
What is difference between instantiating a C++ object using new vs. without new? | In C++, we can instantiate the class object with or without using the new keyword. If the new keyword is not use, then it is like normal object. This will be stored at the stack section. This will be destroyed when the scope ends. But for the case when we want to allocate the space for the item dynamically, then we can... | [
{
"code": null,
"e": 1449,
"s": 1062,
"text": "In C++, we can instantiate the class object with or without using the new keyword. If the new keyword is not use, then it is like normal object. This will be stored at the stack section. This will be destroyed when the scope ends. But for the case when ... |
Genetic Algorithm to Optimize Machine Learning Hyperparameters | by Marcos del Cueto | Towards Data Science | Hyperparameter tuning is critical for the correct functioning of Machine Learning models. You can check Timo Böhm’s article to see an overview of hyperparameter tuning.
Genetic algorithms provide a powerful technique for hyperparameter tuning, but they are quite often overlooked.
In this article, I will show an overvi... | [
{
"code": null,
"e": 342,
"s": 172,
"text": "Hyperparameter tuning is critical for the correct functioning of Machine Learning models. You can check Timo Böhm’s article to see an overview of hyperparameter tuning."
},
{
"code": null,
"e": 454,
"s": 342,
"text": "Genetic algorith... |
SQL GROUP BY Statement | The GROUP BY statement groups rows that have the same values into summary
rows, like "find the number of customers in each country".
The GROUP BY statement is often used with aggregate functions (COUNT(),
MAX(),
MIN(), SUM(),
AVG()) to group the result-set by one or more columns.
Below is a selection from the "Cust... | [
{
"code": null,
"e": 134,
"s": 0,
"text": "The GROUP BY statement groups rows that have the same values into summary \nrows, like \"find the number of customers in each country\"."
},
{
"code": null,
"e": 285,
"s": 134,
"text": "The GROUP BY statement is often used with aggregate... |
Learning from Audio: Spectrograms | by mlearnere | Towards Data Science | When it comes to Machine Learning, or even Deep Learning, how the data is processed is fundamental to the model’s training and testing performance. When working in the domain of audio, there are a few steps to understand before getting to this stage, but once you get there, learning from audio becomes a quite easy task... | [
{
"code": null,
"e": 579,
"s": 172,
"text": "When it comes to Machine Learning, or even Deep Learning, how the data is processed is fundamental to the model’s training and testing performance. When working in the domain of audio, there are a few steps to understand before getting to this stage, but ... |
Named arguments in JavaScript. | Following is the code for using named arguments in JavaScript functions −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana,... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "Following is the code for using named arguments in JavaScript functions −"
},
{
"code": null,
"e": 1147,
"s": 1136,
"text": " Live Demo"
},
{
"code": null,
"e": 2228,
"s": 1147,
"text": "<!DOCTYPE html>\n<html lan... |
Generative Adversarial Networks GANs: A Beginner’s Guide | by Mohammed Alhamid | Towards Data Science | The hypothetical example of Machine Learning is imagined around having a machine that is able to think and mimic passing a test with some degree of intelligent. Although this the ultimate goal, we are not there yet, and we still have a long way to go. In the past few years, many models have been developed to learn in a... | [
{
"code": null,
"e": 745,
"s": 172,
"text": "The hypothetical example of Machine Learning is imagined around having a machine that is able to think and mimic passing a test with some degree of intelligent. Although this the ultimate goal, we are not there yet, and we still have a long way to go. In ... |
Python - Fetch columns between two Pandas DataFrames by Intersection | To fetch columns between two DataFrames by Intersection, use the intersection() method. Let us create two DataFrames −
# creating dataframe1
dataFrame1 = pd.DataFrame({"Car": ['Bentley', 'Lexus', 'Tesla', 'Mustang', 'Mercedes', 'Jaguar'],"Cubic_Capacity": [2000, 1800, 1500, 2500, 2200, 3000],"Reg_Price": [7000, 1500, 5... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "To fetch columns between two DataFrames by Intersection, use the intersection() method. Let us create two DataFrames −"
},
{
"code": null,
"e": 1572,
"s": 1181,
"text": "# creating dataframe1\ndataFrame1 = pd.DataFrame({\"Car\": ['Be... |
How to create Accordion in ReactJS ? - GeeksforGeeks | 12 Feb, 2021
Accordions contain creation flows and allow lightweight editing of an element. Material UI for React has this component available for us, and it is very easy to integrate. We can create it in ReactJS using the following approach.
Creating React Application and Installing Module:
Step 1: Create a React appl... | [
{
"code": null,
"e": 25232,
"s": 25204,
"text": "\n12 Feb, 2021"
},
{
"code": null,
"e": 25462,
"s": 25232,
"text": "Accordions contain creation flows and allow lightweight editing of an element. Material UI for React has this component available for us, and it is very easy to in... |
How to download a file from a URL in C#? | A file can be downloaded from a URL using web client. It is available in System.Net
namespace.
The WebClient class provides common methods for sending data to or receiving data
from any local, intranet, or Internet resource identified by a URI.
The web client can be said as an application or web browser (like Google Ch... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "A file can be downloaded from a URL using web client. It is available in System.Net\nnamespace."
},
{
"code": null,
"e": 1307,
"s": 1157,
"text": "The WebClient class provides common methods for sending data to or receiving data\nfro... |
Python Blockchain - Block Class | A block consists of a varying number of transactions. For simplicity, in our case we will assume that the block consists of a fixed number of transactions, which is three in this case. As the block needs to store the list of these three transactions, we will declare an instance variable called verified_transactions as ... | [
{
"code": null,
"e": 2325,
"s": 1995,
"text": "A block consists of a varying number of transactions. For simplicity, in our case we will assume that the block consists of a fixed number of transactions, which is three in this case. As the block needs to store the list of these three transactions, we... |
How can we minimize/maximize a JFrame programmatically in Java? | A JFrame class is a subclass of Frame class and the components added to a frame are referred to as its contents, these are managed by the contentPane. A JFrame contains a window with title, border, (optional) menu bar and user-specific components. By default, we can minimize a JFrame by clicking on minimize button and ... | [
{
"code": null,
"e": 1619,
"s": 1062,
"text": "A JFrame class is a subclass of Frame class and the components added to a frame are referred to as its contents, these are managed by the contentPane. A JFrame contains a window with title, border, (optional) menu bar and user-specific components. By de... |
How to get the disk information using PowerShell? | To get the Windows disk information using PowerShell, we can use the WMI command or the CIM class command.
With the WMI command,
Gwmi Win32_LogicalDisk
With the CIM instance method,
Get−CimInstance Win32_LogicalDisk
You can see both the outputs are identical. Let’s use one of them.
DeviceID DriveType ProviderName Volu... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "To get the Windows disk information using PowerShell, we can use the WMI command or the CIM class command."
},
{
"code": null,
"e": 1191,
"s": 1169,
"text": "With the WMI command,"
},
{
"code": null,
"e": 1214,
"s": 1... |
Size of a Three-dimensional array in C# | To get the size of a 3D array in C#, use the GetLength() method with parameter as the index of the dimensions.
GetLength(dimensionIndex)
To get the size.
arr.GetLength(0)
arr.GetLength(1)
arr.GetLength(2)
Live Demo
using System;
class Program {
static void Main() {
int[,,] arr = new int[3,4,5];
// lengt... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "To get the size of a 3D array in C#, use the GetLength() method with parameter as the index of the dimensions."
},
{
"code": null,
"e": 1199,
"s": 1173,
"text": "GetLength(dimensionIndex)"
},
{
"code": null,
"e": 1216,
... |
Difference between Abstract Class and Interface in Java - GeeksforGeeks | 28 Feb, 2022
As we know that abstraction refers to hiding the internal implementation of the feature and only showing the functionality to the users. i.e. what it works (showing), how it works (hiding). Both abstract class and interface are used for abstraction, henceforth Interface and Abstract Class are required prer... | [
{
"code": null,
"e": 28950,
"s": 28922,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 29268,
"s": 28950,
"text": "As we know that abstraction refers to hiding the internal implementation of the feature and only showing the functionality to the users. i.e. what it works (showin... |
How To Make Boxplots with Text as Points in R using ggplot2? - GeeksforGeeks | 03 Dec, 2021
In this article, we will discuss how to make boxplots with text as points using the ggplot2 package in the R Programming language.
A box plot is a chart that shows data from a five-number summary including one of the measures of central tendency. These five summary numbers are Minimum, First Quartile, Medi... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 24982,
"s": 24851,
"text": "In this article, we will discuss how to make boxplots with text as points using the ggplot2 package in the R Programming language."
},
{
"code": null,
... |
Neural Network from Scratch With Python | by Angela Shi | Towards Data Science | Neural Network is often considered a black-box algorithm. Data visualization can help us better understand the principles of this algorithm. Since standard packages don’t give all details of how the parameters are found, we will code a neural network from scratch. And in order to visualize simply the results, we have c... | [
{
"code": null,
"e": 515,
"s": 171,
"text": "Neural Network is often considered a black-box algorithm. Data visualization can help us better understand the principles of this algorithm. Since standard packages don’t give all details of how the parameters are found, we will code a neural network from... |
The Nth Fibonnaci | Practice | GeeksforGeeks | Given a positive integer N, find the last digit of the Nth term from the Fibonacci series.
Note: For N=0 you have to return 0.
Example 1:
Input:
N = 5
Output:
5
Explanation:
5th Fibonacci number is 5
Example 2:
Input:
N = 14
Output:
7
Explanation:
14th Fibonacci number is 377
It's last digit is 7
Your Task:
You don... | [
{
"code": null,
"e": 329,
"s": 238,
"text": "Given a positive integer N, find the last digit of the Nth term from the Fibonacci series."
},
{
"code": null,
"e": 367,
"s": 329,
"text": "Note: For N=0 you have to return 0.\n "
},
{
"code": null,
"e": 378,
"s": 367,
... |
Python | Sort list of dates given as strings | 14 Dec, 2018
Given a list of dates in string format, write a Python program to sort the list of dates in ascending order.
Examples:
Input : dates = [“24 Jul 2017”, “25 Jul 2017”, “11 Jun 1996”, “01 Jan 2019”, “12 Aug 2005”, “01 Jan 1997”]
Output : 01 Jan 200710 Jul 20162 Dec 201711 Jun 201823 Jun 201801 Jan 2019
Appro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Dec, 2018"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Given a list of dates in string format, write a Python program to sort the list of dates in ascending order."
},
{
"code": null,
"e": 147,
"s": 137,
"text"... |
ReadWriteLock Interface in Java | 28 Jan, 2021
A lock is a device for commanding access to an assigned resource by multiple threads. Usually, a lock grants exclusive access to a shared resource: just one thread at a flash can acquire the lock and everyone accesses to the shared resource requires that the lock be acquired first. Though, some locks may a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 445,
"s": 54,
"text": "A lock is a device for commanding access to an assigned resource by multiple threads. Usually, a lock grants exclusive access to a shared resource: just one thread at a flash... |
Prove that every subgroup of a cyclic group is cyclic | 05 Mar, 2021
To Prove :Every subgroup of a cyclic group is cyclic.
Cyclic Group :It is a group generated by a single element, and that element is called a generator of that cyclic group, or a cyclic group G is one in which every element is a power of a particular element g, in the group. That is, every element of G can... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 82,
"s": 28,
"text": "To Prove :Every subgroup of a cyclic group is cyclic."
},
{
"code": null,
"e": 481,
"s": 82,
"text": "Cyclic Group :It is a group generated by a single elem... |
Matplotlib.pyplot.yscale() in Python | 12 Nov, 2020
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 which provides a MATLAB-like interface.
The matplotlib.pyplot.yscale() function in pyplot module of matplotlib library is used to set the y-axis s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 229,
"s": 28,
"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 which provides... |
Python program to find the power of a number using recursion
| 09 Jun, 2022
Given a number N and power P. The task is to write a Python program to find the power of a number using recursion.
Definition: The power of a number can be defined as multiplication of the number repetitively the number of times of its power.
Example:
Input: N=2 , P=3
Output: 8
Input: N=5 , P=2
Output: 2... | [
{
"code": null,
"e": 31,
"s": 0,
"text": " \n09 Jun, 2022\n"
},
{
"code": null,
"e": 146,
"s": 31,
"text": "Given a number N and power P. The task is to write a Python program to find the power of a number using recursion."
},
{
"code": null,
"e": 274,
"s": 146,
... |
Python | Pandas Timestamp.days_in_month | 08 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.days_in_month attribute return the number of days in the month for the given... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
How to generate a random, unique, alphanumeric string in PHP | 18 Feb, 2022
There are many ways to generate a random, unique, alphanumeric string in PHP which are given below:
Using str_shuffle() Function: The str_shuffle() function is an inbuilt function in PHP and is used to randomly shuffle all the characters of a string passed to the function as a parameter. When a number is ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 129,
"s": 28,
"text": "There are many ways to generate a random, unique, alphanumeric string in PHP which are given below: "
},
{
"code": null,
"e": 631,
"s": 129,
"text": "Using... |
Matplotlib.axis.Axis.set_data_interval() function in Python | 08 Jun, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.
The Axis.set_data_interval() function in axis module of matplotlib library is used to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and u... |
Pointers in C and C++ | Set 1 (Introduction, Arithmetic and Array) | 28 Jun, 2021
Pointers store address of variables or a memory location.
// General syntax
datatype *var_name;
// An example pointer "ptr" that holds
// address of an integer variable or holds
// address of a memory whose value(s) can
// be accessed as integer values through "ptr"
int *ptr;
Using a Pointer:
To use... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 112,
"s": 52,
"text": "Pointers store address of variables or a memory location. "
},
{
"code": null,
"e": 335,
"s": 112,
"text": "// General syntax\ndatatype *var_name; \n\n//... |
HashMap forEach(BiConsumer) method in Java with Examples | 11 Oct, 2019
The forEach(BiConsumer) method of HashMap class perform the BiConsumer operation on each entry of hashmap until all entries have been processed or the action throws an exception. The BiConsumer operation is a function operation of the key-value pair of hashtable performed in the order of iteration. Method ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 509,
"s": 28,
"text": "The forEach(BiConsumer) method of HashMap class perform the BiConsumer operation on each entry of hashmap until all entries have been processed or the action throws an excepti... |
Working with zip files in Python | 22 Jul, 2021
This article explains how one can perform various operations on a zip file using a simple python program.
What is a zip file?
ZIP is an archive file format that supports lossless data compression. By lossless compression, we mean that the compression algorithm allows the original data to be perfectly recon... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 158,
"s": 52,
"text": "This article explains how one can perform various operations on a zip file using a simple python program."
},
{
"code": null,
"e": 178,
"s": 158,
"text": ... |
Interquartile Range (IQR) | 21 May, 2021
The quartiles of a ranked set of data values are three points which divide the data into exactly four equal parts, each part comprising of quarter data.
Q1 is defined as the middle number between the smallest number and the median of the data set.Q2 is the median of the data.Q3 is the middle value betwee... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 207,
"s": 52,
"text": "The quartiles of a ranked set of data values are three points which divide the data into exactly four equal parts, each part comprising of quarter data. "
},
{
"code... |
Implementing Byte Stuffing using Java | 19 Nov, 2021
At Sender Side
Enter the Message to be Sent :
DDEDFFDE
The data being sent (with byte stuffed) is : FDDEEDEFEFDEEF
Sending Message....
Thanks for the Feedback Server!!
At Receiver Side
Message Received...Successfully!!!
The Stuffed Message is : FDDEEDEFEFDEEF
The Destuffed Message is : DDEDFFDE
Messaging... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 382,
"s": 54,
"text": "At Sender Side\nEnter the Message to be Sent : \nDDEDFFDE\nThe data being sent (with byte stuffed) is : FDDEEDEFEFDEEF\nSending Message....\nThanks for the Feedback Server!!\... |
The magic behind Recommendation Systems | by Anthony Figueroa | Towards Data Science | Oftentimes, we are surprised by the accuracy of recommendations on what to buy on Amazon, watch on Netflix, or listen on Spotify. We feel that somehow these companies know how our brain works and monetizing this magical guessing game. They have a deep foundation on behavioral sciences, and our job is to make all these ... | [
{
"code": null,
"e": 587,
"s": 172,
"text": "Oftentimes, we are surprised by the accuracy of recommendations on what to buy on Amazon, watch on Netflix, or listen on Spotify. We feel that somehow these companies know how our brain works and monetizing this magical guessing game. They have a deep fou... |
How to find the count of duplicate rows if they are greater than n in R data frame? | To find the count of duplicate rows if they are greater than n in R data frame, we can follow the below steps −
First of all, create a data frame.
Then, count the duplicate rows if they are greater than a certain number using group_by_all, count, and filter function of dplyr package.
Let's create a data frame as shown ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "To find the count of duplicate rows if they are greater than n in R data frame, we can follow the below steps −"
},
{
"code": null,
"e": 1209,
"s": 1174,
"text": "First of all, create a data frame."
},
{
"code": null,
"e"... |
How to specify an input field must be filled out before submitting the form in HTML ? - GeeksforGeeks | 25 Dec, 2020
In this article, we will specify an input field that must be filled out before submitting the form. The HTML required attribute is a Boolean attribute which is used to specify that the input element must be filled out before submitting the form. This attribute works with other types of input like radio, ch... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n25 Dec, 2020"
},
{
"code": null,
"e": 25710,
"s": 25376,
"text": "In this article, we will specify an input field that must be filled out before submitting the form. The HTML required attribute is a Boolean attribute which is use... |
MySQL status in terms of active or total connections? | The active or total connection can be known with the help of threads_connected variable. The variable tells about the number of currently open connections.
The query is as follows −
mysql> show status where `variable_name` = 'Threads_connected';
Here is the output.
+-------------------+-------+
| Variable_name | Va... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "The active or total connection can be known with the help of threads_connected variable. The variable tells about the number of currently open connections."
},
{
"code": null,
"e": 1244,
"s": 1218,
"text": "The query is as follows −"... |
Trim (Remove leading and trailing spaces) a string in C# | To trim a string in C#, use regular expression.
Firstly, set the pattern for regex −
string pattern = "\\s+";
Let’s say the following is our string with leading and trailing spaces −
string input = " Welcome User ";
Now using Regex, set the pattern and get the result in a new string in C#.
Regex rgx = new Regex(pattern... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "To trim a string in C#, use regular expression."
},
{
"code": null,
"e": 1147,
"s": 1110,
"text": "Firstly, set the pattern for regex −"
},
{
"code": null,
"e": 1172,
"s": 1147,
"text": "string pattern = \"\\\\s+\... |
How can I save a HashMap to Shared Preferences in Android? | This example demonstrates about How can I save a HashMap to Shared Preferences in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "This example demonstrates about How can I save a HashMap to Shared Preferences in Android."
},
{
"code": null,
"e": 1283,
"s": 1153,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all req... |
Python | Maximum distance between elements - GeeksforGeeks | 01 Mar, 2020
Sometimes, while working with lists, we can have a problem in which we need to find maximum distance between reoccurring elements. This kind of problem can have application in competitive programming and web development domain. Let’s discuss certain way in which this task can be performed.
Method : Using l... | [
{
"code": null,
"e": 25763,
"s": 25735,
"text": "\n01 Mar, 2020"
},
{
"code": null,
"e": 26054,
"s": 25763,
"text": "Sometimes, while working with lists, we can have a problem in which we need to find maximum distance between reoccurring elements. This kind of problem can have ap... |
Check if two nodes are cousins in a Binary Tree | Set-2 - GeeksforGeeks | 23 Jun, 2021
Given a binary tree and the two nodes say ‘a’ and ‘b’, determine whether two given nodes are cousins of each other or not.Two nodes are cousins of each other if they are at same level and have different parents.Example:
6
/ \
3 5
/ \ / \
7 8 1 3
Say two node be 7 and 1, result is TRU... | [
{
"code": null,
"e": 26681,
"s": 26653,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 26901,
"s": 26681,
"text": "Given a binary tree and the two nodes say ‘a’ and ‘b’, determine whether two given nodes are cousins of each other or not.Two nodes are cousins of each other if th... |
C program to find frequency of each digit in a string | Suppose we have a string s. The s contains letters and digits both. We shall have to find frequencies of each digit and display them. To do this we can make an array of size 10 for each digits (0 through 9), initially all elements are 0 inside the array, then when we encounter a digit simply increase the value of that ... | [
{
"code": null,
"e": 1416,
"s": 1062,
"text": "Suppose we have a string s. The s contains letters and digits both. We shall have to find frequencies of each digit and display them. To do this we can make an array of size 10 for each digits (0 through 9), initially all elements are 0 inside the array... |
C - Type Conversions - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to learn about... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Powershell - Delete File | Remove-Item cmdlet is used to delete a file by passing the path of the file to be deleted.
In this example, we'll delete a file D:\Temp\Test Folder\Test.txt
Type the following command in PowerShell ISE Console
Remove-Item 'D:\temp\Test Folder\test.txt'
You can see the Test Folder1 in Windows Explorer is deleted now.
In... | [
{
"code": null,
"e": 2125,
"s": 2034,
"text": "Remove-Item cmdlet is used to delete a file by passing the path of the file to be deleted."
},
{
"code": null,
"e": 2191,
"s": 2125,
"text": "In this example, we'll delete a file D:\\Temp\\Test Folder\\Test.txt"
},
{
"code": ... |
Check if any alert exists using selenium with python. | We can check if any alert exists with Selenium webdriver. An alert is designed on a webpage to notify users or to perform some actions on the alert. It is designed with the help of Javascript.
An alert can be of three types – prompt, confirmation dialogue box or alert. Selenium has multiple APIs to handle alerts with a... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "We can check if any alert exists with Selenium webdriver. An alert is designed on a webpage to notify users or to perform some actions on the alert. It is designed with the help of Javascript."
},
{
"code": null,
"e": 1497,
"s": 1255,
... |
Python Coding Style Guide | In this tutorial, we are going to learn about the standard style guide that should follow in a Python project. Following a standard style guide of any programming language will keep all team
members at the same pace. Moreover, it looks professional.
For Python, most of the users follow PEP 8 style guide. The code looks... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "In this tutorial, we are going to learn about the standard style guide that should follow in a Python project. Following a standard style guide of any programming language will keep all team\nmembers at the same pace. Moreover, it looks professional."
... |
DateTime.ToShortDateString() Method in C# | The DateTime.ToShortDateString() method in C# is used to convert the value of the current DateTime object to its equivalent short date string representation.
Following is the syntax −
public string ToShortDateString ();
Let us now see an example to implement the DateTime.ToShortDateString() method −
using System;
publi... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "The DateTime.ToShortDateString() method in C# is used to convert the value of the current DateTime object to its equivalent short date string representation."
},
{
"code": null,
"e": 1246,
"s": 1220,
"text": "Following is the syntax ... |
How can I create a directory if it does not exist using Python? | To create a directory, first check if it already exists using os.path.exists(directory). Then you can create it using:
import os
if not os.path.exists('my_folder'):
os.makedirs('my_folder')
You can also use the python idiom EAFP: Easier to ask for forgiveness than permission. For example,
import os
try:
os.make... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "To create a directory, first check if it already exists using os.path.exists(directory). Then you can create it using:"
},
{
"code": null,
"e": 1256,
"s": 1181,
"text": "import os\nif not os.path.exists('my_folder'):\n os.makedirs... |
Neural Search with Haystack — Semantic Search At Its Finest | by Yash Prakash | Towards Data Science | Semantic searches are pretty common in our everyday lives, especially with the number of times we use Google as the medium for answers to our most, if not all, questions. Up until a few years back, building a moderately good search engine without huge computational resources was a pain. Simply put, it was way too hard ... | [
{
"code": null,
"e": 567,
"s": 172,
"text": "Semantic searches are pretty common in our everyday lives, especially with the number of times we use Google as the medium for answers to our most, if not all, questions. Up until a few years back, building a moderately good search engine without huge com... |
K Subarray Sum | Practice | GeeksforGeeks | Given an integer array arr of size N and two integers K and M, the task is to find M largest sums of K sized subarrays.
Input:
1. The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
2. The first line of each test case contains three int... | [
{
"code": null,
"e": 348,
"s": 226,
"text": "Given an integer array arr of size N and two integers K and M, the task is to find M largest sums of K sized subarrays. "
},
{
"code": null,
"e": 620,
"s": 348,
"text": "Input: \n1. The first line of the input contains a single intege... |
How to deploy ONNX models on NVIDIA Jetson Nano using DeepStream | by Bharath Raj | Towards Data Science | Deploying complex deep learning models onto small embedded devices is challenging. Even with hardware optimized for deep learning such as the Jetson Nano and inference optimization tools such as TensorRT, bottlenecks can still present itself in the I/O pipeline. These bottlenecks can potentially compound if the model h... | [
{
"code": null,
"e": 669,
"s": 171,
"text": "Deploying complex deep learning models onto small embedded devices is challenging. Even with hardware optimized for deep learning such as the Jetson Nano and inference optimization tools such as TensorRT, bottlenecks can still present itself in the I/O pi... |
MySQL query to update all the values in a column with numeric incremental values like John1, John2, John3, etc. | To update all the values in a column to John1, John2, etc.; you need to set incremental values 1, 2, 3, etc. and concatenate them to the records. Let us first create a table −
mysql> create table DemoTable
(
StudentId varchar(80)
);
Query OK, 0 rows affected (0.50 sec)
Insert some records in the table using insert c... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "To update all the values in a column to John1, John2, etc.; you need to set incremental values 1, 2, 3, etc. and concatenate them to the records. Let us first create a table −"
},
{
"code": null,
"e": 1335,
"s": 1238,
"text": "mysql>... |
Return query based on date in MongoDB? | To return query based on the date in MongoDB, let us take an example.
To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −
> db.returnQueryFromDate.insertOne({"PassengerName":"John","PassengerAge":23,"PassengerArrivalTime":new ISODate(... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "To return query based on the date in MongoDB, let us take an example."
},
{
"code": null,
"e": 1270,
"s": 1132,
"text": "To understand the concept, let us create a collection with the document. The query to create a collection with a... |
Find k-th smallest element in BST (Order Statistics in BST) in C++ | Suppose we have a binary search tree and a value K as input, we have to find K-th smallest element in the tree.
So, if the input is like
k = 3, then the output will be 15.
To solve this, we will follow these steps −
Define a function find_kth_smallest(), this will take root, count, k,
Define a function find_kth_smalles... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "Suppose we have a binary search tree and a value K as input, we have to find K-th smallest element in the tree."
},
{
"code": null,
"e": 1199,
"s": 1174,
"text": "So, if the input is like"
},
{
"code": null,
"e": 1234,
... |
Keras - Model Compilation | Previously, we studied the basics of how to create model using Sequential and Functional API. This chapter explains about how to compile the model. The compilation is the final step in creating a model. Once the compilation is done, we can move on to training phase.
Let us learn few concepts required to better understa... | [
{
"code": null,
"e": 2318,
"s": 2051,
"text": "Previously, we studied the basics of how to create model using Sequential and Functional API. This chapter explains about how to compile the model. The compilation is the final step in creating a model. Once the compilation is done, we can move on to tr... |
Clustering Techniques. Clustering falls under the unsupervised... | by M Bharathwaj | Towards Data Science | Clustering falls under the unsupervised learning technique. In this technique, the data is not labelled and there is no defined dependant variable. This type of learning is usually done to identify patterns in the data and/or to group similar data.
In this post, a detailed explanation on the type of clustering techniqu... | [
{
"code": null,
"e": 421,
"s": 172,
"text": "Clustering falls under the unsupervised learning technique. In this technique, the data is not labelled and there is no defined dependant variable. This type of learning is usually done to identify patterns in the data and/or to group similar data."
},
... |
JSP - Debugging | In this chapter, we will discuss Debugging a JSP. It is always difficult testing/debugging a JSP and servlets. JSP and Servlets tend to involve a large amount of client/server interaction, making errors likely but hard to reproduce.
The following are a few hints and suggestions that may aid you in your debugging.
Syste... | [
{
"code": null,
"e": 2472,
"s": 2239,
"text": "In this chapter, we will discuss Debugging a JSP. It is always difficult testing/debugging a JSP and servlets. JSP and Servlets tend to involve a large amount of client/server interaction, making errors likely but hard to reproduce."
},
{
"code"... |
Maximum given sized rectangles that can be cut out of a sheet of paper - GeeksforGeeks | 30 May, 2021
Given the length L and breadth B of a sheet of paper, the task is to find the maximum number of rectangles with given length l and breadth b that can be cut from this sheet of paper.Examples:
Input: L = 5, B = 2, l = 14, b = 3 Output: 0 The sheet is smaller than the required rectangle. So, no rectangle o... | [
{
"code": null,
"e": 24963,
"s": 24935,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 25157,
"s": 24963,
"text": "Given the length L and breadth B of a sheet of paper, the task is to find the maximum number of rectangles with given length l and breadth b that can be cut from t... |
C# | List.TrimExcess Method - GeeksforGeeks | 01 Feb, 2019
List<T>.TrimExcess Method is used to set the capacity to the actual number of elements in the List<T>, if that number is less than a threshold value.
Syntax:
public void TrimExcess ();
Note:
This method can be used to minimize a collection’s memory overhead if no new elements will be added to the collectio... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25697,
"s": 25547,
"text": "List<T>.TrimExcess Method is used to set the capacity to the actual number of elements in the List<T>, if that number is less than a threshold value."
},
{
... |
JavaScript | Top 10 Tips and Tricks - GeeksforGeeks | 08 Sep, 2021
For web development or cross-platform development, JavaScript is gaining wide popularity. Once it was considered only as a front-end scripting language but it’s now getting popularity as the back-end too. Even Facebook’s React Native is based on JavaScript. Hence it would surely be beneficial to know some ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25997,
"s": 25300,
"text": "For web development or cross-platform development, JavaScript is gaining wide popularity. Once it was considered only as a front-end scripting language but it’s no... |
To check divisibility of any large number by 999 - GeeksforGeeks | 16 Apr, 2021
You are given an n-digit large number, you have to check whether it is divisible by 999 without dividing or finding modulo of number by 999.Examples:
Input : 235764
Output : Yes
Input : 23576
Output : No
Since input number may be very large, we cannot use n % 999 to check if a number is divisible by 9... | [
{
"code": null,
"e": 26737,
"s": 26709,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 26889,
"s": 26737,
"text": "You are given an n-digit large number, you have to check whether it is divisible by 999 without dividing or finding modulo of number by 999.Examples: "
},
{
... |
Jupyter Notebooks in the IDE. I work with Jupyter Notebooks every... | by Marc Wouts | Towards Data Science | I work with Jupyter Notebooks every day. And every day I use and edit Python libraries. Both are key elements in my work. Notebooks are a great way to document and explain your findings. And libraries are a safe investment in the long-term as they make your code reusable. Now, did you ever wonder... outside of using Ju... | [
{
"code": null,
"e": 567,
"s": 172,
"text": "I work with Jupyter Notebooks every day. And every day I use and edit Python libraries. Both are key elements in my work. Notebooks are a great way to document and explain your findings. And libraries are a safe investment in the long-term as they make yo... |
Explicit waits in Selenium Python - GeeksforGeeks | 19 May, 2020
Selenium Python is one of the great tools for testing automation. These days most of the web apps are using AJAX techniques. When a page is loaded by the browser, the elements within that page may load at different time intervals. This makes locating elements difficult: if an element is not yet present in ... | [
{
"code": null,
"e": 25929,
"s": 25901,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 26610,
"s": 25929,
"text": "Selenium Python is one of the great tools for testing automation. These days most of the web apps are using AJAX techniques. When a page is loaded by the browser, ... |
What are public and private variables in Python class? | Python doesn’t restrict us from accessing any variable or calling any member method in a python program.
All python variables and methods are public by default in Python. So when we want to make any variable or method public, we just do nothing. Let us see the example below −
class Mug:
def __init__(self):
... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "Python doesn’t restrict us from accessing any variable or calling any member method in a python program."
},
{
"code": null,
"e": 1339,
"s": 1167,
"text": "All python variables and methods are public by default in Python. So when we ... |
How to use Dynamic SQL in BigQuery | by Lak Lakshmanan | Towards Data Science | Let’s say that we want to find the number of confirmed COVID cases over the past 3 days in various Canadian provinces. There is a BigQuery public dataset with information published by Johns Hopkins, and we can query it as follows:
SELECT * FROM `bigquery-public-data`.covid19_jhu_csse.confirmed_casesWHERE country_reg... | [
{
"code": null,
"e": 403,
"s": 172,
"text": "Let’s say that we want to find the number of confirmed COVID cases over the past 3 days in various Canadian provinces. There is a BigQuery public dataset with information published by Johns Hopkins, and we can query it as follows:"
},
{
"code": nu... |
How do I update NULL values in a field in MySQL? | Let us first create a table −
mysql> create table OrderDemo
-> (
-> OrderId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> OrderPrice int,
-> OrderDatetime datetime
-> );
Query OK, 0 rows affected (0.66 sec)
Now you can insert some records in the table using insert command. The query is as follows −
mysql> ... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1282,
"s": 1092,
"text": "mysql> create table OrderDemo\n -> (\n -> OrderId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> OrderPrice int,\n -> OrderDatetime datetime\n ... |
jMeter - Regular Expressions | Regular expressions are used to search and manipulate text, based on patterns. JMeter interprets forms of regular expressions or patterns being used throughout a JMeter test plan, by including the pattern matching software Apache Jakarta ORO.
With the use of regular expressions, we can certainly save a lot of time and ... | [
{
"code": null,
"e": 2148,
"s": 1905,
"text": "Regular expressions are used to search and manipulate text, based on patterns. JMeter interprets forms of regular expressions or patterns being used throughout a JMeter test plan, by including the pattern matching software Apache Jakarta ORO."
},
{
... |
A Comprehensive Hands-on Guide to Transfer Learning with Real-World Applications in Deep Learning | by Dipanjan (DJ) Sarkar | Towards Data Science | Humans have an inherent ability to transfer knowledge across tasks. What we acquire as knowledge while learning about one task, we utilize in the same way to solve related tasks. The more related the tasks, the easier it is for us to transfer, or cross-utilize our knowledge. Some simple examples would be,
Know how to r... | [
{
"code": null,
"e": 479,
"s": 172,
"text": "Humans have an inherent ability to transfer knowledge across tasks. What we acquire as knowledge while learning about one task, we utilize in the same way to solve related tasks. The more related the tasks, the easier it is for us to transfer, or cross-ut... |
What are the in-built functional interfaces in Java? | The java.util.function package defines several in-built functional interfaces that can be used when creating lambda expressions or method references.
The Function interface has only one single method apply(). It can accept an object of any data type and returns a result of any datatype.
import java.util.*;
import java.... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "The java.util.function package defines several in-built functional interfaces that can be used when creating lambda expressions or method references."
},
{
"code": null,
"e": 1350,
"s": 1212,
"text": "The Function interface has only ... |
DateTime.Add() Method in C# | The DateTime.Add() method in C# is used to return a new DateTime that adds the value of the specified TimeSpan to the value of this instance.
Following is the syntax −
public DateTime Add (TimeSpan val);
Above, Val is the positive or negative time interval.
Let us now see an example to implement the DateTime.Add() meth... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "The DateTime.Add() method in C# is used to return a new DateTime that adds the value of the specified TimeSpan to the value of this instance."
},
{
"code": null,
"e": 1230,
"s": 1204,
"text": "Following is the syntax −"
},
{
... |
Get index of first true value of array in Julia | Array findfirst() Method - GeeksforGeeks | 23 Mar, 2020
The findfirst() is an inbuilt function in julia which is used to return the index or key of the first true value in the specified array. Here values of index or key start from 1 i.e, for index of 1st element is 1, index of 2nd element is 2 and so on.
Syntax:findfirst(A)orfindfirst(predicate::Function, A)
P... | [
{
"code": null,
"e": 23993,
"s": 23965,
"text": "\n23 Mar, 2020"
},
{
"code": null,
"e": 24244,
"s": 23993,
"text": "The findfirst() is an inbuilt function in julia which is used to return the index or key of the first true value in the specified array. Here values of index or ke... |
Ignore null values in MongoDB documents | To ignore null values in MongoDB, use "$ne" : null in aggregate(). Let us create a collection with documents −
> db.demo722.insertOne(
... {
... id:101,
... details: [
... { Name:""},
... { Name: "David"},
... {Name:null},
... {Name:"Carol"}
... ]
... }
... );... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "To ignore null values in MongoDB, use \"$ne\" : null in aggregate(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1468,
"s": 1173,
"text": "> db.demo722.insertOne(\n... {\n... id:101,\n... detai... |
Calculate Inverse tangent of a value in R Programming - atan() Function - GeeksforGeeks | 01 Jun, 2020
atan() function in R Language is used to calculate the inverse tangent value of the numeric value passed to it as argument.
Syntax: atan(x)
Parameter:x: Numeric value
Example 1:
# R code to calculate inverse tangent of a value # Assigning values to variablesx1 <- -1x2 <- 0.5 # Using atan() Functionatan(x... | [
{
"code": null,
"e": 24806,
"s": 24778,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 24930,
"s": 24806,
"text": "atan() function in R Language is used to calculate the inverse tangent value of the numeric value passed to it as argument."
},
{
"code": null,
"e": 24... |
Python - Convert List of Lists to Tuple of Tuples - GeeksforGeeks | 26 May, 2020
Sometimes, while working with Python data, we can have a problem in which we need to perform interconversion of data types. This kind of problem can occur in domains in which we need to get data in particular formats such as Machine Learning. Let’s discuss certain ways in which this task can be performed.
... | [
{
"code": null,
"e": 24544,
"s": 24516,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 24851,
"s": 24544,
"text": "Sometimes, while working with Python data, we can have a problem in which we need to perform interconversion of data types. This kind of problem can occur in domai... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.