title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Why MySQL NOT NULL shouldn’t be added to primary key field? | You do not need to add NOT NULL to primary key field because it gets NOT NULL automatically. Primary key is combination of both NOT NULL and Unique Key.
Here is the demo of primary key field. Let us first create a table. The query to create a table is as follows:
mysql> create table NotNullAddDemo
-> (
-> Id int ... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "You do not need to add NOT NULL to primary key field because it gets NOT NULL automatically. Primary key is combination of both NOT NULL and Unique Key."
},
{
"code": null,
"e": 1326,
"s": 1215,
"text": "Here is the demo of primary k... |
Full-Stack AI: Building a UI for Your Latest AI Project in No Time at All | by Posey | Towards Data Science | Let’s see how we can build a Convolutional Neural Network into a user-friendly application with a clean UI. How can we integrate both training and predictions into an easy to use interface? More importantly, how can we do this without spending countless hours on technology we may not be great at. We’re Data Scientists,... | [
{
"code": null,
"e": 662,
"s": 172,
"text": "Let’s see how we can build a Convolutional Neural Network into a user-friendly application with a clean UI. How can we integrate both training and predictions into an easy to use interface? More importantly, how can we do this without spending countless h... |
Can We Use Machine Learning To Generate Text Adventure Stories? | by Jesse Freeman | Towards Data Science | Last year I started working on a little text adventure game for a 48-hour game jam called Ludum Dare. I take part in it a few times a year and even did the keynote once. While I was able to build a simple text adventure game engine in a day, I started losing steam when it came to creating the content to make it interes... | [
{
"code": null,
"e": 497,
"s": 171,
"text": "Last year I started working on a little text adventure game for a 48-hour game jam called Ludum Dare. I take part in it a few times a year and even did the keynote once. While I was able to build a simple text adventure game engine in a day, I started los... |
SOAP - Examples | In the example below, a GetQuotation request is sent to a SOAP Server over HTTP. The request has a QuotationName parameter, and a Quotation will be returned in the response.
The namespace for the function is defined in http://www.xyz.org/quotation address.
Here is the SOAP request −
POST /Quotation HTTP/1.0
Host: www.x... | [
{
"code": null,
"e": 1888,
"s": 1714,
"text": "In the example below, a GetQuotation request is sent to a SOAP Server over HTTP. The request has a QuotationName parameter, and a Quotation will be returned in the response."
},
{
"code": null,
"e": 1971,
"s": 1888,
"text": "The name... |
PyQt5 - Toggle Button - GeeksforGeeks | 22 Apr, 2020
In PyQt5 a toggle button is basically is the push button in a special state. Push button is a button when we press it do some task and get back to the normal state it is similar to key board key when we press it, it do some thing and when we release it, it comes back to its original form.
ToggleButton is a... | [
{
"code": null,
"e": 24517,
"s": 24489,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24807,
"s": 24517,
"text": "In PyQt5 a toggle button is basically is the push button in a special state. Push button is a button when we press it do some task and get back to the normal state... |
MongoDB query to set user defined variable into query? | For user-defined variables, use var keyword in MongoDB. Let us create a collection with documents −
> db.demo327.insertOne({"FirstName":"Chris","LastName":"Brown"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e516952f8647eb59e562076")
}
> db.demo327.insertOne({"FirstName":"David","LastName":"Miller"});
{
... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "For user-defined variables, use var keyword in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1763,
"s": 1162,
"text": "> db.demo327.insertOne({\"FirstName\":\"Chris\",\"LastName\":\"Brown\"});\n{\n \... |
C# Trim() Method | The Trim() method in C# is used to return a new string in which all leading and trailing occurrences of a set of specified characters from the current string are removed.
public string Trim ();
public string Trim (params char[] trimChars);
Above, the trimChars parameter is an array of Unicode characters to remove, or n... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "The Trim() method in C# is used to return a new string in which all leading and trailing occurrences of a set of specified characters from the current string are removed."
},
{
"code": null,
"e": 1302,
"s": 1233,
"text": "public stri... |
Annotate Multiple Lines of Text to ggplot2 Plot in R - GeeksforGeeks | 17 Jun, 2021
In this article, we will see how to annotate Multiple Lines of text to ggplot2 Plot in R programming language.
Let us first create a regular plot so that the difference is apparent,
Example:
R
# Load Packagelibrary("ggplot2") # Create a DataFrame DF <- data.frame(X = runif(100, min=0, max=100), ... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 24963,
"s": 24851,
"text": "In this article, we will see how to annotate Multiple Lines of text to ggplot2 Plot in R programming language. "
},
{
"code": null,
"e": 25034,
"s"... |
How to retrieve all the documents from a MongoDB collection using Java? | You can retrieve documents from an existing collection in MongoDB using the find() method.
db.coll.find()
Where,
db is the database.
db is the database.
coll is the collection (name) in which you want to insert the document
coll is the collection (name) in which you want to insert the document
Assume we have a collecti... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "You can retrieve documents from an existing collection in MongoDB using the find() method."
},
{
"code": null,
"e": 1168,
"s": 1153,
"text": "db.coll.find()"
},
{
"code": null,
"e": 1175,
"s": 1168,
"text": "Where... |
Print all the cycles in an undirected graph - GeeksforGeeks | 02 Jul, 2021
Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors
In the above diagram, the cycles have been marked with dark green color. The output for the above will be
1st cycle: 3 5 4 6 2nd cycle: 11 12 13
Approach: Using the gra... | [
{
"code": null,
"e": 26439,
"s": 26411,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 26576,
"s": 26439,
"text": "Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors "
},
{
"code": null... |
Count distinct in Pandas aggregation - GeeksforGeeks | 03 Mar, 2021
In this article, let’s see how we can count distinct in pandas aggregation. So to count the distinct in pandas aggregation we are going to use groupby() and add() method.
groupby(): This method is used to split the data into groups based on some criteria. Pandas objects can be split on any of their axes.... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 25710,
"s": 25537,
"text": "In this article, let’s see how we can count distinct in pandas aggregation. So to count the distinct in pandas aggregation we are going to use groupby() and add() ... |
Maximum Sum Subsequence of length k - GeeksforGeeks | 24 Jun, 2021
Given an array sequence [A1, A2 ...An], the task is to find the maximum possible sum of increasing subsequence S of length k such that S1<=S2<=S3.........<=Sk.
Examples:
Input : n = 8 k = 3 A=[8 5 9 10 5 6 21 8] Output : 40 Possible Increasing subsequence of Length 3 with maximum possible sum is 9 10 21
In... | [
{
"code": null,
"e": 26567,
"s": 26539,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 26727,
"s": 26567,
"text": "Given an array sequence [A1, A2 ...An], the task is to find the maximum possible sum of increasing subsequence S of length k such that S1<=S2<=S3.........<=Sk."
... |
Print Binary Equivalent of an Integer using Recursion in Java - GeeksforGeeks | 04 Nov, 2020
Given an integer number as input, we need to write a program to convert the given Integer number into an equivalent binary number by using JAVA. BigInteger class Is used for the mathematical operation which involves very big integer calculations that are outside the limit of all available primitive data ty... | [
{
"code": null,
"e": 25861,
"s": 25833,
"text": "\n04 Nov, 2020"
},
{
"code": null,
"e": 26173,
"s": 25861,
"text": "Given an integer number as input, we need to write a program to convert the given Integer number into an equivalent binary number by using JAVA. BigInteger class I... |
Go Keywords - GeeksforGeeks | 03 Feb, 2020
Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as an identifier. Doing this will result in a compile-time error.
Example:
// Go program to illustrate the// use of keywordspacka... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n03 Feb, 2020"
},
{
"code": null,
"e": 26419,
"s": 26175,
"text": "Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not ... |
Check if a point is inside, outside or on the ellipse in C++ | Suppose, one ellipse is given (the center coordinate (h, k) and semi-major axis a, and semi-minor axis b), another point is also given. We have to find whether the point is inside the ellipse or not. To solve it, we have to solve the following equation for the given point (x, y).
(x−h)2a2+(y−k)2b2≤1
If the result is le... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "Suppose, one ellipse is given (the center coordinate (h, k) and semi-major axis a, and semi-minor axis b), another point is also given. We have to find whether the point is inside the ellipse or not. To solve it, we have to solve the following equation ... |
How to remove Tableau Server users who own content | by Elliott Stam | Towards Data Science | This is also covered in our YouTube channel (Devyx): check it out.
Breakups are hard. Tableau users come and go, and lucky for us we have some tools at our fingertips that can help us make a clean break to avoid the unpleasant nuances of dealing with orphaned content.
This article explores one approach to making the re... | [
{
"code": null,
"e": 239,
"s": 172,
"text": "This is also covered in our YouTube channel (Devyx): check it out."
},
{
"code": null,
"e": 441,
"s": 239,
"text": "Breakups are hard. Tableau users come and go, and lucky for us we have some tools at our fingertips that can help us ma... |
How to Convert CSV to Excel in Node.js ? - GeeksforGeeks | 30 Jun, 2021
NodeJS has become one of the famous backend frameworks for development. So in this article, we’ll see one of its use to convert CSV into Excel
We will use CSVtoExcel npm package to do the conversion of files. It provides convertCsvToXlsx function to implement the conversion.
convertCsvToXlsx(source, destin... | [
{
"code": null,
"e": 25028,
"s": 25000,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 25171,
"s": 25028,
"text": "NodeJS has become one of the famous backend frameworks for development. So in this article, we’ll see one of its use to convert CSV into Excel"
},
{
"code"... |
Flutter - State Management | Managing state in an application is one of the most important and necessary process in the life cycle of an application.
Let us consider a simple shopping cart application.
User will login using their credentials into the application.
User will login using their credentials into the application.
Once user is logged in,... | [
{
"code": null,
"e": 2339,
"s": 2218,
"text": "Managing state in an application is one of the most important and necessary process in the life cycle of an application."
},
{
"code": null,
"e": 2391,
"s": 2339,
"text": "Let us consider a simple shopping cart application."
},
{... |
C++ | Operator Overloading | Question 3 - GeeksforGeeks | 28 Jun, 2021
Which of the following operators are overloaded by default by the compiler in every user defined classes even if user has not written?
1) Comparison Operator ( == )
2) Assignment Operator ( = )
(A) Both 1 and 2(B) Only 1(C) Only 2(D) None of the twoAnswer: (C)Explanation: Assign operator is by default ava... | [
{
"code": null,
"e": 24729,
"s": 24701,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24864,
"s": 24729,
"text": "Which of the following operators are overloaded by default by the compiler in every user defined classes even if user has not written?"
},
{
"code": null,
... |
W3.CSS - Buttons | W3.CSS has a very beautiful and responsive CSS for customizing the look of a button. The following CSS are used −
w3-btn
Represents a standard button. Can be used to style a link as button as well.
w3-btn-floating
Represents a floating button being circular in design.
w3-btn-floating-large
Represents a large floating b... | [
{
"code": null,
"e": 2023,
"s": 1909,
"text": "W3.CSS has a very beautiful and responsive CSS for customizing the look of a button. The following CSS are used −"
},
{
"code": null,
"e": 2030,
"s": 2023,
"text": "w3-btn"
},
{
"code": null,
"e": 2107,
"s": 2030,
... |
Are array members deeply copied in C++? | In case of C/C++, we can be able to assign a struct (or class in C++ only) variable to another variable of same type. At the time when we assign a struct variable to another, all members of the variable are copied to the other struct variable. In this case the question is arisen what happens when the structure consists... | [
{
"code": null,
"e": 1396,
"s": 1062,
"text": "In case of C/C++, we can be able to assign a struct (or class in C++ only) variable to another variable of same type. At the time when we assign a struct variable to another, all members of the variable are copied to the other struct variable. In this c... |
How to remove a function from an object in JavaScript? | JSON.stringify() method not only stringifies an object but also removes any function present in an object. Lets' discuss it in detail.
In the following example, the property 'designation' is a function so when we tried to stringify the object, the function was removed and other properties were displayed as shown in the... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "JSON.stringify() method not only stringifies an object but also removes any function present in an object. Lets' discuss it in detail."
},
{
"code": null,
"e": 1391,
"s": 1197,
"text": "In the following example, the property 'designa... |
Check if array contains contiguous integers with duplicates allowed - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 419,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
Fitting Shelves Problem | 11 Jun, 2022
Given length of wall w and shelves of two lengths m and n, find the number of each type of shelf to be used and the remaining empty space in the optimal solution so that the empty space is minimum. The larger of the two shelves is cheaper so it is preferred. However cost is secondary and first priority is ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jun, 2022"
},
{
"code": null,
"e": 394,
"s": 54,
"text": "Given length of wall w and shelves of two lengths m and n, find the number of each type of shelf to be used and the remaining empty space in the optimal solution so that the ... |
How can we set PRIMARY KEY on multiple columns of an existing MySQL table? | We can set PRIMARY KEY constraint on multiple columns of an existing table by using ADD keyword along with ALTER TABLE statement.
Suppose we have a table ‘Room_allotment’ as follows −
mysql> Create table Room_allotment(Id Int, Name Varchar(20), RoomNo Int);
Query OK, 0 rows affected (0.20 sec)
mysql> Describe Room_all... | [
{
"code": null,
"e": 1317,
"s": 1187,
"text": "We can set PRIMARY KEY constraint on multiple columns of an existing table by using ADD keyword along with ALTER TABLE statement."
},
{
"code": null,
"e": 1371,
"s": 1317,
"text": "Suppose we have a table ‘Room_allotment’ as follows ... |
Joining Excel Data from Multiple files using Python Pandas | 17 Aug, 2020
Let us see how to join the data of two excel files and save the merged data as a new Excel file.
We have 2 files, registration details.xlsx and exam results.xlsx.
registration details.xlsx
We are having 7 columns in this file with 14 unique students details. Column names are as follows :
Admission Date
Na... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Aug, 2020"
},
{
"code": null,
"e": 150,
"s": 52,
"text": "Let us see how to join the data of two excel files and save the merged data as a new Excel file."
},
{
"code": null,
"e": 216,
"s": 150,
"text": "We have... |
Populate Inorder Successor for all nodes | 06 Jun, 2022
Given a Binary Tree where each node has the following structure, write a function to populate the next pointer for all nodes. The next pointer for every node should be set to point to inorder successor.
C++
C
Java
Python3
C#
Javascript
class node {public: int data; node* left; node* right; node... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 257,
"s": 54,
"text": "Given a Binary Tree where each node has the following structure, write a function to populate the next pointer for all nodes. The next pointer for every node should be set to... |
Find a way to fill matrix with 1’s and 0’s in blank positions | 31 May, 2022
Given an N * M matrix mat[][] which consists of two types of characters ‘.’ and ‘_’. The task is to fill the matrix in positions where it contains ‘.’ with 1‘s and 0‘s. Fill the matrix in such a way that no two adjacent cells contain the same number and print the modified matrix.Examples:
Input: mat[][] ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 320,
"s": 28,
"text": "Given an N * M matrix mat[][] which consists of two types of characters ‘.’ and ‘_’. The task is to fill the matrix in positions where it contains ‘.’ with 1‘s and 0‘s. Fill t... |
Creating Custom Widgets in PyQt5 | 11 May, 2020
PyQt5 is one of the most advanced GUI library for Python. While being powerful, it’s also well structured and makes it easy for you to build ‘advanced’ items. Custom widgets in PyQt5 is a breeze.
The below has a well-described way of building custom Widgets with PyQt5,
The Main WindowLet’s start by creatin... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 248,
"s": 52,
"text": "PyQt5 is one of the most advanced GUI library for Python. While being powerful, it’s also well structured and makes it easy for you to build ‘advanced’ items. Custom widgets ... |
React-Bootstrap Accordion Component | 18 May, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. Accordion Component provides a way to control our card components so that we can open them one at a time. We can use the following approach in ReactJS to use the react-bootstrap Accordion Component.
Accordion Props:
activeKey... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Accordion Component provides a way to control our card components so that we can open them on... |
Deepl – Command Line Language Translator Tool for Linux | 14 Feb, 2021
Deepl is the best language translator command-line tool that detects the language of input text and translates it into the desired language using advanced machine learning and neural networking algorithms. It is open source and powered by a German tech Company under the MIT license.
It supports the followi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2021"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "Deepl is the best language translator command-line tool that detects the language of input text and translates it into the desired language using advanced machine learning and... |
PostgreSQL - LIMIT Clause | The PostgreSQL LIMIT clause is used to limit the data amount returned by the SELECT statement.
The basic syntax of SELECT statement with LIMIT clause is as follows −
SELECT column1, column2, columnN
FROM table_name
LIMIT [no of rows]
The following is the syntax of LIMIT clause when it is used along with OFFSET clause... | [
{
"code": null,
"e": 3055,
"s": 2959,
"text": "The PostgreSQL LIMIT clause is used to limit the data amount returned by the SELECT statement."
},
{
"code": null,
"e": 3126,
"s": 3055,
"text": "The basic syntax of SELECT statement with LIMIT clause is as follows −"
},
{
"... |
Box plot in R using ggplot2 | 15 Dec, 2021
In this article, we are going to create a Boxplot with various functionality in R programming language using the ggplot2 package.
For data distributions, you may require more information than central tendency values (median, mean, mode). To analyze data variability, you need to know how dispersed the data... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 183,
"s": 52,
"text": "In this article, we are going to create a Boxplot with various functionality in R programming language using the ggplot2 package. "
},
{
"code": null,
"e": 766,
... |
CSS Box model | 11 Oct, 2021
The CSS box model is a container that contains multiple properties including borders, margin, padding, and the content itself. It is used to create the design and layout of web pages. It can be used as a toolkit for customizing the layout of different elements. The web browser renders every element as a re... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 480,
"s": 54,
"text": "The CSS box model is a container that contains multiple properties including borders, margin, padding, and the content itself. It is used to create the design and layout of w... |
Python – Invoking Functions with and without Parentheses | 08 May, 2020
Functions in Python are the defined blocks of code that perform a specific task. In this section, we will discuss the difference in invoking functions with and without Parentheses.
When we call a function with parentheses, the function gets execute and returns the result to the callable.
In another case, w... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 235,
"s": 54,
"text": "Functions in Python are the defined blocks of code that perform a specific task. In this section, we will discuss the difference in invoking functions with and without Parent... |
Ideological Differences Between Gandhi and Ambedkar | 24 Jun, 2022
The depressed classes so-called untouchables were one of the most debatable topics during the 1930s because of discussion on the separate electorate to the depressed classes. Gandhi and Ambedkar both declared themselves the leader of the depressed classes in India. They both shared many ideas, although in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 863,
"s": 28,
"text": "The depressed classes so-called untouchables were one of the most debatable topics during the 1930s because of discussion on the separate electorate to the depressed classes. ... |
Difference Between lapply() VS sapply() in R | 16 Jan, 2022
A list in R Programming Language can be passed as an argument in lapply() and sapply() functions. It is quite helpful to perform some of the general operations like calculation of sum, cumulative sum, mean, etc of the elements in the objects held by a list.
Using “for” loop in R for iterating over a lis... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jan, 2022"
},
{
"code": null,
"e": 313,
"s": 52,
"text": "A list in R Programming Language can be passed as an argument in lapply() and sapply() functions. It is quite helpful to perform some of the general operations like calculati... |
Mid-point Formula in Coordinate Geometry | 26 Oct, 2020
In geometry, a mid-point is the middle point of a line segment which is equidistant from both the endpoints. That point bisects the line into two equal halves. There are instances in Coordinate Geometry that we need to know the mid-point of two given points or mid-point of a line segment. In a cartesian pl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Oct, 2020"
},
{
"code": null,
"e": 514,
"s": 54,
"text": "In geometry, a mid-point is the middle point of a line segment which is equidistant from both the endpoints. That point bisects the line into two equal halves. There are inst... |
Permute the elements of an array following given order | 25 May, 2022
A permutation is a rearrangement of members of a sequence into a new sequence. For example, there are 24 permutations of [a, b, c, d]. Some of them are [b, a, d, c], [d, a, b, c] and [a, d, b, c]. A permutation can be specified by an array P[] where P[i] represents the location of the element at index i in... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 750,
"s": 54,
"text": "A permutation is a rearrangement of members of a sequence into a new sequence. For example, there are 24 permutations of [a, b, c, d]. Some of them are [b, a, d, c], [d, a, b... |
C++ bitset and its application - GeeksforGeeks | 04 Sep, 2018
A bitset is an array of bool but each Boolean value is not stored separately instead bitset optimizes the space such that each bool takes 1 bit space only, so space taken by bitset bs is less than that of bool bs[N] and vector bs(N). However, a limitation of bitset is, N must be known at compile time, i.e.... | [
{
"code": null,
"e": 24978,
"s": 24950,
"text": "\n04 Sep, 2018"
},
{
"code": null,
"e": 25359,
"s": 24978,
"text": "A bitset is an array of bool but each Boolean value is not stored separately instead bitset optimizes the space such that each bool takes 1 bit space only, so spac... |
Count of distinct Numbers that can be formed by chess knight in N moves on a mobile keypad - GeeksforGeeks | 11 Feb, 2022
Given an integer N and a chess knight placed in mobile keypad. The task is to count the total distinct N digit numbers which can be formed by the chess knight with N moves. As the answer can be very large give the value of answer modulo 109 + 7.
Note: In each move a chess knight can move 2 units horizontal... | [
{
"code": null,
"e": 26168,
"s": 26140,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 26414,
"s": 26168,
"text": "Given an integer N and a chess knight placed in mobile keypad. The task is to count the total distinct N digit numbers which can be formed by the chess knight with... |
Python vs. Goats: Monty Hall revisited | by Norbert Widmann | Towards Data Science | The photo of playing Pandas notwithstanding, we going to talk about the Monty Hall problem here. This problem is famous in statistics and probably has introduced the majority of statistics courses in university, online or anywhere. What most people including me learn from this problem is that statistical or probabilist... | [
{
"code": null,
"e": 549,
"s": 47,
"text": "The photo of playing Pandas notwithstanding, we going to talk about the Monty Hall problem here. This problem is famous in statistics and probably has introduced the majority of statistics courses in university, online or anywhere. What most people includi... |
MySQL query to find a match and fetch records | To find a match from records, use MySQL IN(). Let us first create a table −
mysql> create table DemoTable
(
Id int,
FirstName varchar(20),
Gender ENUM('Male','Female')
);
Query OK, 0 rows affected (1.73 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(1,'Chris','... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To find a match from records, use MySQL IN(). Let us first create a table −"
},
{
"code": null,
"e": 1279,
"s": 1138,
"text": "mysql> create table DemoTable\n(\n Id int,\n FirstName varchar(20),\n Gender ENUM('Male','Female')\n... |
Conversion Functions in Pandas DataFrame - GeeksforGeeks | 25 Jul, 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. In this article, we are using “nba.csv” file to download the CSV, click here.
DataFrame.astyp... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n25 Jul, 2019"
},
{
"code": null,
"e": 24584,
"s": 24292,
"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... |
How to scroll the Page up or down in Selenium WebDriver using java? | We can scroll the page up or down in Selenium webdriver using Java. This is achieved with the help of the Actions class. First of all, we have to create an object of this Actions class and then apply the sendKeys method to it.
Now, to scroll down a page, we have to pass the parameter Keys.PAGE_DOWN to this method. To a... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "We can scroll the page up or down in Selenium webdriver using Java. This is achieved with the help of the Actions class. First of all, we have to create an object of this Actions class and then apply the sendKeys method to it."
},
{
"code": null... |
Delete a CSV Column in Python - GeeksforGeeks | 02 Feb, 2021
The comma-separated values (CSV) file is a delimited text file that uses commas for individual values. Each line of the file is a data record in CSV. This format used for tabular data, rows, and columns, exactly like a spreadsheet. The CSV file stores data in rows and the values in each row are separat... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 24263,
"s": 23901,
"text": "The comma-separated values (CSV) file is a delimited text file that uses commas for individual values. Each line of the file is a data record in CSV. This format... |
Spring Cloud - Synchronous Communication with Feign | In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. In this section, we will look at how services can communicate by synchronous API calls.
Although this sounds simple, as part of making API calls, we need to take care of the f... | [
{
"code": null,
"e": 2111,
"s": 1878,
"text": "In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. In this section, we will look at how services can communicate by synchronous API calls."
},
{
"code"... |
Checking list of all available schema in SAP HANA | This can be checked using below SQL query and it will display all the available schema in HANA system.
select distinct BASE_SCHEMA_NAME from "SYS"."OBJECT_DEPENDENCIES" | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "This can be checked using below SQL query and it will display all the available schema in HANA system."
},
{
"code": null,
"e": 1231,
"s": 1165,
"text": "select distinct BASE_SCHEMA_NAME from \"SYS\".\"OBJECT_DEPENDENCIES\""
}
] |
Implement a stack from a LinkedList in Java | A stack can be implemented using a LinkedList by managing the LinkedList as a stack. This is done by using a class Stack which contains some of the Stack methods such as push(), top(), pop() etc.
A program that demonstrates this is given as follows −
Live Demo
import java.util.LinkedList;
class Stack {
private Link... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "A stack can be implemented using a LinkedList by managing the LinkedList as a stack. This is done by using a class Stack which contains some of the Stack methods such as push(), top(), pop() etc."
},
{
"code": null,
"e": 1313,
"s": 1258,... |
Java Program for n-th Fibonacci numbers - GeeksforGeeks | 01 Apr, 2019
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation
Fn = Fn-1 + Fn-2
with seed values
F0 = 0 and F1 = 1.
Method 1 ( Use recursion )
// Fibonacci Series using Recursionclass Fibonacci { static int fib(int n) { if (n <= 1) return n;... | [
{
"code": null,
"e": 24331,
"s": 24303,
"text": "\n01 Apr, 2019"
},
{
"code": null,
"e": 24429,
"s": 24331,
"text": "In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation"
},
{
"code": null,
"e": 24450,
"s": 24429,
"... |
COMPARE Instructions in 8085 - GeeksforGeeks | 01 Nov, 2018
COMPARE is an important instruction widely used in 8085 microprocessor. The 8085 instruction set has two types of Compare operations: Compare with accumulator (CMP) and Compare immediate with accumulator (CPI).
The microprocessor compares a data byte (or register/memory contents) with the contents of the a... | [
{
"code": null,
"e": 24439,
"s": 24411,
"text": "\n01 Nov, 2018"
},
{
"code": null,
"e": 24650,
"s": 24439,
"text": "COMPARE is an important instruction widely used in 8085 microprocessor. The 8085 instruction set has two types of Compare operations: Compare with accumulator (CMP... |
How to check if the file is empty using PowerShell? | To check if the file is empty using PowerShell, we can use the string method called IsNullorWhiteSpace(). This method provides result true if the file is empty or only contains the white spaces otherwise false.
For example, We have a test2.txt text file which has whitespaces.
[String]::IsNullOrWhiteSpace((Get-content C... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "To check if the file is empty using PowerShell, we can use the string method called IsNullorWhiteSpace(). This method provides result true if the file is empty or only contains the white spaces otherwise false."
},
{
"code": null,
"e": 1339,... |
Deep Learning — German Traffic Sign dataset with Keras | by Navin krishnakumar | Towards Data Science | Deep Learning course offered by New York Data Science Academy is great to get you started on your journey with deep learning and also encourages you to do a full fledged deep learning project. I decided to do an image recognition challenge using the German Traffic sign data set. I have never worked on image recognition... | [
{
"code": null,
"e": 567,
"s": 172,
"text": "Deep Learning course offered by New York Data Science Academy is great to get you started on your journey with deep learning and also encourages you to do a full fledged deep learning project. I decided to do an image recognition challenge using the Germa... |
Sort array of objects by string property value - JavaScript | Suppose, we have an array of Objects like this −
const arr = [
{ first_name: 'Lazslo', last_name: 'Jamf' },
{ first_name: 'Pig', last_name: 'Bodine' },
{ first_name: 'Pirate', last_name: 'Prentice' }
];
We are required to write a JavaScript function that takes in one such array and sort this array acc... | [
{
"code": null,
"e": 1111,
"s": 1062,
"text": "Suppose, we have an array of Objects like this −"
},
{
"code": null,
"e": 1283,
"s": 1111,
"text": "const arr = [\n { first_name: 'Lazslo', last_name: 'Jamf' },\n { first_name: 'Pig', last_name: 'Bodine' },\n { first_n... |
Flask App Routing - GeeksforGeeks | 27 Oct, 2021
App Routing means mapping the URLs to a specific function that will handle the logic for that URL. Modern web frameworks use more meaningful URLs to help users remember the URLs and make navigation simpler.
Example: In our application, the URL (“/”) is associated with the root URL. So if our site’s domain... | [
{
"code": null,
"e": 24214,
"s": 24186,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 24422,
"s": 24214,
"text": "App Routing means mapping the URLs to a specific function that will handle the logic for that URL. Modern web frameworks use more meaningful URLs to help users rem... |
Reading an image using Python OpenCv module | In OpenCv module,we can use the function cv2.imread() to read an image. When inputting the image path, the image should be in the working directory or a full path of image should be given.
cv2.IMREAD_COLOR − This function loads a color image and any transparency of image will be neglected. It is the default flag.
cv2.I... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "In OpenCv module,we can use the function cv2.imread() to read an image. When inputting the image path, the image should be in the working directory or a full path of image should be given."
},
{
"code": null,
"e": 1377,
"s": 1251,
"t... |
How to know which storage engine is used in MongoDB?
| To know which storage engine is used in MongoDB, you can use storageEngine. The syntax is as follows −
db.serverStatus().storageEngine;
To know all the configuration details of storage engine, you can use the following syntax:
db.serverStatus().yourStorageEngineName;
Let us implement the above syntax to know which stor... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "To know which storage engine is used in MongoDB, you can use storageEngine. The syntax is as follows −"
},
{
"code": null,
"e": 1198,
"s": 1165,
"text": "db.serverStatus().storageEngine;"
},
{
"code": null,
"e": 1289,
... |
Count the number of possible triangles | Practice | GeeksforGeeks | Given an unsorted array arr[] of n positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles.
Example 1:
Input:
n = 3
arr[] = {3, 5, 4}
Output:
1
Explanation:
A triangle is possible
with all the elements 5, 3 and 4.
Example 2:
Inpu... | [
{
"code": null,
"e": 417,
"s": 238,
"text": "Given an unsorted array arr[] of n positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. "
},
{
"code": null,
"e": 428,
"s": 417,
"text": "Example... |
How to “read_csv” with Pandas. Use read_csv as a versatile tool | by Soner Yıldırım | Towards Data Science | The most time-consuming part of a data science project is data cleaning and preparation. Pandas is a very powerful and versatile Python data analysis library that expedites the preprocessing steps of your project. We usually tend to use functions with default parameters which prevents us from taking full advantage of t... | [
{
"code": null,
"e": 505,
"s": 172,
"text": "The most time-consuming part of a data science project is data cleaning and preparation. Pandas is a very powerful and versatile Python data analysis library that expedites the preprocessing steps of your project. We usually tend to use functions with def... |
SHA in Python | In this tutorial, we are going to learn about the hashlib module that gives us different SHA.
(Secure Hash Algorithms) is set of cryptographic hash functions.
Let's install the module by typing the following command.
pip install hashlib
We can see the available algorithms in the hashlib module using algorithms_guarante... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "In this tutorial, we are going to learn about the hashlib module that gives us different SHA.\n(Secure Hash Algorithms) is set of cryptographic hash functions."
},
{
"code": null,
"e": 1279,
"s": 1221,
"text": "Let's install the modu... |
How to shade the regions between the curves in Matplotlib? | To shade the regions between curves, we can use the fill_between() method.
Initialize the variable n. Initiliize x and y data points using numpy.
Initialize the variable n. Initiliize x and y data points using numpy.
Create a figure and a set of subplots, fig and ax.
Create a figure and a set of subplots, fig and ax.
P... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To shade the regions between curves, we can use the fill_between() method."
},
{
"code": null,
"e": 1208,
"s": 1137,
"text": "Initialize the variable n. Initiliize x and y data points using numpy."
},
{
"code": null,
"e":... |
'abstract' keyword in Java | 'abstract' keyword is used to declare the method or a class as abstract.
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 abs... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "'abstract' keyword is used to declare the method or a class as abstract."
},
{
"code": null,
"e": 1229,
"s": 1135,
"text": "A class which contains the abstract keyword in its declaration is known as an abstract class."
},
{
"... |
How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell? | Internet Explorer (IE) supports the enhanced protection mode for more security of the browser and the same can be enabled/disabled using PowerShell. Let see when we can find this setting in IE.
Internet Explorer → Internet Options → Advanced → Enable Enhanced Protection Mode
We can modify this setting using PowerShell ... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "Internet Explorer (IE) supports the enhanced protection mode for more security of the browser and the same can be enabled/disabled using PowerShell. Let see when we can find this setting in IE."
},
{
"code": null,
"e": 1338,
"s": 1256,
... |
Import Modules From Another Folder in Python - GeeksforGeeks | 17 Jun, 2021
In this article, we are going to see how to import a module from another folder, While working on big projects we may confront a situation where we want to import a module from a different directory, here we will see the different ways to import a module form different folder.
It can be done in two ways:
U... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25815,
"s": 25537,
"text": "In this article, we are going to see how to import a module from another folder, While working on big projects we may confront a situation where we want to import ... |
Find all divisors of a natural number | Set 2 - GeeksforGeeks | 11 Jan, 2022
Given a natural number n, print all distinct divisors of it.
Examples:
Input : n = 10
Output: 1 2 5 10
Input: n = 100
Output: 1 2 4 5 10 20 25 50 100
Input: n = 125
Output: 1 5 25 125
We strongly recommend referring to the below article as a prerequisite. Find all divisors of a natural n... | [
{
"code": null,
"e": 25971,
"s": 25943,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 26032,
"s": 25971,
"text": "Given a natural number n, print all distinct divisors of it."
},
{
"code": null,
"e": 26043,
"s": 26032,
"text": "Examples: "
},
{
"cod... |
How to use multiple UX Widgets in kivy | Python - 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.
Classical user in... | [
{
"code": null,
"e": 25575,
"s": 25547,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 25812,
"s": 25575,
"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 application... |
SimpleAdapter in Android with Example - GeeksforGeeks | 16 Feb, 2021
In Android, whenever we want to bind some data which we get from any data source (e.g. ArrayList, HashMap, SQLite, etc.) with a UI component(e.g. ListView, GridView, etc.) then Adapter comes into the picture. Basically Adapter acts as a bridge between the UI component and data sources. Here Simple Adapter ... | [
{
"code": null,
"e": 25705,
"s": 25677,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 26483,
"s": 25705,
"text": "In Android, whenever we want to bind some data which we get from any data source (e.g. ArrayList, HashMap, SQLite, etc.) with a UI component(e.g. ListView, GridVie... |
Activity Aliases in Android to Preserve Launchers - GeeksforGeeks | 21 Nov, 2021
Before moving on to the topic, pick up your mobile phones and count the number of applications that you are having on your device. All of you must have more than 30 applications on average. But out of these 30 apps, we only use 5–6 applications on a regular basis. Other applications are rarely used but are... | [
{
"code": null,
"e": 26406,
"s": 26378,
"text": "\n21 Nov, 2021"
},
{
"code": null,
"e": 27817,
"s": 26406,
"text": "Before moving on to the topic, pick up your mobile phones and count the number of applications that you are having on your device. All of you must have more than 3... |
Python | Count occurrence of all elements of list in a tuple - GeeksforGeeks | 15 Mar, 2019
Given a tuple and a list as input, write a Python program to count the occurrences of all items of the list in the tuple.
Examples:
Input : tuple = ('a', 'a', 'c', 'b', 'd')
list = ['a', 'b']
Output : 3
Input : tuple = (1, 2, 3, 1, 4, 6, 7, 1, 4)
list = [1, 4, 7]
Output : 6
Approach #1 ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n15 Mar, 2019"
},
{
"code": null,
"e": 25659,
"s": 25537,
"text": "Given a tuple and a list as input, write a Python program to count the occurrences of all items of the list in the tuple."
},
{
"code": null,
"e": 2566... |
Find the maximum sum of Plus shape pattern in a 2-D array - GeeksforGeeks | 17 May, 2021
Given a 2-D array of size N*M where, . The task is to find the maximum value achievable by a + shaped pattern. The elements of the array can be negative.The plus(+) shape pattern is formed by taking any element with co-ordinate (x, y) as a center and then expanding it in all four directions(if possible). A... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 26568,
"s": 26067,
"text": "Given a 2-D array of size N*M where, . The task is to find the maximum value achievable by a + shaped pattern. The elements of the array can be negative.The plus(+... |
Difference between Dilation and Erosion - GeeksforGeeks | 12 Aug, 2021
Dilation and Erosion are basic morphological processing operations that produce contrasting results when applied to either gray-scale or binary images.
Dilation: Dilation is the reverse process with regions growing out from their boundaries.Dilation is A XOR B.
Dilation is A XOR B.
Erosion: Erosion involve... | [
{
"code": null,
"e": 26240,
"s": 26212,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 26392,
"s": 26240,
"text": "Dilation and Erosion are basic morphological processing operations that produce contrasting results when applied to either gray-scale or binary images."
},
{
... |
How to Use Different Row Methods to Get Number of Rows in a Table in JDBC? - GeeksforGeeks | 18 Nov, 2021
Java supports many databases and for each database, we need to have their respective jar files to be placed in the build path to proceed for JDBC connectivity. For different databases, different jar files are imported to make a connection given below or their built path is supposed to be added for specific... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 25544,
"s": 25225,
"text": "Java supports many databases and for each database, we need to have their respective jar files to be placed in the build path to proceed for JDBC connectivity. For... |
How to set ASCII Characters in MaskedTextBox in C#? - GeeksforGeeks | 26 Jul, 2019
In C#, MaskedTextBox control gives a validation procedure for the user input on the form like date, phone numbers, etc. Or in other words, it is used to provide a mask which differentiates between proper and improper user input. In MaskedTextBox control, you are allowed to insert ASCII or non-ASCII(arbitra... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 26229,
"s": 25547,
"text": "In C#, MaskedTextBox control gives a validation procedure for the user input on the form like date, phone numbers, etc. Or in other words, it is used to provide a ... |
Introduction to Programming Languages - GeeksforGeeks | 31 Aug, 2021
Are you aiming to become a software engineer one day? Do you also want to develop a mobile application that people all over the world would love to use? Are you passionate enough to take the big step to enter the world of programming? Then you are in the right place because through this article you will ge... | [
{
"code": null,
"e": 25777,
"s": 25749,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 26463,
"s": 25777,
"text": "Are you aiming to become a software engineer one day? Do you also want to develop a mobile application that people all over the world would love to use? Are you pa... |
Removing spaces from a string using Stringstream - GeeksforGeeks | 13 Aug, 2021
Solution to removing spaces from a string is already posted here. In this article another solution using stringstream is discussed.
Algorithm:
1. Enter the whole string into stringstream.
2. Empty the string.
3. Extract word by word and concatenate to the string.
Program 1: Using EOF.
CPP
// C++ program... | [
{
"code": null,
"e": 25887,
"s": 25859,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 26020,
"s": 25887,
"text": "Solution to removing spaces from a string is already posted here. In this article another solution using stringstream is discussed. "
},
{
"code": null,
... |
jQuery | select() with Examples - GeeksforGeeks | 13 Feb, 2019
The select() method is an inbuilt method in jQuery which is used when some letters or words are selected (or marked) in a text area or a text field.
Syntax:
$(selector).select(function);
Parameter: This method accepts single parameter function which is optional. Th function parameter will run after select ... | [
{
"code": null,
"e": 26606,
"s": 26578,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 26755,
"s": 26606,
"text": "The select() method is an inbuilt method in jQuery which is used when some letters or words are selected (or marked) in a text area or a text field."
},
{
... |
Python | Pandas MultiIndex.swaplevel() - GeeksforGeeks | 24 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 MultiIndex.swaplevel() function is used to swap levels of the MultiIndex. It swap leve... | [
{
"code": null,
"e": 26163,
"s": 26135,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 26377,
"s": 26163,
"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... |
C# | Convert.ToBase64String() Method | Set-1 - GeeksforGeeks | 03 Apr, 2019
Convert.ToBase64String() Method is used to convert the value of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with base-64 digits. There are 4 methods in the overload of this method which are as follows:
ToBase64String(Byte[], Int32, Int32) Method
ToBase64Stri... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n03 Apr, 2019"
},
{
"code": null,
"e": 25798,
"s": 25547,
"text": "Convert.ToBase64String() Method is used to convert the value of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with b... |
Number of strings that satisfy the given condition - GeeksforGeeks | 02 Jun, 2021
Given N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have an index position such that the digit at this index position is greater than the digits at same index position of all the other strings.Examples:
Input: arr[] = {“223”, “232”, ... | [
{
"code": null,
"e": 26281,
"s": 26253,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26558,
"s": 26281,
"text": "Given N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have an index position such that the di... |
Replacing column value of a CSV file in Python - GeeksforGeeks | 02 Sep, 2020
Let us see how we can replace the column value of a CSV file in Python. CSV file is nothing but a comma-delimited file.
Method 1: Using Native Python way
Using replace() method, we can replace easily a text into another text. In the below code, let us have an input CSV file as “csvfile.csv” and be opened... | [
{
"code": null,
"e": 26230,
"s": 26202,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 26350,
"s": 26230,
"text": "Let us see how we can replace the column value of a CSV file in Python. CSV file is nothing but a comma-delimited file."
},
{
"code": null,
"e": 26385,... |
How to dismiss the dialog with click on outside of the dialog? | This example demonstrate about how to dismiss the dialog with click on outside of the dialog
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 = ... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrate about how to dismiss the dialog with click on outside of the dialog"
},
{
"code": null,
"e": 1284,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
Large input field with Bootstrap | Use the .input-lg class to set large input field in Bootstrap.
You can try to run the following code to implement .input-lg class −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset = "utf-8">
<meta name = "viewport" content = "width = device-width, in... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Use the .input-lg class to set large input field in Bootstrap."
},
{
"code": null,
"e": 1194,
"s": 1125,
"text": "You can try to run the following code to implement .input-lg class −"
},
{
"code": null,
"e": 1204,
"s"... |
Newspaper: Article scraping & curation (Python) - GeeksforGeeks | 30 Nov, 2021
Newspaper is a Python module used for extracting and parsing newspaper articles. Newspaper use advance algorithms with web scraping to extract all the useful text from a website. It works amazingly well on online newspapers websites. Since it use web scraping too many request to a newspaper website may lea... | [
{
"code": null,
"e": 24360,
"s": 24332,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 24705,
"s": 24360,
"text": "Newspaper is a Python module used for extracting and parsing newspaper articles. Newspaper use advance algorithms with web scraping to extract all the useful text ... |
Set Date value in Java HashMap? | Create a Calendar instance and Date object −
Calendar cal = Calendar.getInstance();
Date date = new Date();
cal.setTime(date);
Now, create a HashMap and store Date value −
LinkedHashMap<String, Integer>hashMap = new LinkedHashMap<String, Integer>();
hashMap.put("year", cal.get(Calendar.YEAR));
hashMap.put("month", cal.... | [
{
"code": null,
"e": 1107,
"s": 1062,
"text": "Create a Calendar instance and Date object −"
},
{
"code": null,
"e": 1189,
"s": 1107,
"text": "Calendar cal = Calendar.getInstance();\nDate date = new Date();\ncal.setTime(date);"
},
{
"code": null,
"e": 1234,
"s": 1... |
Essential Math for Data Science: Introduction to Linear Algebra | by Hadrien Jean | Towards Data Science | Machines only understand numbers. For instance, if you want to create a spam detector, you have first to convert your text data into numbers (for instance, through word embeddings). Data can then be stored in vectors, matrices, and tensors. For instance, images are represented as matrices of values between 0 and 255 re... | [
{
"code": null,
"e": 683,
"s": 172,
"text": "Machines only understand numbers. For instance, if you want to create a spam detector, you have first to convert your text data into numbers (for instance, through word embeddings). Data can then be stored in vectors, matrices, and tensors. For instance, ... |
Angular 2 Interview Questions | Dear readers, these Angular 2 Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Angular 2. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questi... | [
{
"code": null,
"e": 2739,
"s": 2297,
"text": "Dear readers, these Angular 2 Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Angular 2. As per my experience good interviewers hardly plan to... |
Extract particular element in MongoDB within a Nested Array? | To extract the particular element in MongoDB, you can use $elemMatch operator. Let us first create a collection with documents −
> db.particularElementDemo.insertOne(
{
"GroupId" :"Group-1",
"UserDetails" : [
{
"UserName" : "John",
"UserOtherDetails" : [
{
... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "To extract the particular element in MongoDB, you can use $elemMatch operator. Let us first create a collection with documents −"
},
{
"code": null,
"e": 2555,
"s": 1191,
"text": "> db.particularElementDemo.insertOne(\n {\n \"... |
isinf() function in C++ | In this article we will be discussing the isinf() function in C++, its syntax, working and what will be its return value.
isinf() is an inbuilt function in C++ which comes under header file, the function is used to check whether the variable passed in it is infinity or not, no matter if the number is negative infinity ... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "In this article we will be discussing the isinf() function in C++, its syntax, working and what will be its return value."
},
{
"code": null,
"e": 1585,
"s": 1184,
"text": "isinf() is an inbuilt function in C++ which comes under head... |
Normality? How do we check that?. Is your data normal and how to check... | by Harshdeep Singh | Towards Data Science | Before I mention a couple of ways as to how to check normality, let me tell why “your data” being “normal” is good news.
Normal distribution has certain properties which others don’t:
It has the infamous bell shape curve which is symmetric around the mean and makes it an appealing choice for linear regression models.an... | [
{
"code": null,
"e": 293,
"s": 172,
"text": "Before I mention a couple of ways as to how to check normality, let me tell why “your data” being “normal” is good news."
},
{
"code": null,
"e": 356,
"s": 293,
"text": "Normal distribution has certain properties which others don’t:"
... |
How to add the slider to a menu item in JavaFX? | JavaFX provides a class known as Slider, this represents a slider component that displays a continuous range of values. This contains a track on which the number values are displayed. Along the track, there is a thumb pointing to the numbers. You can provide the maximum, minimum, and initial values of the slider.
In Ja... | [
{
"code": null,
"e": 1377,
"s": 1062,
"text": "JavaFX provides a class known as Slider, this represents a slider component that displays a continuous range of values. This contains a track on which the number values are displayed. Along the track, there is a thumb pointing to the numbers. You can pr... |
Template non-type arguments in C++ - GeeksforGeeks | 29 Dec, 2020
Prerequisite: Templates in C++
Generally, a C++ template, with a single argument looks like this:
template<typename template_name>
But it has been seen that a template can have multiple arguments. The syntax for the same would be:
template<class T1, class T2, class T3, ........., class Tn>
where, n is the ... | [
{
"code": null,
"e": 23731,
"s": 23703,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 23762,
"s": 23731,
"text": "Prerequisite: Templates in C++"
},
{
"code": null,
"e": 23829,
"s": 23762,
"text": "Generally, a C++ template, with a single argument looks lik... |
Python program to check if two lists have at least one common element | In this problem we use two user input list. Our task is to check that there is any common element or not. We use very simple traversing technique, traverse both the list and check the every element of first list and second list.
Input : A = [10, 20, 30, 50]
B = [90, 80, 30, 10, 3]
Output : FOUND
Input : A = [10... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "In this problem we use two user input list. Our task is to check that there is any common element or not. We use very simple traversing technique, traverse both the list and check the every element of first list and second list."
},
{
"code": nu... |
Java Program to Enode a Message Using Playfair Cipher - GeeksforGeeks | 22 Feb, 2021
The Playfair cipher is one of the traditional ciphers which comes under the category of substitution ciphers. In Playfair Cipher, unlike traditional cipher, we encrypt a pair of alphabets (digraphs) instead of a single alphabet. In Playfair cipher, initially, a key table is created. The key table is a 5×5 ... | [
{
"code": null,
"e": 24760,
"s": 24732,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 25367,
"s": 24760,
"text": "The Playfair cipher is one of the traditional ciphers which comes under the category of substitution ciphers. In Playfair Cipher, unlike traditional cipher, we enc... |
Can We Override Default Method in Java? - GeeksforGeeks | 05 Feb, 2021
Default method in Java is a method in java which are defined inside the interface with the keyword default is known as the default method. It is a type of non-abstract method.
This method is capable of adding backward capability so that the old interface can grasp the lambda expression capability.
Java In... | [
{
"code": null,
"e": 24135,
"s": 24107,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 24312,
"s": 24135,
"text": "Default method in Java is a method in java which are defined inside the interface with the keyword default is known as the default method. It is a type of non-abst... |
How to change the password in MongoDB for existing user? | To change the password in MongoDB for existing user, you can use changeUserPassword(). Following is the syntax
db.changeUserPassword("yourExistingUserName", "yourPassword");
Let us first switch the database to admin. Following is the syntax
> use admin
This will produce the following output
switched to db admin
Now, di... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "To change the password in MongoDB for existing user, you can use changeUserPassword(). Following is the syntax"
},
{
"code": null,
"e": 1236,
"s": 1173,
"text": "db.changeUserPassword(\"yourExistingUserName\", \"yourPassword\");"
}... |
C program to find the sum of arithmetic progression series | Find the sum of an arithmetic progression series, where the user has to enter first number, total number of elements and the common difference.
Arithmetic Progression (A.P.) is a series of numbers in which the difference of any two consecutive numbers is always the same. Here, total number of elements is mentioned as T... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "Find the sum of an arithmetic progression series, where the user has to enter first number, total number of elements and the common difference."
},
{
"code": null,
"e": 1385,
"s": 1206,
"text": "Arithmetic Progression (A.P.) is a ser... |
B-Tree Insert without aggressive splitting - GeeksforGeeks | 25 Jun, 2021
B-Tree Insert without aggressive splittingThis algorithm for insertion takes an entry, finds the leaf node where it belongs, and inserts it there. We recursively insert the entry by calling the insert algorithm on the appropriate child node. This procedure results in going down to the leaf node where the e... | [
{
"code": null,
"e": 24488,
"s": 24460,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 25505,
"s": 24488,
"text": "B-Tree Insert without aggressive splittingThis algorithm for insertion takes an entry, finds the leaf node where it belongs, and inserts it there. We recursively i... |
C# | Add an object to the end of the Queue - Enqueue Operation - GeeksforGeeks | 01 Feb, 2019
Queue represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enqueue, and when you remove an item, it is called dequeue.
Queue<T>.Enqueue(T) Method is used to add an object to the end of the Queue... | [
{
"code": null,
"e": 24528,
"s": 24500,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24760,
"s": 24528,
"text": "Queue represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it i... |
How to declare an Array Variables in Java? | You can declare an array just like a variable −
int myArray[];
You can create an array just like an object using the new keyword −
myArray = new int[5];
You can initialize the array by assigning values to all the elements one by one using the index −
myArray [0] = 101;
myArray [1] = 102;
You can access the array elemen... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "You can declare an array just like a variable −"
},
{
"code": null,
"e": 1125,
"s": 1110,
"text": "int myArray[];"
},
{
"code": null,
"e": 1193,
"s": 1125,
"text": "You can create an array just like an object usin... |
A Beginner’s Guide to Hadoop’s Fundamentals | Towards Data Science | Literally, Hadoop was the name of a toy elephant — specifically, the toy elephant of Doug Cutting’s (Hadoop’s co-founder) son. But you’re not here to learn how, or from where, Hadoop got its name! Broadly speaking, Hadoop is a general-purpose, operating system-like platform for parallel computing.
I am sure I do not ne... | [
{
"code": null,
"e": 470,
"s": 171,
"text": "Literally, Hadoop was the name of a toy elephant — specifically, the toy elephant of Doug Cutting’s (Hadoop’s co-founder) son. But you’re not here to learn how, or from where, Hadoop got its name! Broadly speaking, Hadoop is a general-purpose, operating s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.