title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
C program to count zeros and ones in binary representation of a number - GeeksforGeeks
05 Aug, 2021 Given a number N, the task is to write C program to count the number of 0s and 1s in the binary representation of N. Examples: Input: N = 5 Output: Count of 0s: 1 Count of 1s: 2 Explanation: Binary representation of 5 is “101”.Input: N = 22 Output: Count of 0s: 2 Count of 1s: 3 Explanation: Binary repres...
[ { "code": null, "e": 26713, "s": 26685, "text": "\n05 Aug, 2021" }, { "code": null, "e": 26830, "s": 26713, "text": "Given a number N, the task is to write C program to count the number of 0s and 1s in the binary representation of N." }, { "code": null, "e": 26842, ...
Python | Boolean List AND and OR operations - GeeksforGeeks
29 Oct, 2019 Sometimes, while working with Python list, we can have a problem in which we have a Boolean list and we need to find Boolean AND or OR of all elements in it. This kind of problem has application in Data Science domain. Let’s discuss an easy way to solve both these tasks. Method #1 : AND operation – Using a...
[ { "code": null, "e": 25763, "s": 25735, "text": "\n29 Oct, 2019" }, { "code": null, "e": 26035, "s": 25763, "text": "Sometimes, while working with Python list, we can have a problem in which we have a Boolean list and we need to find Boolean AND or OR of all elements in it. This ...
How to predict Loan Eligibility using Machine Learning Models | by Mridul Bhandari | Towards Data Science
Loans are the core business of banks. The main profit comes directly from the loan’s interest. The loan companies grant a loan after an intensive process of verification and validation. However, they still don’t have assurance if the applicant is able to repay the loan with no difficulties. In this tutorial, we’ll buil...
[ { "code": null, "e": 464, "s": 172, "text": "Loans are the core business of banks. The main profit comes directly from the loan’s interest. The loan companies grant a loan after an intensive process of verification and validation. However, they still don’t have assurance if the applicant is able to ...
Lodash _.values() Method - GeeksforGeeks
09 Sep, 2020 The _.values() method is used to return the array of the own enumerable string keyed property values of the object. Syntax: _.values(object) Parameters: This method accepts a single parameter as mentioned above and described below: object: This parameter holds the object to query. Return Value: This metho...
[ { "code": null, "e": 25398, "s": 25370, "text": "\n09 Sep, 2020" }, { "code": null, "e": 25514, "s": 25398, "text": "The _.values() method is used to return the array of the own enumerable string keyed property values of the object." }, { "code": null, "e": 25522, ...
Find the sum of all Truncatable primes below N in Python
Suppose we have a given integer N; we have to find the sum of all Truncatable primes less than N. As we know the truncatable prime is a number which is left-truncatable prime (if the leading "left" digit is successively removed, then all resulting numbers are treated as prime) as well as right-truncatable prime (if the...
[ { "code": null, "e": 1629, "s": 1062, "text": "Suppose we have a given integer N; we have to find the sum of all Truncatable primes less than N. As we know the truncatable prime is a number which is left-truncatable prime (if the leading \"left\" digit is successively removed, then all resulting num...
rmdir command in Linux With Examples - GeeksforGeeks
24 May, 2019 rmdir command is used remove empty directories from the filesystem in Linux. The rmdir command removes each and every directory specified in the command line only if these directories are empty. So if the specified directory has some directories or files in it then this cannot be removed by rmdir command. ...
[ { "code": null, "e": 24125, "s": 24097, "text": "\n24 May, 2019" }, { "code": null, "e": 24432, "s": 24125, "text": "rmdir command is used remove empty directories from the filesystem in Linux. The rmdir command removes each and every directory specified in the command line only ...
Python Digital Mobile Device Forensics
This chapter will explain Python digital forensics on mobile devices and the concepts involved. Mobile device forensics is that branch of digital forensics which deals with the acquisition and analysis of mobile devices to recover digital evidences of investigative interest. This branch is different from computer foren...
[ { "code": null, "e": 2049, "s": 1953, "text": "This chapter will explain Python digital forensics on mobile devices and the concepts involved." }, { "code": null, "e": 2408, "s": 2049, "text": "Mobile device forensics is that branch of digital forensics which deals with the acqui...
How to export to PDF a graph based on a Pandas dataframe in Matplotlib?
To export to PDF a graph based on a Pandas dataframe, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Make a Pandas dataframe with three columns, col1, col2 and col3. Plot the dataframe using plot() method. To display the figure, use show() method. import ma...
[ { "code": null, "e": 1150, "s": 1062, "text": "To export to PDF a graph based on a Pandas dataframe, we can take the following steps −" }, { "code": null, "e": 1226, "s": 1150, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "cod...
Python – How to Multiply all items in Tuple
27 Feb, 2020 Sometimes, while programming, we have a problem in which we might need to perform product among tuple elements. This is an essential utility as we come across product operation many times and tuples are immutable and hence required to be dealt with. Let’s discuss certain ways in which this task can be perf...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Feb, 2020" }, { "code": null, "e": 367, "s": 53, "text": "Sometimes, while programming, we have a problem in which we might need to perform product among tuple elements. This is an essential utility as we come across product operati...
OpenCV and Keras | Traffic Sign Classification for Self-Driving Car
27 Dec, 2019 IntroductionIn this article, we will learn how to classify some common traffic signs that we occasionally encounter in our daily lives on the road. While building a self-driving car, it is necessary to make sure it identifies the traffic signs with a high degree of accuracy, unless the results might be cat...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Dec, 2019" }, { "code": null, "e": 630, "s": 52, "text": "IntroductionIn this article, we will learn how to classify some common traffic signs that we occasionally encounter in our daily lives on the road. While building a self-driv...
Remove First Row of DataFrame in R
23 Aug, 2021 In this article, we are going to see how to remove the first row from the dataframe. We can remove first row by indexing the dataframe. Syntax: data[-1,] where -1 is used to remove the first row which is in row position Example 1: R program to create a dataframe with 2 columns and delete the first row R #...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 165, "s": 28, "text": "In this article, we are going to see how to remove the first row from the dataframe. We can remove first row by indexing the dataframe. " }, { "code": null, "e": 1...
Pre-increment and Post-increment in C/C++
09 Dec, 2021 In C/C++, Increment operators are used to increase the value of a variable by 1. This operator is represented by the ++ symbol. The increment operator can either increase the value of the variable by 1 before assigning it to the variable or can increase the value of the variable by 1 after assigning the v...
[ { "code": null, "e": 57, "s": 26, "text": " \n09 Dec, 2021\n" }, { "code": null, "e": 414, "s": 57, "text": "In C/C++, Increment operators are used to increase the value of a variable by 1. This operator is represented by the ++ symbol. The increment operator can either increase ...
Python program to Convert a Matrix to Sparse Matrix
17 Jan, 2022 Given a matrix with most of its elements as 0, we need to convert this matrix into a sparse matrix in Python. Example: Input: Matrix:1 0 0 00 2 0 00 0 3 00 0 0 45 0 0 0 Output: Sparse Matrix:0 0 11 1 22 2 33 3 44 0 5 Explanation:Here the Matrix is represented using a 2D list and the Sparse Matrix is repres...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jan, 2022" }, { "code": null, "e": 164, "s": 54, "text": "Given a matrix with most of its elements as 0, we need to convert this matrix into a sparse matrix in Python." }, { "code": null, "e": 173, "s": 164, "tex...
ES6 - Symbol
ES6 introduces a new primitive type called Symbol. They are helpful to implement metaprogramming in JavaScript programs. const mySymbol = Symbol() const mySymbol = Symbol(stringDescription) A symbol is just a piece of memory in which you can store some data. Each symbol will point to a different memory location. Value...
[ { "code": null, "e": 2398, "s": 2277, "text": "ES6 introduces a new primitive type called Symbol. They are helpful to implement metaprogramming in JavaScript programs." }, { "code": null, "e": 2468, "s": 2398, "text": "const mySymbol = Symbol()\nconst mySymbol = Symbol(stringDesc...
MariaDB - Administration
Before attempting to run MariaDB, first determine its current state, running or shutdown. There are three options for starting and stopping MariaDB − Run mysqld (the MariaDB binary). Run the mysqld_safe startup script. Run the mysql.server startup script. If you installed MariaDB in a non-standard location, you may hav...
[ { "code": null, "e": 2512, "s": 2362, "text": "Before attempting to run MariaDB, first determine its current state, running or shutdown. There are three options for starting and stopping MariaDB −" }, { "code": null, "e": 2545, "s": 2512, "text": "Run mysqld (the MariaDB binary)....
How to replace a value in an R vector?
To replace a value in an R vector, we can use replace function. It is better to save the replacement with a new object, even if you name that new object same as the original, otherwise the replacements will not work with further analysis. As you can see in the object x5(in examples), when we replaced 5 with 3, the prev...
[ { "code": null, "e": 1490, "s": 1062, "text": "To replace a value in an R vector, we can use replace function. It is better to save the replacement with a new object, even if you name that new object same as the original, otherwise the replacements will not work with further analysis. As you can see...
How to set Parent State from Children Component in ReactJS? - GeeksforGeeks
27 Jan, 2021 We can set Parent State from Children Component in ReactJs using the following approach. Prerequisite: State introduction in ReactJS We will actually set the state of a parent in the parent component itself, but the children will be responsible for setting. We will create a function in parent to set the st...
[ { "code": null, "e": 25338, "s": 25310, "text": "\n27 Jan, 2021" }, { "code": null, "e": 25427, "s": 25338, "text": "We can set Parent State from Children Component in ReactJs using the following approach." }, { "code": null, "e": 25471, "s": 25427, "text": "P...
C program to print employee details using Structure
Here, we are given a structure containing details of employees. Our task is to create a C program to program to print employee details using structure. The details of the employee that are in the structure are name, age, phone number, salary, and our program will print these details. The details of the employees are pr...
[ { "code": null, "e": 1214, "s": 1062, "text": "Here, we are given a structure containing details of employees. Our task is to create a C program to program to print employee details using structure." }, { "code": null, "e": 1347, "s": 1214, "text": "The details of the employee th...
How to use for loop in Python?
The for loop in Python is used to iterate over a number of elements or some specific integer range. The elements might be of an array, string or any other iterative object in Python. The for loop is the most frequently used looping statement. Most of the programming questions we encounter make use of the for loop in it...
[ { "code": null, "e": 1245, "s": 1062, "text": "The for loop in Python is used to iterate over a number of elements or some specific integer range. The elements might be of an array, string or any other iterative object in Python." }, { "code": null, "e": 1394, "s": 1245, "text": ...
SQLSERVER Tryit Editor v1.0
SELECT FORMAT(123456789, '##-##-#####'); ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of t...
[ { "code": null, "e": 41, "s": 0, "text": "SELECT FORMAT(123456789, '##-##-#####');" }, { "code": null, "e": 43, "s": 41, "text": "​" }, { "code": null, "e": 115, "s": 52, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "...
Java - Interfaces
An interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface. Along with abstract methods, an interface may also contain constants, default methods, static methods, and nested types. Me...
[ { "code": null, "e": 2574, "s": 2377, "text": "An interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface." }, { "code": null, "e": 2760, "s": 2574...
Difference b/w getText() and getAttribute() in Selenium WebDriver?
The differences between getText() and getAttribute() methods are described below. The getText() method returns the innerText of an element. The text which is visible on the page along with sub elements. It ignores all leading and trailing spaces. The getAttribute() method fetches the text contained by an attribute in a...
[ { "code": null, "e": 1309, "s": 1062, "text": "The differences between getText() and getAttribute() methods are described below. The getText() method returns the innerText of an element. The text which is visible on the page along with sub elements. It ignores all leading and trailing spaces." }, ...
UnionWith Method in C#
Use the UnionWith method in C# to get the union of i.e. unique lements from two collections. Let’s say the following are our Dictionary − Dictionary < string, int > dict1 = new Dictionary < string, int > (); dict1.Add("pencil", 1); dict1.Add("pen", 2); Dictionary < string, int > dict2 = new Dictionary < string, int > (...
[ { "code": null, "e": 1155, "s": 1062, "text": "Use the UnionWith method in C# to get the union of i.e. unique lements from two collections." }, { "code": null, "e": 1200, "s": 1155, "text": "Let’s say the following are our Dictionary −" }, { "code": null, "e": 1406, ...
JavaScript Return an array that contains all the strings appearing in all the subarrays
We have an array of arrays like this − const arr = [ ['foo', 'bar', 'hey', 'oi'], ['foo', 'bar', 'hey'], ['foo', 'bar', 'anything'], ['bar', 'anything'] ] We are required to write a JavaScript function that takes in such array and returns an array that contains all the strings which appears in all the subar...
[ { "code": null, "e": 1101, "s": 1062, "text": "We have an array of arrays like this −" }, { "code": null, "e": 1229, "s": 1101, "text": "const arr = [\n ['foo', 'bar', 'hey', 'oi'],\n ['foo', 'bar', 'hey'],\n ['foo', 'bar', 'anything'],\n ['bar', 'anything']\n]" }, { ...
How to join two lists in C#?
To join two lists, use AddRange() method. Set the first list − var list1 = new List < string > (); list1.Add("Keyboard"); list1.Add("Mouse"); Set the second list − var list2 = new List < string > (); list2.Add("Hard Disk"); list2.Add("Pen Drive"); To concatenate both the lists − lists1.AddRange(lists2); The following i...
[ { "code": null, "e": 1104, "s": 1062, "text": "To join two lists, use AddRange() method." }, { "code": null, "e": 1125, "s": 1104, "text": "Set the first list −" }, { "code": null, "e": 1204, "s": 1125, "text": "var list1 = new List < string > ();\nlist1.Add(\...
Boolean.Equals(Boolean) Method in C#
The Boolean.Equals(Boolean) method in C# returns a value indicating whether this instance is equal to a specified Boolean object. Following is the syntax − public bool Equals (bool ob); Above, ob is a Boolean value to compare to this instance. Let us now see an example to implement the Boolean.Equals(Boolean) method − ...
[ { "code": null, "e": 1192, "s": 1062, "text": "The Boolean.Equals(Boolean) method in C# returns a value indicating whether this instance is equal to a specified Boolean object." }, { "code": null, "e": 1218, "s": 1192, "text": "Following is the syntax −" }, { "code": null...
Tracking Coronavirus(COVID-19) Spread in India using Python | by Pratik Nabriya | Towards Data Science
Coronavirus or COVID-19 needs no introduction. It has already been declared as a pandemic by WHO and in past couple of weeks it’s impact has been deleterious from both health perspective and an economic one. Plenty has been written about it, especially statistical reports on its exponential growth and the importance of...
[ { "code": null, "e": 517, "s": 172, "text": "Coronavirus or COVID-19 needs no introduction. It has already been declared as a pandemic by WHO and in past couple of weeks it’s impact has been deleterious from both health perspective and an economic one. Plenty has been written about it, especially st...
Difference between JavaScript and PHP - GeeksforGeeks
18 Apr, 2022 In this article, we will know about Javascript & PHP, along with understanding their significant differences. A long time before, most people used to think PHP is a server-side language and Javascript as client-side language as it was only executed in web browsers. But after V8, Node and other frameworks c...
[ { "code": null, "e": 24540, "s": 24512, "text": "\n18 Apr, 2022" }, { "code": null, "e": 24650, "s": 24540, "text": "In this article, we will know about Javascript & PHP, along with understanding their significant differences." }, { "code": null, "e": 25027, "s": ...
How to sort an array with customized Comparator in Java?
Let’s say the following is our string array and we need to sort it: String[] str = { "Tom", "Jack", "Harry", "Zen", "Tim", "David" }; Within the sort() method, create a customized comparator to sort the above string. Here, two strings are compared with each other and the process goes on: Arrays.sort(str, new Comparator...
[ { "code": null, "e": 1130, "s": 1062, "text": "Let’s say the following is our string array and we need to sort it:" }, { "code": null, "e": 1196, "s": 1130, "text": "String[] str = { \"Tom\", \"Jack\", \"Harry\", \"Zen\", \"Tim\", \"David\" };" }, { "code": null, "e":...
Groovy - XML
XML is a portable, open source language that allows programmers to develop applications that can be read by other applications, regardless of operating system and/or developmental language. This is one of the most common languages used for exchanging data between applications. The Extensible Markup Language XML is a ma...
[ { "code": null, "e": 2516, "s": 2238, "text": "XML is a portable, open source language that allows programmers to develop applications that can be read by other applications, regardless of operating system and/or developmental language. This is one of the most common languages used for exchanging da...
Best meeting point in 2D binary array - GeeksforGeeks
03 Sep, 2021 You are given a 2D grid of values 0 or 1, where each 1 marks the home of someone in a group. And the group of two or more people wants to meet and minimize the total travel distance. They can meet anywhere means that there might be a home or not. The distance is calculated using Manhattan Distance, where ...
[ { "code": null, "e": 24922, "s": 24894, "text": "\n03 Sep, 2021" }, { "code": null, "e": 25170, "s": 24922, "text": "You are given a 2D grid of values 0 or 1, where each 1 marks the home of someone in a group. And the group of two or more people wants to meet and minimize the tot...
Data analysis using Pandas - GeeksforGeeks
15 Oct, 2020 Pandas is the most popular python library that is used for data analysis. It provides highly optimized performance with back-end source code is purely written in C or Python. We can analyze data in pandas with: SeriesDataFrames SeriesDataFrames Series DataFrames Series is one dimensional(1-D) array define...
[ { "code": null, "e": 24960, "s": 24932, "text": "\n15 Oct, 2020" }, { "code": null, "e": 25135, "s": 24960, "text": "Pandas is the most popular python library that is used for data analysis. It provides highly optimized performance with back-end source code is purely written in C...
Adding an element in an array using Javascript
Adding an element to an array can be done using different functions for different positions. This can be accomplished using the push method. For example, let veggies = ["Onion", "Raddish"]; veggies.push("Cabbage"); console.log(veggies); This will give the output − ["Onion", "Raddish", "Cabbage"] You can also use this t...
[ { "code": null, "e": 1155, "s": 1062, "text": "Adding an element to an array can be done using different functions for different positions." }, { "code": null, "e": 1216, "s": 1155, "text": "This can be accomplished using the push method. For example," }, { "code": null, ...
What is the usage of zerofill in a MySQL field?
Zerofill pads the displayed value of the field with zeros up to the display width specified in the column definition. For example, if column is set int(8), therefore the width is 8. If the number is let’s say 4376, then zero will be padded on the left for total width i.e. 8 − 00004376 Let us first create a table − mysq...
[ { "code": null, "e": 1339, "s": 1062, "text": "Zerofill pads the displayed value of the field with zeros up to the display width specified in the column definition. For example, if column is set int(8), therefore the width is 8. If the number is let’s say 4376, then zero will be padded on the left f...
Charset forName() method in Java with Examples - GeeksforGeeks
29 Mar, 2019 The forName() method is a built-in method of the java.nio.charset returns a charset object for the named charset. In this function we pass a canonical name or an alias and its respective charset name is returned. Syntax: public static Charset forName?(String charsetName) Parameters: The function accepts a ...
[ { "code": null, "e": 25471, "s": 25443, "text": "\n29 Mar, 2019" }, { "code": null, "e": 25684, "s": 25471, "text": "The forName() method is a built-in method of the java.nio.charset returns a charset object for the named charset. In this function we pass a canonical name or an a...
How to automate gmail login process using selenium webdriver in java?
We can automate the Gmail login process using Selenium webdriver in Java. To perform this task, first we have to launch the Gmail login page and locate the email, password and other elements with the findElement method and then perform actions on them. Let us have the look at the Gmail login page − import org.openqa.se...
[ { "code": null, "e": 1315, "s": 1062, "text": "We can automate the Gmail login process using Selenium webdriver in Java. To perform this task, first we have to launch the Gmail login page and locate the email, password and other elements with the findElement method and then perform actions on them."...
CRUD Operation in MySQL Using PHP, Volley Android - Insert Data - GeeksforGeeks
27 Dec, 2021 It is known that we can use MySQL to use Structure Query Language to store the data in the form of RDBMS. SQL is the most popular language for adding, accessing and managing content in a database. It is most noted for its quick processing, proven reliability, ease, and flexibility of use. The application i...
[ { "code": null, "e": 26701, "s": 26673, "text": "\n27 Dec, 2021" }, { "code": null, "e": 27289, "s": 26701, "text": "It is known that we can use MySQL to use Structure Query Language to store the data in the form of RDBMS. SQL is the most popular language for adding, accessing an...
Does Java support default parameter values for a method?
Java does not support the concept of default parameter however, you can achieve this using Using method overloading if you define method with no arguments along with parametrized methods. Then you can call a method with zero arguments. In Java methods parameters accept arguments with three dots. These are known as vari...
[ { "code": null, "e": 1153, "s": 1062, "text": "Java does not support the concept of default parameter however, you can achieve this using" }, { "code": null, "e": 1298, "s": 1153, "text": "Using method overloading if you define method with no arguments along with parametrized met...
Python string | hexdigits - GeeksforGeeks
16 Oct, 2018 In Python3, string.hexdigits is a pre-initialized string used as string constant. In Python, string.hexdigits will give the hexadecimal letters ‘0123456789abcdefABCDEF’. Syntax : string.hexdigits Parameters : Doesn’t take any parameter, since it’s not a function. Returns : Return all hexadecimal digit lett...
[ { "code": null, "e": 26075, "s": 26047, "text": "\n16 Oct, 2018" }, { "code": null, "e": 26245, "s": 26075, "text": "In Python3, string.hexdigits is a pre-initialized string used as string constant. In Python, string.hexdigits will give the hexadecimal letters ‘0123456789abcdefAB...
Program to calculate distance between two points in 3 D - GeeksforGeeks
01 Apr, 2021 Given two coordinates (x1, y1, z1) and (x2, y2, z2) in 3 dimension. The task is to find the distance between them.Examples : Input: x1, y1, z1 = (2, -5, 7) x2, y2, z1 = (3, 4, 5) Output: 9.2736184955 Input: x1, y1, z1 = (0, 0, 0) x2, y2, z1 = (1, 1, 1) Output: 1.73205080757 Approach: The...
[ { "code": null, "e": 26213, "s": 26185, "text": "\n01 Apr, 2021" }, { "code": null, "e": 26340, "s": 26213, "text": "Given two coordinates (x1, y1, z1) and (x2, y2, z2) in 3 dimension. The task is to find the distance between them.Examples : " }, { "code": null, "e":...
Program to find nth term in Look and Say Sequence in Python
Suppose we have a number n we have to generate nth term in “Look and Say” sequence. This is a sequence whose few terms are like below − 1 11 21 1211 111221 The string will be read like 1 (One) 11 (One 1) So read the previous 1, and say “One 1” 21 (Two 1) So read the previous 11, and say “Two 1” 1211 (One 2 one 1) So re...
[ { "code": null, "e": 1198, "s": 1062, "text": "Suppose we have a number n we have to generate nth term in “Look and Say” sequence. This is a sequence whose few terms are like below −" }, { "code": null, "e": 1200, "s": 1198, "text": "1" }, { "code": null, "e": 1203, ...
Python - Check if frequencies of all characters of a string are different
In this article we will see how to find the frequency of each character in a given string. Then see if two or more characters have the same frequency in the given string or not. We will accomplish this in two steps. In the first program we will just find out the frequency of each character. Here we find the frequency o...
[ { "code": null, "e": 1354, "s": 1062, "text": "In this article we will see how to find the frequency of each character in a given string. Then see if two or more characters have the same frequency in the given string or not. We will accomplish this in two steps. In the first program we will just fin...
Check how many rows are in a MySQL database table?
To know how many rows are in a ySQL database table, you need to use aggregate function COUNT(*). The syntax is as follows SELECT COUNT(*) FROM yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows mysql> create table CountRowsDemo - > ( - > Id int NOT NULL...
[ { "code": null, "e": 1159, "s": 1062, "text": "To know how many rows are in a ySQL database table, you need to use aggregate function COUNT(*)." }, { "code": null, "e": 1184, "s": 1159, "text": "The syntax is as follows" }, { "code": null, "e": 1220, "s": 1184, ...
How to check if a table exists in MySQL and create if it does not already exist?
If you try to create a table and the table name already exist then MySQL will give a warning message. Let us verify the concept. Here, we are creating a table that already exist − mysql> CREATE TABLE IF NOT EXISTS DemoTable ( CustomerId int, CustomerName varchar(30), CustomerAge int ); Query OK, 0 rows a...
[ { "code": null, "e": 1191, "s": 1062, "text": "If you try to create a table and the table name already exist then MySQL will give a warning message. Let us verify the concept." }, { "code": null, "e": 1242, "s": 1191, "text": "Here, we are creating a table that already exist −" ...
Time Functions in Python?
Python provides library to read, represent and reset the time information in many ways by using “time” module. Date, time and date time are an object in Python, so whenever we do any operation on them, we actually manipulate objects not strings or timestamps. In this section we’re going to discuss the “time” module whi...
[ { "code": null, "e": 1322, "s": 1062, "text": "Python provides library to read, represent and reset the time information in many ways by using “time” module. Date, time and date time are an object in Python, so whenever we do any operation on them, we actually manipulate objects not strings or times...
How to find the group-wise correlation coefficient in R?
If we have two continuous and one categorical column in an R data frame then we can find the correlation coefficient between continuous values for the categories in the categorical column. For this purpose, we can use by function and pass the cor function with the spearman method as shown in the below examples. Conside...
[ { "code": null, "e": 1375, "s": 1062, "text": "If we have two continuous and one categorical column in an R data frame then we can find the correlation coefficient between continuous values for the categories in the categorical column. For this purpose, we can use by function and pass the cor functi...
Set lines to different transparency using ggplot2 in R - GeeksforGeeks
18 Jul, 2021 In this article, we will be discussing how can transparency of lines be made different for a line plot using GGPLOT2 in R programming language. First, let’s plot a line graph, so that the difference is apparent. R library("ggplot2") function1<- function(x){x**2} function2<-functio...
[ { "code": null, "e": 25314, "s": 25283, "text": " \n18 Jul, 2021\n" }, { "code": null, "e": 25458, "s": 25314, "text": "In this article, we will be discussing how can transparency of lines be made different for a line plot using GGPLOT2 in R programming language." }, { "c...
Difference between YAML(.yml) and .properties file in Java SpringBoot - GeeksforGeeks
30 Jun, 2021 These are the files to have different configurations properties required to make the application up and run like to connect with the database what are the credentials, on which port the application will run, etc. YAML (.yml) File: YAML is a configuration language. Languages like Python, Ruby, Java heavily...
[ { "code": null, "e": 24650, "s": 24622, "text": "\n30 Jun, 2021" }, { "code": null, "e": 24864, "s": 24650, "text": "These are the files to have different configurations properties required to make the application up and run like to connect with the database what are the credenti...
How to print exception messages in android?
This example demonstrate about How to print exception messages in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayou...
[ { "code": null, "e": 1137, "s": 1062, "text": "This example demonstrate about How to print exception messages in android." }, { "code": null, "e": 1266, "s": 1137, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...
Power your Windows app with AI: connect C# application with Python model | by Pavlo Horbonos | Towards Data Science
No long intro here:a) we may always run our ML models or neural networks pipelines just in the console;b) there is no reason why we can’t run it on Windows and add some buttons for clicking. Though, here we face a problem. We can easily develop either some Python model or C# Windows Forms application. But their connect...
[ { "code": null, "e": 237, "s": 46, "text": "No long intro here:a) we may always run our ML models or neural networks pipelines just in the console;b) there is no reason why we can’t run it on Windows and add some buttons for clicking." }, { "code": null, "e": 568, "s": 237, "text...
Cordova - File System
This plugin is used for manipulating the native file system on the user's device. We need to run the following code in the command prompt to install this plugin. C:\Users\username\Desktop\CordovaProject>cordova plugin add cordova-plugin-file In this example, we will show you how to create file, write to file, read it ...
[ { "code": null, "e": 2262, "s": 2180, "text": "This plugin is used for manipulating the native file system on the user's device." }, { "code": null, "e": 2342, "s": 2262, "text": "We need to run the following code in the command prompt to install this plugin." }, { "code"...
GraphQL - Schema
A GraphQL schema is at the core of any GraphQL server implementation. It describes the functionality available to the client applications that connect to it. We can use any programming language to create a GraphQL schema and build an interface around it. The GraphQL runtime defines a generic graph-based schema to publi...
[ { "code": null, "e": 2206, "s": 1951, "text": "A GraphQL schema is at the core of any GraphQL server implementation. It describes the functionality available to the client applications that connect to it. We can use any programming language to create a GraphQL schema and build an interface around it...
Create Certificates using Python-PIL - GeeksforGeeks
26 May, 2020 Prerequisites: Python: Pillow (a fork of PIL) Well if you have ever done something like creating certificates for participants of any event, then you know how tedious process it is. Let’s automate that using Python. We will be using the Pillow module of Python. To install that simply type the following in ...
[ { "code": null, "e": 24648, "s": 24620, "text": "\n26 May, 2020" }, { "code": null, "e": 24694, "s": 24648, "text": "Prerequisites: Python: Pillow (a fork of PIL)" }, { "code": null, "e": 24969, "s": 24694, "text": "Well if you have ever done something like cr...
RequireJS - Defining Function
The define() function can be used to load the modules (module can be an object, function, class or a code which is executed after loading a module). You can load different versions of the same module in the same page. The different versions can be analyzed in the same order, even if they are loaded in a different order...
[ { "code": null, "e": 2164, "s": 1842, "text": "The define() function can be used to load the modules (module can be an object, function, class or a code which is executed after loading a module). You can load different versions of the same module in the same page. The different versions can be analy...
Python Program to Reverse a String Using Recursion
When it is required to reverse a string using recursion technique, a user defined method is used along with recursion. The recursion computes output of small bits of the bigger problem, and combines these bits to give the solution to the bigger problem. Below is a demonstration for the same − Live Demo def reverse_str...
[ { "code": null, "e": 1181, "s": 1062, "text": "When it is required to reverse a string using recursion technique, a user defined method is used along with recursion." }, { "code": null, "e": 1316, "s": 1181, "text": "The recursion computes output of small bits of the bigger probl...
Find the Number of Unique Pairs in an Array using C++
We require the appropriate knowledge to create several unique pairs in an array syntax in C++. In finding the number of unique pairs, we count all unique pairs in a given array, i.e., all possible pairs can be formed where each pair should be unique. For example − Input : array[ ] = { 5, 5, 9 } Output : 4 Explanation :...
[ { "code": null, "e": 1327, "s": 1062, "text": "We require the appropriate knowledge to create several unique pairs in an array syntax in C++. In finding the number of unique pairs, we count all unique pairs in a given array, i.e., all possible pairs can be formed where each pair should be unique. Fo...
Grav - Forms
You can create a form using the form plugin available in this link. Search for the form plugin and install it in your Grav folder. You can also install this plugin using the command $ bin/gpm install Form. Navigate to your root folder of Grav and type this command. It will automatically download the form plugin and ins...
[ { "code": null, "e": 2633, "s": 2502, "text": "You can create a form using the form plugin available in this link. Search for the form plugin and install it in your Grav folder." }, { "code": null, "e": 2855, "s": 2633, "text": "You can also install this plugin using the command ...
C - Pointer arithmetic
A pointer in c is an address, which is a numeric value. Therefore, you can perform arithmetic operations on a pointer just as you can on a numeric value. There are four arithmetic operators that can be used on pointers: ++, --, +, and - To understand pointer arithmetic, let us consider that ptr is an integer pointer wh...
[ { "code": null, "e": 2321, "s": 2084, "text": "A pointer in c is an address, which is a numeric value. Therefore, you can perform arithmetic operations on a pointer just as you can on a numeric value. There are four arithmetic operators that can be used on pointers: ++, --, +, and -" }, { "c...
java.lang.reflect.Method.getParameterTypes() Method Example
The java.lang.reflect.Method.getParameterTypes() method returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object. Returns an array of length 0 if the underlying method takes no parameters. Following is the declaration for java.lan...
[ { "code": null, "e": 1733, "s": 1454, "text": "The java.lang.reflect.Method.getParameterTypes() method returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object. Returns an array of length 0 if the underlying me...
GWT - DatePicker Widget
The DatePicker widget represents a standard GWT date picker. Following is the declaration for com.google.gwt.user.datepicker.client.DatePicker class − public class DatePicker extends Composite implements HasHighlightHandlers<java.util.Date>, HasShowRangeHandlers<java.util.Date>, HasValue<java.util.Date> ...
[ { "code": null, "e": 2084, "s": 2023, "text": "The DatePicker widget represents a standard GWT date picker." }, { "code": null, "e": 2174, "s": 2084, "text": "Following is the declaration for com.google.gwt.user.datepicker.client.DatePicker class −" }, { "code": null, ...
Python Numpy - GeeksforGeeks
15 Oct, 2018 Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python.Besides its obvious scientific uses, Numpy can also be used as an efficient multi-di...
[ { "code": null, "e": 41528, "s": 41500, "text": "\n15 Oct, 2018" }, { "code": null, "e": 41872, "s": 41528, "text": "Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is t...
Erlang - Processes
The granularity of concurrency in Erlang is a process. A process is an activity/task that runs concurrently with and is independent from the other processes. These processes in Erlang are different than the processes and threads most people are familiar with. Erlang processes are lightweight, operate in (memory) isolat...
[ { "code": null, "e": 2866, "s": 2301, "text": "The granularity of concurrency in Erlang is a process. A process is an activity/task that runs concurrently with and is independent from the other processes. These processes in Erlang are different than the processes and threads most people are familiar...
Power of Four | Practice | GeeksforGeeks
Given a number N, check if N is power of 4 or not. Example 1: Input: N = 64 Output: 1 Explanation: 43= 64 Example 2: Input: N = 75 Output : 0 Explanation : 75 is not a power of 4. +1 princejee20191 month ago C++ || 0ms || Recursive Solution|| Easy to Understand int isPowerOfFour(unsigned int n){ if(n<1)retur...
[ { "code": null, "e": 277, "s": 226, "text": "Given a number N, check if N is power of 4 or not." }, { "code": null, "e": 288, "s": 277, "text": "Example 1:" }, { "code": null, "e": 333, "s": 288, "text": "Input: \nN = 64\nOutput: 1\nExplanation:\n43= 64" }, ...
Ultimate Pandas Guide: Time Series Window Functions | by Skyler Dale | Towards Data Science
In my last post, I walked through how to run window functions in Pandas based on column values. This approach is useful anytime we want to know information about both the individual records and the groups they belong to. For example, if we have customer-level transaction data, an approach like this can provide us with ...
[ { "code": null, "e": 267, "s": 171, "text": "In my last post, I walked through how to run window functions in Pandas based on column values." }, { "code": null, "e": 392, "s": 267, "text": "This approach is useful anytime we want to know information about both the individual reco...
Student of the Year | Practice | GeeksforGeeks
Given a vector containing name of N student (in lowercase letters) and their marks in an exam. The task is to sort the students with respect to their marks (student with highest marks will be on top). If marks are same, consider lexicographic sorting for names. Example 1: Input: N = 4 michal 56 john 100 abbas 98 jorda...
[ { "code": null, "e": 488, "s": 226, "text": "Given a vector containing name of N student (in lowercase letters) and their marks in an exam. The task is to sort the students with respect to their marks (student with highest marks will be on top). If marks are same, consider lexicographic sorting for ...
What is the difference between pairs() vs. ipairs() in Lua?
In Lua, we make use of both the pairs() and ipairs() function when we want to iterate over a given table with the for loop. Both these functions return key-value pairs where the key is the index of the element and the value is the element stored at that index table. While both of them have some similarities, it is also...
[ { "code": null, "e": 1329, "s": 1062, "text": "In Lua, we make use of both the pairs() and ipairs() function when we want to iterate over a given table with the for loop. Both these functions return key-value pairs where the key is the index of the element and the value is the element stored at that...
Python program to check whether two lists are circularly identical
Here two lists are given. Our task is to check and found weather two given lists are circularly identical or not. Input : A = [100, 100, 10, 10, 100] B = [100, 100, 100, 10, 10] Output : True True as when these elements in the list will circularly rotate then they would be similar to other given list Step 1: ...
[ { "code": null, "e": 1176, "s": 1062, "text": "Here two lists are given. Our task is to check and found weather two given lists are circularly identical or not." }, { "code": null, "e": 1263, "s": 1176, "text": "Input : A = [100, 100, 10, 10, 100]\n B = [100, 100, 100, 10,...
Arduino - I/O Functions
The pins on the Arduino board can be configured as either inputs or outputs. We will explain the functioning of the pins in those modes. It is important to note that a majority of Arduino analog pins, may be configured, and used, in exactly the same manner as digital pins. Arduino pins are by default configured as inpu...
[ { "code": null, "e": 3144, "s": 2870, "text": "The pins on the Arduino board can be configured as either inputs or outputs. We will explain the functioning of the pins in those modes. It is important to note that a majority of Arduino analog pins, may be configured, and used, in exactly the same man...
How to Display an OpenCV image in Python with Matplotlib? - GeeksforGeeks
16 Aug, 2021 The OpenCV module is an open-source computer vision and machine learning software library. It is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to i...
[ { "code": null, "e": 30426, "s": 30398, "text": "\n16 Aug, 2021" }, { "code": null, "e": 31041, "s": 30426, "text": "The OpenCV module is an open-source computer vision and machine learning software library. It is a huge open-source library for computer vision, machine learning, ...
How to create a Snackbar using HMTL, CSS & JavaScript? - GeeksforGeeks
15 Jul, 2020 Snackbars in web design are notifications that are displayed on the website. Sometimes developers want to display additional notifications to the users, making them aware of certain information which is important but at the same time should not affect the user experience. This information can be about some...
[ { "code": null, "e": 26087, "s": 26059, "text": "\n15 Jul, 2020" }, { "code": null, "e": 26551, "s": 26087, "text": "Snackbars in web design are notifications that are displayed on the website. Sometimes developers want to display additional notifications to the users, making the...
How to split string by a delimiter str in Python?
Python's String class has a method called split() which takes a delimiter as optional argument. Default delimiter for it is whitespace. You can use it in the following way: >>> 'aa-ab-ca'.split('-') ['aa', 'ab', 'ca'] >>> 'abc mno rst'.split(' ') ['abc', 'mno', 'rst'] You can also use regex for this operation. The re.s...
[ { "code": null, "e": 1235, "s": 1062, "text": "Python's String class has a method called split() which takes a delimiter as optional argument. Default delimiter for it is whitespace. You can use it in the following way:" }, { "code": null, "e": 1331, "s": 1235, "text": ">>> 'aa-a...
Collect maximum points in a grid using two traversals - GeeksforGeeks
31 May, 2021 Given a matrix where every cell represents points. How to collect maximum points using two traversals under following conditions?Let the dimensions of given grid be R x C.1) The first traversal starts from top left corner, i.e., (0, 0) and should reach left bottom corner, i.e., (R-1, 0). The second travers...
[ { "code": null, "e": 26497, "s": 26469, "text": "\n31 May, 2021" }, { "code": null, "e": 27190, "s": 26497, "text": "Given a matrix where every cell represents points. How to collect maximum points using two traversals under following conditions?Let the dimensions of given grid b...
Process Image
Now that we have seen how to get the basic information of process and its parent process, it is time to look into the details of process/program information. What exactly is process image? Process image is an executable file required while executing the program. This image usually contains the following sections − Code...
[ { "code": null, "e": 2029, "s": 1871, "text": "Now that we have seen how to get the basic information of process and its parent process, it is time to look into the details of process/program information." }, { "code": null, "e": 2187, "s": 2029, "text": "What exactly is process ...
How to Install Nipe tool in Kali Linux? - GeeksforGeeks
05 Oct, 2021 Nipe is a program that uses the Tor network as the user’s default gateway, routing all traffic on the Tor network, which is often used to provide privacy and anonymity. It should be emphasized that hiding an IP address alone will not provide anonymity when using a tool for privacy and anonymity, as DNS inf...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n05 Oct, 2021" }, { "code": null, "e": 26579, "s": 26197, "text": "Nipe is a program that uses the Tor network as the user’s default gateway, routing all traffic on the Tor network, which is often used to provide privacy and anony...
CharBuffer flip() methods in Java with Examples - GeeksforGeeks
23 Jul, 2019 The flip() method of java.nio.CharBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded. After a sequence of channel-read or put operations, invoke this method to prepare for a sequence of channel...
[ { "code": null, "e": 24388, "s": 24360, "text": "\n23 Jul, 2019" }, { "code": null, "e": 24730, "s": 24388, "text": "The flip() method of java.nio.CharBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is set to zero. If the m...
Vertex cover Problem
For an undirected graph, the vertex cover is a subset of the vertices, where for every edge (u, v) of the graph either u or v is in the set. Using a binary tree, we can easily solve the vertex cover problem. This problem can be divided into two sub-problems. When the root is part of the vertex cover. For this case, the...
[ { "code": null, "e": 1203, "s": 1062, "text": "For an undirected graph, the vertex cover is a subset of the vertices, where for every edge (u, v) of the graph either u or v is in the set." }, { "code": null, "e": 1270, "s": 1203, "text": "Using a binary tree, we can easily solve ...
Python IMDbPY – Searching movies matching with keyword - GeeksforGeeks
11 May, 2021 In this article we will see how we can find movies that have similar keyword. Keyword is a word (or group of connected words) attached to a title (movie / TV series / TV episode) to describe any notable object, concept, style or action that takes place during a title. The main purpose of keywords is to all...
[ { "code": null, "e": 26409, "s": 26381, "text": "\n11 May, 2021" }, { "code": null, "e": 26843, "s": 26409, "text": "In this article we will see how we can find movies that have similar keyword. Keyword is a word (or group of connected words) attached to a title (movie / TV serie...
Problems on Work and Wages - GeeksforGeeks
07 Oct, 2021 Question 1: Ram and Shyam undertake a piece of work for Rs 300. Ram can do it in 20 days and Shaym can do it in 60 days. With the help of Radha, they finish it in 10 days. How much should Radha be paid for her contribution? Solution: Ram alone takes 20 days and Shyam alone takes 60 days to finish the work...
[ { "code": null, "e": 25475, "s": 25447, "text": "\n07 Oct, 2021" }, { "code": null, "e": 25700, "s": 25475, "text": "Question 1: Ram and Shyam undertake a piece of work for Rs 300. Ram can do it in 20 days and Shaym can do it in 60 days. With the help of Radha, they finish it in ...
Working with missing values in Pandas | by B. Chen | Towards Data Science
The real-world data is rarely clean and homogeneous. In particular, many interesting datasets will have some amount of values missing. In this article, we will discuss how missing value is represented in Pandas, how to deal with other characters representations and Pandas built-in methods for handling missing values. O...
[ { "code": null, "e": 307, "s": 172, "text": "The real-world data is rarely clean and homogeneous. In particular, many interesting datasets will have some amount of values missing." }, { "code": null, "e": 491, "s": 307, "text": "In this article, we will discuss how missing value ...
Reduce decimals while printing in Arduino
Often some functions can output really long floating-point numbers, with several decimal digits. Several times, we are just interested in the first couple of decimal digits, and the remaining digits just reduce the readability and make the Serial Monitor window cluttered. In order to round of floating-point numbers whe...
[ { "code": null, "e": 1335, "s": 1062, "text": "Often some functions can output really long floating-point numbers, with several decimal digits. Several times, we are just interested in the first couple of decimal digits, and the remaining digits just reduce the readability and make the Serial Monito...
How to get innerHTML of whole page in selenium driver?
We can get the innerHTML of the whole page in Selenium. We shall use the method getPageSource and print the values captured by it in the console. String s = driver.getPageSource(); We can also get the HTML source code via Javascript commands in Selenium. We shall utilize executeScript method and pass the command return...
[ { "code": null, "e": 1208, "s": 1062, "text": "We can get the innerHTML of the whole page in Selenium. We shall use the method getPageSource and print the values captured by it in the console." }, { "code": null, "e": 1243, "s": 1208, "text": "String s = driver.getPageSource();" ...
Move last m elements to the front of a given Linked List - GeeksforGeeks
18 Jun, 2021 Given the head of a Singly Linked List and a value m, the task is to move the last m elements to the front. Examples: Input: 4->5->6->1->2->3 ; m = 3 Output: 1->2->3->4->5->6Input: 0->1->2->3->4->5 ; m = 4 Output: 2->3->4->5->0->1 Algorithm: Use two pointers: one to store the address of the last no...
[ { "code": null, "e": 24958, "s": 24930, "text": "\n18 Jun, 2021" }, { "code": null, "e": 25078, "s": 24958, "text": "Given the head of a Singly Linked List and a value m, the task is to move the last m elements to the front. Examples: " }, { "code": null, "e": 25193,...
How to find the area of an image contour Java OpenCV library?
Contours are nothing but the line joining all the points along the boundary of a particular shape. Using this you can − Find the shape of an object. Find the shape of an object. Calculate the area of an object. Calculate the area of an object. Detect an object. Detect an object. Recognize an object. Recognize an object...
[ { "code": null, "e": 1182, "s": 1062, "text": "Contours are nothing but the line joining all the points along the boundary of a particular shape. Using this you can −" }, { "code": null, "e": 1211, "s": 1182, "text": "Find the shape of an object." }, { "code": null, "...
HTML Tutorial
HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages. HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which was published in 1995. HTML 4.01 was a major version of HTML and it was published in late 1999. Thou...
[ { "code": null, "e": 2849, "s": 2374, "text": "HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages. HTML was created by Berners-Lee in late 1991 but \"HTML 2.0\" was the first standard HTML specification which was published in 1995. HTML 4.0...
Gentle Introduction To Text Representation - Part - 1 | by Sundaresh Chandran | Towards Data Science
Computers are brilliant when dealing with numbers. They are faster than humans in calculations & decoding patterns by many orders of magnitude. But what if the data is not numerical? What if it's language? What happens when the data is in characters, words & sentences? How do we make computers process our language? How...
[ { "code": null, "e": 713, "s": 172, "text": "Computers are brilliant when dealing with numbers. They are faster than humans in calculations & decoding patterns by many orders of magnitude. But what if the data is not numerical? What if it's language? What happens when the data is in characters, word...
Arithmetic Operations on Images using OpenCV | Set-2 (Bitwise Operations on Binary Images) - GeeksforGeeks
12 Oct, 2021 Prerequisite: Arithmetic Operations on Images | Set-1Bitwise operations are used in image manipulation and used for extracting essential parts in the image. In this article, Bitwise operations used are : ANDORXORNOT AND OR XOR NOT Also, Bitwise operations helps in image masking. Image creation can be ena...
[ { "code": null, "e": 41552, "s": 41524, "text": "\n12 Oct, 2021" }, { "code": null, "e": 41758, "s": 41552, "text": "Prerequisite: Arithmetic Operations on Images | Set-1Bitwise operations are used in image manipulation and used for extracting essential parts in the image. In thi...
A backtracking approach to generate n bit Gray Codes - GeeksforGeeks
11 Jun, 2021 Given a number n, the task is to generate n bit Gray codes (generate bit patterns from 0 to 2^n-1 such that successive patterns differ by one bit) Examples: Input : 2 Output : 0 1 3 2 Explanation : 00 - 0 01 - 1 11 - 3 10 - 2 Input : 3 Output : 0 1 3 2 6 7 5 4 We have discussed an approach in Gener...
[ { "code": null, "e": 24934, "s": 24906, "text": "\n11 Jun, 2021" }, { "code": null, "e": 25082, "s": 24934, "text": "Given a number n, the task is to generate n bit Gray codes (generate bit patterns from 0 to 2^n-1 such that successive patterns differ by one bit) " }, { "...
How does ++ and -- operators work in Python?
In C, C++, Java etc ++ and -- operators increment and decrement value of a variable by 1. In Python these operators won't work. In Python variables are just labels to objects in memory. In Python numeric objects are immutable. Hence by a++ (if a=10) we are trying to increment value of 10 object to 11 which is not allo...
[ { "code": null, "e": 1191, "s": 1062, "text": "In C, C++, Java etc ++ and -- operators increment and decrement value of a variable by 1. In Python these operators won't work. " }, { "code": null, "e": 1387, "s": 1191, "text": "In Python variables are just labels to objects in mem...
Data Warehousing - Schemas
Schema is a logical description of the entire database. It includes the name and description of records of all record types including all associated data-items and aggregates. Much like a database, a data warehouse also requires to maintain a schema. A database uses relational model, while a data warehouse uses Star, S...
[ { "code": null, "e": 2410, "s": 1978, "text": "Schema is a logical description of the entire database. It includes the name and description of records of all record types including all associated data-items and aggregates. Much like a database, a data warehouse also requires to maintain a schema. A ...
Publishing Machine Learning API with Python Flask | by Andrej Baranovskij | Towards Data Science
Flask is fun and easy to setup, as it says on Flask website. And that's true. This microframework for Python offers a powerful way of annotating Python function with REST endpoint. I’m using Flask to publish ML model API to be accessible by the 3rd party business applications. This example is based on XGBoost. For bett...
[ { "code": null, "e": 450, "s": 172, "text": "Flask is fun and easy to setup, as it says on Flask website. And that's true. This microframework for Python offers a powerful way of annotating Python function with REST endpoint. I’m using Flask to publish ML model API to be accessible by the 3rd party ...
What is ViewData in ASP .Net MVC C#?
ViewData is a dictionary of objects that are stored and retrieved using strings as keys. It is used to transfer data from Controller to View. Since ViewData is a dictionary, it contains key-value pairs where each key must be a string. ViewData only transfers data from controller to view, not vice-versa. It is valid onl...
[ { "code": null, "e": 1412, "s": 1062, "text": "ViewData is a dictionary of objects that are stored and retrieved using strings as keys.\nIt is used to transfer data from Controller to View. Since ViewData is a dictionary, it\ncontains key-value pairs where each key must be a string. ViewData only tr...
PHP - Ajax Auto Complete Search
The Auto complete search box provides the suggestions when you enter data into the field. Here we are using xml to call auto complete suggestions. The below example demonstrate, How to use auto complete text box using with php. Index page should be as follows − <html> <head> <style> div { ...
[ { "code": null, "e": 2985, "s": 2757, "text": "The Auto complete search box provides the suggestions when you enter data into the field. Here we are using xml to call auto complete suggestions. The below example demonstrate, How to use auto complete text box using with php." }, { "code": nul...
Kernel Functions in Non-linear Classification | by Edwin Tai | Towards Data Science
Once the data points are non-linear separable in their original feature space, the linear classifier may be failed to determine where the decision boundary is. However, mapping the original feature space (x ∈ Rd) into the higher dimensional feature space (φ(x) ∈ Re , e>d) can help to resurrect the linear classifier to ...
[ { "code": null, "e": 514, "s": 172, "text": "Once the data points are non-linear separable in their original feature space, the linear classifier may be failed to determine where the decision boundary is. However, mapping the original feature space (x ∈ Rd) into the higher dimensional feature space ...
How to vertically align text inside a flexbox using CSS? - GeeksforGeeks
12 Apr, 2019 CSS flexbox: The flex property in CSS is the combination of flex-grow, flex-shrink, and flex-basis property. It is used to set the length of flexible items. The flex property is much responsive and mobile friendly. It is easy to positioning child elements and the main container. The margin doesn’t collapse...
[ { "code": null, "e": 25088, "s": 25060, "text": "\n12 Apr, 2019" }, { "code": null, "e": 25657, "s": 25088, "text": "CSS flexbox: The flex property in CSS is the combination of flex-grow, flex-shrink, and flex-basis property. It is used to set the length of flexible items. The fl...
What are the differences between tight coupling and loose coupling in Java?
Tight coupling means classes and objects are dependent on one another. In general, tight coupling is usually not good because it reduces the flexibility and re-usability of the code while Loose coupling means reducing the dependencies of a class that uses the different class directly. The tightly coupled object is an o...
[ { "code": null, "e": 1348, "s": 1062, "text": "Tight coupling means classes and objects are dependent on one another. In general, tight coupling is usually not good because it reduces the flexibility and re-usability of the code while Loose coupling means reducing the dependencies of a class that us...
C++ program to take integer and float as input and return their sum
Suppose we have two numbers a and b, a is integer and b is a float. We shall have to take them from standard input and display the sum. So, if the input is like a = 10 b = 56.23, then the output will be Sum: 66.23 To solve this, we will follow these steps − To display output into the standard output device we can use e...
[ { "code": null, "e": 1198, "s": 1062, "text": "Suppose we have two numbers a and b, a is integer and b is a float. We shall have to take them from standard input and display the sum." }, { "code": null, "e": 1276, "s": 1198, "text": "So, if the input is like a = 10 b = 56.23, the...
Amazon Interview Experience for SDE Intern | On-Campus 2020 - GeeksforGeeks
14 Oct, 2020 Round 1: Round 1 was an online assessment that consisted of four parts: Code Debugging – 7 questions to be debugged in 20 minutes.Coding Test – 2 coding questions to be solved in 70 minutes.Workstyles assessment – 20minutesReasoning ability – 35 minutes Code Debugging – 7 questions to be debugged in 20 min...
[ { "code": null, "e": 25602, "s": 25574, "text": "\n14 Oct, 2020" }, { "code": null, "e": 25674, "s": 25602, "text": "Round 1: Round 1 was an online assessment that consisted of four parts:" }, { "code": null, "e": 25856, "s": 25674, "text": "Code Debugging – 7...
How do I catch a Ctrl+C event in C++?
The CTRL + C is used to send an interrupt to the current executing task. In this program, we will see how to catch the CTRL + C event using C++. The CTRL + C is one signal in C or C++. So we can catch by signal catching technique. For this signal, the code is SIGINT (Signal for Interrupt). Here the signal is caught by ...
[ { "code": null, "e": 1207, "s": 1062, "text": "The CTRL + C is used to send an interrupt to the current executing task. In this program, we will see how to catch the CTRL + C event using C++." }, { "code": null, "e": 1480, "s": 1207, "text": "The CTRL + C is one signal in C or C+...
SQL | SEQUENCES - GeeksforGeeks
21 Mar, 2018 Sequence is a set of integers 1, 2, 3, ... that are generated and supported by some database systems to produce unique values on demand. A sequence is a user defined schema bound object that generates a sequence of numeric values. Sequences are frequently used in many databases because many applications re...
[ { "code": null, "e": 23834, "s": 23806, "text": "\n21 Mar, 2018" }, { "code": null, "e": 23971, "s": 23834, "text": "Sequence is a set of integers 1, 2, 3, ... that are generated and supported by some database systems to produce unique values on demand." }, { "code": null...
PHP | Regular Expressions - GeeksforGeeks
10 Feb, 2022 Regular expressions commonly known as a regex (regexes) are a sequence of characters describing a special search pattern in the form of text string. They are basically used in programming world algorithms for matching some loosely defined patterns to achieve some relevant tasks. Some times regexes are unde...
[ { "code": null, "e": 40503, "s": 40475, "text": "\n10 Feb, 2022" }, { "code": null, "e": 41064, "s": 40503, "text": "Regular expressions commonly known as a regex (regexes) are a sequence of characters describing a special search pattern in the form of text string. They are basic...