title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Explain rename operation in relational algebra (DBMS)?
Query is a question or requesting information. Query language is a language which is used to retrieve information from a database. Query language is divided into two types − Procedural language Procedural language Non-procedural language Non-procedural language Information is retrieved from the database by specifying t...
[ { "code": null, "e": 1193, "s": 1062, "text": "Query is a question or requesting information. Query language is a language which is used to retrieve information from a database." }, { "code": null, "e": 1236, "s": 1193, "text": "Query language is divided into two types −" }, ...
Using Manipulating Data
Oracle provide Data Manipulation Language commands to exercise data operations in the database.Data operations can be populating the database tables with the application or business data,modifying the data and removing the data from the database,whenever required. Besides the data operations,there are set of commands w...
[ { "code": null, "e": 2886, "s": 2463, "text": "Oracle provide Data Manipulation Language commands to exercise data operations in the database.Data operations can be populating the database tables with the application or business data,modifying the data and removing the data from the database,wheneve...
Count number of rows in a MongoDB collection
To count number of documents, use count() in MongoDB. Let us create a collection with documents − > db.demo664.insertOne({_id:1,ClientName:"Chris"}); { "acknowledged" : true, "insertedId" : 1 } > db.demo664.insertOne({_id:2,ClientName:"Bob"}); { "acknowledged" : true, "insertedId" : 2 } > db.demo664.insertOne({_id:3,Cl...
[ { "code": null, "e": 1160, "s": 1062, "text": "To count number of documents, use count() in MongoDB. Let us create a collection with documents −" }, { "code": null, "e": 1540, "s": 1160, "text": "> db.demo664.insertOne({_id:1,ClientName:\"Chris\"});\n{ \"acknowledged\" : true, \"...
D3.js - Transition
Transition is the process of changing from one state to another of an item. D3.js provides a transition() method to perform transition in the HTML page. Let us learn about transition in this chapter. The transition() method is available for all selectors and it starts the transition process. This method supports most ...
[ { "code": null, "e": 2331, "s": 2130, "text": "Transition is the process of changing from one state to another of an item. D3.js provides a transition() method to perform transition in the HTML page. Let us learn about transition in this chapter." }, { "code": null, "e": 2752, "s": ...
Cross field validation with Pandas. Final Blows to the Dirty Data. | Towards Data Science
Today, data never comes from a single source. More often than not, it is collected in different locations and merged together. A common challenge when merging data is data integrity. In simple words, making sure our data is correct by using multiple fields to check the validity of another. In fancier terms, this proces...
[ { "code": null, "e": 528, "s": 172, "text": "Today, data never comes from a single source. More often than not, it is collected in different locations and merged together. A common challenge when merging data is data integrity. In simple words, making sure our data is correct by using multiple field...
Split Array into Consecutive Subsequences in C++
Suppose we have an array nums that is sorted in ascending order. We have to return true if and only if we can split it into 1 or more subsequences such that each subsequence consists of consecutive integers and whose length at least 3. So if the input is like [1,2,3,3,4,4,5,5], then the output will be True, as we have ...
[ { "code": null, "e": 1444, "s": 1062, "text": "Suppose we have an array nums that is sorted in ascending order. We have to return true if and only if we can split it into 1 or more subsequences such that each subsequence consists of consecutive integers and whose length at least 3. So if the input i...
Python | Animation in Kivy using .kv file - 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. Animation and AnimationTransition are used to animate Widget properti...
[ { "code": null, "e": 23883, "s": 23855, "text": "\n19 Oct, 2021" }, { "code": null, "e": 24121, "s": 23883, "text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, Linux, and Windows, etc. It is basically used to develop the Android applicati...
How to randomize the items of a list in Python?
The random module in the Python standard library provides a shuffle() function that returns a sequence with its elements randomly placed. >>> import random >>> l1=['aa',22,'ff',15,90,5.55] >>> random.shuffle(l1) >>> l1 [22, 15, 90, 5.55, 'ff', 'aa'] >>> random.shuffle(l1) >>> l1 ['aa', 'ff', 90, 22, 5.55, 15]
[ { "code": null, "e": 1200, "s": 1062, "text": "The random module in the Python standard library provides a shuffle() function that returns a sequence with its elements randomly placed." }, { "code": null, "e": 1373, "s": 1200, "text": ">>> import random\n>>> l1=['aa',22,'ff',15,9...
Stock buy and sell | Practice | GeeksforGeeks
The cost of stock on each day is given in an array A[] of size N. Find all the days on which you buy and sell the stock so that in between those days your profit is maximum. Note: There may be multiple possible solutions. Return any one of them. Any correct solution will result in an output of 1, whereas wrong solution...
[ { "code": null, "e": 603, "s": 238, "text": "The cost of stock on each day is given in an array A[] of size N. Find all the days on which you buy and sell the stock so that in between those days your profit is maximum.\nNote: There may be multiple possible solutions. Return any one of them. Any corr...
Find most frequent element in a list in Python
In this article we will see how to find the element which is most common in a given list. In other words, the element with highest frequency. We apply why the set function to get the unique elements of the list and then keep account of each of those elements in the list. Finally apply a max function to get the element ...
[ { "code": null, "e": 1204, "s": 1062, "text": "In this article we will see how to find the element which is most common in a given list. In other words, the element with highest frequency." }, { "code": null, "e": 1406, "s": 1204, "text": "We apply why the set function to get the...
Clojure - Date and Time
Since the Clojure framework is derived from Java classes, one can use the date-time classes available in Java in Clojure. The class date represents a specific instant in time, with millisecond precision. Following are the methods available for the date-time class. This is used to create the date object in Clojure. Foll...
[ { "code": null, "e": 2578, "s": 2374, "text": "Since the Clojure framework is derived from Java classes, one can use the date-time classes available in Java in Clojure. The class date represents a specific instant in time, with millisecond precision." }, { "code": null, "e": 2639, "s...
Discover the power of FILTER() in DAX | by Salvatore Cagliari | Towards Data Science
Most of you know something about the FILTER() function in DAX. But, there are chances that you misuse it or don’t use this function’s full power. For example, some time ago, I saw a query similar to this: EVALUATE SUMMARIZECOLUMNS( ‘Product’[BrandName] ,”Sales”, CALCULATE([Sum Online Sales] ...
[ { "code": null, "e": 235, "s": 172, "text": "Most of you know something about the FILTER() function in DAX." }, { "code": null, "e": 318, "s": 235, "text": "But, there are chances that you misuse it or don’t use this function’s full power." }, { "code": null, "e": 377...
Tryit Editor v3.7
Tryit: HTML href attribute
[]
Python | TextBlob.Word.spellcheck() method - GeeksforGeeks
09 Sep, 2019 With the help of TextBlob.Word.spellcheck() method, we can check the word if that word have spelling mistake by using TextBlob.Word.spellcheck() method. Syntax : TextBlob.Word.spellcheck()Return : Return the word with correctness accuracy. Example #1 :In this example we can say that by using TextBlob.Word....
[ { "code": null, "e": 25647, "s": 25619, "text": "\n09 Sep, 2019" }, { "code": null, "e": 25800, "s": 25647, "text": "With the help of TextBlob.Word.spellcheck() method, we can check the word if that word have spelling mistake by using TextBlob.Word.spellcheck() method." }, { ...
Remove comma from a string in PHP?
To remove comma, you can replace. To replace, use str_replace() in PHP. Let’s say the following is our input string with comma $name="John,Smith"; We want the output after removing comma from the above string is JohnSmith The PHP code is as follows Live Demo <!DOCTYPE html> <html> <body> <?php $name="John,Smith"; $r...
[ { "code": null, "e": 1134, "s": 1062, "text": "To remove comma, you can replace. To replace, use str_replace() in PHP." }, { "code": null, "e": 1190, "s": 1134, "text": "Let’s say the following is our input string with comma " }, { "code": null, "e": 1210, "s": 11...
How to highlight text in a tkinter Text widget?
Tkinter Text widget is used to create text fields that accept multiline user inputs. Let us suppose that in a text widget, we want to highlight some text. In order to highlight a specific text written in the text widget, tkinter provides the tag_add(tag, i,j) method. It adds tags to the specific text by defining the in...
[ { "code": null, "e": 1398, "s": 1062, "text": "Tkinter Text widget is used to create text fields that accept multiline user inputs. Let us suppose that in a text widget, we want to highlight some text. In order to highlight a specific text written in the text widget, tkinter provides the tag_add(tag...
How to style a checkbox using CSS? - GeeksforGeeks
30 Jul, 2021 Checkbox is an HTML element which is used to take input from the user. Although it is bit complicated to style it but using Pseudo Elements like :before, :after, :hover and :checked, it is possible to style a checkbox. In order to style the checkbox the user first need to hide the default checkbox which ca...
[ { "code": null, "e": 24479, "s": 24451, "text": "\n30 Jul, 2021" }, { "code": null, "e": 24855, "s": 24479, "text": "Checkbox is an HTML element which is used to take input from the user. Although it is bit complicated to style it but using Pseudo Elements like :before, :after, :...
How to plot 4D scatter-plot with custom colours and cutom area size in Python Matplotlib?
Scatter-plot are very useful when representing the data with two dimensions to verify whether there's any relationship between two variables. A scatter plot is chart where the data is represented as dots with X and Y values. 1. Install matplotlib by following command. pip install matplotlib 2. Import matplotlib import ...
[ { "code": null, "e": 1287, "s": 1062, "text": "Scatter-plot are very useful when representing the data with two dimensions to verify whether there's any relationship between two variables. A scatter plot is chart where the data is represented as dots with X and Y values." }, { "code": null, ...
Android - WebView
WebView is a view that display web pages inside your application. You can also specify HTML string and can show it inside your application using WebView. WebView makes turns your application to a web application. In order to add WebView to your application, you have to add <WebView> element to your xml layout file. Its...
[ { "code": null, "e": 3820, "s": 3607, "text": "WebView is a view that display web pages inside your application. You can also specify HTML string and can show it inside your application using WebView. WebView makes turns your application to a web application." }, { "code": null, "e": 395...
How to extract only first sub-element from a list in R?
To extract only first element from a list, we can use sapply function and access the first element with double square brackets. For example, if we have a list called LIST that contains 5 elements each containing 20 elements then the first sub-element can be extracted by using the command sapply(LIST,"[[",1). Consider t...
[ { "code": null, "e": 1372, "s": 1062, "text": "To extract only first element from a list, we can use sapply function and access the first element with double square brackets. For example, if we have a list called LIST that contains 5 elements each containing 20 elements then the first sub-element ca...
JavaScript code for recursive Fibonacci series
We have to write a recursive function fibonacci() that takes in a number n and returns an array with first n elements of fibonacci series. Therefore, let’s write the code for this function − const fibonacci = (n, res = [], count = 1, last = 0) => { if(n){ return fibonacci(n-1, res.concat(count), count+last, co...
[ { "code": null, "e": 1253, "s": 1062, "text": "We have to write a recursive function fibonacci() that takes in a number n and returns an array\nwith first n elements of fibonacci series. Therefore, let’s write the code for this function −" }, { "code": null, "e": 1521, "s": 1253, ...
Java Program to check for Integer overflow
To check for Integer overflow, we need to check the Integer.MAX_VALUE, which is the maximum value of an integer in Java. Let us see an example wherein integers are added and if the sum is more than the Integer.MAX_VALUE, then an exception is thrown. Live Demo public class Demo { public static void main(String[] arg...
[ { "code": null, "e": 1183, "s": 1062, "text": "To check for Integer overflow, we need to check the Integer.MAX_VALUE, which is the maximum value of an integer in Java." }, { "code": null, "e": 1312, "s": 1183, "text": "Let us see an example wherein integers are added and if the s...
SciPy Sparse Data
Sparse data is data that has mostly unused elements (elements that don't carry any information ). It can be an array like this one: [1, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0] Sparse Data: is a data set where most of the item values are zero. Dense Array: is the opposite of a sparse array: most of the values are not zero. In ...
[ { "code": null, "e": 98, "s": 0, "text": "Sparse data is data that has mostly unused elements (elements that don't carry any information )." }, { "code": null, "e": 132, "s": 98, "text": "It can be an array like this one:" }, { "code": null, "e": 169, "s": 132, ...
Assign Function to a Variable in Python - GeeksforGeeks
17 May, 2021 In this article, we are going to see how to assign a function to a variable in Python. In Python, we can assign a function to a variable. And using that variable we can call the function as many as times we want. Thereby, increasing code reusability. Implementation Simply assign a function to the desired ...
[ { "code": null, "e": 23773, "s": 23745, "text": "\n17 May, 2021" }, { "code": null, "e": 24025, "s": 23773, "text": "In this article, we are going to see how to assign a function to a variable in Python. In Python, we can assign a function to a variable. And using that variable w...
How to get a bitmap from Url in Android app?
This example demonstrates how do I get a bitmap from Url in android app. 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"?> <LinearLayout ...
[ { "code": null, "e": 1135, "s": 1062, "text": "This example demonstrates how do I get a bitmap from Url in android app." }, { "code": null, "e": 1264, "s": 1135, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cr...
ML | Feature Scaling - Part 1 - GeeksforGeeks
25 Aug, 2021 Feature Scaling is a technique to standardize the independent features present in the data in a fixed range. It is performed during the data pre-processing. Working: Given a data-set with features- Age, Salary, BHK Apartment with the data size of 5000 people, each having these independent data features. ...
[ { "code": null, "e": 24334, "s": 24306, "text": "\n25 Aug, 2021" }, { "code": null, "e": 24492, "s": 24334, "text": "Feature Scaling is a technique to standardize the independent features present in the data in a fixed range. It is performed during the data pre-processing. " },...
PHP | Serializing Data - GeeksforGeeks
23 Aug, 2019 Most often we need to store a complex array in the database or in a file from PHP. Some of us might have surely searched for some built-in function to accomplish this task. Complex arrays are arrays with elements of more than one data-types or array.But, we already have a handy solution to handle this situ...
[ { "code": null, "e": 23964, "s": 23936, "text": "\n23 Aug, 2019" }, { "code": null, "e": 24426, "s": 23964, "text": "Most often we need to store a complex array in the database or in a file from PHP. Some of us might have surely searched for some built-in function to accomplish t...
Another Twitter sentiment analysis with Python — Part 10 (Neural Network with Doc2Vec/Word2Vec/GloVe) | by Ricky Kim | Towards Data Science
This is the 10th part of my ongoing Twitter sentiment analysis project. You can find the previous posts from the below links. Part 1: Data cleaning Part 2: EDA, Data visualisation Part 3: Zipf’s Law, Data visualisation Part 4: Feature extraction (count vectorizer), N-gram, confusion matrix Part 5: Feature extraction (T...
[ { "code": null, "e": 172, "s": 46, "text": "This is the 10th part of my ongoing Twitter sentiment analysis project. You can find the previous posts from the below links." }, { "code": null, "e": 194, "s": 172, "text": "Part 1: Data cleaning" }, { "code": null, "e": 22...
Adding base n numbers
In this problem, two numbers are given. The base of those numbers is n. We have to find the result of those number after addition in base n also. At first, the numbers are converted into decimal numbers. From the decimal values, we can simply add them. Finally, the numbers are converted to base n number again. The n ba...
[ { "code": null, "e": 1208, "s": 1062, "text": "In this problem, two numbers are given. The base of those numbers is n. We have to find the result of those number after addition in base n also." }, { "code": null, "e": 1374, "s": 1208, "text": "At first, the numbers are converted ...
Sound Event Classification: A to Z | by Chathuranga Siriwardhana | Towards Data Science
Audio(Sound) is one of the main sensory information we receive to perceive our environment. Almost every action or an event in our surroundings has its unique sound. Audio has 3 main attributes which help us in distinguish between two sounds. Amplitude — Loudness of the sound Frequency — The pitch of the sound Timbre —...
[ { "code": null, "e": 415, "s": 172, "text": "Audio(Sound) is one of the main sensory information we receive to perceive our environment. Almost every action or an event in our surroundings has its unique sound. Audio has 3 main attributes which help us in distinguish between two sounds." }, { ...
GATE | GATE-CS-2007 | Question 56 - GeeksforGeeks
28 Jun, 2021 A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements: P: Increasing the number of page frames allocated to a process sometimes increases the page fault rate. Q: Some programs do not exhibit...
[ { "code": null, "e": 24366, "s": 24338, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24533, "s": 24366, "text": "A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statemen...
Multithreading in Python | Set 2 (Synchronization) - GeeksforGeeks
28 Aug, 2019 This article discusses the concept of thread synchronization in case of multithreading in Python programming language. Synchronization between threads Thread synchronization is defined as a mechanism which ensures that two or more concurrent threads do not simultaneously execute some particular program seg...
[ { "code": null, "e": 41163, "s": 41135, "text": "\n28 Aug, 2019" }, { "code": null, "e": 41282, "s": 41163, "text": "This article discusses the concept of thread synchronization in case of multithreading in Python programming language." }, { "code": null, "e": 41314, ...
How to upgrade Python PIP version on Windows | upgrade pip version
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws There is a need of keeping upgrade python PIP...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Maximum value at each level in an N-ary Tree - GeeksforGeeks
22 Jun, 2021 Given a N-ary Tree consisting of nodes valued in the range [0, N – 1] and an array arr[] where each node i is associated to value arr[i], the task is to print the maximum value associated with any node at each level of the given N-ary Tree. Examples: Input: N = 8, Edges[][] = {{0, 1}, {0, 2}, {0, 3}, {1, 4...
[ { "code": null, "e": 25055, "s": 25027, "text": "\n22 Jun, 2021" }, { "code": null, "e": 25296, "s": 25055, "text": "Given a N-ary Tree consisting of nodes valued in the range [0, N – 1] and an array arr[] where each node i is associated to value arr[i], the task is to print the ...
Place a specific value for NULL values in a MySQL column
Use IFNULL() to find and place a specific value for NULL values. Let us first create a table − mysql> create table DemoTable1878 ( FirstName varchar(20) ); Query OK, 0 rows affected (0.00 sec) Insert some records in the table using insert command − mysql> insert into DemoTable1878 values('Chris'); Query OK, 1 ...
[ { "code": null, "e": 1157, "s": 1062, "text": "Use IFNULL() to find and place a specific value for NULL values. Let us first create a table −" }, { "code": null, "e": 1264, "s": 1157, "text": "mysql> create table DemoTable1878\n (\n FirstName varchar(20)\n );\nQuery OK, 0 r...
Knight Probability in Chessboard in C++
Suppose we have one NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. Here the rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right square is (N-1, N-1). A knight can move in 8 different cells from a cell, that can be shown in this di...
[ { "code": null, "e": 1302, "s": 1062, "text": "Suppose we have one NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. Here the rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right square is (N-1, N-1)." }, { ...
How do I create a Python namespace?
Each package, module, class, function and method function owns a "namespace" in which variable names are resolved. When a function, module or package is evaluated (that is, starts execution), a namespace is created. So if you want to create a namespace, you just need to call a function, instantiate an object, import a ...
[ { "code": null, "e": 1546, "s": 1062, "text": "Each package, module, class, function and method function owns a \"namespace\" in which variable names are resolved. When a function, module or package is evaluated (that is, starts execution), a namespace is created. So if you want to create a namespac...
ISRO | ISRO CS 2015 | Question 78 - GeeksforGeeks
05 Apr, 2018 Consider the following C declaration struct ( short s[5]; union { float y; long z; }u; }t; Assume that the objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment consideration, is(A) 22 bytes(B) 18 bytes(C) 14 ...
[ { "code": null, "e": 24067, "s": 24039, "text": "\n05 Apr, 2018" }, { "code": null, "e": 24104, "s": 24067, "text": "Consider the following C declaration" }, { "code": null, "e": 24159, "s": 24104, "text": "struct (\nshort s[5];\nunion {\nfloat y;\nlong z;\n}u...
Image Processing with Python — Template Matching with Scikit-Image | by Tonichi Edeza | Towards Data Science
Template matching is a useful technique for identifying objects of interest in a picture. Unlike similar methods of object identification such as image masking and blob detection. Template matching is helpful as it allows us to identify more complex figures. This article will discuss exactly how to do this in Python. L...
[ { "code": null, "e": 491, "s": 172, "text": "Template matching is a useful technique for identifying objects of interest in a picture. Unlike similar methods of object identification such as image masking and blob detection. Template matching is helpful as it allows us to identify more complex figur...
GATE | GATE-CS-2000 | Question 49 - GeeksforGeeks
28 Jun, 2021 Given relations r(w, x) and s(y, z), the result of SELECT DISTINCT w, x FROM r, s is guaranteed to be same as r, provided (A) r has no duplicates and s is non-empty(B) r and s have no duplicates(C) s has no duplicates and r is non-empty(D) r and s have the same number of tuplesAnswer: (A)Explanatio...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24353, "s": 24302, "text": "Given relations r(w, x) and s(y, z), the result of" }, { "code": null, "e": 24392, "s": 24353, "text": "SELECT DISTINCT w, x\n FROM r, s ...
Insert sequential number in MySQL?
You can insert sequential number in MySQL using session variable. The syntax is as follows − SELECT @anyVariableName − = anyIntegerValue; UPDATE yourTableName SET yourColumnName = @anyVariableName − = @anyVariableName+IncrementStep; To understand the above syntax, let us create a table. The query to create a table is a...
[ { "code": null, "e": 1155, "s": 1062, "text": "You can insert sequential number in MySQL using session variable. The syntax is as follows −" }, { "code": null, "e": 1295, "s": 1155, "text": "SELECT @anyVariableName − = anyIntegerValue;\nUPDATE yourTableName SET yourColumnName = @...
How to control fps with requestAnimationFrame?
02 Jun, 2020 Introduction:It is important to control the frames per second limit, especially, when developing games where the animated objects should not exceed particular frames per second limit. The requestAnimationFrame() is used for simply repainting the screen — it is not a timer or a loop function. requestAnimati...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jun, 2020" }, { "code": null, "e": 321, "s": 28, "text": "Introduction:It is important to control the frames per second limit, especially, when developing games where the animated objects should not exceed particular frames per secon...
Find the minimum distance between two numbers
20 Jun, 2022 Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. You may assume that both x and y are different and present in arr[]. Examples: Input: arr[] = {1, 2}, x = 1, y = 2 Output: Minimum distance between 1 and 2 i...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Jun, 2022" }, { "code": null, "e": 269, "s": 52, "text": "Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. You may assume that both x...
Print all combinations of factors (Ways to factorize)
23 Jun, 2022 Write a program to print all the combinations of factors of given number n. Examples: Input : 16 Output :2 2 2 2 2 2 4 2 8 4 4 Input : 12 Output : 2 2 3 2 6 3 4 To solve this problem we take one array of array of integers or list of list of integers to store ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 128, "s": 52, "text": "Write a program to print all the combinations of factors of given number n." }, { "code": null, "e": 139, "s": 128, "text": "Examples: " }, { "cod...
Simple DELETE request using fetch API by making custom HTTP library
17 Feb, 2021 Why fetch() API method is used? The fetch() method is used to send the requests to the server without refreshing the page. It is an alternative to the XMLHttpRequest object. We will be taking a fake API which will contain Array as an example and from that API we will show to DELETE data by fetch API method...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2021" }, { "code": null, "e": 446, "s": 28, "text": "Why fetch() API method is used? The fetch() method is used to send the requests to the server without refreshing the page. It is an alternative to the XMLHttpRequest object. W...
Python | Numpy.expand_dims() method
17 Sep, 2019 With the help of Numpy.expand_dims() method, we can get the expanded dimensions of an array by using Numpy.expand_dims() method. Syntax : Numpy.expand_dims() Return : Return the expanded array. Example #1 :In this example we can see that using Numpy.expand_dims() method, we are able to get the expanded arr...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Sep, 2019" }, { "code": null, "e": 157, "s": 28, "text": "With the help of Numpy.expand_dims() method, we can get the expanded dimensions of an array by using Numpy.expand_dims() method." }, { "code": null, "e": 186, ...
Difference between Register Mode and Register Indirect Mode
04 Jul, 2022 Prerequisite – Addressing Modes 1. Register Mode: In register addressing mode, the operand is placed in one of the 8-bit or 16-bit general-purpose registers. The data is in the register that is specified by the instruction. Example: MOV R1, R2 Instruction has register R2 and R2 has operand. 2. Register ...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 87, "s": 54, "text": "Prerequisite – Addressing Modes " }, { "code": null, "e": 279, "s": 87, "text": "1. Register Mode: In register addressing mode, the operand is placed in on...
How to create a Facebook login using an Android App?
23 Feb, 2021 In this article, it is explained how to create an Android App that has a Facebook login in it. There are various social login features to use in Android applications. Here we will learn social login using Facebook, so need to integrate Facebook SDK in project to make use of Facebook login. Below are the va...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2021" }, { "code": null, "e": 123, "s": 28, "text": "In this article, it is explained how to create an Android App that has a Facebook login in it." }, { "code": null, "e": 319, "s": 123, "text": "There are v...
Python Program to get value of a dictionary given by index of maximum value of given key
18 Jul, 2021 Given a dictionary with value as a list, the task is to write a Python program that can find the maximum of any one key and output a similar index column of other key’s values. Approach : Get the maximum of the given key. Get the index of the maximum element found. Check if the index of max is present in t...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2021" }, { "code": null, "e": 205, "s": 28, "text": "Given a dictionary with value as a list, the task is to write a Python program that can find the maximum of any one key and output a similar index column of other key’s values...
Write a program to calculate the least common multiple of two numbers JavaScript
We are required to write a function that accepts two numbers and returns their least common multiple. The least common multiple of two numbers a and b is the smallest positive integer that is divisible by both a and b. For example − The LCM of 6 and 8 is 24 because 24 is the smallest positive integer that is divided by...
[ { "code": null, "e": 1289, "s": 1187, "text": "We are required to write a function that accepts two numbers and returns their least common\nmultiple." }, { "code": null, "e": 1406, "s": 1289, "text": "The least common multiple of two numbers a and b is the smallest positive integ...
Lodash - GeeksforGeeks
10 Dec, 2021 Lodash is a JavaScript library that works on the top of underscore.js. It helps in working with arrays, strings, objects, numbers, etc. It provides us with various inbuilt functions and uses a functional programming approach which that coding in JavaScript easier to understand because instead of writing re...
[ { "code": null, "e": 24903, "s": 24875, "text": "\n10 Dec, 2021" }, { "code": null, "e": 25403, "s": 24903, "text": "Lodash is a JavaScript library that works on the top of underscore.js. It helps in working with arrays, strings, objects, numbers, etc. It provides us with various...
How do I automatically download files from a pop up dialog using selenium-python?
We can automatically download files from a pop up dialog using Selenium webdriver with Python. After clicking the download link, a dialog box appears for the user to select various options to Save the file. We have to programmatically configure the path where the download has to be performed such that every time the Fi...
[ { "code": null, "e": 1394, "s": 1187, "text": "We can automatically download files from a pop up dialog using Selenium webdriver with Python. After clicking the download link, a dialog box appears for the user to select various options to Save the file." }, { "code": null, "e": 1613, ...
LZW (Lempel–Ziv–Welch) Compression technique
08 Nov, 2021 Why do we need a Compression Algorithm? There are two categories of compression techniques, lossy and lossless. Whilst each uses different techniques to compress files, both have the same aim: To look for duplicate data in the graphic (GIF for LZW) and use a much more compact data representation. Lossless ...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Nov, 2021" }, { "code": null, "e": 92, "s": 52, "text": "Why do we need a Compression Algorithm?" }, { "code": null, "e": 637, "s": 92, "text": "There are two categories of compression techniques, lossy and lossl...
How to Sort HashSet Elements using Comparable Interface in Java?
01 Dec, 2021 The HashSet class implements the Set interface, backed by a hash table which is actually a HashMap instance. No guarantee is made as to the iteration order of the set which means when we iterate the HashSet, there is no guarantee that we get elements in which order they were inserted. To sort HashSet eleme...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Dec, 2021" }, { "code": null, "e": 314, "s": 28, "text": "The HashSet class implements the Set interface, backed by a hash table which is actually a HashMap instance. No guarantee is made as to the iteration order of the set which me...
How to Break out of multiple loops in Python ?
21 Aug, 2021 In this article, we will see how to break out of multiple loops in Python. For example, we are given a list of lists arr and an integer x. The task is to iterate through each nested list in order and keep displaying the elements until an element equal to x is found. If such an element is found, an appropri...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Aug, 2021" }, { "code": null, "e": 438, "s": 53, "text": "In this article, we will see how to break out of multiple loops in Python. For example, we are given a list of lists arr and an integer x. The task is to iterate through each...
How to merge R DataFrames of different length ?
06 Aug, 2021 In this article, we will discuss how to combine two dataframes of different length and make one final dataframe in the R Programming language. Create first dataframe Create second dataframe Use any function from the given below and combine them Display dataset so created R has an inbuilt function called m...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Aug, 2021" }, { "code": null, "e": 172, "s": 28, "text": "In this article, we will discuss how to combine two dataframes of different length and make one final dataframe in the R Programming language. " }, { "code": null, ...
Python Bokeh – Making Interactive Legends
28 Jul, 2020 Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. The legend of a graph reflects the data displayed in the graph’s Y...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 269, "s": 28, "text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise co...
C program to create Indian National Flag using Graphics - GeeksforGeeks
01 Apr, 2021 In this article, we will discuss how to draw the Indian National Flag using Graphics. Approach: Draw a rectangle using the function rectangle(). Equally, divide the above rectangle into three parts by creating the line using the function line(). Draw double lines on each other i.e., draw 4 lines and among ...
[ { "code": null, "e": 24153, "s": 24125, "text": "\n01 Apr, 2021" }, { "code": null, "e": 24239, "s": 24153, "text": "In this article, we will discuss how to draw the Indian National Flag using Graphics." }, { "code": null, "e": 24249, "s": 24239, "text": "Appr...
Cassandra - CQL User Defined Datatypes
CQL provides the facility of creating and using user-defined data types. You can create a data type to handle multiple fields. This chapter explains how to create, alter, and delete a user-defined data type. The command CREATE TYPE is used to create a user-defined data type. Its syntax is as follows − CREATE TYPE <keys...
[ { "code": null, "e": 2495, "s": 2287, "text": "CQL provides the facility of creating and using user-defined data types. You can create a data type to handle multiple fields. This chapter explains how to create, alter, and delete a user-defined data type." }, { "code": null, "e": 2590, ...
How to shrink NumPy, SciPy, Pandas, and Matplotlib for your data product | by Scott Zelenka | Towards Data Science
If you’re a Data Scientist or Python developer deploying data products in a microservice framework, there’s a good chance you need to leverage the common scientific ecosystem modules of NumPy, SciPy, Pandas, or Matplotlib. The “micro” in microservice, suggests you should keep components as tiny as possible. However, th...
[ { "code": null, "e": 552, "s": 172, "text": "If you’re a Data Scientist or Python developer deploying data products in a microservice framework, there’s a good chance you need to leverage the common scientific ecosystem modules of NumPy, SciPy, Pandas, or Matplotlib. The “micro” in microservice, sug...
How to catch NotImplementedError Exception in Python?
User-defined base classes can raise NotImplementedError to indicate that a method or behavior needs to be defined by a subclass, simulating an interface. This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override ...
[ { "code": null, "e": 1394, "s": 1062, "text": "User-defined base classes can raise NotImplementedError to indicate that a method or behavior needs to be defined by a subclass, simulating an interface. This exception is derived from RuntimeError. In user defined base classes, abstract methods should ...
CallableStatement in JDBC Example | prepareCall() Example in JDBC
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to learn bout ...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
PCA clearly explained —When, Why, How to use it and feature importance: A guide in Python | by Serafeim Loukas | Towards Data Science
Principal Components Analysis (PCA) is a well-known unsupervised dimensionality reduction technique that constructs relevant features/variables through linear (linear PCA) or non-linear (kernel PCA) combinations of the original variables (features). In this post, we will only focus on the famous and widely used linear ...
[ { "code": null, "e": 504, "s": 172, "text": "Principal Components Analysis (PCA) is a well-known unsupervised dimensionality reduction technique that constructs relevant features/variables through linear (linear PCA) or non-linear (kernel PCA) combinations of the original variables (features). In th...
A step-by-step guide in designing knowledge-driven models using Bayesian theorem. | by Erdogan Taskesen | Towards Data Science
Data is the fuel for models but you may have witnessed situations where there is no data but solely a domain expert that can very well describe or even predict “the situation” given the circumstances. I will summarize the concepts of knowledge-driven models in terms of Bayesian probabilistic, followed by a hands-on tut...
[ { "code": null, "e": 953, "s": 172, "text": "Data is the fuel for models but you may have witnessed situations where there is no data but solely a domain expert that can very well describe or even predict “the situation” given the circumstances. I will summarize the concepts of knowledge-driven mode...
KMP Algorithm for Pattern Searching - GeeksforGeeks
24 Mar, 2021 Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m. Examples: Input: txt[] = "THIS IS A TEST TEXT" pat[] = "TEST" Output: Pattern found at index 10 Input: txt[] = "AABAACAAD...
[ { "code": null, "e": 34514, "s": 34486, "text": "\n24 Mar, 2021" }, { "code": null, "e": 34688, "s": 34514, "text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume t...
Serverless Functions and Using AWS Lambda with S3 Buckets | by Abdul Rahman | Towards Data Science
In my previous articles you may have seen me going on and on about deploying code on server instances on the cloud, building services to manage those instances, building a reverse-proxy on top of those services and so on. No doubt that some of you may have wished if you could just write code, deploy it somewhere and no...
[ { "code": null, "e": 662, "s": 171, "text": "In my previous articles you may have seen me going on and on about deploying code on server instances on the cloud, building services to manage those instances, building a reverse-proxy on top of those services and so on. No doubt that some of you may hav...
Creating a Node.js server
The mostly used core modules of Node.js are − http − used to launch a simple server, send requests http − used to launch a simple server, send requests https − used to launch a ssl secured http server https − used to launch a ssl secured http server path − used to handle path based on operating system path − used to ha...
[ { "code": null, "e": 1108, "s": 1062, "text": "The mostly used core modules of Node.js are −" }, { "code": null, "e": 1161, "s": 1108, "text": "http − used to launch a simple server, send requests" }, { "code": null, "e": 1214, "s": 1161, "text": "http − used ...
How to use JavaScript to redirect a webpage after 5 seconds?
To redirect a webpage after 5 seconds, use the setInterval() method to set the time interval. Add the webpage in window.location.href object. You can try to run the following code to learn how to redirect a webpage after 5 seconds − Live Demo <!DOCTYPE html> <html> <body> <script> setTimeout(function(...
[ { "code": null, "e": 1204, "s": 1062, "text": "To redirect a webpage after 5 seconds, use the setInterval() method to set the time interval. Add the webpage in window.location.href object." }, { "code": null, "e": 1295, "s": 1204, "text": "You can try to run the following code to...
Solve the Logical Expression given by string - GeeksforGeeks
27 May, 2021 Given string str representing a logical expression which consists of the operators | (OR), & (AND),! (NOT) , 0, 1 and, only (i.e. no space between characters). The task is to print the result of the logical expression.Examples: Input: str = “[[0,&,1],|,[!,1]]” Output: 0 [[0,&,1],|,[!,1]] [[0,&,1],|,0] [[...
[ { "code": null, "e": 24733, "s": 24705, "text": "\n27 May, 2021" }, { "code": null, "e": 24963, "s": 24733, "text": "Given string str representing a logical expression which consists of the operators | (OR), & (AND),! (NOT) , 0, 1 and, only (i.e. no space between characters). The...
Count of distinct characters in a substring by given range for Q queries - GeeksforGeeks
03 Jun, 2021 Given a string S consisting of lower case alphabets of size N and Q queries in the range [L, R], the task is to print the count of distinct characters in the substring by given range for each query. Examples: Input: S = “geeksforgeeks”, Q[][] = {{0, 4}, {3, 7}} Output: 4 5 Explanation: Distinct characters...
[ { "code": null, "e": 24301, "s": 24273, "text": "\n03 Jun, 2021" }, { "code": null, "e": 24500, "s": 24301, "text": "Given a string S consisting of lower case alphabets of size N and Q queries in the range [L, R], the task is to print the count of distinct characters in the subst...
Tryit Editor v3.7 - Show Java
public class WriteToFile { public static void main(String[] args) { try { FileWriter myWriter = new FileWriter("filename.txt"); myWriter.write("Files in Java might be tricky, but it is fun enough!"); myWriter.close(); System.out.println("Successfully wrote to the file."); } catch...
[]
Logistic Regression from Scratch. Learn how to build logistic regression... | by Arseny Turin | Towards Data Science
In this post, we’re going to build our own logistic regression model from scratch using Gradient Descent. To test our model we will use “Breast Cancer Wisconsin Dataset” from the sklearn package and predict if the lump is benign or malignant with over 95% accuracy. GitHub repo is here. So let's get started. Essentially...
[ { "code": null, "e": 480, "s": 171, "text": "In this post, we’re going to build our own logistic regression model from scratch using Gradient Descent. To test our model we will use “Breast Cancer Wisconsin Dataset” from the sklearn package and predict if the lump is benign or malignant with over 95%...
Custom object detection for non-data scientists — Tensorflow | by Italo José | Towards Data Science
In general terms, at the end of this tutorial you basically will be able to pick up your dataset, load it on jupyter notebook, train and use your model :)The picture above is the result in the example that we are going to play here. This article is just to call you to learn about TF object detection API, but this conte...
[ { "code": null, "e": 405, "s": 172, "text": "In general terms, at the end of this tutorial you basically will be able to pick up your dataset, load it on jupyter notebook, train and use your model :)The picture above is the result in the example that we are going to play here." }, { "code": ...
Android - LinkedIn Integration
Android allows your application to connect to Linkedin and share data or any kind of updates on Linkedin. This chapter is about integrating Linkedin into your application. There are two ways through which you can integrate Linkedin and share something from your application. These ways are listed below. Linkedin SDK (Sc...
[ { "code": null, "e": 3779, "s": 3607, "text": "Android allows your application to connect to Linkedin and share data or any kind of updates on Linkedin. This chapter is about integrating Linkedin into your application." }, { "code": null, "e": 3911, "s": 3779, "text": "There are ...
C program to draw the Olympics Logo using graphics - GeeksforGeeks
14 Apr, 2021 In this article, we will discuss how to design the Olympics Logo using Graphics. Draw five circles according to positions in the logo using the function circle(). To achieve the outline effect, draw 5 smaller circles over it. There is a black circle as well in the logo and to prevent it from blending in, c...
[ { "code": null, "e": 25733, "s": 25705, "text": "\n14 Apr, 2021" }, { "code": null, "e": 25814, "s": 25733, "text": "In this article, we will discuss how to design the Olympics Logo using Graphics." }, { "code": null, "e": 25896, "s": 25814, "text": "Draw five...
Node.js Timeout Timer Class - GeeksforGeeks
18 Jun, 2021 The timer module is used for scheduling functions which will be called at some future period of time. It is a global API So, there is no need to import (require(“timers”)) to use it. Timeout Class has an object (setTimeout()/setInterval()) which is created internally to scheduled actions, and (clearTimeout...
[ { "code": null, "e": 38501, "s": 38473, "text": "\n18 Jun, 2021" }, { "code": null, "e": 38684, "s": 38501, "text": "The timer module is used for scheduling functions which will be called at some future period of time. It is a global API So, there is no need to import (require(“t...
Reverse the elements only at odd positions in the given Array - GeeksforGeeks
10 May, 2021 Given an array arr[] containing N integers, the task is to rearrange the array such that the odd indexed elements are in reverse order. Examples: Input: arr[] = {5, 7, 6, 2, 9, 18, 11, 15} Output: {5, 15, 6, 18, 9, 2, 11, 7} Explanation: The elements at even index [5, 6, 9, 11] are unchanged and elements a...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n10 May, 2021" }, { "code": null, "e": 26177, "s": 26041, "text": "Given an array arr[] containing N integers, the task is to rearrange the array such that the odd indexed elements are in reverse order." }, { "code": null,...
Difference between map, applymap and apply methods in Pandas - GeeksforGeeks
13 Dec, 2018 Pandas library is extensively used for data manipulation and analysis. map(), applymap() and apply() methods are methods of Pandas library. applymap() method only works on a pandas dataframe where function is applied on every element individually. apply() method can be applied both to series and dataframes...
[ { "code": null, "e": 25411, "s": 25383, "text": "\n13 Dec, 2018" }, { "code": null, "e": 25551, "s": 25411, "text": "Pandas library is extensively used for data manipulation and analysis. map(), applymap() and apply() methods are methods of Pandas library." }, { "code": n...
Applications of Pointers in C/C++ - GeeksforGeeks
10 Jul, 2021 Prerequisite : Pointers in C/C++, Memory Layout of C Programs. To pass arguments by reference. Passing by reference serves two purposes (i) To modify variable of function in other. Example to swap two variables; C C++ // C program to demonstrate that we can change// local values of one function in anoth...
[ { "code": null, "e": 25673, "s": 25645, "text": "\n10 Jul, 2021" }, { "code": null, "e": 25738, "s": 25673, "text": "Prerequisite : Pointers in C/C++, Memory Layout of C Programs. " }, { "code": null, "e": 25811, "s": 25738, "text": "To pass arguments by refe...
How to create bullets using <li> elements ? - GeeksforGeeks
08 Jun, 2020 We know that, whether it may be an ordered list or unordered list they come along with a numbering. It may be: Bullets Squares Decimal Roman etc. There are numerous options that we can use, but the question comes what property does this depend upon? In CSS, for tags like <ol> and <ul>, there is a property ...
[ { "code": null, "e": 26647, "s": 26619, "text": "\n08 Jun, 2020" }, { "code": null, "e": 26747, "s": 26647, "text": "We know that, whether it may be an ordered list or unordered list they come along with a numbering." }, { "code": null, "e": 26758, "s": 26747, ...
Python object() method - GeeksforGeeks
22 Sep, 2021 Python object() function returns the empty object, and the Python object takes no parameters. In python, each variable to which we assign a value/container is treated as an object. Object in itself is a class. Let’s discuss the properties and demonstration of how this class can be utilized for day-day prog...
[ { "code": null, "e": 25509, "s": 25481, "text": "\n22 Sep, 2021" }, { "code": null, "e": 25603, "s": 25509, "text": "Python object() function returns the empty object, and the Python object takes no parameters." }, { "code": null, "e": 25825, "s": 25603, "text...
Ring Counter in Digital Logic - GeeksforGeeks
22 Apr, 2022 Ring counter is a typical application of Shift register. Ring counter is almost same as the shift counter. The only change is that the output of the last flip-flop is connected to the input of the first flip-flop in case of ring counter but in case of shift resister it is taken as output. Except this all t...
[ { "code": null, "e": 28081, "s": 28053, "text": "\n22 Apr, 2022" }, { "code": null, "e": 28414, "s": 28081, "text": "Ring counter is a typical application of Shift register. Ring counter is almost same as the shift counter. The only change is that the output of the last flip-flop...
Python | Pandas.melt() - GeeksforGeeks
03 Jan, 2022 To make analysis of data in table easier, we can reshape the data into a more computer-friendly form using Pandas in Python. Pandas.melt() is one of the function to do so..Pandas.melt() unpivots a DataFrame from wide format to long format.melt() function is useful to message a DataFrame into a format where...
[ { "code": null, "e": 26157, "s": 26129, "text": "\n03 Jan, 2022" }, { "code": null, "e": 26667, "s": 26157, "text": "To make analysis of data in table easier, we can reshape the data into a more computer-friendly form using Pandas in Python. Pandas.melt() is one of the function t...
Most asked Computer Science Subjects Interview Questions in Amazon, Microsoft, Flipkart - GeeksforGeeks
17 Mar, 2022 This article contains a list of most asked questions from Operating Systems, Computer Networks and DBMS in the interviews of the top product based companies like Amazon, Microsoft, Flipkart, Paytm etc. Operating System: Process Introduction What is a microprocessor?Explain the internal architecture of a R...
[ { "code": null, "e": 25856, "s": 25828, "text": "\n17 Mar, 2022" }, { "code": null, "e": 26059, "s": 25856, "text": "This article contains a list of most asked questions from Operating Systems, Computer Networks and DBMS in the interviews of the top product based companies like A...
Python3 Program for Mean of range in array - GeeksforGeeks
13 Jan, 2022 Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to r for each query in a new line. Examples : Input : arr[] = {1, 2, 3, 4, 5} q = 3 0 2 1 3 0 4 Output : 2 3 3 Here for 0 to 2 (1 + 2 + 3) / ...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n13 Jan, 2022" }, { "code": null, "e": 26191, "s": 26041, "text": "Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to r for each query in a new line." }, { ...
Python program to find Cumulative sum of a list - GeeksforGeeks
20 Aug, 2020 The problem statement asks to produce a new list whose i^{th} element will be equal to the sum of the (i + 1) elements. Examples : Input : list = [10, 20, 30, 40, 50] Output : [10, 30, 60, 100, 150] Input : list = [4, 10, 15, 18, 20] Output : [4, 14, 29, 47, 67] Approach 1 : We will use the concept ...
[ { "code": null, "e": 26252, "s": 26224, "text": "\n20 Aug, 2020" }, { "code": null, "e": 26372, "s": 26252, "text": "The problem statement asks to produce a new list whose i^{th} element will be equal to the sum of the (i + 1) elements." }, { "code": null, "e": 26385,...
PHP | Factorial of a number - GeeksforGeeks
09 Mar, 2018 We already know how to get the factorial of a number in other languages. Let’s see how this is done in PHP using both recursive and non-recursive ways. Examples: Input : 5 Output : 120 Input : 10 Output : 3628800 Method 1: Iterative wayIn this method, we simply used the for loop to iterate over the seque...
[ { "code": null, "e": 26195, "s": 26167, "text": "\n09 Mar, 2018" }, { "code": null, "e": 26347, "s": 26195, "text": "We already know how to get the factorial of a number in other languages. Let’s see how this is done in PHP using both recursive and non-recursive ways." }, { ...
Difference between getc(), getchar(), getch() and getche() - GeeksforGeeks
13 Dec, 2018 All of these functions read a character from input and return an integer value. The integer is returned to accommodate a special value used to indicate failure. The value EOF is generally used for this purpose. getc():It reads a single character from a given input stream and returns the corresponding integ...
[ { "code": null, "e": 25759, "s": 25731, "text": "\n13 Dec, 2018" }, { "code": null, "e": 25970, "s": 25759, "text": "All of these functions read a character from input and return an integer value. The integer is returned to accommodate a special value used to indicate failure. Th...
Structure of C++ Program - GeeksforGeeks
15 Dec, 2020 The C++ program is written using a specific template structure. The structure of the program written in C++ language is as follows: This section comes first and is used to document the logic of the program that the programmer going to code. It can be also used to write for purpose of the program. Whatever ...
[ { "code": null, "e": 25666, "s": 25638, "text": "\n15 Dec, 2020" }, { "code": null, "e": 25798, "s": 25666, "text": "The C++ program is written using a specific template structure. The structure of the program written in C++ language is as follows:" }, { "code": null, ...
R - Waffle Chart - GeeksforGeeks
17 May, 2020 A waffle chart shows progress towards a target or a completion percentage. Waffle Charts are a great way of visualizing data in relation to a whole, to highlight progress against a given threshold, or when dealing with populations too varied for pie charts. A lot of times, these are used as an alternative ...
[ { "code": null, "e": 25909, "s": 25881, "text": "\n17 May, 2020" }, { "code": null, "e": 26394, "s": 25909, "text": "A waffle chart shows progress towards a target or a completion percentage. Waffle Charts are a great way of visualizing data in relation to a whole, to highlight p...
max() and min() in Python - GeeksforGeeks
17 Jun, 2021 This article brings you a very interesting and lesser-known function of Python, namely max() and min(). Now when compared to their C++ counterpart, which only allows two arguments, that too strictly being float, int or char, these functions are not only limited to 2 elements, but can hold many elements as ...
[ { "code": null, "e": 26245, "s": 26217, "text": "\n17 Jun, 2021" }, { "code": null, "e": 26732, "s": 26245, "text": "This article brings you a very interesting and lesser-known function of Python, namely max() and min(). Now when compared to their C++ counterpart, which only allo...
CSS to put icon inside an input element in a form - GeeksforGeeks
10 May, 2022 To add icon inside the input element the <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages or in some specific area, it needs the fontawesome link inside the head tag. The fontawesome icon can be placed by using the fa prefix before the icon’s name. font...
[ { "code": null, "e": 26717, "s": 26689, "text": "\n10 May, 2022" }, { "code": null, "e": 27020, "s": 26717, "text": "To add icon inside the input element the <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages or in some specific ...
CSS | #id Selector - GeeksforGeeks
03 Jan, 2019 The #id selector is used to set the style of given id. The id attribute is the unique identifier in HTML document. The id selector is used with # character. Syntax: #id { // CSS property } Example: <!DOCTYPE html><html> <head> <title>#id selector</title> <!-- CSS property usi...
[ { "code": null, "e": 29316, "s": 29288, "text": "\n03 Jan, 2019" }, { "code": null, "e": 29473, "s": 29316, "text": "The #id selector is used to set the style of given id. The id attribute is the unique identifier in HTML document. The id selector is used with # character." }, ...
Check if given string can be formed by two other strings or their permutations - GeeksforGeeks
08 Jun, 2021 Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of the string pairs from the array or their permutations. Examples: Input: str = “amazon”, arr[] = {“loa”, “azo”, “ft”, “amn”, “lka”} Output: Yes The chosen strings are “amn” and “azo” which can...
[ { "code": null, "e": 26657, "s": 26629, "text": "\n08 Jun, 2021" }, { "code": null, "e": 26827, "s": 26657, "text": "Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of the string pairs from the array or their permuta...
How to Create Horizontal and Vertical Tabs using JavaScript ? - GeeksforGeeks
18 Nov, 2020 Tabs can be used for displaying large amounts of content on a single page in an organized manner. We can design single page tabs using HTML, CSS, and JavaScript. HTML elements are used to design the structure of the tabs and their content in paragraphs. The styling is performed using CSS. On the click of e...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n18 Nov, 2020" }, { "code": null, "e": 27018, "s": 26621, "text": "Tabs can be used for displaying large amounts of content on a single page in an organized manner. We can design single page tabs using HTML, CSS, and JavaScript. H...
SQLAlchemy Core - Creating Table - GeeksforGeeks
22 Nov, 2021 In this article, we are going to see how to create table in SQLAlchemy using Python. SQLAlchemy is a large SQL toolkit with lots of different components. The two largest components are SQLAlchemy Core and SQLAlchemy ORM. The major difference between them is SQLAlchemy Core is a schema-centric model that me...
[ { "code": null, "e": 25611, "s": 25583, "text": "\n22 Nov, 2021" }, { "code": null, "e": 25696, "s": 25611, "text": "In this article, we are going to see how to create table in SQLAlchemy using Python." }, { "code": null, "e": 26239, "s": 25696, "text": "SQLAl...
Introduction to Kotlin
06 Dec, 2019 Kotlin is a statically typed, general-purpose programming language developed by JetBrains, that has built world-class IDEs like IntelliJ IDEA, PhpStorm, Appcode, etc. It was first introduced by JetBrains in 2011 and a new language for the JVM. Kotlin is object-oriented language, and a “better language” tha...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Dec, 2019" }, { "code": null, "e": 416, "s": 52, "text": "Kotlin is a statically typed, general-purpose programming language developed by JetBrains, that has built world-class IDEs like IntelliJ IDEA, PhpStorm, Appcode, etc. It was ...
Counting pairs when a person can form pair with at most one
06 Jul, 2022 Consider a coding competition on geeksforgeeks practice. Now there are n distinct participants taking part in the competition. A single participant can make pair with at most one other participant. We need count the number of ways in which n participants participating in the coding competition.Examples : ...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 360, "s": 52, "text": "Consider a coding competition on geeksforgeeks practice. Now there are n distinct participants taking part in the competition. A single participant can make pair with at most...
JavaFX | Canvas Class
04 Sep, 2018 Canvas class is a part of JavaFX. Canvas class basically creates an image that can be drawn on using a set of graphics commands provided by a GraphicsContext. Canvas has a specified height and width and all the drawing operations are clipped to the bounds of the canvas. Constructors of the class: Canvas():...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Sep, 2018" }, { "code": null, "e": 299, "s": 28, "text": "Canvas class is a part of JavaFX. Canvas class basically creates an image that can be drawn on using a set of graphics commands provided by a GraphicsContext. Canvas has a spe...
How to display Current Date/Time in the DateTimePicker in C#?
02 Aug, 2019 In Windows Forms, the DateTimePicker control is used to select and display date/time with a specific format in your form. In DateTimePicker control, you can set the current Date/Time using the Value Property. or in other words, we can say that Value property is used to assign a Date/Time value to the DateT...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Aug, 2019" }, { "code": null, "e": 490, "s": 54, "text": "In Windows Forms, the DateTimePicker control is used to select and display date/time with a specific format in your form. In DateTimePicker control, you can set the current D...