title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Difference Between == and .equals() Method in Java - GeeksforGeeks | 23 Feb, 2022
Both equals() method and the == operator are used to compare two objects in Java. == is an operator and equals() is method. But == operator compares reference or memory location of objects in a heap, whether they point to the same location or not.Whenever we create an object using the operator new, it will... | [
{
"code": null,
"e": 25787,
"s": 25759,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 26239,
"s": 25787,
"text": "Both equals() method and the == operator are used to compare two objects in Java. == is an operator and equals() is method. But == operator compares reference or m... |
jQuery UI Tooltips hide option - GeeksforGeeks | 25 Feb, 2021
jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery UI tooltip widget helps us to add new themes and allows for customization. In this article, we will see how to use hide option in jQu... | [
{
"code": null,
"e": 52596,
"s": 52568,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 53031,
"s": 52596,
"text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpag... |
GATE | GATE-CS-2017 (Set 2) | Question 61 - GeeksforGeeks | 09 Sep, 2021
Consider the following database table named top_scorer.
Consider the following SQL query:
SELECT ta.player FROM top_scorer AS ta
WHERE ta.goals > ALL ( SELECT tb.goals
FROM top_scorer AS tb
WHERE tb.country = 'Spain' )
AND ta.goals > ANY (SELECT tc.goals
FROM top_sc... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 25751,
"s": 25695,
"text": "Consider the following database table named top_scorer."
},
{
"code": null,
"e": 25785,
"s": 25751,
"text": "Consider the following SQL query:"... |
Python Tweepy – Getting the language of a tweet - GeeksforGeeks | 21 Jun, 2020
In this article we will see how we can fetch the language of a tweet/status. The lang attribute of the Status object indicates the language of the status. The language is indicated in the language code example, English is en, Hindi is hi.
In order to get the language of the status, we have to do the follow... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 25776,
"s": 25537,
"text": "In this article we will see how we can fetch the language of a tweet/status. The lang attribute of the Status object indicates the language of the status. The lang... |
Smallest Subarray with Sum K from an Array - GeeksforGeeks | 19 Apr, 2022
Given an array arr[] consisting of N integers, the task is to find the length of the Smallest subarray with a sum equal to K.
Examples:
Input: arr[] = {2, 4, 6, 10, 2, 1}, K = 12 Output: 2 Explanation: All possible subarrays with sum 12 are {2, 4, 6} and {10, 2}.
Input: arr[] = {-8, -8, -3, 8}, K = 5 Outpu... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 26193,
"s": 26067,
"text": "Given an array arr[] consisting of N integers, the task is to find the length of the Smallest subarray with a sum equal to K."
},
{
"code": null,
"e": ... |
Delete N nodes after M nodes of a linked list - GeeksforGeeks | 30 Mar, 2022
Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes then delete next N nodes, continue the same till end of the linked list.Difficulty Level: Rookie Examples:
Input:
M = 2, N = 2
Linked List: 1->2->3->4->5->6->7->8
Output:
Linked List: 1->2->5->6
Input:
M ... | [
{
"code": null,
"e": 26149,
"s": 26121,
"text": "\n30 Mar, 2022"
},
{
"code": null,
"e": 26358,
"s": 26149,
"text": "Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes then delete next N nodes, continue the same till end of the lin... |
DecimalFormat applyPattern() method in Java - GeeksforGeeks | 01 Apr, 2019
The applyPattern() Method of DecimalFormat class in Java is used to apply a given string pattern to this Decimal format. This pattern can be set by the user.
Syntax:
public void applyPattern(String pattern)
Parameters: The method takes one parameter pattern of String type and refers to the pattern which w... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n01 Apr, 2019"
},
{
"code": null,
"e": 25383,
"s": 25225,
"text": "The applyPattern() Method of DecimalFormat class in Java is used to apply a given string pattern to this Decimal format. This pattern can be set by the user."
},... |
How To Make Heatmaps in R with ComplexHeatmap? - GeeksforGeeks | 17 Oct, 2021
Heatmap is a Visualization technique in the form of a matrix. It is mainly used for analyzing the numeric feature in a dataset and to visualize the trend over the data. This technique can highlight the range of values using color intensity i.e it indicates higher values with brighter colors and the color g... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n17 Oct, 2021"
},
{
"code": null,
"e": 26833,
"s": 26487,
"text": "Heatmap is a Visualization technique in the form of a matrix. It is mainly used for analyzing the numeric feature in a dataset and to visualize the trend over the ... |
Python | math.sin() function - GeeksforGeeks | 20 Mar, 2019
In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.sin() function returns the sine of value passed as argument. The value passed in this function should be in radians.
Syntax: math.sin(x)
Parameter:x : value to be passed to sin()
Ret... | [
{
"code": null,
"e": 25463,
"s": 25435,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 25705,
"s": 25463,
"text": "In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.sin() function returns the sine of val... |
Program for Conway's Game Of Life - GeeksforGeeks | 26 Apr, 2022
Initially, there is a grid with some cells which may be alive or dead. Our task is to generate the next generation of cells based on the following rules:
Any live cell with fewer than two live neighbors dies as if caused by underpopulation.Any live cell with two or three live neighbors lives on to the ne... | [
{
"code": null,
"e": 26133,
"s": 26105,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 26289,
"s": 26133,
"text": "Initially, there is a grid with some cells which may be alive or dead. Our task is to generate the next generation of cells based on the following rules: "
},
... |
TopAppBar in Android using Jetpack Compose - GeeksforGeeks | 25 Feb, 2021
TopAppBar is similar to that of the Action Bar widget in Android. This is one of the most UI components in Android. The action bar is used to represent the app name and action items in Android. In this article, we will take a look at the implementation of the TopAppBar in Android using Jetpack compose.
At... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 26686,
"s": 26381,
"text": "TopAppBar is similar to that of the Action Bar widget in Android. This is one of the most UI components in Android. The action bar is used to represent the app nam... |
Firebase Integration With Web - GeeksforGeeks | 14 Jul, 2021
Firebase is a platform developed by Google for creating mobile and web applications. We will see how to integrate or connect firebase with our sample Web application.
Approach: Follow the below steps to integrate your web app with firebase.
Firstly we will create a HTML page in the index.html file.
Once th... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 26306,
"s": 26139,
"text": "Firebase is a platform developed by Google for creating mobile and web applications. We will see how to integrate or connect firebase with our sample Web applicati... |
Interpreting Machine Learning Model | by Marcos Silva | Towards Data Science | In this series of 6 posts we will leave the basics of prediction aside and look at a more handcrafted aspect of data science and machine learning, such as interpreting, gaining insights, and understanding what goes on within algorithms. It is not a trivial matter and is far from exhausted.In this series of posts we’ll ... | [
{
"code": null,
"e": 661,
"s": 172,
"text": "In this series of 6 posts we will leave the basics of prediction aside and look at a more handcrafted aspect of data science and machine learning, such as interpreting, gaining insights, and understanding what goes on within algorithms. It is not a trivia... |
Explain naming conventions for packages in java? | While choosing a package name you need to keep the following points in mind.
The name of the package should be in small letters.
It is suggested to start the name of the package with the top level domain level followed by sub domains, ex: com.example.tutorialspoint.
You can declare a package as −
package com.mypackage.... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "While choosing a package name you need to keep the following points in mind."
},
{
"code": null,
"e": 1191,
"s": 1139,
"text": "The name of the package should be in small letters."
},
{
"code": null,
"e": 1329,
"s": 1... |
Deploying time series forecasting models at scale (Part I) | by Isaac Godfried | Towards Data Science | Deploying machine learning models remains a sticking point for many companies and time series forecasting models are no exception. According to VentureBeat around 90% of models never make it into production. While there might be many reasons for this (e.g. models were exploratory in nature and the end goal was never pr... | [
{
"code": null,
"e": 659,
"s": 172,
"text": "Deploying machine learning models remains a sticking point for many companies and time series forecasting models are no exception. According to VentureBeat around 90% of models never make it into production. While there might be many reasons for this (e.g... |
Maximum Width of Tree | Practice | GeeksforGeeks | Given a Binary Tree, find the maximum width of it. Maximum width is defined as the maximum number of nodes in any level.
For example, maximum width of following tree is 4 as there are 4 nodes at 3rd level.
1
/ \
2 3
/ \ / \
4 5 6 7
\
8
Example 1:
Input:
... | [
{
"code": null,
"e": 444,
"s": 238,
"text": "Given a Binary Tree, find the maximum width of it. Maximum width is defined as the maximum number of nodes in any level.\nFor example, maximum width of following tree is 4 as there are 4 nodes at 3rd level."
},
{
"code": null,
"e": 539,
"s... |
Day of the Week in C++ | Suppose we have a date (day, month and year). From this date, we have to find the day of the week of that given date. To solve this we will use Zeller’s Algorithm. The formula to find weekday using Zeller’s Algorithm is here
w=⟮d+⌊13(m+1)5⌋+y+⌊y4⌋+⌊c4⌋+5c⟯mod7
The formula is containing some variables; They are −
d − Th... | [
{
"code": null,
"e": 1287,
"s": 1062,
"text": "Suppose we have a date (day, month and year). From this date, we have to find the day of the week of that given date. To solve this we will use Zeller’s Algorithm. The formula to find weekday using Zeller’s Algorithm is here"
},
{
"code": null,
... |
Javascript Generator Yield/Next vs Async-Await Overview and Comparison | by Deepak Gupta | Towards Data Science | Functions that can return multiple values at different time interval, as per the user demands and can manage its internal state are generator functions. A function becomes a GeneratorFunction if it uses the function* syntax.
They are different from normal functions in the sense that normal function run to completion in... | [
{
"code": null,
"e": 396,
"s": 171,
"text": "Functions that can return multiple values at different time interval, as per the user demands and can manage its internal state are generator functions. A function becomes a GeneratorFunction if it uses the function* syntax."
},
{
"code": null,
... |
A Sweet Python hack to Cut Work in Half: Automate Your Execution | by Normaler Mensch | Towards Data Science | Abstract: This article covers how to schedule your regular python scripts. Assuming that you
Get updated excel reports every day/week/month into a shared Network or emailHave a python script that is up and running to processes your reports and deliver insights in the form of images, worksheets, or other forms of data.W... | [
{
"code": null,
"e": 265,
"s": 172,
"text": "Abstract: This article covers how to schedule your regular python scripts. Assuming that you"
},
{
"code": null,
"e": 613,
"s": 265,
"text": "Get updated excel reports every day/week/month into a shared Network or emailHave a python sc... |
A Practical Guide to Data Visualization | by Soner Yıldırım | Towards Data Science | We live in the era of big data. We can collect lots of data which allows to infer meaningful results and make informed business decisions. However, as the amount of data increases, it gets trickier to analyze and explore the data. There comes in the power of visualizations which are great tools in exploratory data anal... | [
{
"code": null,
"e": 831,
"s": 172,
"text": "We live in the era of big data. We can collect lots of data which allows to infer meaningful results and make informed business decisions. However, as the amount of data increases, it gets trickier to analyze and explore the data. There comes in the power... |
Tryit Editor v3.7 | Tryit: HTML internal CSS | [] |
Variadic Functions in Go | 07 Jul, 2021
The function that called with the varying number of arguments is known as variadic function. Or in other words, a user is allowed to pass zero or more arguments in the variadic function. fmt.Printf is the example of the variadic function, it required one fixed argument at the starting after that it can acc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "The function that called with the varying number of arguments is known as variadic function. Or in other words, a user is allowed to pass zero or more arguments in the variadi... |
TCS Placement Paper | MCQ 2 | 07 Jul, 2022
This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly follows the pattern of questions asked in TCS interviews. It is recommended to solve each one of the following questions to increase yo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 404,
"s": 54,
"text": "This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly fo... |
rename - Unix, Linux Command | For example, given the files
foo1, ..., foo9, foo10, ..., foo278, the commands
rename foo foo0 foo?
rename foo foo0 foo??
will turn them into
foo001, ..., foo009, foo010, ..., foo278.
And
rename .htm .html *.htm
will fix the extension of your html files. | [
{
"code": null,
"e": 10792,
"s": 10711,
"text": "\nFor example, given the files\nfoo1, ..., foo9, foo10, ..., foo278, the commands\n"
},
{
"code": null,
"e": 10838,
"s": 10794,
"text": "rename foo foo0 foo?\nrename foo foo0 foo??\n"
},
{
"code": null,
"e": 10902,
... |
Generalized Suffix Tree 1 | 12 Sep, 2021
In earlier suffix tree articles, we created suffix tree for one string and then we queried that tree for substring check, searching all patterns, longest repeated substring and built suffix array (All linear time operations).There are lots of other problems where multiple strings are involved. e.g. pattern... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Sep, 2021"
},
{
"code": null,
"e": 1742,
"s": 54,
"text": "In earlier suffix tree articles, we created suffix tree for one string and then we queried that tree for substring check, searching all patterns, longest repeated substring ... |
Ruby | Arrays | 19 May, 2021
An array is a collection of different or similar items, stored at contiguous memory locations. The idea is to store multiple items of the same type together which can be referred to by a common name. In Ruby, numbers, strings, etc all are primitive types but arrays are of objects type i.e arrays are the co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 616,
"s": 28,
"text": "An array is a collection of different or similar items, stored at contiguous memory locations. The idea is to store multiple items of the same type together which can be refer... |
Stat command in Linux with examples | 23 Aug, 2021
The stat is a command which gives information about the file and filesystem. Stat command gives information such as the size of the file, access permissions and the user ID and group ID, birth time access time of the file. Stat command has another feature, by which it can also provide the file system info... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 440,
"s": 53,
"text": "The stat is a command which gives information about the file and filesystem. Stat command gives information such as the size of the file, access permissions and the user ID ... |
Possible to form a triangle from array values | 07 Jul, 2022
Given an array of integers, we need to find out whether it is possible to construct at least one non-degenerate triangle using array values as its sides. In other words, we need to find out 3 such array indices which can become sides of a non-degenerate triangle.
Examples :
Input : [4, 1, 2]
Output : No ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 317,
"s": 52,
"text": "Given an array of integers, we need to find out whether it is possible to construct at least one non-degenerate triangle using array values as its sides. In other words, we n... |
Rexx - drop | This function is used to un assign a variable.
drop variable_name
variable_name − The variable which needs to be dropped.
variable_name − The variable which needs to be dropped.
None
/* Main program */
options arexx_bifs
a = 5
say a
drop a
say a
When we run the above program we will get the following result.
5 ... | [
{
"code": null,
"e": 2520,
"s": 2473,
"text": "This function is used to un assign a variable."
},
{
"code": null,
"e": 2541,
"s": 2520,
"text": "drop variable_name \n"
},
{
"code": null,
"e": 2597,
"s": 2541,
"text": "variable_name − The variable which needs t... |
Print equal sum sets of array (Partition problem) | Set 1 | 03 Jun, 2021
Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both the sets is equal. If it is possible, then print both the sets. If it is not possible then output -1.
Examples :
Input : arr = {5, 5, 1, 11}
Output : Set 1 = {5, 5, 1},
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 282,
"s": 54,
"text": "Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both the sets is equal. If it is possible, then print... |
Insertion Sort in C# | Insertion Sort is a sorting algorithm that takes an element at a time and inserts it in its correct position in the array. This process is continued until the array is sorted.
A program that demonstrates insertion sort in C# is given as follows.
Live Demo
using System;
namespace InsertionSortDemo {
class Example {
... | [
{
"code": null,
"e": 1363,
"s": 1187,
"text": "Insertion Sort is a sorting algorithm that takes an element at a time and inserts it in its correct position in the array. This process is continued until the array is sorted."
},
{
"code": null,
"e": 1433,
"s": 1363,
"text": "A prog... |
GATE | GATE CS 2019 | Question 21 | 20 Sep, 2021
Which one of the following is NOT a valid identity?
(A) (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)(B) (x + y) ⊕ z = x ⊕ (y + z)(C) x ⊕ y = x + y, if xy = 0(D) x ⊕ y = (xy + x′y′)′Answer: (B)Explanation: According to Exor (⊕) operation,
Therefore, option (D),
x⊕y
= (x'y + xy′)
= (x'+y').(x+y)
= (x⊙y)'
= (xy + x′y′)′
It al... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 80,
"s": 28,
"text": "Which one of the following is NOT a valid identity?"
},
{
"code": null,
"e": 247,
"s": 80,
"text": "(A) (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)(B) (x + y) ⊕ z = x ⊕ (y + ... |
Python | Accessing Key-value in Dictionary | 27 Nov, 2018
Dictionary is quite a useful data structure in programming that is usually used to hash a particular key with value, so that they can be retrieved efficiently.
Let’s discuss various ways of accessing all the keys along with their values in Python Dictionary.
Method #1 : Using in operator
Most used method t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Nov, 2018"
},
{
"code": null,
"e": 214,
"s": 54,
"text": "Dictionary is quite a useful data structure in programming that is usually used to hash a particular key with value, so that they can be retrieved efficiently."
},
{
... |
Design a data structure that supports insert, delete, getRandom in O(1) with duplicates | 07 May, 2020
Design a Data Structure that can support the following operations in O(1) Time Complexity.
insert(x): Inserts x in the data structure. Returns True if x was not present and False if it was already present.remove(x): Removes x from the data structure, if present.getRandom(): Returns any value present in the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 May, 2020"
},
{
"code": null,
"e": 143,
"s": 52,
"text": "Design a Data Structure that can support the following operations in O(1) Time Complexity."
},
{
"code": null,
"e": 515,
"s": 143,
"text": "insert(x): Ins... |
Zombie and Orphan Processes in C | 29 May, 2017
Prerequisite: fork() in C
In the following code, the child finishes its execution using exit() system call while the parent sleeps for 50 seconds, hence doesn’t call wait() and the child process’s entry still exists in the process table.
// A C program to demonstrate Zombie Process. // Child becomes Zombie... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 80,
"s": 54,
"text": "Prerequisite: fork() in C"
},
{
"code": null,
"e": 292,
"s": 80,
"text": "In the following code, the child finishes its execution using exit() system call ... |
Cross Domain Referrer Header Leakage | 18 Sep, 2020
Referrer Header is a request header used to obtain information about what is the previous URL or link from which the current website is reached. This information is used in many typical business use cases. The referrer header as the name implies is used to obtain information about the URL that refers to th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Sep, 2020"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "Referrer Header is a request header used to obtain information about what is the previous URL or link from which the current website is reached. This information is used in ma... |
Popovers in bootstrap with examples | 28 Apr, 2022
A Bootstrap Popover is an attribute in bootstrap that can be used to make any website look more dynamic. Popovers are generally used to display additional information about any element and are displayed with a click of a mouse pointer over that element. In the popover, if you click on any element that you ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 490,
"s": 52,
"text": "A Bootstrap Popover is an attribute in bootstrap that can be used to make any website look more dynamic. Popovers are generally used to display additional information about a... |
Python – Map vs List comprehension | 30 Jan, 2020
Suppose we have a function and we want to compute this function for different values in a single line of code . This is where map() function plays its role ! map() function returns a map object(which is an iterator) of the results after applying the given function to each item of a given iterable (list, tu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 371,
"s": 54,
"text": "Suppose we have a function and we want to compute this function for different values in a single line of code . This is where map() function plays its role ! map() function r... |
MessageDigest isEqual() method in Java with Examples | 29 Jul, 2021
The isEqual() method of java.security.MessageDigest class is used to test if two message digest are equal or not.
Syntax:
public static boolean
isEqual(byte[] digesta, byte[] digestb)
Parameters: This method takes 2 byte arrays for comparison.Return Value: This method provides the Boolean value, true ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "The isEqual() method of java.security.MessageDigest class is used to test if two message digest are equal or not. "
},
{
"code": null,
"e": 153,
"s": 143,
... |
K Nearest Neighbors with Python | ML | 10 May, 2022
How It Works ? K-Nearest Neighbors is one of the most basic yet essential classification algorithms in Machine Learning. It belongs to the supervised learning domain and finds intense application in pattern recognition, data mining and intrusion detection. The K-Nearest Neighbors (KNN) algorithm is a simpl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 1422,
"s": 54,
"text": "How It Works ? K-Nearest Neighbors is one of the most basic yet essential classification algorithms in Machine Learning. It belongs to the supervised learning domain and fin... |
C# Program for Dijkstra’s shortest path algorithm | Greedy Algo-7 | 31 Oct, 2019
Given a graph and a source vertex in the graph, find shortest paths from source to all vertices in the given graph.
Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning tree. Like Prim’s MST, we generate a SPT (shortest path tree) with given source as root. We maintain two sets, on... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 168,
"s": 52,
"text": "Given a graph and a source vertex in the graph, find shortest paths from source to all vertices in the given graph."
},
{
"code": null,
"e": 628,
"s": 168,
... |
Calculate Median in MySQL | 14 Jul, 2020
Median :In statistics and probability theory, Median is a value separating the higher half from the lower half of a data sample, a population, or a probability distribution. In lay-man language, Median is the middle value of a sorted listed of values.
Calculate Median value in MySQL –Consider a table demo ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 306,
"s": 54,
"text": "Median :In statistics and probability theory, Median is a value separating the higher half from the lower half of a data sample, a population, or a probability distribution. ... |
How to sort a Numpy Array | Python | 11 May, 2020
In this article, we will learn how to sort a Numpy array. There are multiple ways in Numpy to sort an array, based on the requirement. Let’s try to understand them with the help of examples.
Example #1: Simply sort the given array based on axis using sort() method.
# importing librariesimport numpy as np ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 219,
"s": 28,
"text": "In this article, we will learn how to sort a Numpy array. There are multiple ways in Numpy to sort an array, based on the requirement. Let’s try to understand them with the he... |
PHP | filter_var() Function | 18 Nov, 2019
The filter_var() function filters a variable with the specified filter. This function is used to both validate and sanitize the data.
Syntax :-
filter_var(var, filtername, options)
Parameters: This function accepts three parameters and are described below:
var : It is the required field. It denotes the va... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Nov, 2019"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "The filter_var() function filters a variable with the specified filter. This function is used to both validate and sanitize the data."
},
{
"code": null,
"e": 172,... |
Closest Number | Practice | GeeksforGeeks | Given non-zero two integers N and M. The problem is to find the number closest to N and divisible by M. If there are more than one such number, then output the one having maximum absolute value.
Example 1:
Input:
N = 13 , M = 4
Output:
12
Explanation:
12 is the Closest Number to
13 which is divisible by 4.
Example 2:... | [
{
"code": null,
"e": 433,
"s": 238,
"text": "Given non-zero two integers N and M. The problem is to find the number closest to N and divisible by M. If there are more than one such number, then output the one having maximum absolute value."
},
{
"code": null,
"e": 446,
"s": 435,
... |
Bypass Anti-virus using Veil Framework | This article is intended to demonstrate, how to bypass the anti-virus detection using the Veil framework, as it is a collection of tools designed for use during penetration testing. It currently consists of the following modules −
Veil-Evasion − a tool to generate antivirus-evading payloads using a variety of technique... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "This article is intended to demonstrate, how to bypass the anti-virus detection using the Veil framework, as it is a collection of tools designed for use during penetration testing. It currently consists of the following modules −"
},
{
"code": ... |
Bisecting K-Means Algorithm — Clustering in Machine Learning | by Prakhar Mishra | Towards Data Science | Bisecting K-means clustering technique is a little modification to the regular K-Means algorithm, wherein you fix the procedure of dividing the data into clusters. So, similar to K-means, we first initialize K centroids (You can either do this randomly or can have some prior). After which we apply regular K-means with ... | [
{
"code": null,
"e": 972,
"s": 172,
"text": "Bisecting K-means clustering technique is a little modification to the regular K-Means algorithm, wherein you fix the procedure of dividing the data into clusters. So, similar to K-means, we first initialize K centroids (You can either do this randomly or... |
RNA Velocity: The Cell’s Internal Compass | by Jamshaid Shahir | Towards Data Science | Single-cell RNA sequencing (scRNA-seq) has revolutionized the way we study cell biology the past decade, ushering in the rapidly growing field of single-cell genomics. scRNA-seq allows us to profile the transcriptome of individual cells, gaining holistic insight into their function and identity. The transcriptome is th... | [
{
"code": null,
"e": 1718,
"s": 171,
"text": "Single-cell RNA sequencing (scRNA-seq) has revolutionized the way we study cell biology the past decade, ushering in the rapidly growing field of single-cell genomics. scRNA-seq allows us to profile the transcriptome of individual cells, gaining holistic... |
Cypress - Dropdown | The command select is used to work with static dropdown. In the html code, a dropdown has a select tag and the dropdown elements are represented by option tagname.
The dropdown related Cypress commands are as follows −
The command used to choose the option Cypress is as follows −
The command used to choose the option C... | [
{
"code": null,
"e": 2661,
"s": 2497,
"text": "The command select is used to work with static dropdown. In the html code, a dropdown has a select tag and the dropdown elements are represented by option tagname."
},
{
"code": null,
"e": 2716,
"s": 2661,
"text": "The dropdown relat... |
How to update a Python dictionary values? | Python’s in-built dictionary class has update() method. It takes another dictionary object as argument.
D1.update(D2)
D2 object is merged with D1. If D2 contains key that is already present in D1, its value is updated and if it is a new key, a new key-value pair is added. D1 will show updated contents.
>>> D1={"pen":25... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "Python’s in-built dictionary class has update() method. It takes another dictionary object as argument."
},
{
"code": null,
"e": 1180,
"s": 1166,
"text": "D1.update(D2)"
},
{
"code": null,
"e": 1366,
"s": 1180,
"t... |
Check for Integer Overflow in C++ | The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than either values added. So for example,
unsigned int x, y;
unsigned int va... | [
{
"code": null,
"e": 1348,
"s": 1062,
"text": "The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than eith... |
Data Mining - Decision Tree Induction | A decision tree is a structure that includes a root node, branches, and leaf nodes. Each internal node denotes a test on an attribute, each branch denotes the outcome of a test, and each leaf node holds a class label. The topmost node in the tree is the root node.
The following decision tree is for the concept buy_comp... | [
{
"code": null,
"e": 2375,
"s": 2110,
"text": "A decision tree is a structure that includes a root node, branches, and leaf nodes. Each internal node denotes a test on an attribute, each branch denotes the outcome of a test, and each leaf node holds a class label. The topmost node in the tree is the... |
Count half nodes in a Binary tree (Iterative and Recursive) - GeeksforGeeks | 28 Jan, 2022
Given A binary Tree, how do you count all the half nodes (which has only one child) without using recursion? Note leaves should not be touched as they have both children as NULL.
Input : Root of below tree
Output : 3
Nodes 7, 5 and 9 are half nodes as one of
their child is Null. So count of half nodes
in... | [
{
"code": null,
"e": 26445,
"s": 26417,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 26625,
"s": 26445,
"text": "Given A binary Tree, how do you count all the half nodes (which has only one child) without using recursion? Note leaves should not be touched as they have both ch... |
Amazing stuff with system() in C / C++ - GeeksforGeeks | 29 May, 2017
system() plays a very special role in executing Operating System Commands.By using this library function we can run all those terminal commands that our Operating System allows us to perform, just by using our C program.
Now, we will learn a very simple code to fetch the IP Address – to identify each compu... | [
{
"code": null,
"e": 24208,
"s": 24180,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 24429,
"s": 24208,
"text": "system() plays a very special role in executing Operating System Commands.By using this library function we can run all those terminal commands that our Operating ... |
Causal Impact R Package in Python | by Alexandros Zenonos, PhD | Towards Data Science | CausalImpact is an R package developed by Google for causal inference using Bayesian Structural time-series models. You can find the R version here.
In short, what this package does is making counterfactual predictions. In other words, what would have happened in a parallel (sort of) universe if an intervention never h... | [
{
"code": null,
"e": 321,
"s": 172,
"text": "CausalImpact is an R package developed by Google for causal inference using Bayesian Structural time-series models. You can find the R version here."
},
{
"code": null,
"e": 944,
"s": 321,
"text": "In short, what this package does is m... |
JavaFX | ContextMenu with examples - GeeksforGeeks | 24 Oct, 2019
ContextMenu is a part of the JavaFX library. ContextMenu can be associated with controls such as labels, textfield etc. The context menu is activated on right clicking over the associated controls. It shows a popup containing several menuitems or sub menu.
The Constructors of the class are:
ContextMenu(): ... | [
{
"code": null,
"e": 25425,
"s": 25397,
"text": "\n24 Oct, 2019"
},
{
"code": null,
"e": 25682,
"s": 25425,
"text": "ContextMenu is a part of the JavaFX library. ContextMenu can be associated with controls such as labels, textfield etc. The context menu is activated on right clic... |
Absolute Positioning in CSS | With absolute positioning, an element is positioned relative to the nearest positioned ancestor.
Let us now see an example −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div.demo1 {
position: relative;
color: white;
background-color: orange;
border: 2px dashed blue;
width: 600px;
height: 200px;
}
... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "With absolute positioning, an element is positioned relative to the nearest positioned ancestor."
},
{
"code": null,
"e": 1187,
"s": 1159,
"text": "Let us now see an example −"
},
{
"code": null,
"e": 1198,
"s": 1187,... |
Google Charts - Material Line Chart | Following is an example of a material line chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example.
We've used Line class to show material chart.
//classic chart
var chart = new google.visualization.LineChart(document.getEleme... | [
{
"code": null,
"e": 2455,
"s": 2261,
"text": "Following is an example of a material line chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example."
},
{
"code": null,
"e": 2501,
"s": 2455,
... |
Splash Screen API in Android 12 - GeeksforGeeks | 19 Sep, 2021
Android 12 introduces the SplashScreen API, which allows all apps to use a new app to start an animation. When you or the user starts the application it fires up. The new experience incorporates common design components into every app launch, but it is also configurable, allowing your app to retain its di... | [
{
"code": null,
"e": 26563,
"s": 26532,
"text": " \n19 Sep, 2021\n"
},
{
"code": null,
"e": 27019,
"s": 26563,
"text": "Android 12 introduces the SplashScreen API, which allows all apps to use a new app to start an animation. When you or the user starts the application it fires u... |
Deploy your Machine Learning Model with ml5.js | by Natassha Selvaraj | Towards Data Science | As data scientists, most of our work is done in a Jupyter notebook. Whether it is building a machine learning model, training it, or using it to make predictions, our work usually doesn’t make it out of iPython notebooks.
While this is a great environment to create and test our model, what happens when we want to get o... | [
{
"code": null,
"e": 394,
"s": 172,
"text": "As data scientists, most of our work is done in a Jupyter notebook. Whether it is building a machine learning model, training it, or using it to make predictions, our work usually doesn’t make it out of iPython notebooks."
},
{
"code": null,
"... |
Angular 10 NgIf Directive - GeeksforGeeks | 03 Jun, 2021
In this article, we are going to see what is NgIf in Angular 10 and how to use it.
The ngIf Directive in Angular10 is used to remove or recreate a portion of HTML element based on an expression. If the expression inside it is false then the element is removed and if it is true then the element is added to ... | [
{
"code": null,
"e": 26464,
"s": 26436,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 26547,
"s": 26464,
"text": "In this article, we are going to see what is NgIf in Angular 10 and how to use it."
},
{
"code": null,
"e": 26780,
"s": 26547,
"text": "The ngI... |
var keyword in Java - GeeksforGeeks | 19 Oct, 2020
The var keyword was introduced in Java 10. Type inference is used in var keyword in which it detects automatically the datatype of a variable based on the surrounding context. The below examples explain where var is used and also where you can’t use it.
1. We can declare any datatype with the var keyword.
... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 25515,
"s": 25261,
"text": "The var keyword was introduced in Java 10. Type inference is used in var keyword in which it detects automatically the datatype of a variable based on the surround... |
Minimum Number of Arrows to Burst Balloons in C++ | Suppose there are few spherical balloons spread in two-dimensional space. For each balloon, there are the start and end coordinates of the horizontal diameter. Start is always smaller than end. There will be at most 104 balloons. One arrow can be shot up exactly vertically from different points along the x-axis. A ball... | [
{
"code": null,
"e": 1876,
"s": 1062,
"text": "Suppose there are few spherical balloons spread in two-dimensional space. For each balloon, there are the start and end coordinates of the horizontal diameter. Start is always smaller than end. There will be at most 104 balloons. One arrow can be shot u... |
Caller ID Lookup using Python - GeeksforGeeks | 08 Jul, 2021
Prerequisite :
Beautiful soup
Requests module
In this article, we are going to see how we get Caller Id information using numverify API. Numverify offers a powerful tool to deliver phone number validation and information lookup in portable JSON format by Just making a request using a simple URL.
For the f... | [
{
"code": null,
"e": 24314,
"s": 24286,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 24330,
"s": 24314,
"text": "Prerequisite : "
},
{
"code": null,
"e": 24345,
"s": 24330,
"text": "Beautiful soup"
},
{
"code": null,
"e": 24361,
"s": 24345,... |
Starting and Stopping MySQL Server | Let us understand how MySQL server can be started and stopped on Linux and Windows −
On Linux, the start and stop can be done from the command line as shown below −
/etc/init.d/mysqld start
/etc/init.d/mysqld stop
/etc/init.d/mysqld restart
Some Linux types offer service command as well −
service mysqld start
service m... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "Let us understand how MySQL server can be started and stopped on Linux and Windows −"
},
{
"code": null,
"e": 1227,
"s": 1147,
"text": "On Linux, the start and stop can be done from the command line as shown below −"
},
{
"co... |
Efficiently check if a string has all unique characters without using any additional data structure - GeeksforGeeks | 20 Apr, 2022
Implement an space efficient algorithm to determine if a string (of characters from ‘a’ to ‘z’) has all unique characters or not. Use additional data structures like count array, hash, etc is not allowed.Expected Time Complexity : O(n) Examples :
Input : str = "aaabbccdaa"
Output : No
Input : str = "a... | [
{
"code": null,
"e": 25634,
"s": 25606,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 25883,
"s": 25634,
"text": "Implement an space efficient algorithm to determine if a string (of characters from ‘a’ to ‘z’) has all unique characters or not. Use additional data structures li... |
Environment Variables in Python - GeeksforGeeks | 01 Oct, 2020
In Python, its behavior is highly influenced by the setup of the environment variables. There is a fixed number of environment variables that Python recognizes and these generally are processed before the command line switches. Whenever a conflict arises between the environmental variable and the command ... | [
{
"code": null,
"e": 24277,
"s": 24249,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24641,
"s": 24277,
"text": "In Python, its behavior is highly influenced by the setup of the environment variables. There is a fixed number of environment variables that Python recognizes an... |
Image processing in Python? | Python provides lots of libraries for image processing, including −
OpenCV − Image processing library mainly focused on real-time computer vision with application in wide-range of areas like 2D and 3D feature toolkits, facial & gesture recognition, Human-computer interaction, Mobile robotics, Object identification and ... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Python provides lots of libraries for image processing, including −"
},
{
"code": null,
"e": 1390,
"s": 1130,
"text": "OpenCV − Image processing library mainly focused on real-time computer vision with application in wide-range of ar... |
Perl alarm Function | This function sets the "alarm," causing the current process to receive a SIGALRM signal in EXPR seconds. If EXPR is omitted, the value of $_ is used instead.
The actual time delay is not precise, since different systems implement the alarm functionality differently. The actual time may be up to a second more or less th... | [
{
"code": null,
"e": 2378,
"s": 2220,
"text": "This function sets the \"alarm,\" causing the current process to receive a SIGALRM signal in EXPR seconds. If EXPR is omitted, the value of $_ is used instead."
},
{
"code": null,
"e": 2819,
"s": 2378,
"text": "The actual time delay ... |
Triplets in array with absolute difference less than k | 15 Dec, 2021
Given an array A[] of n elements and an integer k. The task is to find the number of triplet (x, y, k), where 0 <= x, y, k < n and x, y, k are the index in the array A[] such that: |A[x] – A[y]| <= k |A[y] – A[z]| <= k |A[z] – A[x]| <= k
Examples:
Input : A[] = { 1, 1, 2, 2, 3 }, k = 1
Output : 5
(0, 1, 2... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 292,
"s": 54,
"text": "Given an array A[] of n elements and an integer k. The task is to find the number of triplet (x, y, k), where 0 <= x, y, k < n and x, y, k are the index in the array A[] such... |
Python | Pandas dataframe.info() | 25 Aug, 2021
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Pandas dataframe.info() function is used to get a concise summary of the dataframe. It comes r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 470,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Same Site Scripting | 22 Sep, 2020
Same Site Scripting is type of vulnerability that is caused by common DNS misconfiguration. But before we dive deep into concepts, let’s make sure we have basic understanding of how Internet works.
Working of the web :When you try to visit website, your browser communicates with web server where that websi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Sep, 2020"
},
{
"code": null,
"e": 250,
"s": 52,
"text": "Same Site Scripting is type of vulnerability that is caused by common DNS misconfiguration. But before we dive deep into concepts, let’s make sure we have basic understanding... |
JavaScript Get Date Methods | 10 Nov, 2021
In this article, we will know how to get the various date method from the date object in Javascript. There are various methods that retrieve the date in JavaScript. The data values can get like years, months, days, hours, minutes, seconds, milliseconds from a Date Object.
The following is the list of the d... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 327,
"s": 54,
"text": "In this article, we will know how to get the various date method from the date object in Javascript. There are various methods that retrieve the date in JavaScript. The data ... |
Go - function closure | Go programming language supports anonymous functions which can acts as function closures. Anonymous functions are used when we want to define a function inline without passing any name to it.
In our example, we created a function getSequence() which returns another function. The purpose of this function is to close ove... | [
{
"code": null,
"e": 2263,
"s": 2071,
"text": "Go programming language supports anonymous functions which can acts as function closures. Anonymous functions are used when we want to define a function inline without passing any name to it."
},
{
"code": null,
"e": 2457,
"s": 2263,
... |
Puzzle 37 | (Maximum run in cricket) | 11 May, 2021
Question: In a one day international cricket match, considering no extras(no wides, no ‘no’ balls, etc.) and no overthrows.
What is the maximum number of runs that a batsman can score in an ideal case ?
Note:”Here we assume ideal and little practical scenario. We assume that batsman can not run for more th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 176,
"s": 52,
"text": "Question: In a one day international cricket match, considering no extras(no wides, no ‘no’ balls, etc.) and no overthrows."
},
{
"code": null,
"e": 255,
"s":... |
How to change column to row on small display in Bootstrap 4 ? | 06 Jul, 2021
The task is to switch a column of Bootstrap 4 grid layout to a row on small screen sizes.
Syntax:
<element class="col-md-4 col-sm-6 ...">...</element>
Approach: To solve the given task we have to use Bootstrap 4’s grid layout. The grid layout divides the entire visible row into 12 equally sized columns. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "The task is to switch a column of Bootstrap 4 grid layout to a row on small screen sizes."
},
{
"code": null,
"e": 128,
"s": 118,
"text": "Syntax: "
},
... |
Surface plots and Contour plots in Python | 22 Jun, 2020
Matplotlib was introduced keeping in mind, only two-dimensional plotting. But at the time when the release of 1.0 occurred, the 3d utilities were developed upon the 2d and thus, we have 3d implementation of data available today! The 3d plots are enabled by importing the mplot3d toolkit. In this article, we... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 396,
"s": 28,
"text": "Matplotlib was introduced keeping in mind, only two-dimensional plotting. But at the time when the release of 1.0 occurred, the 3d utilities were developed upon the 2d and thu... |
Django Admin – Redesign and Customization | 26 Nov, 2021
Often the default Django admin page is great and it is all we need for our projects but sometimes we may want to expand what default admin interface can do. We have a lot of tools in Django to customize it to our own needs and in this article, we’ll learn how to customize the admin interface and add multip... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 348,
"s": 28,
"text": "Often the default Django admin page is great and it is all we need for our projects but sometimes we may want to expand what default admin interface can do. We have a lot of t... |
Mathematics | Graph Theory Basics – Set 2 | 03 Dec, 2021
Prerequisite – Graph Theory Basics – Set 1 A graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense “related”. The objects of the graph correspond to vertices and the relations between them correspond to edges. A graph is depicted diagrammatically as a set o... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 443,
"s": 53,
"text": "Prerequisite – Graph Theory Basics – Set 1 A graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense “related”. The objects of... |
Removing stop words with NLTK in Python | 18 May, 2022
The process of converting data to something a computer can understand is referred to as pre-processing. One of the major forms of pre-processing is to filter out useless data. In natural language processing, useless words (data), are referred to as stop words.
What are Stop words?
Stop Words: A stop word... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 May, 2022"
},
{
"code": null,
"e": 317,
"s": 54,
"text": "The process of converting data to something a computer can understand is referred to as pre-processing. One of the major forms of pre-processing is to filter out useless data... |
Clearing The Input Buffer In C/C++ | 22 Jun, 2022
What is a buffer? A temporary storage area is called a buffer. All standard input and output devices contain an input and output buffer. In standard C/C++, streams are buffered. For example, in the case of standard input, when we press the key on the keyboard, it isn’t sent to your program, instead of that... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 456,
"s": 54,
"text": "What is a buffer? A temporary storage area is called a buffer. All standard input and output devices contain an input and output buffer. In standard C/C++, streams are buffer... |
Python | forget_pack() and forget_grid() method in Tkinter | 29 Nov, 2021
If we want to unmap any widget from the screen or toplevel then forget() method is used. There are two types of forget method forget_pack() ( similar to forget() ) and forget_grid() which are used with pack() and grid() method respectively.
Syntax: widget.forget_pack()
widget can be any valid widget which... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "If we want to unmap any widget from the screen or toplevel then forget() method is used. There are two types of forget method forget_pack() ( similar to forget() ) and forget_... |
Powershell - Compare-Object Cmdlet | Compare-Object cmdlet can be used to compare two objects.
In these examples, we're see the Compare-Object cmdlet in action.
In this example, first we've a file test.txt in D:\temp\test with content "Welcome to TutorialsPoint.Com" and test1.txt with content "Hello World!" and "Welcome to TutorialsPoint.Com" in two lines... | [
{
"code": null,
"e": 2226,
"s": 2168,
"text": "Compare-Object cmdlet can be used to compare two objects."
},
{
"code": null,
"e": 2292,
"s": 2226,
"text": "In these examples, we're see the Compare-Object cmdlet in action."
},
{
"code": null,
"e": 2490,
"s": 2292,
... |
React Native - Navigation | In this chapter we will show you how to set up navigation in React Native app.
Keep close attention since we will refactor lot of the code but we will show you interesting features.
All previous chapters used MyContainerComponent and MyPresentationalComponent. We did this to get comfortable with separation of logic and... | [
{
"code": null,
"e": 2557,
"s": 2478,
"text": "In this chapter we will show you how to set up navigation in React Native app."
},
{
"code": null,
"e": 2660,
"s": 2557,
"text": "Keep close attention since we will refactor lot of the code but we will show you interesting features."... |
How to mount the ISO file using PowerShell? | To mount the ISO file in Windows using PowerShell, we can use the Mount−DiskImage command. The below command will mount the image file stored at the C:\ISO location.
Mount−DiskImage −ImagePath "C:\ISOs\Windows_Server_2016_Datacenter_EVAL_en−us_14393_refresh (1).ISO"
Attached : True
BlockSize : 0
DevicePath : \\.\CDROM0... | [
{
"code": null,
"e": 1353,
"s": 1187,
"text": "To mount the ISO file in Windows using PowerShell, we can use the Mount−DiskImage command. The below command will mount the image file stored at the C:\\ISO location."
},
{
"code": null,
"e": 1454,
"s": 1353,
"text": "Mount−DiskImage... |
Printing Longest Common Subsequence | Set 2 (Printing All) | 07 Jun, 2022
Given two sequences, print all longest subsequence present in both of them.Examples:
Input:
string X = "AGTGATG"
string Y = "GTTAG"
Output:
GTAG
GTTG
Input:
string X = "AATCC"
string Y = "ACACG"
Output:
ACC
AAC
Input:
string X = "ABCBDAB"
string Y = "BDCABA"
Output:
BCAB
BCBA
BDAB
We have dis... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 139,
"s": 52,
"text": "Given two sequences, print all longest subsequence present in both of them.Examples: "
},
{
"code": null,
"e": 346,
"s": 139,
"text": "Input: \nstring X ... |
How to include percentage in pivot table in Pandas? | 24 Jan, 2021
Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots more attractive. It is built on the top of matplotlib library and also closely integrated into the data structures from pandas.
Pivot ta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 327,
"s": 28,
"text": "Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots more... |
C/C++ Struct vs Class | In C++ the structure and class are basically same. But there are some minor differences. These differences are like below.
The class members are private by default, but members of structures are public. Let us see these two codes to see the differences.
The class members are private by default, but members of structure... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "In C++ the structure and class are basically same. But there are some minor differences. These differences are like below."
},
{
"code": null,
"e": 1316,
"s": 1185,
"text": "The class members are private by default, but members of st... |
Program to calculate area and perimeter of Trapezium | Trapezium is a type of quadrilateral that has at least one pair of side parallel to each other. Area and perimeter of a trapezium can be found using the below formula,
Perimeter = sum of all sides
Area = 1⁄2 x (sum of the lengths of the parallel sides) x perpendicular distance between parallel sides
Code logic − The co... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "Trapezium is a type of quadrilateral that has at least one pair of side parallel to each other. Area and perimeter of a trapezium can be found using the below formula,"
},
{
"code": null,
"e": 1259,
"s": 1230,
"text": "Perimeter = su... |
Check if a path has a file name extension in C# - GeeksforGeeks | 04 Apr, 2019
Path.HasExtension Method is used to check whether the specified path has a file name extension or not.This method will start the searching for a period (.) followed by at least one character from the end of the path. If this pattern is found before a DirectorySeparatorChar, AltDirectorySeparatorChar, or Vo... | [
{
"code": null,
"e": 24137,
"s": 24109,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 24514,
"s": 24137,
"text": "Path.HasExtension Method is used to check whether the specified path has a file name extension or not.This method will start the searching for a period (.) followe... |
Text Mining Tweets on Religion. Topic Modeling, Sentiment Analysis &... | by Hurmet Noka | Towards Data Science | Many are those claiming that the light of scientific and technological revolution will diminish the presence of religion in human life. Yet, it is 2020, and one thing seems inevitable, religion is still here and is here to stay! That being said, it is worth investigating the public opinion towards religion in modern ti... | [
{
"code": null,
"e": 496,
"s": 171,
"text": "Many are those claiming that the light of scientific and technological revolution will diminish the presence of religion in human life. Yet, it is 2020, and one thing seems inevitable, religion is still here and is here to stay! That being said, it is wor... |
How to get a specific object from array of objects inside specific MongoDB document? | To get specific object from array of objects, use positional operator($). Let us first create a collection with documents −
> db.getASpecificObjectDemo.insertOne(
... {
... _id :1,f
... "CustomerName" : "Larry",
... "CustomerDetails" : {
... "CustomerPurchaseDescription": [{
... id :... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "To get specific object from array of objects, use positional operator($). Let us first create a collection with documents −"
},
{
"code": null,
"e": 1826,
"s": 1186,
"text": "> db.getASpecificObjectDemo.insertOne(\n... {\n... ... |
C# Linq First() Method | Use the First() method to get the first element from an array.
Firstly, set an array.
int[] arr = {20, 40, 60, 80 , 100};
Now, use the Queryable First() method to return the first element.
arr.AsQueryable().First();
The following is the entire example.
Live Demo
using System;
using System.Linq;
using System.Collection... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Use the First() method to get the first element from an array."
},
{
"code": null,
"e": 1148,
"s": 1125,
"text": "Firstly, set an array."
},
{
"code": null,
"e": 1184,
"s": 1148,
"text": "int[] arr = {20, 40, 60, ... |
Writing good SQL. Further structuring the query language... | by Holger Thoese | Towards Data Science | Do you want to write good SQL? Sure, but what does “good” mean actually?
In certain real time surroundings only performance counts as “good” and you measure your execution time in milliseconds. In business intelligence and data warehouse environments performance is still important, but often maintainability is even mor... | [
{
"code": null,
"e": 245,
"s": 172,
"text": "Do you want to write good SQL? Sure, but what does “good” mean actually?"
},
{
"code": null,
"e": 890,
"s": 245,
"text": "In certain real time surroundings only performance counts as “good” and you measure your execution time in millis... |
C++ program for multiplication of array elements | Given with an array of integer elements and the task is to multiply the elements of an array and display it.
Input-: arr[]={1,2,3,4,5,6,7}
Output-: 1 x 2 x 3 x 4 x 5 x 6 x 7 = 5040
Input-: arr[]={3, 4,6, 2, 7, 8, 4}
Output-: 3 x 4 x 6 x 2 x 7 x 8 x 4 = 32256
Approach used in the below program is as follows −
Initialize... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "Given with an array of integer elements and the task is to multiply the elements of an array and display it."
},
{
"code": null,
"e": 1321,
"s": 1171,
"text": "Input-: arr[]={1,2,3,4,5,6,7}\nOutput-: 1 x 2 x 3 x 4 x 5 x 6 x 7 = 5040\... |
Independent Component Analysis (ICA) In Python | by Cory Maklin | Towards Data Science | Suppose that you’re at a house party and you’re talking to some cute girl. As you listen, your ears are being bombarded by the sound coming from the conversations going on between different groups of people through out the house and from the music that’s playing rather loudly in the background. Yet, none of this preven... | [
{
"code": null,
"e": 622,
"s": 172,
"text": "Suppose that you’re at a house party and you’re talking to some cute girl. As you listen, your ears are being bombarded by the sound coming from the conversations going on between different groups of people through out the house and from the music that’s ... |
How to perform descending order sort in MongoDB? | To sort in ascending order, the syntax is as follows −
db.yourCollectionName.find().sort({yourField:1});
To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −
> db.sortingDemo.insertOne({"Value":100});
{
"acknowledged" : true,
"in... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "To sort in ascending order, the syntax is as follows −"
},
{
"code": null,
"e": 1167,
"s": 1117,
"text": "db.yourCollectionName.find().sort({yourField:1});"
},
{
"code": null,
"e": 1305,
"s": 1167,
"text": "To und... |
How do you limit an array sub-element in MongoDB? | You can use $slice operator to limit an array. Let us create a collection with documents. Following is the query
> db.limitAnArrayDemo.insertOne(
... {
... _id: 101,
... "PlayerName": "Bob",
... "PlayerDetails": {Age:23,isStudent:true},
... "PlayerGameScores": [234,5767,58,67,78,90,1002,576,6... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "You can use $slice operator to limit an array. Let us create a collection with documents. Following is the query"
},
{
"code": null,
"e": 1467,
"s": 1175,
"text": "> db.limitAnArrayDemo.insertOne(\n... {\n... _id: 101,\n... ... |
SAP ABAP - Environment | Reports are a good starting point for familiarizing yourself with general ABAP principles and tools. ABAP reports are used in many areas. In this chapter, we will see how easy it is to write a simple ABAP Report.
Let's get started with the common "Hello World" example.
Each ABAP statement starts with an ABAP keyword an... | [
{
"code": null,
"e": 3111,
"s": 2898,
"text": "Reports are a good starting point for familiarizing yourself with general ABAP principles and tools. ABAP reports are used in many areas. In this chapter, we will see how easy it is to write a simple ABAP Report."
},
{
"code": null,
"e": 316... |
Understanding Gaussian Process, the Socratic Way | by Wei Yi | Towards Data Science | Gaussian Process is a machine learning technique. You can use it to do regression, classification, among many other things. Being a Bayesian method, Gaussian Process makes predictions with uncertainty. For example, it will predict that tomorrow’s stock price is $100, with a standard deviation of $30. Knowing uncertaint... | [
{
"code": null,
"e": 765,
"s": 171,
"text": "Gaussian Process is a machine learning technique. You can use it to do regression, classification, among many other things. Being a Bayesian method, Gaussian Process makes predictions with uncertainty. For example, it will predict that tomorrow’s stock pr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.