title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
ML | BIRCH Clustering | 20 Jun, 2022
Clustering algorithms like K-means clustering do not perform clustering very efficiently and it is difficult to process large datasets with a limited amount of resources (like memory or a slower CPU). So, regular clustering algorithms do not scale well in terms of running time and quality as the size of th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 2100,
"s": 28,
"text": "Clustering algorithms like K-means clustering do not perform clustering very efficiently and it is difficult to process large datasets with a limited amount of resources (lik... |
Python – Pearson Correlation Test Between Two Variables | 15 Sep, 2021
What is correlation test? The strength of the association between two variables is known as correlation test. For instance, if we are interested to know whether there is a relationship between the heights of fathers and sons, a correlation coefficient can be calculated to answer this question.For know more... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 408,
"s": 28,
"text": "What is correlation test? The strength of the association between two variables is known as correlation test. For instance, if we are interested to know whether there is a rel... |
How to Print all Keys of the LinkedHashMap in Java? | 17 Dec, 2020
LinkedHashMap is a predefined class in Java that is similar to HashMap, contains a key and its respective value. Unlike HashMap, In LinkedHashMap insertion order is preserved. The task is to print all the Keys present in our LinkedHashMap in java. We have to iterate through each Key in our LinkedHashMap an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 347,
"s": 28,
"text": "LinkedHashMap is a predefined class in Java that is similar to HashMap, contains a key and its respective value. Unlike HashMap, In LinkedHashMap insertion order is preserved.... |
Interact with files in Python | 12 Dec, 2019
Python too supports file handling and allows users to handle files i.e., to read, write, create, delete and move files, along with many other file handling options, to operate on files. The concept of file handling has stretched over various other languages, but the implementation is either complicated or ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2019"
},
{
"code": null,
"e": 422,
"s": 28,
"text": "Python too supports file handling and allows users to handle files i.e., to read, write, create, delete and move files, along with many other file handling options, to operate... |
SQL | Date Functions (Set-1) | 20 Jul, 2018
In SQL, dates are complicated for newbies, since while working with a database, the format of the date in the table must be matched with the input date in order to insert. In various scenarios instead of date, datetime (time is also involved with date) is used.
Some of the important date functions have bee... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jul, 2018"
},
{
"code": null,
"e": 315,
"s": 53,
"text": "In SQL, dates are complicated for newbies, since while working with a database, the format of the date in the table must be matched with the input date in order to insert. In... |
Python | math.isqrt() method | 04 Dec, 2020
Math module in Python contains a number of mathematical operations, which can be performed with ease using the module. math.isqrt() method in Python is used to get the integer square root of the given non-negative integer value n. This method returns the floor value of the exact square root of n or equival... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "Math module in Python contains a number of mathematical operations, which can be performed with ease using the module. math.isqrt() method in Python is used to get the integer... |
Lex program to find the length of the longest word | 30 Apr, 2019
Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language.
The commands for executing the lex program are:
lex abc.l (abc is the file name)
cc lex.yy.c -efl
./a.out
Let’... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 249,
"s": 53,
"text": "Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C ... |
exit command in Linux with Examples | 15 May, 2019
exit command in linux is used to exit the shell where it is currently running. It takes one more parameter as [N] and exits the shell with a return of status N. If n is not provided, then it simply returns the status of last command that is executed.
Syntax:
exit [n]
Options for exit command –
exit: Exit W... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 279,
"s": 28,
"text": "exit command in linux is used to exit the shell where it is currently running. It takes one more parameter as [N] and exits the shell with a return of status N. If n is not pr... |
Minimum flips or swapping of adjacent characters required to make a string equal to another | 18 Jun, 2021
Given two binary strings A and B of length N, the task is to convert the string A to B by either flipping any character of A or swapping adjacent characters of A minimum number of times. If it is not possible to make both the strings equal, print -1.
Examples:
Input: A = “10010010”, B = “00001000” Output:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2021"
},
{
"code": null,
"e": 279,
"s": 28,
"text": "Given two binary strings A and B of length N, the task is to convert the string A to B by either flipping any character of A or swapping adjacent characters of A minimum numbe... |
enchant.Dict() in Python | 03 Jun, 2020
Enchant is a module in python which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a word exists in dictionary or not.
enchant.Dict() is an inbuilt method of enchant module. It is used to create a Dict object, which i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 237,
"s": 28,
"text": "Enchant is a module in python which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a ... |
Program to find area of a Trapezoid | 22 Jun, 2022
Definition of Trapezoid : A Trapezoid is a convex quadrilateral with at least one pair of parallel sides. The parallel sides are called the bases of the trapezoid and the other two sides which are not parallel are referred to as the legs. There can also be two pairs of bases.
In the above figure CD || AB... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "Definition of Trapezoid : A Trapezoid is a convex quadrilateral with at least one pair of parallel sides. The parallel sides are called the bases of the trapezoid and the othe... |
Raja Software Labs Interview Experience | 06 Nov, 2020
Raja Software Labs visited our college for campus hiring. The selection process included aptitude tests, coding tests, and 3 technical interviews.
Aptitude Test: Test duration of 30 min, It consists of 20 MCQ questions. No negative marking test was taken on google forms.
Programming Test: Test duration of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Nov, 2020"
},
{
"code": null,
"e": 199,
"s": 52,
"text": "Raja Software Labs visited our college for campus hiring. The selection process included aptitude tests, coding tests, and 3 technical interviews."
},
{
"code": null,... |
How to display multiple images in one figure correctly in matplotlib? | To display multiple images in one figure, we can follow the steps given below −
Initialize the number of rows and cols. nrows*ncols subplot will be created in the current figure. nrows = 2 and ncols = 2, i.e., 2*2 = 4 subplots can be created.
Initialize the number of rows and cols. nrows*ncols subplot will be created i... | [
{
"code": null,
"e": 1267,
"s": 1187,
"text": "To display multiple images in one figure, we can follow the steps given below −"
},
{
"code": null,
"e": 1430,
"s": 1267,
"text": "Initialize the number of rows and cols. nrows*ncols subplot will be created in the current figure. nro... |
How to Concatenate image using Pillow in Python ? | 07 Apr, 2021
Prerequisites: Python Pillow
Concatenate image means joining of two images. We can merge any image whether it has different pixels, different image formats namely, ‘jpeg’, ‘png’, ‘gif’, ‘tiff’, etc. In python, we can join two images using the Python image library also known as the pillow library. In this a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 81,
"s": 52,
"text": "Prerequisites: Python Pillow"
},
{
"code": null,
"e": 420,
"s": 81,
"text": "Concatenate image means joining of two images. We can merge any image whether ... |
How to run a given array of promises in series in JavaScript ? | 23 Apr, 2021
Given an array of Promises, we have to run that in a series. To do this task, we can use then(), to run the next promise, after completion of a promise.
Approach: The then() method returns a Promise, which helps us to chain promises/methods. The Promise.resolve() method executes the first callback, and whe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 181,
"s": 28,
"text": "Given an array of Promises, we have to run that in a series. To do this task, we can use then(), to run the next promise, after completion of a promise."
},
{
"code": ... |
How to find all the values of particular key of MongoDB Database using Node.js ? | 12 Feb, 2021
MongoDB module: This module of Node.js is used for connecting the MongoDB database as well as used for manipulating the collections and databases in MongoDB. The mongodb.connect() is the main method that is used for connecting to the MongoDB database which is running on a particular server on your machine ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Feb, 2021"
},
{
"code": null,
"e": 552,
"s": 28,
"text": "MongoDB module: This module of Node.js is used for connecting the MongoDB database as well as used for manipulating the collections and databases in MongoDB. The mongodb.conne... |
Difference between Recursive Predictive Descent Parser and Non-Recursive Predictive Descent Parser | 14 Jul, 2021
Prerequisite – Recursive Descent Parser
1. Recursive Predictive Descent Parser : Recursive Descent Parser is a top-down method of syntax analysis in which a set of recursive procedures is used to process input. One procedure is associated with each non-terminal of a grammar. Here we consider a simple form... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 95,
"s": 54,
"text": "Prerequisite – Recursive Descent Parser "
},
{
"code": null,
"e": 884,
"s": 95,
"text": "1. Recursive Predictive Descent Parser : Recursive Descent Parser ... |
Get topmost N records within each group of a Pandas DataFrame | 28 Jul, 2020
Firstly, the pandas dataframe stores data in the form of a table. In some situations we need to retrieve data from dataframe according to some conditions. Such as if we want to get top N records of each group of the dataframe. Here we will use Groupby() function of pandas to group the columns. So we can do... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "Firstly, the pandas dataframe stores data in the form of a table. In some situations we need to retrieve data from dataframe according to some conditions. Such as if we want t... |
Merge Sort for Linked Lists in JavaScript | 23 Jun, 2022
Prerequisite: Merge Sort for Linked Lists Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible. In this post, Merge sort for linked li... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 405,
"s": 52,
"text": "Prerequisite: Merge Sort for Linked Lists Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algori... |
Mathworks EDG Program Interview Experience | On-Campus | 18 Aug, 2021
Mathworks conducted an online test on 13th August, Friday in our college, out of which around 25 people were shortlisted.
Coding Test: The online coding test (90 minutes) had MCQs and 2 coding questions. We had the liberty to choose any 2 languages out of C, C++, Java, Python.
The first coding question was... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 176,
"s": 54,
"text": "Mathworks conducted an online test on 13th August, Friday in our college, out of which around 25 people were shortlisted."
},
{
"code": null,
"e": 332,
"s": 1... |
How can I get the list of files in a directory using C or C++? | Let us consider the following C++ sample code to get the list of files in a directory.
Begin
Declare a poniter dr to the DIR type.
Declare another pointer en of the dirent structure.
Call opendir() function to open all file in present directory.
Initialize dr pointer as dr = opendir(".").
If(dr)
wh... | [
{
"code": null,
"e": 1274,
"s": 1187,
"text": "Let us consider the following C++ sample code to get the list of files in a directory."
},
{
"code": null,
"e": 1651,
"s": 1274,
"text": "Begin\n Declare a poniter dr to the DIR type.\n Declare another pointer en of the dirent st... |
ReactJS - Creating a React Application | As we learned earlier, React library can be used in both simple and complex application. Simple application normally includes the React library in its script section. In complex application, developers have to split the code into multiple files and organize the code into a standard structure. Here, React toolchain prov... | [
{
"code": null,
"e": 2627,
"s": 2167,
"text": "As we learned earlier, React library can be used in both simple and complex application. Simple application normally includes the React library in its script section. In complex application, developers have to split the code into multiple files and orga... |
PostgreSQL - LIMIT clause - GeeksforGeeks | 28 Aug, 2020
The PostgreSQL LIMIT clause is used to get a subset of rows generated by a query. It is an optional clause of the SELECT statement.
Syntax: SELECT * FROM table_name LIMIT n;
Now let’s analyze the syntax above:
The above syntax returns “n” no. of query results.
If “n” is skipped or equal to NULL it returns ... | [
{
"code": null,
"e": 24060,
"s": 24032,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 24192,
"s": 24060,
"text": "The PostgreSQL LIMIT clause is used to get a subset of rows generated by a query. It is an optional clause of the SELECT statement."
},
{
"code": null,
... |
C++ Program to check if a given String is Palindrome or not - GeeksforGeeks | 21 Jul, 2021
Given a string S consisting of N characters of the English alphabet, the task is to check if the given string is a palindrome. If the given string is a palindrome, then print “Yes“. Otherwise, print “No“.
Note: A string is said to be palindrome if the reverse of the string is the same as the string.
Examp... | [
{
"code": null,
"e": 25788,
"s": 25760,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 25993,
"s": 25788,
"text": "Given a string S consisting of N characters of the English alphabet, the task is to check if the given string is a palindrome. If the given string is a palindrome,... |
Order of Constructor/ Destructor Call in C++ | 19 Apr, 2022
Prerequisite: Constructors Whenever we create an object of a class, the default constructor of that class is invoked automatically to initialize the members of the class.
If we inherit a class from another class and create an object of the derived class, it is clear that the default constructor of the der... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "Prerequisite: Constructors Whenever we create an object of a class, the default constructor of that class is invoked automatically to initialize the members of the class. "
... |
Drop shadow for PNG image using CSS | 22 Apr, 2019
There is a basic way to add shadow effect on images but that effect will behave like the image is square, so there is another way to do the shadow which is basically applied on PNG images. The normal shadow effect will always put a square image shadow for the image which can be squared or cannot be squared... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 480,
"s": 28,
"text": "There is a basic way to add shadow effect on images but that effect will behave like the image is square, so there is another way to do the shadow which is basically applied o... |
EnvironmentError Exception in Python | 21 Aug, 2020
EnvironmentError is the base class for errors that come from outside of Python (the operating system, file system, etc.). It is the parent class for IOError and OSError exceptions.
exception IOError – It is raised when an I/O operation (when a method of a file object ) fails. e.g “File not found” or “Disk... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Aug, 2020"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "EnvironmentError is the base class for errors that come from outside of Python (the operating system, file system, etc.). It is the parent class for IOError and OSError except... |
Convert list to dataframe with specific column names in R | 12 Dec, 2021
A list contains different types of objects as their components. The components may belong to different data types or different dimensions. Vector can be useful components of a list and can be easily mapped as the rows or columns of a dataframe. Each column in the dataframe is referenced using a unique name... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 545,
"s": 28,
"text": "A list contains different types of objects as their components. The components may belong to different data types or different dimensions. Vector can be useful components of a... |
EasyMock - createMock | So far, we've used annotations to create mocks. EasyMock provides various methods to create mock objects. EasyMock.createMock() creates mocks without bothering about the order of method calls that the mock is going to make in due course of its action.
calcService = EasyMock.createMock(CalculatorService.class);
Step 1:... | [
{
"code": null,
"e": 2295,
"s": 2043,
"text": "So far, we've used annotations to create mocks. EasyMock provides various methods to create mock objects. EasyMock.createMock() creates mocks without bothering about the order of method calls that the mock is going to make in due course of its action."
... |
Ways to increment Iterator from inside the For loop in Python | 12 Feb, 2021
For loops, in general, are used for sequential traversal. It falls under the category of definite iteration. Definite iterations mean the number of repetitions is specified explicitly in advance. But have you ever wondered, what happens, if you try to increment the value of the iterator from inside the for... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Feb, 2021"
},
{
"code": null,
"e": 422,
"s": 53,
"text": "For loops, in general, are used for sequential traversal. It falls under the category of definite iteration. Definite iterations mean the number of repetitions is specified e... |
How to implement stack using priority queue or heap? | 08 Feb, 2018
How to Implement stack using a priority queue(using min heap)?.
Asked In: Microsoft, Adobe.
Solution:
In priority queue, we assign priority to the elements that are being pushed. A stack requires elements to be processed in Last in First Out manner. The idea is to associate a count that determines when it ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Feb, 2018"
},
{
"code": null,
"e": 118,
"s": 54,
"text": "How to Implement stack using a priority queue(using min heap)?."
},
{
"code": null,
"e": 146,
"s": 118,
"text": "Asked In: Microsoft, Adobe."
},
{
... |
Maximum number of Unique integers in Sub-Array of given size | 26 Oct, 2021
Given an array of N integers and a number M. The task is to find out the maximum number of unique integers among all possible contiguous subarrays of size M.
Examples:
Input : arr[] = {5, 3, 5, 2, 3, 2}, M = 3 Output : 3 Explanation: In the sample test case, there are 4 subarrays of size 3. s1 = (5, 3, 5)... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 212,
"s": 54,
"text": "Given an array of N integers and a number M. The task is to find out the maximum number of unique integers among all possible contiguous subarrays of size M."
},
{
"c... |
Externalizable interface in Java | 11 Jan, 2022
Externalization serves the purpose of custom Serialization, where we can decide what to store in stream.Externalizable interface present in java.io, is used for Externalization which extends Serializable interface. It consist of two methods which we have to override to write/read object into/from stream wh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 370,
"s": 52,
"text": "Externalization serves the purpose of custom Serialization, where we can decide what to store in stream.Externalizable interface present in java.io, is used for Externalizati... |
How to select the Date Picker In Selenium WebDriver? | We can select the date picker in Selenium. It is slightly difficult to handle calendar controls as the day, month and year selection can be represented via different UI.
Sometimes they are represented by the dropdown or by forward and backward controls. Let us select the date picker as shown below.
From Date −
To Date ... | [
{
"code": null,
"e": 1357,
"s": 1187,
"text": "We can select the date picker in Selenium. It is slightly difficult to handle calendar controls as the day, month and year selection can be represented via different UI."
},
{
"code": null,
"e": 1487,
"s": 1357,
"text": "Sometimes th... |
Compute the minimum or maximum of two integers without branching | 12 Jun, 2022
On some rare machines where branching is expensive, the below obvious approach to find minimum can be slow as it uses branching.
C++
C
Java
Python3
C#
Javascript
/* The obvious approach to find minimum (involves branching) */int min(int x, int y){ return (x < y) ? x : y} //This code is contributed by Shub... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 181,
"s": 52,
"text": "On some rare machines where branching is expensive, the below obvious approach to find minimum can be slow as it uses branching."
},
{
"code": null,
"e": 185,
... |
Text Split Effect using CSS | 18 Feb, 2022
In this article, we will see how we can create a text split effect using CSS. HTML code is used to create the basic structure of the sections and CSS code is used to set the style.
Approach:
Create an HTML div element with the class “container”.
Inside the “container”, create an HTML div with class “box”... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "In this article, we will see how we can create a text split effect using CSS. HTML code is used to create the basic structure of the sections and CSS code is used to set the ... |
Button in Android | 17 Aug, 2021
In Android applications, a Button is a user interface that is used to perform some action when clicked or tapped. It is a very common widget in Android and developers often use it. This article demonstrates how to create a button in Android Studio.
XML Attributes
Description
In this example step by step de... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Aug, 2021"
},
{
"code": null,
"e": 303,
"s": 54,
"text": "In Android applications, a Button is a user interface that is used to perform some action when clicked or tapped. It is a very common widget in Android and developers often u... |
Python: Iterating With Python Lambda | 19 Dec, 2021
In Python, the lambda function is an anonymous function. This one expression is evaluated and returned. Thus, We can use lambda functions as a function object. In this article, we will learn how to iterate with lambda in python.
Syntax:
lambda variable : expression
Where,
variable is used in the expression... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 282,
"s": 53,
"text": "In Python, the lambda function is an anonymous function. This one expression is evaluated and returned. Thus, We can use lambda functions as a function object. In this articl... |
Scala Map transform() method with example | 13 Aug, 2019
The transform() method is utilized to transform the elements of the map into a mutable map.
Method Definition: def transform(f: (K, V) => V): Map.this.type
Return Type: It transforms all the elements of the map and returns them into a mutable map.
Example #1:
// Scala program of transform()// method // Cr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 120,
"s": 28,
"text": "The transform() method is utilized to transform the elements of the map into a mutable map."
},
{
"code": null,
"e": 184,
"s": 120,
"text": "Method Definit... |
How to implement HorizontalScrollView like Gallery in Android? | Before getting into an example, we should know what is Horizontal Scroll View. Horizontal Scrollview provides by android.widget.HorizontalScrollView class. It is used to scroll child views in a horizontal direction.
This example demonstrates how to use horizontal Scroll view.
Step 1 − Create a new project in Android St... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "Before getting into an example, we should know what is Horizontal Scroll View. Horizontal Scrollview provides by android.widget.HorizontalScrollView class. It is used to scroll child views in a horizontal direction."
},
{
"code": null,
"e": ... |
2 Easy Ways to Get Tables From a Website with Pandas | by Byron Dolon | Towards Data Science | The pandas library is well known for its easy-to-use data analysis capabilities. It’s equipped with advanced indexing, DataFrame joining and data aggregation features. Pandas also has a comprehensive I/O API that you can use to input data from various sources and output data to various formats.
There are many occasions... | [
{
"code": null,
"e": 468,
"s": 172,
"text": "The pandas library is well known for its easy-to-use data analysis capabilities. It’s equipped with advanced indexing, DataFrame joining and data aggregation features. Pandas also has a comprehensive I/O API that you can use to input data from various sou... |
Python Program for n-th Fibonacci number | In this article, we will compute the nth Fibonacci number.
A Fibonacci number is defined by the recurrence relation given below −
Fn = Fn-1 + Fn-2
With F0= 0 and F1 = 1.
First, few Fibonacci numbers are
0,1,1,2,3,5,8,13,..................
We can compute the Fibonacci numbers using the method of recursion and dynamic pr... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "In this article, we will compute the nth Fibonacci number."
},
{
"code": null,
"e": 1192,
"s": 1121,
"text": "A Fibonacci number is defined by the recurrence relation given below −"
},
{
"code": null,
"e": 1209,
"s": ... |
C++ String Library - push_back | It appends character c to the end of the string, increasing its length by one.
Following is the declaration for std::string::push_back.
void push_back (char c);
void push_back (char c);
void push_back (char c);
c − It is a character object.
none
if an exception is thrown, there are no changes in the string.
In below ex... | [
{
"code": null,
"e": 2682,
"s": 2603,
"text": "It appends character c to the end of the string, increasing its length by one."
},
{
"code": null,
"e": 2739,
"s": 2682,
"text": "Following is the declaration for std::string::push_back."
},
{
"code": null,
"e": 2764,
... |
Centering x-tick labels between tick marks in Matplotlib | To place labels between two ticks, we can take the following steps−
Load some sample data, r.
Create a copy of the array, cast to a specified type.
Create a figure and a set of subplots using subplots() method.
Plot date and r sample data.
Set the locator of the major/minor ticker using set_major_locator() and set_mino... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To place labels between two ticks, we can take the following steps−"
},
{
"code": null,
"e": 1156,
"s": 1130,
"text": "Load some sample data, r."
},
{
"code": null,
"e": 1210,
"s": 1156,
"text": "Create a copy of ... |
Data Cleaning, Merging, and Wrangling in R | by Michael Grogan | Towards Data Science | One of the big issues when it comes to working with data in any context is the issue of data cleaning and merging of datasets, since it is often the case that you will find yourself having to collate data across multiple files, and will need to rely on R to carry out functions that you would normally carry out using co... | [
{
"code": null,
"e": 521,
"s": 171,
"text": "One of the big issues when it comes to working with data in any context is the issue of data cleaning and merging of datasets, since it is often the case that you will find yourself having to collate data across multiple files, and will need to rely on R ... |
Abstract Classes in Java | A class which contains the abstract keyword in its declaration is known as an abstract class.
Abstract classes may or may not contain abstract methods, i.e., methods without a body ( public void get(); )
Abstract classes may or may not contain abstract methods, i.e., methods without a body ( public void get(); )
But, i... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "A class which contains the abstract keyword in its declaration is known as an abstract class."
},
{
"code": null,
"e": 1266,
"s": 1156,
"text": "Abstract classes may or may not contain abstract methods, i.e., methods without a body (... |
Building a sonar sensor array with Arduino and Python | by Alberto Naranjo | Towards Data Science | In this article we are going to build from scratch a sonar array based on the cheap and popular HC-SR04 sensor. We will use an Arduino microcontroller to drive and read the sensors and to communicate to a host computer using serial communication. Here is the working code for the full project however I recommend you to ... | [
{
"code": null,
"e": 587,
"s": 172,
"text": "In this article we are going to build from scratch a sonar array based on the cheap and popular HC-SR04 sensor. We will use an Arduino microcontroller to drive and read the sensors and to communicate to a host computer using serial communication. Here is ... |
Plotting Various Sounds on Graphs using Python and Matplotlib - GeeksforGeeks | 27 Jan, 2022
In this article, we will explore the way of visualizing sounds waves using Python and Matplotlib.
1. Matplotlib: Install Matplotlib using the below command:
pip install matplotlib
2. Numpy: Numpy gets installed automatically installed with Matplotlib. Although, if you face any import error, use the below ... | [
{
"code": null,
"e": 31572,
"s": 31544,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 31670,
"s": 31572,
"text": "In this article, we will explore the way of visualizing sounds waves using Python and Matplotlib."
},
{
"code": null,
"e": 31730,
"s": 31670,
"... |
Image Resizing in Matlab - GeeksforGeeks | 22 May, 2019
Prerequisite : RGB image representation
MATLAB stores most images as two-dimensional matrices, in which each element of the matrix corresponds to a single discrete pixel in the displayed image. Some images, such as truecolor images, represent images using a three-dimensional array. In truecolor images, the... | [
{
"code": null,
"e": 26211,
"s": 26183,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 26251,
"s": 26211,
"text": "Prerequisite : RGB image representation"
},
{
"code": null,
"e": 26708,
"s": 26251,
"text": "MATLAB stores most images as two-dimensional matri... |
How to create Skewed Background with hover effect using HTML and CSS? - GeeksforGeeks | 10 May, 2020
The skewed background or you can say an angel color shade background can be created by using HTML and CSS. This background can be used as a cover pic of your website that will be attractive. In this article, we will create a simple skewed background. We will divide the article into two sections in the firs... | [
{
"code": null,
"e": 25775,
"s": 25747,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26175,
"s": 25775,
"text": "The skewed background or you can say an angel color shade background can be created by using HTML and CSS. This background can be used as a cover pic of your websi... |
Python | Get first N key:value pairs in given dictionary - GeeksforGeeks | 02 Aug, 2019
Given a dictionary, the task is to get N key:value pairs from given dictionary. This type of problem can be useful while some cases, like fetching first N values in web development.
Note that the given dictionary is unordered, the first N pairs will not be same here all the time. In case, you need to maint... | [
{
"code": null,
"e": 25885,
"s": 25857,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 26067,
"s": 25885,
"text": "Given a dictionary, the task is to get N key:value pairs from given dictionary. This type of problem can be useful while some cases, like fetching first N values i... |
Check if a number is palindrome or not without using any extra space | Set 2 - GeeksforGeeks | 20 Dec, 2021
Given a number ‘n’ and our goal is to find out it is palindrome or not without using any extra space. We can’t make a new copy of number.
Examples:
Input: n = 2332Output: Yes it is Palindrome.Explanation:original number = 2332reversed number = 2332Both are same hence the number is palindrome.
Input: n=1111... | [
{
"code": null,
"e": 26135,
"s": 26107,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26273,
"s": 26135,
"text": "Given a number ‘n’ and our goal is to find out it is palindrome or not without using any extra space. We can’t make a new copy of number."
},
{
"code": nul... |
How to change the value of a global variable inside of a function using JavaScript ? - GeeksforGeeks | 15 Apr, 2020
Pre-requisite: Global and Local variables in JavaScript
Local Scope: Variables which are declared inside a function is called local variables and these are accessed only inside the function. Local variables are deleted when the function is completed.
Global Scope: Global variables can be accessed from insi... | [
{
"code": null,
"e": 39215,
"s": 39187,
"text": "\n15 Apr, 2020"
},
{
"code": null,
"e": 39271,
"s": 39215,
"text": "Pre-requisite: Global and Local variables in JavaScript"
},
{
"code": null,
"e": 39466,
"s": 39271,
"text": "Local Scope: Variables which are d... |
Check if a Binary Tree is univalued or not - GeeksforGeeks | 19 Jan, 2022
Given a binary tree, the task is to check if the binary tree is univalued or not. If found to be true, then print “YES”. Otherwise, print “NO”.
A binary tree is univalued if every node in the tree has the same value.
Example:
Input:
1
/ \
1 1
... | [
{
"code": null,
"e": 25918,
"s": 25890,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 26062,
"s": 25918,
"text": "Given a binary tree, the task is to check if the binary tree is univalued or not. If found to be true, then print “YES”. Otherwise, print “NO”."
},
{
"code... |
Tailwind CSS Background Image - GeeksforGeeks | 23 Mar, 2022
This class accepts more than one value in tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS background-image property. This class is used to set one or more background images to an element. By default, it places the image on the top left corner. To specify two or ... | [
{
"code": null,
"e": 37385,
"s": 37357,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 37737,
"s": 37385,
"text": "This class accepts more than one value in tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS background-image property. T... |
Maximum sum path in a Matrix - GeeksforGeeks | 28 Feb, 2022
Given an n*m matrix, the task is to find the maximum sum of elements of cells starting from the cell (0, 0) to cell (n-1, m-1). However, the allowed moves are right, downwards or diagonally right, i.e, from location (i, j) next move can be (i+1, j), or, (i, j+1), or (i+1, j+1). Find the maximum sum of elem... | [
{
"code": null,
"e": 26345,
"s": 26317,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 26697,
"s": 26345,
"text": "Given an n*m matrix, the task is to find the maximum sum of elements of cells starting from the cell (0, 0) to cell (n-1, m-1). However, the allowed moves are righ... |
LocalTime isSupported() method in Java with Examples - GeeksforGeeks | 26 Jul, 2021
In LocalTime class, there are two types of isSupported() method depending upon the parameters passed to it.
isSupported() method of a LocalTime class used to Check if the specified field is supported by LocalTime class or not means using this method we can check if this LocalTime can be queried for the spe... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 25333,
"s": 25225,
"text": "In LocalTime class, there are two types of isSupported() method depending upon the parameters passed to it."
},
{
"code": null,
"e": 25588,
"s": 25... |
Count number of words | Practice | GeeksforGeeks | Given a string consisting of spaces,\t,\n and lower case alphabets.Your task is to count the number of words where spaces,\t and \n work as separators.
Example 1:
Input: S = "abc def"
Output: 2
Explanation: There is a space at 4th
position which works as a seperator
between "abc" and "def"
Example 2:
Input: S = "... | [
{
"code": null,
"e": 393,
"s": 238,
"text": "Given a string consisting of spaces,\\t,\\n and lower case alphabets.Your task is to count the number of words where spaces,\\t and \\n work as separators.\n "
},
{
"code": null,
"e": 404,
"s": 393,
"text": "Example 1:"
},
{
"... |
Program for SSTF disk scheduling algorithm - GeeksforGeeks | 24 Jan, 2022
Prerequisite – Disk scheduling algorithms Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations done to access all the requested tracks if Shortest Seek Time First (SSTF) is a disk scheduling algorithm is used.
Shortest Seek Time First (SSTF... | [
{
"code": null,
"e": 29507,
"s": 29479,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 29784,
"s": 29507,
"text": "Prerequisite – Disk scheduling algorithms Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations d... |
How to Pass Image as a parameter in JavaScript function ? - GeeksforGeeks | 01 Sep, 2020
We all are familiar with functions and its parameters and we often use strings, integers, objects, arrays as a parameter in JavaScript functions but now will see how to pass an image as a parameter in JavaScript function. We will use vanilla JavaScript here.
First, create a function that receives a paramet... | [
{
"code": null,
"e": 26117,
"s": 26089,
"text": "\n01 Sep, 2020"
},
{
"code": null,
"e": 26376,
"s": 26117,
"text": "We all are familiar with functions and its parameters and we often use strings, integers, objects, arrays as a parameter in JavaScript functions but now will see h... |
How to Download All Images from a Web Page in Python? - GeeksforGeeks | 16 Oct, 2021
Prerequisite:
Requests
BeautifulSoup
os
File Handling
Web scraping is a technique to fetch data from websites. While surfing on the web, many websites don’t allow the user to save data for personal use. One way is to manually copy-paste the data, which both tedious and time-consuming. Web Scraping is the ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 25551,
"s": 25537,
"text": "Prerequisite:"
},
{
"code": null,
"e": 25561,
"s": 25551,
"text": "Requests "
},
{
"code": null,
"e": 25575,
"s": 25561,
"t... |
Python | PageLayout in Kivy - GeeksforGeeks | 19 Oct, 2021
Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
Kivy Tutorial – Learn Kivy with Examples.
The PageLayout works in a ... | [
{
"code": null,
"e": 42675,
"s": 42647,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 42913,
"s": 42675,
"text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android applicati... |
ASP Redirect Method - GeeksforGeeks | 19 Aug, 2020
The ASP Redirect Method is used to redirect the client to a different URL. It is a predefined method of the Response Object.
Syntax:
Response.Redirect URL
Parameter Values: This method accepts a single parameter as mentioned above and described below:
URL: It defines a Uniform resource locator which r... | [
{
"code": null,
"e": 25649,
"s": 25621,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 25774,
"s": 25649,
"text": "The ASP Redirect Method is used to redirect the client to a different URL. It is a predefined method of the Response Object."
},
{
"code": null,
"e": 2... |
Overriding methods from different packages in Java - GeeksforGeeks | 22 Jun, 2020
Prerequisite : Overriding in Java, Packages in JavaPackages provide more layer of encapsulation for classes. Thus, visibility of a method in different packages is different from that in the same package.
How JVM find which method to call?When we run a java program,
JVM checks the runtime class of the objec... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 25429,
"s": 25225,
"text": "Prerequisite : Overriding in Java, Packages in JavaPackages provide more layer of encapsulation for classes. Thus, visibility of a method in different packages is ... |
BigInteger equals() Method in Java - GeeksforGeeks | 04 Dec, 2018
The java.math.BigInteger.equals(Object x) method compares this BigInteger with the object passed as the parameter and returns true in both are equal in value else it returns false.
Syntax:
public boolean equals(Object x)
Parameter: This method accepts a single mandatory parameter x which is the Object to w... | [
{
"code": null,
"e": 25619,
"s": 25591,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 25800,
"s": 25619,
"text": "The java.math.BigInteger.equals(Object x) method compares this BigInteger with the object passed as the parameter and returns true in both are equal in value else ... |
Check if an array is sorted and rotated using Binary Search - GeeksforGeeks | 21 Aug, 2021
Pre-requisite: Check if an array is sorted and rotated using Linear SearchGiven an array arr[] of N distinct integers, the task is to check if this array is sorted when rotated counter-clockwise. A sorted array is not considered sorted and rotated, i.e., there should at least one rotation.
Examples:
Input... | [
{
"code": null,
"e": 26779,
"s": 26751,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 27070,
"s": 26779,
"text": "Pre-requisite: Check if an array is sorted and rotated using Linear SearchGiven an array arr[] of N distinct integers, the task is to check if this array is sorted... |
Node.js fs.readdirSync() Method - GeeksforGeeks | 11 Oct, 2021
The fs.readdirSync() method is used to synchronously read the contents of a given directory. The method returns an array with all the file names or objects in the directory. The options argument can be used to change the format in which the files are returned from the method.
Syntax:
fs.readdirSync( path, ... | [
{
"code": null,
"e": 25795,
"s": 25767,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 26072,
"s": 25795,
"text": "The fs.readdirSync() method is used to synchronously read the contents of a given directory. The method returns an array with all the file names or objects in the ... |
What is favicon and what is the size of it in HTML? - GeeksforGeeks | 11 Oct, 2019
A favicon is something that all of us see daily while browsing the web, but many of us don’t observe it or pay any need to it. A favicon goes by many other names as well, some of them being the favorite icon (hence the acronym favicon), shortcut icon, tab icon, website icon, or bookmark icon. It is the lit... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 26511,
"s": 26139,
"text": "A favicon is something that all of us see daily while browsing the web, but many of us don’t observe it or pay any need to it. A favicon goes by many other names a... |
C++ Program to Illustrate Trigonometric functions - GeeksforGeeks | 18 May, 2020
The math.h header contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions. In order to use these functions you need to include header file math.h.Note: All the functions take input in radians and not degrees
Below are ... | [
{
"code": null,
"e": 26075,
"s": 26047,
"text": "\n18 May, 2020"
},
{
"code": null,
"e": 26372,
"s": 26075,
"text": "The math.h header contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.... |
Angular PrimeNG Badge Component - GeeksforGeeks | 24 Aug, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Badge component in Angular PrimeNG.
Badge component: It is use... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 26635,
"s": 26354,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
Count of numbers in range [L, R] having sum of digits of its square equal to square of sum of digits - GeeksforGeeks | 16 Sep, 2021
Given two integers L and R, the task is to find the count of numbers in range [L, R] such that the sum of digits of its square is equal to the square of sum of its digits,
Example:
Input: L = 22, R = 22Output: 1Explanation: 22 is only valid number in this range as sum of digits of its square = S(22*22) = ... | [
{
"code": null,
"e": 26563,
"s": 26535,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 26736,
"s": 26563,
"text": "Given two integers L and R, the task is to find the count of numbers in range [L, R] such that the sum of digits of its square is equal to the square of sum of its... |
GATE | GATE-CS-2015 (Set 2) | Question 55 - GeeksforGeeks | 28 Jun, 2021
Suppose you are provided with the following function declaration in the C programming language.
int partition (int a[], int n);
The function treats the first element of a[] as a pivot, and rearranges the array so that all elements less than or equal to the pivot is in the left part of the array, and al... | [
{
"code": null,
"e": 25649,
"s": 25621,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25745,
"s": 25649,
"text": "Suppose you are provided with the following function declaration in the C programming language."
},
{
"code": null,
"e": 25781,
"s": 25745,
"te... |
JavaScript Quiz | Set-2 - GeeksforGeeks | 11 Oct, 2021
Prerequisite: Basic understanding of JavaScript concepts1. What is the syntax for creating a function in JavaScript named as Geekfunc? A) function = Geekfunc() B) function Geekfunc() C) function := Geekfunc() D) function : Geekfunc()Ans: Option B Explanation: In JavaScript, function is defined as ‘function... | [
{
"code": null,
"e": 26236,
"s": 26208,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 26757,
"s": 26236,
"text": "Prerequisite: Basic understanding of JavaScript concepts1. What is the syntax for creating a function in JavaScript named as Geekfunc? A) function = Geekfunc() B) ... |
Underscore.js _.functions() Function - GeeksforGeeks | 25 Nov, 2021
The _.functions() function is used to return the sorted list of all methods that present in an object.
Syntax:
_.functions(object)
Parameters: This function accepts single parameter as mentioned above and described below:
object: It contains the object element that holds the elements [key, value] pair.
Ret... | [
{
"code": null,
"e": 34847,
"s": 34819,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 34950,
"s": 34847,
"text": "The _.functions() function is used to return the sorted list of all methods that present in an object."
},
{
"code": null,
"e": 34958,
"s": 34950,
... |
Ternary representation of Cantor set - GeeksforGeeks | 01 Feb, 2022
Given three integers A, B and L, the task is to print the ternary cantor set from range [A, B] upto L levels. Ternary Cantor Set: A ternary Cantor set is a set built by removing the middle part of a line segment when divided into 3 parts and repeating this process with the remaining shorter segments. Below... | [
{
"code": null,
"e": 26179,
"s": 26151,
"text": "\n01 Feb, 2022"
},
{
"code": null,
"e": 26525,
"s": 26179,
"text": "Given three integers A, B and L, the task is to print the ternary cantor set from range [A, B] upto L levels. Ternary Cantor Set: A ternary Cantor set is a set bui... |
Find duplicates in an Array with values 1 to N using counting sort - GeeksforGeeks | 04 Apr, 2022
Given a constant array of N elements which contain elements from 1 to N – 1, with any of these numbers appearing any number of times.Examples:
Input: N = 5, arr[] = {1, 3, 4, 2, 2} Output: 2 Explanation: 2 is the number occurring more than once.Input: N = 5, arr[] = {3, 1, 3, 4, 2} Output: 3 Explanation:... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 26186,
"s": 26041,
"text": "Given a constant array of N elements which contain elements from 1 to N – 1, with any of these numbers appearing any number of times.Examples: "
},
{
"cod... |
Python - Media object in Tweepy - GeeksforGeeks | 21 Jun, 2020
Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte... | [
{
"code": null,
"e": 25377,
"s": 25349,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 25777,
"s": 25377,
"text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data ... |
Python Program To Find Length Of The Longest Substring Without Repeating Characters - GeeksforGeeks | 20 Dec, 2021
Given a string str, find the length of the longest substring without repeating characters.
For “ABDEFGABEF”, the longest substring are “BDEFGA” and “DEFGAB”, with length 6.
For “BBBB” the longest substring is “B”, with length 1.
For “GEEKSFORGEEKS”, there are two longest substrings shown in the below diag... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26189,
"s": 26097,
"text": "Given a string str, find the length of the longest substring without repeating characters. "
},
{
"code": null,
"e": 26271,
"s": 26189,
"text":... |
Count of ways in which N can be represented as sum of Fibonacci numbers without repetition - GeeksforGeeks | 18 Jan, 2022
Given a number N, the task is to find the number of ways in which the integer N can be represented as a sum of Fibonacci numbers without repetition of any Fibonacci number.
Examples:
Input: N = 13Output: 3Explanation: The possible ways to select N as 13 are: {13} {8, 5} {8, 3, 2}. Note that it is not poss... | [
{
"code": null,
"e": 26721,
"s": 26693,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 26895,
"s": 26721,
"text": "Given a number N, the task is to find the number of ways in which the integer N can be represented as a sum of Fibonacci numbers without repetition of any Fibonacc... |
Java - String compareTo() Method | This method compares this String to another Object.
Here is the syntax of this method −
int compareTo(Object o)
Here is the detail of parameters −
O − the Object to be compared.
O − the Object to be compared.
The value 0 if the argument is a string lexicographically equal to this string; a value less than 0 if the arg... | [
{
"code": null,
"e": 2429,
"s": 2377,
"text": "This method compares this String to another Object."
},
{
"code": null,
"e": 2465,
"s": 2429,
"text": "Here is the syntax of this method −"
},
{
"code": null,
"e": 2490,
"s": 2465,
"text": "int compareTo(Object o)... |
Angular 8 - Authentication and Authorization | Authentication is the process matching the visitor of a web application with the pre-defined set of user identity in the system. In other word, it is the process of recognizing the user’s identity. Authentication is very important process in the system with respect to security.
Authorization is the process of giving pe... | [
{
"code": null,
"e": 2667,
"s": 2388,
"text": "Authentication is the process matching the visitor of a web application with the pre-defined set of user identity in the system. In other word, it is the process of recognizing the user’s identity. Authentication is very important process in the system ... |
WiFi with Arduino – Connect to a Network | In order to use WiFi with Arduino Uno, or any other board, you may need to get a WiFi shield(unless you are using a board with built-in WiFi capabilities, like Arduino Uno WiFi). The WiFi shield, like any other shield, stacks up on your board, and provides access to the pins of Arduino on the shield itself.
You can rea... | [
{
"code": null,
"e": 1371,
"s": 1062,
"text": "In order to use WiFi with Arduino Uno, or any other board, you may need to get a WiFi shield(unless you are using a board with built-in WiFi capabilities, like Arduino Uno WiFi). The WiFi shield, like any other shield, stacks up on your board, and provi... |
HTML <script> integrity Attribute - GeeksforGeeks | 27 Sep, 2021
The integrity attribute is used to give permission to the Browser to check the fetched script to make ensure the source code is never loaded. It is used to check that whether the third party has been altered the resource or not.
Subresource Integrity(SRI) is a security feature developed by w3comsortium wh... | [
{
"code": null,
"e": 24814,
"s": 24786,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 25044,
"s": 24814,
"text": "The integrity attribute is used to give permission to the Browser to check the fetched script to make ensure the source code is never loaded. It is used to check t... |
How to Sort Words in Alphabetic Order using Python? | Assuming that the a string object contains multiple words separated by one space. The split() method of string class returns a list of words separated by space character. This list object is sorted by invoking sort() method of built-in list class
>>> string='Hello how are you?'
>>> list=string.split()
>>> list
['Hello'... | [
{
"code": null,
"e": 1309,
"s": 1062,
"text": "Assuming that the a string object contains multiple words separated by one space. The split() method of string class returns a list of words separated by space character. This list object is sorted by invoking sort() method of built-in list class"
},
... |
Sum of Array Elements | Practice | GeeksforGeeks | Given an integer array arr of size n, you need to sum the elements of arr.
Example 1:
Input:
n = 3
arr[] = {3 2 1}
Output: 6
Example 2:
Input:
n = 4
arr[] = {1 2 3 4}
Output: 10
Your Task:
You need to complete the function sumElement() that takes arr and n and returns the sum. The printing is done by the driver code.
... | [
{
"code": null,
"e": 301,
"s": 226,
"text": "Given an integer array arr of size n, you need to sum the elements of arr."
},
{
"code": null,
"e": 312,
"s": 301,
"text": "Example 1:"
},
{
"code": null,
"e": 351,
"s": 312,
"text": "Input:\nn = 3\narr[] = {3 2 1}\... |
Find data for specific date in MongoDB? | Let’s say you have saved the Login date of users. Now, you want the count of records for specific date only i.e. login date. For this, use gteandlt operator along with count(). Let us first create a collection with documents −
> db.findDataByDateDemo.insertOne({"UserName":"John","UserLoginDate":new ISODate("2019-01-31"... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "Let’s say you have saved the Login date of users. Now, you want the count of records for specific date only i.e. login date. For this, use gteandlt operator along with count(). Let us first create a collection with documents −"
},
{
"code": null... |
Merge Two Sorted Lists in Python | Suppose we have two sorted lists A and B. We have to merge them and form only one sorted list C. The size of lists may different.
For an example, suppose A = [1,2,4,7] and B = [1,3,4,5,6,8], then merged list C will be [1,1,2,3,4,4,5,6,7,8]
We will solve this using recursion. So the function will work like below −
Suppo... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "Suppose we have two sorted lists A and B. We have to merge them and form only one sorted list C. The size of lists may different."
},
{
"code": null,
"e": 1302,
"s": 1192,
"text": "For an example, suppose A = [1,2,4,7] and B = [1,3,4... |
How do you animate the change of background color of a view on Android using Kotlin? | This example demonstrates how to animate the change of background color of a view on Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" ... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "This example demonstrates how to animate the change of background color of a view on Android using Kotlin."
},
{
"code": null,
"e": 1297,
"s": 1169,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project an... |
Frog Jump in C++ | Suppose there is a frog that is crossing a river. The river is divided into x units and at each unit there may be a stone. The frog can jump on a stone, but not water. Here we have a list of stones' positions in sorted ascending order sequence, we have to check whether the frog is able to cross the river by landing on ... | [
{
"code": null,
"e": 1493,
"s": 1062,
"text": "Suppose there is a frog that is crossing a river. The river is divided into x units and at each unit there may be a stone. The frog can jump on a stone, but not water. Here we have a list of stones' positions in sorted ascending order sequence, we have ... |
How to generate a random BigInteger value in Java? | To generate random BigInteger in Java, let us first set a min and max value −
BigInteger maxLimit = new BigInteger("5000000000000");
BigInteger minLimit = new BigInteger("25000000000");
Now, subtract the min and max −
BigInteger bigInteger = maxLimit.subtract(minLimit);
Declare a Random object and find the length of th... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To generate random BigInteger in Java, let us first set a min and max value −"
},
{
"code": null,
"e": 1248,
"s": 1140,
"text": "BigInteger maxLimit = new BigInteger(\"5000000000000\");\nBigInteger minLimit = new BigInteger(\"2500000... |
How to use CheckBox in Android Kotlin? | This example demonstrates how to use CheckBox in Android Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:a... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "This example demonstrates how to use CheckBox in Android Kotlin."
},
{
"code": null,
"e": 1255,
"s": 1127,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a ne... |
Git Clone from GitHub | Now we have our own fork, but only on GitHub. We also want a
clone on our local Git to keep working on it.
A clone is a full copy of a repository, including all logging and versions of files.
Move back to the original repository, and click the green "Code" button to get the
URL to clone:
Open your Git bash and clone ... | [
{
"code": null,
"e": 108,
"s": 0,
"text": "Now we have our own fork, but only on GitHub. We also want a \nclone on our local Git to keep working on it."
},
{
"code": null,
"e": 193,
"s": 108,
"text": "A clone is a full copy of a repository, including all logging and versions of f... |
MapStruct - Quick Guide | MapStruct is an annotation processor which is plugged into Java Compiler. Once plugged in, it can be used by command line tools like maven, gradle to process the mapping annotation to create a mapper class at compile time.
In multilayered applications, data objects are used to fetch data from database and UI interacts ... | [
{
"code": null,
"e": 2483,
"s": 2260,
"text": "MapStruct is an annotation processor which is plugged into Java Compiler. Once plugged in, it can be used by command line tools like maven, gradle to process the mapping annotation to create a mapper class at compile time."
},
{
"code": null,
... |
Output of Java program | Set 22 (Overloading) - GeeksforGeeks | 03 Feb, 2021
Prerequisite – Overloading in Java1) What is the output of the following program?
Java
public class Test{ public int getData() //getdata() 1 { return 0; } public long getData() //getdata 2 { return 1; } public static void main(String[] args) { Test obj = new T... | [
{
"code": null,
"e": 24480,
"s": 24452,
"text": "\n03 Feb, 2021"
},
{
"code": null,
"e": 24564,
"s": 24480,
"text": "Prerequisite – Overloading in Java1) What is the output of the following program? "
},
{
"code": null,
"e": 24569,
"s": 24564,
"text": "Java"
... |
Importing 100M+ Records into DynamoDB in Under 30 Minutes | by Paul Singman | Towards Data Science | No longer will anyone suffer while setting up the process of doing a full export of a DynamoDB table to S3.
The same cannot be said, however, for someone looking to import data into a Dynamo table. Particularly a large amount of data and fast.
The need for quick bulk imports can occur when records in a table get corrup... | [
{
"code": null,
"e": 280,
"s": 172,
"text": "No longer will anyone suffer while setting up the process of doing a full export of a DynamoDB table to S3."
},
{
"code": null,
"e": 416,
"s": 280,
"text": "The same cannot be said, however, for someone looking to import data into a Dy... |
Spring Boot EhCache Example | Boot @Cachable @EnableCaching | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, I am going to show you how ... | [
{
"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 save Matplotlib 3d rotating plots? | To save Matplotlib 3d roatating plots, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure.
Add an '~.axes.Axes' to the figure as part of a subplot arrangement.
Return a tuple X, Y, Z with a test data set.
Plot ... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To save Matplotlib 3d roatating plots, we can take the following steps −"
},
{
"code": null,
"e": 1211,
"s": 1135,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
"... |
distinct() vs dropDuplicates() in Apache Spark | by Giorgos Myrianthous | Towards Data Science | The Spark DataFrame API comes with two functions that can be used in order to remove duplicates from a given DataFrame. These are distinct() and dropDuplicates() . Even though both methods pretty much do the same job, they actually come with one difference which is quite important in some use cases.
In this article, we... | [
{
"code": null,
"e": 473,
"s": 172,
"text": "The Spark DataFrame API comes with two functions that can be used in order to remove duplicates from a given DataFrame. These are distinct() and dropDuplicates() . Even though both methods pretty much do the same job, they actually come with one differenc... |
How to get rid of Java TLE problem - GeeksforGeeks | 23 Mar, 2022
It happens many times that you have written correct Java code with as much optimization as needed according to the constraints. But, you get TLE ????. This happens due to the time taken by Java to take input and write output using Scanner class which is slow as compared to BufferedReader and StringBuffer c... | [
{
"code": null,
"e": 24658,
"s": 24630,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 25108,
"s": 24658,
"text": "It happens many times that you have written correct Java code with as much optimization as needed according to the constraints. But, you get TLE ????. This happens... |
ReactJS - Controlled Component | Controlled component has to follow a specific process to do form programming. Let us check the step by step process to be followed for a single input element.
Create a form element.
<input type="text" name="username" />
Create a state for input element.
this.state = {
username: ''
}
Add a value attribute and ass... | [
{
"code": null,
"e": 2192,
"s": 2033,
"text": "Controlled component has to follow a specific process to do form programming. Let us check the step by step process to be followed for a single input element."
},
{
"code": null,
"e": 2215,
"s": 2192,
"text": "Create a form element."... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.