title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
MongoDB – Inequality Operator $ne | 27 Mar, 2020
MongoDB provides different types of comparison operators and inequality or not equals operator( $ne ) is one of them. This operator is used to select those documents where the value of the field does not equal to the given value. It also includes those documents that do not contain the specified field. You... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Mar, 2020"
},
{
"code": null,
"e": 422,
"s": 28,
"text": "MongoDB provides different types of comparison operators and inequality or not equals operator( $ne ) is one of them. This operator is used to select those documents where the... |
Python - Data Science Tutorial | Data is the new Oil. This statement shows how every modern IT system is driven by capturing, storing and analysing data for various needs. Be it about making decision for business, forecasting weather, studying protein structures in biology or designing a marketing campaign. All of these scenarios involve a multidiscip... | [
{
"code": null,
"e": 3376,
"s": 2663,
"text": "Data is the new Oil. This statement shows how every modern IT system is driven by capturing, storing and analysing data for various needs. Be it about making decision for business, forecasting weather, studying protein structures in biology or designing... |
Java and Multiple Inheritance | 17 Dec, 2021
Multiple Inheritance is a feature of an object-oriented concept, where a class can inherit properties of more than one parent class. The problem occurs when there exist methods with the same signature in both the superclasses and subclass. On calling the method, the compiler cannot determine which class me... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 438,
"s": 54,
"text": "Multiple Inheritance is a feature of an object-oriented concept, where a class can inherit properties of more than one parent class. The problem occurs when there exist metho... |
set_page_load_timeout driver method – Selenium Python | 24 Oct, 2021
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Oct, 2021"
},
{
"code": null,
"e": 970,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
Zoho Interview Experience | Off-Campus January 2021 | 23 Jun, 2021
Hello everyone, the interview had 6 rounds, and it was completely online because of the corona lockdown. If you have applied for Zoho, all the best. Let’s get started!
Round 1: Guess the output and aptitude questions (~2 hours)
Find the output of 20 questions in C language (no errors in code) and 15 gener... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 220,
"s": 52,
"text": "Hello everyone, the interview had 6 rounds, and it was completely online because of the corona lockdown. If you have applied for Zoho, all the best. Let’s get started!"
},
... |
MONTHNAME() Function in MySQL | 02 Dec, 2020
MONTHNAME() function in MySQL is used to find month name from the given date. It Returns 0 when MONTH part for the date is 0 or greater than 12 otherwise it returns month name between January to December.
Syntax :
MONTHNAME(date)
Parameter : This method accepts one parameter as mentioned above and describ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 233,
"s": 28,
"text": "MONTHNAME() function in MySQL is used to find month name from the given date. It Returns 0 when MONTH part for the date is 0 or greater than 12 otherwise it returns month name... |
SQL | INTERSECT Clause | 09 Nov, 2020
The INTERSECT clause in SQL is used to combine two SELECT statements but the dataset returned by the INTERSECT statement will be the intersection of the data-sets of the two SELECT statements. In simple words, the INTERSECT statement will return only those rows which will be common to both of the SELECT st... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Nov, 2020"
},
{
"code": null,
"e": 369,
"s": 52,
"text": "The INTERSECT clause in SQL is used to combine two SELECT statements but the dataset returned by the INTERSECT statement will be the intersection of the data-sets of the two ... |
Write a dictionary to a file in Python | 29 Dec, 2020
Dictionary is used to store data values in the form of key:value pairs. In this article we will see how to write dictionary into a file. Actually we can only write a string to a file. If we want to write a dictionary object, we either need to convert it into string using json or serialize it.
Method:1 Stor... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 348,
"s": 54,
"text": "Dictionary is used to store data values in the form of key:value pairs. In this article we will see how to write dictionary into a file. Actually we can only write a string t... |
How to Automate an Excel Sheet in Python? | 11 Jul, 2022
Before you read this article and learn automation in Python....let’s watch a video of Christian Genco (a talented programmer and an entrepreneur) explaining the importance of coding by taking the example of automation.
You might have laughed loudly after watching this video and you surely, you might have u... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 272,
"s": 53,
"text": "Before you read this article and learn automation in Python....let’s watch a video of Christian Genco (a talented programmer and an entrepreneur) explaining the importance of... |
How to count the number of times a button is clicked using JavaScript ? | 29 Jan, 2021
We have given a button, and the task is to count how many times the button is clicked using JavaScript.
Approach: First, we will create a HTML button and a paragraph element where we display the button click count. When the button is clicked, the JavaScript function called. We declare a count variable and... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2021"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "We have given a button, and the task is to count how many times the button is clicked using JavaScript. "
},
{
"code": null,
"e": 446,
"s": 133,
"text": "A... |
Drop columns in DataFrame by label Names or by Index Positions | 02 Jul, 2020
In this article, we will discuss how to drop columns in Pandas Dataframe by label Names or by Index Positions. Drop columns from a DataFrame can be achieved in multiple ways.
Let’s create a simple dataframe with a dictionary of lists, say column names are: ‘Name’, ‘Age’, ‘Place’, ‘College’.
# import pandas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "In this article, we will discuss how to drop columns in Pandas Dataframe by label Names or by Index Positions. Drop columns from a DataFrame can be achieved in multiple ways."... |
How to find index of any Currency Symbols in a given string | 16 Feb, 2021
Given a string txt, the task is to find the index of currency symbols present in the given string.Examples:
Input: txt = “Currency symbol of USA is $”; Output: 26 Explanation : The symbol $ is present at index 33.Input: txt = “One US Dollar($) is equal to 75.70 Indian Rupee.”; Output: 14
Naive Approa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "Given a string txt, the task is to find the index of currency symbols present in the given string.Examples: "
},
{
"code": null,
"e": 321,
"s": 138,
"text... |
Decision Tree Essentials for Every Data Scientist | by Robert Wood | Towards Data Science | Decision trees can be an incredibly useful classification method that lends very well to getting up and running with minimal code.
I have used some form of decision tree to predict the likelihood a customer would churn, customer conversion, new product adoption, new feature adoption, among many other useful application... | [
{
"code": null,
"e": 303,
"s": 172,
"text": "Decision trees can be an incredibly useful classification method that lends very well to getting up and running with minimal code."
},
{
"code": null,
"e": 495,
"s": 303,
"text": "I have used some form of decision tree to predict the l... |
OAuth 2.0 - Accessing a Protected Resource | The client provides an access token to the resource server to access protected resources. The resource server must validate and verify that the access token is valid and has not expired.
There are two standard ways of sending credentials −
Bearer Token − The access token can only be placed in POST request body or GET U... | [
{
"code": null,
"e": 1972,
"s": 1785,
"text": "The client provides an access token to the resource server to access protected resources. The resource server must validate and verify that the access token is valid and has not expired."
},
{
"code": null,
"e": 2025,
"s": 1972,
"tex... |
Feature Selection using Logistic Regression Model | by Satyam Kumar | Towards Data Science | Feature Engineering is an important component of a data science model development pipeline. ‘More data leads to a better machine learning model’, holds true for the number of instances but not for the number of features.
A data scientist spends most of the work time preparing relevant features to train a robust machine... | [
{
"code": null,
"e": 392,
"s": 171,
"text": "Feature Engineering is an important component of a data science model development pipeline. ‘More data leads to a better machine learning model’, holds true for the number of instances but not for the number of features."
},
{
"code": null,
"e... |
Setting up TensorFlow (GPU) on Windows 10 | by Peter Jang | Towards Data Science | Personally, I despise spending hours setting up machine learning tools for training — especially on Windows.
After many trials and errors for the past few years (i.e. Googling and StackOverflow-ing), I’ve decided to share a method I’ve come up with for setting up TensorFlow.
I dedicate this article to other data scient... | [
{
"code": null,
"e": 280,
"s": 171,
"text": "Personally, I despise spending hours setting up machine learning tools for training — especially on Windows."
},
{
"code": null,
"e": 447,
"s": 280,
"text": "After many trials and errors for the past few years (i.e. Googling and StackO... |
Java - String intern() Method | This method returns a canonical representation for the string object. It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true.
Here is the syntax of this method −
public String intern()
Here is the detail of parameters −
This is a default method and this do not... | [
{
"code": null,
"e": 2561,
"s": 2377,
"text": "This method returns a canonical representation for the string object. It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true."
},
{
"code": null,
"e": 2598,
"s": 2561,
"text":... |
Find number of subarrays with even sum - GeeksforGeeks | 10 Feb, 2022
Given an array, find the number of subarrays whose sum is even.
Example :
Input : arr[] = {1, 2, 2, 3, 4, 1}
Output : 9
There are possible subarrays with even
sum. The subarrays are
1) {1, 2, 2, 3} Sum = 8
2) {1, 2, 2, 3, 4} Sum = 12
3) {2} Sum = 2 (At index 1)
4) {2, 2} Sum = 4
5) {2, 2, 3, 4, 1} ... | [
{
"code": null,
"e": 24325,
"s": 24297,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 24389,
"s": 24325,
"text": "Given an array, find the number of subarrays whose sum is even."
},
{
"code": null,
"e": 24400,
"s": 24389,
"text": "Example : "
},
{
"... |
Android - Image Switcher | Sometimes you don't want an image to appear abruptly on the screen, rather you want to apply some kind of animation to the image when it transitions from one image to another. This is supported by android in the form of ImageSwitcher.
An image switcher allows you to add some transitions on the images through the way th... | [
{
"code": null,
"e": 3842,
"s": 3607,
"text": "Sometimes you don't want an image to appear abruptly on the screen, rather you want to apply some kind of animation to the image when it transitions from one image to another. This is supported by android in the form of ImageSwitcher."
},
{
"cod... |
Python Program to convert Kilometers to Miles | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given distance in kilometers and we need to convert it into miles
As we know that 1 kilometer equals 0.62137 miles.
Miles = kilometer * 0.62137
Now let’s observe the concept in the implementation below−
L... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1243,
"s": 1150,
"text": "Problem statement − We are given distance in kilometers and we need to convert it into miles"
... |
Batch Script - START | This batch command starts a program in new window, or opens a document.
START “programname”
@echo off
start notepad.exe
When the batch file is executed, a new notepad windows will start.
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2241,
"s": 2169,
"text": "This batch command starts a program in new window, or opens a document."
},
{
"code": null,
"e": 2262,
"s": 2241,
"text": "START “programname”\n"
},
{
"code": null,
"e": 2290,
"s": 2262,
"text": "@echo off\nstart ... |
C Program to list all files and sub-directories in a directory | Here, we are given a directory. Our task is to create a C program to list all files and sub-directories in a directory.
The directory is a place/area/location where a set of the file(s) will be stored.
Subdirectory is a directory inside the root directory, in turn, it can have another sub-directory in it.
In C programm... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "Here, we are given a directory. Our task is to create a C program to list all files and sub-directories in a directory."
},
{
"code": null,
"e": 1264,
"s": 1182,
"text": "The directory is a place/area/location where a set of the file... |
Creating Sequential Stream from an Iterator in Java - GeeksforGeeks | 11 Dec, 2018
Iterators, in Java, are used in Collection Framework to retrieve elements one by one.
A stream in Java is a pipeline of objects from an array or a collection data source. A sequential stream is one in which the objects are pipelined in a single stream on the same processing system. Other types of stream in... | [
{
"code": null,
"e": 24139,
"s": 24111,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 24225,
"s": 24139,
"text": "Iterators, in Java, are used in Collection Framework to retrieve elements one by one."
},
{
"code": null,
"e": 24531,
"s": 24225,
"text": "A st... |
Introducing Bamboolib — a GUI for Pandas | by Dario Radečić | Towards Data Science | He states, and I quote:
Our goal is to help people quickly learn and work with pandas, and we want to onboard the next generation of python data scientists.
I have to admit, I was skeptical at first, mainly because I’m not a big fan of GUI tools and drag & drop principle in general. Still, I’ve opened the URL and watch... | [
{
"code": null,
"e": 196,
"s": 172,
"text": "He states, and I quote:"
},
{
"code": null,
"e": 329,
"s": 196,
"text": "Our goal is to help people quickly learn and work with pandas, and we want to onboard the next generation of python data scientists."
},
{
"code": null,
... |
Python 3 - String replace() Method | The replace() method returns a copy of the string in which the occurrences of old have been replaced with new, optionally restricting the number of replacements to max.
Following is the syntax for replace() method −
str.replace(old, new[, max])
old − This is old substring to be replaced.
old − This is old substring to... | [
{
"code": null,
"e": 2509,
"s": 2340,
"text": "The replace() method returns a copy of the string in which the occurrences of old have been replaced with new, optionally restricting the number of replacements to max."
},
{
"code": null,
"e": 2556,
"s": 2509,
"text": "Following is ... |
Create AI for your Own Board Game From Scratch — AlphaZero-Part 3 | by Haryo Akbarianto Wibowo | Towards Data Science | Hello everyone, welcome to the part 3 of making AI on the EvoPawness (Temporary Name). In this article, we will implement AlphaZero Algorithm to the game. This article will tell you a short summary of the AlphaZero and the implementation of the AlphaZero, albeit the simplified one. We will do it in a step by step. We w... | [
{
"code": null,
"e": 607,
"s": 172,
"text": "Hello everyone, welcome to the part 3 of making AI on the EvoPawness (Temporary Name). In this article, we will implement AlphaZero Algorithm to the game. This article will tell you a short summary of the AlphaZero and the implementation of the AlphaZero,... |
How to create a Tkinter error message box? | The Tkinter library has many built-in functions and methods which can be used to implement the functional part of an application. We can use messagebox module in Tkinter to create various popup dialog boxes. The messagebox property has different types of built-in popup windows that the users can use in their applicatio... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "The Tkinter library has many built-in functions and methods which can be used to implement the functional part of an application. We can use messagebox module in Tkinter to create various popup dialog boxes. The messagebox property has different types o... |
Python library PyTube to download youtube videos | You know “youtube” right? Yes that most famous video sharing website especially in india . Most of the time, you like some videos and you try to download that video so as to check it later/offline. Then you come across “youtube-downloader” app to download youtube videos from the youtube website. But most of the apps co... | [
{
"code": null,
"e": 1747,
"s": 1062,
"text": "You know “youtube” right? Yes that most famous video sharing website especially in india . Most of the time, you like some videos and you try to download that video so as to check it later/offline. Then you come across “youtube-downloader” app to downlo... |
What happens when a function is called before its declaration in C? | If we do not use some function prototypes, and the function body is declared in some section which is present after the calling statement of that function. In such a case, the compiler thinks that the default return type is an integer. But if the function returns some other type of value, it returns an error. If the re... | [
{
"code": null,
"e": 1479,
"s": 1062,
"text": "If we do not use some function prototypes, and the function body is declared in some section which is present after the calling statement of that function. In such a case, the compiler thinks that the default return type is an integer. But if the functi... |
Convert a BST to a Binary Tree such that sum of all greater keys is added to every key | 02 Feb, 2022
Given a Binary Search Tree (BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum of all greater keys in BST. Examples:
Input: Root of following BST
5
/ \
2 13
Output: The given BST is converted to following Binary ... | [
{
"code": null,
"e": 25246,
"s": 25218,
"text": "\n02 Feb, 2022"
},
{
"code": null,
"e": 25414,
"s": 25246,
"text": "Given a Binary Search Tree (BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum of all greater keys in BST. Exampl... |
Data Science 101. A Step-by-Step Guide | Towards Data Science | IntroductionProblem StatementData CollectionExploratory Data AnalysisFeature EngineeringModel ComparisonResults DiscussionSummaryReferences
Introduction
Problem Statement
Data Collection
Exploratory Data Analysis
Feature Engineering
Model Comparison
Results Discussion
Summary
References
There is a certain trend in all ... | [
{
"code": null,
"e": 312,
"s": 172,
"text": "IntroductionProblem StatementData CollectionExploratory Data AnalysisFeature EngineeringModel ComparisonResults DiscussionSummaryReferences"
},
{
"code": null,
"e": 325,
"s": 312,
"text": "Introduction"
},
{
"code": null,
"... |
Write a Golang program to reverse an array | Input arr = [3, 5, 7, 9, 10, 4] => [4, 10, 9, 7, 5, 3]
Input arr = [1, 2, 3, 4, 5] => [5, 4, 3, 2, 1]
Step 1: Define a function that accepts an array.
Step 2: Start iterating the input array.
Step 3: Swap first element with last element of the given array.
Step 4: Return array.
Live Demo
package main
import "fmt"
func... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "Input arr = [3, 5, 7, 9, 10, 4] => [4, 10, 9, 7, 5, 3]"
},
{
"code": null,
"e": 1164,
"s": 1117,
"text": "Input arr = [1, 2, 3, 4, 5] => [5, 4, 3, 2, 1]"
},
{
"code": null,
"e": 1213,
"s": 1164,
"text": "Step 1: D... |
Perl | Loops (for, foreach, while, do...while, until, Nested loops) - GeeksforGeeks | 16 Jun, 2021
Looping in programming languages is a feature which facilitates the execution of a set of instructions or functions repeatedly while some condition evaluates to true. Loops make the programmers task simpler. Perl provides the different types of loop to handle the condition based situation in the program. T... | [
{
"code": null,
"e": 25280,
"s": 25252,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 25611,
"s": 25280,
"text": "Looping in programming languages is a feature which facilitates the execution of a set of instructions or functions repeatedly while some condition evaluates to tr... |
Using Open Source Prophet Package to Make Future Predictions in R | by Harel Rechavia | Towards Data Science | Almost every company wishes to answer where they will be one week/month/year from now.The answers to those questions can be valuable when planning the company’s infrastructure, KPIs (key performance indicators) and worker goals.Hence, using data forecasting tools are one of the common tasks data professionals are being... | [
{
"code": null,
"e": 511,
"s": 172,
"text": "Almost every company wishes to answer where they will be one week/month/year from now.The answers to those questions can be valuable when planning the company’s infrastructure, KPIs (key performance indicators) and worker goals.Hence, using data forecasti... |
Java Cryptography - Verifying Signature | You can create digital signature using Java and verify it following the steps given below.
The KeyPairGenerator class provides getInstance() method which accepts a String variable representing the required key-generating algorithm and returns a KeyPairGenerator object that generates keys.
Create KeyPairGenerator object... | [
{
"code": null,
"e": 2144,
"s": 2053,
"text": "You can create digital signature using Java and verify it following the steps given below."
},
{
"code": null,
"e": 2343,
"s": 2144,
"text": "The KeyPairGenerator class provides getInstance() method which accepts a String variable re... |
SAS - Macros | SAS has a powerful programming feature called Macros which allows us to avoid repetitive sections of code and to use them again and again when needed. It also helps create dynamic variables within the code that can take different values for different run instances of the same code. Macros can also be declared for block... | [
{
"code": null,
"e": 3038,
"s": 2583,
"text": "SAS has a powerful programming feature called Macros which allows us to avoid repetitive sections of code and to use them again and again when needed. It also helps create dynamic variables within the code that can take different values for different ru... |
Increase and decrease row value by 1 in MySQL with Stored Procedure? | Let us first create a table to increase and adecrease row value by 1. The following is the query −
mysql> create table IncrementAndDecrementValue
−> (
−> UserId int,
−> UserScores int
−> );
Query OK, 0 rows affected (0.60 sec)
Insert some records in the table using insert command. The query is as follows −
... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "Let us first create a table to increase and adecrease row value by 1. The following is the query −"
},
{
"code": null,
"e": 1301,
"s": 1161,
"text": "mysql> create table IncrementAndDecrementValue\n −> (\n −> UserId int,\n −> U... |
Ionic - Quick Guide | Ionic is a front-end HTML framework built on top of AngularJS and Cordova. As per their official document, the definition of this Ionic Open Source Framework is as follows −
Ionic is an HTML5 Mobile App Development Framework targeted at building hybrid mobile apps. Think of Ionic as the front-end UI framework that hand... | [
{
"code": null,
"e": 2637,
"s": 2463,
"text": "Ionic is a front-end HTML framework built on top of AngularJS and Cordova. As per their official document, the definition of this Ionic Open Source Framework is as follows −"
},
{
"code": null,
"e": 3015,
"s": 2637,
"text": "Ionic is... |
Java Program to Check if a given matrix is sparse or not - GeeksforGeeks | 13 Jan, 2022
A matrix is a two-dimensional data object having m rows and n columns, therefore a total of m*n values. If most of the values of a matrix are 0 then we say that the matrix is sparse. Consider a definition of Sparse where a matrix is considered sparse if the number of 0s is more than half of the elements in... | [
{
"code": null,
"e": 23635,
"s": 23607,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 23955,
"s": 23635,
"text": "A matrix is a two-dimensional data object having m rows and n columns, therefore a total of m*n values. If most of the values of a matrix are 0 then we say that th... |
C# | Char.IsUpper() Method - GeeksforGeeks | 01 Feb, 2019
In C#, Char.IsUpper() is a System.Char struct method which is used to check whether a Unicode character can be categorized as an uppercase letter or not. Valid uppercase letters will be the members of the UnicodeCategory: UppercaseLetter. This method can be overloaded by passing different type and number o... | [
{
"code": null,
"e": 23271,
"s": 23243,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 23597,
"s": 23271,
"text": "In C#, Char.IsUpper() is a System.Char struct method which is used to check whether a Unicode character can be categorized as an uppercase letter or not. Valid upp... |
How to convert a CLOB type to String in Java? | CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2,147,483,647 characters.
The java.sql.Clob interface of the JDBC API represents the CLOB datatype. Since the Clob object in JDBC is impl... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2,147,483,647 characters."
},
{
"code": null,
"e": 1471,
... |
R - Decision Tree | Decision tree is a graph to represent choices and their results in form of a tree. The nodes in the graph represent an event or choice and the edges of the graph represent the decision rules or conditions. It is mostly used in Machine Learning and Data Mining applications using R.
Examples of use of decision tress is −... | [
{
"code": null,
"e": 2684,
"s": 2402,
"text": "Decision tree is a graph to represent choices and their results in form of a tree. The nodes in the graph represent an event or choice and the edges of the graph represent the decision rules or conditions. It is mostly used in Machine Learning and Data ... |
Tk - Canvas Widgets | Canvas is used for providing drawing areas. The syntax for canvas widget is shown below −
canvas canvasName options
The options available for the canvas widget are listed below in the following table −
-background color
Used to set background color for widget.
-closeenough distance
Sets the closeness of mouse cursor t... | [
{
"code": null,
"e": 2291,
"s": 2201,
"text": "Canvas is used for providing drawing areas. The syntax for canvas widget is shown below −"
},
{
"code": null,
"e": 2318,
"s": 2291,
"text": "canvas canvasName options\n"
},
{
"code": null,
"e": 2404,
"s": 2318,
"t... |
Real Time Application(Twitter) | Let us analyze a real time application to get the latest twitter feeds and its hashtags. Earlier, we have seen integration of Storm and Spark with Kafka. In both the scenarios, we created a Kafka Producer (using cli) to send message to the Kafka ecosystem. Then, the storm and spark inte-gration reads the messages by us... | [
{
"code": null,
"e": 2437,
"s": 1967,
"text": "Let us analyze a real time application to get the latest twitter feeds and its hashtags. Earlier, we have seen integration of Storm and Spark with Kafka. In both the scenarios, we created a Kafka Producer (using cli) to send message to the Kafka ecosyst... |
How to put a ListView into a ScrollView without it collapsing on Android in Kotlin? | This example demonstrates how to put a ListView into a ScrollView without it collapsing on Android in Kotlin.
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... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "This example demonstrates how to put a ListView into a ScrollView without it collapsing on Android in Kotlin."
},
{
"code": null,
"e": 1301,
"s": 1172,
"text": "Step 1 − Create a new project in Android Studio, go to File ? New Projec... |
GATE | GATE-CS-2014-(Set-1) | Question 65 - GeeksforGeeks | 16 Nov, 2020
Given the following statements:
S1: A foreign key declaration can always
be replaced by an equivalent check
assertion in SQL.
S2: Given the table R(a,b,c) where a and
b together form the primary key, the
following is a valid table definition.
CREATE TABLE S... | [
{
"code": null,
"e": 24466,
"s": 24438,
"text": "\n16 Nov, 2020"
},
{
"code": null,
"e": 24498,
"s": 24466,
"text": "Given the following statements:"
},
{
"code": null,
"e": 24917,
"s": 24498,
"text": " S1: A foreign key declaration can always \n be ... |
Implementing XGBoost from scratch | by Siddhesh Jadhav | Towards Data Science | XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, flexible and portable.
It has been used in almost every machine learning hackathon and is usually the first preference while choosing a model.
But understanding how it actually works is always the difficult part. The complex ... | [
{
"code": null,
"e": 289,
"s": 171,
"text": "XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, flexible and portable."
},
{
"code": null,
"e": 409,
"s": 289,
"text": "It has been used in almost every machine learning hackathon and is u... |
Wrap a page's content with Bootstrap | To wrap a page's content, use the .container class,
<div class = "container">
...
</div>
The following is the .container class in bootstrap.css file:
.container{
padding-right: 20px;
padding-left: 20px;
margin-right: auto;
margin-left: auto;
} | [
{
"code": null,
"e": 1115,
"s": 1062,
"text": "To wrap a page's content, use the .container class, "
},
{
"code": null,
"e": 1152,
"s": 1115,
"text": "<div class = \"container\">\n...\n</div>"
},
{
"code": null,
"e": 1214,
"s": 1152,
"text": "The following is ... |
How to load and display an image in ImageView on Android App? | This example demonstrates how to load and display an image in ImageView on Android App.
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-8"?>... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "This example demonstrates how to load and display an image in ImageView on Android App."
},
{
"code": null,
"e": 1279,
"s": 1150,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require... |
Adam Number | Practice | GeeksforGeeks | Given a number N, write a program to check whether given number is Adam Number or not.
Adam number is a number when reversed, the square of the number and the square of the reversed number should be numbers which are reverse of each other.
Example 1:
Input:
N = 12
Output:
YES
Explanation:
122 = 144 and 212 = 441. 1... | [
{
"code": null,
"e": 478,
"s": 238,
"text": "Given a number N, write a program to check whether given number is Adam Number or not.\nAdam number is a number when reversed, the square of the number and the square of the reversed number should be numbers which are reverse of each other."
},
{
... |
Creating scrollable Listbox within a grid using Tkinter | A Listbox widget displays a list of items such as numbers list, items list, list of employees in a company, etc. There might be a case when a long list of items in a Listbox needs a way to be viewed inside the window. For this purpose, we can attach scrollbars to the Listbox widget by initializing the Scrollbar() objec... | [
{
"code": null,
"e": 1481,
"s": 1062,
"text": "A Listbox widget displays a list of items such as numbers list, items list, list of employees in a company, etc. There might be a case when a long list of items in a Listbox needs a way to be viewed inside the window. For this purpose, we can attach scr... |
Building Blocks: Text Pre-Processing | by Shashank Kapadia | Towards Data Science | In the last article of our series, we introduced the concept of Natural Language Processing, you can read it here, and now you probably want to try it yourself, right? Great! Without further ado, let’s dive in to the building blocks for statistical natural language processing.
In this article, we’ll introduce the key c... | [
{
"code": null,
"e": 449,
"s": 171,
"text": "In the last article of our series, we introduced the concept of Natural Language Processing, you can read it here, and now you probably want to try it yourself, right? Great! Without further ado, let’s dive in to the building blocks for statistical natura... |
Sequence of execution of, instance method, static block and constructor in java? | A static block is a block of code with a static keyword. In general, these are used to initialize the static members of a class. JVM executes static blocks before the main method at the time loading a class.
public class MyClass {
static{
System.out.println("Hello this is a static block");
}
public stati... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "A static block is a block of code with a static keyword. In general, these are used to initialize the static members of a class. JVM executes static blocks before the main method at the time loading a class."
},
{
"code": null,
"e": 1466,
... |
VBScript UBound Function | The UBound Function returns the Largest subscript of the specified array. Hence, this value corresponds to the size of the array.
UBound(ArrayName[,dimension])
ArrayName, a Required parameter. This parameter corresponds to the name of the array.
ArrayName, a Required parameter. This parameter corresponds to the name o... | [
{
"code": null,
"e": 2210,
"s": 2080,
"text": "The UBound Function returns the Largest subscript of the specified array. Hence, this value corresponds to the size of the array."
},
{
"code": null,
"e": 2241,
"s": 2210,
"text": "UBound(ArrayName[,dimension])\n"
},
{
"code"... |
Writing Professional Data Science Documentation | by Adam Gajtkowski | Towards Data Science | Documentation is an important part of being a data scientist. I propose to use R Markdown and LaTeX to document data science models.
There are several desirable properties of good documentation
easily accessible
readable
consistent across projects
reproducible
Using LaTeX inside R Markdown allows users to use consisten... | [
{
"code": null,
"e": 305,
"s": 172,
"text": "Documentation is an important part of being a data scientist. I propose to use R Markdown and LaTeX to document data science models."
},
{
"code": null,
"e": 366,
"s": 305,
"text": "There are several desirable properties of good docume... |
Exquisite hand and finger tracking in web browsers with MediaPipe’s machine learning models | by LucianoSphere | Towards Data Science | Introduction
Hands-on testing
Testing more advanced features in MediaPipe’s CodePen example
Performance of the hand tracking tool
All of MediaPipe’s tracking tools
Imagining the range of potential applications
MediaPipe offers cross-platform machine learning-based solutions for augmented reality applications using noth... | [
{
"code": null,
"e": 184,
"s": 171,
"text": "Introduction"
},
{
"code": null,
"e": 201,
"s": 184,
"text": "Hands-on testing"
},
{
"code": null,
"e": 263,
"s": 201,
"text": "Testing more advanced features in MediaPipe’s CodePen example"
},
{
"code": nul... |
What are the clustering types? What is Gaussian Mixture Model? Clustering for image segmentation, Clustering for data preprocessing | Towards Data Science | Table of Contents1. Introduction2. Clustering Types2.1. K-Means-----Theory-----The optimal number of clusters-----Implementation2.2. Mini-Batch K-Means2.3. DBSCAN2.4. Agglomerative Clustering2.5. Mean-Shift2.6. BIRCH3. Image Segmentation with Clustering4. Data Preprocessing with Clustering5. Gaussian Mixture Model-----... | [
{
"code": null,
"e": 558,
"s": 171,
"text": "Table of Contents1. Introduction2. Clustering Types2.1. K-Means-----Theory-----The optimal number of clusters-----Implementation2.2. Mini-Batch K-Means2.3. DBSCAN2.4. Agglomerative Clustering2.5. Mean-Shift2.6. BIRCH3. Image Segmentation with Clustering4.... |
Differences between wait() and join() methods in Java | In multithreading when we deal with threads there comes the requirement of pause and start a thread for this Threading provides two methods wait and join which are used for the same.
The following are the important differences between wait() and join().
JavaTester.java
Live Demo
public class JavaTester extends Thread ... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "In multithreading when we deal with threads there comes the requirement of pause and start a thread for this Threading provides two methods wait and join which are used for the same."
},
{
"code": null,
"e": 1316,
"s": 1245,
"text": ... |
kasai’s Algorithm | Kasai’s Algorithm is used to get the Longest Common Prefix (LCP) array from suffix array. At first suffix arrays are found. After that Kasai's algorithm takes the suffix array list to find LCP.
For the LCP array, it takes O(m log n), where m is pattern length and n is the length of the text. The Kasai’s Algorithm, it t... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "Kasai’s Algorithm is used to get the Longest Common Prefix (LCP) array from suffix array. At first suffix arrays are found. After that Kasai's algorithm takes the suffix array list to find LCP."
},
{
"code": null,
"e": 1438,
"s": 1256,
... |
How to read a Matrix from user in Java? - GeeksforGeeks | 05 Mar, 2019
Given task is to read a matrix from the user. The size and number of elements of matrices are to be read from the keyboard.
// Java program to read a matrix from user import java.util.Scanner; public class MatrixFromUser { // Function to read matrix public static void readMatrixByUser() { ... | [
{
"code": null,
"e": 24026,
"s": 23998,
"text": "\n05 Mar, 2019"
},
{
"code": null,
"e": 24150,
"s": 24026,
"text": "Given task is to read a matrix from the user. The size and number of elements of matrices are to be read from the keyboard."
},
{
"code": "// Java program ... |
Create and publish your own Python package | by Mike Huls | Towards Data Science | You are probably familiar with requests, Pandas, Numpy and many other packages that you can install with pip. Now it’s time to create your own package! In this article we’ll go through the required steps to package and publish your Python code for the whole world to pip install. First we’ll look at packaging your code,... | [
{
"code": null,
"e": 543,
"s": 172,
"text": "You are probably familiar with requests, Pandas, Numpy and many other packages that you can install with pip. Now it’s time to create your own package! In this article we’ll go through the required steps to package and publish your Python code for the who... |
Java XML - Quick Guide | XML is a simple text-based language which was designed to store and transport data in plain text format. It stands for Extensible Markup Language. Following are some of the salient features of XML.
XML is a markup language.
XML is a markup language.
XML is a tag based language like HTML.
XML is a tag based language lik... | [
{
"code": null,
"e": 2521,
"s": 2323,
"text": "XML is a simple text-based language which was designed to store and transport data in plain text format. It stands for Extensible Markup Language. Following are some of the salient features of XML."
},
{
"code": null,
"e": 2547,
"s": 252... |
Conditional statements in JavaScript | There are three types of conditional statements in JavaScript −
If statement − The if statement is used to execute code inside the if block only if the specific condition is met.
If else statement − The If....Else statement is used to check only two conditions and execute different codes for each of them.
If else if el... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "There are three types of conditional statements in JavaScript −"
},
{
"code": null,
"e": 1241,
"s": 1126,
"text": "If statement − The if statement is used to execute code inside the if block only if the specific condition is met."
... |
Java regex program to verify whether a String contains at least one alphanumeric character. | Following regular expression matches a string that contains at least one alphanumeric characters −
"^.*[a-zA-Z0-9]+.*$";
Where,
^.* Matches the string starting with zero or more (any) characters.
^.* Matches the string starting with zero or more (any) characters.
[a-zA-Z0-9]+ Matches at least one alpha-numeric characte... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "Following regular expression matches a string that contains at least one alphanumeric characters −"
},
{
"code": null,
"e": 1183,
"s": 1161,
"text": "\"^.*[a-zA-Z0-9]+.*$\";"
},
{
"code": null,
"e": 1190,
"s": 1183,
... |
Design and Analysis Bubble Sort | Bubble Sort is an elementary sorting algorithm, which works by repeatedly exchanging adjacent elements, if necessary. When no exchanges are required, the file is sorted.
This is the simplest technique among all sorting algorithms.
Algorithm: Sequential-Bubble-Sort (A)
fori← 1 to length [A] do
for j ← length [A] down-... | [
{
"code": null,
"e": 2769,
"s": 2599,
"text": "Bubble Sort is an elementary sorting algorithm, which works by repeatedly exchanging adjacent elements, if necessary. When no exchanges are required, the file is sorted."
},
{
"code": null,
"e": 2830,
"s": 2769,
"text": "This is the ... |
Right View of Binary Tree | Practice | GeeksforGeeks | Given a Binary Tree, find Right view of it. Right view of a Binary Tree is set of nodes visible when tree is viewed from right side.
Right view of following tree is 1 3 7 8.
1
/ \
2 3
/ \ / \
4 5 6 7
\
8
Example 1:
Input:
1
/ \
3 2
... | [
{
"code": null,
"e": 371,
"s": 238,
"text": "Given a Binary Tree, find Right view of it. Right view of a Binary Tree is set of nodes visible when tree is viewed from right side."
},
{
"code": null,
"e": 412,
"s": 371,
"text": "Right view of following tree is 1 3 7 8."
},
{
... |
Java.lang.Package class in Java | 15 Jul, 2017
Java 2 added a class called Package that encapsulates version data associated with a package. Package version information is becoming more important because of the proliferation of packages and because a java program may need to know what version of a package is available.This versioning information is ret... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2017"
},
{
"code": null,
"e": 575,
"s": 52,
"text": "Java 2 added a class called Package that encapsulates version data associated with a package. Package version information is becoming more important because of the proliferat... |
How to get rows/index names in Pandas dataframe | 02 Nov, 2021
While analyzing the real datasets which are often very huge in size, we might need to get the rows or index names in order to perform some certain operations.
Let’s discuss how to get row names in Pandas dataframe.
First, let’s create a simple dataframe with nba.csv
Python3
# Import pandas package import p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "While analyzing the real datasets which are often very huge in size, we might need to get the rows or index names in order to perform some certain operations."
},
{
"c... |
numpy.median() in Python | 28 Nov, 2018
numpy.median(arr, axis = None) : Compute the median of the given data (array elements) along the specified axis.
How to calculate median?
Given data points.
Arrange them in ascending order
Median = middle term if total no. of terms are odd.
Median = Average of the terms in the middle (if total no. of terms... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "numpy.median(arr, axis = None) : Compute the median of the given data (array elements) along the specified axis."
},
{
"code": null,
"e": 166,
"s": 141,
"t... |
Python MySQL - Select Data | You can retrieve/fetch data from a table in MySQL using the SELECT query. This query/statement returns contents of the specified table in tabular form and it is called as result-set.
Following is the syntax of the SELECT query −
SELECT column1, column2, columnN FROM table_name;
Assume we have created a table in MySQL ... | [
{
"code": null,
"e": 3522,
"s": 3339,
"text": "You can retrieve/fetch data from a table in MySQL using the SELECT query. This query/statement returns contents of the specified table in tabular form and it is called as result-set."
},
{
"code": null,
"e": 3568,
"s": 3522,
"text": ... |
Operators in Scala | 31 Aug, 2021
An operator is a symbol that represents an operation to be performed with one or more operand. Operators are the foundation of any programming language. Operators allow us to perform different kinds of operations on operands. There are different types of operators used in Scala as follows:
Arithmetic Oper... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 346,
"s": 54,
"text": "An operator is a symbol that represents an operation to be performed with one or more operand. Operators are the foundation of any programming language. Operators allow us to... |
Division Operators in Python | 07 Jun, 2022
Division Operators allow you to divide two numbers and return a quotient, i.e., the first number or number at the left is divided by the second number or number at the right and returns the quotient.
There are two types of division operators:
The quotient returns by this operator is always a float number... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 253,
"s": 52,
"text": "Division Operators allow you to divide two numbers and return a quotient, i.e., the first number or number at the left is divided by the second number or number at the right ... |
Scanner nextLine() method in Java with Examples | 12 Oct, 2018
The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This function prints the rest of the current line, leaving out the line separator at the end. The next is set to after the line separator. Since this method continues to sear... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Oct, 2018"
},
{
"code": null,
"e": 509,
"s": 54,
"text": "The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This function prints the rest of the curr... |
Java Program for Third largest element in an array of distinct elements | 03 Jan, 2022
Given an array of n integers, find the third largest element. All the elements in the array are distinct integers. Example :
Input: arr[] = {1, 14, 2, 16, 10, 20}
Output: The third Largest element is 14
Explanation: Largest element is 20, second largest element is 16
and third largest element is 14
In... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Given an array of n integers, find the third largest element. All the elements in the array are distinct integers. Example : "
},
{
"code": null,
"e": 516,
"s... |
HTML | DOM outerHTML property | 11 Jun, 2020
The outerHTML property of the DOM interface gives the HTML fragment of that element. It not only gives the content, but the whole HTML structure of the element. It can also be used to replace the HTML structure of the element.
Syntax:
To return the outerHTML.var value = element.outerHTML;
var value = eleme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 255,
"s": 28,
"text": "The outerHTML property of the DOM interface gives the HTML fragment of that element. It not only gives the content, but the whole HTML structure of the element. It can also be... |
Matplotlib.axes.Axes.get_label() 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... |
Puzzle | 1000 light bulbs switched on/off by 1000 people passing by | 05 Jul, 2021
There are 1000 light bulbs and 1000 people. All light bulbs are initially off. Person 1 goes flipping light bulb 1, 2, 3, 4, ... person 2 then flips 2, 4, 6, 8, ... person 3 then 3, 6, 9, ... etc until all 1000 persons have done this. What is the status of light bulbs 25, 93, 576, 132, 605, 26, 45, 37, 36 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 552,
"s": 54,
"text": "There are 1000 light bulbs and 1000 people. All light bulbs are initially off. Person 1 goes flipping light bulb 1, 2, 3, 4, ... person 2 then flips 2, 4, 6, 8, ... person 3 ... |
What is a PyMongo Cursor? | 14 Jun, 2022
MongoDB is an open-source database management system that uses the NoSql database to store large amounts of data. MongoDB uses collection and documents instead of tables like traditional relational databases. MongoDB documents are similar to JSON objects but use a variant called Binary JSON (BSON) that acc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "MongoDB is an open-source database management system that uses the NoSql database to store large amounts of data. MongoDB uses collection and documents instead of tables like ... |
Saving an Image from URL in PHP | 31 Jul, 2021
Sometimes, need to download an image from a particular URL and use it into the project. It’s easy to go to the page and use right click button and save the image. But what if you wanted to do it programmatically? The reasons may vary person to person, developer to developer. If set of hundreds of image URL... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 510,
"s": 28,
"text": "Sometimes, need to download an image from a particular URL and use it into the project. It’s easy to go to the page and use right click button and save the image. But what if ... |
Maximum possible sum of non-adjacent array elements not exceeding K | 01 Jul, 2022
Given an array arr[] consisting of N integers and an integer K, the task is to select some non-adjacent array elements with the maximum possible sum not exceeding K.
Examples:
Input: arr[] = {50, 10, 20, 30, 40}, K = 100Output: 90Explanation: To maximize the sum that doesn’t exceed K(= 100), select element... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 219,
"s": 53,
"text": "Given an array arr[] consisting of N integers and an integer K, the task is to select some non-adjacent array elements with the maximum possible sum not exceeding K."
},
... |
Python MySQL – Join | 13 Jun, 2022
A connector is employed when we have to use mysql with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server.
This is a MySQL Connector that allows Python ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 314,
"s": 52,
"text": "A connector is employed when we have to use mysql with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language.... |
Ruby | String count() Method | 13 Dec, 2019
count is a String class method in Ruby. In this method each parameter defines a set of characters to which is to be counted. The intersection of these sets defines the characters to count in the given string. Any other string which starts with a caret ^ is negated.
Syntax:str.count(parameter_list)
Paramete... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2019"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "count is a String class method in Ruby. In this method each parameter defines a set of characters to which is to be counted. The intersection of these sets defines the charact... |
Deleting a Local GitHub Repository | 04 Aug, 2021
When a user clones a Git repository from Github using the command git clone <url>, they get a copy of the remote repo on their local computer so that they can work on it on their current working directory where the repo got cloned without directly making changes on the remote repository.
If you want to del... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "When a user clones a Git repository from Github using the command git clone <url>, they get a copy of the remote repo on their local computer so that they can work on it on th... |
Count number of digits after decimal on dividing a number | 07 Jul, 2021
We are given two numbers A and B. We need to calculate the number of digits after decimal. If in case the numbers are irrational then print “INF”.Examples:
Input : x = 5, y = 3
Output : INF
5/3 = 1.666....
Input : x = 3, y = 6
Output : 1
3/6 = 0.5
The idea is simple we follow school division and keep ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 209,
"s": 52,
"text": "We are given two numbers A and B. We need to calculate the number of digits after decimal. If in case the numbers are irrational then print “INF”.Examples: "
},
{
"co... |
ZonedDateTime withZoneSameInstant() method in Java with Examples | 23 Mar, 2022
The withZoneSameInstant() method of a ZonedDateTime class is used to return a copy of this ZonedDateTime object by changing the time-zone and without the instant. This method is based on retaining the same instant, thus gaps and overlaps in the local timeline have no effect on the result.
Syntax:
public Zo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 318,
"s": 28,
"text": "The withZoneSameInstant() method of a ZonedDateTime class is used to return a copy of this ZonedDateTime object by changing the time-zone and without the instant. This method ... |
Fabric.js Image Width Property - GeeksforGeeks | 25 Jan, 2021
Fabric.js is a JavaScript library that is used to work with canvas. The canvas image is one of the class of fabric.js that is used to create image instances. The canvas image means the Image is movable and can be stretched according to requirement. The width property of the image is used to set the width o... | [
{
"code": null,
"e": 24935,
"s": 24907,
"text": "\n25 Jan, 2021"
},
{
"code": null,
"e": 25255,
"s": 24935,
"text": "Fabric.js is a JavaScript library that is used to work with canvas. The canvas image is one of the class of fabric.js that is used to create image instances. The c... |
Transform the array | Practice | GeeksforGeeks | Given an array arr[] of size N containing integers, zero is considered an invalid number, and rest all other numbers are valid. If two nearest valid numbers are equal then double the value of the first one and make the second number as 0. At last move all the valid numbers on the left.
Example 1:
Input: N = 12
arr[] = ... | [
{
"code": null,
"e": 513,
"s": 226,
"text": "Given an array arr[] of size N containing integers, zero is considered an invalid number, and rest all other numbers are valid. If two nearest valid numbers are equal then double the value of the first one and make the second number as 0. At last move all... |
maximize_window driver method – Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 767,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
How to convert special characters to HTML in Javascript? | 27 Sep, 2019
In HTML there are many cases in which the browser gets confused while rendering the page. In HTML the less-than sign ( < ) means the opening of some tag and if we place an element an after it like ‘a’ or ‘h’ then browser identifies them as an anchor and heading tab respectively. Similar is the case with so... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "In HTML there are many cases in which the browser gets confused while rendering the page. In HTML the less-than sign ( < ) means the opening of some tag and if we place an ele... |
Basics of File Handling in C | Here we will see some basic file handling operations in C. The operations are listed below:
Writing into a File
Reading from File
Appending in a File
See the code to get the idea how we write into a file
#include <stdio.h>
int main() {
FILE *fp;
char *filename = "sample.txt";
char *content = "Hey there! You've... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "Here we will see some basic file handling operations in C. The operations are listed below:"
},
{
"code": null,
"e": 1174,
"s": 1154,
"text": "Writing into a File"
},
{
"code": null,
"e": 1192,
"s": 1174,
"text": ... |
Check if the given string is the same as its reflection in a mirror - GeeksforGeeks | 11 Aug, 2021
Given a string S containing only uppercase English characters. The task is to find whether S is the same as its reflection in a mirror.Examples:
Input: str = "AMA"
Output: YES
AMA is same as its reflection in the mirror.
Input: str = "ZXZ"
Output: NO
Approach: The string obviously has to be a palindrome... | [
{
"code": null,
"e": 24528,
"s": 24500,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 24675,
"s": 24528,
"text": "Given a string S containing only uppercase English characters. The task is to find whether S is the same as its reflection in a mirror.Examples: "
},
{
"c... |
Check if a point having maximum X and Y coordinates exists or not - GeeksforGeeks | 29 Nov, 2021
Given a 2D array arr[] consisting of N coordinates of the form (X, Y), the task is to find a coordinate from the given array such that the X-coordinate of this point is greater than all other X-coordinates and the Y-coordinate of this point is greater than all other Y-coordinates. If no such point exists, ... | [
{
"code": null,
"e": 25306,
"s": 25278,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 25623,
"s": 25306,
"text": "Given a 2D array arr[] consisting of N coordinates of the form (X, Y), the task is to find a coordinate from the given array such that the X-coordinate of this poi... |
How to clear cache memory using JavaScript? - GeeksforGeeks | 27 Mar, 2020
Unlike mobile applications, a web browser doesn’t allow to clear its cache memory. Though we cannot clear all cache of the client browser it is still possible to load the webpage without caching by using meta tags in the HTML code.
The only way to do this is by making few changes in the code which says the... | [
{
"code": null,
"e": 24460,
"s": 24432,
"text": "\n27 Mar, 2020"
},
{
"code": null,
"e": 24692,
"s": 24460,
"text": "Unlike mobile applications, a web browser doesn’t allow to clear its cache memory. Though we cannot clear all cache of the client browser it is still possible to l... |
SELECT Statement and its Clauses in DBMS | The select statement is used to get the required data from the database according to the conditions, if any. This data is returned in the form of a table.
The basic syntax of the select statement is −
Select column 1, column 2 ... column N
From table_name
An example of the select statement is −
<Student>
Query −
Select... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "The select statement is used to get the required data from the database according to the conditions, if any. This data is returned in the form of a table."
},
{
"code": null,
"e": 1263,
"s": 1217,
"text": "The basic syntax of the sel... |
Remove three consecutive duplicates from string - GeeksforGeeks | 06 Jul, 2021
Given a string, you have to remove the three consecutive duplicates from the string. If no three are consecutive then output the string as it is.Examples:
Input : aabbbaccddddc
Output :ccdc
Input :aabbaccddc
Output :aabbaccddc
Explanation : We insert the characters of string one by one to vector and k... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 26364,
"s": 26207,
"text": "Given a string, you have to remove the three consecutive duplicates from the string. If no three are consecutive then output the string as it is.Examples: "
},
... |
C++ STL | Set 1 (vector) | Practice | GeeksforGeeks | Implement different operations on a vector A .
Input:
The first line of input contains an integer T denoting the no of test cases . Then T test cases follow. The first line of input contains an integer Q denoting the no of queries . Then in the next line are Q space separated queries .
A query can be of five types
1... | [
{
"code": null,
"e": 287,
"s": 238,
"text": "Implement different operations on a vector A .\n "
},
{
"code": null,
"e": 978,
"s": 287,
"text": "Input:\nThe first line of input contains an integer T denoting the no of test cases . Then T test cases follow. The first line of input ... |
wxPython - SetFont() function in wx.MenuItem - GeeksforGeeks | 09 Jun, 2020
In this article we are going to learn about SetFont() function associated with wx.MenuItem class of wxPython. SetFont() function is used to set the font associated with the menu item.It takes font as parameter which is wx.Font object.
Syntax:
wx.MenuItem.SetFont(self, font)
Parameters:
Code Example:
impor... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n09 Jun, 2020"
},
{
"code": null,
"e": 25900,
"s": 25665,
"text": "In this article we are going to learn about SetFont() function associated with wx.MenuItem class of wxPython. SetFont() function is used to set the font associated... |
Python heapq to find K'th smallest element in a 2D array - GeeksforGeeks | 26 Dec, 2017
Given an n x n matrix and integer k. Find the k’th smallest element in the given 2D array.
Examples:
Input : mat = [[10, 25, 20, 40],
[15, 45, 35, 30],
[24, 29, 37, 48],
[32, 33, 39, 50]]
k = 7
Output : 7th smallest element is 30
We will use similar a... | [
{
"code": null,
"e": 24561,
"s": 24533,
"text": "\n26 Dec, 2017"
},
{
"code": null,
"e": 24652,
"s": 24561,
"text": "Given an n x n matrix and integer k. Find the k’th smallest element in the given 2D array."
},
{
"code": null,
"e": 24662,
"s": 24652,
"text": ... |
Java Program to create a HashMap and add key-value pairs | To create a HashMap, use the HashMap class −
HashMap hm = new HashMap();
Add elements to the HashMap in the form of key-value pair −
hm.put("Bag", new Integer(1100));
hm.put("Wallet", new Integer(700));
hm.put("Belt", new Integer(600));
The following is an example to create HashMap and add key-value pair −
Live Demo
i... | [
{
"code": null,
"e": 1107,
"s": 1062,
"text": "To create a HashMap, use the HashMap class −"
},
{
"code": null,
"e": 1135,
"s": 1107,
"text": "HashMap hm = new HashMap();"
},
{
"code": null,
"e": 1195,
"s": 1135,
"text": "Add elements to the HashMap in the for... |
jQuery - Multiple Elements Selector | This Multiple Elements selector selects the combined results of all the specified selectors E, F or G.
You can specify any number of selectors to combine into a single result. Here order of the DOM elements in the jQuery object aren't necessarily identical.
Here is the simple syntax to use this selector −
$('E, F, G,..... | [
{
"code": null,
"e": 2425,
"s": 2322,
"text": "This Multiple Elements selector selects the combined results of all the specified selectors E, F or G."
},
{
"code": null,
"e": 2580,
"s": 2425,
"text": "You can specify any number of selectors to combine into a single result. Here o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.