title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to Build a Map Dashboard with Python ASAP | by Christos Zeglis | Towards Data Science | We have already seen how easy it is to plot some data on a map using python along with the geoviews library. However, truth be told, it can get quite frustrating editing lines of code each time you want to change specific aspects of what’s displayed on the plot. For this reason, it is often more useful and convenient t... | [
{
"code": null,
"e": 689,
"s": 171,
"text": "We have already seen how easy it is to plot some data on a map using python along with the geoviews library. However, truth be told, it can get quite frustrating editing lines of code each time you want to change specific aspects of what’s displayed on th... |
Difference Between Friend Function and Friend Class | In this post, we will understand the difference between Friend function and Friend class.
It is usually used with operator overloading operation.
It is usually used with operator overloading operation.
It is used with the ‘friend’ keyword.
It is used with the ‘friend’ keyword.
It helps give a non-member function the ac... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "In this post, we will understand the difference between Friend function and Friend class."
},
{
"code": null,
"e": 1208,
"s": 1152,
"text": "It is usually used with operator overloading operation."
},
{
"code": null,
"e":... |
Disable Kivy Button - GeeksforGeeks | 19 Feb, 2020
In this article, we will learn how to disable a button in kivy, there are some places where we need to disable the buttons So in this article you will learn how to do that.
Kivy Tutorial – Learn Kivy with Examples.
The Button is a Label with associated actions that are triggered when the button is pressed ... | [
{
"code": null,
"e": 24366,
"s": 24338,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24539,
"s": 24366,
"text": "In this article, we will learn how to disable a button in kivy, there are some places where we need to disable the buttons So in this article you will learn how to... |
Doubly Linked Circular Lists in C++ | Circular Linked List is a variation of Linked list in which the first element points to the last element and the last element points to the first element. Both Singly Linked List and Doubly Linked List can be made into a circular linked list.
In doubly linked list, the next pointer of the last node points to the first ... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "Circular Linked List is a variation of Linked list in which the first element points to the last element and the last element points to the first element. Both Singly Linked List and Doubly Linked List can be made into a circular linked list."
},
{
... |
Dynamic Scoping in R Programming - GeeksforGeeks | 20 Jul, 2021
R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is available across widely used platforms like Windows, Linux, and macOS. Also, the R programming language is the latest cutting-edge tool. The... | [
{
"code": null,
"e": 29044,
"s": 29016,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 29539,
"s": 29044,
"text": "R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R... |
C# | Array.FindLast() Method - GeeksforGeeks | 17 Dec, 2021
This method is used to search for an element that matches the conditions defined by the specified predicate and returns the last occurrence within the entire Array.
Syntax:
public static T FindLast<T> (T[] array, Predicate<T> match);
Parameters:
array: It is the one-dimensional, zero-based array to search.... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 24583,
"s": 24418,
"text": "This method is used to search for an element that matches the conditions defined by the specified predicate and returns the last occurrence within the entire Array... |
Copy characters from string into char Array in Java | Let’s say we have the following string.
String str = "Demo Text!";
To copy some part of the above string, use the getChars() method.
// copy characters from string into chArray
=str.getChars( 0, 5, chArray, 0 );
The following is an example to copy characters from string into char Array in Java.
Live Demo
public class ... | [
{
"code": null,
"e": 1102,
"s": 1062,
"text": "Let’s say we have the following string."
},
{
"code": null,
"e": 1129,
"s": 1102,
"text": "String str = \"Demo Text!\";"
},
{
"code": null,
"e": 1195,
"s": 1129,
"text": "To copy some part of the above string, use... |
How to get the number of columns of a table using JDBC? | You can get the number of columns of a table using the getColumnCount() method of the ResultSetMetaData class.
//Retrieving the ResultSetMetaData object
ResultSetMetaData rsmd = rs.getMetaData();
//getting the column type
int column_count = rsmd.getColumnCount();
Assume we have a table named employee_data in the datab... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "You can get the number of columns of a table using the getColumnCount() method of the ResultSetMetaData class."
},
{
"code": null,
"e": 1327,
"s": 1173,
"text": "//Retrieving the ResultSetMetaData object\nResultSetMetaData rsmd = rs.... |
CSS | Image Sprites - GeeksforGeeks | 04 Dec, 2018
It is basically an image which is a collection of different images put together to form a single image. The use of image sprites is done for two main reasons:
For faster page loading since use only single image.
It reduce the bandwidth used to load multiple images. This way less data is consume.
Image spri... | [
{
"code": null,
"e": 28071,
"s": 28043,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 28230,
"s": 28071,
"text": "It is basically an image which is a collection of different images put together to form a single image. The use of image sprites is done for two main reasons:"
}... |
Tryit Editor v3.7 | Tryit: Canvas with a text | [] |
What are the differences between bitwise and logical AND operators in C/C++ | As we know the bit-wise AND is represented as ‘&’ and the logical operator is represented as ‘&&’. There are some fundamental differences between them. These are as follows −
The logical AND operator works on Boolean expressions, and returns Boolean values only. The bitwise AND operator works on integer, short int, lon... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "As we know the bit-wise AND is represented as ‘&’ and the logical operator is represented as ‘&&’. There are some fundamental differences between them. These are as follows −"
},
{
"code": null,
"e": 1445,
"s": 1237,
"text": "The log... |
Count of Perfect Numbers in given range for Q queries - GeeksforGeeks | 02 Dec, 2021
Given an array arr[] consisting of N pairs, where each pair represents a query of the form {L, R}, the task is to find the count of perfect numbers in the given range for each query.
Examples:
Input: arr[][] = {{1, 10}, {10, 20}, {20, 30}}Output: 1 1 1Explanation:
Query(1, 10): Perfect numbers in the range... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 25005,
"s": 24822,
"text": "Given an array arr[] consisting of N pairs, where each pair represents a query of the form {L, R}, the task is to find the count of perfect numbers in the given ra... |
Connecting the Dots (Python, Spark, and Kafka) | by Kiruparan Balachandran | Towards Data Science | Frequently, Data scientists prefer to use Python (in some cases, R) to develop machine learning models. Here, they have a valid justification since data-driven solutions arrive with many experiments. Numerous interactions with the language we use to develop the models are required to perform experiments, and the librar... | [
{
"code": null,
"e": 554,
"s": 46,
"text": "Frequently, Data scientists prefer to use Python (in some cases, R) to develop machine learning models. Here, they have a valid justification since data-driven solutions arrive with many experiments. Numerous interactions with the language we use to develo... |
C++ Program to Find the Minimum value of Binary Search Tree | It is a program to find the minimum value of a binary search tree.
Begin
Declare nd as a structure.
Declare d to the integer datatype.
Declare pointer lt to the structure nd type.
Declare pointer lt to the structure nd type.
Declare function new_nd() to the structure nd type.
Declare d to the integer ... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "It is a program to find the minimum value of a binary search tree."
},
{
"code": null,
"e": 2600,
"s": 1129,
"text": "Begin\n Declare nd as a structure.\n Declare d to the integer datatype.\n Declare pointer lt to the structure... |
PwC Acceleration Center Interview Experience for Associate Role | On-Campus 2021 | 21 Apr, 2021
PwC is a Consulting company that came to our college for the Role of Associate Bangalore Location
It Comprises 4 Rounds:
Online Test Group Discussion Technical HR
Online Test
Group Discussion
Technical
HR
Round 1(Online Test): This test comprises three sections Aptitude, Java, and SQL
Aptitude: It was s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 150,
"s": 52,
"text": "PwC is a Consulting company that came to our college for the Role of Associate Bangalore Location"
},
{
"code": null,
"e": 173,
"s": 150,
"text": "It Comp... |
HTML | DOM Style visibility Property | 12 May, 2021
The Style visibility property in HTML DOM used to set the visibility for an element. It is used to hide or show the element. It returns the visibility property that is given to an element.
Syntax:
It returns the visibility property.
object.style.visibility
It is used to set the visibility property.
objec... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 217,
"s": 28,
"text": "The Style visibility property in HTML DOM used to set the visibility for an element. It is used to hide or show the element. It returns the visibility property that is given t... |
What is the Maximum Value of smallint(6) unsigned in MySQL? | The maximum value of SMALLINT(6) unsigned in MySQL is 65535. The number 6 does not affect the actual range. It can only be used to display width on the command line.
The Minimum Value signed is
-32768
The Maximum Value unsigned is
65535
The Maximum value signed is
32767
Let us understand this with zerofill and create a... | [
{
"code": null,
"e": 1353,
"s": 1187,
"text": "The maximum value of SMALLINT(6) unsigned in MySQL is 65535. The number 6 does not affect the actual range. It can only be used to display width on the command line."
},
{
"code": null,
"e": 1381,
"s": 1353,
"text": "The Minimum Valu... |
Spring Boot – Change Port | 03 Dec, 2021
Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because of its rapid production-ready environment which enables the developers to directly focus on the logic instead of struggling with the configuration and setup. Sp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 534,
"s": 28,
"text": "Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because of its rapid production-read... |
Merge DataFrames by Row Names in R | 14 Sep, 2021
In this article, we are going to see how to merge Dataframe by Row Name using merge in R Programming Language.
The merge() function in base R can be used to merge input dataframes by common columns or row names. The merge() function retains all the row names of the dataframes, behaving similarly to the in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 140,
"s": 28,
"text": "In this article, we are going to see how to merge Dataframe by Row Name using merge in R Programming Language. "
},
{
"code": null,
"e": 429,
"s": 140,
"te... |
PostgreSQL- LPAD Function | 01 Feb, 2021
The PostgreSQL LPAD() function is used for padding a string to the left by a specified length with other specified characters.
Syntax: LPAD(string, length[, fill])
Let’s analyze the above syntax:
The string argument is a string that is to be padded on the left.
It is a positive integer that sets the lengt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "The PostgreSQL LPAD() function is used for padding a string to the left by a specified length with other specified characters."
},
{
"code": null,
"e": 193,
"s... |
Stack.Pop() Method in C# | 04 Feb, 2019
This method(comes under System.Collections namespace) is used to remove and returns the object at the top of the Stack. This method is similar to the Peek method, but Peek does not modify the Stack.
Syntax:
public virtual object Pop ();
Return Value: It returns the Object removed from the top of the Stack.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "This method(comes under System.Collections namespace) is used to remove and returns the object at the top of the Stack. This method is similar to the Peek method, but Peek doe... |
Java Program to Print Square Star Pattern | 13 Jan, 2022
Here, we will implement a Java program to print the square star pattern. We will print the square star pattern with diagonals and without diagonals.
Example:
**********************
* *
* *
* *
* *
* *
* ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Here, we will implement a Java program to print the square star pattern. We will print the square star pattern with diagonals and without diagonals. "
},
{
"code": nu... |
How to Use HAVING With Aggregate Functions in SQL? | 28 Oct, 2021
SQL provides many built-in functions to perform tasks. There are 4 types of functions Date functions, Char functions, Numeric functions, and Aggregate functions.
Here we will be looking at aggregate functions and how to use them with the HAVING keyword.
Aggregate Functions are database built-in functions ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "SQL provides many built-in functions to perform tasks. There are 4 types of functions Date functions, Char functions, Numeric functions, and Aggregate functions. "
},
{
... |
Equation of a straight line passing through a point and making a given angle with a given line | 14 Jun, 2022
Given four integers a, b, c and d, representing coefficients of a straight line with equation (ax + by + c = 0), the task is to find the equations of the two straight lines passing through a given point and making an angle α with the given straight line.
Examples:
Input: a = 2, b = 3, c = -7, x1 = 4, y1 = ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 283,
"s": 28,
"text": "Given four integers a, b, c and d, representing coefficients of a straight line with equation (ax + by + c = 0), the task is to find the equations of the two straight lines pa... |
Minimum number of edges between two vertices of a graph using DFS | 06 Aug, 2021
Given an undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a given pair of vertices (u, v). We have already discussed this problem using the BFS approach, here we will use the DFS approach.
Examples:
Input: For the following given graph, find the mini... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 298,
"s": 52,
"text": "Given an undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a given pair of vertices (u, v). We have already discussed ... |
HTML | input maxlength Attribute | 28 Feb, 2022
The <input> maxlength attribute is used to specify the maximum number of characters enters into the <input> element.Syntax:
<input maxlength="number">
Attribute Value:
number: It contains single value number which allows the maximum number of character in <input> element. Its default value is 524288.
E... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 154,
"s": 28,
"text": "The <input> maxlength attribute is used to specify the maximum number of characters enters into the <input> element.Syntax: "
},
{
"code": null,
"e": 181,
"s"... |
extends – Django Template Tags | 02 Dec, 2021
A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenience to rendering data in a template. Django templates not only allow passing data from view to template, but also provides some limited... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 678,
"s": 53,
"text": "A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenienc... |
How to add dataframe to dataframe in R ? | 13 Jul, 2021
In this article, we will see how to add dataframe at the end of another dataframe in R Programming Language.
The rbind() method in R works only if both the input dataframe contains the same columns with similar lengths and names. The dataframes may have a different number of rows. The class of the datafram... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "In this article, we will see how to add dataframe at the end of another dataframe in R Programming Language."
},
{
"code": null,
"e": 456,
"s": 137,
"text"... |
How to write <dt> and <dd> element on the same line using CSS ? | 02 Jun, 2020
The <dt> and <dd> tags are used together within the <dl> (defines a description list) tag in HTML to define terms or give their description. The <dt> tag is used to specify the description list. The <dd> tag stands for definition description and used to denote the description or definition of an item in a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 451,
"s": 28,
"text": "The <dt> and <dd> tags are used together within the <dl> (defines a description list) tag in HTML to define terms or give their description. The <dt> tag is used to specify th... |
Java.lang.Math Class in Java | Set 1 - GeeksforGeeks | 02 Aug, 2021
Math Class methods helps to perform the numeric operations like square, square root, cube, cube root, exponential and trigonometric operations
Declaration :
public final class Math
extends Object
What is NaN argument?A constant holding a Not-a-Number (NaN) value of type double. It is equivalent to the v... | [
{
"code": null,
"e": 24011,
"s": 23983,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 24154,
"s": 24011,
"text": "Math Class methods helps to perform the numeric operations like square, square root, cube, cube root, exponential and trigonometric operations"
},
{
"code"... |
How to convert/store a string of numbers in to an array in java? | You can convert a String to an integer using the parseInt() method of the Integer class. To convert a string array to an integer array, convert each element of it to integer and populate the integer array with them.
Live Demo
import java.util.Arrays;
public class StringToIntegerArray {
public static void main(Stri... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "You can convert a String to an integer using the parseInt() method of the Integer class. To convert a string array to an integer array, convert each element of it to integer and populate the integer array with them."
},
{
"code": null,
"e": ... |
Generator Classes | Sequence Generator | Increment | Assign | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Knowingly or unknowingly, we have been using ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Build Your First Data Visualization Web App in Python Using Streamlit | by Mala Deep | Towards Data Science | As a data science disciple, I used to work more in jupyter notebook, conducting EDA, designing and developing the model, and presenting the result on the notebook only. Sometimes, I tried to connect the Flask model and give it a working view for the audience, but connecting and developing a model with the front end see... | [
{
"code": null,
"e": 738,
"s": 171,
"text": "As a data science disciple, I used to work more in jupyter notebook, conducting EDA, designing and developing the model, and presenting the result on the notebook only. Sometimes, I tried to connect the Flask model and give it a working view for the audie... |
Automate Sentiment Analysis Process for Reddit Post: TextBlob and VADER | by Manmohan Singh | Towards Data Science | Stuck behind the paywall? Read this article with my friend link here.
Have you ever wondered how to find the sentiment of a subreddit from a user’s comments? Or wanted to check the subreddit polarity on different topics before joining? If you are looking for answers to these questions, then this article will help you a... | [
{
"code": null,
"e": 241,
"s": 171,
"text": "Stuck behind the paywall? Read this article with my friend link here."
},
{
"code": null,
"e": 573,
"s": 241,
"text": "Have you ever wondered how to find the sentiment of a subreddit from a user’s comments? Or wanted to check the subre... |
2 reasons to use MixUp Augmentation when training your Deep Learning models | by Art Kulakov | Towards Data Science | The MixUp idea was introduced back in 2018 in this paper and was immediately taken into pipelines by many ML researchers. The implementation of MixUp is really simple, but still it can bring a huge benefit to your model performance.
MixUp can be represented with this simple equation:
newImage = alpha * image1 + (1-alph... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "The MixUp idea was introduced back in 2018 in this paper and was immediately taken into pipelines by many ML researchers. The implementation of MixUp is really simple, but still it can bring a huge benefit to your model performance."
},
{
"code": ... |
Largest and smallest digit of a number | 14 Jul, 2022
Given a number N. The task is to find the largest and the smallest digit of the number.Examples :
Input : N = 2346 Output : 6 2 6 is the largest digit and 2 is smallestInput : N = 5 Output : 5 5
Approach: An efficient approach is to find all digits in the given number and find the largest and the smallest ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jul, 2022"
},
{
"code": null,
"e": 152,
"s": 54,
"text": "Given a number N. The task is to find the largest and the smallest digit of the number.Examples :"
},
{
"code": null,
"e": 249,
"s": 152,
"text": "Input :... |
Deploying ML Models as API using FastAPI | 16 Sep, 2021
Deployment usually the last step in any Data Science Project Pipeline, to be able to integrate your ML/DL model to a web application is quite an important task. There are many popular frameworks that can be used to do this task like Flask and Django. Django is usually used for large scale application and t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 750,
"s": 28,
"text": "Deployment usually the last step in any Data Science Project Pipeline, to be able to integrate your ML/DL model to a web application is quite an important task. There are many... |
Introduction to Redux (Action, Reducers and Store) | 01 Oct, 2021
Redux is a state managing library used in JavaScript apps. It simply manages the state of your application or in other words, it is used to manage the data of the application. It is used with a library like React.Uses: It makes easier to manage state and data. As the complexity of our application increases... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 626,
"s": 28,
"text": "Redux is a state managing library used in JavaScript apps. It simply manages the state of your application or in other words, it is used to manage the data of the application.... |
How to Create Different Subplot Sizes in Matplotlib? | 23 Sep, 2021
In this article, we will learn different ways to create subplots of different sizes using Matplotlib. It provides 3 different methods using which we can create different subplot of different sizes.
Methods available to create subplot :
Gridspec
gridspec_kw
subplot2grid
1. Gridspec : GridSpec from the grid... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 226,
"s": 28,
"text": "In this article, we will learn different ways to create subplots of different sizes using Matplotlib. It provides 3 different methods using which we can create different subpl... |
Sorting Algorithms Visualization : Bubble Sort | 29 Nov, 2021
The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Bubble sort visualization has been implemented using graphics.h library. As we all know that bubble sort swaps the adjacent elements if they are unsorted and finally the larger one being shifted... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 557,
"s": 52,
"text": "The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Bubble sort visualization has been implemented using graphics... |
How to move an element to left, right, up and down using arrow keys ? | 17 Sep, 2019
The task is to move an element to left, right, up and down using arrow keys in jquery, we can use the jQuery keydown() method along with the .animate() method.The keydown() method triggers the keydown event whenever User presses a key on the keyboard.Syntax:
$(selector).keydown(function)
Approach:
The .key... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "The task is to move an element to left, right, up and down using arrow keys in jquery, we can use the jQuery keydown() method along with the .animate() method.The keydown() me... |
Count number of primes in an array | 21 May, 2021
Given an array arr[] of N positive integers. The task is to write a program to count the number of prime elements in the given array.Examples:
Input: arr[] = {1, 3, 4, 5, 7}
Output: 3
There are three primes, 3, 5 and 7
Input: arr[] = {1, 2, 3, 4, 5, 6, 7}
Output: 4
Naive Approach: A simple solution is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Given an array arr[] of N positive integers. The task is to write a program to count the number of prime elements in the given array.Examples: "
},
{
"code": null,
... |
Reading and Writing XML Files in Python | 02 Sep, 2021
Extensible Markup Language, commonly known as XML is a language designed specifically to be easy to interpret by both humans and computers altogether. The language defines a set of rules used to encode a document in a specific format. In this article, methods have been described to read and write XML files... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 371,
"s": 52,
"text": "Extensible Markup Language, commonly known as XML is a language designed specifically to be easy to interpret by both humans and computers altogether. The language defines a ... |
Loading Data in Pytorch - GeeksforGeeks | 04 Jan, 2022
In this article, we will discuss how to load different kinds of data in PyTorch.
For demonstration purposes, Pytorch comes with 3 divisions of datasets namely torchaudio, torchvision, and torchtext. We can leverage these demo datasets to understand how to load Sound, Image, and text data using Pytorch.
Loa... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 23982,
"s": 23901,
"text": "In this article, we will discuss how to load different kinds of data in PyTorch."
},
{
"code": null,
"e": 24205,
"s": 23982,
"text": "For demon... |
What is Gumbel-Softmax?. A differentiable approximation to... | by Wanshun Wong | Towards Data Science | Very often in deep learning we want to sample discrete data. For example,
text generation by generative adversarial network (GAN)
variational autoencoder with discrete latent variable
deep reinforcement learning with discrete action space
However, the sampling process of discrete data from a categorical distribution is... | [
{
"code": null,
"e": 121,
"s": 47,
"text": "Very often in deep learning we want to sample discrete data. For example,"
},
{
"code": null,
"e": 177,
"s": 121,
"text": "text generation by generative adversarial network (GAN)"
},
{
"code": null,
"e": 231,
"s": 177,
... |
Array.LastIndexOf Method in C# | Set - 1 - GeeksforGeeks | 12 Mar, 2019
Array.LastIndexOf method is used to find the last matching element in a one-dimensional array. It starts the search from the last element of an array. It returns the index of the element that contains the specified value. There are 6 methods in the overload list of this method as follows:
LastIndexOf(Array... | [
{
"code": null,
"e": 24484,
"s": 24456,
"text": "\n12 Mar, 2019"
},
{
"code": null,
"e": 24774,
"s": 24484,
"text": "Array.LastIndexOf method is used to find the last matching element in a one-dimensional array. It starts the search from the last element of an array. It returns t... |
C++ String Library - operator= | It assigns a new value to the string, replacing its current contents.
Following is the declaration for std::string::operator=
tring& operator= (const string& str);
str − It is an another string object.
str − It is an another string object.
s − Pointer to an array of characters.
s − Pointer to an array of characters.
c ... | [
{
"code": null,
"e": 2673,
"s": 2603,
"text": "It assigns a new value to the string, replacing its current contents."
},
{
"code": null,
"e": 2729,
"s": 2673,
"text": "Following is the declaration for std::string::operator="
},
{
"code": null,
"e": 2767,
"s": 2729... |
Introduction to Linear Algebra with NumPy | by Soner Yıldırım | Towards Data Science | Data is collected in many different formats from numbers to images, from categories to sound waves. However, we need the data represented with numbers to be able analyze it on computers. Machine learning and deep learning models are data-hungry. The performance of them is highly dependent on the amount of data. Thus, w... | [
{
"code": null,
"e": 792,
"s": 172,
"text": "Data is collected in many different formats from numbers to images, from categories to sound waves. However, we need the data represented with numbers to be able analyze it on computers. Machine learning and deep learning models are data-hungry. The perfo... |
Console.ReadLine() Method in C# | The Console.ReadLine() method in C# is used to read the next line of characters from the standard input stream.
The syntax is as follows −
public static string ReadLine ();
Let us now see an example to implement the Console.ReadLine() method in C# −
using System;
public class Demo{
public static void Main(){
s... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "The Console.ReadLine() method in C# is used to read the next line of characters from the standard input stream."
},
{
"code": null,
"e": 1201,
"s": 1174,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1235,
... |
Applying Convolutional Neural Network on mnist dataset - GeeksforGeeks | 06 Oct, 2021
CNN is basically a model known to be Convolutional Neural Network and in recent times it has gained a lot of popularity because of its usefulness. CNN uses multilayer perceptrons to do computational works. CNN uses relatively little pre-processing compared to other image classification algorithms. This mea... | [
{
"code": null,
"e": 24305,
"s": 24277,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 24771,
"s": 24305,
"text": "CNN is basically a model known to be Convolutional Neural Network and in recent times it has gained a lot of popularity because of its usefulness. CNN uses multila... |
Longest Subsequence such that difference between adjacent elements is either A or B - GeeksforGeeks | 20 Dec, 2021
Given an array arr of size N, and two integers A and B. The task is to find the length of the longest subsequence with the difference between adjacent elements as either A or B.
Example:
Input : arr[]={ 5, 5, 5, 10, 8, 6, 12, 13 }, A=0, B=1Output : 4Explanation : Maximum length subsequence is {5,5,5,6}
In... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 24583,
"s": 24405,
"text": "Given an array arr of size N, and two integers A and B. The task is to find the length of the longest subsequence with the difference between adjacent elements as ... |
PHP Scope Resolution Operator (::) | In PHP, the double colon :: is defined as Scope Resolution Operator. It used when when we want to access constants, properties and methods defined at class level. When referring to these items outside class definition, name of class is used along with scope resolution operator. This operator is also called Paamayim Nek... | [
{
"code": null,
"e": 1428,
"s": 1062,
"text": "In PHP, the double colon :: is defined as Scope Resolution Operator. It used when when we want to access constants, properties and methods defined at class level. When referring to these items outside class definition, name of class is used along with s... |
Find the row with maximum number of 1s - GeeksforGeeks | 25 Apr, 2022
Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s.
Example:
Input matrix
0 1 1 1
0 0 1 1
1 1 1 1 // this row has maximum 1s
0 0 0 0
Output: 2
A simple method is to do a row wise traversal of the matrix, count the number of 1s in each row and compare the cou... | [
{
"code": null,
"e": 37680,
"s": 37652,
"text": "\n25 Apr, 2022"
},
{
"code": null,
"e": 37777,
"s": 37680,
"text": "Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s. "
},
{
"code": null,
"e": 37788,
"s": 37777,
"t... |
Methods in Java - GeeksforGeeks | 07 Mar, 2022
A method in Java or Java Method is a collection of statements that perform some specific task and return the result to the caller. A Java method can perform some specific task without returning anything. Methods in Java allow us to reuse the code without retyping the code. In Java, every method must be par... | [
{
"code": null,
"e": 30195,
"s": 30167,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 30577,
"s": 30195,
"text": "A method in Java or Java Method is a collection of statements that perform some specific task and return the result to the caller. A Java method can perform some s... |
numpy.cumsum() in Python - GeeksforGeeks | 28 Nov, 2018
numpy.cumsum() function is used when we want to compute the cumulative sum of array elements over a given axis.
Syntax : numpy.cumsum(arr, axis=None, dtype=None, out=None)
Parameters :arr : [array_like] Array containing numbers whose cumulative sum is desired. If arr is not an array, a conversion is attemp... | [
{
"code": null,
"e": 26271,
"s": 26243,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 26383,
"s": 26271,
"text": "numpy.cumsum() function is used when we want to compute the cumulative sum of array elements over a given axis."
},
{
"code": null,
"e": 26443,
"s"... |
Perl | qw Operator - GeeksforGeeks | 07 May, 2019
The qw operator in Perl is used to extract each element of the given string as it is in an array of elements in single-quote ( ‘ ‘ ).This function stands for quote word because it considers each word of the given string as it is quoted like qw(Geeks for Geeks) is equivalent to (‘Geeks’, ‘for’, ‘Geeks’).Thi... | [
{
"code": null,
"e": 25259,
"s": 25231,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 25700,
"s": 25259,
"text": "The qw operator in Perl is used to extract each element of the given string as it is in an array of elements in single-quote ( ‘ ‘ ).This function stands for quote... |
How to select all on focus in input using JQuery? - GeeksforGeeks | 31 Oct, 2019
The select() event is applied to an element using jQuery when the user makes a text selection inside an element or on focus the element. This event is limited to some fields.Syntax:
$("selected element").select();
//Select all Input field on focus
$("input").select();
//Select Input field on focus whose t... | [
{
"code": null,
"e": 26954,
"s": 26926,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 27136,
"s": 26954,
"text": "The select() event is applied to an element using jQuery when the user makes a text selection inside an element or on focus the element. This event is limited to s... |
How to Get Uint32 Type Random Number in Golang? - GeeksforGeeks | 26 Mar, 2020
Go language provides inbuilt support for generating random numbers of the specified type with the help of a math/rand package. This package implements pseudo-random number generators. These random numbers are generated by a source and this source produces a deterministic sequence of values every time when ... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 26124,
"s": 25703,
"text": "Go language provides inbuilt support for generating random numbers of the specified type with the help of a math/rand package. This package implements pseudo-rando... |
How to install Anaconda on Linux? - GeeksforGeeks | 21 Jan, 2020
Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder. Pa... | [
{
"code": null,
"e": 26113,
"s": 26085,
"text": "\n21 Jan, 2020"
},
{
"code": null,
"e": 26494,
"s": 26113,
"text": "Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anacond... |
Check whether a given binary tree is skewed binary tree or not? - GeeksforGeeks | 30 Jun, 2021
Given a Binary Tree check whether it is skewed binary tree or not. A skewed tree is a tree where each node has only one child node or none.Examples:
Input : 5
/
4
\
3
/
2
Output : Yes
Input : 5
/
... | [
{
"code": null,
"e": 26186,
"s": 26158,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 26337,
"s": 26186,
"text": "Given a Binary Tree check whether it is skewed binary tree or not. A skewed tree is a tree where each node has only one child node or none.Examples: "
},
{
... |
Python | sympy.S.GoldenRatio - GeeksforGeeks | 26 Jul, 2019
With the help of sympy.S.GoldenRatio value, We can directly use the value of Golden Ratio constant which is 1.618033989 or we can say that in sympy Golden Ratio constant is a singleton value.
Value of Golden Ratio constant –
Example #1 :In this example we can see that by using singleton value of Golden Rat... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 25729,
"s": 25537,
"text": "With the help of sympy.S.GoldenRatio value, We can directly use the value of Golden Ratio constant which is 1.618033989 or we can say that in sympy Golden Ratio co... |
Sort the given Matrix | Memory Efficient Approach - GeeksforGeeks | 31 May, 2021
Given a matrix of N rows and M columns, the task is to sort the matrix in the strict order that is every row is sorted in increasing order and the first element of every row is greater than the first element of the previous row.
Examples:
Input: M[][] = { {5, 4, 7},
{1, 3, 8},
... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 26296,
"s": 26067,
"text": "Given a matrix of N rows and M columns, the task is to sort the matrix in the strict order that is every row is sorted in increasing order and the first element of... |
How to apply border inside a table ? - GeeksforGeeks | 11 Sep, 2021
There are two ways to apply border inside the table in HTML.
Only using HTML
Using HTML and CSS
Only Using HTML: In this case, we will use rules attribute of table. Rules is the attribute in HTML table which allows user to display only inside borders of the table which can be chosen among only rows, cols ... | [
{
"code": null,
"e": 25956,
"s": 25928,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 26018,
"s": 25956,
"text": "There are two ways to apply border inside the table in HTML. "
},
{
"code": null,
"e": 26034,
"s": 26018,
"text": "Only using HTML"
},
{
... |
How to Create a Spring Boot Project in Spring Initializr and Run it in IntelliJ IDEA? - GeeksforGeeks | 28 Jan, 2022
Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether for security purposes or building large distribution projects. One of the advantages of using Java is that it tries to connect every concept in th... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 25635,
"s": 25225,
"text": "Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether fo... |
Python | Remove trailing/leading special characters from strings list - GeeksforGeeks | 03 Oct, 2019
Sometimes, while working with String lists, we can have a problem in which we need to perform the deletion of extra characters that can be termed as unwanted and occur at end of each string. Let’s discuss a way in which this task can be performed.
Method : Using map() + str.strip()Combination of the above ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 25785,
"s": 25537,
"text": "Sometimes, while working with String lists, we can have a problem in which we need to perform the deletion of extra characters that can be termed as unwanted and o... |
Python | Initialize dictionary with common value - GeeksforGeeks | 26 Aug, 2019
While working with Python, sometimes, we might have a problem in which we require the initialize the static list into a dictionary with a constant value. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using dict() + list comprehension
The combination of above functions can be u... | [
{
"code": null,
"e": 25375,
"s": 25347,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 25593,
"s": 25375,
"text": "While working with Python, sometimes, we might have a problem in which we require the initialize the static list into a dictionary with a constant value. Let’s dis... |
How to wrap tables with div element using jQuery? | To wrap tables with div element, use the wrap() method. You can try to run the following code to wrap tables with div element using jQuery −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "To wrap tables with div element, use the wrap() method. You can try to run the following code to wrap tables with div element using jQuery −"
},
{
"code": null,
"e": 1213,
"s": 1203,
"text": "Live Demo"
},
{
"code": null,
... |
Fetch date record that equals today in MySQL | For this, compare the date records with the current date using the CURDATE() method. Let us first create a table −
mysql> create table DemoTable
(
RegistrationLastDate datetime
);
Query OK, 0 rows affected (0.61 sec)
Let’s say the current date is −
2019-09-03
Insert some records in the table using insert command −
m... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "For this, compare the date records with the current date using the CURDATE() method. Let us first create a table −"
},
{
"code": null,
"e": 1282,
"s": 1177,
"text": "mysql> create table DemoTable\n(\n RegistrationLastDate datetime\... |
Program to group a set of points into k different groups in Python | Suppose we have a list of points and a number k. The points are in the form (x, y) representing Cartesian coordinates. We can group any two point p1 and p2 if the Euclidean distance between them is <= k, we have to find total number of disjoint groups.
So, if the input is like points = [[2, 2],[3, 3],[4, 4],[11, 11],[1... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "Suppose we have a list of points and a number k. The points are in the form (x, y) representing Cartesian coordinates. We can group any two point p1 and p2 if the Euclidean distance between them is <= k, we have to find total number of disjoint groups."... |
PHP | DOMXPath query() Function - GeeksforGeeks | 13 Mar, 2020
The DOMXPath::query() function is an inbuilt function in PHP which is used to evaluate the given XPath expression.
Syntax:
DOMNodeList DOMXPath::query( string $expression,
DOMNode $contextnode, bool $registerNodeNS )
Parameters: This function accept three parameters as mentioned above and described... | [
{
"code": null,
"e": 24487,
"s": 24459,
"text": "\n13 Mar, 2020"
},
{
"code": null,
"e": 24602,
"s": 24487,
"text": "The DOMXPath::query() function is an inbuilt function in PHP which is used to evaluate the given XPath expression."
},
{
"code": null,
"e": 24610,
... |
How to track the position of the face in OpenCV using C++? | When we want to track the position of the face, it is better to enclose the face with ellipse because an ellipse has a center. This center is also the center point of the detected face. As result, tracking the position of detected face becomes more accurate.
The following program tracks the center of detected face and ... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "When we want to track the position of the face, it is better to enclose the face with ellipse because an ellipse has a center. This center is also the center point of the detected face. As result, tracking the position of detected face becomes more accu... |
Change Data Type for one or more columns in Pandas Dataframe | In this tutorial, we are going to learn about the conversion of one or more columns data type into another data type. We are going to use the method DataFrame.astype() method.
We have to pass any data type from Python, Pandas, or Numpy to change the column elements data types. We can also give a dictionary of selected ... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "In this tutorial, we are going to learn about the conversion of one or more columns data type into another data type. We are going to use the method DataFrame.astype() method."
},
{
"code": null,
"e": 1473,
"s": 1238,
"text": "We hav... |
How do I create a transparent Activity in an Android App? | This example demonstrates how to create a transparent Activity 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/values/styles.xml.
<resources>
<!-- Base application theme. -->
<styl... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "This example demonstrates how to create a transparent Activity in android."
},
{
"code": null,
"e": 1267,
"s": 1137,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to... |
Instruction type DCX rp in 8085 Microprocessor | In 8085 Instruction set, DCX is a mnemonic that stands for “DeCrementeXtended register” and rp stands for register pair. And it can be any one of the following register pairs −
rp = BC, DE, or HL
This instruction will be used to subtract 1 from the present content of the rp. And thus the result of the decremented cont... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "In 8085 Instruction set, DCX is a mnemonic that stands for “DeCrementeXtended register” and rp stands for register pair. And it can be any one of the following register pairs −"
},
{
"code": null,
"e": 1259,
"s": 1239,
"text": "rp = ... |
Finding IP address of a URL in Java - GeeksforGeeks | 09 Nov, 2021
Prerequisite: InetAddressgetByName() : Returns the InetAddress of the given host. If the host is a literal IP address, then only its validity is checked. Fetches public IP Address of the host specified. It takes the host as an argument and returns the corresponding IP address.
Examples:
Input : www.google... | [
{
"code": null,
"e": 24061,
"s": 24033,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 24339,
"s": 24061,
"text": "Prerequisite: InetAddressgetByName() : Returns the InetAddress of the given host. If the host is a literal IP address, then only its validity is checked. Fetches p... |
Stop using Pandas and start using Spark with Scala | by Chloe Connor | Towards Data Science | Moving from Pandas to Spark with Scala isn’t as challenging as you might think, and as a result your code will run faster and you’ll probably end up writing better code.
In my experience as a Data Engineer, I’ve found building data pipelines in Pandas often requires us to regularly increase resources to keep up with th... | [
{
"code": null,
"e": 341,
"s": 171,
"text": "Moving from Pandas to Spark with Scala isn’t as challenging as you might think, and as a result your code will run faster and you’ll probably end up writing better code."
},
{
"code": null,
"e": 712,
"s": 341,
"text": "In my experience... |
Find subarray with given sum with negatives allowed in constant space - GeeksforGeeks | 04 Feb, 2022
Given an unsorted array of integers, find a subarray that adds to a given number. If there is more than one subarray with the sum of the given number, print any of them.
Examples:
Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33
Output: Sum found between indexes 2 and 4
Input: arr[] = {10, 2, -2, -20, 10}, s... | [
{
"code": null,
"e": 25278,
"s": 25250,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 25448,
"s": 25278,
"text": "Given an unsorted array of integers, find a subarray that adds to a given number. If there is more than one subarray with the sum of the given number, print any of... |
C# | Array.AsReadOnly(T[]) Method - GeeksforGeeks | 18 Dec, 2019
This method is used to return a read-only wrapper for the specified array.
Syntax:
public static System.Collections.ObjectModel.
ReadOnlyCollection<T> AsReadOnly<T> (T[] array);
Here, T is the type of element of the array.
Return Value: This method return the a read-only ReadOnlyCollection<T> wrapper .
Exc... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n18 Dec, 2019"
},
{
"code": null,
"e": 23986,
"s": 23911,
"text": "This method is used to return a read-only wrapper for the specified array."
},
{
"code": null,
"e": 23994,
"s": 23986,
"text": "Syntax:"
},
... |
PyQt5 - QList Widget | QListWidget class is an item-based interface to add or remove items from a list. Each item in the list is a QListWidgetItem object. ListWidget can be set to be multiselectable.
Following are the frequently used methods of QListWidget class −
addItem()
Adds QListWidgetItem object or string in the list
addItems()
Adds ea... | [
{
"code": null,
"e": 2140,
"s": 1963,
"text": "QListWidget class is an item-based interface to add or remove items from a list. Each item in the list is a QListWidgetItem object. ListWidget can be set to be multiselectable."
},
{
"code": null,
"e": 2205,
"s": 2140,
"text": "Follo... |
Deploy FastAPI on Azure with Github Actions | by Nathan Cheng | Towards Data Science | Github Actions is a new workflow automation tool for building, testing, and deploying your code directly from Github.
If you’re already using Github for your code repository, there’s no need to integrate a third-party tool to automate common developer workflows.
Simply place a Github Actions .yml file in your repositor... | [
{
"code": null,
"e": 289,
"s": 171,
"text": "Github Actions is a new workflow automation tool for building, testing, and deploying your code directly from Github."
},
{
"code": null,
"e": 434,
"s": 289,
"text": "If you’re already using Github for your code repository, there’s no ... |
Number Divisibility - GeeksforGeeks | 13 May, 2016
All 3 digit numbers divisible by 3 are :
102, 105, 108, 111, ..., 999.
This is an A.P. with first element 'a' as
102 and difference 'd' as 3.
Let it contains n terms. Then,
102 + (n - 1) x 3 = 999
102 + 3n-3 = 999
3n = 900 or n = 300
Sum of AP = n/2 [2*a + (n-1)*d]
Required sum = 300/2[2*102 + 299*3]... | [
{
"code": null,
"e": 28855,
"s": 28827,
"text": "\n13 May, 2016"
},
{
"code": null,
"e": 29174,
"s": 28855,
"text": "All 3 digit numbers divisible by 3 are :\n102, 105, 108, 111, ..., 999.\n\nThis is an A.P. with first element 'a' as \n102 and difference 'd' as 3.\n\nLet it cont... |
How to sort collection of MongoDB Database in descending order using Node.js ? - GeeksforGeeks | 12 Jan, 2021
MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based on the table-like relational database structure but provides an altogether different mechanism for storage and retrieval of data. This format of... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n12 Jan, 2021"
},
{
"code": null,
"e": 26137,
"s": 25779,
"text": "MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based ... |
exec() in Python - GeeksforGeeks | 11 Jun, 2021
exec() function is used for the dynamic execution of Python program which can either be a string or object code. If it is a string, the string is parsed as a suite of Python statements which is then executed unless a syntax error occurs and if it is an object code, it is simply executed. We must be careful... | [
{
"code": null,
"e": 26461,
"s": 26433,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26961,
"s": 26461,
"text": "exec() function is used for the dynamic execution of Python program which can either be a string or object code. If it is a string, the string is parsed as a suite... |
Count possible moves in the given direction in a grid - GeeksforGeeks | 11 Jun, 2021
Given a grid N x M size and initial position (X, Y) and a series of K moves. Each move contains 2 integers Dx and Dy. A single move consists of the following operation that can also be performed as many times as possible:
X = X + Dx and Y = Y + Dy.
The task is to count the number of moves performed. Note... | [
{
"code": null,
"e": 26333,
"s": 26305,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26556,
"s": 26333,
"text": "Given a grid N x M size and initial position (X, Y) and a series of K moves. Each move contains 2 integers Dx and Dy. A single move consists of the following opera... |
R - DataFrame Manipulation - GeeksforGeeks | 21 Apr, 2020
Data Frame is a two-dimensional structured entity consisting of rows and columns. It consists equal length vectors as rows. The data is stored in cells which are accessed by specifying the corresponding [row, col] set of values of the data frame. Manipulation of data frames involve modifying, extracting an... | [
{
"code": null,
"e": 25867,
"s": 25839,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 26333,
"s": 25867,
"text": "Data Frame is a two-dimensional structured entity consisting of rows and columns. It consists equal length vectors as rows. The data is stored in cells which are a... |
Lambda Expressions in Java - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Lambda expression is a significant new featur... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
How to get length of a list of lists in Python? | You can employ a nested loop to count number of elements in each sublist of a list
>>> a=[[1, 2, 3], [4, 5, 6]]
>>> c=0
>>> for x in a:
for y in x:
c=c+1
>>> c
6 | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "You can employ a nested loop to count number of elements in each sublist of a list"
},
{
"code": null,
"e": 1238,
"s": 1145,
"text": ">>> a=[[1, 2, 3], [4, 5, 6]]\n>>> c=0\n>>> for x in a:\n for y in x:\n c=c+1\n\n\n>>> c\n... |
Matplotlib - Subplot2grid() Function | This function gives more flexibility in creating an axes object at a specific location of the grid. It also allows the axes object to be spanned across multiple rows or columns.
Plt.subplot2grid(shape, location, rowspan, colspan)
In the following example, a 3X3 grid of the figure object is filled with axes objects of v... | [
{
"code": null,
"e": 2694,
"s": 2516,
"text": "This function gives more flexibility in creating an axes object at a specific location of the grid. It also allows the axes object to be spanned across multiple rows or columns."
},
{
"code": null,
"e": 2746,
"s": 2694,
"text": "Plt.... |
Generate Color Vectors of desired Length in R Programming - rainbow() Function - GeeksforGeeks | 30 Jun, 2020
rainbow() function in R Language is a built in color palettes which can be used to quickly generate color vectors of desired length taken as the parameter and returns the hexadecimal code of the colours available. This hexadecimal code is of eight digits. This is because the last two digits specify the lev... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 25221,
"s": 24851,
"text": "rainbow() function in R Language is a built in color palettes which can be used to quickly generate color vectors of desired length taken as the parameter and retu... |
XML-RPC - Data Model | The XML-RPC specification defines six basic data types and two compound data types that represent combinations of types.
<int>27</int>
<i4>27</i4>
<double>27.31415</double>
<double>-1.1465</double>
<boolean>1</boolean>
<boolean>0</boolean>
<string>Hello</string>
<string>bonkers! @</string>
<dateTime.iso8601>
20021125T0... | [
{
"code": null,
"e": 1805,
"s": 1684,
"text": "The XML-RPC specification defines six basic data types and two compound data types that represent combinations of types."
},
{
"code": null,
"e": 1819,
"s": 1805,
"text": "<int>27</int>"
},
{
"code": null,
"e": 1831,
... |
Five Excel Functions for Faster Data Analysis | by Suraj Gurav | Towards Data Science | “Think about a world without Excel. That’s just impossible for me.” — Satya Nadella, CEO, Microsoft
Microsoft Excel, the global spreadsheet tool first released in 1985 for analysis of data in tabular form. It made the data and number analysis accessible to everyone. It does not only boosted ⚡️ productivity but also tri... | [
{
"code": null,
"e": 272,
"s": 172,
"text": "“Think about a world without Excel. That’s just impossible for me.” — Satya Nadella, CEO, Microsoft"
},
{
"code": null,
"e": 537,
"s": 272,
"text": "Microsoft Excel, the global spreadsheet tool first released in 1985 for analysis of da... |
C Program to find maximum occurrence of character in a string | An array of characters is called a string.
Following is the declaration declaring an array is as follows −
char stringname [size];
For example: char string[50]; string of length 50 characters
Using single character constant −
char string[10] = { ‘H’, ‘e’, ‘l’, ‘l’, ‘o’ ,‘\0’}
Using string constants −
char string[10] = ... | [
{
"code": null,
"e": 1105,
"s": 1062,
"text": "An array of characters is called a string."
},
{
"code": null,
"e": 1169,
"s": 1105,
"text": "Following is the declaration declaring an array is as follows −"
},
{
"code": null,
"e": 1193,
"s": 1169,
"text": "char... |
When should we write our own assignment operator in C++? | Here we will see when we need to create own assignment operator in C++. If a class do not have any pointers, then we do not need to create assignment operator and copy constructor. C++ compiler creates copy constructor and assignment operator for each class. If the operators are not sufficient, then we have to create o... | [
{
"code": null,
"e": 1410,
"s": 1062,
"text": "Here we will see when we need to create own assignment operator in C++. If a class do not have any pointers, then we do not need to create assignment operator and copy constructor. C++ compiler creates copy constructor and assignment operator for each c... |
Handle JCheckBox Events with an ItemListener in Java | Here, we have used ItemListener to handle JCheckBox events i.e. whenever any of the CheckBox is selected.
For example; When any of the sports like Football CheckBox is checked, event is fired and a message is visible in the botton.
The following is an example to handle JCheckBox events with an ItemListener:
import java... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "Here, we have used ItemListener to handle JCheckBox events i.e. whenever any of the CheckBox is selected."
},
{
"code": null,
"e": 1294,
"s": 1168,
"text": "For example; When any of the sports like Football CheckBox is checked, event... |
Download file from URL using PHP - GeeksforGeeks | 17 Jan, 2022
In this article, we will see how to download & save the file from the URL in PHP, & will also understand the different ways to implement it through the examples. There are many approaches to download a file from a URL, some of them are discussed below:
Using file_get_contents() function: The file_get_conte... | [
{
"code": null,
"e": 24766,
"s": 24738,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 25019,
"s": 24766,
"text": "In this article, we will see how to download & save the file from the URL in PHP, & will also understand the different ways to implement it through the examples. T... |
Supercharge Your Machine Learning Experiments with PyCaret and Gradio | by Moez Ali | Towards Data Science | This tutorial is a step-by-step, beginner-friendly explanation of how you can integrate PyCaret and Gradio, the two powerful open-source libraries in Python, and supercharge your machine learning experimentation within minutes.
This tutorial is a “hello world” example, I have used Iris Dataset from UCI, which is a mult... | [
{
"code": null,
"e": 275,
"s": 47,
"text": "This tutorial is a step-by-step, beginner-friendly explanation of how you can integrate PyCaret and Gradio, the two powerful open-source libraries in Python, and supercharge your machine learning experimentation within minutes."
},
{
"code": null,
... |
Convert a given Binary Tree to Doubly Linked List | Set 2 - GeeksforGeeks | 23 Feb, 2022
Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be the same as in Inorder for the given Binary Tree. The first node of Inorder traversal (leftmo... | [
{
"code": null,
"e": 26221,
"s": 26193,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 26579,
"s": 26221,
"text": "Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous and next pointers respectively i... |
Segregate even and odd nodes in a Link List | Practice | GeeksforGeeks | Given a link list of size N, modify the list such that all the even numbers appear before all the odd numbers in the modified list. The order of appearance of numbers within each segregation should be same as that in the original list.
NOTE: Don't create a new linked list, instead rearrange the provided one.
Example 1... | [
{
"code": null,
"e": 462,
"s": 226,
"text": "Given a link list of size N, modify the list such that all the even numbers appear before all the odd numbers in the modified list. The order of appearance of numbers within each segregation should be same as that in the original list."
},
{
"code... |
How to Create Modules in Node.js ? - GeeksforGeeks | 11 May, 2020
Modules are the collection of JavaScript codes in a separate logical file that can be used in external applications on the basis of their related functionality. Modules are popular as they are easy to use and are reusable.
To create a module in Node.js, you will need the exports keyword. This keyword tells... | [
{
"code": null,
"e": 26229,
"s": 26201,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 26452,
"s": 26229,
"text": "Modules are the collection of JavaScript codes in a separate logical file that can be used in external applications on the basis of their related functionality. Mo... |
ASP.NET Core - User Registration | In this chapter, we will discuss the User registration. We now have a working database, and it is time to start adding some of the features to the application. We have also configured our application and we have a working database schema. Let us now go to the application home page.
Open the developer tools by pressing ... | [
{
"code": null,
"e": 2744,
"s": 2461,
"text": "In this chapter, we will discuss the User registration. We now have a working database, and it is time to start adding some of the features to the application. We have also configured our application and we have a working database schema. Let us now go ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.