title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Progress Bars in Python - GeeksforGeeks
17 Aug, 2020 Understandably, we get a little impatient when we do not know how much time a process is going to take, for example, a for loop or a file downloading or an application starting up. To distract us from that we were given the libraries tqdm and progressbar in Python language which allows us to give a visual ...
[ { "code": null, "e": 25683, "s": 25655, "text": "\n17 Aug, 2020" }, { "code": null, "e": 25864, "s": 25683, "text": "Understandably, we get a little impatient when we do not know how much time a process is going to take, for example, a for loop or a file downloading or an applica...
Playit
You can change the text-align by clicking on one of the properties on the left. This text is where you will see the result of the selected text-align property.
[]
UUID getLeastSignificantBits() Method in Java with Examples - GeeksforGeeks
27 Dec, 2018 The UUIDs are 128-bit values. The getLeastSignificantBits() Method of UUID class in Java is used to get the least significant 64 bits of this UUID. Syntax: public long getLeastSignificantBits() Parameters: The method does not take any parameters. Return Value: The method returns an integer value which is t...
[ { "code": null, "e": 26093, "s": 26065, "text": "\n27 Dec, 2018" }, { "code": null, "e": 26241, "s": 26093, "text": "The UUIDs are 128-bit values. The getLeastSignificantBits() Method of UUID class in Java is used to get the least significant 64 bits of this UUID." }, { "...
Counting number of repeating words in a Golang String - GeeksforGeeks
04 May, 2020 Given a string, the task is to count the number of words being repeated in that particular string in Golang. Example: Input: s = "She is mother of my mother." Output: She = 1 is = 1 mother = 2 of = 1 my = 1 To count the number of repeating words, first, the string ...
[ { "code": null, "e": 24380, "s": 24352, "text": "\n04 May, 2020" }, { "code": null, "e": 24489, "s": 24380, "text": "Given a string, the task is to count the number of words being repeated in that particular string in Golang." }, { "code": null, "e": 24498, "s": 2...
C# | How to change the Output Encoding Scheme of the Console - GeeksforGeeks
28 Jan, 2019 Given the normal Console in C#, the task is to change the Output Encoding Scheme of the Console. Approach: This can be done using the OutputEncoding property in the Console class of the System package in C#. Program 1: Getting the value of Output Encoding Scheme // C# program to illustrate the// Console.Ou...
[ { "code": null, "e": 26389, "s": 26361, "text": "\n28 Jan, 2019" }, { "code": null, "e": 26486, "s": 26389, "text": "Given the normal Console in C#, the task is to change the Output Encoding Scheme of the Console." }, { "code": null, "e": 26597, "s": 26486, "t...
PyQt5 QDateEdit - Setting Date Programmatically - GeeksforGeeks
25 May, 2021 In this article, we will see how we can date programmatically to the QDateEdit. User can set date to the date edit with the help of cursor and the keyboard but sometimes there is a need of setting initial date or date programmatically for showing date in the records.In order to do this we use setDate metho...
[ { "code": null, "e": 25729, "s": 25701, "text": "\n25 May, 2021" }, { "code": null, "e": 26066, "s": 25729, "text": "In this article, we will see how we can date programmatically to the QDateEdit. User can set date to the date edit with the help of cursor and the keyboard but som...
ReactJS UNSAFE_componentWillMount() Method - GeeksforGeeks
17 Dec, 2021 The componentWillMount() method invokes right before our React component gets loaded or mounted in the DOM (Document Object Model). It is called during the mounting phase of the React Life-cycle, i.e., before render(). It is used to fetch data from outside the component by executing the React code synchron...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n17 Dec, 2021" }, { "code": null, "e": 26660, "s": 26071, "text": "The componentWillMount() method invokes right before our React component gets loaded or mounted in the DOM (Document Object Model). It is called during the mountin...
Building a Machine Learning Model Using J48 Classifier - GeeksforGeeks
22 Sep, 2021 What is the J48 Classifier? J48 is a machine learning decision tree classification algorithm based on Iterative Dichotomiser 3. It is very helpful in examine the data categorically and continuously. Note: To build our J48 machine learning model we’ll use the weka tool. What is Weka? Weka is an open-source ...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n22 Sep, 2021" }, { "code": null, "e": 25253, "s": 25225, "text": "What is the J48 Classifier?" }, { "code": null, "e": 25424, "s": 25253, "text": "J48 is a machine learning decision tree classification algorit...
Getting Started with TensorFlow.js | by Venelin Valkov | Towards Data Science
TL;DR Learn about the basics of Machine Learning with TensorFlow.js — Tensors, basic visualizations and train a simple model that converts kilograms to pounds So what is this thing TensorFlow.js? TensorFlow.js is a library for developing and training ML models in JavaScript, and deploying in browser or on Node.js For o...
[ { "code": null, "e": 330, "s": 171, "text": "TL;DR Learn about the basics of Machine Learning with TensorFlow.js — Tensors, basic visualizations and train a simple model that converts kilograms to pounds" }, { "code": null, "e": 367, "s": 330, "text": "So what is this thing Tenso...
How to fine-tune BERT with pytorch-lightning | by sobamchan | Towards Data Science
How to fine-tune BERT with pytorch-lightning What’s up world! I hope you are enjoying fine-tuning transformer-based language models on tasks of your interest and achieving cool results. I assume quite many of you use this amazing transformers library from huggingface to fine-tune pre-trained language models. This is a ...
[ { "code": null, "e": 217, "s": 172, "text": "How to fine-tune BERT with pytorch-lightning" }, { "code": null, "e": 234, "s": 217, "text": "What’s up world!" }, { "code": null, "e": 358, "s": 234, "text": "I hope you are enjoying fine-tuning transformer-based l...
clock() function in C/C++ - GeeksforGeeks
28 Sep, 2018 The clock() function is defined in the ctime header file. The clock() function returns the approximate processor time that is consumed by the program. The clock() time depends upon how the operating system allocate resources to the process that’s why clock() time may be slower or faster than the actual clo...
[ { "code": null, "e": 26131, "s": 26103, "text": "\n28 Sep, 2018" }, { "code": null, "e": 26442, "s": 26131, "text": "The clock() function is defined in the ctime header file. The clock() function returns the approximate processor time that is consumed by the program. The clock() ...
Ant Design Introduction and Installation for Angular - GeeksforGeeks
21 Aug, 2020 Ant Design is a design pattern for enterprise-level products that can be integrated with other front-end frameworks such as Angular, React, or Vue. Ant Design official implementation is released with React but it can be used with other JavaScript frameworks. It is an open-source tool with approximately 50....
[ { "code": null, "e": 25029, "s": 25001, "text": "\n21 Aug, 2020" }, { "code": null, "e": 25485, "s": 25029, "text": "Ant Design is a design pattern for enterprise-level products that can be integrated with other front-end frameworks such as Angular, React, or Vue. Ant Design offi...
Check if all array elements are pairwise co-prime or not - GeeksforGeeks
02 Jun, 2021 Given an array A[] consisting of N positive integers, the task is to check if all the array elements are pairwise co-prime, i.e. for all pairs (Ai , Aj), such that 1<=i<j<=N, GCD(Ai, Aj) = 1. Examples: Input : A[] = {2, 3, 5}Output : YesExplanation : All the pairs, (2, 3), (3, 5), (2, 5) are pairwise co-p...
[ { "code": null, "e": 26025, "s": 25997, "text": "\n02 Jun, 2021" }, { "code": null, "e": 26217, "s": 26025, "text": "Given an array A[] consisting of N positive integers, the task is to check if all the array elements are pairwise co-prime, i.e. for all pairs (Ai , Aj), such that...
Check if a given string is Even-Odd Palindrome or not - GeeksforGeeks
07 Apr, 2021 Given a string str, the task is to check if the given string is Even-Odd Palindrome or not. An Even-Odd Palindrome string is defined to be a string whose characters at even indices form a Palindrome while the characters at odd indices also form a Palindrome separately. Examples: Input: str=”abzzab” Out...
[ { "code": null, "e": 26365, "s": 26337, "text": "\n07 Apr, 2021" }, { "code": null, "e": 26458, "s": 26365, "text": "Given a string str, the task is to check if the given string is Even-Odd Palindrome or not. " }, { "code": null, "e": 26637, "s": 26458, "text"...
Printing the correct number of decimal points with cout in C++
Here we will see how to print some floating point numbers up to some pre-defined decimal places. In C++, we can use setprecision with the cout to do this word. This is present under the iomanip header file in C++. #include <iostream> #include <iomanip> using namespace std; int main() { double x = 2.3654789d; cout...
[ { "code": null, "e": 1401, "s": 1187, "text": "Here we will see how to print some floating point numbers up to some pre-defined decimal places. In C++, we can use setprecision with the cout to do this word. This is present under the iomanip header file in C++." }, { "code": null, "e": 17...
Create a correlation Matrix using Python
27 Jan, 2022 A correlation matrix is a table containing correlation coefficients between variables. Each cell in the table represents the correlation between two variables. The value lies between -1 and 1. A correlation matrix is used to summarize data, as a diagnostic for advanced analyses and as an input into a more ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2022" }, { "code": null, "e": 401, "s": 28, "text": "A correlation matrix is a table containing correlation coefficients between variables. Each cell in the table represents the correlation between two variables. The value lies ...
Number of integral solutions of the equation x1 + x2 +.... + xN = k
30 Jun, 2022 Given N and K. The task is to count the number of the integral solutions of a linear equation having N variable as given below: x1 + x2+ x3...+ xN-1+...+xN = K Examples: Input: N = 3, K = 3 Output: 10 Explaination: Possible solutions are: (1,1,1),(1,0,2),(2,0,1),(1,2,0),(2,1,0),(0,1,2) (0,2,1),(3,0,0),...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 182, "s": 52, "text": "Given N and K. The task is to count the number of the integral solutions of a linear equation having N variable as given below: " }, { "code": null, "e": 214, ...
Variable Names in MATLAB
22 Sep, 2021 A variable is a named-memory location that stores different types of data which can be used to perform a specific set of operations. It can be thought of as a container that holds some value in memory. The Matlab workspace store all the variables being used during a session. This workspace not only deals w...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Sep, 2021" }, { "code": null, "e": 648, "s": 52, "text": "A variable is a named-memory location that stores different types of data which can be used to perform a specific set of operations. It can be thought of as a container that ...
JavaScript | Trigger a button on ENTER key
27 Jul, 2021 To trigger a click button on ENTER key, We can use any of the keyup(), keydown() and keypress() events of jQuery. keyup(): This event occurs when a keyboard key is released. The method either triggers the keyup event, or to run a function when a keyup event occurs.Syntax:It triggers the keyup event for sel...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jul, 2021" }, { "code": null, "e": 142, "s": 28, "text": "To trigger a click button on ENTER key, We can use any of the keyup(), keydown() and keypress() events of jQuery." }, { "code": null, "e": 438, "s": 142, "...
How to use relative xpath for locating a web-element by particular Attribute in Selenium?
We can use relative xpath for locating web-element by particular attribute value. A relative xpath begins from the element to be located and not from the root. It begins with the // symbol. It’s advantage is that even if an element is deleted or added in the DOM, the relative xpath for a specific element remains unaffe...
[ { "code": null, "e": 1347, "s": 1187, "text": "We can use relative xpath for locating web-element by particular attribute value. A relative xpath begins from the element to be located and not from the root." }, { "code": null, "e": 1611, "s": 1347, "text": "It begins with the // ...
JavaFX | How to set padding between nodes of a GridPane - GeeksforGeeks
06 Jun, 2019 In most cases, we look forward to seeing objects organized and well arranged, especially when we want efficiencywhile using them. In the case of object nodes of JavaFX GridPane, there will always be a need to make these objects look smart and organized. Example: Let us see these four buttons on GridPane //...
[ { "code": null, "e": 25309, "s": 25281, "text": "\n06 Jun, 2019" }, { "code": null, "e": 25563, "s": 25309, "text": "In most cases, we look forward to seeing objects organized and well arranged, especially when we want efficiencywhile using them. In the case of object nodes of Ja...
Building a Simple Neural Network in R Programming - GeeksforGeeks
20 Aug, 2020 The term Neural Networks refers to the system of neurons either organic or artificial in nature. In artificial intelligence reference, neural networks are a set of algorithms that are designed to recognize a pattern like a human brain. They interpret sensory data through a kind of machine perception, label...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n20 Aug, 2020" }, { "code": null, "e": 27336, "s": 26487, "text": "The term Neural Networks refers to the system of neurons either organic or artificial in nature. In artificial intelligence reference, neural networks are a set of...
Group multiple occurrence of array elements ordered by first occurrence - GeeksforGeeks
28 Apr, 2022 Given an unsorted array with repetitions, the task is to group multiple occurrence of individual elements. The grouping should happen in a way that the order of first occurrences of all elements is maintained.Examples: Input: arr[] = {5, 3, 5, 1, 3, 3} Output: {5, 5, 3, 3, 3, 1} Input: arr[] = {4...
[ { "code": null, "e": 25975, "s": 25947, "text": "\n28 Apr, 2022" }, { "code": null, "e": 26196, "s": 25975, "text": "Given an unsorted array with repetitions, the task is to group multiple occurrence of individual elements. The grouping should happen in a way that the order of fi...
Python: Passing Dictionary as Arguments to Function - GeeksforGeeks
30 Jan, 2020 A dictionary in Python is a collection of data which is unordered and mutable. Unlike, numeric indices used by lists, a dictionary uses the key as an index for a specific value. It can be used to store unrelated data types but data that is related as a real-world entity. The keys themselves are employed fo...
[ { "code": null, "e": 25553, "s": 25525, "text": "\n30 Jan, 2020" }, { "code": null, "e": 25886, "s": 25553, "text": "A dictionary in Python is a collection of data which is unordered and mutable. Unlike, numeric indices used by lists, a dictionary uses the key as an index for a s...
NseTools - Getting Stock Quote of Given Company - GeeksforGeeks
18 Aug, 2020 In this article we will see how we can get the stock quote of given company using nsetools. Nsetools is a library for collecting real time data from National Stock Exchange of India. A stock quote is the price of a stock as quoted on an exchange. A basic quote for a specific stock provides information, suc...
[ { "code": null, "e": 26175, "s": 26147, "text": "\n18 Aug, 2020" }, { "code": null, "e": 26548, "s": 26175, "text": "In this article we will see how we can get the stock quote of given company using nsetools. Nsetools is a library for collecting real time data from National Stock...
HTML content modification using Javascript - GeeksforGeeks
23 Apr, 2019 JavaScript is the dynamic, lightweight and most commonly computer programming language used to create a web pages. It interact with client side and make dynamic pages. JavaScript Can Change Content of HTML page: The getElementById() method is used to get the id of element and change the HTML content. Examp...
[ { "code": null, "e": 26435, "s": 26407, "text": "\n23 Apr, 2019" }, { "code": null, "e": 26603, "s": 26435, "text": "JavaScript is the dynamic, lightweight and most commonly computer programming language used to create a web pages. It interact with client side and make dynamic pa...
Making SOAP API calls using Python - GeeksforGeeks
18 Jul, 2021 SOAP stands for Simple Object Access Protocol, as the name suggests nothing but a protocol for exchanging structured data between nodes. It uses XML instead of JSON. In this article, we are going to see how to make SOAP API calls using python. If you want to test out what exactly the payload and response w...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n18 Jul, 2021" }, { "code": null, "e": 25703, "s": 25537, "text": "SOAP stands for Simple Object Access Protocol, as the name suggests nothing but a protocol for exchanging structured data between nodes. It uses XML instead of JSO...
ALTER SCHEMA in SQL Server - GeeksforGeeks
04 Sep, 2020 The ALTER SCHEMA statement used to transfer a object from a schema to another schema in the same database. Syntax : ALTER SCHEMA target_schema_name TRANSFER [ object_type :: ] object_name; Parameters : target_schema_name is the schema in the database, into which the object will be moved. object_typ...
[ { "code": null, "e": 25549, "s": 25521, "text": "\n04 Sep, 2020" }, { "code": null, "e": 25656, "s": 25549, "text": "The ALTER SCHEMA statement used to transfer a object from a schema to another schema in the same database." }, { "code": null, "e": 25665, "s": 256...
Find if array has an element whose value is half of array sum - GeeksforGeeks
23 Jul, 2021 Given a sorted array (with unique entries), we have to find whether there exist an element(say X) which is exactly half the sum of all the elements of the array including X. Examples: Input : A = {1, 2, 3} Output : YES Sum of all the elements is 6 = 3*2; Input : A = {2, 4} Output : NO Sum of all the ele...
[ { "code": null, "e": 26444, "s": 26416, "text": "\n23 Jul, 2021" }, { "code": null, "e": 26618, "s": 26444, "text": "Given a sorted array (with unique entries), we have to find whether there exist an element(say X) which is exactly half the sum of all the elements of the array in...
C++ Mathematical Functions - GeeksforGeeks
25 Nov, 2021 C++ being superset of C, supports large number of useful mathematical functions. These functions are available in standard C++ and C to support various mathematical calculations. Instead of focusing on implementation, these functions can be directly used to simplify code and programs. C++ provides large se...
[ { "code": null, "e": 25368, "s": 25340, "text": "\n25 Nov, 2021" }, { "code": null, "e": 25816, "s": 25368, "text": "C++ being superset of C, supports large number of useful mathematical functions. These functions are available in standard C++ and C to support various mathematica...
PostgreSQL - RANK Function - GeeksforGeeks
10 Feb, 2021 In PostgreSQL, the RANK() function is used to assign a rank to each row of the query result set within the specified partition. The rank of the first row within each partition is 1. The following illustrates the syntax of the RANK() function: Syntax: RANK() OVER ( [PARTITION BY partition_expression, .....
[ { "code": null, "e": 25177, "s": 25149, "text": "\n10 Feb, 2021" }, { "code": null, "e": 25359, "s": 25177, "text": "In PostgreSQL, the RANK() function is used to assign a rank to each row of the query result set within the specified partition. The rank of the first row within ea...
Opening tif file using GDAL in Python - GeeksforGeeks
12 Nov, 2020 To open a raster file we need to register drivers. In python, GDALAllRegister() is implicitly called whenever gdal is imported. The tiff file to be opened can be downloaded here. Importing the modules: Import the gdal and ogr modules from osgeo. Python3 from osgeo import gdal, ogr Opening the file: The ras...
[ { "code": null, "e": 25551, "s": 25523, "text": "\n12 Nov, 2020" }, { "code": null, "e": 25730, "s": 25551, "text": "To open a raster file we need to register drivers. In python, GDALAllRegister() is implicitly called whenever gdal is imported. The tiff file to be opened can be d...
Function Overloading and Default Arguments in C++ - GeeksQuiz
07 Mar, 2018 #include <iostream> using namespace std; int fun(int x, int y = 0, int z = 0) { return (x + y + z); } int main() { cout << fun(10); return 0; } int fun(int x, int y); void fun(int x, int y); int fun(int x, int y); static int fun(int x, int y); int fun(int *ptr, int n);...
[ { "code": null, "e": 28855, "s": 28827, "text": "\n07 Mar, 2018" }, { "code": null, "e": 29009, "s": 28855, "text": "#include <iostream>\nusing namespace std;\n\nint fun(int x, int y = 0, int z = 0)\n{ return (x + y + z); }\n\nint main()\n{\n cout << fun(10);\n return 0;\n}\...
Downloading gists from Github made simple - GeeksforGeeks
04 Sep, 2017 GithubGist is a place where you can create a private or a public gist i.e store your files either privately or publicly. Let us assume a scenario where you have written a good number of gists for your project and you want to download a set of them. The only way you can do it using GithubGist is to open eac...
[ { "code": null, "e": 26299, "s": 26271, "text": "\n04 Sep, 2017" }, { "code": null, "e": 26868, "s": 26299, "text": "GithubGist is a place where you can create a private or a public gist i.e store your files either privately or publicly. Let us assume a scenario where you have wr...
Python - Unique values count of each Key - GeeksforGeeks
24 Jan, 2021 Given a Dictionaries list, the task is to write a Python program to count the unique values of each key. Example: Input : test_list = [{“gfg” : 1, “is” : 3, “best”: 2}, {“gfg” : 1, “is” : 3, “best” : 6}, {“gfg” : 7, “is” : 3, “best” : 10}] Output : {‘gfg’: 2, ‘is’: 1, ‘best’: 3} Explanation : gfg has 1 an...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n24 Jan, 2021" }, { "code": null, "e": 25642, "s": 25537, "text": "Given a Dictionaries list, the task is to write a Python program to count the unique values of each key." }, { "code": null, "e": 25651, "s": 25642...
Minimum operations to transform given string to another by moving characters to front or end - GeeksforGeeks
19 May, 2021 Given two Strings S and T of length N consisting of lowercase alphabets, which are permutations of each other, the task is to print the minimum number of operations to convert S to T. In one operation, pick any character of the string S and move it either to the start or end of the string S. Examples: Inpu...
[ { "code": null, "e": 26235, "s": 26207, "text": "\n19 May, 2021" }, { "code": null, "e": 26528, "s": 26235, "text": "Given two Strings S and T of length N consisting of lowercase alphabets, which are permutations of each other, the task is to print the minimum number of operation...
Count of integers from the range [0, N] whose digit sum is a multiple of K - GeeksforGeeks
15 Jun, 2021 Given two integers N and K, the task is to calculate the number of integers in the range [0, N] whose digit sum is a multiple of K. The answer could be large, so print the answer modulo 109 +7. Examples: Input: N = 10, K = 5 Output: 2 0 and 5 are the only possible integers. Input: N = 30, K = 4 Output: 7...
[ { "code": null, "e": 25917, "s": 25889, "text": "\n15 Jun, 2021" }, { "code": null, "e": 26111, "s": 25917, "text": "Given two integers N and K, the task is to calculate the number of integers in the range [0, N] whose digit sum is a multiple of K. The answer could be large, so p...
Push Relabel Algorithm | Set 1 (Introduction and Illustration) - GeeksforGeeks
08 Apr, 2022 Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink ‘t’ in the graph, find the maximum possible flow from s to t with following constraints: a) Flow on an edge doesn’t exceed the given capacity of the edge. b) Incoming flow is equal to ...
[ { "code": null, "e": 26295, "s": 26267, "text": "\n08 Apr, 2022" }, { "code": null, "e": 26860, "s": 26295, "text": "Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink ‘t’ in the graph, find the maximum possi...
Insert a given column at a specific position in a Pandas DataFrame - GeeksforGeeks
26 Jul, 2020 In this article, we will use Dataframe.insert() method of Pandas to insert a new column at a specific column index in a dataframe. Syntax: DataFrame.insert(loc, column, value, allow_duplicates = False) Return: None Code: Let’s create a Dataframe. Python3 # Importing pandas libraryimport pandas as pd # dic...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n26 Jul, 2020" }, { "code": null, "e": 25668, "s": 25537, "text": "In this article, we will use Dataframe.insert() method of Pandas to insert a new column at a specific column index in a dataframe." }, { "code": null, ...
D3.js schemePaired Method - GeeksforGeeks
23 Aug, 2020 The d3.schemePaired method in D3.js is used to return an array of twelve categorical colors which is returned as RGB hexadecimal strings. Syntax: d3.schemePaired Parameters: This function does not accept any parameter. Return Value: It returns an RGB hexadecimal string. Example 1: HTML <!DOCTYPE html> <htm...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n23 Aug, 2020" }, { "code": null, "e": 26683, "s": 26545, "text": "The d3.schemePaired method in D3.js is used to return an array of twelve categorical colors which is returned as RGB hexadecimal strings." }, { "code": nul...
Hexadecimal equivalents in Binary Valued Graph - GeeksforGeeks
24 Nov, 2021 Given a binary valued undirected graph with V vertices and E edges, the task is to find the hexadecimal equivalents of all the connected components of the graph. A binary valued graph can be considered as having only binary numbers (0 or 1) as the vertex values. Examples: Input: E = 4, V = 7 Output: Cha...
[ { "code": null, "e": 25917, "s": 25889, "text": "\n24 Nov, 2021" }, { "code": null, "e": 26180, "s": 25917, "text": "Given a binary valued undirected graph with V vertices and E edges, the task is to find the hexadecimal equivalents of all the connected components of the graph. A...
Perl system Function
This function executes the command specified by PROGRAM, passing LIST as arguments to the command. The return value is the exit status of the program as returned by the wait function. To obtain the actual exit value, divide by 256. Following is the simple syntax for this function − system PROGRAM, LIST system PROGRAM ...
[ { "code": null, "e": 2319, "s": 2220, "text": "This function executes the command specified by PROGRAM, passing LIST as arguments to the command." }, { "code": null, "e": 2452, "s": 2319, "text": "The return value is the exit status of the program as returned by the wait function...
Longest Repeating Subsequence | Practice | GeeksforGeeks
Given a string str, find the length of the longest repeating subsequence such that it can be found twice in the given string. The two identified subsequences A and B can use the same ith character from string str if and only if that ith character has different indices in A and B. Example 1: Input: str = "axxzxy" Output...
[ { "code": null, "e": 519, "s": 238, "text": "Given a string str, find the length of the longest repeating subsequence such that it can be found twice in the given string. The two identified subsequences A and B can use the same ith character from string str if and only if that ith character has diff...
How to Export the Azure VMs using PowerShell?
To export the azure VMs using PowerShell, we first need to get their desired properties. The cmdlet Get-AZVM will get all the VMs connected to the particular subscription. To export them to the CSV file we can use the below command. Get-AzVM | Export-Csv .\AZVMs.csv -NoTypeInformation Once you run the above command, yo...
[ { "code": null, "e": 1295, "s": 1062, "text": "To export the azure VMs using PowerShell, we first need to get their desired properties. The cmdlet Get-AZVM will get all the VMs connected to the particular subscription. To export them to the CSV file we can use the below command." }, { "code"...
CSS Rounded Corners
With the CSS border-radius property, you can give any element "rounded corners". The CSS border-radius property defines the radius of an element's corners. Tip: This property allows you to add rounded corners to elements! Here are three examples: 1. Rounded corners for an element with a specified background color: R...
[ { "code": null, "e": 81, "s": 0, "text": "With the CSS border-radius property, you can give any element \"rounded corners\"." }, { "code": null, "e": 158, "s": 81, "text": "The CSS \nborder-radius property defines the radius of an \nelement's corners." }, { "code": null, ...
NLP Metrics Made Simple: The BLEU Score | by Boaz Shmueli | Towards Data Science
Natural language processing (NLP) has become a super-hot topic. One of the most successful applications of NLP is Machine Translation (MT) — the ability to automatically translate text from one language to another. Perhaps the most well-known MT application is the very useful Google Translate, with its ability to trans...
[ { "code": null, "e": 524, "s": 171, "text": "Natural language processing (NLP) has become a super-hot topic. One of the most successful applications of NLP is Machine Translation (MT) — the ability to automatically translate text from one language to another. Perhaps the most well-known MT applicati...
Microprocessor - Quick Guide
Microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of performing ALU (Arithmetic Logical Unit) operations and communicating with the other devices connected to it. Microprocessor consists of an ALU, register array, and a control unit. ALU performs arithmetical and logical opera...
[ { "code": null, "e": 2667, "s": 2461, "text": "Microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of performing ALU (Arithmetic Logical Unit) operations and communicating with the other devices connected to it." }, { "code": null, "e": 3023, ...
VB.Net - Binary Files
The BinaryReader and BinaryWriter classes are used for reading from and writing to a binary file. The BinaryReader class is used to read binary data from a file. A BinaryReader object is created by passing a FileStream object to its constructor. The following table shows some of the commonly used methods of the BinaryR...
[ { "code": null, "e": 2398, "s": 2300, "text": "The BinaryReader and BinaryWriter classes are used for reading from and writing to a binary file." }, { "code": null, "e": 2546, "s": 2398, "text": "The BinaryReader class is used to read binary data from a file. A BinaryReader objec...
PyQt5 – How to automate Progress Bar while downloading using urllib?
14 Sep, 2021 PyQt5 is one of the emerging GUI libraries in terms of developing Python GUI Desktop apps. It has rich and robust functionality which ensures production quality apps. Learning PyQt5 library is an add-on to your knowledge. You can develop your consumer quality, highly professional apps. In this article, we ...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Sep, 2021" }, { "code": null, "e": 341, "s": 54, "text": "PyQt5 is one of the emerging GUI libraries in terms of developing Python GUI Desktop apps. It has rich and robust functionality which ensures production quality apps. Learnin...
Python – reversed() VS [::-1] , Which one is faster?
20 Aug, 2020 Python lists can be reversed using many python method such as using slicing method or using reversed() function. This article discusses how both of these work and Which one of them seems to be the faster one and Why. Code: Reversing a list using Slicing. Python3 # Python code to reverse# a list using slici...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Aug, 2020" }, { "code": null, "e": 245, "s": 28, "text": "Python lists can be reversed using many python method such as using slicing method or using reversed() function. This article discusses how both of these work and Which one of...
Minimum Number of Platforms Required for a Railway/Bus Station
10 Jul, 2022 Given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that no train waits. We are given two arrays that represent the arrival and departure times of trains that stop. Examples: Input: arr[]...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Jul, 2022" }, { "code": null, "e": 337, "s": 54, "text": "Given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that...
Ways to sort list of dictionaries by values in Python – Using lambda function
05 Jul, 2022 In this article, we will cover how to sort a dictionary by value in Python. Sorting has always been a useful utility in day-to-day programming. Dictionary in Python is widely used in many applications ranging from competitive domain to developer domain(e.g. handling JSON data). Having the knowledge to sor...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jul, 2022" }, { "code": null, "e": 129, "s": 52, "text": "In this article, we will cover how to sort a dictionary by value in Python. " }, { "code": null, "e": 432, "s": 129, "text": "Sorting has always been a us...
JavaFX | VBox Class
06 Sep, 2018 VBox is a part of JavaFX. VBox lays out its children in form of vertical columns. If the vbox has a border and/or padding set, then the contents will be layed out within those insets. VBox class extends Pane class. Constructor of the class: VBox(): Creates a VBox layout with spacing = 0 and alignment at TO...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Sep, 2018" }, { "code": null, "e": 243, "s": 28, "text": "VBox is a part of JavaFX. VBox lays out its children in form of vertical columns. If the vbox has a border and/or padding set, then the contents will be layed out within those...
Pattern CASE_INSENSITIVE field in Java with examples
This CASE_INSENSITIVE field of the Pattern class matches characters irrespective of case. When you use this as flag value to the compile() method and if you search for characters using regular expressions characters of both cases will be matched. Note − By default, this flag matches only ASCII characters import java.ut...
[ { "code": null, "e": 1434, "s": 1187, "text": "This CASE_INSENSITIVE field of the Pattern class matches characters irrespective of case. When you use this as flag value to the compile() method and if you search for characters using regular expressions characters of both cases will be matched." }, ...
Python | Pandas Index.dtype
20 Feb, 2019 Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.dtype attribute return the data type (dtype) of the underlying data of the given Index object. Syntax: Index.dtype Parameter : None Returns :...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Feb, 2019" }, { "code": null, "e": 181, "s": 28, "text": "Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects." }, { "code": ...
Python – Sort List by Dictionary values
11 May, 2020 Sometimes while working with Python dictionary, we can have problem in which we need to perform a sort of list according to corresponding value in dictionary. This can have application in many domains, including data and web development. Lets discuss certain ways in which this task can be performed. Method...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2020" }, { "code": null, "e": 329, "s": 28, "text": "Sometimes while working with Python dictionary, we can have problem in which we need to perform a sort of list according to corresponding value in dictionary. This can have ap...
Name validation using IGNORECASE in Python Regex
29 Dec, 2020 In this article, we will learn about how to use Python Regex to validate name using IGNORECASE. re.IGNORECASE : This flag allows for case-insensitive matching of the Regular Expression with the given string i.e. expressions like [A-Z] will match lowercase letters, too. Generally, It’s passed as an optional...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2020" }, { "code": null, "e": 124, "s": 28, "text": "In this article, we will learn about how to use Python Regex to validate name using IGNORECASE." }, { "code": null, "e": 362, "s": 124, "text": "re.IGNOREC...
What is the difference between = (Assignment) and == (Equal to) operators
05 Apr, 2019 = operator The “=” is an assignment operator is used to assign the value on the right to the variable on the left. For example: a = 10; b = 20; ch = 'y'; Example: // C program to demonstrate// working of Assignment operators #include <stdio.h> int main(){ // Assigning value 10 to a // using "=" ...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Apr, 2019" }, { "code": null, "e": 63, "s": 52, "text": "= operator" }, { "code": null, "e": 167, "s": 63, "text": "The “=” is an assignment operator is used to assign the value on the right to the variable on th...
Monitoring memory usage of a running Python program
23 Nov, 2021 Managing memory is important in any programming logic but this becomes necessary for python. As python is used in Ml and AI where vast data are used which needs to be managed. Memory leaks,i.e, the program is out of memory after running for several hours. To manage these memory leaks memory monitoring is e...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Nov, 2021" }, { "code": null, "e": 502, "s": 28, "text": "Managing memory is important in any programming logic but this becomes necessary for python. As python is used in Ml and AI where vast data are used which needs to be managed....
Find the frequencies of all duplicates elements in the array
01 Jul, 2021 Given an array of integers with duplicate elements in it, the task is to find the duplicate elements in the array and their frequencies.Examples: Input: arr[] = {2, 3, 4, 5, 4, 6, 4, 7, 4, 5, 6, 6} Output: Below is the frequency of repeated elements – 4 –> 4 5 –> 2 6 –> 3Input: arr[] = {4, 4, 5, 5, 6} Ou...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Jul, 2021" }, { "code": null, "e": 202, "s": 54, "text": "Given an array of integers with duplicate elements in it, the task is to find the duplicate elements in the array and their frequencies.Examples: " }, { "code": null...
Python | time.time() method
28 Aug, 2019 Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules. time.time() method of Time module is used to get the time in seconds since epoch. The handling of leap seconds is platform dependent. Note: The epoch is the point where the time starts,...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2019" }, { "code": null, "e": 150, "s": 28, "text": "Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules." }, { "code": null, "e": 284, "s": 15...
Can a constructor be private in C++ ?
21 Jul, 2017 Prerequisite : ConstructorsA constructor is a special member function of a class which initializes objects of a class. In C++, constructor is automatically called when object of a class is created. By default, constructors are defined in public section of class. So, question is can a constructor be defined...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jul, 2017" }, { "code": null, "e": 252, "s": 54, "text": "Prerequisite : ConstructorsA constructor is a special member function of a class which initializes objects of a class. In C++, constructor is automatically called when object...
How to Implement Current Location Button Feature in Google Maps in Android?
23 May, 2021 The current location is a feature on Google Maps, that helps us locate the device’s position on the Map. Through this article, while we will be implementing Google Maps, we shall also be implementing a button, which will fetch our current location and navigate it on the map. Note that we are going to imple...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 May, 2021" }, { "code": null, "e": 405, "s": 52, "text": "The current location is a feature on Google Maps, that helps us locate the device’s position on the Map. Through this article, while we will be implementing Google Maps, we s...
Count n digit numbers divisible by given number
02 Jun, 2022 Given number of digit n and a number, the task is to count all the numbers which are divisible by that number and having n digit.Examples : Input : n = 2, number = 7 Output : 9 There are nine n digit numbers that are divisible by 7. Numbers are 14, 21, 28, 35, 42, 49, .... 70. Input : n = 3, number = 7...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Jun, 2022" }, { "code": null, "e": 194, "s": 52, "text": "Given number of digit n and a number, the task is to count all the numbers which are divisible by that number and having n digit.Examples : " }, { "code": null, ...
Minimum time to burn a Tree starting from a Leaf node
13 Jul, 2021 Given a binary tree and a leaf node from this tree. It is known that in 1s all nodes connected to a given node (left child, right child and parent) get burned in 1 second. Then all the nodes which are connected through one intermediate get burned in 2 seconds, and so on. The task is to find the minimum tim...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jul, 2021" }, { "code": null, "e": 415, "s": 52, "text": "Given a binary tree and a leaf node from this tree. It is known that in 1s all nodes connected to a given node (left child, right child and parent) get burned in 1 second. Th...
Operations required to make the string empty
28 Jun, 2022 Given a string str, the task is to make the string empty with the given operation. In a single operation, you can pick some characters of the string (each of the picked characters should have the same frequency) and remove them from the string. Print the total operations required to make the string empty.E...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2022" }, { "code": null, "e": 370, "s": 52, "text": "Given a string str, the task is to make the string empty with the given operation. In a single operation, you can pick some characters of the string (each of the picked chara...
Dynamic Type in C#
10 Apr, 2019 In C# 4.0, a new type is introduced that is known as a dynamic type. It is used to avoid the compile-time type checking. The compiler does not check the type of the dynamic type variable at compile time, instead of this, the compiler gets the type at the run time. The dynamic type variable is created using...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Apr, 2019" }, { "code": null, "e": 377, "s": 52, "text": "In C# 4.0, a new type is introduced that is known as a dynamic type. It is used to avoid the compile-time type checking. The compiler does not check the type of the dynamic t...
GATE | GATE CS 2019 | Question 61
19 Feb, 2019 A relational database contains two tables Student and Performance as shown below:The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below: SELECT S.Student_name, sum(P.Marks) FROM Stud...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Feb, 2019" }, { "code": null, "e": 314, "s": 52, "text": "A relational database contains two tables Student and Performance as shown below:The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_...
Why start + (end – start)/2 is preferable method for calculating middle of an array over (start + end)/2 ?
27 Jul, 2021 I am very sure that everyone is able to find middle index of array once you know start index and end index of array, but there are certain benefits of using start + (end – start)/2 over (start + end)/2, which are described below : The very first way of finding middle index is mid = (start + end)/2 But the...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jul, 2021" }, { "code": null, "e": 283, "s": 52, "text": "I am very sure that everyone is able to find middle index of array once you know start index and end index of array, but there are certain benefits of using start + (end – st...
Angular Material 7 - Form Field
The <mat-form-field>, an Angular Directive, is used to create a wrapper over angular components and is used to apply text styles like underline, bold, hints etc. Following angular component can be used within <mat-form-field>. <input matNativeControl> <input matNativeControl> <textarea matNativeControl> <textarea matN...
[ { "code": null, "e": 2918, "s": 2755, "text": "The <mat-form-field>, an Angular Directive, is used to create a wrapper over angular components and is used to apply text styles like underline, bold, hints etc. " }, { "code": null, "e": 2983, "s": 2918, "text": "Following angular c...
Android - Audio Manager
You can easily control your ringer volume and ringer profile i-e:(silent,vibrate,loud e.t.c) in android. Android provides AudioManager class that provides access to these controls. In order to use AndroidManager class, you have to first create an object of AudioManager class by calling the getSystemService() method. It...
[ { "code": null, "e": 3788, "s": 3607, "text": "You can easily control your ringer volume and ringer profile i-e:(silent,vibrate,loud e.t.c) in android. Android provides AudioManager class that provides access to these controls." }, { "code": null, "e": 3952, "s": 3788, "text": "I...
Python break statement
It terminates the current loop and resumes execution at the next statement, just like the traditional break statement in C. The most common use for break is when some external condition is triggered requiring a hasty exit from a loop. The break statement can be used in both while and for loops. If you are using nested ...
[ { "code": null, "e": 2368, "s": 2244, "text": "It terminates the current loop and resumes execution at the next statement, just like the traditional break statement in C." }, { "code": null, "e": 2540, "s": 2368, "text": "The most common use for break is when some external condit...
C++ Program For Reversing A Linked List In Groups Of Given Size - Set 1 - GeeksforGeeks
16 Dec, 2021 Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Example: Input: 1->2->3->4->5->6->7->8->NULL, K = 3 Output: 3->2->1->6->5->4->8->7->NULL Input: 1->2->3->4->5->6->7->8->NULL, K = 5 Output: 5->4->3->2->1->8->7->6->NULL Algorithm: reverse(head, k) Reve...
[ { "code": null, "e": 23785, "s": 23757, "text": "\n16 Dec, 2021" }, { "code": null, "e": 23888, "s": 23785, "text": "Given a linked list, write a function to reverse every k nodes (where k is an input to the function). " }, { "code": null, "e": 23898, "s": 23888, ...
How to apply a 3×3 convolution matrix using imageconvolution() in PHP?
imageconvolution() is an inbuilt function in PHP that is used to apply a 3×3 convolution matrix, using the coefficient and offset in the image. bool imageconvolution ( $image, $matrix, $div, $offset) imageconvolution() takes four parameters: $image, $matrix, $div, and $offset. $image − This parameter is used to create ...
[ { "code": null, "e": 1206, "s": 1062, "text": "imageconvolution() is an inbuilt function in PHP that is used to apply a 3×3 convolution matrix, using the coefficient and offset in the image." }, { "code": null, "e": 1262, "s": 1206, "text": "bool imageconvolution ( $image, $matri...
ThreadPoolExecutor Class
java.util.concurrent.ThreadPoolExecutor is an ExecutorService to execute each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods. It also provides various utility methods to check current threads statistics and control them. protected void afterExecute(Runna...
[ { "code": null, "e": 2944, "s": 2657, "text": "java.util.concurrent.ThreadPoolExecutor is an ExecutorService to execute each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods. It also provides various utility methods to check current thr...
SymPy - Symbolic Computation
Symbolic computation refers to development of algorithms for manipulating mathematical expressions and other mathematical objects. Symbolic computation integrates mathematics with computer science to solve mathematical expressions using mathematical symbols. A Computer Algebra System (CAS) such as SymPy evaluates algeb...
[ { "code": null, "e": 2545, "s": 2019, "text": "Symbolic computation refers to development of algorithms for manipulating mathematical expressions and other mathematical objects. Symbolic computation integrates mathematics with computer science to solve mathematical expressions using mathematical sym...
Count rows based on condition in Pyspark Dataframe - GeeksforGeeks
29 Jun, 2021 In this article, we will discuss how to count rows based on conditions in Pyspark dataframe. For this, we are going to use these methods: Using where() function. Using filter() function. Creating Dataframe for demonstration: Python3 # importing moduleimport pyspark # importing sparksession from pyspark.sq...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n29 Jun, 2021" }, { "code": null, "e": 24385, "s": 24292, "text": "In this article, we will discuss how to count rows based on conditions in Pyspark dataframe." }, { "code": null, "e": 24430, "s": 24385, "text"...
PYGLET – Accessing Label Text Color Property - GeeksforGeeks
16 Jan, 2022 In this article we will see how we can access the label text color property in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia etc. A window is a “heavyweight” object occupying operating system resources. Windows may a...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n16 Jan, 2022" }, { "code": null, "e": 26326, "s": 25555, "text": "In this article we will see how we can access the label text color property in PYGLET module in python. Pyglet is easy to use but powerful library for developing v...
How to setup firewall in Linux? - GeeksforGeeks
12 Feb, 2019 What is a Firewall?Firewall is a network security system that filters and controls the traffic on a predetermined set of rules. This is an intermediary system between the device and the internet. NOTE:- If you already know about the working of Firewall in Linux and just want to know the Commands, then plea...
[ { "code": null, "e": 25783, "s": 25755, "text": "\n12 Feb, 2019" }, { "code": null, "e": 25979, "s": 25783, "text": "What is a Firewall?Firewall is a network security system that filters and controls the traffic on a predetermined set of rules. This is an intermediary system betw...
Accessing Grandparent’s member in Java using super - GeeksforGeeks
05 Feb, 2021 Directly accessing Grandparent’s member in Java: Predict the output of the following Java program. Java // filename Main.javaclass Grandparent { public void Print() { System.out.println("Grandparent's Print()"); }} class Parent extends Grandparent { public void Print() { System...
[ { "code": null, "e": 25797, "s": 25769, "text": "\n05 Feb, 2021" }, { "code": null, "e": 25846, "s": 25797, "text": "Directly accessing Grandparent’s member in Java:" }, { "code": null, "e": 25896, "s": 25846, "text": "Predict the output of the following Java ...
Double Order Traversal of a Binary Tree - GeeksforGeeks
11 Oct, 2021 Given a Binary Tree consisting of N nodes, the task is to print its Double Order Traversal. Double Order Traversal is a tree traversal technique in which every node is traversed twice in the following order: Visit the Node. Traverse the Left Subtree. Visit the Node. Traverse the Right Subtree. Examples: I...
[ { "code": null, "e": 26273, "s": 26245, "text": "\n11 Oct, 2021" }, { "code": null, "e": 26365, "s": 26273, "text": "Given a Binary Tree consisting of N nodes, the task is to print its Double Order Traversal." }, { "code": null, "e": 26482, "s": 26365, "text":...
DateTime.GetDateTimeFormats() Method in C# | Set - 1 - GeeksforGeeks
30 Jan, 2019 This method is used to convert the value of this instance to all the string representations supported by the standard date and time format specifiers. There are total 4 methods in the overload list of this method: GetDateTimeFormats() GetDateTimeFormats(Char) GetDateTimeFormats(IFormatProvider) GetDateTime...
[ { "code": null, "e": 25699, "s": 25671, "text": "\n30 Jan, 2019" }, { "code": null, "e": 25913, "s": 25699, "text": "This method is used to convert the value of this instance to all the string representations supported by the standard date and time format specifiers. There are to...
Escaping XML Special Characters in Java String - GeeksforGeeks
22 Feb, 2021 When we read an XML file and try writing to another XML file it is important for us to take care of special characters in the XML. There are some reserved characters in Java that need to be transformed or escaped to be considered as a string literal. If we don’t escape these special characters then parsers...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n22 Feb, 2021" }, { "code": null, "e": 25802, "s": 25225, "text": "When we read an XML file and try writing to another XML file it is important for us to take care of special characters in the XML. There are some reserved characte...
Scala Map filterKeys() method with example - GeeksforGeeks
13 Aug, 2019 The filterKeys() method is utilized to find all the pairs where the keys satisfies the given predicate. Method Definition: def filterKeys(p: (A) => Boolean): Map[A, B] Return Type: It returns all the “key-value” pairs of the map where, the keys satisfies the given predicate. Example #1: // Scala program of...
[ { "code": null, "e": 25257, "s": 25229, "text": "\n13 Aug, 2019" }, { "code": null, "e": 25361, "s": 25257, "text": "The filterKeys() method is utilized to find all the pairs where the keys satisfies the given predicate." }, { "code": null, "e": 25425, "s": 25361,...
Python Program for Cycle Sort - GeeksforGeeks
20 Apr, 2022 Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array. It is optimal in terms of number of memory writes. It minimizes the number of memory writes to sort (Each value is either wr...
[ { "code": null, "e": 26201, "s": 26173, "text": "\n20 Apr, 2022" }, { "code": null, "e": 26384, "s": 26201, "text": "Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to ...
CSS border-color Property - GeeksforGeeks
03 Nov, 2021 The border-color property is used to add color to the border of an element. The border-color property will only work when the border-style property is defined first, which is used to set the borders. This property will not work alone. This can take one to four values for the top border, right border, botto...
[ { "code": null, "e": 24939, "s": 24911, "text": "\n03 Nov, 2021" }, { "code": null, "e": 25357, "s": 24939, "text": "The border-color property is used to add color to the border of an element. The border-color property will only work when the border-style property is defined firs...
How to remove portion of a string after certain character in JavaScript ? - GeeksforGeeks
29 May, 2019 Given a URL and the task is to remove a portion of URL after a certain character using JavaScript. split() method: This method is used to split a string into an array of substrings, and returns the new array.Syntax:string.split(separator, limit)Parameters:separator: It is optional parameter. It specifies t...
[ { "code": null, "e": 26299, "s": 26271, "text": "\n29 May, 2019" }, { "code": null, "e": 26398, "s": 26299, "text": "Given a URL and the task is to remove a portion of URL after a certain character using JavaScript." }, { "code": null, "e": 26975, "s": 26398, ...
Remove Objects from Memory in R Programming - rm() Function - GeeksforGeeks
19 Jun, 2020 rm() function in R Language is used to delete objects from the memory. It can be used with ls() function to delete all objects. remove() function is also similar to rm() function. Syntax: rm(x) Parameters:x: Object name Example 1: # R Program to remove # objects from Memory # Creating a vectorvec <- c(1, ...
[ { "code": null, "e": 26274, "s": 26246, "text": "\n19 Jun, 2020" }, { "code": null, "e": 26454, "s": 26274, "text": "rm() function in R Language is used to delete objects from the memory. It can be used with ls() function to delete all objects. remove() function is also similar t...
Check whether a given Binary Tree is Complete or not | Set 1 (Iterative Solution) - GeeksforGeeks
10 May, 2022 Given a Binary Tree, write a function to check whether the given Binary Tree is Complete Binary Tree or not.A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. See the following examples. The following tree...
[ { "code": null, "e": 26505, "s": 26477, "text": "\n10 May, 2022" }, { "code": null, "e": 26794, "s": 26505, "text": "Given a Binary Tree, write a function to check whether the given Binary Tree is Complete Binary Tree or not.A complete binary tree is a binary tree in which every ...
ReactJS getDerivedStateFromError() Method - GeeksforGeeks
16 Oct, 2021 The getDerivedStateFromError() method is invoked if some error occurs during the rendering phase of any lifecycle methods or any children components. This method is used to implement the Error Boundaries for the React application. It is called during the render phase, so side-effects are not permitted in t...
[ { "code": null, "e": 26169, "s": 26141, "text": "\n16 Oct, 2021" }, { "code": null, "e": 26540, "s": 26169, "text": "The getDerivedStateFromError() method is invoked if some error occurs during the rendering phase of any lifecycle methods or any children components. This method i...
Detecting COVID-19 From Chest X-Ray Images using CNN - GeeksforGeeks
15 Feb, 2022 A Django Based Web Application built for the purpose of detecting the presence of COVID-19 from Chest X-Ray images with multiple machine learning models trained on pre-built architectures. Three different machine learning models were used to build this project namely Xception, ResNet50, and VGG16. The Deep...
[ { "code": null, "e": 25615, "s": 25587, "text": "\n15 Feb, 2022" }, { "code": null, "e": 26164, "s": 25615, "text": "A Django Based Web Application built for the purpose of detecting the presence of COVID-19 from Chest X-Ray images with multiple machine learning models trained on...
How to merge lists in Scala - GeeksforGeeks
13 Jul, 2021 A list is a collection which contains immutable data. List represents linked list in Scala. The Scala List class holds a sequenced, linear list of items. Lists are immutable and represents a linked list.Syntax of List: val variable_name: List[type] = List(item1, item2, item3) or val variable_name = List(...
[ { "code": null, "e": 25205, "s": 25177, "text": "\n13 Jul, 2021" }, { "code": null, "e": 25426, "s": 25205, "text": "A list is a collection which contains immutable data. List represents linked list in Scala. The Scala List class holds a sequenced, linear list of items. Lists are...
How I got Matplotlib to plot Apple Color Emojis | by Brienna Herold | Towards Data Science
If you try to plot emojis, you might see something like this: Although we explicitly specified it as the font, these emojis are not Apple Color Emoji. They are from the font DejaVu Sans, the default font that took over after Matplotlib failed to process our specified font, throwing the following error: RuntimeError: In...
[ { "code": null, "e": 234, "s": 172, "text": "If you try to plot emojis, you might see something like this:" }, { "code": null, "e": 476, "s": 234, "text": "Although we explicitly specified it as the font, these emojis are not Apple Color Emoji. They are from the font DejaVu Sans,...
How to determine if running on a rooted device or not in Android?
In some cases, we should not allow application should run on rooted devices for payment gateways. This example demonstrates how to determine if running on a rooted device or not. 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...
[ { "code": null, "e": 1241, "s": 1062, "text": "In some cases, we should not allow application should run on rooted devices for payment gateways. This example demonstrates how to determine if running on a rooted device or not." }, { "code": null, "e": 1370, "s": 1241, "text": "Ste...
How to get Wi-Fi connected state in android?
This example demonstrates How to get Wi-Fi connected state in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "utf-8"?> <LinearLayou...
[ { "code": null, "e": 1133, "s": 1062, "text": "This example demonstrates How to get Wi-Fi connected state in android." }, { "code": null, "e": 1262, "s": 1133, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to crea...
Java NIO - Path
As name suggests Path is the particular location of an entity such as file or a directory in a file system so that one can search and access it at that particular location. Technically in terms of Java, Path is an interface which is introduced in Java NIO file package during Java version 7,and is the representation of ...
[ { "code": null, "e": 2157, "s": 1984, "text": "As name suggests Path is the particular location of an entity such as file or a directory in a file system so that one can search and access it at that particular location." }, { "code": null, "e": 2432, "s": 2157, "text": "Technical...
Counting number of elements in an array in Julia - count() Method - GeeksforGeeks
26 Mar, 2020 The count() is an inbuilt function in julia which is used to count the number of elements in the specified array for which the given predicate p returns true and if p is omitted, counts the number of true elements in the given collection of boolean values. Syntax:count(p, itr)orcount(itr) Parameters: p: Sp...
[ { "code": null, "e": 24180, "s": 24152, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24437, "s": 24180, "text": "The count() is an inbuilt function in julia which is used to count the number of elements in the specified array for which the given predicate p returns true and i...
Java Math cos() method with Examples - GeeksforGeeks
06 Apr, 2018 The java.lang.Math.cos() returns the trigonometric cosine of an angle. If the argument is NaN or an infinity, then the result returned is NaN. The returned value will be in range [-1, 1]. Syntax : public static double cos(double angle) Parameters: The function has one mandatory parameter angle which is in ...
[ { "code": null, "e": 24522, "s": 24494, "text": "\n06 Apr, 2018" }, { "code": null, "e": 24710, "s": 24522, "text": "The java.lang.Math.cos() returns the trigonometric cosine of an angle. If the argument is NaN or an infinity, then the result returned is NaN. The returned value w...
Building a Dice Game using JavaScript - GeeksforGeeks
11 May, 2020 We will be building a Dice Game Project using HTML, CSS, and JavaScript. The Dice Game is based on a two-player. Both players roll the dice and the player who gets the highest phase value will win the game. Images of Dice Phases: The list of dice phases images are given below. Save all the images in a fold...
[ { "code": null, "e": 24958, "s": 24930, "text": "\n11 May, 2020" }, { "code": null, "e": 25165, "s": 24958, "text": "We will be building a Dice Game Project using HTML, CSS, and JavaScript. The Dice Game is based on a two-player. Both players roll the dice and the player who gets...
AIML - <random> Tag
<random> Tag is used to get random responses. This tag enables AIML to respond differently for the same input. <random> tag is used along with <li> tags. <li> tags carry different responses that are to be delivered to the user on a random basis. <random> <li> pattern1 </li> <li> pattern2 </li> ... <li> patt...
[ { "code": null, "e": 2057, "s": 1811, "text": "<random> Tag is used to get random responses. This tag enables AIML to respond differently for the same input. <random> tag is used along with <li> tags. <li> tags carry different responses that are to be delivered to the user on a random basis." }, ...