title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Count number of sub-sequences with GCD 1 - GeeksforGeeks
25 Nov, 2021 Given an array of N numbers, the task is to count the number of subsequences that have gcd equal to 1. Examples: Input: a[] = {3, 4, 8, 16} Output: 7 The subsequences are: {3, 4}, {3, 8}, {3, 16}, {3, 4, 8}, {3, 4, 16}, {3, 8, 16}, {3, 4, 8, 16} Input: a[] = {1, 2, 4} Output: 4 A simple solution is t...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n25 Nov, 2021" }, { "code": null, "e": 26169, "s": 26065, "text": "Given an array of N numbers, the task is to count the number of subsequences that have gcd equal to 1. " }, { "code": null, "e": 26180, "s": 26169,...
Matcher pattern() method in Java with Examples - GeeksforGeeks
26 Nov, 2018 The pattern() method of Matcher Class is used to get the pattern to be matched by this matcher. Syntax: public Pattern pattern() Parameters: This method do not accepts any parameter. Return Value: This method returns a Pattern which is the pattern to be matched by this Matcher. Below examples illustrate t...
[ { "code": null, "e": 26261, "s": 26233, "text": "\n26 Nov, 2018" }, { "code": null, "e": 26357, "s": 26261, "text": "The pattern() method of Matcher Class is used to get the pattern to be matched by this matcher." }, { "code": null, "e": 26365, "s": 26357, "te...
Python - Alternate Strings Concatenation - GeeksforGeeks
27 Feb, 2020 The problem of getting concatenation of a list is quite generic and we might some day face the issue of getting the concatenation of alternate elements and get the list of 2 elements containing concatenation of alternate elements. Let’s discuss certain ways in which this can be performed. Method #1 : Using...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n27 Feb, 2020" }, { "code": null, "e": 25827, "s": 25537, "text": "The problem of getting concatenation of a list is quite generic and we might some day face the issue of getting the concatenation of alternate elements and get the...
Creating Custom SeekBar in Android - GeeksforGeeks
12 Dec, 2021 SeekBar can be understood as an extension of ProgressBar in Android. You have to just drag the thumb on SeekBar and drag it towards the backward or forward direction and store the current value of progress changed. SeekBar is widely used in different applications ex – Audio player Video Player etc. You can...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n12 Dec, 2021" }, { "code": null, "e": 27124, "s": 26407, "text": "SeekBar can be understood as an extension of ProgressBar in Android. You have to just drag the thumb on SeekBar and drag it towards the backward or forward directi...
Formatting Dates in Python - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws Hi everyone, In this tutorial, we will learn ...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
How to check if the Azure resource group is empty or not using PowerShell?
To check if the resource group is empty or not we need to check if the resource group contains any resources. For this example, We have a resource group name called the TestRG and we need to check if it is empty. $resources = Get-AzResource -ResourceGroupName TestRG if($resources){"Resource group is not empty"} else{"...
[ { "code": null, "e": 1172, "s": 1062, "text": "To check if the resource group is empty or not we need to check if the resource group contains any resources." }, { "code": null, "e": 1276, "s": 1172, "text": "For this example, We have a resource group name called the TestRG and w...
Connection Between Logistic Regression & Naive Bayes | Towards Data Science
Both Naive Bayes and Logistic Regression are quite commonly used classifiers and in this post, we will try to find and understand the connection between these classifiers. We will also go through an example using Palmer Penguin Dataset which is available under CC-0 license. What you can expect to learn from this post? ...
[ { "code": null, "e": 492, "s": 172, "text": "Both Naive Bayes and Logistic Regression are quite commonly used classifiers and in this post, we will try to find and understand the connection between these classifiers. We will also go through an example using Palmer Penguin Dataset which is available ...
How can we use SIGNAL statement with MySQL triggers?
Actually, MySQL SIGNAL statement is an error handling mechanism for handling unexpected occurrences and a graceful exit from the application if need to be. Basically, it provides error information to the handler. Its basic syntax would be as follows − SIGNAL SQLSTATE | condition_value [SET signal_information_item = val...
[ { "code": null, "e": 1314, "s": 1062, "text": "Actually, MySQL SIGNAL statement is an error handling mechanism for handling unexpected occurrences and a graceful exit from the application if need to be. Basically, it provides error information to the handler. Its basic syntax would be as follows −" ...
Set the width and margin of the modal with Bootstrap
Use the .modal-dialog class in Bootstrap to set the width and margin of the modal. You can try to run the following code to implement .modal-dialog class − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3...
[ { "code": null, "e": 1145, "s": 1062, "text": "Use the .modal-dialog class in Bootstrap to set the width and margin of the modal." }, { "code": null, "e": 1218, "s": 1145, "text": "You can try to run the following code to implement .modal-dialog class −" }, { "code": null...
C++ Variable Types
A variable provides us with named storage that our programs can manipulate. Each variable in C++ has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. The name of a var...
[ { "code": null, "e": 2621, "s": 2318, "text": "A variable provides us with named storage that our programs can manipulate. Each variable in C++ has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set o...
\ddot - Tex Command
\ddot - Used to draw double dot accent over the argument. { \ddot #1 } \ddot command draws double dot accent over the argument. \ddot x x ̈ \ddot x x ̈ \ddot x 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lectures 1 hours Emenwa Global, Ejike Ifeanyi...
[ { "code": null, "e": 8044, "s": 7986, "text": "\\ddot - Used to draw double dot accent over the argument." }, { "code": null, "e": 8057, "s": 8044, "text": "{ \\ddot #1 }" }, { "code": null, "e": 8114, "s": 8057, "text": "\\ddot command draws double dot accent...
Convert Binary Number in a Linked List to Integer in C++
Suppose we have one ‘head’ which is a reference node to a singly-linked list. The value of each node present in the linked list is either 0 or 1. This linked list stores the binary representation of a number. We have to return the decimal value of the number present in the linked list. So if the list is like [1,0,1,1,0...
[ { "code": null, "e": 1386, "s": 1062, "text": "Suppose we have one ‘head’ which is a reference node to a singly-linked list. The value of each node present in the linked list is either 0 or 1. This linked list stores the binary representation of a number. We have to return the decimal value of the n...
Initialize a window as maximized in Tkinter Python
Tkinter creates a default window with its default size while initializing the application. We can customize the geometry of the window using the geometry method. However, in order to maximize the window, we can use the state() method which can be used for scaling the tkinter window. It maximizes the window after passin...
[ { "code": null, "e": 1224, "s": 1062, "text": "Tkinter creates a default window with its default size while initializing the application. We can customize the geometry of the window using the geometry method." }, { "code": null, "e": 1416, "s": 1224, "text": "However, in order to...
Difference between 'and' and '&' in Python - GeeksforGeeks
25 Jan, 2021 and is a Logical AND that returns True if both the operands are true whereas ‘&’ is a bitwise operator in Python that acts on bits and performs bit by bit operation. Note: When an integer value is 0, it is considered as False otherwise True when using logically. Example: # Python program to demonstrate # t...
[ { "code": null, "e": 24140, "s": 24112, "text": "\n25 Jan, 2021" }, { "code": null, "e": 24306, "s": 24140, "text": "and is a Logical AND that returns True if both the operands are true whereas ‘&’ is a bitwise operator in Python that acts on bits and performs bit by bit operatio...
Koko Eating Bananas in C++
Suppose we have N piles of bananas, the i-th pile has piles[i] bananas. Here the guards have gone and will come back in H hours. Koko can decide her bananas-per-hour eating speed is K. Each hour, she takes some pile of bananas, and eats K bananas from that pile. If the pile has less than K bananas, then she consumes al...
[ { "code": null, "e": 1655, "s": 1062, "text": "Suppose we have N piles of bananas, the i-th pile has piles[i] bananas. Here the guards have gone and will come back in H hours. Koko can decide her bananas-per-hour eating speed is K. Each hour, she takes some pile of bananas, and eats K bananas from t...
How to set background color of an android activity to yellow Programatically?
This example demonstrates how do I set background color of an android activity to yellow programmatically. 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. <RelativeLayout ...
[ { "code": null, "e": 1169, "s": 1062, "text": "This example demonstrates how do I set background color of an android activity to yellow programmatically." }, { "code": null, "e": 1298, "s": 1169, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project a...
How to Speed Up Android Studio? - GeeksforGeeks
30 Nov, 2021 A slow Android Studio is a pain in the butt for an android developer. Developing an application with a slow IDE is not a cakewalk. It’s also annoying that when you are focusing on the logic building for your app, and you got a kick to work and at that time your android studio suddenly starts lagging. You w...
[ { "code": null, "e": 25140, "s": 25112, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25881, "s": 25140, "text": "A slow Android Studio is a pain in the butt for an android developer. Developing an application with a slow IDE is not a cakewalk. It’s also annoying that when you...
What are the high level I/O functions in C language?
I/O refers to the input - output functions in C language. These are easily understood by human beings The advantage is portability. These are easily understood by computer. The advantage is that execution time is less. The disadvantage is that Non portability. The high level input - output (I/O) functions are explained...
[ { "code": null, "e": 1120, "s": 1062, "text": "I/O refers to the input - output functions in C language." }, { "code": null, "e": 1164, "s": 1120, "text": "These are easily understood by human beings" }, { "code": null, "e": 1194, "s": 1164, "text": "The advan...
How to make a background 20% transparent on Android
If you want to give transparent background for your view, This example demonstrate about How to make a background 20% transparent on Android. All hex value from 100% to 0% alpha 100% — FF 99% — FC 98% — FA 97% — F7 96% — F5 95% — F2 94% — F0 93% — ED 92% — EB 91% — E8 90% — E6 89% — E3 88% — E0 87% — DE 86% — DB 85% — ...
[ { "code": null, "e": 1204, "s": 1062, "text": "If you want to give transparent background for your view, This example demonstrate about How to make a background 20% transparent on Android." }, { "code": null, "e": 1240, "s": 1204, "text": "All hex value from 100% to 0% alpha" }...
Segmenting Credit Card Customers with Machine Learning | by Rebecca Vickery | Towards Data Science
Segmentation in marketing is a technique used to divide customers or other entities into groups based on attributes such as behaviour or demographics. It is useful to identify segments of customers who may respond in a similar way to specific marketing techniques such as email subject lines or display advertisements. A...
[ { "code": null, "e": 643, "s": 172, "text": "Segmentation in marketing is a technique used to divide customers or other entities into groups based on attributes such as behaviour or demographics. It is useful to identify segments of customers who may respond in a similar way to specific marketing te...
Find indices of all occurrence of one string in other - GeeksforGeeks
28 May, 2021 Given two strings, str1 and str2, the task is to print the indices(Consider, indices starting from 0) of the occurrence of str2 in str1. If no such index occurs, print “NONE”. Examples: Input : GeeksforGeeks Geeks Output : 0 8 Input : GFG g Output : NONE A simple solution is to check all s...
[ { "code": null, "e": 24124, "s": 24096, "text": "\n28 May, 2021" }, { "code": null, "e": 24300, "s": 24124, "text": "Given two strings, str1 and str2, the task is to print the indices(Consider, indices starting from 0) of the occurrence of str2 in str1. If no such index occurs, p...
Convert Pictures to ASCII Art. A brief guide on how images work and... | by Nicholas Obert | Towards Data Science
I’m sure many of you have heard of ASCII art, a graphic design technique that uses the printable ASCII character set to compose pictures. The simplest form of this art are emoticons such as :-) or :-3. But can you represent a more complex image with just printable ASCII characters? First of all, is important to clarify...
[ { "code": null, "e": 455, "s": 172, "text": "I’m sure many of you have heard of ASCII art, a graphic design technique that uses the printable ASCII character set to compose pictures. The simplest form of this art are emoticons such as :-) or :-3. But can you represent a more complex image with just ...
Swap two variables in one line in C/C+
Here is an example of swapping in C language, Live Demo #include <stdio.h> int main() { int a = 28, b = 8; a += b -= a = b - a; // method 1 printf("After Swapping : %d\t%d", a, b); (a ^= b), (b ^= a), (a ^= b); // method 2 printf("\nAfter Swapping again : %d\t%d", a, b); return 0; } After Swapping : ...
[ { "code": null, "e": 1108, "s": 1062, "text": "Here is an example of swapping in C language," }, { "code": null, "e": 1119, "s": 1108, "text": " Live Demo" }, { "code": null, "e": 1365, "s": 1119, "text": "#include <stdio.h>\nint main() {\n int a = 28, b = 8...
1[0]1 Pattern Count | Practice | GeeksforGeeks
Given a string S, your task is to find the number of patterns of form 1[0]1 where [0] represents any number of zeroes (minimum requirement is one 0) there should not be any other character except 0 in the [0] sequence. Example 1: Input: S = "100001abc101" Output: 2 Explanation: The two patterns are "100001" and "101"....
[ { "code": null, "e": 457, "s": 238, "text": "Given a string S, your task is to find the number of patterns of form 1[0]1 where [0] represents any number of zeroes (minimum requirement is one 0) there should not be any other character except 0 in the [0] sequence." }, { "code": null, "e":...
First Unique Character in a String in Python
Suppose we have a string and we have to find the first unique character in the string. So if the string is like “people”, the first letter whose occurrence is one is ‘o’. So the index will be returned, that is 2 here. If there is no such character, then return -1. To solve this, we will follow these steps − create one ...
[ { "code": null, "e": 1327, "s": 1062, "text": "Suppose we have a string and we have to find the first unique character in the string. So if the string is like “people”, the first letter whose occurrence is one is ‘o’. So the index will be returned, that is 2 here. If there is no such character, then...
C++ Program to Add Two Distances (in inch-feet) System Using Structures
A structure is a collection of items of different data types. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword. An example of a structure is as follows − struct DistanceFI { int feet; int inch; }; The above structure defines a d...
[ { "code": null, "e": 1260, "s": 1062, "text": "A structure is a collection of items of different data types. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword." }, { "code": null, "e": 1302, "s": 126...
Scala List sum() method with example - GeeksforGeeks
26 Jul, 2019 The sum() method is utilized to add all the elements of the stated list. Method Definition: def sum(num: math.Numeric[B]): B Return Type: It returns the sum of all the elements of the list. Example #1: // Scala program of sum()// method // Creating objectobject GfG{ // Main method def main(args:A...
[ { "code": null, "e": 23575, "s": 23547, "text": "\n26 Jul, 2019" }, { "code": null, "e": 23648, "s": 23575, "text": "The sum() method is utilized to add all the elements of the stated list." }, { "code": null, "e": 23700, "s": 23648, "text": "Method Definition...
WPF - Nesting of Layout
Nesting of layout means the use layout panel inside another layout, e.g. define stack panels inside a grid. This concept is widely used to take the advantages of multiple layouts in an application. In the following example, we will be using stack panels inside a grid. Let’s have a look at the following XAML code. <Wind...
[ { "code": null, "e": 2289, "s": 2020, "text": "Nesting of layout means the use layout panel inside another layout, e.g. define stack panels inside a grid. This concept is widely used to take the advantages of multiple layouts in an application. In the following example, we will be using stack panels...
Deploying a Deep Learning Model on Heroku using Flask and Python | by Soumya Gupta | Towards Data Science
In my last post, we have seen how to deploy a machine learning model on the web using Python and Flask(Link below) medium.com It was cool to make predictions via CLI, but then there were issues such as manually starting the server and the lack of a simple GUI(Graphical user interface). In this post, we will try to addr...
[ { "code": null, "e": 287, "s": 172, "text": "In my last post, we have seen how to deploy a machine learning model on the web using Python and Flask(Link below)" }, { "code": null, "e": 298, "s": 287, "text": "medium.com" }, { "code": null, "e": 459, "s": 298, ...
Git Reset
reset is the command we use when we want to move the repository back to a previous commit, discarding any changes made after that commit. Step 1: Find the previous commit: Step 2: Move the repository back to that step: After the previous chapter, we have a part in our commit history we could go back to. Let's try and d...
[ { "code": null, "e": 138, "s": 0, "text": "reset is the command we use when we want to move the repository back to a previous commit, discarding any changes made after that commit." }, { "code": null, "e": 172, "s": 138, "text": "Step 1: Find the previous commit:" }, { "c...
Create a transition effect on hover pagination with CSS
To create a transition effect on hover pagination, use the transition property. You can try to run the following code to add transition effect − Live Demo <!DOCTYPE html> <html> <head> <style> .demo { display: inline-block; } .demo a { color: red; ...
[ { "code": null, "e": 1142, "s": 1062, "text": "To create a transition effect on hover pagination, use the transition property." }, { "code": null, "e": 1207, "s": 1142, "text": "You can try to run the following code to add transition effect −" }, { "code": null, "e": ...
2 ways to Create ArrayList in Java - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we will see 2 ways to creat...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Explain the accessing of structure variable in C language
The structure is a user-defined data type, which is used to store a collection of different data types of data. The structure is similar to an array. The only difference is that an array is used to store the same data types whereas, the structure is used to store different data types. The keyword struct is for declarin...
[ { "code": null, "e": 1174, "s": 1062, "text": "The structure is a user-defined data type, which is used to store a collection of different data types of data." }, { "code": null, "e": 1348, "s": 1174, "text": "The structure is similar to an array. The only difference is that an a...
How to Create Circular ImageView in Android using CardView? - GeeksforGeeks
18 Feb, 2021 Displaying an Image in Android is done easily using ImageView., But what if one wants to display a circular image? It is seen that many Android apps use CircularImageView to show the profile images, status, stories, and many other things but doing this with a normal ImageView is a bit difficult. This artic...
[ { "code": null, "e": 24751, "s": 24723, "text": "\n18 Feb, 2021" }, { "code": null, "e": 25356, "s": 24751, "text": "Displaying an Image in Android is done easily using ImageView., But what if one wants to display a circular image? It is seen that many Android apps use CircularIm...
Python | Ways to convert list of ASCII value to string - GeeksforGeeks
29 Jun, 2019 Given a list of ASCII values, write a Python program to convert those values to their character and make a string. Given below are a few methods to solve the problem. Method #1: Using Naive Method # Python code to demonstrate # conversion of list of ascii values# to string # Initialising listini_list = [7...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n29 Jun, 2019" }, { "code": null, "e": 26232, "s": 26065, "text": "Given a list of ASCII values, write a Python program to convert those values to their character and make a string. Given below are a few methods to solve the probl...
How to limit the number of results returned from grep in Linux?
In order to be able to grep limit the number of results returned from grep command in Linux, we must first understand what a grep command is and how to use it on Linux. The grep command in Linux is used to filter searches in a file for a particular pattern of characters. It is one of the most used Linux utility command...
[ { "code": null, "e": 1231, "s": 1062, "text": "In order to be able to grep limit the number of results returned from grep command in Linux, we must first understand what a grep command is and how to use it on Linux." }, { "code": null, "e": 1460, "s": 1231, "text": "The grep comm...
Python - Get first element in List of tuples - GeeksforGeeks
23 Aug, 2021 In this article. we will discuss how to get the first element in the list of tuples in Python. Create a list of tuples and display them: Python3 # create tuples with college# id and name and store in a listdata=[(1,'sravan'), (2,'ojaswi'), (3,'bobby'), (4,'rohith'), (5,'gnanesh')] # display data...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n23 Aug, 2021" }, { "code": null, "e": 24307, "s": 24212, "text": "In this article. we will discuss how to get the first element in the list of tuples in Python." }, { "code": null, "e": 24349, "s": 24307, "tex...
Creating a dataframe using Excel files - GeeksforGeeks
16 Aug, 2021 Let’s see how to read excel files to Pandas dataframe objects using Pandas.Code #1 : Read an excel file using read_excel() method of pandas. Python3 # import pandas lib as pdimport pandas as pd # read by default 1st sheet of an excel filedataframe1 = pd.read_excel('SampleWork.xlsx') print(dataframe1) Out...
[ { "code": null, "e": 26321, "s": 26293, "text": "\n16 Aug, 2021" }, { "code": null, "e": 26464, "s": 26321, "text": "Let’s see how to read excel files to Pandas dataframe objects using Pandas.Code #1 : Read an excel file using read_excel() method of pandas. " }, { "code"...
Adding elements of an array until every element becomes greater than or equal to k - GeeksforGeeks
06 Jul, 2021 We are given a list of N unsorted elements, we need to find minimum number of steps in which the elements of the list can be added to make all the elements greater than or equal to K. We are allowed to add two elements together and make them one.Examples: Input : arr[] = {1 10 12 9 2 3} K = 6 O...
[ { "code": null, "e": 26559, "s": 26531, "text": "\n06 Jul, 2021" }, { "code": null, "e": 26817, "s": 26559, "text": "We are given a list of N unsorted elements, we need to find minimum number of steps in which the elements of the list can be added to make all the elements greater...
How to rotate only text in annotation in ggplot2? - GeeksforGeeks
03 Mar, 2021 R has ggplot2 which is a data visualization package for the statistical programming language R. After analyzing and plotting graphs, we can add an annotation in our graph by annotate() function. Syntax: annotate() Parameters: geom : specify text x : x axis location y : y axis location label : custom textua...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n03 Mar, 2021" }, { "code": null, "e": 26682, "s": 26487, "text": "R has ggplot2 which is a data visualization package for the statistical programming language R. After analyzing and plotting graphs, we can add an annotation in ou...
Find if array can be divided into two subarrays of equal sum
04 Jul, 2022 Given an array of integers, find if it’s possible to remove exactly one integer from the array that divides the array into two subarrays with the same sum. Examples: Input: arr = [6, 2, 3, 2, 1] Output: true Explanation: On removing element 2 at index 1, the array gets divided into two subarrays [6] a...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 208, "s": 52, "text": "Given an array of integers, find if it’s possible to remove exactly one integer from the array that divides the array into two subarrays with the same sum." }, { "cod...
Start and stop a thread in Python
12 Jun, 2019 The threading library can be used to execute any Python callable in its own thread. To do this, create a Thread instance and supply the callable that you wish to execute as a target as shown in the code given below – # Code to execute in an independent threadimport time def countdown(n): while n > 0: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Jun, 2019" }, { "code": null, "e": 245, "s": 28, "text": "The threading library can be used to execute any Python callable in its own thread. To do this, create a Thread instance and supply the callable that you wish to execute as a ...
Wand noise() function – Python
04 Oct, 2021 The noise() function is an inbuilt function in the Python Wand ImageMagick library which is used to add noise to the image. Syntax: noise(noise_type, attenuate, channel) Parameters: This function accepts three parameters as mentioned above and defined below: noise_type: This parameter is used to store th...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Oct, 2021" }, { "code": null, "e": 152, "s": 28, "text": "The noise() function is an inbuilt function in the Python Wand ImageMagick library which is used to add noise to the image." }, { "code": null, "e": 161, "s": ...
Underscore.js _.extend() Function
25 Nov, 2021 The _.extend() function is used to create a copy of all of the properties of the source objects over the destination object and return the destination object. The nested arrays or objects will be copied by using reference, not duplicated. Syntax: _.extend(destination, *sources) Parameters: This function ac...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Nov, 2021" }, { "code": null, "e": 267, "s": 28, "text": "The _.extend() function is used to create a copy of all of the properties of the source objects over the destination object and return the destination object. The nested array...
Stream mapToLong() in Java with examples
06 Dec, 2018 Stream mapToLong(ToLongFunction mapper) returns a LongStream consisting of the results of applying the given function to the elements of this stream. Stream mapToLong(ToLongFunction mapper) is an intermediate operation. These operations are always lazy. Intermediate operations are invoked on a Stream insta...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2018" }, { "code": null, "e": 178, "s": 28, "text": "Stream mapToLong(ToLongFunction mapper) returns a LongStream consisting of the results of applying the given function to the elements of this stream." }, { "code": nul...
How to List All Tables in a Schema in Oracle Database?
06 Jul, 2022 Prerequisite: Create Database in MS SQL Server There are multiple ways to list all the tables present in a Schema in Oracle SQL. Such ways are depicted in the below article. For this article, we will be using the Microsoft SQL Server as our database. Method 1: This method lists all the information regardi...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jul, 2022" }, { "code": null, "e": 75, "s": 28, "text": "Prerequisite: Create Database in MS SQL Server" }, { "code": null, "e": 280, "s": 75, "text": "There are multiple ways to list all the tables present in a S...
Python Regex | Program to accept string ending with alphanumeric character
10 Jun, 2021 Prerequisite: Regular expression in PythonGiven a string, write a Python program to check whether the given string is ending with only alphanumeric character or Not.Examples: Input: ankitrai326 Output: Accept Input: ankirai@ Output: Discard In this program, we are using search() method of re module. re....
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jun, 2021" }, { "code": null, "e": 205, "s": 28, "text": "Prerequisite: Regular expression in PythonGiven a string, write a Python program to check whether the given string is ending with only alphanumeric character or Not.Examples: ...
How to Create Background Service in Android?
Before getting into example, we should know what service is in android. Service is going to do back ground operation without interact with UI and it works even after activity destroy. This example demonstrate about how to Create Background Service in Android. Step 1 − Create a new project in Android Studio, go to File ...
[ { "code": null, "e": 1371, "s": 1187, "text": "Before getting into example, we should know what service is in android. Service is going to do back ground operation without interact with UI and it works even after activity destroy." }, { "code": null, "e": 1447, "s": 1371, "text":...
sympy.stats.Weibull() in Python
08 Jun, 2020 With the help of sympy.stats.Weibull() method, we can get the continuous random variable which represents the Weibull distribution. Syntax : sympy.stats.Weibull(name, alpha, beta)Where, alpha and beta are real number. Return : Return the continuous random variable. Example #1 :In this example we can see th...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 160, "s": 28, "text": "With the help of sympy.stats.Weibull() method, we can get the continuous random variable which represents the Weibull distribution." }, { "code": null, "e": 246, ...
shutdown command in Linux with Examples
27 May, 2019 The shutdown command in Linux is used to shutdown the system in a safe way. You can shutdown the machine immediately, or schedule a shutdown using 24 hour format.It brings the system down in a secure way. When the shutdown is initiated, all logged-in users and processes are notified that the system is goin...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2019" }, { "code": null, "e": 422, "s": 28, "text": "The shutdown command in Linux is used to shutdown the system in a safe way. You can shutdown the machine immediately, or schedule a shutdown using 24 hour format.It brings the...
Express.js | app.put() Function
10 Jun, 2020 The app.put() function routes the HTTP PUT requests to the specified path with the specified callback functions. Syntax: app.put(path, callback [, callback ...]) Arguments: Path: The path for which the middleware function is invoked and can be any of:A string representing a path.A path pattern.A regular ex...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jun, 2020" }, { "code": null, "e": 141, "s": 28, "text": "The app.put() function routes the HTTP PUT requests to the specified path with the specified callback functions." }, { "code": null, "e": 149, "s": 141, "t...
Optimal Page Replacement Algorithm
07 May, 2022 Prerequisite: Page Replacement Algorithms In operating systems, whenever a new page is referred and not present in memory, page fault occurs and Operating System replaces one of the existing pages with newly needed page. Different page replacement algorithms suggest different ways to decide which page to r...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 May, 2022" }, { "code": null, "e": 96, "s": 54, "text": "Prerequisite: Page Replacement Algorithms" }, { "code": null, "e": 550, "s": 96, "text": "In operating systems, whenever a new page is referred and not pre...
Output of Java program | Set 23 (Inheritance)
05 May, 2022 Prerequisite: Inheritance in Java 1) What is the output of the following program? Java public class A extends B{ public static String sing() { return "fa"; } public static void main(String[] args) { A a = new A(); B b = new A(); System.out.println(a.sing() + " " + b...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 May, 2022" }, { "code": null, "e": 87, "s": 52, "text": "Prerequisite: Inheritance in Java " }, { "code": null, "e": 136, "s": 87, "text": "1) What is the output of the following program? " }, { "code": n...
ConcurrentModificationException while using Iterator in Java
21 Apr, 2021 ConcurrentModificationException has thrown by methods that have detected concurrent modification of an object when such modification is not permissible. If a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this ConcurrentMod...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2021" }, { "code": null, "e": 573, "s": 28, "text": "ConcurrentModificationException has thrown by methods that have detected concurrent modification of an object when such modification is not permissible. If a thread modifies a...
Image Segmentation By Clustering
18 Jul, 2021 Segmentation By clustering It is a method to perform Image Segmentation of pixel-wise segmentation. In this type of segmentation, we try to cluster the pixels that are together. There are two approaches for performing the Segmentation by clustering. Clustering by Merging Clustering by Divisive Clustering b...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2021" }, { "code": null, "e": 55, "s": 28, "text": "Segmentation By clustering" }, { "code": null, "e": 278, "s": 55, "text": "It is a method to perform Image Segmentation of pixel-wise segmentation. In this ...
turtle.register_shape() function in Python
28 Jul, 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 function is used to add a turtle shape to TurtleScreen’s shapelist. Syntax : turtle.r...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 245, "s": 28, "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 ver...
Fn Graph — Lightweight pipelines in Python | by James | Towards Data Science
Today we are releasing our new Python modelling pipeline (or function graph) library fn_graph. We have been building and operationalising various types of computational models for the last decade, whether they be machine learning models, financial models or general data pipelines. This library is the result of all our ...
[ { "code": null, "e": 517, "s": 172, "text": "Today we are releasing our new Python modelling pipeline (or function graph) library fn_graph. We have been building and operationalising various types of computational models for the last decade, whether they be machine learning models, financial models ...
Solving your first linear program in Python | by Bhaskar Agarwal | Towards Data Science
You might have come across the term 'linear programming' at some point in data science or research. I will try to explain what it is and how one can implement a linear program in Python. A linear program finds an optimum solution for a problem where the variables are subject to numerous linear relationships. Furthermor...
[ { "code": null, "e": 358, "s": 171, "text": "You might have come across the term 'linear programming' at some point in data science or research. I will try to explain what it is and how one can implement a linear program in Python." }, { "code": null, "e": 637, "s": 358, "text": ...
Principal Component Analysis (PCA) 101, using R | by Peter Nistrup | Towards Data Science
Improving predictability and classification one dimension at a time! “Visualize” 30 dimensions using a 2D-plot! Make sure to follow my profile if you enjoy this article and want to see more! For this article we’ll be using the Breast Cancer Wisconsin data set from the UCI Machine learning repo as our data. Go ahead and...
[ { "code": null, "e": 284, "s": 172, "text": "Improving predictability and classification one dimension at a time! “Visualize” 30 dimensions using a 2D-plot!" }, { "code": null, "e": 363, "s": 284, "text": "Make sure to follow my profile if you enjoy this article and want to see m...
Convex Polygon in C++
Suppose we have a list of points that form a polygon when joined sequentially, we have to find if this polygon is convex (Convex polygon definition). We have to keep in mind that there are at least 3 and at most 10,000 points. And the coordinates are in the range -10,000 to 10,000. We can assume the polygon formed by g...
[ { "code": null, "e": 1345, "s": 1062, "text": "Suppose we have a list of points that form a polygon when joined sequentially, we have to find if this polygon is convex (Convex polygon definition). We have to keep in mind that there are at least 3 and at most 10,000 points. And the coordinates are in...
Java program to print all distinct elements of a given integer array in Java
All distinct elements of an array are printed i.e. all the elements in the array are printed only once and duplicate elements are not printed. An example of this is given as follows. Array = 1 5 9 1 4 9 6 5 9 7 Distinct elements of above array = 1 5 9 4 6 7 A program that demonstrates this is given as follows. Live De...
[ { "code": null, "e": 1245, "s": 1062, "text": "All distinct elements of an array are printed i.e. all the elements in the array are printed only once and duplicate elements are not printed. An example of this is given as follows." }, { "code": null, "e": 1320, "s": 1245, "text": ...
Bootstrap - Panels
This chapter will discuss about Bootstrap panels. Panel components are used when you want to put your DOM component in a box. To get a basic panel, just add class .panel to the <div> element. Also add class .panel-default to this element as shown in the following example − <div class = "panel panel-default"> <div cl...
[ { "code": null, "e": 3605, "s": 3331, "text": "This chapter will discuss about Bootstrap panels. Panel components are used when you want to put your DOM component in a box. To get a basic panel, just add class .panel to the <div> element. Also add class .panel-default to this element as shown in the...
How to write partial title of X-axis in italics using ggplot2 of R?
Of course, writing axes titles help viewers to understand the plot in a better way because they add more information to the plot. In general, the axes titles have simple font but we can change partial or complete title to italics to get the viewers attraction. This is needed when we want to highlight the title by makin...
[ { "code": null, "e": 1446, "s": 1062, "text": "Of course, writing axes titles help viewers to understand the plot in a better way because they add more information to the plot. In general, the axes titles have simple font but we can change partial or complete title to italics to get the viewers attr...
Gale–Shapley algorithm simply explained | by Alexander Osipenko | Towards Data Science
From this article, you will learn about stable pairing or stable marriage problem. You will learn how to solve that problem using Game Theory and the Gale-Shapley algorithm in particular. We will use Python to create our own solution using theorem from the original paper from 1962. In the real world, there are cases wh...
[ { "code": null, "e": 455, "s": 172, "text": "From this article, you will learn about stable pairing or stable marriage problem. You will learn how to solve that problem using Game Theory and the Gale-Shapley algorithm in particular. We will use Python to create our own solution using theorem from th...
Bulma | Card - GeeksforGeeks
23 Jun, 2020 Bulma is a free and open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design. A Card is a flexible component that can be composed of the content needed. It includes several other components ...
[ { "code": null, "e": 26108, "s": 26080, "text": "\n23 Jun, 2020" }, { "code": null, "e": 26303, "s": 26108, "text": "Bulma is a free and open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses c...
Lateral Keyword in SQL - GeeksforGeeks
04 Oct, 2021 The lateral keyword represents a lateral join between two or more tables. It joins the output of the outer query with the output of the underlying lateral subquery. It is like a for-each loop in SQL where the subquery iterates through each row of the concerned table, evaluating the subquery for each row. ...
[ { "code": null, "e": 24328, "s": 24300, "text": "\n04 Oct, 2021" }, { "code": null, "e": 24635, "s": 24328, "text": "The lateral keyword represents a lateral join between two or more tables. It joins the output of the outer query with the output of the underlying lateral subquery...
Aggregation in LINQ
Performs any type of desired aggregation and allows creating custom aggregations in LINQ. Module Module1 Sub Main() Dim num As Integer() = {1, 2, 3, 4, 5, 6, 7, 8, 9} Dim intDivByTwo = Aggregate n In num Where n > 6 Into Count() Console.WriteLine(...
[ { "code": null, "e": 1826, "s": 1736, "text": "Performs any type of desired aggregation and allows creating custom aggregations in LINQ." }, { "code": null, "e": 2886, "s": 1826, "text": "Module Module1\n\n Sub Main()\n \n Dim num As Integer() = {1, 2, 3, 4, 5, 6, 7, 8, ...
Abstract Data Types - GeeksforGeeks
19 Sep, 2019 Abstract Data type (ADT) is a type (or class) for objects whose behaviour is defined by a set of value and a set of operations. The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented. It does not specify how data will be organized in memory ...
[ { "code": null, "e": 25078, "s": 25050, "text": "\n19 Sep, 2019" }, { "code": null, "e": 25206, "s": 25078, "text": "Abstract Data type (ADT) is a type (or class) for objects whose behaviour is defined by a set of value and a set of operations." }, { "code": null, "e"...
How do I customize the display of edge labels using networkx in Matplotlib?
To set the networkx edge labels offset, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Initialize a graph with edges, name, or graph attributes. Add multiple nodes. Position the nodes using Fruchterman-Reingold force-directed algorithm. Draw the graph G wit...
[ { "code": null, "e": 1136, "s": 1062, "text": "To set the networkx edge labels offset, we can take the following steps −" }, { "code": null, "e": 1212, "s": 1136, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "code": null, ...
Data Processing Example using Python | by Kamil Mysiak | Towards Data Science
Forbes’s survey found that the least enjoyable part of a data scientist’s job encompasses 80% of their time. 20% is spent collecting data and another 60% is spent cleaning and organizing of data sets. Personally, I disagree with the notion that 80% is the least enjoyable part of our jobs. I often see the task of data c...
[ { "code": null, "e": 880, "s": 172, "text": "Forbes’s survey found that the least enjoyable part of a data scientist’s job encompasses 80% of their time. 20% is spent collecting data and another 60% is spent cleaning and organizing of data sets. Personally, I disagree with the notion that 80% is the...
Understanding Logistic Regression in Python?
Logistic Regression is a statistical technique to predict the binary outcome. It’s not a new thing as it is currently being applied in areas ranging from finance to medicine to criminology and other social sciences. In this section we are going to develop logistic regression using python, though you can implement same ...
[ { "code": null, "e": 1278, "s": 1062, "text": "Logistic Regression is a statistical technique to predict the binary outcome. It’s not a new thing as it is currently being applied in areas ranging from finance to medicine to criminology and other social sciences." }, { "code": null, "e": ...
Minimum number of distinct elements after removing M items | Set 2 - GeeksforGeeks
19 May, 2021 Given an array of items, an ith index element denotes the item id’s, and given a number m, the task is to remove m elements such that there should be minimum distinct id’s left. Print the number of distinct id’s. Examples: Input: arr[] = { 2, 2, 1, 3, 3, 3} m = 3Output: 1Explanation:Remove 1 and both 2’s.S...
[ { "code": null, "e": 24899, "s": 24871, "text": "\n19 May, 2021" }, { "code": null, "e": 25112, "s": 24899, "text": "Given an array of items, an ith index element denotes the item id’s, and given a number m, the task is to remove m elements such that there should be minimum disti...
How to filter R dataframe by multiple conditions? - GeeksforGeeks
23 May, 2021 In R programming Language, dataframe columns can be subjected to constraints, and produce smaller subsets. However, while the conditions are applied, the following properties are maintained : Rows are considered to be a subset of the input. Rows in the subset appear in the same order as the original data f...
[ { "code": null, "e": 25280, "s": 25252, "text": "\n23 May, 2021" }, { "code": null, "e": 25472, "s": 25280, "text": "In R programming Language, dataframe columns can be subjected to constraints, and produce smaller subsets. However, while the conditions are applied, the following...
Matching Country Information in Python | by Joe T. Santhanavanich | Towards Data Science
In data science projects, you may have a data table that contains country data like country name, country code, etc. But, different data sets usually provide data in different country data formats or attributes; for example, “Germany” can be recorded as “GER”, “Germany”, “DE”, “Federal Republic of Germany”, country cod...
[ { "code": null, "e": 619, "s": 172, "text": "In data science projects, you may have a data table that contains country data like country name, country code, etc. But, different data sets usually provide data in different country data formats or attributes; for example, “Germany” can be recorded as “...
Print 1 2 3 infinitely using threads in C
22 Jul, 2019 Print 1 2 3 infinitely using thread. Create three threads viz T1, T2, and T3 such that those should print 1 2 3 sequence infinitely. Examples : Output :1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 ...... Prerequisite : Threads in C Approach : Start an infinite loop and initialize a variable ‘done’ to 1. Now, check for t...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jul, 2019" }, { "code": null, "e": 187, "s": 54, "text": "Print 1 2 3 infinitely using thread. Create three threads viz T1, T2, and T3 such that those should print 1 2 3 sequence infinitely." }, { "code": null, "e": 198,...
Lua - Tables
Tables are the only data structure available in Lua that helps us create different types like arrays and dictionaries. Lua uses associative arrays and which can be indexed with not only numbers but also with strings except nil. Tables have no fixed size and can grow based on our need. Lua uses tables in all representat...
[ { "code": null, "e": 2523, "s": 2237, "text": "Tables are the only data structure available in Lua that helps us create different types like arrays and dictionaries. Lua uses associative arrays and which can be indexed with not only numbers but also with strings except nil. Tables have no fixed size...
Python – Uppercase Nth character
30 Jan, 2020 The problem of capitalizing a string is quite common and has been discussed many times. But sometimes, we might have a problem like this in which we need to convert the Nth character of string to uppercase. Let’s discuss certain ways in which this can be performed. Method #1 : Using string slicing + upper(...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2020" }, { "code": null, "e": 294, "s": 28, "text": "The problem of capitalizing a string is quite common and has been discussed many times. But sometimes, we might have a problem like this in which we need to convert the Nth ch...
Types of Literals in C/C++ with Examples
19 May, 2022 The values assigned to each constant variable are referred to as the literals. Generally, both terms, constants, and literals are used interchangeably. For example, “const int = 5;“, is a constant expression and the value 5 is referred to as a constant integer literal. There are 4 types of literal in C an...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 May, 2022" }, { "code": null, "e": 206, "s": 53, "text": "The values assigned to each constant variable are referred to as the literals. Generally, both terms, constants, and literals are used interchangeably. " }, { "code":...
Vue.js | v-html directive
07 Jun, 2022 The v-html directive is a Vue.js directive used to update a element’s inner HTML with our data. This is what separates it from v-text which means while v-text accepts string and treats it as a string it will accept string and render it into HTML. First, we will create a div element with id as app and let’s...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 514, "s": 28, "text": "The v-html directive is a Vue.js directive used to update a element’s inner HTML with our data. This is what separates it from v-text which means while v-text accepts string a...
Queue.Contains() Method in C#
05 Feb, 2021 This method is used to check whether an element is in the Queue. This method performs a linear search, therefore, this method is an O(n) operation, where n is Count. And this method comes under the System.Collections namespace. Syntax: public virtual bool Contains(object obj); Here, obj is the Object to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Feb, 2021" }, { "code": null, "e": 256, "s": 28, "text": "This method is used to check whether an element is in the Queue. This method performs a linear search, therefore, this method is an O(n) operation, where n is Count. And this ...
How to Install KaliTorify Tool in Kali Linux?
06 Oct, 2021 Kalitorify is a free and open-source tool to become anonymous on the Internet while testing the security of a web browser. kalitorify uses ip-tables to create a Transparent Proxy through the Tor Network. kalitorify can move the network of your Kali Linux operating system through the Tor Network using ip-ta...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Oct, 2021" }, { "code": null, "e": 610, "s": 53, "text": "Kalitorify is a free and open-source tool to become anonymous on the Internet while testing the security of a web browser. kalitorify uses ip-tables to create a Transparent P...
Data Structures | Stack | Question 5
09 Feb, 2013 Following is an incorrect pseudocode for the algorithm which is supposed to determine whether a sequence of parentheses is balanced: declare a character stack while ( more input is available){ read a character if ( the character is a '(' ) push it on the stack else if ( the character is a ')' a...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2013" }, { "code": null, "e": 161, "s": 28, "text": "Following is an incorrect pseudocode for the algorithm which is supposed to determine whether a sequence of parentheses is balanced:" }, { "code": "declare a character...
Real time optimized KMP Algorithm for Pattern Searching
15 Nov, 2021 In the article, we have already discussed the KMP algorithm for pattern searching. In this article, a real-time optimized KMP algorithm is discussed. From the previous article, it is known that KMP(a.k.a. Knuth-Morris-Pratt) algorithm preprocesses the pattern P and constructs a failure function F(also call...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Nov, 2021" }, { "code": null, "e": 202, "s": 52, "text": "In the article, we have already discussed the KMP algorithm for pattern searching. In this article, a real-time optimized KMP algorithm is discussed." }, { "code": nu...
Inserting variables to database table using Python
02 Jul, 2021 In this article, we will see how one can insert the user data using variables. Here, we are using the sqlite module to work on a database but before that, we need to import that package. import sqlite3 To see the operation on a database level just download the SQLite browser database.Note: For the demons...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Jul, 2021" }, { "code": null, "e": 243, "s": 54, "text": "In this article, we will see how one can insert the user data using variables. Here, we are using the sqlite module to work on a database but before that, we need to import t...
JavaScript Number valueOf( ) Method
22 Dec, 2021 Below is the example of the Number valueOf( ) Method. Example: <script type="text/javascript"> var num=NaN; document.write("Output : " + num.valueOf()); </script> <script type="text/javascript"> var num=NaN; document.write("Output : " + num.valueOf()); </scri...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Dec, 2021" }, { "code": null, "e": 82, "s": 28, "text": "Below is the example of the Number valueOf( ) Method." }, { "code": null, "e": 215, "s": 82, "text": "Example: <script type=\"text/javascript\"> va...
HTML | Change Background color using onmouseover property
31 Jul, 2018 In this post, the working of onmouseover event is shown by changing the colours of a paragraph by taking the mouse over a particular colour. Syntax: document.bgColor = 'nameOfColor' HTML code that will change the colour of the background when the mouse is moved over a particular colour. Background colour ...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Jul, 2018" }, { "code": null, "e": 195, "s": 54, "text": "In this post, the working of onmouseover event is shown by changing the colours of a paragraph by taking the mouse over a particular colour." }, { "code": null, "...
Toggle first and last bits of a number
06 Jul, 2022 Given a number n, the task is to toggle only first and last bits of a numberExamples : Input : 10 Output : 3 Binary representation of 10 is 1010. After toggling first and last bits, we get 0011. Input : 15 Output : 6 Prerequisite : Find MSB of given number.1) Generate a number which contains first and...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Jul, 2022" }, { "code": null, "e": 143, "s": 54, "text": "Given a number n, the task is to toggle only first and last bits of a numberExamples : " }, { "code": null, "e": 274, "s": 143, "text": "Input : 10\nOutp...
HTML | <caption> align Attribute
22 Feb, 2022 The HTML <caption> align Attribute is used to specify the alignment of the <caption> Element. It is used to align the caption to the left, right, top and Bottom of a table.This attribute is not supported in HTML5. Note: By default , the table caption is aligned to center. Syntax: <caption align="left | rig...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2022" }, { "code": null, "e": 242, "s": 28, "text": "The HTML <caption> align Attribute is used to specify the alignment of the <caption> Element. It is used to align the caption to the left, right, top and Bottom of a table.Thi...
Excel VBA Concatenation Operators
19 Jul, 2021 VBA in Excel stands for Visual Basic for Applications which is Microsoft’s programming language. To optimize the performance and reduce the time in Excel we need Macros and VBA is the tool used in the backend. Concatenation means to join two or more data into a single data. There are various ways we can pe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jul, 2021" }, { "code": null, "e": 406, "s": 28, "text": "VBA in Excel stands for Visual Basic for Applications which is Microsoft’s programming language. To optimize the performance and reduce the time in Excel we need Macros and VB...
How to Install Code Blocks for C++ on MacOS?
29 Oct, 2021 Code::Blocks is a free and open-source IDE that supports a plethora of C++ compilers like GCC, Clang, and Visual C++. It is written in C++ and makes use of wxWidgets as the GUI toolkit. Code::Blocks is focused on C, C++, and Fortran development. It has a custom build system and optional Make support. In th...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Oct, 2021" }, { "code": null, "e": 421, "s": 28, "text": "Code::Blocks is a free and open-source IDE that supports a plethora of C++ compilers like GCC, Clang, and Visual C++. It is written in C++ and makes use of wxWidgets as the GU...
Save and load models in Tensorflow
07 Mar, 2022 The development of the model can be saved both before and after testing. As a result, a model will pick up where it left off to eliminate lengthy training periods. You can still share your model and have others replicate it if you save it. Most machine learning professionals share the following when publis...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Mar, 2022" }, { "code": null, "e": 393, "s": 53, "text": "The development of the model can be saved both before and after testing. As a result, a model will pick up where it left off to eliminate lengthy training periods. You can st...
Tailwind CSS Display
23 Mar, 2022 This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS display property. This class is used to define how the components (div, hyperlink, heading, etc) are going to be placed on the web page. As the name suggests, this prope...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 407, "s": 28, "text": "This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS display property. This class is used ...
Shortest path in a directed graph by Dijkstra’s algorithm
06 Aug, 2021 Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target vertex in the given graph where edges are weighted (non-negative) and directed from parent vertex to source vertices. Approach: Mark all vertices unvisited. Create a set of all...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Aug, 2021" }, { "code": null, "e": 300, "s": 52, "text": "Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target vertex in the given graph where edges are we...
How to print maximum number of A’s using given four keys
28 Feb, 2022 This is a famous interview question asked in Google, Paytm and many other company interviews. Below is the problem statement. Imagine you have a special keyboard with the following keys: Key 1: Prints 'A' on screen Key 2: (Ctrl-A): Select screen Key 3: (Ctrl-C): Copy selection to buffer Key 4: (Ctrl-V): ...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Feb, 2022" }, { "code": null, "e": 178, "s": 52, "text": "This is a famous interview question asked in Google, Paytm and many other company interviews. Below is the problem statement." }, { "code": null, "e": 703, "s...
Sum of the nodes of a Singly Linked List in C Program
A singly linked list is a data structure in which an element has two parts one is the value and other is the link to the next element. So to find the sum of all elements of the singly linked list, we have to navigate to each node of the linked list and add the element's value to a sum variable. For example Suppose we h...
[ { "code": null, "e": 1483, "s": 1187, "text": "A singly linked list is a data structure in which an element has two parts one is the value and other is the link to the next element. So to find the sum of all elements of the singly linked list, we have to navigate to each node of the linked list and ...
timetuple() Function Of Datetime.date Class In Python
23 Aug, 2021 timetuple() method returns a time.struct time object which is a named tuple. A named tuple object has attributes that may be accessed by an index or a name. The struct time object has properties for both the date and time fields, as well as a flag that specifies whether or not Daylight Saving Time is in ef...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 794, "s": 28, "text": "timetuple() method returns a time.struct time object which is a named tuple. A named tuple object has attributes that may be accessed by an index or a name. The struct time ob...
interview-series-juspay | Practice | GeeksforGeeks
Reset the IDE using the second button on the top right corner. Avoid using static/global variables in your code as your code is tested against multiple test cases and these tend to retain their previous values. Passing the Sample/Custom Test cases does not guarantee the correctness ...
[ { "code": null, "e": 83, "s": 20, "text": "Reset the IDE using the second button on the top right corner." }, { "code": null, "e": 268, "s": 83, "text": "Avoid using static/global variables in your code as your code is tested \n against multiple...
Flutter – Wrap Widget
27 May, 2021 Wrap widget aligns the widgets in a horizontal and vertical manner. Generally, we use Rows and Columns to do that but if we have some widgets which are not able to fit in the Row/Column then it will give us Overflow Message ( for ex: Right Overflowed by 570 pixels). Wrap({Key key, Axis direction, WrapAl...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 May, 2021" }, { "code": null, "e": 322, "s": 54, "text": "Wrap widget aligns the widgets in a horizontal and vertical manner. Generally, we use Rows and Columns to do that but if we have some widgets which are not able to fit in the...
PHP | max( ) Function
07 Mar, 2018 The max() function of PHP is used to find the numerically maximum value in an array or the numerically maximum value of several specified values. The max() function can take an array or several numbers as an argument and return the numerically maximum value among the passed parameters. The return type is n...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Mar, 2018" }, { "code": null, "e": 405, "s": 28, "text": "The max() function of PHP is used to find the numerically maximum value in an array or the numerically maximum value of several specified values. The max() function can take a...
Python Bin | Count total bits in a number
01 Sep, 2020 Given a positive number n, count total bit in it. Examples: Input : 13 Output : 4 Binary representation of 13 is 1101 Input : 183 Output : 8 Input : 4096 Output : 13 We have existing solution for this problem please refer Count total bits in a number link. We can solve this problem quickly in P...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Sep, 2020" }, { "code": null, "e": 104, "s": 53, "text": "Given a positive number n, count total bit in it. " }, { "code": null, "e": 116, "s": 104, "text": "Examples: " }, { "code": null, "e": 229, ...