title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Build a user-based collaborative filtering recommendation engine for Anime | by GreekDataGuy | Towards Data Science | Today we’ll build a recommendation engine for anime, powered by user-based collaborative filtering. This is only one of several different approaches to recommender systems
In user-based collaborative filtering:- users are deemed similar if they like similar items- we first discover which users are similar- then recomme... | [
{
"code": null,
"e": 344,
"s": 172,
"text": "Today we’ll build a recommendation engine for anime, powered by user-based collaborative filtering. This is only one of several different approaches to recommender systems"
},
{
"code": null,
"e": 531,
"s": 344,
"text": "In user-based ... |
How to export millions of records from Mysql to AWS S3? | by Harshit Rastogi | Towards Data Science | At Twilio, we handle millions of calls happening across the world daily. Once the call is over it is logged into a MySQL DB. The customer has the ability to query the details of the Calls via an API. (Yes Twilio is API driven company)
One of the tasks I recently worked on is to build a system allowing the customers to ... | [
{
"code": null,
"e": 407,
"s": 172,
"text": "At Twilio, we handle millions of calls happening across the world daily. Once the call is over it is logged into a MySQL DB. The customer has the ability to query the details of the Calls via an API. (Yes Twilio is API driven company)"
},
{
"code"... |
Java Examples - Downloading a Webpage | How to read and download a webpage?
Following example shows how to read and download a webpage URL() constructer of net.URL class.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.net.URL;
public class Main {
public static void ma... | [
{
"code": null,
"e": 2104,
"s": 2068,
"text": "How to read and download a webpage?"
},
{
"code": null,
"e": 2199,
"s": 2104,
"text": "Following example shows how to read and download a webpage URL() constructer of net.URL class."
},
{
"code": null,
"e": 2872,
"s":... |
What is the difference between an int and a long in C++? | The datatype int is used to store the integer values. It could be signed or unsigned. The datatype int is of 32-bit or 4 bytes. It requires less memory area than long to store a value. The keyword “int” is used to declare an integer variable.
The following is the syntax of int datatype.
int variable_name;
Here,
variabl... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "The datatype int is used to store the integer values. It could be signed or unsigned. The datatype int is of 32-bit or 4 bytes. It requires less memory area than long to store a value. The keyword “int” is used to declare an integer variable."
},
{
... |
Deep Clustering for Sparse Data. A rather “shallow” and simple approach... | by Alon Agmon | Towards Data Science | We usually cluster data in order to find or learn about relationships and structures that exist within it, especially where our data is too complex or too dimensional for simple descriptive statistics. When it comes to highly dimensional data, it is sometimes striking how informative and useful can be a simple clusteri... | [
{
"code": null,
"e": 924,
"s": 172,
"text": "We usually cluster data in order to find or learn about relationships and structures that exist within it, especially where our data is too complex or too dimensional for simple descriptive statistics. When it comes to highly dimensional data, it is somet... |
Event Handling in Spring | You have seen in all the chapters that the core of Spring is the ApplicationContext, which manages the complete life cycle of the beans. The ApplicationContext publishes certain types of events when loading the beans. For example, a ContextStartedEvent is published when the context is started and ContextStoppedEvent is... | [
{
"code": null,
"e": 2652,
"s": 2292,
"text": "You have seen in all the chapters that the core of Spring is the ApplicationContext, which manages the complete life cycle of the beans. The ApplicationContext publishes certain types of events when loading the beans. For example, a ContextStartedEvent ... |
JavaScript | Function binding | 04 Jan, 2022
In JavaScript function binding happens using Bind() method. With this method, we can bind an object to a common function, so that the function gives different result when needed. otherwise it gives the same result or gives an error while the code is executing.We use the Bind() method to call a function wit... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 824,
"s": 52,
"text": "In JavaScript function binding happens using Bind() method. With this method, we can bind an object to a common function, so that the function gives different result when nee... |
Program for conversion of 32 Bits Single Precision IEEE 754 Floating Point Representation | 04 Aug, 2021
Pre-Requisite: IEEE Standard 754 Floating Point NumbersWrite a program to find out the 32 Bits Single Precision IEEE 754 Floating-Point representation of a given real value and vice versa.
Examples:
Input: real number = 16.75
Output: 0 | 10000011 | 00001100000000000000000
Input: floating point number ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 245,
"s": 54,
"text": "Pre-Requisite: IEEE Standard 754 Floating Point NumbersWrite a program to find out the 32 Bits Single Precision IEEE 754 Floating-Point representation of a given real value a... |
Find Maximum number possible by doing at-most K swaps | 10 Jun, 2022
Given a positive integer, find the maximum integer possible by doing at-most K swap operations on its digits.Examples:
Input: M = 254, K = 1
Output: 524
Swap 5 with 2 so number becomes 524
Input: M = 254, K = 2
Output: 542
Swap 5 with 2 so number becomes 524
Swap 4 with 2 so number becomes 542
Input: M ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 172,
"s": 52,
"text": "Given a positive integer, find the maximum integer possible by doing at-most K swap operations on its digits.Examples: "
},
{
"code": null,
"e": 827,
"s": 172... |
HTML | <input> multiple Attribute | 28 May, 2019
The HTML <input> multiple Attribute is a Boolean Attribute. It specifies that the user is allowed to select more than one value that presents in an element. The multiple attributes work with many input fields such as email, file, etc.
Syntax:
<input multiple>
Example:
<!DOCTYPE html><html> <body> <cen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2019"
},
{
"code": null,
"e": 263,
"s": 28,
"text": "The HTML <input> multiple Attribute is a Boolean Attribute. It specifies that the user is allowed to select more than one value that presents in an element. The multiple attri... |
PHP file_get_contents() Function | 30 Nov, 2021
In this article, we will see how to read the entire file into a string using the file_get_contents() function, along with understanding their implementation through the example.
The file_get_contents() function in PHP is an inbuilt function that is used to read a file into a string. The function uses memor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "In this article, we will see how to read the entire file into a string using the file_get_contents() function, along with understanding their implementation through the exampl... |
Sum of shortest distance on source to destination and back having at least a common vertex | 28 Jun, 2022
Given a directed weighted graph and the source and destination vertex. The task is to find the sum of shortest distance on the path going from source to destination and then from destination to source such that both the paths have at least a common vertex other than the source and the destination. Note: On... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 451,
"s": 52,
"text": "Given a directed weighted graph and the source and destination vertex. The task is to find the sum of shortest distance on the path going from source to destination and then ... |
Support Vector Machine Algorithm | 22 Jan, 2021
Support Vector Machine(SVM) is a supervised machine learning algorithm used for both classification and regression. Though we say regression problems as well its best suited for classification. The objective of SVM algorithm is to find a hyperplane in an N-dimensional space that distinctly classifies the d... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 677,
"s": 54,
"text": "Support Vector Machine(SVM) is a supervised machine learning algorithm used for both classification and regression. Though we say regression problems as well its best suited ... |
Delete Google Browser History using Python - GeeksforGeeks | 16 Jul, 2020
In this article, you will learn to write a Python program which will take input from the user as a keyword like Facebook, amazon, geeksforgeeks, Flipkart, youtube, etc. and then search your google chrome browser history for that keyword and if the keyword is found in any of the URL then it will delete it. ... | [
{
"code": null,
"e": 24980,
"s": 24952,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 25798,
"s": 24980,
"text": "In this article, you will learn to write a Python program which will take input from the user as a keyword like Facebook, amazon, geeksforgeeks, Flipkart, youtube,... |
How to save a Python Dictionary to CSV file? | CSV (Comma Separated Values) is a most common file format that is widely supported by many platforms and applications.
Use csv module from Python's standard library. Easiest way is to open a csv file in 'w' mode with the help of open() function and write key value pair in comma separated form.
import csv
my_dict = {'1... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "CSV (Comma Separated Values) is a most common file format that is widely supported by many platforms and applications."
},
{
"code": null,
"e": 1358,
"s": 1181,
"text": "Use csv module from Python's standard library. Easiest way is t... |
CSS | scaleX() Function - GeeksforGeeks | 20 Aug, 2019
The scaleX() function is an inbuilt function which is used to resize an element along the x-axis in a 2D plane. It scales the elements in a horizontal direction.
Syntax:
scaleX() = scaleX( number )
Parameters: This function accepts single parameter number which holds the scaling factor along x-axis.
Below ... | [
{
"code": null,
"e": 24846,
"s": 24818,
"text": "\n20 Aug, 2019"
},
{
"code": null,
"e": 25008,
"s": 24846,
"text": "The scaleX() function is an inbuilt function which is used to resize an element along the x-axis in a 2D plane. It scales the elements in a horizontal direction."
... |
The new kid on the statistics-in-Python block: pingouin | by Eryk Lewinson | Towards Data Science | Python has a few very well developed and mature libraries used for statistical analysis, with the biggest two being statsmodels and scipy. These two contain a lot (and I mean a LOT) of statistical functions and classes that will in 99% of the times cover all your use-cases. So why are there still any new libraries bein... | [
{
"code": null,
"e": 503,
"s": 171,
"text": "Python has a few very well developed and mature libraries used for statistical analysis, with the biggest two being statsmodels and scipy. These two contain a lot (and I mean a LOT) of statistical functions and classes that will in 99% of the times cover ... |
How to Combine Data in Pandas — 5 Functions You Should Know | by Yong Cui | Towards Data Science | When we use Pandas to process data, one common task is to combine data from different sources. In this article, I’ll review 5 Pandas functions that you can use for data merging, as listed below. Each of these functions has its link to the official documentation if you want to take a look.
* concat* join* merge* combine... | [
{
"code": null,
"e": 337,
"s": 47,
"text": "When we use Pandas to process data, one common task is to combine data from different sources. In this article, I’ll review 5 Pandas functions that you can use for data merging, as listed below. Each of these functions has its link to the official document... |
SAP HANA Admin - Table Replication | In SAP HANA system, it is also possible to replicate tables on multiple hosts. When you need to join the tables or partition tables on multiple hosts, table replication is useful to improve the performance, to reduce the load on the network in a distributed environment.
SAP HANA table replication has certain limitation... | [
{
"code": null,
"e": 2595,
"s": 2324,
"text": "In SAP HANA system, it is also possible to replicate tables on multiple hosts. When you need to join the tables or partition tables on multiple hosts, table replication is useful to improve the performance, to reduce the load on the network in a distrib... |
Extracting Data for Machine Learning | by Rebecca Vickery | Towards Data Science | The most important first step in any machine learning project is to obtain good quality data. As a data scientist, you will often have to use a variety of different methods to extract data sets. You might be using publically available data, data available via an API, data found in a database or in many cases a combinat... | [
{
"code": null,
"e": 514,
"s": 172,
"text": "The most important first step in any machine learning project is to obtain good quality data. As a data scientist, you will often have to use a variety of different methods to extract data sets. You might be using publically available data, data available... |
How to build a Recommendation Engine quick and simple | by Jan Teichmann | Towards Data Science | This article is meant to be a light introduction to the topic and provide the first steps to get you into production with a recommendation engine in a week. I will also tell you what the steps are to go from basics to fairly advanced.
We won’t tab into the cutting edge yet but we won’t be far off either.
Read part 2 fo... | [
{
"code": null,
"e": 406,
"s": 171,
"text": "This article is meant to be a light introduction to the topic and provide the first steps to get you into production with a recommendation engine in a week. I will also tell you what the steps are to go from basics to fairly advanced."
},
{
"code"... |
How to Customize Bash Colors and Content in Linux Terminal Prompt - GeeksforGeeks | 14 Apr, 2022
If you are using the Linux operating system, that means you use the CLI most of the time. And do more work on the terminal. By default, most Linux Operating systems provide you the bash shell. Shell provides the interface between the user and kernel and executes commands. In this article, we are going to s... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n14 Apr, 2022"
},
{
"code": null,
"e": 26546,
"s": 26197,
"text": "If you are using the Linux operating system, that means you use the CLI most of the time. And do more work on the terminal. By default, most Linux Operating system... |
How to create a Disabled Option Select using jQuery Mobile ? - GeeksforGeeks | 20 Dec, 2020
jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be creating a Disabled Option Select using jQuery Mobile.
Approach: First, add jQuery Mobile scripts needed for your project.
<link rel=”styleshee... | [
{
"code": null,
"e": 26202,
"s": 26174,
"text": "\n20 Dec, 2020"
},
{
"code": null,
"e": 26421,
"s": 26202,
"text": "jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be... |
Node.js process.mainModule Property - GeeksforGeeks | 12 Oct, 2021
The process.mainModule property is an inbuilt application programming interface of the process module which is used to get the main module. This is an alternative way to get require.main but unlike require.main, process.mainModule dynamically changes in runtime. Gennerally we can assume those two modules a... | [
{
"code": null,
"e": 26375,
"s": 26347,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 26695,
"s": 26375,
"text": "The process.mainModule property is an inbuilt application programming interface of the process module which is used to get the main module. This is an alternative ... |
jQuery | param() Method - GeeksforGeeks | 21 Feb, 2019
The param() Method in jQuery is used to create a serialized representation of an object.
Syntax:
$.param( object, trad )
Parameters: This method accepts two parameters as mentioned above and described below:
object: It is a mandatory parameter which is used to specify an array or object to serialize.
trad:... | [
{
"code": null,
"e": 41968,
"s": 41940,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 42057,
"s": 41968,
"text": "The param() Method in jQuery is used to create a serialized representation of an object."
},
{
"code": null,
"e": 42065,
"s": 42057,
"text": "S... |
Flat Panel Display - GeeksforGeeks | 22 Jul, 2019
Flat-Panel Devices are the devices that have less volume, weight, and power consumption compared to Cathode Ray Tube (CRT). Due to the advantages of the Flat-Panel Display, use of CRT decreased. As Flat Panel Devices are light in weights that’s why they can be hang on walls and wear them on our wrist as a ... | [
{
"code": null,
"e": 25789,
"s": 25761,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 26181,
"s": 25789,
"text": "Flat-Panel Devices are the devices that have less volume, weight, and power consumption compared to Cathode Ray Tube (CRT). Due to the advantages of the Flat-Panel... |
Print all valid words that are possible using Characters of Array - GeeksforGeeks | 17 Jan, 2022
Given a dictionary and a character array, print all valid words that are possible using characters from the array. Examples:
Input : Dict - {"go","bat","me","eat","goal",
"boy", "run"}
arr[] = {'e','o','b', 'a','m','g', 'l'}
Output : go, me, goal.
Asked In : Mi... | [
{
"code": null,
"e": 26115,
"s": 26087,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 26242,
"s": 26115,
"text": "Given a dictionary and a character array, print all valid words that are possible using characters from the array. Examples: "
},
{
"code": null,
"e":... |
Digit Separator in C++14 - GeeksforGeeks | 21 Jan, 2021
In this article, we will discuss the use of a digit separator in C++. Sometimes, it becomes difficult to read numbers that contain many digits. For example, 1000 is readable but what if more zeros are added to it, let’s say 1000000, now it becomes a little difficult to read, and what will happen if more ze... | [
{
"code": null,
"e": 25369,
"s": 25341,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 25818,
"s": 25369,
"text": "In this article, we will discuss the use of a digit separator in C++. Sometimes, it becomes difficult to read numbers that contain many digits. For example, 1000 i... |
React-Bootstrap Nav Component - GeeksforGeeks | 18 May, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. Nav Component is a component that is used by all Navigation bits in Bootstrap. It is useful for navigation purposes in applications. We can use the following approach in ReactJS to use the react-bootstrap Nav Component.
Nav P... | [
{
"code": null,
"e": 26557,
"s": 26529,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 26859,
"s": 26557,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Nav Component is a component that is used by all Navigation bits in Bootstrap. It... |
Python | Check if two lists have any element in common - GeeksforGeeks | 18 Feb, 2019
Sometimes we encounter the problem of checking if one list contains any element of another list. This kind of problems is quite popular in competitive programming. Let’s discuss various ways to achieve this particular task.
Method #1: Using any()
# Python code to check if two lists# have any element in com... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n18 Feb, 2019"
},
{
"code": null,
"e": 25761,
"s": 25537,
"text": "Sometimes we encounter the problem of checking if one list contains any element of another list. This kind of problems is quite popular in competitive programming.... |
Reverse tree path - GeeksforGeeks | 02 May, 2022
Given a tree and node data, the task to reverse the path to that particular Node.
Examples:
Input:
7
/ \
6 5
/ \ / \
4 3 2 1
Data = 4
Output: Inorder of tree
7 6 3 4 2 5 1
Input:
7
/ \
6 5
/ \... | [
{
"code": null,
"e": 26265,
"s": 26237,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 26347,
"s": 26265,
"text": "Given a tree and node data, the task to reverse the path to that particular Node."
},
{
"code": null,
"e": 26358,
"s": 26347,
"text": "Examples... |
Random nextLong() method in Java with Examples - GeeksforGeeks | 07 Jan, 2019
The nextGaussian() method of Random class returns the next pseudorandom, uniformly distributed long value from this random number generator’s sequence.
Syntax:
public long nextLong()
Parameters: The function does not accepts any parameter.
Return Value: This method returns the next pseudorandom, uniformly... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n07 Jan, 2019"
},
{
"code": null,
"e": 25377,
"s": 25225,
"text": "The nextGaussian() method of Random class returns the next pseudorandom, uniformly distributed long value from this random number generator’s sequence."
},
{
... |
Python MySQL - LIKE() operator - GeeksforGeeks | 28 Apr, 2021
In this article, we will discuss the use of LIKE operator in MySQL using Python language.
Sometimes we may require tuples from the database which match certain patterns. For example, we may wish to retrieve all columns where the tuples start with the letter ‘y’, or start with ‘b’ and end with ‘l’, or even ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25627,
"s": 25537,
"text": "In this article, we will discuss the use of LIKE operator in MySQL using Python language."
},
{
"code": null,
"e": 25989,
"s": 25627,
"text": "... |
std::less in C++ with Examples - GeeksforGeeks | 01 May, 2020
The std::less is a is a member of the functional class (<functional.h>) used for performing comparisons. It is defined as a function object class for less than inequality comparison which returns a boolean value depending upon the condition. This can be used to change the functionality of the given functio... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n01 May, 2020"
},
{
"code": null,
"e": 25753,
"s": 25367,
"text": "The std::less is a is a member of the functional class (<functional.h>) used for performing comparisons. It is defined as a function object class for less than ine... |
JavaFX | ToggleButton Class - GeeksforGeeks | 30 Aug, 2018
A ToggleButton is a special control having the ability to be selected. Basically, ToggleButton is rendered similarly to a Button but these two are the different types of Controls. A Button is a “command” button that invokes a function when clicked. But a ToggleButton is a control with a Boolean indicating ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n30 Aug, 2018"
},
{
"code": null,
"e": 25590,
"s": 25225,
"text": "A ToggleButton is a special control having the ability to be selected. Basically, ToggleButton is rendered similarly to a Button but these two are the different ty... |
Gradient Descent Training With Logistic Regression | by Rina Buoy | Towards Data Science | Gradient descent algorithm and its variants ( Adam, SGD etc. ) have become very popular training (optimisation) algorithm in many machine learning applications. Optimisation algorithms can be informally grouped into two categories — gradient-based and gradient-free(ex. particle swarm, genetic algorithm etc.). As you ca... | [
{
"code": null,
"e": 604,
"s": 171,
"text": "Gradient descent algorithm and its variants ( Adam, SGD etc. ) have become very popular training (optimisation) algorithm in many machine learning applications. Optimisation algorithms can be informally grouped into two categories — gradient-based and gra... |
CSS3 - Animation | Animation is process of making shape changes and creating motions with elements.
Keyframes will control the intermediate animation steps in CSS3.
@keyframes animation {
from {background-color: pink;}
to {background-color: green;}
}
div {
width: 100px;
height: 100px;
background-color: red;
animation-na... | [
{
"code": null,
"e": 2707,
"s": 2626,
"text": "Animation is process of making shape changes and creating motions with elements."
},
{
"code": null,
"e": 2772,
"s": 2707,
"text": "Keyframes will control the intermediate animation steps in CSS3."
},
{
"code": null,
"e":... |
Annotations in Java - GeeksforGeeks | 23 Feb, 2022
Annotations are used to provide supplemental information about a program.
Annotations start with ‘@’.
Annotations do not change the action of a compiled program.
Annotations help to associate metadata (information) to the program elements i.e. instance variables, constructors, methods, classes, etc.
Annot... | [
{
"code": null,
"e": 25487,
"s": 25459,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 25562,
"s": 25487,
"text": "Annotations are used to provide supplemental information about a program. "
},
{
"code": null,
"e": 25590,
"s": 25562,
"text": "Annotations sta... |
C++ List Library - sort() Function | The C++ function std::list::sort() sorts the elements of the list. The order of equal elements is preserved. It uses comparison function to compare values.
Following is the declaration for std::list::sort() function form std::list header.
template <class Compare>
void sort (Compare comp);
comp − comparison function ob... | [
{
"code": null,
"e": 2759,
"s": 2603,
"text": "The C++ function std::list::sort() sorts the elements of the list. The order of equal elements is preserved. It uses comparison function to compare values."
},
{
"code": null,
"e": 2842,
"s": 2759,
"text": "Following is the declarati... |
How To Train Your Neural Network: The Hidden Code | by Murto Hilali | Towards Data Science | On the flip side, you’re far more likely to have encountered some form of artificial intelligence in your life than you have a dragon — or maybe you have, who knows? I don’t know your life.
Needless to say, AI has become an integral part of our lives, from the Netflix algorithm magically making your weekend disappear t... | [
{
"code": null,
"e": 362,
"s": 172,
"text": "On the flip side, you’re far more likely to have encountered some form of artificial intelligence in your life than you have a dragon — or maybe you have, who knows? I don’t know your life."
},
{
"code": null,
"e": 659,
"s": 362,
"text... |
How to sort array of strings by their lengths following shortest to longest pattern in Java | At first, let us create and array of strings:
String[] strArr = { "ABCD", "AB", "ABCDEFG", "ABC", "A", "ABCDE", "ABCDEF", "ABCDEFGHIJ" };
Now, for shortest to longest pattern, for example A, AB, ABC, ABCD, etc.; get the length of both the string arrays and work them like this:
Arrays.sort(strArr, (str1, str2) -> str1.l... | [
{
"code": null,
"e": 1108,
"s": 1062,
"text": "At first, let us create and array of strings:"
},
{
"code": null,
"e": 1200,
"s": 1108,
"text": "String[] strArr = { \"ABCD\", \"AB\", \"ABCDEFG\", \"ABC\", \"A\", \"ABCDE\", \"ABCDEF\", \"ABCDEFGHIJ\" };"
},
{
"code": null,
... |
Sorting an array objects by property having null value in JavaScript | We are required to write a JavaScript function that takes in an array of objects. The objects may have some of their keys that are mapped to null.
Our function should sort the array such that all the objects having keys mapped to null are pushed to the end of the array.
The code for this will be −
const arr = [
{key... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in an array of objects. The objects may have some of their keys that are mapped to null."
},
{
"code": null,
"e": 1333,
"s": 1209,
"text": "Our function should sort the array ... |
Create a Bordered Button Group with CSS | You can try to run the following code to create a bordered button group with border property
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.btn {
color: black;
background-color: yellow;
width: 120px;
text-align: center;
font-size: 15px;
... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "You can try to run the following code to create a bordered button group with border property"
},
{
"code": null,
"e": 1165,
"s": 1155,
"text": "Live Demo"
},
{
"code": null,
"e": 1935,
"s": 1165,
"text": "<!DOCTYP... |
How to display multiple notifications in android? | This example demonstrate about How to display multiple notifications 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-8" ?>
<a... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrate about How to display multiple notifications in android"
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detail... |
How to save database in local storage of android webview? | This example demonstrate about How to save database in local storage of android webview.
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": 1151,
"s": 1062,
"text": "This example demonstrate about How to save database in local storage of android webview."
},
{
"code": null,
"e": 1280,
"s": 1151,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requir... |
Gensim - Quick Guide | This chapter will help you understand history and features of Gensim along with its uses and advantages.
Gensim = “Generate Similar” is a popular open source natural language processing (NLP) library used for unsupervised topic modeling. It uses top academic models and modern statistical machine learning to perform var... | [
{
"code": null,
"e": 2157,
"s": 2052,
"text": "This chapter will help you understand history and features of Gensim along with its uses and advantages."
},
{
"code": null,
"e": 2401,
"s": 2157,
"text": "Gensim = “Generate Similar” is a popular open source natural language process... |
Creating a Distributed Computer Cluster with Python and Dask | by Matthew Grint | Towards Data Science | Calculating a correlation matrix can very quickly consume a vast amount of computational resources. Fortunately, correlation (and covariance) calculations can be intelligently split into multiple processes and distributed across a number of computers.
In this article, we will use Dask for Python to manage the parallel ... | [
{
"code": null,
"e": 424,
"s": 172,
"text": "Calculating a correlation matrix can very quickly consume a vast amount of computational resources. Fortunately, correlation (and covariance) calculations can be intelligently split into multiple processes and distributed across a number of computers."
... |
Compound assignment operators in Java
| The Assignment Operators
Following are the assignment operators supported by Java language −
Live Demo
public class Test {
public static void main(String args[]) {
int a = 10;
int b = 20;
int c = 0;
c = a + b;
System.out.println("c = a + b = " + c );
c += a ;
System.out.p... | [
{
"code": null,
"e": 1087,
"s": 1062,
"text": "The Assignment Operators"
},
{
"code": null,
"e": 1155,
"s": 1087,
"text": "Following are the assignment operators supported by Java language −"
},
{
"code": null,
"e": 1165,
"s": 1155,
"text": "Live Demo"
},
... |
Python program to left rotate the elements of an array | When it is required to left rotate the elements of an array, the array can be iterated over, and depending on the number of left rotations, the index can be incremented that many times.
Below is a demonstration of the same −
Live Demo
my_list = [11, 12, 23, 34, 65]
n = 3
print("The list is : ")
for i in range(0, len(... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "When it is required to left rotate the elements of an array, the array can be iterated over, and depending on the number of left rotations, the index can be incremented that many times."
},
{
"code": null,
"e": 1287,
"s": 1248,
"text... |
C++ Program to Multiply two Matrices by Passing Matrix to Function | A matrix is a rectangular array of numbers that is arranged in the form of rows and columns.
An example of a matrix is as follows.
A 3*4 matrix has 3 rows and 4 columns as shown below.
8 6 3 5
7 1 9 2
5 1 9 8
A program that multiplies two matrices by passing the matrices to functions is as follows.
Live Demo
#include<... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "A matrix is a rectangular array of numbers that is arranged in the form of rows and columns."
},
{
"code": null,
"e": 1193,
"s": 1155,
"text": "An example of a matrix is as follows."
},
{
"code": null,
"e": 1247,
"s":... |
Virtual Destructor in C++ | Deleting a derived class object using a pointer to a base class, the base class should be defined with a virtual destructor.
#include<iostream>
using namespace std;
class b {
public:
b() {
cout<<"Constructing base \n";
}
virtual ~b() {
cout<<"Destructing base \n";
}
};
class... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "Deleting a derived class object using a pointer to a base class, the base class should be defined with a virtual destructor."
},
{
"code": null,
"e": 1630,
"s": 1187,
"text": "#include<iostream>\nusing namespace std;\nclass b {\n p... |
Building Apps with Apache Cordova - GeeksforGeeks | 30 Jun, 2020
Apache Cordova is hybrid mobile development framework used to create mobile apps out of progressive web applications. However, Apache Cordova is used to make mobile apps using web view and it cannot be used for native android app development. The downside to web view applications is that it is slower in pe... | [
{
"code": null,
"e": 24870,
"s": 24842,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 25314,
"s": 24870,
"text": "Apache Cordova is hybrid mobile development framework used to create mobile apps out of progressive web applications. However, Apache Cordova is used to make mobil... |
How to use selenium to check if element contains specific class attribute? | We can check if an element contains a specific class attribute value. The getAttribute() method is used to get the value of the class attribute. We need to pass class as a parameter to the getAttribute() method.
First of all we need to identify the element with help of any of the locators like id, class, name, xpath or... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "We can check if an element contains a specific class attribute value. The getAttribute() method is used to get the value of the class attribute. We need to pass class as a parameter to the getAttribute() method."
},
{
"code": null,
"e": 1510... |
Lint and its Usage in Android Studio - GeeksforGeeks | 08 Sep, 2021
As Android Developers, we all utilize Android Studio to create our apps. There are numerous alternative editors that can be used for Android app development, but what draws us to Android Studio is the assistance that it offers to Android developers. The assistance may take the shape of auto-suggestions or ... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25256,
"s": 24725,
"text": "As Android Developers, we all utilize Android Studio to create our apps. There are numerous alternative editors that can be used for Android app development, but w... |
Node.js __filename object - GeeksforGeeks | 06 Apr, 2021
The __filename in the Node.js returns the filename of the code which is executed. It gives the absolute path of the code file. The following approach covers how to implement __filename in the NodeJS project.
Syntax:
console.log(__filename)
Prerequisites:
Basic knowledge of Node.js
Node.js installed (versio... | [
{
"code": null,
"e": 24842,
"s": 24814,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 25050,
"s": 24842,
"text": "The __filename in the Node.js returns the filename of the code which is executed. It gives the absolute path of the code file. The following approach covers how to... |
Create a CICD Pipeline with GitHub Actions | Machine Learning Pipeline | Build CICD Pipeline | Towards Data Science | What if I told you “You can automate the process of building, testing, delivering, or deploying your Machine Learning models into production”?
The world’s most popular hosted repository service, GitHub is providing an integrated way to design and develop our workflows by automating the tasks through GitHub Actions. Wit... | [
{
"code": null,
"e": 315,
"s": 172,
"text": "What if I told you “You can automate the process of building, testing, delivering, or deploying your Machine Learning models into production”?"
},
{
"code": null,
"e": 688,
"s": 315,
"text": "The world’s most popular hosted repository ... |
Apache Flume - Environment | We already discussed the architecture of Flume in the previous chapter. In this chapter, let us see how to download and setup Apache Flume.
Before proceeding further, you need to have a Java environment in your system. So first of all, make sure you have Java installed in your system. For some examples in this tutorial... | [
{
"code": null,
"e": 1997,
"s": 1857,
"text": "We already discussed the architecture of Flume in the previous chapter. In this chapter, let us see how to download and setup Apache Flume."
},
{
"code": null,
"e": 2402,
"s": 1997,
"text": "Before proceeding further, you need to hav... |
Addition and Concatenation Using + Operator in Java - GeeksforGeeks | 07 Dec, 2021
Till now in Java, we were playing with the integral part where we witnessed that the + operator behaves the same way as it was supposed to because the decimal system was getting added up deep down at binary level and the resultant binary number is thrown up at console in the generic decimal system. But gee... | [
{
"code": null,
"e": 25905,
"s": 25877,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 26289,
"s": 25905,
"text": "Till now in Java, we were playing with the integral part where we witnessed that the + operator behaves the same way as it was supposed to because the decimal syst... |
How to convert a string in an R data frame to NA? | We often see mistakes in data collection processes and these mistakes might lead to incorrect results of the research. When the data is collected with mistakes, it makes the job of analyst difficult. One of the situations, that shows the data has mistakes is getting strings in place of numerical values. Therefore, we n... | [
{
"code": null,
"e": 1473,
"s": 1062,
"text": "We often see mistakes in data collection processes and these mistakes might lead to incorrect results of the research. When the data is collected with mistakes, it makes the job of analyst difficult. One of the situations, that shows the data has mistak... |
Merge two binary Max heaps | Practice | GeeksforGeeks | Given two binary max heaps as arrays, merge the given heaps to form a new max heap.
Example 1:
Input :
n = 4 m = 3
a[] = {10, 5, 6, 2},
b[] = {12, 7, 9}
Output :
{12, 10, 9, 2, 5, 7, 6}
Explanation :
Your Task:
You don't need to read input or print anything. Your task is to complete the function mergeHe... | [
{
"code": null,
"e": 322,
"s": 238,
"text": "Given two binary max heaps as arrays, merge the given heaps to form a new max heap."
},
{
"code": null,
"e": 335,
"s": 324,
"text": "Example 1:"
},
{
"code": null,
"e": 448,
"s": 335,
"text": "Input : \nn = 4 m = 3... |
Amazon Web Services - DynamoDB | Amazon DynamoDB is a fully managed NoSQL database service that allows to create database tables that can store and retrieve any amount of data. It automatically manages the data traffic of tables over multiple servers and maintains performance. It also relieves the customers from the burden of operating and scaling a d... | [
{
"code": null,
"e": 2760,
"s": 2291,
"text": "Amazon DynamoDB is a fully managed NoSQL database service that allows to create database tables that can store and retrieve any amount of data. It automatically manages the data traffic of tables over multiple servers and maintains performance. It also ... |
C# - Array Class | The Array class is the base class for all the arrays in C#. It is defined in the System namespace. The Array class provides various properties and methods to work with arrays.
The following table describes some of the most commonly used properties of the Array class −
IsFixedSize
Gets a value indicating whether the Arr... | [
{
"code": null,
"e": 2446,
"s": 2270,
"text": "The Array class is the base class for all the arrays in C#. It is defined in the System namespace. The Array class provides various properties and methods to work with arrays."
},
{
"code": null,
"e": 2539,
"s": 2446,
"text": "The fo... |
What are the differences between a pointer variable and a reference variable in C++? | When a variable is declared as a reference, it becomes an alternative name for an existing variable.
Type &newname = existing name;
Type &pointer;
pointer = variable name;
Pointers are used to store the address of a variable.
Type *pointer;
Type *pointer;
pointer = variable name;
The main differences between reference... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "When a variable is declared as a reference, it becomes an alternative name for an existing variable."
},
{
"code": null,
"e": 1194,
"s": 1163,
"text": "Type &newname = existing name;"
},
{
"code": null,
"e": 1234,
"s"... |
Program to find minimum number of busses are required to pass through all stops in Python | Suppose we have a list of numbers called nums and that is showing the bus stops on a line where nums[i] shows the time a bus must arrive at station i. Now that buses can only move forward, we have to find the minimum number of buses that are needed to pass through all the stops.
So, if the input is like nums = [1, 2, 7... | [
{
"code": null,
"e": 1342,
"s": 1062,
"text": "Suppose we have a list of numbers called nums and that is showing the bus stops on a line where nums[i] shows the time a bus must arrive at station i. Now that buses can only move forward, we have to find the minimum number of buses that are needed to p... |
Printing Triangle Pattern in Java - GeeksforGeeks | 17 Aug, 2018
Given a number N, the task is to print the following pattern:-
Examples:
Input : 10
Output :
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *
* * * * * * * * * *
Input :5
Output :
... | [
{
"code": null,
"e": 24702,
"s": 24674,
"text": "\n17 Aug, 2018"
},
{
"code": null,
"e": 24765,
"s": 24702,
"text": "Given a number N, the task is to print the following pattern:-"
},
{
"code": null,
"e": 24775,
"s": 24765,
"text": "Examples:"
},
{
"co... |
Java Program to convert int array to IntStream | To convert int array to IntStream, let us first create an int array:
int[] arr = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
Now, create IntStream and convert the above array to IntStream:
IntStream stream = Arrays.stream(arr);
Now limit some elements and find the sum of those elements in the stream:
IntStream stream = ... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To convert int array to IntStream, let us first create an int array:"
},
{
"code": null,
"e": 1186,
"s": 1131,
"text": "int[] arr = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};"
},
{
"code": null,
"e": 1250,
"s": 1186,
... |
How to simulate touch event with android at a given position? | This example demonstrates how do I simulate touch even with android at a given position.
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": 1151,
"s": 1062,
"text": "This example demonstrates how do I simulate touch even with android at a given position."
},
{
"code": null,
"e": 1280,
"s": 1151,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requir... |
MATLAB - Magnitude of a Vector | Magnitude of a vector v with elements v1, v2, v3, ..., vn, is given by the equation −
|v| = √(v12 + v22 + v32 + ... + vn2)
You need to take the following steps to calculate the magnitude of a vector −
Take the product of the vector with itself, using array multiplication (.*). This produces a vector sv, whose elements ... | [
{
"code": null,
"e": 2227,
"s": 2141,
"text": "Magnitude of a vector v with elements v1, v2, v3, ..., vn, is given by the equation −"
},
{
"code": null,
"e": 2264,
"s": 2227,
"text": "|v| = √(v12 + v22 + v32 + ... + vn2)"
},
{
"code": null,
"e": 2342,
"s": 2264,
... |
Comparing Strings with (possible) null values in java? | Strings in Java represents an array of characters. They are represented by the String class.
The compareTo() method of the String class two Strings (char by char) it also accepts null values. This method returns an integer representing the result, if the value of the obtained integer is −
0: Given two Strings are equal... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Strings in Java represents an array of characters. They are represented by the String class."
},
{
"code": null,
"e": 1352,
"s": 1155,
"text": "The compareTo() method of the String class two Strings (char by char) it also accepts nul... |
CSS Gradients - GeeksforGeeks | 21 Oct, 2021
The Gradient in CSS is a special type of image that is made up of progressive & smooth transition between two or more colors. CSS is the way to add style to various web documents. By using the gradient in CSS, we can create variants styling of images which can help to make an attractive webpage.
The Gradi... | [
{
"code": null,
"e": 28144,
"s": 28116,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 28442,
"s": 28144,
"text": "The Gradient in CSS is a special type of image that is made up of progressive & smooth transition between two or more colors. CSS is the way to add style to variou... |
AngularJS | AJAX - $http - GeeksforGeeks | 27 Jun, 2019
The AngularJS provides a control service named as AJAX – $http, which serves the task for reading all the data that is available on the remote servers. The demand for the requirement of desired records gets met when the server makes the database call by using the browser. The data is mostly needed in JSON ... | [
{
"code": null,
"e": 28297,
"s": 28269,
"text": "\n27 Jun, 2019"
},
{
"code": null,
"e": 28776,
"s": 28297,
"text": "The AngularJS provides a control service named as AJAX – $http, which serves the task for reading all the data that is available on the remote servers. The demand ... |
A gentle introduction to OCR. How and why to apply deep learning to... | by Gidi Shperber | Towards Data Science | Want to learn more? visit www.Shibumi-ai.com
Read here the revisited version of this post
OCR, or optical character recognition, is one of the earliest addressed computer vision tasks, since in some aspects it does not require deep learning. Therefore there were different OCR implementations even before the deep learni... | [
{
"code": null,
"e": 217,
"s": 172,
"text": "Want to learn more? visit www.Shibumi-ai.com"
},
{
"code": null,
"e": 262,
"s": 217,
"text": "Read here the revisited version of this post"
},
{
"code": null,
"e": 547,
"s": 262,
"text": "OCR, or optical character r... |
How to overplot a line on a scatter plot in Python? | First, we can create a scatter for different data points using the scatter method, and then, we can plot the lines using the plot method.
Create a new figure, or activate an existing figure with figure size(4, 3), using figure() method.
Create a new figure, or activate an existing figure with figure size(4, 3), using f... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "First, we can create a scatter for different data points using the scatter method, and then, we can plot the lines using the plot method."
},
{
"code": null,
"e": 1299,
"s": 1200,
"text": "Create a new figure, or activate an existing... |
Getting Started With Apache Spark, Python and PySpark | by Hadi Fadlallah | Towards Data Science | This article is a quick guide to Apache Spark single node installation, and how to use Spark python library PySpark.
Hadoop Version: 3.1.0
Apache Kafka Version: 1.1.1
Operating System: Ubuntu 16.04
Java Version: Java 8
Apache Spark requires Java. To ensure that Java is installed, first update the Operating System then ... | [
{
"code": null,
"e": 288,
"s": 171,
"text": "This article is a quick guide to Apache Spark single node installation, and how to use Spark python library PySpark."
},
{
"code": null,
"e": 310,
"s": 288,
"text": "Hadoop Version: 3.1.0"
},
{
"code": null,
"e": 338,
"... |
How to use mat-icon in angular? | 09 Jun, 2020
To include icons in your webpage, you can use mat-icon directive. Previously it was known as md-icon. It is better to use mat-icon as they serve SVG icons i.e. vector-based icons which are adaptable to any resolution and dimension, on the other hand, raster-based icons have a fixed pattern of dots with spe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2020"
},
{
"code": null,
"e": 389,
"s": 28,
"text": "To include icons in your webpage, you can use mat-icon directive. Previously it was known as md-icon. It is better to use mat-icon as they serve SVG icons i.e. vector-based ic... |
How to Install PyGTK in Python on Windows? | 29 Oct, 2021
PyGTK is a Python package or module that enables developers to work with GTK+ GUI Toolkit. This is how WikiBooks describes GTK+:
“GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API.”
And this is how gtk.org... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 183,
"s": 53,
"text": "PyGTK is a Python package or module that enables developers to work with GTK+ GUI Toolkit. This is how WikiBooks describes GTK+: "
},
{
"code": null,
"e": 337,
... |
How to Zip two lists of lists in Python? | 29 Jun, 2022
The normal zip function allows us the functionality to aggregate the values in a container. But sometimes, we have a requirement in which we require to have multiple lists and containing lists as index elements and we need to merge/zip them together. This is quite uncommon problem, but solution to it can s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 438,
"s": 54,
"text": "The normal zip function allows us the functionality to aggregate the values in a container. But sometimes, we have a requirement in which we require to have multiple lists an... |
Python Program to check whether all elements in a string list are numeric | 24 Jan, 2021
Given a list that contains only string elements the task here is to write a Python program to check if all of them are numeric or not. If all are numeric return True otherwise, return False.
Input : test_list = [“434”, “823”, “98”, “74”]
Output : True
Explanation : All Strings are digits.
Input : test_list... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 244,
"s": 53,
"text": "Given a list that contains only string elements the task here is to write a Python program to check if all of them are numeric or not. If all are numeric return True otherwis... |
XML | Tags | 12 Apr, 2021
XML tags are the important features of XML document. It is similar to HTML but XML is more flexible then HTML. It allows to create new tags (user defined tags). The first element of XML document is called root element. The simple XML document contain opening tag and closing tag. The XML tags are case sensi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 569,
"s": 52,
"text": "XML tags are the important features of XML document. It is similar to HTML but XML is more flexible then HTML. It allows to create new tags (user defined tags). The first ele... |
How to set the Auto Size Mode of FlowLayoutPanel in C#? | 02 Aug, 2019
In Windows Forms, FlowLayoutPanel control is used to arrange its child controls in a horizontal or vertical flow direction. Or in other words, FlowLayoutPanel is a container which is used to organize different or same types of controls in it either horizontally or vertically. In FlowLayoutPanel control, yo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 582,
"s": 28,
"text": "In Windows Forms, FlowLayoutPanel control is used to arrange its child controls in a horizontal or vertical flow direction. Or in other words, FlowLayoutPanel is a container w... |
p5.js | quad() Function | 12 Apr, 2019
The quad() function is an inbuilt function in p5.js which is used to draw a quadrilateral. A quadrilateral is a four-sided polygon. It function creates a shape similar to rectangle, but the angles between two edges are not constrained to 90 degrees.
Syntax:
quad(x1, y1, x2, y2, x3, y3, x4, y4)
or
quad(x1, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 278,
"s": 28,
"text": "The quad() function is an inbuilt function in p5.js which is used to draw a quadrilateral. A quadrilateral is a four-sided polygon. It function creates a shape similar to rect... |
Lowest Common Ancestor in a Binary Tree | Set 2 (Using Parent Pointer) | 29 Jun, 2022
Given values of two nodes in a Binary Tree, find the Lowest Common Ancestor (LCA). It may be assumed that both nodes exist in the tree.
For example, consider the Binary Tree in diagram, LCA of 10 and 14 is 12 and LCA of 8 and 14 is 8.
Let T be a rooted tree. The lowest common ancestor between two nodes n1... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 191,
"s": 54,
"text": "Given values of two nodes in a Binary Tree, find the Lowest Common Ancestor (LCA). It may be assumed that both nodes exist in the tree. "
},
{
"code": null,
"e": ... |
How to show/hide data when the particular condition is true in AngularJS ? | 18 Nov, 2020
In AngularJS, in order to hide or show data or content, we can use *ngIf structural directive. By using this, we can evaluate conditions and then *ngIf based on the condition displays the content. For example, if the condition for *ngIf is true then the content will be displayed and if the condition is fal... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Nov, 2020"
},
{
"code": null,
"e": 373,
"s": 28,
"text": "In AngularJS, in order to hide or show data or content, we can use *ngIf structural directive. By using this, we can evaluate conditions and then *ngIf based on the condition ... |
C# | CompareOrdinal() Method | 31 May, 2022
In C#, CompareOrdinal() is a string method. This method is used to compare the two specified string objects or substrings using the numerical values of the corresponding Char objects in each string or substring. This method can be overloaded by passing different parameters to it.
CompareOrdinal(String, St... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 310,
"s": 28,
"text": "In C#, CompareOrdinal() is a string method. This method is used to compare the two specified string objects or substrings using the numerical values of the corresponding Char ... |
How to use goto in Javascript ? | 11 Oct, 2019
There is no goto keyword in javascript. The reason being it provides a way to branch in an arbitrary and unstructured manner. This might make a goto statement hard to understand and maintain. But there are still other ways to get the desired result.The method for getting the goto result in JavaScript is us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 854,
"s": 28,
"text": "There is no goto keyword in javascript. The reason being it provides a way to branch in an arbitrary and unstructured manner. This might make a goto statement hard to understa... |
get_window_size driver method – Selenium Python | 03 Dec, 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": "\n03 Dec, 2020"
},
{
"code": null,
"e": 768,
"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 ... |
SASS | Interpolation | 11 Oct, 2019
Interpolation is basically an insertion. Interpolation allows us to interpolate sass expressions into a simple SASS or CSS code. Means, you can define ( some part or the whole ) selector name, property name, CSS at-rules, quoted or unquoted strings etc, as a variable. Interpolation is a new principle and i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 361,
"s": 28,
"text": "Interpolation is basically an insertion. Interpolation allows us to interpolate sass expressions into a simple SASS or CSS code. Means, you can define ( some part or the whole... |
Flutter – Adding 3D Objects | 17 Feb, 2021
3D objects are those objects which have 3 dimensions length, width, and depth. These objects provide a great user experience when used for various purposes. And adding such type of visualization to your app will be very helpful for the user, which in turn helps your app to grow and attract a large audience... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 369,
"s": 52,
"text": "3D objects are those objects which have 3 dimensions length, width, and depth. These objects provide a great user experience when used for various purposes. And adding such t... |
Convert a Set of String to a comma separated String in Java - GeeksforGeeks | 11 Dec, 2018
Given a Set of String, the task is to convert the Set to a comma separated String in Java.
Examples:
Input: Set<String> = ["Geeks", "ForGeeks", "GeeksForGeeks"]
Output: "Geeks, For, Geeks"
Input: Set<String> = ["G", "e", "e", "k", "s"]
Output: "G, e, e, k, s"
Approach: This can be achieved with the help ... | [
{
"code": null,
"e": 23879,
"s": 23851,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 23970,
"s": 23879,
"text": "Given a Set of String, the task is to convert the Set to a comma separated String in Java."
},
{
"code": null,
"e": 23980,
"s": 23970,
"text": ... |
VB.Net - Windows File System | VB.Net allows you to work with the directories and files using various directory and file-related classes like, the DirectoryInfo class and the FileInfo class.
The DirectoryInfo class is derived from the FileSystemInfo class. It has various methods for creating, moving, and browsing through directories and subdirectori... | [
{
"code": null,
"e": 2460,
"s": 2300,
"text": "VB.Net allows you to work with the directories and files using various directory and file-related classes like, the DirectoryInfo class and the FileInfo class."
},
{
"code": null,
"e": 2656,
"s": 2460,
"text": "The DirectoryInfo clas... |
How to compare two tensors in PyTorch? | To compare two tensors element-wise in PyTorch, we use the torch.eq() method. It compares the corresponding elements and returns "True" if the two elements are same, else it returns "False". We can compare two tensors with same or different dimensions, but the size of both the tensors must match at non-singleton dimens... | [
{
"code": null,
"e": 1387,
"s": 1062,
"text": "To compare two tensors element-wise in PyTorch, we use the torch.eq() method. It compares the corresponding elements and returns \"True\" if the two elements are same, else it returns \"False\". We can compare two tensors with same or different dimensio... |
Get the fully-qualified name of a class in Java | A fully-qualified class name in Java contains the package that the class originated from. An example of this is java.util.ArrayList. The fully-qualified class name can be obtained using the getName() method.
A program that demonstrates this is given as follows −
Live Demo
public class Demo {
public static void main... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "A fully-qualified class name in Java contains the package that the class originated from. An example of this is java.util.ArrayList. The fully-qualified class name can be obtained using the getName() method."
},
{
"code": null,
"e": 1325,
... |
Difference between Schema and Database in MySQL? | In MySQL, schema is synonymous with database. As the query is written to create the
database, similarly the query can be written to create the schema.
Logical structure can be used by the schema to store data while memory component can be
used by the database to store data. Also, a schema is collection of tables while ... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "In MySQL, schema is synonymous with database. As the query is written to create the\ndatabase, similarly the query can be written to create the schema."
},
{
"code": null,
"e": 1420,
"s": 1213,
"text": "Logical structure can be used ... |
Evolution of a salesman: A complete genetic algorithm tutorial for Python | by Eric Stoltz | Towards Data Science | Drawing inspiration from natural selection, genetic algorithms (GA) are a fascinating approach to solving search and optimization problems. While much has been written about GA (see: here and here), little has been done to show a step-by-step implementation of a GA in Python for more sophisticated problems. That’s wher... | [
{
"code": null,
"e": 621,
"s": 172,
"text": "Drawing inspiration from natural selection, genetic algorithms (GA) are a fascinating approach to solving search and optimization problems. While much has been written about GA (see: here and here), little has been done to show a step-by-step implementati... |
How to submit a form using jQuery click event? | To submit a form using jQuery click event, you need to detect the submit event. Let’s submit a form using click event and without using click event.
You can try to run the following code to learn how to submit a form using jQuery click event −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "To submit a form using jQuery click event, you need to detect the submit event. Let’s submit a form using click event and without using click event."
},
{
"code": null,
"e": 1306,
"s": 1211,
"text": "You can try to run the following ... |
Overuse of lambda expressions in Python - GeeksforGeeks | 04 Mar, 2022
What are lambda expressions? A lambda expression is a special syntax to create functions without names. These functions are called lambda functions. These lambda functions can have any number of arguments but only one expression along with an implicit return statement. Lambda expressions return function ob... | [
{
"code": null,
"e": 23747,
"s": 23719,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 24107,
"s": 23747,
"text": "What are lambda expressions? A lambda expression is a special syntax to create functions without names. These functions are called lambda functions. These lambda f... |
How to install Jupyter Notebook on Windows? - GeeksforGeeks | 05 Oct, 2021
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much m... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 24893,
"s": 24581,
"text": "Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative t... |
JavaScript Number toExponential() Method - GeeksforGeeks | 22 Dec, 2021
Below is the example of the Number toExponential() Method.
Example: <script type="text/javascript"> var num = 212.13456; document.write(num.toExponential(4)); </script>
<script type="text/javascript"> var num = 212.13456; document.write(num.toExponential(4)); </... | [
{
"code": null,
"e": 24878,
"s": 24850,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 24937,
"s": 24878,
"text": "Below is the example of the Number toExponential() Method."
},
{
"code": null,
"e": 25069,
"s": 24937,
"text": "Example: <script type=\"... |
How to enable the “disabled” attribute using jQuery on button click? | Set the disabled property to true in jQuery −
<input type="text" disabled=true id="showTxtBoxHide" value="My Name is David..">
Following is the code −
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<... | [
{
"code": null,
"e": 1108,
"s": 1062,
"text": "Set the disabled property to true in jQuery −"
},
{
"code": null,
"e": 1189,
"s": 1108,
"text": "<input type=\"text\" disabled=true id=\"showTxtBoxHide\" value=\"My Name is David..\">"
},
{
"code": null,
"e": 1213,
"s... |
Output of Java Program | Set 20 (Inheritance) - GeeksforGeeks | 14 Aug, 2019
Prerequisite – Inheritance in Java
Predict the output of following Java Programs.Program 1 :
class A{ public A(String s) { System.out.print("A"); }} public class B extends A { public B(String s) { System.out.print("B"); } public static void main(String[] args) { ... | [
{
"code": null,
"e": 24310,
"s": 24282,
"text": "\n14 Aug, 2019"
},
{
"code": null,
"e": 24345,
"s": 24310,
"text": "Prerequisite – Inheritance in Java"
},
{
"code": null,
"e": 24403,
"s": 24345,
"text": "Predict the output of following Java Programs.Program 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.