title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to form a composite key to be unique in MySQL? | To form a composite key to be unique, you need to use ADD UNIQUE command. Following is the syntax −
alter table yourTableName add unique
yourUniqueName( yourColumnName1,yourColumnName2,.......N);
Let us first create a table. Following is the query −
mysql> create table makeCompositeKeyDemo
-> (
-> Id int NOT NULL... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To form a composite key to be unique, you need to use ADD UNIQUE command. Following is the syntax −"
},
{
"code": null,
"e": 1258,
"s": 1162,
"text": "alter table yourTableName add unique\nyourUniqueName( yourColumnName1,yourColumnNa... |
C++ Program to Implement Merge Sort | The merge sort technique is based on divide and conquer technique. We divide the while data set into smaller parts and merge them into a larger piece in sorted order. It is also very effective for worst cases because this algorithm has lower time complexity for worst case also.
Time Complexity: O(n log n) for all cases... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "The merge sort technique is based on divide and conquer technique. We divide the while data set into smaller parts and merge them into a larger piece in sorted order. It is also very effective for worst cases because this algorithm has lower time comple... |
Sum and Product of minimum and maximum element of an Array | 17 May, 2022
Given an array. The task is to find the sum and product of the maximum and minimum elements of the given array.Examples:
Input : arr[] = {12, 1234, 45, 67, 1}
Output : Sum = 1235
Product = 1234
Input : arr[] = {5, 3, 6, 8, 4, 1, 2, 9}
Output : Sum = 10
Product = 9
Take to variables m... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 177,
"s": 54,
"text": "Given an array. The task is to find the sum and product of the maximum and minimum elements of the given array.Examples: "
},
{
"code": null,
"e": 340,
"s": ... |
How to find the parent class name with known class in jQuery ? | 03 Aug, 2021
Given an HTML document and the task is to get the parent class of an element with the help of given class name.
Approach 1:
The on() method is used to select the event handler for selected elements. It means when the user clicks the button then the function call.
The closest() method is used to return the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 140,
"s": 28,
"text": "Given an HTML document and the task is to get the parent class of an element with the help of given class name."
},
{
"code": null,
"e": 152,
"s": 140,
"te... |
Python | Testing Output to stdout | 12 Jun, 2019
Testing is a critical part of development as there is no compiler to analyze the code before Python executes it.Given a program that has a method whose output goes to standard Output (sys.stdout). This almost always means that it emits text to the screen. One likes to write a test for the code to prove tha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 394,
"s": 28,
"text": "Testing is a critical part of development as there is no compiler to analyze the code before Python executes it.Given a program that has a method whose output goes to standard... |
How to create Vertical Menu using HTML and CSS ? | 16 Nov, 2021
Vertical Menu: We can create a vertical menu in form of buttons and a scrollable menu. Vertical Menu is the buttons arranged in the vertical menu bar/navbar.
How to create a vertical menu using buttons: We can create it simply by using HTML and CSS. We will create a simple structure of the web page by usin... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 212,
"s": 54,
"text": "Vertical Menu: We can create a vertical menu in form of buttons and a scrollable menu. Vertical Menu is the buttons arranged in the vertical menu bar/navbar."
},
{
"c... |
PyQt5 – QDateTimeEdit | 10 Jul, 2020
QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from section to section within the QDateTimeEdit box. Dates and times appear in accordance with the format set. Below is how the QDateTimeEdi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 348,
"s": 28,
"text": "QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from sect... |
Node.js Readable Stream data Event | 12 Oct, 2021
The ‘data’ Event in a Readable Stream is emitted when readable.pipe() and readable.resume() method is called for switching the stream into the flowing mode or by adding a listener callback to the data event. This event can also be emitted by calling readable.read() method and returning the chunk of data av... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 344,
"s": 28,
"text": "The ‘data’ Event in a Readable Stream is emitted when readable.pipe() and readable.resume() method is called for switching the stream into the flowing mode or by adding a list... |
Find number of times a string occurs as a subsequence in given string | 01 Jul, 2022
Given two strings, find the number of times the second string occurs in the first string, whether continuous or discontinuous.
Examples:
Input:
string a = "GeeksforGeeks"
string b = "Gks"
Output: 4
Explanation:
The four strings are - (Check characters marked in bold)
GeeksforGeeks
GeeksforGeeks
Geek... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 181,
"s": 54,
"text": "Given two strings, find the number of times the second string occurs in the first string, whether continuous or discontinuous."
},
{
"code": null,
"e": 192,
"... |
Lodash _.groupBy() Method | 02 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.
The _.groupBy() method creates an object composed of keys generated from the results of running each element of collection through the iteratee function. Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc."
},
{
"code": nu... |
Check if the elements of a Vector are Finite, Infinite or NaN values in R Programming – is.finite(), is.infinite() and is.nan() Function | 04 Jun, 2020
is.finite() function in R Language is used to check if the elements of a vector are Finite values or not. It returns a boolean value for all the elements of the vector.
Syntax: is.finite(x)
Parameters:x: Vector to be checked
Example:
# R program to illustrate# the use of is.finite() function # Creating a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jun, 2020"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "is.finite() function in R Language is used to check if the elements of a vector are Finite values or not. It returns a boolean value for all the elements of the vector."
},
... |
How to Integrate Custom Rich Text-Editor in Your Django Website? | 14 May, 2021
In this article, we will implement tinymce text editor in our Django application.
What is django-tinymce?
django-tinymce is a Django application that contains a widget to render a form field as a TinyMCE editor.
Features :-
Use as a form widget or with a view.
Enhanced support for content languages.
Integr... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 135,
"s": 53,
"text": "In this article, we will implement tinymce text editor in our Django application."
},
{
"code": null,
"e": 159,
"s": 135,
"text": "What is django-tinymce?... |
How to Create Custom Radio Button using HTML and CSS ? | 19 Jan, 2022
The simple radio button can be customized using HTML and CSS easily. We will use some CSS properties to create a custom radio button. The :after pseudo-element and checked attribute is used to set some CSS property. The complete code is divided into two sections, the first section contains the HTML code an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 512,
"s": 28,
"text": "The simple radio button can be customized using HTML and CSS easily. We will use some CSS properties to create a custom radio button. The :after pseudo-element and checked att... |
MongoDB Remove() Method – db.Collection.remove() | 28 Jan, 2021
The remove() method removes documents from the database. It can remove one or all documents from the collection that matches the given query expression. If you pass an empty document({}) in this method, then it will remove all documents from the specified collection. It takes four parameters and returns an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 386,
"s": 28,
"text": "The remove() method removes documents from the database. It can remove one or all documents from the collection that matches the given query expression. If you pass an empty d... |
What is the difference between join and merge in Pandas? | 28 Mar, 2022
Pandas provide various facilities for easily combining Series or DataFrame with various kinds of set logic for the indexes and relational algebra functionality in the case of join / merge-type operations.
Both join and merge can be used to combines two dataframes but the join method combines two dataframe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "Pandas provide various facilities for easily combining Series or DataFrame with various kinds of set logic for the indexes and relational algebra functionality in the case of ... |
Queries for number of array elements in a range with Kth Bit Set | Difficulty Level :
Medium
Given an array of N positive (32-bit)integers, the task is to answer Q queries of the following form:
Query(L, R, K): Print the number of elements of the array in the
range L to R, which have their Kth bit as set
Note: Consider LSB to be indexed at 1.
Examples:
Input : arr[]... | [
{
"code": null,
"e": 26,
"s": 0,
"text": "Difficulty Level :\nMedium"
},
{
"code": null,
"e": 129,
"s": 26,
"text": "Given an array of N positive (32-bit)integers, the task is to answer Q queries of the following form: "
},
{
"code": null,
"e": 257,
"s": 129,
... |
Pivot Table Conditional Formatting in Excel | 27 May, 2021
One of the most useful ways to customize the pivot table formatting is using Conditional Formats. Conditional formatting rules can be applied to Pivot tables just like they can be applied to normal data ranges. So by using conditional formatting, we can highlight the cells with a certain color depending on... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 354,
"s": 28,
"text": "One of the most useful ways to customize the pivot table formatting is using Conditional Formats. Conditional formatting rules can be applied to Pivot tables just like they ca... |
How to Cast a JSON Object Inside of TypeScript Class ? | 31 Mar, 2020
We use JSON objects to store and transport data between a server and a client application, or locally in a node project. In Typescript, there are two types of objects.
Plain objects: When we try to parse JSON data using JSON.parse() method then we get a plain object and not a class object.
Class(constructo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Mar, 2020"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "We use JSON objects to store and transport data between a server and a client application, or locally in a node project. In Typescript, there are two types of objects."
},
... |
Statistical - LOGEST Function | In regression analysis, calculates an exponential curve that fits your data and returns an array of values that describes the curve. Since this function returns an array of values, it must be entered as an array formula.
LOGEST (known_y's, [known_x's], [const], [stats])
The set of y-values you already know in the rel... | [
{
"code": null,
"e": 2076,
"s": 1854,
"text": "In regression analysis, calculates an exponential curve that fits your data and returns an array of values that describes the curve. Since this function returns an array of values, it must be entered as an array formula. "
},
{
"code": null,
... |
Extract Matplotlib colormap in hex-format | To extract matplotlib colormap in hex-format, we can take the following steps −
Get the rainbow color map.
Get the rainbow color map.
Iterate in the range of rainbow colormap length.
Iterate in the range of rainbow colormap length.
Using rgb2hex method, convert rgba tuple to a hexadecimal representation of a color.
Usi... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To extract matplotlib colormap in hex-format, we can take the following steps −"
},
{
"code": null,
"e": 1169,
"s": 1142,
"text": "Get the rainbow color map."
},
{
"code": null,
"e": 1196,
"s": 1169,
"text": "Get ... |
fread() function in PHP | The fread() function reads from an open file. The fread() function halts at the end of the file or when it reaches the specified length whichever comes first. It returns the read string on success. On failure, it returns FALSE.
fread(file_pointer, length)
file_pointer − A file system pointer resource created using fope... | [
{
"code": null,
"e": 1290,
"s": 1062,
"text": "The fread() function reads from an open file. The fread() function halts at the end of the file or when it reaches the specified length whichever comes first. It returns the read string on success. On failure, it returns FALSE."
},
{
"code": nul... |
C++ Complex Library - Abs | It is an absolute value of complex and returns the absolute value of the complex number x.
Following is the declaration for std::abs.
x It is a complex value.
It returns the absolute value of the complex number x.
none
In below example for std::abs.
#include <iostream>
#include <complex>
int main () {
st... | [
{
"code": null,
"e": 2694,
"s": 2603,
"text": "It is an absolute value of complex and returns the absolute value of the complex number x."
},
{
"code": null,
"e": 2737,
"s": 2694,
"text": "Following is the declaration for std::abs."
},
{
"code": null,
"e": 2762,
"... |
How to generate regular expression from finite automata? | There are two methods for converting deterministic finite automata (DFA) to Regular expression (RE). These are as follows −
Arden’s Method
State Elimination Method
Let us understand these methods in detail.
Let P and Q be the two regular expressions.
If P does not contain null string, then following equation in R, viz ... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "There are two methods for converting deterministic finite automata (DFA) to Regular expression (RE). These are as follows −"
},
{
"code": null,
"e": 1201,
"s": 1186,
"text": "Arden’s Method"
},
{
"code": null,
"e": 1226,
... |
Node.js http2session.destroy() Method - GeeksforGeeks | 11 Jan, 2022
The http2session.destroy() is an inbuilt application programming interface of class http2session within http2 module which is used to destroy this particular session.
Syntax:
const http2session.destroy([error][, code])
Parameters: This method takes the following two optional arguments as a parameter:
erro... | [
{
"code": null,
"e": 25409,
"s": 25381,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 25576,
"s": 25409,
"text": "The http2session.destroy() is an inbuilt application programming interface of class http2session within http2 module which is used to destroy this particular sessi... |
Count number of ways to reach a given score in a game - GeeksforGeeks | 09 Apr, 2021
Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find number of ways to reach the given score.Examples:
Input: n = 20
Output: 4
There are following 4 ways to reach 20
(10, 10)
(5, 5, 10)
(5, 5, 5, 5)
(3, 3, 3, 3, 3, 5)
Input: n = 13
Output: 2
There are follo... | [
{
"code": null,
"e": 24978,
"s": 24950,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 25130,
"s": 24978,
"text": "Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find number of ways to reach the given score.Examples: "
},
{
... |
Clojure - Data Types | Clojure offers a wide variety of built-in data types.
Following is a list of data types which are defined in Clojure.
Integers − Following are the representation of Integers available in Clojure.
Decimal Integers (Short, Long and Int) − These are used to represent whole numbers. For example, 1234.
Octal Numbers − Thes... | [
{
"code": null,
"e": 2428,
"s": 2374,
"text": "Clojure offers a wide variety of built-in data types."
},
{
"code": null,
"e": 2492,
"s": 2428,
"text": "Following is a list of data types which are defined in Clojure."
},
{
"code": null,
"e": 3022,
"s": 2492,
"t... |
How to use XmlSerializer in C#? | Serialization/ De-serialization allow communication with another application by sending and receiving data. With XmlSerializer, you can control how objects are encoded into XML.
To perform XML Serialization, you need the following two classes −
StreamWriter class
XmlSerializer class
Call the Serialize method with the p... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "Serialization/ De-serialization allow communication with another application by sending and receiving data. With XmlSerializer, you can control how objects are encoded into XML."
},
{
"code": null,
"e": 1307,
"s": 1240,
"text": "To p... |
Reading and interpreting summary statistics | by Mahbubul Alam | Towards Data Science | A typical data science project starts with data wrangling. It is the process of cleaning messy data and transforming them into appropriate formats for further analysis and modeling.
The next step in the process is exploratory data analysis or EDA. This is where you spot hidden issues and anomalies in the data. Most imp... | [
{
"code": null,
"e": 354,
"s": 172,
"text": "A typical data science project starts with data wrangling. It is the process of cleaning messy data and transforming them into appropriate formats for further analysis and modeling."
},
{
"code": null,
"e": 566,
"s": 354,
"text": "The ... |
Behave - Tags | A section of a feature file can be tagged so that the Behave is capable of verifying only a certain section of the feature file. A Scenario, Feature, Scenario Outline can only be tagged.
Also, a tag which is used for a feature shall be inherited by all its Scenarios and the Scenario Outlines. Tags are placed before a S... | [
{
"code": null,
"e": 2483,
"s": 2296,
"text": "A section of a feature file can be tagged so that the Behave is capable of verifying only a certain section of the feature file. A Scenario, Feature, Scenario Outline can only be tagged."
},
{
"code": null,
"e": 2734,
"s": 2483,
"tex... |
Instant compareTo() method in Java with Examples - GeeksforGeeks | 30 Jul, 2019
The compareTo(Instant otherInstant) method of Instant class used to compare this instance to the instance passed as parameter to check whether both instances are equal. The comparison between both instances is based on the time-line position of the instants. The value to be returned by this method is deter... | [
{
"code": null,
"e": 24143,
"s": 24115,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 24468,
"s": 24143,
"text": "The compareTo(Instant otherInstant) method of Instant class used to compare this instance to the instance passed as parameter to check whether both instances are e... |
MySQL - INDEXES | A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records.
While creating index, it should be taken into consideration which all columns will be us... | [
{
"code": null,
"e": 2565,
"s": 2333,
"text": "A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records."
},
{
"code":... |
MySQL query to search record with apostrophe? | Let us first create a table −
mysql> create table DemoTable
-> (
-> Name varchar(100)
-> );
Query OK, 0 rows affected (2.23 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('John');
Query OK, 1 row affected (0.20 sec)
mysql> insert into DemoTable values('Sam\\''s');
Quer... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1191,
"s": 1092,
"text": "mysql> create table DemoTable\n-> (\n-> Name varchar(100)\n-> );\nQuery OK, 0 rows affected (2.23 sec)"
},
{
"code": null,
"e": 1247,
"s... |
Python - Columns to Dictionary Conversion in Matrix - GeeksforGeeks | 29 Aug, 2020
Given a Matrix, Convert to Dictionary with elements in 1st row being keys, and subsequent rows acting as values list.
Input : test_list = [[4, 5, 7], [10, 8, 4], [19, 4, 6], [9, 3, 6]]Output : {4: [10, 19, 9], 5: [8, 4, 3], 7: [4, 6, 6]}Explanation : All columns mapped with 1st row elements. Eg. 4 -> 10, 1... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24330,
"s": 24212,
"text": "Given a Matrix, Convert to Dictionary with elements in 1st row being keys, and subsequent rows acting as values list."
},
{
"code": null,
"e": 24525,
... |
Trie | (Delete) | Practice | GeeksforGeeks | Trie is an efficient information retrieval data structure. This data structure is used to store Strings and search strings, String stored can also be deleted. Given a Trie root for a larger string super and a string key, delete all the occurences of key in the Trie.
Example 1:
Input:
N = 8
super = "the a there answer a... | [
{
"code": null,
"e": 505,
"s": 238,
"text": "Trie is an efficient information retrieval data structure. This data structure is used to store Strings and search strings, String stored can also be deleted. Given a Trie root for a larger string super and a string key, delete all the occurences of key i... |
How to draw polylines in OpenCV using Java? | The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc this class provides various methods to process an input image such as resize(), filter2D, etc.. In addition to these It also provides a set of method to draw geometrical shapes on images.
Among them to draw a polylines you need to invo... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc this class provides various methods to process an input image such as resize(), filter2D, etc.. In addition to these It also provides a set of method to draw geometrica... |
Deploying Pretrained TF Object Detection Models on Android | by Shubham Panchal | Towards Data Science | Deploying machine learning models on mobile devices is the new phase of ML that’s about to begin. Vision models, mostly object detection models, have already made their way to mobile devices along with speech recognition, image classification, text completion etc. These models, run usually run on GPU-enabled computers,... | [
{
"code": null,
"e": 549,
"s": 172,
"text": "Deploying machine learning models on mobile devices is the new phase of ML that’s about to begin. Vision models, mostly object detection models, have already made their way to mobile devices along with speech recognition, image classification, text comple... |
How I Deployed a Sentiment Analyser API with spaCy, Flask and Heroku | by Rhys Kilian | Towards Data Science | By completing this tutorial, you will learn to deploy a machine learning model to Heroku using Flask. Therefore, even if you don’t have access to Machine Learning Engineers or Software Engineers at your organisation, you will have the necessary skills to deploy machine learning REST APIs.
I will demonstrate by first cr... | [
{
"code": null,
"e": 462,
"s": 172,
"text": "By completing this tutorial, you will learn to deploy a machine learning model to Heroku using Flask. Therefore, even if you don’t have access to Machine Learning Engineers or Software Engineers at your organisation, you will have the necessary skills to ... |
Maximum path sum from any node | Practice | GeeksforGeeks | Given a binary tree, the task is to find the maximum path sum. The path may start and end at any node in the tree.
Example 1:
Input:
10
/ \
2 -25
/ \ / \
20 1 3 4
Output: 32
Explanation: Path in the given tree goes
like 10 , 2 , 20 which gives the max
sum as 32.
Example 2:
Input:
10
/ ... | [
{
"code": null,
"e": 353,
"s": 238,
"text": "Given a binary tree, the task is to find the maximum path sum. The path may start and end at any node in the tree."
},
{
"code": null,
"e": 364,
"s": 353,
"text": "Example 1:"
},
{
"code": null,
"e": 524,
"s": 364,
... |
Ionic - Cordova AdMob | The Cordova AdMob plugin is used for integrating ads natively. We will use the admobpro plugin in this chapter, since the admob is deprecated.
To be able to use ads in your app, you need to sign up to admob and create a banner. When you do this, you will get an Ad Publisher ID. Since these steps are not a part of the I... | [
{
"code": null,
"e": 2606,
"s": 2463,
"text": "The Cordova AdMob plugin is used for integrating ads natively. We will use the admobpro plugin in this chapter, since the admob is deprecated."
},
{
"code": null,
"e": 2882,
"s": 2606,
"text": "To be able to use ads in your app, you ... |
numpy.ma.mask_or() function | Python - GeeksforGeeks | 22 Apr, 2020
numpy.ma.mask_or() function combine two masks with the logical_or operator. The result may be a view on m1 or m2 if the other is nomask (i.e. False).
Syntax : numpy.ma.mask_or(m1, m2, copy = False, shrink = True)
Parameters :m1, m2 : [ array_like] Input masks.copy : [bool, optional] If copy is False and on... | [
{
"code": null,
"e": 25054,
"s": 25026,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25204,
"s": 25054,
"text": "numpy.ma.mask_or() function combine two masks with the logical_or operator. The result may be a view on m1 or m2 if the other is nomask (i.e. False)."
},
{
... |
How to disable checkbutton Tkinter (grey out)? | The state property in Tkinter is used to change the state of any specific widget. We can make a widget either active or disabled whenever required. To disable the Checkbuttons widget, we have to set the state property as readonly or disabled. Changing the state will make all the checkbuttons inactive during the executi... | [
{
"code": null,
"e": 1401,
"s": 1062,
"text": "The state property in Tkinter is used to change the state of any specific widget. We can make a widget either active or disabled whenever required. To disable the Checkbuttons widget, we have to set the state property as readonly or disabled. Changing t... |
Python | Pandas PeriodIndex.week - GeeksforGeeks | 06 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas PeriodIndex.week attribute return an Index object containing the ordinal value of week... | [
{
"code": null,
"e": 26143,
"s": 26115,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 26357,
"s": 26143,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
CSS | outline-offset Property - GeeksforGeeks | 09 Aug, 2019
The CSS outline-offset Property sets the amount of space between an outline and the edge or border of an element.
An outline is a line drawn around elements outside the border edge. The space between the element and its outline is transparent. Also, the outline may be non-rectangular. The default value is ... | [
{
"code": null,
"e": 23666,
"s": 23638,
"text": "\n09 Aug, 2019"
},
{
"code": null,
"e": 23780,
"s": 23666,
"text": "The CSS outline-offset Property sets the amount of space between an outline and the edge or border of an element."
},
{
"code": null,
"e": 23976,
"... |
Practice | GeeksforGeeks | A computer science portal for geeks | Popular Company Tags
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
show more
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
Popular Topic Tags
Maths
Array
Dynamic-Programming
Greedy-Algorithm
Hashi... | [
{
"code": null,
"e": 310,
"s": 169,
"text": "\nPopular Company Tags\n\nAmazon\nMicrosoft\nOracle\nSamsung\nAdobe\nSynopsys\nInfosys\nCisco\nWipro\nOla-Cabs\nMorgan-Stanley\nGoldman-Sachs\nshow more\n\n"
},
{
"code": null,
"e": 317,
"s": 310,
"text": "Amazon"
},
{
"code": ... |
4 Must-Know Python Pandas Functions for Time Series Analysis | by Soner Yıldırım | Towards Data Science | Time series data consists of data points attached to sequential time stamps. Daily sales, hourly temperature values, and second-level measurements in a chemical process are some examples of time series data.
Time series data has different characteristics than ordinary tabular data. Thus, time series analysis has its ow... | [
{
"code": null,
"e": 380,
"s": 172,
"text": "Time series data consists of data points attached to sequential time stamps. Daily sales, hourly temperature values, and second-level measurements in a chemical process are some examples of time series data."
},
{
"code": null,
"e": 641,
"... |
Construct a Full Binary Tree | Practice | GeeksforGeeks | Given two arrays that represent Preorder traversals of a Full binary tree preOrder[] and its mirror tree preOrderMirror(), your task is to complete the function constructBinaryTree(), that constructs the full binary tree using these two Preorder traversals.
Examples:
Input : preOrder[] = {1,2,4,5,3,6,7}
preOr... | [
{
"code": null,
"e": 484,
"s": 226,
"text": "Given two arrays that represent Preorder traversals of a Full binary tree preOrder[] and its mirror tree preOrderMirror(), your task is to complete the function constructBinaryTree(), that constructs the full binary tree using these two Preorder traversal... |
Compiler Design - Code Optimization | Optimization is a program transformation technique, which tries to improve the code by making it consume less resources (i.e. CPU, Memory) and deliver high speed.
In optimization, high-level general programming constructs are replaced by very efficient low-level programming codes. A code optimizing process must follow ... | [
{
"code": null,
"e": 2356,
"s": 2193,
"text": "Optimization is a program transformation technique, which tries to improve the code by making it consume less resources (i.e. CPU, Memory) and deliver high speed."
},
{
"code": null,
"e": 2542,
"s": 2356,
"text": "In optimization, hi... |
Loop through ArrayList in Java | The elements of the ArrayList can be accessed one by one by using a for loop. A program that demonstrates this is given as follows
Live Demo
import java.util.ArrayList;
import java.util.List;
public class Demo {
public static void main(String[] args) {
ArrayList<String> aList = new ArrayList<String>();
... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "The elements of the ArrayList can be accessed one by one by using a for loop. A program that demonstrates this is given as follows"
},
{
"code": null,
"e": 1204,
"s": 1193,
"text": " Live Demo"
},
{
"code": null,
"e": 163... |
7 Approaches to Validate Class Attributes in Python | by Xiaoxu Gao | Towards Data Science | Generally speaking, type checking and value checking are handled by Python in a flexible and implicit way. Python has introduced typing module since Python3 which provides runtime support for type hints. But for value checking, there is no unified way to validate values due to its many possibilities.
One of the scenari... | [
{
"code": null,
"e": 474,
"s": 172,
"text": "Generally speaking, type checking and value checking are handled by Python in a flexible and implicit way. Python has introduced typing module since Python3 which provides runtime support for type hints. But for value checking, there is no unified way to ... |
MySQL Tryit Editor v1.0 | SELECT OrderID, Quantity,
CASE WHEN Quantity > 30 THEN 'The quantity is greater than 30'
WHEN Quantity = 30 THEN 'The quantity is 30'
ELSE 'The quantity is under 30'
END AS QuantityText
FROM OrderDetails;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in th... | [
{
"code": null,
"e": 26,
"s": 0,
"text": "SELECT OrderID, Quantity,"
},
{
"code": null,
"e": 89,
"s": 26,
"text": "CASE WHEN Quantity > 30 THEN 'The quantity is greater than 30'"
},
{
"code": null,
"e": 134,
"s": 89,
"text": "WHEN Quantity = 30 THEN 'The quant... |
How to use use an array of pointers (Jagged) in C/C++? | Let us consider the following example, which uses an array of 3 integers −
Live Demo
#include <stdio.h>
const int MAX = 3;
int main () {
int var[] = {10, 100, 200};
int i;
for (i = 0; i < MAX; i++) {
printf("Value of var[%d] = %d\n", i, var[i] );
}
return 0;
}
Value of var[0] = 10
Value of var[1] ... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "Let us consider the following example, which uses an array of 3 integers −"
},
{
"code": null,
"e": 1148,
"s": 1137,
"text": " Live Demo"
},
{
"code": null,
"e": 1345,
"s": 1148,
"text": "#include <stdio.h>\nconst... |
p5.js | size() Function - GeeksforGeeks | 20 Aug, 2019
The size() function is an inbuilt function which is used to set the width and height of the element. The AUTO is used to set one dimension at a time. If the arguments of size() function are not given then it returns the width and height of the element in an object.
This function requires p5.dom library. So... | [
{
"code": null,
"e": 23990,
"s": 23962,
"text": "\n20 Aug, 2019"
},
{
"code": null,
"e": 24256,
"s": 23990,
"text": "The size() function is an inbuilt function which is used to set the width and height of the element. The AUTO is used to set one dimension at a time. If the argume... |
Find in a dictionary like structure by value with MongoDB? | You can use find() for this. Let us first create a collection with documents −
> db.findInDictionaryDemo.insertOne(
... {
... "_id":101,
... "AllCustomerDetails":
... {
... "SomeCustomerDetail1":
... {
... "CustomerName1":"John Doe",
... "CustomerName2":"Jo... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "You can use find() for this. Let us first create a collection with documents −"
},
{
"code": null,
"e": 2148,
"s": 1141,
"text": "> db.findInDictionaryDemo.insertOne(\n... {\n... \"_id\":101,\n... \"AllCustomerDetails\... |
Member variables in Java | Member variables are known as instance variables in java.
Instance variables are declared in a class, but outside a method, constructor or any block.
Instance variables are declared in a class, but outside a method, constructor or any block.
When space is allocated for an object in the heap, a slot for each instance va... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "Member variables are known as instance variables in java."
},
{
"code": null,
"e": 1212,
"s": 1120,
"text": "Instance variables are declared in a class, but outside a method, constructor or any block."
},
{
"code": null,
... |
Find the minimum absolute difference in two different BST's - GeeksforGeeks | 21 Feb, 2022
Given 2 Binary Search Trees, select one node from each tree such that their absolute difference is minimum possible. Assume each BST has at-least one node.
Examples:
Input : N1 = 7, N2 = 2
BST1 :
5
/ \
3 7
/ \ / \
2 4 6 8
BST2 :
11
... | [
{
"code": null,
"e": 24563,
"s": 24535,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 24719,
"s": 24563,
"text": "Given 2 Binary Search Trees, select one node from each tree such that their absolute difference is minimum possible. Assume each BST has at-least one node."
},
... |
Get column index from column name of a given Pandas DataFrame - GeeksforGeeks | 26 Jul, 2020
In this article we will see how to get column index from column name of a Dataframe. We will use Dataframe.columns attribute and Index.get_loc method of pandas module together.
Syntax: DataFrame.columns
Return: column names index
Syntax: Index.get_loc(key, method=None, tolerance=None)
Return: loc : int if ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n26 Jul, 2020"
},
{
"code": null,
"e": 24389,
"s": 24212,
"text": "In this article we will see how to get column index from column name of a Dataframe. We will use Dataframe.columns attribute and Index.get_loc method of pandas mod... |
C# | ToCharArray() Method - GeeksforGeeks | 31 Jan, 2019
In C#, ToCharArray() is a string method. This method is used to copy the characters from a specified string in the current instance to a Unicode character array or the characters of a specified substring in the current instance to a Unicode character array. This method can be overloaded by changing the num... | [
{
"code": null,
"e": 24103,
"s": 24075,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24441,
"s": 24103,
"text": "In C#, ToCharArray() is a string method. This method is used to copy the characters from a specified string in the current instance to a Unicode character array or... |
Replace specific values in column using regex in R | 30 Jun, 2021
In this article, we will discuss how to replace specific values in columns of dataframe in R Programming Language.
The sub() method in R programming language is a replacement method used to replace any occurrence of a pattern matched with another string. It is operative on the dataframe column or vector. I... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "In this article, we will discuss how to replace specific values in columns of dataframe in R Programming Language."
},
{
"code": null,
"e": 511,
"s": 143,
... |
Run Levels in Linux | 16 Apr, 2019
Prerequisite : Linux BootingA run level is a state of init and the whole system that defines what system services are operating. Run levels are identified by numbers. Some system administrators use run levels to define which subsystems are working, e.g., whether X is running, whether the network is operati... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Apr, 2019"
},
{
"code": null,
"e": 377,
"s": 53,
"text": "Prerequisite : Linux BootingA run level is a state of init and the whole system that defines what system services are operating. Run levels are identified by numbers. Some sy... |
How to change an input button image using CSS? | 29 Apr, 2019
The default button in HTML can be changed to an image using CSS. The required button is selected using the respective CSS selector. The background property can then be set to include a background image and change the image type as required. The border of the button can also be removed to show only the imag... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 345,
"s": 28,
"text": "The default button in HTML can be changed to an image using CSS. The required button is selected using the respective CSS selector. The background property can then be set to ... |
N process Peterson algorithm | 09 Jul, 2021
Prerequisites for this topic include an idea about synchronization among processes and how to obtain it. Also, some knowledge of the producer-consumer problems along with an idea of Peterson’s algorithm is of utmost importance.
Overview :Synchronization among the execution of various processes in any opera... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 280,
"s": 52,
"text": "Prerequisites for this topic include an idea about synchronization among processes and how to obtain it. Also, some knowledge of the producer-consumer problems along with an ... |
Uniform Initialization in C++ | 17 May, 2021
Uniform initialization is a feature in C++ 11 that allows the usage of a consistent syntax to initialize variables and objects ranging from primitive type to aggregates. In other words, it introduces brace-initialization that uses braces ({}) to enclose initializer values. The syntax is as follows:
type va... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 354,
"s": 54,
"text": "Uniform initialization is a feature in C++ 11 that allows the usage of a consistent syntax to initialize variables and objects ranging from primitive type to aggregates. In o... |
Human Activity Recognition – Using Deep Learning Model | 27 Dec, 2021
Human activity recognition using smartphone sensors like accelerometer is one of the hectic topics of research. HAR is one of the time series classification problem. In this project various machine learning and deep learning models have been worked out to get the best final result. In the same sequence, we... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 844,
"s": 54,
"text": "Human activity recognition using smartphone sensors like accelerometer is one of the hectic topics of research. HAR is one of the time series classification problem. In this ... |
How to Set Gradient and Image Backgrounds for ActionBar in Android? | 11 Jun, 2021
UI plays quite significantly to keep the user engaged within the application. The very basic starts with developing a theme for an application. Themes may apply to all the UI elements within the application, but, the first thing that the user may notice is the Action Bar. Action Bar has a theme by default.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 766,
"s": 28,
"text": "UI plays quite significantly to keep the user engaged within the application. The very basic starts with developing a theme for an application. Themes may apply to all the UI ... |
Half Adder and Half Subtractor using NAND NOR gates | 22 Feb, 2019
Implementation of Half Adder using NAND gates :Total 5 NAND gates are required to implement half adder.
Implementation of Half Adder using NOR gates :Total 5 NOR gates are required to implement half adder.
Implementation of Half Subtractor using NAND gates :Total 5 NAND gates are required to implement half... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Feb, 2019"
},
{
"code": null,
"e": 158,
"s": 54,
"text": "Implementation of Half Adder using NAND gates :Total 5 NAND gates are required to implement half adder."
},
{
"code": null,
"e": 260,
"s": 158,
"text": "I... |
How to Compare Two TreeMap Objects in Java? - GeeksforGeeks | 05 Aug, 2021
TreeMap class in java provides a way of storing key-value pairs in sorted order. The below example shows how to compare two TreeMap objects using the equals() method. It compares two TreeMap objects and returns true if both of the maps have the same mappings else returns false.
Syntax:
boolean equals(Objec... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 24147,
"s": 23868,
"text": "TreeMap class in java provides a way of storing key-value pairs in sorted order. The below example shows how to compare two TreeMap objects using the equals() meth... |
Create a queue using LinkedList class in Java | To create a queue using LinkedList class, try the following −
Queue<String> q = new LinkedList<String>();
q.offer("abc");
q.offer("def");
q.offer("ghi");
q.offer("jkl");
q.offer("mno");
q.offer("pqr");
q.offer("stu");
q.offer("vwx");
After that to print the elements, you need to use check a condition for Queue as shown... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "To create a queue using LinkedList class, try the following −"
},
{
"code": null,
"e": 1296,
"s": 1124,
"text": "Queue<String> q = new LinkedList<String>();\nq.offer(\"abc\");\nq.offer(\"def\");\nq.offer(\"ghi\");\nq.offer(\"jkl\");\... |
Java program to find the smallest number in an array | To find the smallest element of the given array, first of all, sort the array.
Compare the first two elements of the array
If the first element is greater than the second swap them.
Then, compare 2nd and 3rd elements if the second element is greater than the 3rd swap them.
Repeat this till the end of the array.
After s... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "To find the smallest element of the given array, first of all, sort the array."
},
{
"code": null,
"e": 1185,
"s": 1141,
"text": "Compare the first two elements of the array"
},
{
"code": null,
"e": 1244,
"s": 1185,
... |
I Built a Music Sheet Transcriber — Here’s How | by Haohui | Towards Data Science | The fields of machine learning and deep learning have undergone enormous transformations in the past few years and have brought about many useful applications in many areas. One area of interest is Optical Music Recognition (OMR). According to Wikipedia, OMR is a field of research that investigates how to computational... | [
{
"code": null,
"e": 694,
"s": 172,
"text": "The fields of machine learning and deep learning have undergone enormous transformations in the past few years and have brought about many useful applications in many areas. One area of interest is Optical Music Recognition (OMR). According to Wikipedia, ... |
How to do AVERAGE and MAX word embedding for LONG sentences? | by Jia Yi Chan | Towards Data Science | In the case of the BERT model we used in this experiment, we used the ESG_BERT model from https://github.com/mukut03/ESG-BERT. In this BERT model, max sequence the model can handle is only 512 tokens. Hence if your sequence is longer than 512 tokens, you require the technique called Chunking. We should also note that f... | [
{
"code": null,
"e": 638,
"s": 171,
"text": "In the case of the BERT model we used in this experiment, we used the ESG_BERT model from https://github.com/mukut03/ESG-BERT. In this BERT model, max sequence the model can handle is only 512 tokens. Hence if your sequence is longer than 512 tokens, you ... |
Tryit Editor v3.7 | Tryit: Top tooltip with bottom arrow | [] |
Java | BiFunction Interface methods – apply() and addThen() | 14 Jun, 2022
The BiFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which takes in two arguments and produces a result. Hence this functional interface which takes in 3 parameters namely:-
T: deno... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 354,
"s": 54,
"text": "The BiFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a func... |
How to Control Lottie Animations Programmatically in Android? | 23 Feb, 2021
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as JSON with Bodymovin and renders them natively on mobile. The Lottie animations are free to use vector animation files. Many famous applications use this such as Uber, Netflix, Google, Airbnb, Shopify, etc.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 743,
"s": 28,
"text": "Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as JSON with Bodymovin and renders them natively on mobile. The Lottie anima... |
Python | Kivy .kv File | 19 Oct, 2021
As when we write the application in Python kivy, to write all the things on the same code make a mess in the code and it is hard to understand that by someone another. Also writing a large code makes hard to maintain the construction of the widget tree and explicit the declaration of bindings.The KV langua... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 505,
"s": 54,
"text": "As when we write the application in Python kivy, to write all the things on the same code make a mess in the code and it is hard to understand that by someone another. Also w... |
Print all prime numbers less than or equal to N | 06 Apr, 2021
Given a number N, the task is to print all prime numbers less than or equal to N.Examples:
Input: 7
Output: 2, 3, 5, 7
Input: 13
Output: 2, 3, 5, 7, 11, 13
Naive Approach: Iterate from 2 to N, and check for prime. If it is a prime number, print the number. Below is the implementation of the above app... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 147,
"s": 54,
"text": "Given a number N, the task is to print all prime numbers less than or equal to N.Examples: "
},
{
"code": null,
"e": 214,
"s": 147,
"text": "Input: 7\nOu... |
Read CSV file and select specific rows and columns in R | 20 May, 2021
In this article, we are going to see how to read CSV file and select specific rows and columns in R Programming Language.
CSV file:
To import a CSV file into the R environment we need to use a pre-defined function called read.csv(). Pass filename.csv as a parameter within quotations. First, we need to set ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 174,
"s": 52,
"text": "In this article, we are going to see how to read CSV file and select specific rows and columns in R Programming Language."
},
{
"code": null,
"e": 184,
"s": 1... |
Supplier Interface in Java with Examples | 08 Oct, 2018
The Supplier Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which does not take in any argument but produces a value of type T.
Hence this functional interface takes in only one generic name... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2018"
},
{
"code": null,
"e": 273,
"s": 28,
"text": "The Supplier Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a functio... |
JavaScript Array join() Method | 01 Nov, 2021
Below is the example of the Array join() method.
Example:<script> function func() { var a = [ 1, 2, 3, 4, 5, 6 ]; document.write(a.join('|')); } func(); < /script>
<script> function func() { var a = [ 1, 2, 3, 4, 5, 6 ]; document.write(a.join('|')); } func(); < /s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 103,
"s": 54,
"text": "Below is the example of the Array join() method."
},
{
"code": null,
"e": 240,
"s": 103,
"text": "Example:<script> function func() { var a = [ 1,... |
C# | Byte.MaxValue Field | 23 Apr, 2019
The MaxValue field of Byte Struct is used to represent the maximum value of the byte data type. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 255. Its hexadecimal value is 0xFF.
Syntax:
public const byte MaxValue = 255;
Return Valu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2019"
},
{
"code": null,
"e": 282,
"s": 28,
"text": "The MaxValue field of Byte Struct is used to represent the maximum value of the byte data type. The value of this field is constant means that the user cannot change the value... |
Python | Pandas Index.append() | 16 Dec, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Index.append() function is used to append a single or a collection of indices together... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Dec, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Common divisors of N numbers | 26 Jan, 2022
Given an array arr[] of N integers. The task is to find all the common divisors of all N integers.Examples
Input: arr[] = {6, 90, 12, 18, 30, 18} Output: 1 2 3 6 Explanation: GCD of all the numbers is 6. Now to find all the divisors of 6, we have 6 = 1 * 6 6 = 2 * 3 Hence 1, 2, 3 and 6 the common divisor... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Jan, 2022"
},
{
"code": null,
"e": 161,
"s": 52,
"text": "Given an array arr[] of N integers. The task is to find all the common divisors of all N integers.Examples "
},
{
"code": null,
"e": 540,
"s": 161,
"text... |
Program to print all the numbers divisible by 5 or 7 for a given number | 18 Nov, 2021
Given the integer N, the task is to print all the numbers less than N, which are divisible by 5 or 7.
Examples :
Input : 20
Output : 5 7 10 14 15 20
Input: 50
Output: 5 7 10 14 15 20 21 25 28 30 35 40 42 45 49 50
Approach: For example, let’s take N = 20 as a limit, then the program should print all numb... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 156,
"s": 54,
"text": "Given the integer N, the task is to print all the numbers less than N, which are divisible by 5 or 7."
},
{
"code": null,
"e": 168,
"s": 156,
"text": "Exa... |
Using Learning Curves – ML | 17 Jul, 2020
A learning model of a Machine Learning model shows how the error in the prediction of a Machine Learning model changes as the size of the training set increases or decreases.Before we continue, we must first understand what variance and bias mean in the Machine Learning model.
Bias:It is basically nothing ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "A learning model of a Machine Learning model shows how the error in the prediction of a Machine Learning model changes as the size of the training set increases or decreases.B... |
Python program to find the Strongest Neighbour | 28 Jul, 2020
Given an array arr[] of N positive integers. The task is to find the maximum for every adjacent pair in the array.
Examples:
Input: 1 2 2 3 4 5
Output: 2 2 3 4 5
Input: 5 5
Output: 5
Approach:
Read the input array i.e,arr1.for i=1 to sizeofarray-1find the max value between arr1[i] and arr1[i-1].store the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 167,
"s": 52,
"text": "Given an array arr[] of N positive integers. The task is to find the maximum for every adjacent pair in the array."
},
{
"code": null,
"e": 177,
"s": 167,
... |
Program to print hollow rectangle or square star patterns | 06 Jun, 2022
The task is print below hollow pattern of given dimension.
********************
* *
* *
* *
* *
********************
Explanation:
Input number of rows and columns.
For rows of rectangle run the outer loop from 1 to rows.
for (i = 1; ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 113,
"s": 52,
"text": "The task is print below hollow pattern of given dimension. "
},
{
"code": null,
"e": 239,
"s": 113,
"text": "********************\n* *\n... |
Compute the Value of Poisson Quantile Function in R Programming – qpois() Function | 25 Jun, 2020
qpois() function in R Language is used to compute the value of Poisson Quantile Function. It creates a quantile density plot for poisson distribution.
Syntax: qpois(vec, lambda)
Parameters:vec: Sequence of integer valueslambda: Average number of events per interval
Example 1:
# R program to compute # Poiss... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "qpois() function in R Language is used to compute the value of Poisson Quantile Function. It creates a quantile density plot for poisson distribution."
},
{
"code": nu... |
Puzzle 40 | (Find missing Row in Excel) | 10 May, 2021
We are given an excel sheet which contains integers from 1 to 50, including both. However, the numbers are in a jumbled form and there is 1 integer missing. You have to write a code to identify the missing integer. Only the logic is required.
Solution:We know that the sum of all the numbers from 1 to n... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 295,
"s": 52,
"text": "We are given an excel sheet which contains integers from 1 to 50, including both. However, the numbers are in a jumbled form and there is 1 integer missing. You have to write... |
How to get an interactive plot of a pyplot when using PyCharm? | To get an interactive plot of a pyplot when using PyCharm, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Set the background style.
Set the background style.
Plot the data on the ax... | [
{
"code": null,
"e": 1280,
"s": 1187,
"text": "To get an interactive plot of a pyplot when using PyCharm, we can take the following steps −"
},
{
"code": null,
"e": 1356,
"s": 1280,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
... |
CSS - Fade Out Left Effect | The image come or cause to come gradually into or out of view, or to merge into another shot.
@keyframes fadeOutLeft {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(-20px);
}
}
Transform − Transform applies to 2d and 3d transformation to an el... | [
{
"code": null,
"e": 2720,
"s": 2626,
"text": "The image come or cause to come gradually into or out of view, or to merge into another shot."
},
{
"code": null,
"e": 2880,
"s": 2720,
"text": "@keyframes fadeOutLeft {\n 0% {\n opacity: 1;\n transform: translateX(0);\n ... |
C++ Program To Print All Permutations Of A Given String - GeeksforGeeks | 11 Dec, 2021
A permutation also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.
Source: Mathword(http://mathworld.wolfram.com/Permutation.html)
Below are the permutations of stri... | [
{
"code": null,
"e": 24952,
"s": 24921,
"text": " \n11 Dec, 2021\n"
},
{
"code": null,
"e": 25160,
"s": 24952,
"text": "A permutation also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S it... |
Image-to-Recipe Translation with Deep Convolutional Neural Networks | by Muriz | Towards Data Science | In this article we will look at how to train deep convolutional neural networks with Keras to classify images into food categories and to output a matching recipe. The dataset contains >800'000 food images and >300'000 recipes from chefkoch.de.
Hardly any other area affects human well-being to a similar extent as nutri... | [
{
"code": null,
"e": 416,
"s": 171,
"text": "In this article we will look at how to train deep convolutional neural networks with Keras to classify images into food categories and to output a matching recipe. The dataset contains >800'000 food images and >300'000 recipes from chefkoch.de."
},
{
... |
Introduction to React Native - GeeksforGeeks | 02 Mar, 2021
If you want to build mobile apps for both Android and iOS. What should you learn? The individual native languages for each app i.e, Java for Android and Swift/Objective-C for iOS?, Actually NO. Native Android and iOS development are quite different and can be expensive – first, the language itself is quite... | [
{
"code": null,
"e": 24757,
"s": 24729,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 25256,
"s": 24757,
"text": "If you want to build mobile apps for both Android and iOS. What should you learn? The individual native languages for each app i.e, Java for Android and Swift/Obje... |
How to zip a folder recursively using Python? | Use the zipfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively.
import os
import zipfile
def zipdir(path, ziph):
# ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.write(os.pa... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "Use the zipfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively. "
},
{
"code": null,
"e": 1513,
"s": 1205,
"text": "import os\nimport zipfile\ndef zipdir(p... |
Find largest prime factor of a number using C++. | Consider we have an element x, we have to find the largest prime factor of x. If the value of x is 6, then-largest prime factor is 3. To solve this problem, we will just factorize the number by dividing it with the divisor of a number and keep track of the maximum prime factor.
Live Demo
#include <iostream>
#include<... | [
{
"code": null,
"e": 1342,
"s": 1062,
"text": "Consider we have an element x, we have to find the largest prime factor of x. If the value of x is 6, then-largest prime factor is 3. To solve this problem, we will just factorize the number by dividing it with the divisor of a number and keep track of... |
Eliminating repeated lines from a file using Python - GeeksforGeeks | 29 Dec, 2020
Let us see how to delete several repeated lines from a file using Python’s File Handling power. If the file is small with a few lines, then the task of deleting/eliminating repeated lines from it could be done manually, but when it comes to large files, this is where Python comes to your rescue.
Approach ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 24199,
"s": 23901,
"text": "Let us see how to delete several repeated lines from a file using Python’s File Handling power. If the file is small with a few lines, then the task of deleting/el... |
Bootstrap 5 Tutorial | Bootstrap 5 is the newest version of Bootstrap, which is the most popular HTML, CSS, and JavaScript framework for creating responsive, mobile-first websites.
Bootstrap 5 is completely free to download and use!
Start learning Bootstrap 5 now »
Learn Bootstrap 5
This tutorial contains hundreds of Bootstrap 5 examples.
Wi... | [
{
"code": null,
"e": 158,
"s": 0,
"text": "Bootstrap 5 is the newest version of Bootstrap, which is the most popular HTML, CSS, and JavaScript framework for creating responsive, mobile-first websites."
},
{
"code": null,
"e": 210,
"s": 158,
"text": "Bootstrap 5 is completely free... |
Container to create a grid of Bootstrap 4 cards of equal height and width | Set a container of cards, using the card-deck class.
Work it inside the following div that would be of equal width and height −
<div class="card-deck">
<div class="card bg-primary">
<!- - One - ->
</div>
<div class="card bg-primary">
<!- - Two - ->
</div>
</div>
You can try to run the following code to implem... | [
{
"code": null,
"e": 1115,
"s": 1062,
"text": "Set a container of cards, using the card-deck class."
},
{
"code": null,
"e": 1190,
"s": 1115,
"text": "Work it inside the following div that would be of equal width and height −"
},
{
"code": null,
"e": 1335,
"s": 11... |
Pentesting of Wireless Network | Wireless systems come with a lot of flexibility but on the other hand, it leads to serious security issues too. And, how does this become a serious security issue — because attackers, in case of wireless connectivity, just need to have the availability of signal to attack rather than have the physical access as in case... | [
{
"code": null,
"e": 2531,
"s": 1857,
"text": "Wireless systems come with a lot of flexibility but on the other hand, it leads to serious security issues too. And, how does this become a serious security issue — because attackers, in case of wireless connectivity, just need to have the availability ... |
Spiral Matrix III in C++ | Suppose we have a 2 dimensional grid with R rows and C columns, we start from (r0, c0) facing east. Here, the north-west corner of the grid is at the first row and column, and the south-east corner of the grid is at the last row and column. We will walk in a clockwise spiral shape to visit every position in this grid. ... | [
{
"code": null,
"e": 1653,
"s": 1062,
"text": "Suppose we have a 2 dimensional grid with R rows and C columns, we start from (r0, c0) facing east. Here, the north-west corner of the grid is at the first row and column, and the south-east corner of the grid is at the last row and column. We will walk... |
Pattern-based recognition did help in NLP | by Edward Ma | Towards Data Science | Nowadays, everyone talks about machine learning and deep learning. Definitely, we enjoy the result from deep learning but it is extremely hungry for data. So how can we build the initialise data set? We can allocate a group of resource on labelling data but it is very expensive. Alternatively, we always use regular exp... | [
{
"code": null,
"e": 625,
"s": 171,
"text": "Nowadays, everyone talks about machine learning and deep learning. Definitely, we enjoy the result from deep learning but it is extremely hungry for data. So how can we build the initialise data set? We can allocate a group of resource on labelling data b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.