title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Reversing an Equation
17 Jun, 2022 Given a mathematical equation using numbers/variables and +, -, *, /. Print the equation in reverse. Examples: Input : 20 - 3 + 5 * 2 Output : 2 * 5 + 3 - 20 Input : 25 + 3 - 2 * 11 Output : 11 * 2 - 3 + 25 Input : a + b * c - d / e Output : e / d - c * b + a Approach : The approach to this problem is ...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Jun, 2022" }, { "code": null, "e": 154, "s": 53, "text": "Given a mathematical equation using numbers/variables and +, -, *, /. Print the equation in reverse." }, { "code": null, "e": 166, "s": 154, "text": "Exam...
Python | Django Admin Interface
05 Jun, 2018 Prerequisites : django-introduction-and-installation | django-introduction-set-2-creating-a-project Django provides a default admin interface which can be used to perform create, read, update and delete operations on the model directly. It reads set of data that explain and gives information about data fro...
[ { "code": null, "e": 53, "s": 25, "text": "\n05 Jun, 2018" }, { "code": null, "e": 153, "s": 53, "text": "Prerequisites : django-introduction-and-installation | django-introduction-set-2-creating-a-project" }, { "code": null, "e": 542, "s": 153, "text": "Djang...
numpy.logspace() in Python
05 Apr, 2022 The numpy.logspace() function returns number spaces evenly w.r.t interval on a log scale. Syntax : numpy.logspace(start, stop, num = 50, endpoint = True, base = 10.0, dtype = None) Parameters : -> start : [float] start(base **...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Apr, 2022" }, { "code": null, "e": 129, "s": 28, "text": "The numpy.logspace() function returns number spaces evenly w.r.t interval on a log scale. Syntax : " }, { "code": null, "e": 286, "s": 129, "text": "numpy...
Program to find Smallest and Largest Word in a String
23 Jun, 2022 Given a string, find the minimum and the maximum length words in it. Examples: Input : "This is a test string" Output : Minimum length word: a Maximum length word: string Input : "GeeksforGeeks A computer Science portal for Geeks" Output : Minimum length word: A Maximum length word: Ge...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 133, "s": 52, "text": "Given a string, find the minimum and the maximum length words in it. Examples: " }, { "code": null, "e": 371, "s": 133, "text": "Input : \"This is a test...
JavaScript | Date Formats
17 Feb, 2022 JavaScript Date Input: There are many ways in which one can format the date in JavaScript. Formats: ISO Date"2019-03-06" (The International Standard) "2019-03-06" (The International Standard) Short Date"03/06/2019" "03/06/2019" Long Date"Mar 06 2019" or "06 Mar 2019" "Mar 06 2019" or "06 Mar 2019" Example ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2022" }, { "code": null, "e": 119, "s": 28, "text": "JavaScript Date Input: There are many ways in which one can format the date in JavaScript." }, { "code": null, "e": 128, "s": 119, "text": "Formats:" }, ...
Runtime JAR File in Java
26 May, 2021 JAR stands for Java Archive file. It is a platform–independent file format that allows bundling and packaging all files associated with java application, class files, audio, and image files as well. These files are needed when we run an applet program. It bundles JAR files use a Data compression algorithm....
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2021" }, { "code": null, "e": 414, "s": 28, "text": "JAR stands for Java Archive file. It is a platform–independent file format that allows bundling and packaging all files associated with java application, class files, audio, a...
jQuery UI Dialog close Event
02 Dec, 2021 jQuery UI Close event is triggered when the dialog box is closed. Learn more about jQuery selectors and events here. Syntax: $(".selector").dialog ( close: function( event, ui ) { console.log('closed') }, Approach: First, add jQuery Mobile scripts needed for your project. <link href = "https:...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Dec, 2021" }, { "code": null, "e": 94, "s": 28, "text": "jQuery UI Close event is triggered when the dialog box is closed." }, { "code": null, "e": 145, "s": 94, "text": "Learn more about jQuery selectors and even...
Python | Merge two lists alternatively
09 May, 2019 Given two lists, write a Python program to merge the given lists in an alternative fashion, provided that the two lists are of equal length. Examples: Input : lst1 = [1, 2, 3] lst2 = ['a', 'b', 'c'] Output : [1, 'a', 2, 'b', 3, 'c'] Input : lst1 = ['name', 'alice', 'bob'] lst2 = ['marks', ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 May, 2019" }, { "code": null, "e": 169, "s": 28, "text": "Given two lists, write a Python program to merge the given lists in an alternative fashion, provided that the two lists are of equal length." }, { "code": null, "e...
SoundPool in Android with Examples
02 Jul, 2020 In this article, we will learn about how to add SoundPool class in android. A collection of audio samples can be loaded into memory from a resource and can be used. SoundPool class is used to play short repeating sound whereas MediaPlayer class is used to play longer clips like music. It uses a MediaPlayer...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Jul, 2020" }, { "code": null, "e": 670, "s": 54, "text": "In this article, we will learn about how to add SoundPool class in android. A collection of audio samples can be loaded into memory from a resource and can be used. SoundPool...
Node.js fs.rmdirSync() Method
11 Oct, 2021 The fs.rmdirSync() method is used to synchronously delete a directory at the given path. It can also be used recursively to remove nested directories by configuring the options object. It returns undefined.Syntax: fs.rmdirSync( path, options ) Parameters: This method accept two parameters as mentioned ab...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2021" }, { "code": null, "e": 244, "s": 28, "text": "The fs.rmdirSync() method is used to synchronously delete a directory at the given path. It can also be used recursively to remove nested directories by configuring the option...
Toggle case of a string using Bitwise Operators
16 Jun, 2022 Given a string, write a function that returns toggle case of a string using the bitwise operators in place.In ASCII codes, character ‘A’ is integer 65 = (0100 0001)2, while character ‘a’ is integer 97 = (0110 0001)2. Similarly, character ‘D’ is integer 68 = (0100 0100)2, while character ‘d’ is integer 100 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 375, "s": 52, "text": "Given a string, write a function that returns toggle case of a string using the bitwise operators in place.In ASCII codes, character ‘A’ is integer 65 = (0100 0001)2, while c...
Maximum sum subarray having sum less than or equal to given sum
09 Nov, 2021 Given an array of non-negative integers and a sum. We have to find sum of the subarray having a maximum sum less than or equal to the given sum in the array. (Note: Given array contains only non-negative integers.) Examples: Input : arr[] = { 1, 2, 3, 4, 5 } sum = 11 Output : 10 Subarray having m...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Nov, 2021" }, { "code": null, "e": 213, "s": 54, "text": "Given an array of non-negative integers and a sum. We have to find sum of the subarray having a maximum sum less than or equal to the given sum in the array. " }, { "...
strings.Map() Function in Golang With Examples
22 Dec, 2021 strings.Map() Function in Golang is used to return a copy of the string given string with all its characters modified according to the mapping function. If mapping returns a negative value, the character is dropped from the string with no replacement. So whenever the user wants to make changes in a certain...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Dec, 2021" }, { "code": null, "e": 280, "s": 28, "text": "strings.Map() Function in Golang is used to return a copy of the string given string with all its characters modified according to the mapping function. If mapping returns a n...
Largest K digit number divisible by X
16 Apr, 2021 Integers X and K are given. The task is to find the highest K-digit number divisible by X.Examples: Input : X = 30, K = 3 Output : 990 990 is the largest three digit number divisible by 30. Input : X = 7, K = 2 Output : 98 A simple solution is to try all numbers starting from the largest K digit numb...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Apr, 2021" }, { "code": null, "e": 155, "s": 53, "text": "Integers X and K are given. The task is to find the highest K-digit number divisible by X.Examples: " }, { "code": null, "e": 280, "s": 155, "text": "Inp...
Objdump Command in Linux with Examples
25 Aug, 2020 When we have an object file and we don’t have the source code with us and we have to find out the maximum information from the file. To do so objdump plays a very vital role. The main purpose of the objdump command is to help in debugging the object file. It is used for the following listed purposes: To re...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2020" }, { "code": null, "e": 330, "s": 28, "text": "When we have an object file and we don’t have the source code with us and we have to find out the maximum information from the file. To do so objdump plays a very vital role. ...
How to Use Weka Java API?
21 Sep, 2021 To use the weka API you need to install weka according to your operating system. After downloading the archive and extracting it you’ll find the weka.jar file. The JAR file contains all the class files required i.e. weka API. Now we can find all the information about the classes and methods in the Weka Jav...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Sep, 2021" }, { "code": null, "e": 411, "s": 28, "text": "To use the weka API you need to install weka according to your operating system. After downloading the archive and extracting it you’ll find the weka.jar file. The JAR file co...
Extract unique objects by attribute from array of objects.
14 Feb, 2019 Given an array of objects and the task is to return the unique object by the attribute. Examples: Input: [ { name: 'Geeks', id: 10 }, { name: 'GeeksForGeeks', id: 10 }, { name: 'Geeks', id: 20 }, { name: 'Geeks', id: 10 } ] Output: [ { name: 'Geeks', id: 10 }, { name: 'GeeksForGeeks', id: 10 } ] ...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Feb, 2019" }, { "code": null, "e": 116, "s": 28, "text": "Given an array of objects and the task is to return the unique object by the attribute." }, { "code": null, "e": 126, "s": 116, "text": "Examples:" }, ...
What is the difference between properties and attributes in HTML?
01 Feb, 2022 HTML is the standard language for creating documents that are intended to be displayed on web browsers. It is very usual to get confused with attributes and properties while performing DOM object manipulation in JavaScript. Before learning about the differences, let us first define the Document Object Mode...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2022" }, { "code": null, "e": 338, "s": 28, "text": "HTML is the standard language for creating documents that are intended to be displayed on web browsers. It is very usual to get confused with attributes and properties while p...
How to write a running C code without main()?
21 Jun, 2022 Write a C language code that prints GeeksforGeeks without any main function. Logically it’s seems impossible to write a C program without using a main() function. Since every program must have a main() function because:- It’s an entry point of every C/C++ program. All Predefined and User-defined Functions ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 273, "s": 52, "text": "Write a C language code that prints GeeksforGeeks without any main function. Logically it’s seems impossible to write a C program without using a main() function. Since every...
url – Django Template Tag
03 Nov, 2021 A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenience to rendering data in a template. Django templates not only allow passing data from view to template, but also provides some limited...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Nov, 2021" }, { "code": null, "e": 738, "s": 52, "text": "A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenienc...
Check whether a given point lies inside a Triangle
Three points of a triangle are given; another point P is also given to check whether the point P is inside the triangle or not. To solve the problem, let consider the points of the triangle are A, B, and C. When the area of triangle ΔABC = ΔABP + ΔPBC + ΔAPC, then the point P is inside the triangle. Input: Points of th...
[ { "code": null, "e": 1315, "s": 1187, "text": "Three points of a triangle are given; another point P is also given to check whether the point P is inside the triangle or not." }, { "code": null, "e": 1488, "s": 1315, "text": "To solve the problem, let consider the points of the t...
Python OpenCV – selectroi() Function
24 Oct, 2021 In this article, we are going to see an interesting application of the OpenCV library, which is selectROI(). With this method, we can select a range of interest in an image manually by selecting the area on the image. Syntax: cv2.selectROI(Window_name, source image) Parameter: window_name: name of the win...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Oct, 2021" }, { "code": null, "e": 246, "s": 28, "text": "In this article, we are going to see an interesting application of the OpenCV library, which is selectROI(). With this method, we can select a range of interest in an image ma...
Minimum steps required to reduce all the elements of the array to zero - GeeksforGeeks
19 Mar, 2022 Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single step, -1 can be added to all the non-zero elements of the array at the same time.Examples: Input: arr[] = {1, 5, 6} Output: 6 Operation 1: arr[] = {0, 4, 5} Operation 2: arr[] = {...
[ { "code": null, "e": 25339, "s": 25311, "text": "\n19 Mar, 2022" }, { "code": null, "e": 25558, "s": 25339, "text": "Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single step, -1 can be added to all the non-...
Fortran - Manipulation Functions
Manipulation functions are shift functions. The shift functions return the shape of an array unchanged, but move the elements. cshift(array, shift, dim) It performs circular shift by shift positions to the left, if shift is positive and to the right if it is negative. If array is a vector the shift is being done in a n...
[ { "code": null, "e": 2273, "s": 2146, "text": "Manipulation functions are shift functions. The shift functions return the shape of an array unchanged, but move the elements." }, { "code": null, "e": 2299, "s": 2273, "text": "cshift(array, shift, dim)" }, { "code": null, ...
Underline text with CSS
Use the text-decoration property to underline text with CSS. You can try to run the following code to underline text: <html> <head> </head> <body> <p style = "text-decoration:underline;"> India </p> </body> </html>
[ { "code": null, "e": 1180, "s": 1062, "text": "Use the text-decoration property to underline text with CSS. You can try to run the following code to underline text:" }, { "code": null, "e": 1310, "s": 1180, "text": "<html>\n <head>\n </head>\n <body>\n <p style = \"tex...
Lean Six Sigma with Python — Kruskal Wallis Test | by Samir Saci | Towards Data Science
Lean Six Sigma (LSS) is a method based on a stepwise approach to process improvements. This approach usually follows 5 steps (Define, Measure, Analyze, Improve and Control) for improving existing process problems with unknown causes. In this article, we will explore how Python can replace Minitab (Software widely used ...
[ { "code": null, "e": 133, "s": 46, "text": "Lean Six Sigma (LSS) is a method based on a stepwise approach to process improvements." }, { "code": null, "e": 280, "s": 133, "text": "This approach usually follows 5 steps (Define, Measure, Analyze, Improve and Control) for improving ...
Differentiate between int main and int main(void) function in C
int main represents that the function returns some integer even ‘0’ at the end of the program execution. ‘0’ represents the successful execution of a program. The syntax of int main is as follows − int main(){ --- --- return 0; } int main(void) represents that the function takes NO argument. Suppose, if we don...
[ { "code": null, "e": 1221, "s": 1062, "text": "int main represents that the function returns some integer even ‘0’ at the end of the program execution. ‘0’ represents the successful execution of a program." }, { "code": null, "e": 1260, "s": 1221, "text": "The syntax of int main ...
AWS Quicksight - Using Data Sources
AWS Quicksight accepts data from various sources. Once you click on “New Dataset” on the home page, it gives you options of all the data sources that can be used. Below are the sources containing the list of all internal and external sources − Let us go through connecting Quicksight with some of the most commonly used ...
[ { "code": null, "e": 2394, "s": 2231, "text": "AWS Quicksight accepts data from various sources. Once you click on “New Dataset” on the home page, it gives you options of all the data sources that can be used." }, { "code": null, "e": 2475, "s": 2394, "text": "Below are the sourc...
Features of C++ - GeeksforGeeks
09 Jul, 2021 C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm. It is an imperative and a compiled language. C++ is an Object-Oriented Programming Language, unlike C which is a procedural programming language. This is the most impor...
[ { "code": null, "e": 24098, "s": 24070, "text": "\n09 Jul, 2021" }, { "code": null, "e": 24282, "s": 24098, "text": "C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm. It is an imperative and a...
How to check the existence of URL in PHP?
15 May, 2019 Existence of an URL can be checked by checking the status code in the response header. The status code 200 is Standard response for successful HTTP requests and status code 404 means URL doesn’t exist. Used Functions: get_headers() Function: It fetches all the headers sent by the server in response to the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2019" }, { "code": null, "e": 230, "s": 28, "text": "Existence of an URL can be checked by checking the status code in the response header. The status code 200 is Standard response for successful HTTP requests and status code 40...
Comparing values of data frames in R Programming – all_equal() Function
23 Dec, 2021 all_equal() function in R Language is used to compare the values between dataframes. Syntax: all_equal(target, current, check.attributes, check.names) Parameters: target: object to compare current: object to be compared with check.attributes: If attributes of both be compared check.names: If names be comp...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Dec, 2021" }, { "code": null, "e": 113, "s": 28, "text": "all_equal() function in R Language is used to compare the values between dataframes." }, { "code": null, "e": 179, "s": 113, "text": "Syntax: all_equal(tar...
Deutsche Bank Interview Experience 2020
21 May, 2021 Round 1(Online Test): It was a string manipulation question. Suppose input was string1, string2, and k seconds. We have to choose every i from 1 to k and shift a character from the string by i index (eg: if i=3 then ‘a’ would be shifted to ‘d’). Each i could be chosen only once. We need to check if we can ...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 May, 2021" }, { "code": null, "e": 76, "s": 54, "text": "Round 1(Online Test):" }, { "code": null, "e": 5097, "s": 76, "text": "It was a string manipulation question. Suppose input was string1, string2, and k sec...
How to Preserve Insertion Order of Java HashSet Elements? - GeeksforGeeks
07 Jan, 2021 When elements get from the HashSet due to hashing the order they inserted is not maintained while retrieval. HashSet stores the elements by using a mechanism called hashing. We can achieve the given task using LinkedHashSet. The LinkedHashSet class implements a doubly-linked list so that it can traverse th...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n07 Jan, 2021" }, { "code": null, "e": 24279, "s": 23948, "text": "When elements get from the HashSet due to hashing the order they inserted is not maintained while retrieval. HashSet stores the elements by using a mechanism calle...
JavaScript array.includes inside nested array returning false where as searched name is in array
It is a well-known dilemma that when we use includes() inside nested arrays i.e., multidimensional array, it does not work, there exists a Array.prototype.flat() function which flats the array and then searches through but it’s browser support is not very good yet. So our job is to create a includesMultiDimension() fun...
[ { "code": null, "e": 1328, "s": 1062, "text": "It is a well-known dilemma that when we use includes() inside nested arrays i.e., multidimensional\narray, it does not work, there exists a Array.prototype.flat() function which flats the\narray and then searches through but it’s browser support is not ...
C++ Array (print an element) | Set 2 | Practice | GeeksforGeeks
Given an array A[] of N integers and an index Key. Your task is to print the element present at index key in the array. Example 1: Input: 5 2 10 20 30 40 50 Output: 30 Example 2: Input: 7 4 10 20 30 40 50 60 70 Output: 50 Your Task: You don't need to read input or print anything. Your task is to complete the fu...
[ { "code": null, "e": 346, "s": 226, "text": "Given an array A[] of N integers and an index Key. Your task is to print the element present at index key in the array." }, { "code": null, "e": 359, "s": 348, "text": "Example 1:" }, { "code": null, "e": 396, "s": 359,...
Count the number of operations required to reduce the given number - GeeksforGeeks
03 Jun, 2021 Given an integer k and an array op[], in a single operation op[0] will be added to k and then in the second operation k = k + op[1] and so on in a circular manner until k > 0. The task is to print the operation number in which k will be reduced to ≤ 0. If it impossible to reduce k with the given operations...
[ { "code": null, "e": 25326, "s": 25298, "text": "\n03 Jun, 2021" }, { "code": null, "e": 25660, "s": 25326, "text": "Given an integer k and an array op[], in a single operation op[0] will be added to k and then in the second operation k = k + op[1] and so on in a circular manner ...
A Program to check if strings are rotations of each other or not - GeeksforGeeks
21 Apr, 2022 Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1? (eg given s1 = ABCD and s2 = CDAB, return true, given s1 = ABCD, and s2 = ACBD , return false) Algorithm: areRotations(str1, str2) 1. Create a temp string and store concatenation of str1 to str1 in temp. ...
[ { "code": null, "e": 25236, "s": 25208, "text": "\n21 Apr, 2022" }, { "code": null, "e": 25421, "s": 25236, "text": "Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1? (eg given s1 = ABCD and s2 = CDAB, return true, given s1 = ABCD, and s2 =...
How to create an image bullets in HTML ? - GeeksforGeeks
12 Jan, 2021 In this article, we have given some list items and the task is to create a list items with image bullets. This task can be done by using the list-style-image property in CSS. This property is used to set the image that will be used as the list item marker. Syntax: list-style-image: url; Example: Below...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n12 Jan, 2021" }, { "code": null, "e": 25637, "s": 25376, "text": "In this article, we have given some list items and the task is to create a list items with image bullets. This task can be done by using the list-style-image prop...
How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
SYSIBM.SYSTABAUTH is a DB2 system table which records the privileges that users/program hold on tables and views. We can use this table to find out the list of programs accessing a particular table and what action the program is performing on the table like SELECT, UPDATE, INSERT or DELETE. The below SQL query can be f...
[ { "code": null, "e": 1435, "s": 1062, "text": "SYSIBM.SYSTABAUTH is a DB2 system table which records the privileges that users/program hold on tables and views. We can use this table to find out the list of programs accessing a particular table and what action the program is performing on the table ...
Elasticsearch - Quick Guide
Elasticsearch is an Apache Lucene-based search server. It was developed by Shay Banon and published in 2010. It is now maintained by Elasticsearch BV. Its latest version is 7.0.0. Elasticsearch is a real-time distributed and open source full-text search and analytics engine. It is accessible from RESTful web service in...
[ { "code": null, "e": 2761, "s": 2581, "text": "Elasticsearch is an Apache Lucene-based search server. It was developed by Shay Banon and published in 2010. It is now maintained by Elasticsearch BV. Its latest version is 7.0.0." }, { "code": null, "e": 3160, "s": 2761, "text": "El...
Node at distance | Practice | GeeksforGeeks
Given a Binary Tree and a positive integer k. The task is to count all distinct nodes that are distance k from a leaf node. A node is at k distance from a leaf if it is present k levels above the leaf and also, is a direct ancestor of this leaf node. If k is more than the height of Binary Tree, then nothing should be c...
[ { "code": null, "e": 566, "s": 238, "text": "Given a Binary Tree and a positive integer k. The task is to count all distinct nodes that are distance k from a leaf node. A node is at k distance from a leaf if it is present k levels above the leaf and also, is a direct ancestor of this leaf node. If k...
KnockoutJS - Value Binding
This binding is used to link respective DOM element's value into ViewModel property. Mostly, this is used with elements such as input, select, and textarea. This is similar to text binding, the difference being, in value binding data can be changed by the user and the ViewModel will update it automatically. Syntax valu...
[ { "code": null, "e": 2161, "s": 1852, "text": "This binding is used to link respective DOM element's value into ViewModel property. Mostly, this is used with elements such as input, select, and textarea. This is similar to text binding, the difference being, in value binding data can be changed by t...
Python - Chart Properties
Python has excellent libraries for data visualization. A combination of Pandas, numpy and matplotlib can help in creating in nearly all types of visualizations charts. In this chapter we will get started with looking at some simple chart and the various properties of the chart. We use numpy library to create the requir...
[ { "code": null, "e": 2808, "s": 2529, "text": "Python has excellent libraries for data visualization. A combination of Pandas, numpy and matplotlib can help in creating in nearly all types of visualizations charts. In this chapter we will get started with looking at some simple chart and the various...
A quick guide to color image compression using PCA in python | by Iqbal Hussain | Towards Data Science
If you are a Data Science or Machine Learning enthusiast, you must have come across PCA (Principal Component Analysis) which is a popular unsupervised machine learning algorithm primarily used for dimensionality reduction of large dataset. We can use PCA for dimensionality reduction for images as well. Let’s think of a...
[ { "code": null, "e": 475, "s": 171, "text": "If you are a Data Science or Machine Learning enthusiast, you must have come across PCA (Principal Component Analysis) which is a popular unsupervised machine learning algorithm primarily used for dimensionality reduction of large dataset. We can use PCA ...
PyQt5 Input Dialog | Python - GeeksforGeeks
16 Oct, 2021 PyQt5 provides a class named QInputDialog which is used to take input from the user. In most of the application, there comes a situation where some data is required to be entered by the user and hence input dialog is needed. Input can be of type String or Text, Integer, Double and item.Used methods: These ...
[ { "code": null, "e": 24640, "s": 24612, "text": "\n16 Oct, 2021" }, { "code": null, "e": 25102, "s": 24640, "text": "PyQt5 provides a class named QInputDialog which is used to take input from the user. In most of the application, there comes a situation where some data is require...
Download and Install Python 3 Latest Version - GeeksforGeeks
08 Jan, 2020 How to Download and Install Python 3 Latest Version? In this article, you will get the answer to all your questions related to installing Python on Windows/Linux/macOS. Python was developed by Guido van Rossum in the early 1990s and its latest version is 3.7.4, we can simply call it as Python3. To understa...
[ { "code": null, "e": 41552, "s": 41524, "text": "\n08 Jan, 2020" }, { "code": null, "e": 41848, "s": 41552, "text": "How to Download and Install Python 3 Latest Version? In this article, you will get the answer to all your questions related to installing Python on Windows/Linux/m...
Prime factors in java
Factors are the numbers we multiply to get another number. factors of 14 are 2 and 7, because 2 × 7 = 14. Some numbers can be factored in more than one way. 16 can be factored as 1 × 16, 2 × 8, or 4 × 4. A number that can only be factored as 1 times itself is called a prime number. The first few primes are 2, 3, 5, 7, ...
[ { "code": null, "e": 1121, "s": 1062, "text": "Factors are the numbers we multiply to get another number." }, { "code": null, "e": 1168, "s": 1121, "text": "factors of 14 are 2 and 7, because 2 × 7 = 14." }, { "code": null, "e": 1219, "s": 1168, "text": "Some ...
PHP | String Functions - GeeksforGeeks
09 Mar, 2018 We have learned about some basic string manipulation functions available in PHP in the article PHP | String . In this article, we will learn about few string functions that are used to change cases of characters of strings in PHP. Below are some most commonly used case manipulation functions for strings in...
[ { "code": null, "e": 23983, "s": 23955, "text": "\n09 Mar, 2018" }, { "code": null, "e": 24296, "s": 23983, "text": "We have learned about some basic string manipulation functions available in PHP in the article PHP | String . In this article, we will learn about few string funct...
unzip - Unix, Linux Command
"*.c" matches "foo.c" but not "mydir/foo.c" "**.c" matches both "foo.c" and "mydir/foo.c" "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" unzip --q[other options] zipfile The first hyphen is the normal switch character...
[ { "code": null, "e": 10816, "s": 10577, "text": " \"*.c\" matches \"foo.c\" but not \"mydir/foo.c\"\n \"**.c\" matches both \"foo.c\" and \"mydir/foo.c\"\n \"*/*.c\" matches \"bar/foo.c\" but not \"baz/bar/foo.c\"\n \"??*/*\" matches \"ab/foo\" and \"abc/foo\"\n but not \"a/fo...
Double.IsNaN() Method in C# - GeeksforGeeks
13 Feb, 2019 In C#, Double.IsNaN() is a Double struct method. This method is used to check whether the specified value is not a number (NaN). Syntax: public static bool IsNaN (double d); Parameter:d: It is a double-precision floating-point number of type System.Double Return Type: This function returns a Boolean value ...
[ { "code": null, "e": 23871, "s": 23843, "text": "\n13 Feb, 2019" }, { "code": null, "e": 24000, "s": 23871, "text": "In C#, Double.IsNaN() is a Double struct method. This method is used to check whether the specified value is not a number (NaN)." }, { "code": null, "e...
How to get the duplicates values from Arraylist<String> and then get those items in another Arraylist in Android?
This example demonstrate about How to get the duplicates values from Arraylist<String> and then get those items in another Arraylist. 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_ma...
[ { "code": null, "e": 1196, "s": 1062, "text": "This example demonstrate about How to get the duplicates values from Arraylist<String> and then get those items in another Arraylist." }, { "code": null, "e": 1325, "s": 1196, "text": "Step 1 − Create a new project in Android Studio,...
SQL Tryit Editor v1.6
SELECT * FROM Customers; ​ 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 the Try-SQL Editor, with a...
[ { "code": null, "e": 25, "s": 0, "text": "SELECT * FROM Customers;" }, { "code": null, "e": 27, "s": 25, "text": "​" }, { "code": null, "e": 90, "s": 27, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "code": null, ...
C# program to replace all spaces in a string with ‘%20’
We have a sample string with spaces − str ="Hello World !"; Use the Replace() method in C# to replace all spaces in a string with ‘%20’ − str2 = str.Replace(" ", "%20"); You can try to run the following code to replace all spaces in a string with ‘%20’. Live Demo using System; class Demo { static void Main() { ...
[ { "code": null, "e": 1100, "s": 1062, "text": "We have a sample string with spaces −" }, { "code": null, "e": 1122, "s": 1100, "text": "str =\"Hello World !\";" }, { "code": null, "e": 1200, "s": 1122, "text": "Use the Replace() method in C# to replace all spa...
What’s new in YOLOv4?. YOLO is a real-time object recognition... | by Roman Orac | Towards Data Science
YOLO is short for You Only Look Once. It is a real-time object recognition system that can recognize multiple objects in a single frame. YOLO recognizes objects more precisely and faster than other recognition systems. It can predict up to 9000 classes and even unseen classes. The real-time recognition system will reco...
[ { "code": null, "e": 639, "s": 172, "text": "YOLO is short for You Only Look Once. It is a real-time object recognition system that can recognize multiple objects in a single frame. YOLO recognizes objects more precisely and faster than other recognition systems. It can predict up to 9000 classes an...
How to find the cube root of negative values in R?
There is no function in R to find the cube root of negative values, hence we need to create that. The code to create the function is as shown below − CubeRoot<-function(x){ sign(x)*abs(x)^(1/3) } Now we just need to pass the values in the function to find the cube root of those values. These values can be a vector o...
[ { "code": null, "e": 1212, "s": 1062, "text": "There is no function in R to find the cube root of negative values, hence we need to create that. The code to create the function is as shown below −" }, { "code": null, "e": 1261, "s": 1212, "text": "CubeRoot<-function(x){\n sign(...
Debugging a Machine Learning model written in TensorFlow and Keras | by Lak Lakshmanan | Towards Data Science
In this article, you get to look over my shoulder as I go about debugging a TensorFlow model. I did a lot of dumb things, so please don’t judge. You can see the final (working) model on GitHub. I’m building a model to predict lightning 30 minutes into the future and plan to present it at the American Meteorological Soc...
[ { "code": null, "e": 317, "s": 172, "text": "In this article, you get to look over my shoulder as I go about debugging a TensorFlow model. I did a lot of dumb things, so please don’t judge." }, { "code": null, "e": 758, "s": 317, "text": "You can see the final (working) model on ...
How to Automatically Import Your Favorite Libraries into IPython or a Jupyter Notebook | by Will Koehrsen | Towards Data Science
If you often use interactive IPython sessions or Jupyter Notebooks and you’re getting tired of importing the same libraries over and over, try this: Navigate to ~/.ipython/profile_defaultCreate a folder called startup if it’s not already thereAdd a new Python file called start.pyPut your favorite imports in this fileLa...
[ { "code": null, "e": 321, "s": 172, "text": "If you often use interactive IPython sessions or Jupyter Notebooks and you’re getting tired of importing the same libraries over and over, try this:" }, { "code": null, "e": 596, "s": 321, "text": "Navigate to ~/.ipython/profile_defaul...
Collectors groupingBy() method in Java with Examples - GeeksforGeeks
29 Jul, 2021 The groupingBy() method of Collectors class in Java are used for grouping objects by some property and storing results in a Map instance. In order to use it, we always need to specify a property by which the grouping would be performed. This method provides similar functionality to SQL’s GROUP BY clause. ...
[ { "code": null, "e": 24425, "s": 24397, "text": "\n29 Jul, 2021" }, { "code": null, "e": 24732, "s": 24425, "text": "The groupingBy() method of Collectors class in Java are used for grouping objects by some property and storing results in a Map instance. In order to use it, we al...
Color N boxes using M colors such that K boxes have different color from the box on its left - GeeksforGeeks
05 Nov, 2021 Given N number of boxes arranged in a row and M number of colors. The task is to find the number of ways to paint those N boxes using M colors such that there are exactly K boxes with a color different from the color of the box on its left. Print this answer modulo 998244353.Examples: Input: N = 3, M = 3...
[ { "code": null, "e": 25442, "s": 25414, "text": "\n05 Nov, 2021" }, { "code": null, "e": 25730, "s": 25442, "text": "Given N number of boxes arranged in a row and M number of colors. The task is to find the number of ways to paint those N boxes using M colors such that there are ...
Euler Totient Function | Practice | GeeksforGeeks
Find the Euler Totient Function (ETF) Φ(N) for an input N. ETF is the count of numbers in {1, 2, 3, ..., N} that are relatively prime to N, i.e., the numbers whose GCD (Greatest Common Divisor) with N is 1. Example 1: Input: N = 11 Output: 10 Explanation: From 1 to 11, 1,2,3,4,5,6,7,8,9,10 are relatively prime to 11....
[ { "code": null, "e": 447, "s": 238, "text": "Find the Euler Totient Function (ETF) Φ(N) for an input N. ETF is the count of numbers in {1, 2, 3, ..., N} that are relatively prime to N, i.e., the numbers whose GCD (Greatest Common Divisor) with N is 1.\n " }, { "code": null, "e": 458, ...
EnumSet range() Method in Java - GeeksforGeeks
02 Jul, 2018 The java.util.EnumSet.range(E start_point, E end_point) method in Java is used to create an enum set with the elements defined by the specified range in the parameters. Syntax: Enum_set = EnumSet.range(E start_point, E end_point) Parameters: The method accepts two parameters of the object type of enum: sta...
[ { "code": null, "e": 23868, "s": 23840, "text": "\n02 Jul, 2018" }, { "code": null, "e": 24037, "s": 23868, "text": "The java.util.EnumSet.range(E start_point, E end_point) method in Java is used to create an enum set with the elements defined by the specified range in the parame...
Get distinct record values in MongoDB?
You can use distinct() method in MongoDB to get distinct record values. The syntax is as follows − db.yourCollectionName.distinct(“yourFieldName”); To understand the above syntax, let us create a collection with document. The query to create a collection with document is as follows − > db.distinctRecordDemo.insertOne({...
[ { "code": null, "e": 1161, "s": 1062, "text": "You can use distinct() method in MongoDB to get distinct record values. The syntax is as follows −" }, { "code": null, "e": 1210, "s": 1161, "text": "db.yourCollectionName.distinct(“yourFieldName”);" }, { "code": null, "e...
Majority Element | Practice | GeeksforGeeks
Given an array A of N elements. Find the majority element in the array. A majority element in an array A of size N is an element that appears more than N/2 times in the array. Example 1: Input: N = 3 A[] = {1,2,3} Output: -1 Explanation: Since, each element in {1,2,3} appears only once so there is no majority ele...
[ { "code": null, "e": 416, "s": 238, "text": "Given an array A of N elements. Find the majority element in the array. A majority element in an array A of size N is an element that appears more than N/2 times in the array.\n " }, { "code": null, "e": 427, "s": 416, "text": "Example...
How to write inline if statement for print in Python?
Python provides two ways to write inline if statements. These are: 1. if condition: statement 2. s1 if condition else s2 Note that second type of if cannot be used without an else. Now you can use these inline in a print statement as well. For example, a = True if a: print("Hello") This will give the output: Hello a = ...
[ { "code": null, "e": 1129, "s": 1062, "text": "Python provides two ways to write inline if statements. These are:" }, { "code": null, "e": 1156, "s": 1129, "text": "1. if condition: statement" }, { "code": null, "e": 1183, "s": 1156, "text": "2. s1 if conditio...
Convert Excel to CSV in Python - GeeksforGeeks
06 Dec, 2021 In this article, we will be dealing with the conversion of Excel (.xlsx) file into .csv. There are two formats mostly used in Excel : (*.xlsx) : Excel Microsoft Office Open XML Format Spreadsheet file.(*.xls) : Excel Spreadsheet (Excel 97-2003 workbook). (*.xlsx) : Excel Microsoft Office Open XML Format S...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n06 Dec, 2021" }, { "code": null, "e": 24955, "s": 24820, "text": "In this article, we will be dealing with the conversion of Excel (.xlsx) file into .csv. There are two formats mostly used in Excel :" }, { "code": null, ...
Calculate the Root of a Equation within an interval in R Programming - uniroot() Function - GeeksforGeeks
12 Jun, 2020 uniroot() function in R Language is used to calculate the root of an equation with the lower and upper range of the interval passed as arguments. Syntax: uniroot(fun, interval, lower, upper) Parameters:fun: function with the equationinterval: with upper and lower range of rootlower: lower end point of the ...
[ { "code": null, "e": 24527, "s": 24499, "text": "\n12 Jun, 2020" }, { "code": null, "e": 24673, "s": 24527, "text": "uniroot() function in R Language is used to calculate the root of an equation with the lower and upper range of the interval passed as arguments." }, { "co...
Data Structures and Algorithms | Set 2 - GeeksforGeeks
12 Apr, 2019 Following questions have been asked in GATE CS exam. 1. Consider the function f defined below. struct item { int data; struct item * next; }; int f(struct item *p) { return ( (p == NULL) || (p->next == NULL) || (( P->data <= p->next->data) && f(p->next)) ); } F...
[ { "code": null, "e": 23885, "s": 23857, "text": "\n12 Apr, 2019" }, { "code": null, "e": 23938, "s": 23885, "text": "Following questions have been asked in GATE CS exam." }, { "code": null, "e": 23980, "s": 23938, "text": "1. Consider the function f defined be...
ggplot2 - Themes
In this chapter, we will focus on using customized theme which is used for changing the look and feel of workspace. We will use “ggthemes” package to understand the concept of theme management in workspace of R. Let us implement following steps to use the required theme within mentioned dataset. Install “ggthemes” pack...
[ { "code": null, "e": 2234, "s": 2022, "text": "In this chapter, we will focus on using customized theme which is used for changing the look and feel of workspace. We will use “ggthemes” package to understand the concept of theme management in workspace of R." }, { "code": null, "e": 2319...
Explain the characteristics and operations of arrays in C language
An array is a homogeneous sequential collection of data items over a single variable name. For example, int student[30]; Here, student is an array name holds 30 collection of data item, with a single variable name. The characteristics of arrays are as follows − An array is always stored in consecutive memory location. ...
[ { "code": null, "e": 1153, "s": 1062, "text": "An array is a homogeneous sequential collection of data items over a single variable name." }, { "code": null, "e": 1183, "s": 1153, "text": "For example, int student[30];" }, { "code": null, "e": 1277, "s": 1183, ...
Creating a Function module in ABAP to take any table and write it to the screen
SAP List Viewer is used to add an ALV component and provides a flexible environment to display lists and tabular structure. A standard output consists of header, toolbar, and an output table. The user can adjust the settings to add column display, aggregations, and sorting options using additional dialog boxes. You can...
[ { "code": null, "e": 1375, "s": 1062, "text": "SAP List Viewer is used to add an ALV component and provides a flexible environment to display lists and tabular structure. A standard output consists of header, toolbar, and an output table. The user can adjust the settings to add column display, aggre...
How to dynamically update a ListView on Android Kotlin?
This example demonstrates how to dynamically update a ListView on Android Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Rela...
[ { "code": null, "e": 1144, "s": 1062, "text": "This example demonstrates how to dynamically update a ListView on Android Kotlin." }, { "code": null, "e": 1273, "s": 1144, "text": "Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required deta...
Can we create a table with a space in name in MySQL?
To create a table with a space in the table name in MySQL, you must use backticks otherwise you will get an error. Let us first see what error will arise by creating a table with a space in the name i.e. “Demo Table” table name below: mysql> create table Demo Table ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Em...
[ { "code": null, "e": 1177, "s": 1062, "text": "To create a table with a space in the table name in MySQL, you must use backticks otherwise you will get an error." }, { "code": null, "e": 1297, "s": 1177, "text": "Let us first see what error will arise by creating a table with a s...
Explain the functions fread() and fwrite() used in files in C
Write a C program for storing the details of 5 students into a file and print the same using fread() and fwrite() The fread() function reads the entire record at a time. fread( & structure variable, size of (structure variable), no of records, file pointer); struct emp{ int eno; char ename [30]; float sal; } e...
[ { "code": null, "e": 1176, "s": 1062, "text": "Write a C program for storing the details of 5 students into a file and print the same using fread() and fwrite()" }, { "code": null, "e": 1232, "s": 1176, "text": "The fread() function reads the entire record at a time." }, { ...
Python 3 - String isalnum() Method
The isalnum() method checks whether the string consists of alphanumeric characters. Following is the syntax for isalnum() method − str.isa1num() NA This method returns true if all characters in the string are alphanumeric and there is at least one character, false otherwise. The following example shows the usage of is...
[ { "code": null, "e": 2424, "s": 2340, "text": "The isalnum() method checks whether the string consists of alphanumeric characters." }, { "code": null, "e": 2471, "s": 2424, "text": "Following is the syntax for isalnum() method −" }, { "code": null, "e": 2486, "s":...
Program to convert List of String to List of Integer in Java
Here’s our List of String − List<String> listString = Arrays.asList("25", "50", "75", "100", "125", "150"); Now, convert the list of string to list of integer − List<Integer> listInteger = listString.stream().map(Integer::parseInt).collect(Collectors.toList()); Following is the program to convert List of String to List...
[ { "code": null, "e": 1090, "s": 1062, "text": "Here’s our List of String −" }, { "code": null, "e": 1170, "s": 1090, "text": "List<String> listString = Arrays.asList(\"25\", \"50\", \"75\", \"100\", \"125\", \"150\");" }, { "code": null, "e": 1223, "s": 1170, ...
Enter key press event in JavaScript?
For ENTER key press event, you can call a function on − onkeypress=”yourFunctionName” Use the ENTER’s keycode 13. Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initialscale=1.0"> <title>Document</title> <link rel="stylesheet" href="//code.jq...
[ { "code": null, "e": 1118, "s": 1062, "text": "For ENTER key press event, you can call a function on −" }, { "code": null, "e": 1148, "s": 1118, "text": "onkeypress=”yourFunctionName”" }, { "code": null, "e": 1176, "s": 1148, "text": "Use the ENTER’s keycode 1...
Python | Printing String with double quotes
22 Apr, 2020 Many times, while working with Python strings, we have a problem in which we need to use double quotes in a string and then wish to print it. This kind of problem occurs in many domains like day-day programming and web-development domain. Lets discuss certain ways in which this task can be performed. Metho...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 330, "s": 28, "text": "Many times, while working with Python strings, we have a problem in which we need to use double quotes in a string and then wish to print it. This kind of problem occurs in ma...
Total numbers with no repeated digits in a range
10 Jun, 2022 Given a range find total such numbers in the given range such that they have no repeated digits.For example:12 has no repeated digit.22 has repeated digit.102, 194 and 213 have no repeated digit.212, 171 and 4004 have repeated digits. Examples: Input : 10 12 Output : 2 Explanation : In the given range 10...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Jun, 2022" }, { "code": null, "e": 290, "s": 54, "text": "Given a range find total such numbers in the given range such that they have no repeated digits.For example:12 has no repeated digit.22 has repeated digit.102, 194 and 213 h...
S – attributed and L – attributed SDTs in Syntax directed translation
03 May, 2019 Before coming up to S-attributed and L-attributed SDTs, here is a brief intro to Synthesized or Inherited attributes Types of attributes –Attributes may be of two types – Synthesized or Inherited. Synthesized attributes –A Synthesized attribute is an attribute of the non-terminal on the left-hand side of a...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 May, 2019" }, { "code": null, "e": 169, "s": 52, "text": "Before coming up to S-attributed and L-attributed SDTs, here is a brief intro to Synthesized or Inherited attributes" }, { "code": null, "e": 249, "s": 169, ...
SQL Query to Insert Multiple Rows
13 Sep, 2021 Insertion in a table is a DML (Data manipulation language) operation in SQL. When we want to store data we need to insert the data into the database. We use the INSERT statement to insert the data into the database. In this article, we see how to insert individual as well as multiple rows in a database us...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Sep, 2021" }, { "code": null, "e": 405, "s": 52, "text": "Insertion in a table is a DML (Data manipulation language) operation in SQL. When we want to store data we need to insert the data into the database. We use the INSERT statem...
Set add() method in Java with Examples
31 Dec, 2018 The add() method of Set in Java is used to add a specific element into a Set collection. The function adds the element only if the specified element is not already present in the set else the function return False if the element is already present in the Set. Syntax: boolean add(E element) Where, E is the...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Dec, 2018" }, { "code": null, "e": 288, "s": 28, "text": "The add() method of Set in Java is used to add a specific element into a Set collection. The function adds the element only if the specified element is not already present in ...
General purpose registers in 8086 microprocessor
24 Jun, 2022 General-purpose registers are used to store temporary data within the microprocessor. There are 8 general-purpose registers in the 8086 microprocessor. 1. AX: This is the accumulator. It is of 16 bits and is divided into two 8-bit registers AH and AL to also perform 8-bit instructions. It is generally us...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 Jun, 2022" }, { "code": null, "e": 205, "s": 53, "text": "General-purpose registers are used to store temporary data within the microprocessor. There are 8 general-purpose registers in the 8086 microprocessor." }, { "code": ...
Union and Intersection of two Linked Lists
11 Jul, 2022 Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. The order of elements in output lists doesn’t matter.Example: Input: List1: 10->15->4->20 List2: 8->4->2->10 Output: Intersection List: 4->10 Union List:...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Jul, 2022" }, { "code": null, "e": 257, "s": 54, "text": "Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. The order of elements in output li...
NumPy – Filtering rows by multiple conditions
05 Aug, 2021 In this article, we will discuss how to filter rows of NumPy array by multiple conditions. Before jumping into filtering rows by multiple conditions, let us first see how can we apply filter based on one condition. There are basically two approaches to do so: Method 1: Using mask array The mask function fi...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Aug, 2021" }, { "code": null, "e": 288, "s": 28, "text": "In this article, we will discuss how to filter rows of NumPy array by multiple conditions. Before jumping into filtering rows by multiple conditions, let us first see how can ...
Python – Specific Characters Frequency in String List
05 Sep, 2020 Given String list, extract frequency of specific characters in whole strings list. Input : test_list = [“geeksforgeeks is best for geeks”], chr_list = [‘e’, ‘b’, ‘g’, ‘f’]Output : {‘g’: 3, ‘e’: 7, ‘b’: 1, ‘f’ : 1}Explanation : Frequency of certain characters extracted. Input : test_list = [“geeksforgeeks],...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Sep, 2020" }, { "code": null, "e": 135, "s": 52, "text": "Given String list, extract frequency of specific characters in whole strings list." }, { "code": null, "e": 322, "s": 135, "text": "Input : test_list = [“...
Program to print factors of a number in pairs
12 Apr, 2021 Given a number n, the task of the programmer is to print the factors of the number in such a way that they occur in pairs. A pair signifies that the product of the pair should result in the number itself;Examples: Input : 24 Output : 1*24 2*12 3*8 4*6 Input : 50 Output : 1*50 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Apr, 2021" }, { "code": null, "e": 244, "s": 28, "text": "Given a number n, the task of the programmer is to print the factors of the number in such a way that they occur in pairs. A pair signifies that the product of the pair should...
Flutter – Working with Callback Functions
21 Jun, 2022 In this article, we will see how we can use callback functions in flutter. We will learn about different methods to implement callback functions in flutter. Callback is basically a function or a method that we pass as an argument into another function or a method to perform an action. In the simplest words...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 562, "s": 54, "text": "In this article, we will see how we can use callback functions in flutter. We will learn about different methods to implement callback functions in flutter. Callback is basic...
Remove spaces from a given string
27 Jun, 2022 Given a string, remove all spaces from the string and return it. Input: "g eeks for ge eeks " Output: "geeksforgeeks" Expected time complexity is O(n) and only one traversal of string. Chapters descriptions off, selected captions settings, opens captions settings dialog captions off, selected Engli...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jun, 2022" }, { "code": null, "e": 118, "s": 52, "text": "Given a string, remove all spaces from the string and return it. " }, { "code": null, "e": 177, "s": 118, "text": "Input: \"g eeks for ge eeks \"\nO...
Flutter – Changing App Icon
29 Dec, 2020 Flutter SDK is an open-source software development kit for building beautiful UI which is natively compiled. When we create a Flutter Project, it comes with the default Flutter icon. In order to get the app published in stores like Google Play Store, Apple App Store, etc the default icon can be changed. I...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Dec, 2020" }, { "code": null, "e": 440, "s": 52, "text": "Flutter SDK is an open-source software development kit for building beautiful UI which is natively compiled. When we create a Flutter Project, it comes with the default Flutt...
How to open and close a file in Python
07 Oct, 2021 There might rise a situation where one needs to interact with external files with Python.Python provides inbuilt functions for creating, writing and reading files. in this article, we will be discussing how to open an external file and close the same using Python.Opening a file in python:There are two type...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Oct, 2021" }, { "code": null, "e": 873, "s": 53, "text": "There might rise a situation where one needs to interact with external files with Python.Python provides inbuilt functions for creating, writing and reading files. in this ar...
Auto Image Slider in Android with Example
28 Nov, 2021 Auto Image Slider is one of the most seen UI components in Android. This type of slider is mostly seen inside the apps of big E-commerce sites such as Flipkart, Amazon, and many more. Auto Image Slider is used to represent data in the form of slides that changes after a specific interval of time. In this a...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2021" }, { "code": null, "e": 492, "s": 28, "text": "Auto Image Slider is one of the most seen UI components in Android. This type of slider is mostly seen inside the apps of big E-commerce sites such as Flipkart, Amazon, and ma...
How to redirect to a relative URL in JavaScript?
31 Oct, 2019 This works in the same way as redirecting to any URL in javascript. Approach 1: To redirect to a relative URL in JavaScript you can usewindow.location.href = '/path';window.location.href returns the href (URL) of the current pageExample 1: A simple redirecting program<!DOCTYPE html><html><head> <script> ...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Oct, 2019" }, { "code": null, "e": 122, "s": 54, "text": "This works in the same way as redirecting to any URL in javascript." }, { "code": null, "e": 553, "s": 122, "text": "Approach 1: To redirect to a relative...
Find the Nth Pure number
06 Apr, 2022 Given an integer N, the task is to find the Nth pure number. A pure number has to satisfy three conditions: 1) It has an even number of digits. 2) All digits are either 4 or 5. 3) And the number is a palindrome.The Pure number series is: 44, 55, 4444, 4554, 5445, 5555, 444444, 445544, 454454, 455554 and ...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Apr, 2022" }, { "code": null, "e": 117, "s": 54, "text": "Given an integer N, the task is to find the Nth pure number. " }, { "code": null, "e": 368, "s": 117, "text": "A pure number has to satisfy three conditi...
turtle.fillcolor() function in Python
06 Aug, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This method is used to return or set the fillcolor. If turtleshape is a polygon, the inter...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Aug, 2020" }, { "code": null, "e": 269, "s": 52, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ve...
Java Swing | JFileChooser
01 Jun, 2022 JFileChooser is a part of java Swing package. The java Swing package is part of JavaTM Foundation Classes(JFC) . JFC contains many features that help in building graphical user interface in java . Java Swing provides components such as buttons, panels, dialogs, etc . JFileChooser is a easy and an effective...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jun, 2022" }, { "code": null, "e": 497, "s": 28, "text": "JFileChooser is a part of java Swing package. The java Swing package is part of JavaTM Foundation Classes(JFC) . JFC contains many features that help in building graphical use...
Lambda and filter in Python Examples
09 Jul, 2021 Prerequisite : Lambda in Python Given a list of numbers, find all numbers divisible by 13. Input : my_list = [12, 65, 54, 39, 102, 339, 221, 50, 70] Output : [65, 39, 221] We can use Lambda function inside the filter() built-in function to find all the numbers divisible by 13 in the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Jul, 2021" }, { "code": null, "e": 84, "s": 52, "text": "Prerequisite : Lambda in Python" }, { "code": null, "e": 143, "s": 84, "text": "Given a list of numbers, find all numbers divisible by 13." }, { "c...
Multiplication table till N rows where every Kth row is table of K upto Kth term
30 Jan, 2022 Given a number N, the task is to print N rows where every Kth row consists of the multiplication table of K up to Kth term. Examples: Input: N = 3 Output: 1 2 4 3 6 9 Explanation: In the above series, in every Kth row, multiplication table of K upto K terms is printed.Input: N = 5 Output: 1 2 4 3 6 9 4 8...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2022" }, { "code": null, "e": 164, "s": 28, "text": "Given a number N, the task is to print N rows where every Kth row consists of the multiplication table of K up to Kth term. Examples: " }, { "code": null, "e": 35...
How to Sort a TreeMap By Value in Java?
17 Dec, 2020 In Java Language, a TreeMap always stores key-value pairs which are in sorted order on the basis of the key. TreeMap implements the NavigableMap interface and extends AbstractMap class. TreeMap contains unique keys. Sorting TreeMap by value in Java The elements in TreeMap are sorted on the basis of keys. S...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Dec, 2020" }, { "code": null, "e": 270, "s": 54, "text": "In Java Language, a TreeMap always stores key-value pairs which are in sorted order on the basis of the key. TreeMap implements the NavigableMap interface and extends Abstrac...
Print all permutations in sorted (lexicographic) order
12 Jul, 2022 Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB, BAC, BCA, CAB, CBA”. We have discussed a program to print all permutations in this post, but here we must print the permutations in increasing order. Algorithm to print ...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Jul, 2022" }, { "code": null, "e": 211, "s": 52, "text": "Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB, BAC, BCA, CAB, CBA”." }, { "...
numpy.true_divide() in Python
29 Nov, 2018 (arr1, arr22, /, out=None, *, where=True, casting=’same_kind’, order=’K’, dtype=None, ufunc ‘true_divide’) :Array element from first array is divided by the elements from second array(all happens element-wise). Both arr1 and arr2 must have same shape. Returns true division element-wise. Python traditionall...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 316, "s": 28, "text": "(arr1, arr22, /, out=None, *, where=True, casting=’same_kind’, order=’K’, dtype=None, ufunc ‘true_divide’) :Array element from first array is divided by the elements from seco...