title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to open a port in the Windows Operating System using PowerShell? | To open a port in the Windows Operating system, we need to know a few things. Like
For which Profile we need to open port (Public, private, or Domain)? - Optional
For which Profile we need to open port (Public, private, or Domain)? - Optional
Which port do we need to open (port Number)?
Which port do we need to open (p... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To open a port in the Windows Operating system, we need to know a few things. Like"
},
{
"code": null,
"e": 1225,
"s": 1145,
"text": "For which Profile we need to open port (Public, private, or Domain)? - Optional"
},
{
"code... |
Rotate a Linked List | Practice | GeeksforGeeks | Given a singly linked list of size N. The task is to left-shift the linked list by k nodes, where k is a given positive integer smaller than or equal to length of the linked list.
Example 1:
Input:
N = 5
value[] = {2, 4, 7, 8, 9}
k = 3
Output: 8 9 2 4 7
Explanation:
Rotate 1: 4 -> 7 -> 8 -> 9 -> 2
Rotate 2: 7 -> 8 -> ... | [
{
"code": null,
"e": 419,
"s": 238,
"text": "Given a singly linked list of size N. The task is to left-shift the linked list by k nodes, where k is a given positive integer smaller than or equal to length of the linked list. "
},
{
"code": null,
"e": 430,
"s": 419,
"text": "Examp... |
Flutter - Provider Package - GeeksforGeeks | 01 Feb, 2021
The provider package is an easy to use package which is basically a wrapper around the InheritedWidgets that makes it easier to use and manage. It provides a state management technique that is used for managing a piece of data around the app.
The basic classes available in the provider package are –
Change... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 24253,
"s": 24010,
"text": "The provider package is an easy to use package which is basically a wrapper around the InheritedWidgets that makes it easier to use and manage. It provides a state... |
What is Shallow Copy and how it is different from Deep Copy in C#? | Shallow Copy −
A shallow copy of an object copies the "main" object, but doesn’t copy the inner
objects.
The "inner objects" are shared between the original object and its copy.
The problem with the shallow copy is that the two objects are not independent. If you
modify the one object, the change will be reflected in t... | [
{
"code": null,
"e": 1077,
"s": 1062,
"text": "Shallow Copy −"
},
{
"code": null,
"e": 1167,
"s": 1077,
"text": "A shallow copy of an object copies the \"main\" object, but doesn’t copy the inner\nobjects."
},
{
"code": null,
"e": 1240,
"s": 1167,
"text": "The... |
Tryit Editor v3.7 | Tryit basic HTML paragraphs | [] |
jQuery - preventDefault() Method | The preventDefault() method prevents the browser from executing the default action.
You can use the method isDefaultPrevented to know whether this method was ever called (on that event object).
Here is the simple syntax to use this method −
event.preventDefault()
Here is the description of all the parameters used by ... | [
{
"code": null,
"e": 2406,
"s": 2322,
"text": "The preventDefault() method prevents the browser from executing the default action."
},
{
"code": null,
"e": 2516,
"s": 2406,
"text": "You can use the method isDefaultPrevented to know whether this method was ever called (on that eve... |
C# Example for Single Inheritance | The following is an example of Single Inheritance in C#. In the example, the base class is Father and declared like the following code snippet −
class Father {
public void Display() {
Console.WriteLine("Display");
}
}
Our derived class is Son and is declared below −
class Son : Father {
public void Displ... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "The following is an example of Single Inheritance in C#. In the example, the base class is Father and declared like the following code snippet −"
},
{
"code": null,
"e": 1292,
"s": 1207,
"text": "class Father {\n public void Displa... |
What is the Punycode in Node.js ? | 30 Jun, 2020
Punycode is a special encoding syntax that is specifically used to convert Unicode characters (UTF-8) to ASCII, which is nothing but the restricted string character set.
Why this type of specific conversion needed ? The hostnames will understand only ASCII characters. Punycode is used by the International ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 198,
"s": 28,
"text": "Punycode is a special encoding syntax that is specifically used to convert Unicode characters (UTF-8) to ASCII, which is nothing but the restricted string character set."
},... |
Python | Plotting charts in excel sheet using openpyxl module | Set 3 | 19 May, 2021
Prerequisite : Plotting charts in excel sheet using openpyxl module Set – 1 | Set – 2Openpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing, arithmetic operations and plotting graphs. Charts are composed of at least one series of one or more data p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 1115,
"s": 52,
"text": "Prerequisite : Plotting charts in excel sheet using openpyxl module Set – 1 | Set – 2Openpyxl is a Python library using which one can perform multiple operations on excel fi... |
Search an element in a Doubly Linked List | 28 Mar, 2022
Given a Doubly linked list(DLL) containing N nodes and an integer X, the task is to find the position of the integer X in the doubly linked list. If no such position found then print -1.
Examples:
Input: 15 <=> 16 <=> 8 <=> 7 <=> 13, X = 8 Output: 3 Explanation: X (= 8) is present at the 3rd node of the do... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 239,
"s": 52,
"text": "Given a Doubly linked list(DLL) containing N nodes and an integer X, the task is to find the position of the integer X in the doubly linked list. If no such position found th... |
Serializer Relations – Django REST Framework | 16 Feb, 2021
Serialization is one of the most important concepts in RESTful Webservices. It facilitates the conversion of complex data (such as model instances) to native Python data types that can be rendered using JSON, XML, or other content types. In Django REST Framework, we have different types of serializers to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 569,
"s": 28,
"text": "Serialization is one of the most important concepts in RESTful Webservices. It facilitates the conversion of complex data (such as model instances) to native Python data type... |
MouseListener and MouseMotionListener in Java | 14 Apr, 2021
MouseListener and MouseMotionListener is an interface in java.awt.event package . Mouse events are of two types. MouseListener handles the events when the mouse is not in motion. While MouseMotionListener handles the events when mouse is in motion.There are five types of events that MouseListener can gener... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 463,
"s": 52,
"text": "MouseListener and MouseMotionListener is an interface in java.awt.event package . Mouse events are of two types. MouseListener handles the events when the mouse is not in mot... |
Maximum number of groups of size 3 containing two type of items | 20 Aug, 2021
Given n instance of item A and m instance of item B. Find the maximum number of groups of size 3 that can be formed using these items such that all groups contain items of both types, i.e., a group should not have either all items of type A or all items of type B. Total number of items of type A in the for... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 501,
"s": 52,
"text": "Given n instance of item A and m instance of item B. Find the maximum number of groups of size 3 that can be formed using these items such that all groups contain items of bo... |
How to make object eligible for garbage collection in Java? | 30 May, 2018
An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes they are also called unreachable objects.
What is reference of an object?
The new operator dynamically allocates memory for an object and returns a reference to it. This reference is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 May, 2018"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes they are also called unreachable objects."
},
... |
sort() vs. partial_sort() vs. nth_element() + sort() in C++ STL | 21 Jun, 2020
In this article, we will discuss the difference between sort(), partial_sort(), and nth_element()+sort().
Below is the illustration of the above functions:
sort(): C++ STL provides a function sort() that sorts a list of element in O(N*log N) time. By default, sort() sorts an array in ascending order. Below... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 158,
"s": 52,
"text": "In this article, we will discuss the difference between sort(), partial_sort(), and nth_element()+sort()."
},
{
"code": null,
"e": 208,
"s": 158,
"text": ... |
How to Use Logical Operator Within If Statements in MATLAB? | 30 Jun, 2022
Logical Operators are used to combining two or more conditions/constraints or to complement the evaluation of the original condition in consideration. The result of the operation of a logical operator is a boolean value either true or false. Like any other programming language, logical operators in MATLAB ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 409,
"s": 28,
"text": "Logical Operators are used to combining two or more conditions/constraints or to complement the evaluation of the original condition in consideration. The result of the operat... |
HTML | <textarea> rows Attribute | 16 Oct, 2019
The HTML textarea rows Attribute is used to specify the number of visible text lines for the control i.e the number of rows to display. It also specifies the visible height of the Textarea.
Syntax:
<textarea rows = "value">
Attribute Values:
number: It specify the height of the Textarea. Its Default value ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2019"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "The HTML textarea rows Attribute is used to specify the number of visible text lines for the control i.e the number of rows to display. It also specifies the visible height of... |
HTML | DOM Input Password pattern Property | 08 Mar, 2019
The Input password pattern Property in HTML DOM is used to set or return the value of pattern attribute of a Password Field. This attribute is used to specify the regular expression on which the input elements value is checked against. Use the Global title attribute to describe the pattern for helping the ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Mar, 2019"
},
{
"code": null,
"e": 366,
"s": 53,
"text": "The Input password pattern Property in HTML DOM is used to set or return the value of pattern attribute of a Password Field. This attribute is used to specify the regular exp... |
JavaScript performance.now() Method | 29 Oct, 2021
In JavaScript performance.now() method can be used to check the performance of your code. You can check the execution time of your code using this method.
It returns the value of time (of type double) in milliseconds. The returned value represents the time elapsed since the execution started.
Syntax:
let t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 183,
"s": 28,
"text": "In JavaScript performance.now() method can be used to check the performance of your code. You can check the execution time of your code using this method."
},
{
"code"... |
Working with Images in Python? | One of the most popular and considered as default library of python for image processing is Pillow. Pillow is an updated version of the Python Image Library or PIL and supports a range of simple and advanced image manipulation functionality. It is also the basis for simple image support in other Python libraries such a... | [
{
"code": null,
"e": 1531,
"s": 1187,
"text": "One of the most popular and considered as default library of python for image processing is Pillow. Pillow is an updated version of the Python Image Library or PIL and supports a range of simple and advanced image manipulation functionality. It is also ... |
What is #if DEBUG and How to use it in C#? | In Visual Studio Debug mode and Release mode are different configurations for building your .Net project.
Select the Debug mode for debugging step by step their .Net project and select the Release mode for the final build of Assembly file (.dll or .exe).
The Debug mode does not optimize the binary it produces because t... | [
{
"code": null,
"e": 1293,
"s": 1187,
"text": "In Visual Studio Debug mode and Release mode are different configurations for building your .Net project."
},
{
"code": null,
"e": 1442,
"s": 1293,
"text": "Select the Debug mode for debugging step by step their .Net project and sele... |
How to Set an Image as Wallpaper Programmatically in Android? | 23 Feb, 2021
Setting wallpaper in Android programmatically is helpful when the application is fetching wallpapers from the API library and asking the user whether to set the wallpaper for the home screen or not. In this article, it’s been discussed how to set a sample image as the home screen wallpaper programmatically... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 516,
"s": 28,
"text": "Setting wallpaper in Android programmatically is helpful when the application is fetching wallpapers from the API library and asking the user whether to set the wallpaper for ... |
SQL | SELECT data from Multiple Tables | 17 Aug, 2020
Below statement could be used to get data from multiple tables, so, we need to use join to get data from multiple tables.
Syntax :
SELECT tablenmae1.colunmname, tablename2.columnnmae
FROM tablenmae1
JOIN tablename2
ON tablenmae1.colunmnam = tablename2.columnnmae
ORDER BY columnname;
Let us take ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Aug, 2020"
},
{
"code": null,
"e": 175,
"s": 53,
"text": "Below statement could be used to get data from multiple tables, so, we need to use join to get data from multiple tables."
},
{
"code": null,
"e": 184,
"s": 1... |
Kali Linux – Vulnerability Analysis Tools | 20 Nov, 2021
Vulnerability Analysis is one of the most important phases of Hacking. It is done after Information Gathering and is one of the crucial steps to be done while designing an application. The cyber-world is filled with a lot of vulnerabilities which are the loopholes in a program through which hacker executes... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 504,
"s": 53,
"text": "Vulnerability Analysis is one of the most important phases of Hacking. It is done after Information Gathering and is one of the crucial steps to be done while designing an ap... |
Minimum time required to fill given N slots - GeeksforGeeks | 31 May, 2021
Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] repreand. Each element of the array are in the range [1, N] which represents the indices of the filled slots. At each unit of time, the index with filled slot fills the adjacent empty slots... | [
{
"code": null,
"e": 26933,
"s": 26905,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 27310,
"s": 26933,
"text": "Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] repreand. Each element of the array are in th... |
Check if a given year is leap year in PL/SQL - GeeksforGeeks | 02 Jul, 2018
Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Given a year, the task is to check that given year is a leap y... | [
{
"code": null,
"e": 25622,
"s": 25594,
"text": "\n02 Jul, 2018"
},
{
"code": null,
"e": 25657,
"s": 25622,
"text": "Prerequisite – PL/SQL introduction"
},
{
"code": null,
"e": 25867,
"s": 25657,
"text": "In PL/SQL code groups of commands are arranged within a... |
How to Clear RAM Memory Cache, Buffer and Swap Space on Linux - GeeksforGeeks | 30 May, 2021
In this article, we will see How to Clear RAM Memory Cache, Buffer, and Swap Space on Linux. In every system we do come across caches that have unwanted files and can harm our system, the same thing happens in Linux cache and if you want to clear the cache and free some memory then Linux has many commands ... | [
{
"code": null,
"e": 25731,
"s": 25703,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 26050,
"s": 25731,
"text": "In this article, we will see How to Clear RAM Memory Cache, Buffer, and Swap Space on Linux. In every system we do come across caches that have unwanted files and ... |
Implement Search Autocomplete For Input Fields in Django - GeeksforGeeks | 16 Feb, 2021
Django is a high-level Python based Web Framework that allows rapid development and clean, pragmatic design. It is also called batteries included framework because Django provides built-in features for everything including Django Admin Interface, default database – SQLlite3, etc. Today we will create jok... | [
{
"code": null,
"e": 26025,
"s": 25997,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 26349,
"s": 26025,
"text": "Django is a high-level Python based Web Framework that allows rapid development and clean, pragmatic design. It is also called batteries included framework becau... |
Maximum number of edges that N-vertex graph can have such that graph is Triangle free | Mantel's Theorem - GeeksforGeeks | 23 Apr, 2021
Given a number N which is the number of nodes in a graph, the task is to find the maximum number of edges that N-vertex graph can have such that graph is triangle-free (which means there should not be any three edges A, B, C in the graph such that A is connected to B, B is connected to C and C is connected... | [
{
"code": null,
"e": 26311,
"s": 26283,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 26679,
"s": 26311,
"text": "Given a number N which is the number of nodes in a graph, the task is to find the maximum number of edges that N-vertex graph can have such that graph is triangle-... |
GATE | GATE CS 2013 | Question 47 - GeeksforGeeks | 28 Jun, 2021
(A) A(B) B(C) C(D) DAnswer: (A) (D)Explanation:
Given statement is :
¬ ∃ x ( ∀y(α) ∧ ∀z(β) )
where ¬ is a negation operator, ∃ is Existential Quantifier with the
meaning of "there Exists", and ∀ is a Universal Quantifier
with the meaning " for all " , and α, β can be treated as predicates.
here we c... | [
{
"code": null,
"e": 25657,
"s": 25629,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25707,
"s": 25657,
"text": "(A) A(B) B(C) C(D) DAnswer: (A) (D)Explanation: "
},
{
"code": null,
"e": 25728,
"s": 25707,
"text": "Given statement is :"
},
{
"code... |
Full Subtractor in Digital Logic - GeeksforGeeks | 25 Nov, 2019
A full subtractor is a combinational circuit that performs subtraction of two bits, one is minuend and other is subtrahend, taking into account borrow of the previous adjacent lower minuend bit. This circuit has three inputs and two outputs. The three inputs A, B and Bin, denote the minuend, subtrahend, an... | [
{
"code": null,
"e": 28079,
"s": 28051,
"text": "\n25 Nov, 2019"
},
{
"code": null,
"e": 28505,
"s": 28079,
"text": "A full subtractor is a combinational circuit that performs subtraction of two bits, one is minuend and other is subtrahend, taking into account borrow of the previ... |
How div class and id is useful in HTML ? - GeeksforGeeks | 14 May, 2020
In this article, we will discuss how the id, div, and class is useful in HTML. Id, Div, and class are important concepts of structuring the HTML page. let’s discuss one by one.
Id attributes in HTML
Div tag in HTML
Class attributes in HTML
Now, consider a use case where you want to implement a table of con... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 25524,
"s": 25347,
"text": "In this article, we will discuss how the id, div, and class is useful in HTML. Id, Div, and class are important concepts of structuring the HTML page. let’s discus... |
Perfect Binary Tree | Practice | GeeksforGeeks | Given a Binary Tree, write a function to check whether the given Binary Tree is a prefect Binary Tree or not. A Binary tree is Perfect Binary Tree in which all internal nodes have two children and all leaves are at same level.
Example 1:
Input:
7
/ \
4 9
Output: YES
Explanation:
As the root n... | [
{
"code": null,
"e": 465,
"s": 238,
"text": "Given a Binary Tree, write a function to check whether the given Binary Tree is a prefect Binary Tree or not. A Binary tree is Perfect Binary Tree in which all internal nodes have two children and all leaves are at same level."
},
{
"code": null,
... |
ReactJS UI Ant Design Switch Component - GeeksforGeeks | 21 May, 2021
Ant Design Library has this component pre-built, and it is very easy to integrate as well. Switch components are used to toggle the state of a single setting on or off. We can use the following approach in ReactJS to use the Ant Design Switch Component.
Switch Methods:
blur(): This method is used to remove... | [
{
"code": null,
"e": 35483,
"s": 35455,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 35737,
"s": 35483,
"text": "Ant Design Library has this component pre-built, and it is very easy to integrate as well. Switch components are used to toggle the state of a single setting on or... |
Python | Pandas Series.sample() - GeeksforGeeks | 07 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.sample() function return a random sa... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n07 Feb, 2019"
},
{
"code": null,
"e": 25794,
"s": 25537,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label... |
Python 3.6 Dictionary Implementation using Hash Tables - GeeksforGeeks | 16 Aug, 2021
Dictionary in Python is a collection of data values, used to store data values like a map, which, unlike other Data Types that hold only a single value as an element, Dictionary holds key:value pair. Key-value is provided in the dictionary to make it more optimized. Each key-value pair in a Dictionary is s... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 25956,
"s": 25537,
"text": "Dictionary in Python is a collection of data values, used to store data values like a map, which, unlike other Data Types that hold only a single value as an eleme... |
Search in a Row-wise and Column-wise Sorted 2D Array using Divide and Conquer algorithm - GeeksforGeeks | 02 Jun, 2021
Given an n x n matrix, where every row and column is sorted in increasing order. Given a key, how to decide whether this key is in the matrix. A linear time complexity is discussed in the previous post. This problem can also be a very good example for divide and conquer algorithms. Following is divide and ... | [
{
"code": null,
"e": 26159,
"s": 26131,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26877,
"s": 26159,
"text": "Given an n x n matrix, where every row and column is sorted in increasing order. Given a key, how to decide whether this key is in the matrix. A linear time comple... |
AWT CheckboxMenuItem Class | The CheckboxMenuItem class represents a check box which can be included in a menu. Selecting the check box in the menu changes control's state from on to off or from off to on.
Following is the declaration for java.awt.CheckboxMenuItem class:
public class CheckboxMenuItem
extends MenuItem
implements ItemSelec... | [
{
"code": null,
"e": 1925,
"s": 1747,
"text": "The CheckboxMenuItem class represents a check box which can be included in a menu. Selecting the check box in the menu changes control's state from on to off or from off to on."
},
{
"code": null,
"e": 1991,
"s": 1925,
"text": "Foll... |
How to convert string into float in JavaScript? - GeeksforGeeks | 24 Jun, 2019
We can convert a string into a float in JavaScript by using some methods which are described below:
By using Type Conversion of JavaScript
By using parseFloat() Method
Method 1: In this method we will use the Type Conversion feature of JavaScript which will convert the string value into float.
Example: Bel... | [
{
"code": null,
"e": 25478,
"s": 25450,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 25578,
"s": 25478,
"text": "We can convert a string into a float in JavaScript by using some methods which are described below:"
},
{
"code": null,
"e": 25617,
"s": 25578,
... |
High-Accuracy Covid 19 Prediction from Chest X-Ray Images using Pre-Trained Convolutional Neural Networks in PyTorch | by Bharat Sethuraman Sharman | Towards Data Science | Leveraging Efficientnet architecture to achieve 99%+ prediction accuracy on a Medical Imaging Dataset pertaining to Covid19
In this post, I will share my experience of developing a Convolutional Neural Network algorithm to predict Covid-19 from chest X-Ray images with high accuracy. I developed this algorithm while par... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "Leveraging Efficientnet architecture to achieve 99%+ prediction accuracy on a Medical Imaging Dataset pertaining to Covid19"
},
{
"code": null,
"e": 1074,
"s": 296,
"text": "In this post, I will share my experience of developing a Conv... |
Program to find the common ratio of three numbers - GeeksforGeeks | 01 Apr, 2021
Given a:b and b:c. The task is to write a program to find ratio a:b:cExamples:
Input: a:b = 2:3, b:c = 3:4
Output: 2:3:4
Input: a:b = 3:4, b:c = 8:9
Output: 6:8:9
Approach: The trick is to make the common term ‘b’ equal in both ratios. Therefore, multiply the first ratio by b2 (b term of second ratio... | [
{
"code": null,
"e": 24738,
"s": 24710,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 24819,
"s": 24738,
"text": "Given a:b and b:c. The task is to write a program to find ratio a:b:cExamples: "
},
{
"code": null,
"e": 24905,
"s": 24819,
"text": "Input: a:... |
Integrate Angular 7 with ElectronJS - GeeksforGeeks | 17 May, 2020
ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime.
Electro... | [
{
"code": null,
"e": 25668,
"s": 25640,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 25968,
"s": 25668,
"text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which ... |
How to plot half or quarter polar plots in Matplotlib? | To plot half or quarter polar plots in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure using figure() method.
Create a ... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To plot half or quarter polar plots in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1223,
"s": 1147,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code":... |
Reference to a constructor using method references in Java8 | Lambda expressions In Java allows you to pass functionality as an argument to a
method. You can also call an existing method using lambda expressions.
list.forEach(n -> System.out.println(n));
Method references are simple, easy-to-read lambda expressions to call/refer and the existing method by name in a lambda express... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Lambda expressions In Java allows you to pass functionality as an argument to a\nmethod. You can also call an existing method using lambda expressions."
},
{
"code": null,
"e": 1255,
"s": 1213,
"text": "list.forEach(n -> System.out.p... |
Which MySQL Data Type can be used to store Negative Number? | You can use TINYINT data type in MySQL to store negative number. Following is the syntax −
CREATE TABLE yourTableName
(
yourColumnName TINYINT
.
.
.
.
N
);
Let us first create a table with a column set as type TINYINT −
mysql> create table DemoTable
(
Number tinyint
);
Query OK, 0 row... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "You can use TINYINT data type in MySQL to store negative number. Following is the syntax −"
},
{
"code": null,
"e": 1243,
"s": 1153,
"text": "CREATE TABLE yourTableName\n (\n\n yourColumnName TINYINT\n .\n .\n .\n .\n N... |
RAPTOR Tool - A Flowchart Interpreter - GeeksforGeeks | 09 Feb, 2018
RAPTOR(Rapid Algorithmic Prototyping Tool for Ordered Reasoning) is a free graphical authoring tool created by Martin C. Carlisle, Terry Wilson, Jeff Humphries and Jason Moore, designed specifically to help students visualize their algorithms and avoid syntactic baggage.Students can create flow-chart for a... | [
{
"code": null,
"e": 24619,
"s": 24591,
"text": "\n09 Feb, 2018"
},
{
"code": null,
"e": 25054,
"s": 24619,
"text": "RAPTOR(Rapid Algorithmic Prototyping Tool for Ordered Reasoning) is a free graphical authoring tool created by Martin C. Carlisle, Terry Wilson, Jeff Humphries and... |
Practical Introduction to PySpark | by Soner Yıldırım | Towards Data Science | Spark is an analytics engine used for large-scale data processing. It lets you spread both data and computations over clusters to achieve a substantial performance increase.
Since it is getting easier and less expensive to collect and store data, we are likely to have huge amounts of data when working on a real life pr... | [
{
"code": null,
"e": 345,
"s": 171,
"text": "Spark is an analytics engine used for large-scale data processing. It lets you spread both data and computations over clusters to achieve a substantial performance increase."
},
{
"code": null,
"e": 601,
"s": 345,
"text": "Since it is ... |
C# program to find all duplicate elements in an integer array | Firstly, set the array with duplicate elements.
int[] arr = {
24,
10,
56,
32,
10,
43,
88,
32
};
Now declare a Dictionary and loop through the array to get the repeated elements.
var d = new Dictionary < int, int > ();
foreach(var res in arr) {
if (d.ContainsKey(res))
d[res]++;
els... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "Firstly, set the array with duplicate elements."
},
{
"code": null,
"e": 1182,
"s": 1110,
"text": "int[] arr = {\n 24,\n 10,\n 56,\n 32,\n 10,\n 43,\n 88,\n 32\n};"
},
{
"code": null,
"e": 1264,
"s": 1... |
Display Customizations for pandas Power Users | by Roman Orac | Towards Data Science | pandas has an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust.
pandas display customizations are often overlooked part of pandas. For most users, defaults are good enough, but many users don’t know about display customizations an... | [
{
"code": null,
"e": 326,
"s": 172,
"text": "pandas has an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust."
},
{
"code": null,
"e": 649,
"s": 326,
"text": "pandas display customizations ar... |
ASP.NET - Multi Views | MultiView and View controls allow you to divide the content of a page into different groups, displaying only one group at a time. Each View control manages one group of content and all the View controls are held together in a MultiView control.
The MultiView control is responsible for displaying one View control at a t... | [
{
"code": null,
"e": 2592,
"s": 2347,
"text": "MultiView and View controls allow you to divide the content of a page into different groups, displaying only one group at a time. Each View control manages one group of content and all the View controls are held together in a MultiView control."
},
... |
Drools - Introduction | Any Java enterprise level application can be split into three parts −
UI − User Interface (Frontend)
Service layer which is in turn connected to a database
Business layer
We have a number of frameworks that handle the UI and service layer together, for example, Spring and Struts. Yet, we did not have a standard way to ... | [
{
"code": null,
"e": 1867,
"s": 1797,
"text": "Any Java enterprise level application can be split into three parts −"
},
{
"code": null,
"e": 1898,
"s": 1867,
"text": "UI − User Interface (Frontend)"
},
{
"code": null,
"e": 1953,
"s": 1898,
"text": "Service la... |
How to create a zip file using Python? | Use the zipfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively.
import os
import zipfile
def zipdir(path, ziph):
# ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.write(os.pat... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "Use the zipfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively."
},
{
"code": null,
"e": 1512,
"s": 1204,
"text": "import os\nimport zipfile\ndef zipdir(pa... |
Redis - Keys Ttl Command | Redis TTL command is used to get the remaining time of the key expiry in seconds.
Integer value TTL in milliseconds, or a negative value.
TTL in milliseconds.
-1, if key does not have expiry timeout.
-2, if key does not exist.
Following is the basic syntax of Redis TTL command.
redis 127.0.0.1:6379> TTL KEY_NAME
Firs... | [
{
"code": null,
"e": 2127,
"s": 2045,
"text": "Redis TTL command is used to get the remaining time of the key expiry in seconds."
},
{
"code": null,
"e": 2183,
"s": 2127,
"text": "Integer value TTL in milliseconds, or a negative value."
},
{
"code": null,
"e": 2204,
... |
How to parse JSON in Java - GeeksforGeeks | 07 Aug, 2019
JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data exchange format that is easy for humans and machines to read and write. JSON can represent two structured types: objects and arrays. An object is an unordered collection of zero or more name/value pairs. An array is a... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n07 Aug, 2019"
},
{
"code": null,
"e": 25150,
"s": 24716,
"text": "JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data exchange format that is easy for humans and machines to read and write. J... |
VueJS - Template | We have learnt in the earlier chapters, how to get an output in the form of text content on the screen. In this chapter, we will learn how to get an output in the form of HTML template on the screen.
To understand this, let us consider an example and see the output in the browser.
<html>
<head>
<title>VueJs In... | [
{
"code": null,
"e": 2136,
"s": 1936,
"text": "We have learnt in the earlier chapters, how to get an output in the form of text content on the screen. In this chapter, we will learn how to get an output in the form of HTML template on the screen."
},
{
"code": null,
"e": 2218,
"s": 2... |
Collect Stock and Options Data Easily using Python and Ally Financial API — 3 Example Queries | by Eric Kleppen | Towards Data Science | For a period of my life, I was obsessed with financial markets and wanted to be a day trader. I worked nights, so it was easy to spend my mornings surrounded by computer monitors displaying everything from stocks, options, news and trade chat-rooms. Spoiler alert... I gave up on day trading, but not on investing. Ultim... | [
{
"code": null,
"e": 638,
"s": 171,
"text": "For a period of my life, I was obsessed with financial markets and wanted to be a day trader. I worked nights, so it was easy to spend my mornings surrounded by computer monitors displaying everything from stocks, options, news and trade chat-rooms. Spoil... |
jsoup - Extract HTML | Following example will showcase use of methods to get inner html and outer html after parsing an HTML String into a Document object.
Document document = Jsoup.parse(html);
Element link = document.select("a").first();
System.out.println("Outer HTML: " + link.outerHtml());
System.out.println("Inner HTML: " + li... | [
{
"code": null,
"e": 2163,
"s": 2030,
"text": "Following example will showcase use of methods to get inner html and outer html after parsing an HTML String into a Document object."
},
{
"code": null,
"e": 2363,
"s": 2163,
"text": "Document document = Jsoup.parse(html);\nElement l... |
How to create full-page tabs with CSS and JavaScript? | To create full-page tabs with CSS and JavaScript, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box}
body, html {
height: 100%;
margin: 0;
}
.tablink {
background-color: #555;
color: white;... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To create full-page tabs with CSS and JavaScript, the code is as follows −"
},
{
"code": null,
"e": 1148,
"s": 1137,
"text": " Live Demo"
},
{
"code": null,
"e": 2923,
"s": 1148,
"text": "<!DOCTYPE html>\n<html>\n... |
How to store XML data in a table in Oracle? | Problem Statement:
You need to store native XML data into a relational table in your database.
Solution:
Oracle have several ways of storing XML documents. One way of storing data where our XML doesn’t need to be altered, or where a portion of the XML can be extracted with XSLT, is to use XMLTYPE data casting.
We will ... | [
{
"code": null,
"e": 1081,
"s": 1062,
"text": "Problem Statement:"
},
{
"code": null,
"e": 1157,
"s": 1081,
"text": "You need to store native XML data into a relational table in your database."
},
{
"code": null,
"e": 1167,
"s": 1157,
"text": "Solution:"
},
... |
Kotlin Booleans | Very often, in programming, you will need a data type that can only have one of two values, like:
YES / NO
ON / OFF
TRUE / FALSE
For this, Kotlin has a Boolean data type, which can take the values true or false.
A boolean type can be declared with the Boolean keyword and can only take the values true or false:
val isKo... | [
{
"code": null,
"e": 98,
"s": 0,
"text": "Very often, in programming, you will need a data type that can only have one of two values, like:"
},
{
"code": null,
"e": 107,
"s": 98,
"text": "YES / NO"
},
{
"code": null,
"e": 116,
"s": 107,
"text": "ON / OFF"
},... |
How to remove everything before values starting after underscore from column values of an R data frame? | If a column in an R data frame contain string values that are separated with an underscore and stretches the size of the column values that also contain common values then it would be wise to remove underscore sign from all the values at once along with the values that is common. This will help us to read the data prop... | [
{
"code": null,
"e": 1468,
"s": 1062,
"text": "If a column in an R data frame contain string values that are separated with an underscore and stretches the size of the column values that also contain common values then it would be wise to remove underscore sign from all the values at once along with... |
How to Beat the CartPole Game in 5 Lines | by Jian Xu | Towards Data Science | CartPole is a game in the Open-AI Gym reinforced learning environment. It is widely used in many text-books and articles to illustrate the power of machine learning. However, all these machine learning methods require a decent amount of coding and lots of computing power to train. Is there any simpler solution?
The ans... | [
{
"code": null,
"e": 485,
"s": 172,
"text": "CartPole is a game in the Open-AI Gym reinforced learning environment. It is widely used in many text-books and articles to illustrate the power of machine learning. However, all these machine learning methods require a decent amount of coding and lots of... |
Program to find largest perimeter triangle using Python | Suppose we have an array nums of positive lengths, we have to find the largest perimeter of a triangle, by taking three values from that array. When it is impossible to form any triangle of non-zero area, then return 0.
So, if the input is like [8,3,6,4,2,5], then the output will be 19.
To solve this, we will follow th... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "Suppose we have an array nums of positive lengths, we have to find the largest perimeter of a triangle, by taking three values from that array. When it is impossible to form any triangle of non-zero area, then return 0."
},
{
"code": null,
"... |
What are type specifiers in C++? | When you first declare a variable in a statically typed language such as C++ you must declare what that variable is going to hold.
int number = 42;
In that example, the "int" is a type specifier stating that the variable "number" can only hold integer numbers. In dynamically typed languages such as ruby or javascript, ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "When you first declare a variable in a statically typed language such as C++ you must declare what that variable is going to hold."
},
{
"code": null,
"e": 1210,
"s": 1193,
"text": "int number = 42;"
},
{
"code": null,
"e... |
Best way to find length of JSON object in JavaScript | Suppose we have an object like this −
const obj = {
name: "Ramesh",
age: 34,
occupation: "HR Manager",
address: "Tilak Nagar, New Delhi",
experience: 13
};
We are required to write a JavaScript function on Objects that computes their size (i.e., the
number of properties in it).
The code for this will be ... | [
{
"code": null,
"e": 1100,
"s": 1062,
"text": "Suppose we have an object like this −"
},
{
"code": null,
"e": 1233,
"s": 1100,
"text": "const obj = {\n name: \"Ramesh\",\n age: 34,\n occupation: \"HR Manager\",\n address: \"Tilak Nagar, New Delhi\",\n experience: 13\n};... |
How to catch syntax errors in JavaScript? | You cannot use try-catch blocks for handling syntax errors in JavaScript since it is thrown while the code is being parsed.
Use window.onerror as in the following code −
<html>
<head>
<script>
window.onerror = function(e) {
document.write('Error: ', e, '</br>')
};
</script>
... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "You cannot use try-catch blocks for handling syntax errors in JavaScript since it is thrown while the code is being parsed."
},
{
"code": null,
"e": 1232,
"s": 1186,
"text": "Use window.onerror as in the following code −"
},
{
... |
C++ Library - <typeinfo> | It defines in header and related to operators typeid and dynamic_cast.
Following is the declaration for std::type_info.
class type_info;
class type_info;
It contains type information.
It throws an exception on failure to dynamic cast.
It throws an exception on typeid of null point.
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2674,
"s": 2603,
"text": "It defines in header and related to operators typeid and dynamic_cast."
},
{
"code": null,
"e": 2723,
"s": 2674,
"text": "Following is the declaration for std::type_info."
},
{
"code": null,
"e": 2740,
"s": 2723,
... |
Perl - Operators | Simple answer can be given using the expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator. Perl language supports many operator types, but following is a list of important and most frequently used operators −
Arithmetic Operators
Equality Operators
Logical Operators
Assignment Opera... | [
{
"code": null,
"e": 2466,
"s": 2220,
"text": "Simple answer can be given using the expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator. Perl language supports many operator types, but following is a list of important and most frequently used operators −"
},
... |
Python Number atan() Method | Python number method atan() returns the arc tangent of x, in radians.
Following is the syntax for atan() method −
atan(x)
Note − This function is not accessible directly, so we need to import math module and then we need to call this function using math static object.
x − This must be a numeric value.
x − This must b... | [
{
"code": null,
"e": 2315,
"s": 2244,
"text": "Python number method atan() returns the arc tangent of x, in radians."
},
{
"code": null,
"e": 2359,
"s": 2315,
"text": "Following is the syntax for atan() method −"
},
{
"code": null,
"e": 2368,
"s": 2359,
"text... |
MFC - Edit Box | An Edit Box is a rectangular child window in which the user can enter text. It is represented by CEdit class.
CanUndo
Determines whether an edit-control operation can be undone.
CharFromPos
Retrieves the line and character indexes for the character closest to a specified position.
Clear
Deletes (clears) the current sel... | [
{
"code": null,
"e": 2177,
"s": 2067,
"text": "An Edit Box is a rectangular child window in which the user can enter text. It is represented by CEdit class."
},
{
"code": null,
"e": 2185,
"s": 2177,
"text": "CanUndo"
},
{
"code": null,
"e": 2245,
"s": 2185,
"t... |
C++ Program To Find Length Of The Longest Substring Without Repeating Characters | 20 Dec, 2021
Given a string str, find the length of the longest substring without repeating characters.
For “ABDEFGABEF”, the longest substring are “BDEFGA” and “DEFGAB”, with length 6.
For “BBBB” the longest substring is “B”, with length 1.
For “GEEKSFORGEEKS”, there are two longest substrings shown in the below diag... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 144,
"s": 52,
"text": "Given a string str, find the length of the longest substring without repeating characters. "
},
{
"code": null,
"e": 226,
"s": 144,
"text": "For “ABDEFGAB... |
How to trim all strings in an array in PHP ? | 09 Jul, 2021
Given a string array with white spaces, the task is to remove all white spaces from every object of an array.Examples:
Input: arr = ["Geeks ", " for", " Geeks "]
Output:
Geeks
for
Geeks
Method 1: Using trim() and array_walk() function:
trim() Function: The trim() function is an inbuilt function wh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 173,
"s": 52,
"text": "Given a string array with white spaces, the task is to remove all white spaces from every object of an array.Examples: "
},
{
"code": null,
"e": 245,
"s": 17... |
Find k-th smallest element in BST (Order Statistics in BST) | 16 Jun, 2022
Given the root of a binary search tree and K as input, find Kth smallest element in BST. For example, in the following BST, if k = 3, then the output should be 10, and if k = 5, then the output should be 14.
Method 1: Using Inorder Traversal (O(n) time and O(h) auxiliary space)
The Inorder Traversal of a ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 262,
"s": 54,
"text": "Given the root of a binary search tree and K as input, find Kth smallest element in BST. For example, in the following BST, if k = 3, then the output should be 10, and if k =... |
How to unzip a file using PHP ? | 22 Jun, 2020
To unzip a file with PHP, we can use the ZipArchive class. ZipArchive is a simple utility class for zipping and unzipping files. We don’t require any extra additional plugins for working with zip files. ZipArchive class provides us a facility to create a zip file or to extract the existing zip file. The Zi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 632,
"s": 28,
"text": "To unzip a file with PHP, we can use the ZipArchive class. ZipArchive is a simple utility class for zipping and unzipping files. We don’t require any extra additional plugins ... |
C strings conversion to Python | 02 Apr, 2019
For C strings represented as a pair char *, int, it is to decide whether or not – the string presented as a raw byte string or as a Unicode string.
Byte objects can be built using Py_BuildValue() as
// Pointer to C string datachar *s; // Length of data int len; // Make a bytes objectPyObject *obj = Py_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Apr, 2019"
},
{
"code": null,
"e": 176,
"s": 28,
"text": "For C strings represented as a pair char *, int, it is to decide whether or not – the string presented as a raw byte string or as a Unicode string."
},
{
"code": null,... |
Why global array has a larger size than the local array? | 09 Jul, 2021
An array in any programming language is a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using array indices. It can be used to store the collection of primitive data types such as int, float, double, char, etc of any particular type. For exampl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 487,
"s": 54,
"text": "An array in any programming language is a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using array indices. It... |
Convert to a string that is repetition of a substring of k length | 06 Jul, 2022
Given a string, find if it is possible to convert it to a string that is the repetition of a substring with k characters. To convert, we can replace one substring of length k starting at index i (zero-based indexing) such that i is divisible by K, with k characters.
Examples:
Input: str = "bdac", k = 2
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 321,
"s": 54,
"text": "Given a string, find if it is possible to convert it to a string that is the repetition of a substring with k characters. To convert, we can replace one substring of length k... |
Flutter – InkWell Widget | 22 Mar, 2021
InkWell is the material widget in flutter. It responds to the touch action as performed by the user. Inkwell will respond when the user clicks the button. There are so many gestures like double-tap, long press, tap down, etc. Below are the so many properties of this widget. We can set the radius of the ink... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 502,
"s": 52,
"text": "InkWell is the material widget in flutter. It responds to the touch action as performed by the user. Inkwell will respond when the user clicks the button. There are so many g... |
Dynamic AutoCompleteTextView in Kotlin | 28 Mar, 2022
Android AutoCompleteTextView is an editable text view which shows a list of suggestions when user starts typing text. When a user starts typing, a dropdown menu will be there based on the entered characters, defined in threshold limit and user can choose an item from list to replace the text.
The AutoCompl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Android AutoCompleteTextView is an editable text view which shows a list of suggestions when user starts typing text. When a user starts typing, a dropdown menu will be there ... |
Runtime Errors | 30 Sep, 2020
A runtime error in a program is an error that occurs while the program is running after being successfully compiled.
Runtime errors are commonly called referred to as “bugs” and are often found during the debugging process before the software is released.
When runtime errors occur after a program has been ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Sep, 2020"
},
{
"code": null,
"e": 169,
"s": 52,
"text": "A runtime error in a program is an error that occurs while the program is running after being successfully compiled."
},
{
"code": null,
"e": 308,
"s": 169,
... |
Minimum labelled node to be removed from undirected Graph such that there is no cycle | 09 Aug, 2021
Given an undirected graph of N nodes labelled from 1 to N, the task is to find the minimum labelled node that should be removed from the graph such that the resulting graph has no cycle.
Note: If the initial graph has no cycle, i.e. no node needs to be removed, print -1.
Examples:
Input: N = 5, edges[][... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 242,
"s": 54,
"text": "Given an undirected graph of N nodes labelled from 1 to N, the task is to find the minimum labelled node that should be removed from the graph such that the resulting graph h... |
Creating a C/C++ Code Formatting tool with help of Clang tools | 16 Jul, 2020
Today we are going to discuss formatting files in the user’s workspace by their extension. For this we are going to make use of Clang’s format tools.
Prerequisites:
Linux Machine
Python
Clang Tool
Setup:
Install Python using the following command:sudo apt-get install python
sudo apt-get install python
Inst... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Today we are going to discuss formatting files in the user’s workspace by their extension. For this we are going to make use of Clang’s format tools."
},
{
"code": nu... |
Difference between Information and Knowledge | 04 Oct, 2019
Information:Information is delineate because the structured, organized and processed data, conferred inside context, that makes it relevant and helpful to the one who desires it. Data suggests that raw facts and figures regarding individuals, places, or the other issue, that is expressed within the type of... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Oct, 2019"
},
{
"code": null,
"e": 391,
"s": 54,
"text": "Information:Information is delineate because the structured, organized and processed data, conferred inside context, that makes it relevant and helpful to the one who desires... |
PostgreSQL – User Defined Functions | 28 Aug, 2020
PostgreSQL uses the CREATE FUNCTION statement to develop user-defined functions.
Syntax:
CREATE FUNCTION function_name(p1 type, p2 type)
RETURNS type AS
BEGIN
-- logic
END;
LANGUAGE language_name;
Let’s analyze the above syntax:
First, specify the name of the function after the CREATE FUNCTION keywords.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 109,
"s": 28,
"text": "PostgreSQL uses the CREATE FUNCTION statement to develop user-defined functions."
},
{
"code": null,
"e": 228,
"s": 109,
"text": "Syntax: \nCREATE FUNCTION... |
MySQL Select Multiple VALUES? | To select multiple values, you can use where clause with OR and IN operator.
The syntax is as follows −
select *from yourTablename where yourColumnName = value1 or yourColumnName = value2 or yourColumnName = value3,.........N;
select *from yourTableName where yourColumnName IN(value1,value2,....N);
To understand the ab... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To select multiple values, you can use where clause with OR and IN operator."
},
{
"code": null,
"e": 1166,
"s": 1139,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1289,
"s": 1166,
"text": "select ... |
A hard lesson on Filter Context with Power BI and DAX | by Salvatore Cagliari | Towards Data Science | Last week a client asked me to analyse a difference between the displayed total in a Power BI report and the sum of the values after exporting them to Excel. This task turned out to be very challenging, and in the end, the difference was due to how Power BI and DAX works and how it calculates the numbers. In short: how... | [
{
"code": null,
"e": 519,
"s": 172,
"text": "Last week a client asked me to analyse a difference between the displayed total in a Power BI report and the sum of the values after exporting them to Excel. This task turned out to be very challenging, and in the end, the difference was due to how Power ... |
Binary Search Tree insert with Parent Pointer - GeeksforGeeks | 25 Oct, 2021
We have discussed simple BST insert. How to insert in a tree where parent pointer needs to be maintained. Parent pointers are helpful to quickly find ancestors of a node, LCA of two nodes, successor of a node, etc.
In recursive calls of simple insertion, we return pointer of root of subtree created in a s... | [
{
"code": null,
"e": 25226,
"s": 25198,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 25442,
"s": 25226,
"text": "We have discussed simple BST insert. How to insert in a tree where parent pointer needs to be maintained. Parent pointers are helpful to quickly find ancestors of ... |
Binary Indexed Tree or Fenwick Tree - GeeksforGeeks | 14 Jan, 2022
Let us consider the following problem to understand Binary Indexed Tree.We have an array arr[0 . . . n-1]. We would like to 1 Compute the sum of the first i elements. 2 Modify the value of a specified element of the array arr[i] = x where 0 <= i <= n-1.A simple solution is to run a loop from 0 to i-1 and c... | [
{
"code": null,
"e": 24666,
"s": 24638,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 26342,
"s": 24666,
"text": "Let us consider the following problem to understand Binary Indexed Tree.We have an array arr[0 . . . n-1]. We would like to 1 Compute the sum of the first i elemen... |
Sparse Set - GeeksforGeeks | 11 Oct, 2021
How to do the following operations efficiently if there are large number of queries for them.
InsertionDeletionSearchingClearing/Removing all the elements.
Insertion
Deletion
Searching
Clearing/Removing all the elements.
One solution is to use a Self-Balancing Binary Search Tree like Red-Black Tree, AVL T... | [
{
"code": null,
"e": 24097,
"s": 24069,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24192,
"s": 24097,
"text": "How to do the following operations efficiently if there are large number of queries for them. "
},
{
"code": null,
"e": 24254,
"s": 24192,
"tex... |
Convert a String to a Singly Linked List - GeeksforGeeks | 19 Jul, 2021
Given string str, the task is to convert it into a singly Linked List.Examples:
Input: str = "ABCDABC"
Output: A -> B -> C -> D -> A -> B -> C
Input: str = "GEEKS"
Output: G -> E -> E -> K -> S
Approach:
Create a Linked List
Fetch each character of the string and insert into a new node in the Linked... | [
{
"code": null,
"e": 24828,
"s": 24800,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 24910,
"s": 24828,
"text": "Given string str, the task is to convert it into a singly Linked List.Examples: "
},
{
"code": null,
"e": 25025,
"s": 24910,
"text": "Input: s... |
An Introduction to Clustering Algorithms in Python | by Jake Huneycutt | Towards Data Science | In data science, we often think about how to use data to make predictions on new data points. This is called “supervised learning.” Sometimes, however, rather than ‘making predictions’, we instead want to categorize data into buckets. This is termed “unsupervised learning.”
To illustrate the difference, let’s say we’re... | [
{
"code": null,
"e": 447,
"s": 172,
"text": "In data science, we often think about how to use data to make predictions on new data points. This is called “supervised learning.” Sometimes, however, rather than ‘making predictions’, we instead want to categorize data into buckets. This is termed “unsu... |
Insert more than one element at once in a C# List | Use the InsertRange() method to insert a list in between the existing lists in C#. Through this, you can easily add more than one element to the existing list.
Let us first set a list −
List<int> arr1 = new List<int>();
arr1.Add(10);
arr1.Add(20);
arr1.Add(30);
arr1.Add(40);
arr1.Add(50);
Now, let us set an array. The ... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "Use the InsertRange() method to insert a list in between the existing lists in C#. Through this, you can easily add more than one element to the existing list."
},
{
"code": null,
"e": 1248,
"s": 1222,
"text": "Let us first set a lis... |
Three Ways to Create Dockernized LaTeX Environment | by Shinichi Okada | Towards Data Science | Table of ContentsIntroduction1. Setup2. Method 1: tianon/latex3. Method 2: Remote-Containers4. Method 3: Creating your container5. How to switch Remote containers6. Opening a PDFConclusion
We can run a Docker application in any environment, Linux, Windows, or Mac. Docker provides a set of official base images for the m... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "Table of ContentsIntroduction1. Setup2. Method 1: tianon/latex3. Method 2: Remote-Containers4. Method 3: Creating your container5. How to switch Remote containers6. Opening a PDFConclusion"
},
{
"code": null,
"e": 657,
"s": 361,
"text"... |
How to find absolute difference between two numbers in MySQL? | To get the difference between two number in MySQL, let us first create a demo table
mysql> create table findDifferenceDemo
-> (
-> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> FirstNumber float,
-> SecondNumber float
-> );
Query OK, 0 rows affected (0.60 sec)
Insert some records in the table using inse... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To get the difference between two number in MySQL, let us first create a demo table"
},
{
"code": null,
"e": 1339,
"s": 1146,
"text": "mysql> create table findDifferenceDemo\n -> (\n -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,... |
Implementing Optical Character Recognition (OCR) using pytesseract | by Nurali Uzakaliyev | Towards Data Science | Greetings fellow python enthusiasts, I would like to share with you a simple, but very effective OCR service, using pytesseract and with a web interface via Flask.
Optical Character Recognition (OCR) can be useful for a variety of purposes, such as credit card scan for payment purposes, or converting .jpeg scan of a do... | [
{
"code": null,
"e": 211,
"s": 47,
"text": "Greetings fellow python enthusiasts, I would like to share with you a simple, but very effective OCR service, using pytesseract and with a web interface via Flask."
},
{
"code": null,
"e": 382,
"s": 211,
"text": "Optical Character Recog... |
How to install the MSI package using PowerShell DSC? | To install the MSI package using DSC, we need to use the DSC resource “Package”. Let see which properties are available for this resource.
PS C:\> Get-DscResource -Name Package | Select -ExpandProperty Properties
Name PropertyType IsMandatory Values
---- ------------ ----------- ------
Name [string] True {}
Path [stri... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "To install the MSI package using DSC, we need to use the DSC resource “Package”. Let see which properties are available for this resource."
},
{
"code": null,
"e": 1656,
"s": 1201,
"text": "PS C:\\> Get-DscResource -Name Package | Se... |
Beautiful correlation plots in R — a new approach | by Stefan Haring | Towards Data Science | Everyone working with data knows that beautiful and explanatory visualization is key. After all, it's much easier to tell a story with a chart than it is with a plain table. This is especially important when you’re creating reports and dashboards whose aim it is to give your users and clients a quick overview over some... | [
{
"code": null,
"e": 528,
"s": 171,
"text": "Everyone working with data knows that beautiful and explanatory visualization is key. After all, it's much easier to tell a story with a chart than it is with a plain table. This is especially important when you’re creating reports and dashboards whose ai... |
How to find which Python modules are being imported from a package? | To find all the python modules from a particular package that are being used in an application, you can use the sys.modules dict. sys.modules is a dictionary mapping module names to modules. You can examine its keys to see imported modules.
For example,
>>> from datetime import datetime
>>> import sys
>>> print sys.mod... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "To find all the python modules from a particular package that are being used in an application, you can use the sys.modules dict. sys.modules is a dictionary mapping module names to modules. You can examine its keys to see imported modules."
},
{
... |
Entity Framework - Explicit Loading | When you disabled the lazy loading, it is still possible to lazily load related entities, but it must be done with an explicit call.
Unlike lazy loading, there is no ambiguity or possibility of confusion regarding when a query is run.
Unlike lazy loading, there is no ambiguity or possibility of confusion regarding when... | [
{
"code": null,
"e": 3165,
"s": 3032,
"text": "When you disabled the lazy loading, it is still possible to lazily load related entities, but it must be done with an explicit call."
},
{
"code": null,
"e": 3267,
"s": 3165,
"text": "Unlike lazy loading, there is no ambiguity or pos... |
How to Get the IP Address of a Docker Container? - GeeksforGeeks | 28 Oct, 2020
If you want multiple Docker Containers to talk to each other, they can form a Bridge Network. Each Container Network has its own Subnet mask to distribute IP addresses. The default subnet for a Docker Network is 172.17.0.0/16
In this article, we are going to discuss the different ways you can use to know t... | [
{
"code": null,
"e": 24148,
"s": 24120,
"text": "\n28 Oct, 2020"
},
{
"code": null,
"e": 24374,
"s": 24148,
"text": "If you want multiple Docker Containers to talk to each other, they can form a Bridge Network. Each Container Network has its own Subnet mask to distribute IP addre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.