title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Port Security in Computer Network | 15 Mar, 2022
Attackers’ task is comparatively very easy when they can enter the network they want to attack. Ethernet LANs are very much vulnerable to attack as the switch ports are open to use by default. Various attacks such as Dos attack at layer 2, address spoofing can take place. If the administrator has control o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Mar, 2022"
},
{
"code": null,
"e": 607,
"s": 28,
"text": "Attackers’ task is comparatively very easy when they can enter the network they want to attack. Ethernet LANs are very much vulnerable to attack as the switch ports are open t... |
Avoid wrapping flex-items in Bootstrap | Use the flex-nowrap class in Bootstrap 4 to avoid wrapping the flex items.
Here you can see the difference between wrap and nowrap −
Above the flex-items are not wrapped. This is achieved using the flex-nowrap class in Bootstrap 4 −
<div class="d-flex flex-nowrap bg-primary">
<div class="p-2 border">One</div>
<div ... | [
{
"code": null,
"e": 1262,
"s": 1187,
"text": "Use the flex-nowrap class in Bootstrap 4 to avoid wrapping the flex items."
},
{
"code": null,
"e": 1320,
"s": 1262,
"text": "Here you can see the difference between wrap and nowrap −"
},
{
"code": null,
"e": 1420,
"s... |
Remove duplicates from sorted array | 04 Jul, 2022
Given a sorted array, the task is to remove the duplicate elements from the array.Examples:
Input : arr[] = {2, 2, 2, 2, 2}
Output : arr[] = {2}
new size = 1
Input : arr[] = {1, 2, 2, 3, 4, 4, 4, 5, 5}
Output : arr[] = {1, 2, 3, 4, 5}
new size = 5
Method 1: (Using extra space)
Cr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 146,
"s": 52,
"text": "Given a sorted array, the task is to remove the duplicate elements from the array.Examples: "
},
{
"code": null,
"e": 323,
"s": 146,
"text": "Input : ar... |
How to display confirmation dialog when clicking an <a> link using JavaScript / jQuery ? | 03 Aug, 2021
Given <a> element and the task is to display the confirmation message when clicking the <a> link, with the help of JavaScript and jQuery.
Display confirmation dialog when clicking an <a> link using JavaScript
onclick Event: This event occurs when the user clicks on an element.Syntax:In HTML:<element onclic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 166,
"s": 28,
"text": "Given <a> element and the task is to display the confirmation message when clicking the <a> link, with the help of JavaScript and jQuery."
},
{
"code": null,
"e": ... |
How to get the count of a specific value in a column with MySQL? | Let us first create a table −
mysql> create table DemoTable
(
Id int,
Name varchar(100)
);
Query OK, 0 rows affected (1.40 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(100,'John');
Query OK, 1 row affected (0.44 sec)
mysql> insert into DemoTable valu... | [
{
"code": null,
"e": 1217,
"s": 1187,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1333,
"s": 1217,
"text": "mysql> create table DemoTable\n (\n Id int,\n Name varchar(100)\n );\nQuery OK, 0 rows affected (1.40 sec)"
},
{
"code": null,
... |
How to Play Audio from URL in Android? | 20 Jan, 2021
Many apps require the feature to add the audio feature in their application and there so many audio files that we have to play inside our application. If we will store so many audio files inside our application, then it will increase the size of the app and this may reduce the user base due to the huge app... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jan, 2021"
},
{
"code": null,
"e": 555,
"s": 28,
"text": "Many apps require the feature to add the audio feature in their application and there so many audio files that we have to play inside our application. If we will store so many... |
Count of subsets with sum equal to X using Recursion | 21 Dec, 2021
Given an array arr[] of length N and an integer X, the task is to find the number of subsets with a sum equal to X using recursion.Examples:
Input: arr[] = {2, 3, 5, 6, 8, 10}, X = 10 Output: 3 Explanation: All possible subsets with sum 10 are {2, 3, 5}, {2, 8}, {10}Input: arr[] = {1, 2, 3, 4, 5}, X = 7 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 197,
"s": 54,
"text": "Given an array arr[] of length N and an integer X, the task is to find the number of subsets with a sum equal to X using recursion.Examples: "
},
{
"code": null,
... |
Python Power Tip: Enumerated Types | by Don Cross | Towards Data Science | Often, programmers wish to represent something in their code whose value must belong to a predetermined, finite collection of values. Examples include:
Days of the week: Monday, Tuesday, ..., Sunday.
Types of image file format: JPEG, PNG, GIF, ....
The suits in a card game: club, diamond, heart, spade.
The states of so... | [
{
"code": null,
"e": 323,
"s": 171,
"text": "Often, programmers wish to represent something in their code whose value must belong to a predetermined, finite collection of values. Examples include:"
},
{
"code": null,
"e": 371,
"s": 323,
"text": "Days of the week: Monday, Tuesday,... |
GATE | GATE CS 2013 | Question 31 - GeeksforGeeks | 31 May, 2021
Consider the following function:
int unknown(int n) { int i, j, k = 0; for (i = n/2; i <= n; i++) for (j = 2; j <= n; j = j * 2) k = k + n/2; return k; }
(A)
(B)
(C)
(D)
(A) A(B) B(C) C(D) DAnswer: (B)Explanation: Here we have to tell the value of k returned not the time complex... | [
{
"code": null,
"e": 24354,
"s": 24326,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24387,
"s": 24354,
"text": "Consider the following function:"
},
{
"code": "int unknown(int n) { int i, j, k = 0; for (i = n/2; i <= n; i++) for (j = 2; j <= n; j = j * ... |
How to remove first character from column name in R data frame? | To remove first character from column name in R data frame, we can use str_sub function of stringr package.
For Example, if we have a data frame called df that contains two columns say XID and XDV then we can remove X from both the column names by using the below mentioned command −
names(df)=str_sub(names(df),2)
Follo... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "To remove first character from column name in R data frame, we can use str_sub function of stringr package."
},
{
"code": null,
"e": 1346,
"s": 1170,
"text": "For Example, if we have a data frame called df that contains two columns s... |
Docker Made Easy for Data Scientists | by Gagandeep Singh | Towards Data Science | “Google runs all software in containers and they run around 2 billion containers every week.”
Before proceeding any further the first question that should come to your mind is why I need docker and even more important what is it?
So, what is Docker? A Docker is a set of platform service products that use OS-level virtu... | [
{
"code": null,
"e": 265,
"s": 171,
"text": "“Google runs all software in containers and they run around 2 billion containers every week.”"
},
{
"code": null,
"e": 401,
"s": 265,
"text": "Before proceeding any further the first question that should come to your mind is why I need... |
How to create an HTML document which uses aside element ? - GeeksforGeeks | 15 Oct, 2020
The <aside> tag is used to describe the main object of the web page in a shorter way like a highlighter. It basically identifies the content that is related to the primary content of the web page but does not constitute the main intent of the primary page. The <aside> tag contains mainly author information... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 26964,
"s": 26621,
"text": "The <aside> tag is used to describe the main object of the web page in a shorter way like a highlighter. It basically identifies the content that is related to the... |
Automata Theory | Set 10 - GeeksforGeeks | 28 Feb, 2019
These questions for practice purpose of GATE CS Exam.
Ques-1: Consider the following statements:
X: For any language either a language L or its compliment L’ must be finite.
Y: DFA for language which contains epsilon must have initial state as final state.
Z: Non-deterministic finite automata is more power... | [
{
"code": null,
"e": 25799,
"s": 25771,
"text": "\n28 Feb, 2019"
},
{
"code": null,
"e": 25853,
"s": 25799,
"text": "These questions for practice purpose of GATE CS Exam."
},
{
"code": null,
"e": 25896,
"s": 25853,
"text": "Ques-1: Consider the following state... |
How to Extract Frames From a Video in MATLAB? - GeeksforGeeks | 20 Aug, 2020
Let us see how to extract frames from a video in MATLAB.
Approach :
Import the video which is to be converted into frames into the current matlab environment.Extract the total number of frames in the video.Make an empty directory named frames before the execution.Run a for loop and start extracting the fra... | [
{
"code": null,
"e": 25891,
"s": 25863,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 25948,
"s": 25891,
"text": "Let us see how to extract frames from a video in MATLAB."
},
{
"code": null,
"e": 25959,
"s": 25948,
"text": "Approach :"
},
{
"code": ... |
Duration from(TemporalUnit) method in Java with Examples - GeeksforGeeks | 26 Nov, 2018
The from(TemporalUnit) method of Duration Class in java.time package is used to get a duration from the amount passed as the first parameter in the TemporalUnit. The TemporalUnit can be DAYS, HOURS, etc.
Syntax:
public static Duration from(TemporalUnit amount)
Parameters: This method accepts a parameter a... | [
{
"code": null,
"e": 26199,
"s": 26171,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 26403,
"s": 26199,
"text": "The from(TemporalUnit) method of Duration Class in java.time package is used to get a duration from the amount passed as the first parameter in the TemporalUnit. T... |
Python - String Repetition and spacing in List - GeeksforGeeks | 25 Oct, 2021
Sometimes while working with Python, we can have a problem in which we need to perform the repetition of each string in list and also attach a deliminator to each occurrence. This kind of problem can occur in day-day programming. Lets discuss certain ways in which this task can be performed.Method #1 : Usi... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 26029,
"s": 25537,
"text": "Sometimes while working with Python, we can have a problem in which we need to perform the repetition of each string in list and also attach a deliminator to each ... |
How to make smooth bounce animation using CSS ? - GeeksforGeeks | 28 Nov, 2019
The smooth bounce animation can be done with the help of HTML and CSS. It will generate fun and desired outputs.
For this project, a simple div with class ball is needed in HTML page:
<div class="ball"></div>
We will switch to CSS for animation programming. Now, Flexbox is used to have the ball at the midd... | [
{
"code": null,
"e": 26417,
"s": 26389,
"text": "\n28 Nov, 2019"
},
{
"code": null,
"e": 26530,
"s": 26417,
"text": "The smooth bounce animation can be done with the help of HTML and CSS. It will generate fun and desired outputs."
},
{
"code": null,
"e": 26601,
"s... |
Perl | Finding Files and Directories - GeeksforGeeks | 19 Jul, 2019
For traversing a directory tree in Perl, there are several ways/methods. Traversing can be performed through function calls opendir and readdir which are a part of Perl programming language. Traversing files and directories in Perl can also be done through File::Find module which comes with the Perl langua... | [
{
"code": null,
"e": 25285,
"s": 25257,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 25596,
"s": 25285,
"text": "For traversing a directory tree in Perl, there are several ways/methods. Traversing can be performed through function calls opendir and readdir which are a part of... |
Python | Numpy.broadcast_arrays() method - GeeksforGeeks | 17 Sep, 2019
With the help of Numpy.broadcast_arrays() method, we can get the one broadcasted array with the help of two or more arrays by using Numpy.broadcast_arrays() method.
Syntax : Numpy.broadcast_arrays()
Return : Return the broadcasted array using numpy.
Example #1 :In this example we can see that by using Nump... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 25702,
"s": 25537,
"text": "With the help of Numpy.broadcast_arrays() method, we can get the one broadcasted array with the help of two or more arrays by using Numpy.broadcast_arrays() method... |
TypeScript | Array join() Method - GeeksforGeeks | 18 Jun, 2020
The Array.join() is an inbuilt TypeScript function which is used to joins all the elements of an array into a string. Syntax:
array.join(separator)
Parameter: This method accept a single parameter as mentioned above and described below:
separator : This parameter is the a string to separate each element o... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 25905,
"s": 25779,
"text": "The Array.join() is an inbuilt TypeScript function which is used to joins all the elements of an array into a string. Syntax:"
},
{
"code": null,
"e": ... |
ML | Determine the optimal value of K in K-Means Clustering - GeeksforGeeks | 12 Oct, 2021
Prerequisite: K-Means Clustering | IntroductionThere is a popular method known as elbow method which is used to determine the optimal value of K to perform the K-Means Clustering Algorithm. The basic idea behind this method is that it plots the various values of cost with changing k. As the value of K incr... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 26198,
"s": 25667,
"text": "Prerequisite: K-Means Clustering | IntroductionThere is a popular method known as elbow method which is used to determine the optimal value of K to perform the K-M... |
Longest Common Prefix using Divide and Conquer Algorithm - GeeksforGeeks | 12 Jun, 2021
Given a set of strings, find the longest common prefix.
Examples:
Input : {“geeksforgeeks”, “geeks”, “geek”, “geezer”}
Output : "gee"
Input : {"apple", "ape", "april"}
Output : "ap"
We have discussed word by word matching and character by character matching algorithms.In this algorithm, a divide and c... | [
{
"code": null,
"e": 26025,
"s": 25997,
"text": "\n12 Jun, 2021"
},
{
"code": null,
"e": 26082,
"s": 26025,
"text": "Given a set of strings, find the longest common prefix. "
},
{
"code": null,
"e": 26093,
"s": 26082,
"text": "Examples: "
},
{
"code": ... |
C# | Check if an array is synchronized (thread safe) or not - GeeksforGeeks | 01 Feb, 2019
Array.IsSynchronized Property is used to get a value which indicates whether access to the Array is synchronized (thread-safe) or not.
Syntax:
public bool IsSynchronized { get; }
Property Value: This property always returns false for all arrays.
Below programs illustrate the use of above-discussed property... | [
{
"code": null,
"e": 25833,
"s": 25805,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25968,
"s": 25833,
"text": "Array.IsSynchronized Property is used to get a value which indicates whether access to the Array is synchronized (thread-safe) or not."
},
{
"code": null,
... |
Python | Iterate over multiple lists simultaneously - GeeksforGeeks | 18 Aug, 2021
Iterating over single lists, refers to using for loops for iteration over a single element of a single list at a particular step whereas in iterating over multiple lists simultaneously, we refer using for loops for iteration over a single element of multiple lists at a particular step.
Iterate over multipl... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 25974,
"s": 25687,
"text": "Iterating over single lists, refers to using for loops for iteration over a single element of a single list at a particular step whereas in iterating over multiple... |
Deque interface in Java | java.util.Deque interface is a subtype of java.util.Queue interface which supports insertion and removal of elements at both ends.
public interface Deque<E>
extends Queue<E>
The java.util.ArrayDeque class provides resizable-array and implements the Deque interface. Following are the important points about Array Deques ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "java.util.Deque interface is a subtype of java.util.Queue interface which supports insertion and removal of elements at both ends."
},
{
"code": null,
"e": 1236,
"s": 1193,
"text": "public interface Deque<E>\nextends Queue<E>"
},
... |
Cyclically rotate an array by one | Practice | GeeksforGeeks | Given an array, rotate the array by one position in clock-wise direction.
Example 1:
Input:
N = 5
A[] = {1, 2, 3, 4, 5}
Output:
5 1 2 3 4
Example 2:
Input:
N = 8
A[] = {9, 8, 7, 6, 4, 2, 1, 3}
Output:
3 9 8 7 6 4 2 1
Your Task:
You don't need to read input or print anything. Your task is to complete the functio... | [
{
"code": null,
"e": 314,
"s": 238,
"text": "Given an array, rotate the array by one position in clock-wise direction.\n "
},
{
"code": null,
"e": 325,
"s": 314,
"text": "Example 1:"
},
{
"code": null,
"e": 378,
"s": 325,
"text": "Input:\nN = 5\nA[] = {1, 2, 3... |
Mastering TensorFlow “Variables” in 5 Easy Steps | by Orhan G. Yalçın | Medium | Towards Data Science | WARNING: Do not confuse this article with “Mastering TensorFlow Tensors in 5 Easy Steps”!
If you are reading this article, I am sure that we share similar interests and are/will be in similar industries. So let’s connect via Linkedin! Please do not hesitate to send a contact request! Orhan G. Yalçın — Linkedin
In this... | [
{
"code": null,
"e": 262,
"s": 172,
"text": "WARNING: Do not confuse this article with “Mastering TensorFlow Tensors in 5 Easy Steps”!"
},
{
"code": null,
"e": 485,
"s": 262,
"text": "If you are reading this article, I am sure that we share similar interests and are/will be in si... |
Tryit Editor v3.7 | Tryit: Display a none-breaking-space | [] |
How to create a frame inside a frame tkinter? - GeeksforGeeks | 21 Jun, 2021
Prerequisite: Tkinter
It is very easy to create a basic frame using Tkinter, this article focuses on how another frame can be created within it. To create a basic frame the name of the parent window is given as the first parameter to the frame() function. Therefore, to add another frame within this frame, ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 24314,
"s": 24292,
"text": "Prerequisite: Tkinter"
},
{
"code": null,
"e": 24689,
"s": 24314,
"text": "It is very easy to create a basic frame using Tkinter, this article ... |
jQuery - scrollTop( ) Method | The scrollTop( ) method gets the scroll top offset of the first matched element.
This method works for both visible and hidden elements.
Here is the simple syntax to use this method −
selector.scrollTop( )
Here is the description of all the parameters used by this method −
NA
NA
Following is a simple example a simple ... | [
{
"code": null,
"e": 2403,
"s": 2322,
"text": "The scrollTop( ) method gets the scroll top offset of the first matched element."
},
{
"code": null,
"e": 2459,
"s": 2403,
"text": "This method works for both visible and hidden elements."
},
{
"code": null,
"e": 2506,
... |
How to work with document.forms in JavaScript? | Use the document.forms property in JavaScript to get the number of <form> tags in a document.
You can try to run the following code to implement document.forms property in JavaScript.
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<h1>Employee Information</... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "Use the document.forms property in JavaScript to get the number of <form> tags in a document."
},
{
"code": null,
"e": 1246,
"s": 1156,
"text": "You can try to run the following code to implement document.forms property in JavaScript... |
How to animate the colorbar in Matplotlib? | To animate the colorbar 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.
Create a new figure or activate an existing... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To animate the colorbar in matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1211,
"s": 1135,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
"... |
How to format a number with two decimals in JavaScript? | Use the toFixed() method in JavaScript to format a number with two decimals. The toFixed() method formats a number with a specific number of digits to the right of the decimal. It returns a string representation of the number that does not use exponential notation and has the exact number of digits after the decimal pl... | [
{
"code": null,
"e": 1387,
"s": 1062,
"text": "Use the toFixed() method in JavaScript to format a number with two decimals. The toFixed() method formats a number with a specific number of digits to the right of the decimal. It returns a string representation of the number that does not use exponenti... |
Implementation of Hashing with Chaining in Python | 06 Jul, 2022
Hashing is a data structure that is used to store a large amount of data, which can be accessed in O(1) time by operations such as search, insert and delete. Various Applications of Hashing are:
Indexing in database
Cryptography
Symbol Tables in Compiler/Interpreter
Dictionaries, caches, etc.
Hashing is an... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 247,
"s": 52,
"text": "Hashing is a data structure that is used to store a large amount of data, which can be accessed in O(1) time by operations such as search, insert and delete. Various Applicat... |
MoviePy – Applying Speed effect on Video Clip | 01 Aug, 2020
In this article we will see how we can apply speed effect on the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Speed up video or slow down also known as fast motion/slow-motion effects in video production, which makes t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 419,
"s": 54,
"text": "In this article we will see how we can apply speed effect on the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operati... |
Python list remove() | 21 Jun, 2022
Python List remove() is an inbuilt function in the Python programming language that removes a given object from the List.
Syntax:
list_name.remove(obj)
Parameters:
obj: object to be removed from the list
Returns:
The method does not return any value but removes the given object from the list.
Excep... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 151,
"s": 28,
"text": "Python List remove() is an inbuilt function in the Python programming language that removes a given object from the List. "
},
{
"code": null,
"e": 160,
"s": 1... |
Copy Constructor vs Assignment Operator in C++ | 10 May, 2022
Copy constructor and Assignment operator are similar as they are both used to initialize one object using another object. But, there are some basic differences between them:
Syntax:
className(const className &obj) {
// body
}
Syntax:
className obj1, obj2;
obj2 = obj1;
Consider the following C++ program. ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 228,
"s": 54,
"text": "Copy constructor and Assignment operator are similar as they are both used to initialize one object using another object. But, there are some basic differences between them:"... |
Kali Linux – Crunch Utility | 04 Aug, 2021
In order to hack a password, we have to try a lot of passwords to get the right one. When an attacker uses thousands or millions of words or character combinations to crack a password there is no surety that any one of those millions of combinations will work or not. This collection of a different combinat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 539,
"s": 28,
"text": "In order to hack a password, we have to try a lot of passwords to get the right one. When an attacker uses thousands or millions of words or character combinations to crack a ... |
Probability Density Estimation & Maximum Likelihood Estimation | 30 May, 2021
Prerequisite: Probability Distribution
Probability Density: Assume a random variable x that has a probability distribution p(x). The relationship between the outcomes of a random variable and its probability is referred to as the probability density.
The problem is that we don’t always know the full proba... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 67,
"s": 28,
"text": "Prerequisite: Probability Distribution"
},
{
"code": null,
"e": 280,
"s": 67,
"text": "Probability Density: Assume a random variable x that has a probabilit... |
Plotting World Map Using Pygal in Python | 28 Jul, 2020
Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be edited in any editor. Pygal can create graphs with minimal lines of code that can be easy to understand and write.
We might want to plot the Wo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be edited in an... |
Lodash _.sortBy() Method | 10 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.
The _.sortBy() method creates an array of elements which is sorted in ascending order by the results of running each element in a collection through each it... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 204,
"s": 53,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc."
},
{
"code": n... |
GATE | GATE-CS-2014-(Set-3) | Question 65 | 28 Jun, 2021
Consider the following rooted tree with the vertex P labeled as root
The order in which the nodes are visited during in-order traversal is(A) SQPTRWUV(B) SQPTURWV(C) SQPTWUVR(D) SQPTRUWVAnswer: (A)Explanation:
Algorithm Inorder(tree) - Use of Recursion
Steps:
1. Traverse the left subtree,
i.e., call In... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 97,
"s": 28,
"text": "Consider the following rooted tree with the vertex P labeled as root"
},
{
"code": null,
"e": 238,
"s": 97,
"text": "The order in which the nodes are visite... |
PHP | imagecreatefromjpeg() Function | 30 Jan, 2020
The imagecreatefromjpeg() function is an inbuilt function in PHP which is used to create a new image from JPEG file or URL. This image can be further worked upon in the program.
Syntax:
resource imagecreatefromjpeg( string $filename )
Parameters: This function accepts a single parameter, $filename which ho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "The imagecreatefromjpeg() function is an inbuilt function in PHP which is used to create a new image from JPEG file or URL. This image can be further worked upon in the progra... |
WPF - Contextmenu | ContextMenu is a pop-up menu that enables a control to expose functionality that is specific to the context of the control. It appears whenever the context menu is requested through a user interface from within this element. The hierarchical inheritance of ContextMenu class is as follows −
Background
Gets or sets a bru... | [
{
"code": null,
"e": 2445,
"s": 2154,
"text": "ContextMenu is a pop-up menu that enables a control to expose functionality that is specific to the context of the control. It appears whenever the context menu is requested through a user interface from within this element. The hierarchical inheritance... |
How to avoid callback hell in Node.js ? | 30 Sep, 2021
Callback hell in Node.js is the situation in which we have complex nested callbacks. In this, each callback takes arguments that have been obtained as a result of previous callbacks. This kind of callback structure leads to lesser code readability and maintainability.
We can avoid the callback hell with th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 297,
"s": 28,
"text": "Callback hell in Node.js is the situation in which we have complex nested callbacks. In this, each callback takes arguments that have been obtained as a result of previous cal... |
& Operator in Java with Examples | 10 Oct, 2019
The & operator in Java has two definite functions:
As a Relational Operator: & is used as a relational operator to check a conditional statement just like && operator. Both even give the same result, i.e. true if all conditions are true, false if any one condition is false.However, there is a slight differ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Oct, 2019"
},
{
"code": null,
"e": 104,
"s": 53,
"text": "The & operator in Java has two definite functions:"
},
{
"code": null,
"e": 2216,
"s": 104,
"text": "As a Relational Operator: & is used as a relational o... |
C# | How to change the visibility of the Cursor of Console | 28 Jan, 2019
Given the normal Console in C#, the task is to change the visibility of the Cursor of the Console.
Approach: This can be done using the CursorVisible property in the Console class of the System package in C#. It gets or sets a value indicating whether the cursor is visible.
Program 1: Getting the value of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "Given the normal Console in C#, the task is to change the visibility of the Cursor of the Console."
},
{
"code": null,
"e": 303,
"s": 127,
"text": "Approac... |
Passing array of objects as parameter in C++ | 20 Jun, 2022
Array of Objects:It is an array whose elements are of the class type. It can be declared as an array of any datatype.
Syntax:
classname array_name [size];
Below is the C++ program to illustrate the array of objects by calculating the highest marks among 3 students:
C++
// C++ program to illustrate the// pa... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 171,
"s": 53,
"text": "Array of Objects:It is an array whose elements are of the class type. It can be declared as an array of any datatype."
},
{
"code": null,
"e": 179,
"s": 171,
... |
Randomized Algorithms | Set 2 (Classification and Applications) | 21 Nov, 2015
We strongly recommend to refer below post as a prerequisite of this.
Randomized Algorithms | Set 1 (Introduction and Analysis)
Randomized algorithms are classified in two categories.
Las Vegas: These algorithms always produce correct or optimum result. Time complexity of these algorithms is based on a rand... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Nov, 2015"
},
{
"code": null,
"e": 123,
"s": 54,
"text": "We strongly recommend to refer below post as a prerequisite of this."
},
{
"code": null,
"e": 181,
"s": 123,
"text": "Randomized Algorithms | Set 1 (Intro... |
How to Enable Copy and Paste in Oracle VirtualBox? | 19 Feb, 2020
In this article, we will see how to enable copy and paste from a Windows host to a VirtualBox and vice-versa. We’ve taken the VirtualBox guest additions which gives us various additional tooling, specifically giving us the ability to copy and paste. It also enables bi-directional copy and pastes.
Step 1: S... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "In this article, we will see how to enable copy and paste from a Windows host to a VirtualBox and vice-versa. We’ve taken the VirtualBox guest additions which gives us various... |
Scala List distinct() method with example | 26 Jul, 2019
The distinct() method is utilized to delete the duplicate elements from the stated list.
Method Definition: def distinct: List[A]
Return Type: It returns a new list of elements without any duplicates.
Example #1:
// Scala program of distinct()// method // Creating objectobject GfG{ // Main method ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 117,
"s": 28,
"text": "The distinct() method is utilized to delete the duplicate elements from the stated list."
},
{
"code": null,
"e": 158,
"s": 117,
"text": "Method Definition... |
CSS | 8 Digit Hex Color | 21 Aug, 2019
The Eight Digit Hex color is as simple as Six Digit Hex color it contains 8 digits rather than six, it is used to define the color of your elements with the CSS. It has a prefixed hash(#) value before the digits like six-digit hex code.The difference between 6 and 8 digit hex codes is, that 2 extra charact... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Aug, 2019"
},
{
"code": null,
"e": 607,
"s": 28,
"text": "The Eight Digit Hex color is as simple as Six Digit Hex color it contains 8 digits rather than six, it is used to define the color of your elements with the CSS. It has a pref... |
Count array elements that can be represented as sum of at least two consecutive array elements | 08 Apr, 2021
Given an array A[] consisting of N integers from a range [1, N], the task is to calculate the count of array elements (non-distinct) that can be represented as the sum of two or more consecutive array elements.
Examples:
Input: a[] = {3, 1, 4, 1, 5, 9, 2, 6, 5}Output: 5Explanation:The array elements satisf... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 263,
"s": 52,
"text": "Given an array A[] consisting of N integers from a range [1, N], the task is to calculate the count of array elements (non-distinct) that can be represented as the sum of two... |
Hello World Program in Perl | 11 Feb, 2019
Perl programming language is exclusively designed for text processing purposes. Its abbreviation denotes Practical Extraction and Report Language. It is compatible on various platforms, such as Windows, Mac OS, and almost all versions of UNIX.
Hello World! program in every programming language gives the be... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Perl programming language is exclusively designed for text processing purposes. Its abbreviation denotes Practical Extraction and Report Language. It is compatible on various ... |
Search an element in a reverse sorted array | 07 May, 2021
Given an array arr[] sorted in decreasing order, and an integer X, the task is to check if X is present in the given array or not. If X is present in the array, print its index ( 0-based indexing). Otherwise, print -1.
Examples:
Input: arr[] = {5, 4, 3, 2, 1}, X = 4Output: 1Explanation: Element X (= 4) is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 271,
"s": 52,
"text": "Given an array arr[] sorted in decreasing order, and an integer X, the task is to check if X is present in the given array or not. If X is present in the array, print its ind... |
Method Class | getAnnotation() method in Java | 05 Dec, 2018
The java.lang.reflect.Method.getAnnotation(Class< T > annotationClass) method of Method class returns Method objects’s annotation for the specified type passed as parameter if such an annotation is present, else null. This is important method to get annotation for Method object.
Syntax:
public <T extends A... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Dec, 2018"
},
{
"code": null,
"e": 308,
"s": 28,
"text": "The java.lang.reflect.Method.getAnnotation(Class< T > annotationClass) method of Method class returns Method objects’s annotation for the specified type passed as parameter if... |
Time Series - Moving Average | For a stationary time series, a moving average model sees the value of a variable at time ‘t’ as a linear function of residual errors from ‘q’ time steps preceding it. The residual error is calculated by comparing the value at the time ‘t’ to moving average of the values preceding.
Mathematically it can be written as −... | [
{
"code": null,
"e": 2558,
"s": 2275,
"text": "For a stationary time series, a moving average model sees the value of a variable at time ‘t’ as a linear function of residual errors from ‘q’ time steps preceding it. The residual error is calculated by comparing the value at the time ‘t’ to moving ave... |
How to vertically center text with CSS ? | 30 Jun, 2022
In this article, we will learn how to align the text vertically using CSS & Although CSS2 doesn’t support Vertical aligning. But, we can align the center blocks vertically, by combining a few properties. The trick is to specify the outer block to be formatted as a table cell because the contents of a table... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 483,
"s": 28,
"text": "In this article, we will learn how to align the text vertically using CSS & Although CSS2 doesn’t support Vertical aligning. But, we can align the center blocks vertically, by... |
How to shuffle an array in Java? | Declare a string array and add elements in the form of letters −
String[] letters = { "P", "Q", "R", "S", "T", "U","V", "W", "X", "Y", "Z" };
Convert the above array to list −
List<String>list = Arrays.asList(letters);
Now, create a shuffled array using the Random class object and generate the random letters with nextI... | [
{
"code": null,
"e": 1252,
"s": 1187,
"text": "Declare a string array and add elements in the form of letters −"
},
{
"code": null,
"e": 1329,
"s": 1252,
"text": "String[] letters = { \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\",\"V\", \"W\", \"X\", \"Y\", \"Z\" };"
},
{
"cod... |
Remove Axis Labels and Ticks in ggplot2 Plot in R | 24 Oct, 2021
In this article, we will discuss how to remove axis labels and ticks in ggplot2 in R Programming Language.
The axes labels and ticks can be removed in ggplot using the theme() method. This method is basically used to modify the non-data components of the made plot. It gives the plot a good graphical custom... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Oct, 2021"
},
{
"code": null,
"e": 135,
"s": 28,
"text": "In this article, we will discuss how to remove axis labels and ticks in ggplot2 in R Programming Language."
},
{
"code": null,
"e": 520,
"s": 135,
"text": ... |
JavaScript | Replace() Method | 02 Jun, 2022
The replace() method in JavaScript is used to replace the current page with another page. The Replace Method replaces the URL of the current window by the URL mention in the Replace method.
Syntax:
location.replace(URL)
Parameter: This method accepts single parameter URL. The URL is the reference of other... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 219,
"s": 28,
"text": "The replace() method in JavaScript is used to replace the current page with another page. The Replace Method replaces the URL of the current window by the URL mention in the R... |
Python VLC – Instance | 29 Aug, 2020
In this article we will see how we can create a Instance class instance in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Instance act as a main object of the VLC library with the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 500,
"s": 28,
"text": "In this article we will see how we can create a Instance class instance in the python vlc module. VLC media player is a free and open-source portable cross-platform media play... |
MoviePy – Setting Duration of the Clip | 30 Aug, 2020
In this article we will see how we can set duration of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Duration is the time for which the clip get played increasing the duration make it repeat itself and decreasing du... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 390,
"s": 28,
"text": "In this article we will see how we can set duration of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on ... |
Programmatically Specifying the Schema | The second method for creating DataFrame is through programmatic interface that allows you to construct a schema and then apply it to an existing RDD. We can create a DataFrame programmatically using the following three steps.
Create an RDD of Rows from an Original RDD.
Create an RDD of Rows from an Original RDD.
Creat... | [
{
"code": null,
"e": 1947,
"s": 1720,
"text": "The second method for creating DataFrame is through programmatic interface that allows you to construct a schema and then apply it to an existing RDD. We can create a DataFrame programmatically using the following three steps."
},
{
"code": null... |
Running Jupyter Notebook on WSL while Using Browser on Windows | by Ali Akbar Septiandri | Towards Data Science | If you are a data scientist like me who had just recently moved (back) into Windows, you might find it awkward to get things up and running, especially when you want to have the power of bash terminal at your disposal. You immediately realize that the price you pay for Macs might be really worth it. You get the best of... | [
{
"code": null,
"e": 450,
"s": 47,
"text": "If you are a data scientist like me who had just recently moved (back) into Windows, you might find it awkward to get things up and running, especially when you want to have the power of bash terminal at your disposal. You immediately realize that the pric... |
AngularJS | ng-maxlength Directive - GeeksforGeeks | 26 Mar, 2019
The ng-maxlength Directive in AngularJS is used to set the maximum length for an input field i.e it adds the restriction for an input field. It is different from maxlength attribute in HTML because the former prevent users from exceeding the limit whereas the later doesn’t do that. It will make the form in... | [
{
"code": null,
"e": 24585,
"s": 24557,
"text": "\n26 Mar, 2019"
},
{
"code": null,
"e": 24926,
"s": 24585,
"text": "The ng-maxlength Directive in AngularJS is used to set the maximum length for an input field i.e it adds the restriction for an input field. It is different from m... |
React Native - TouchableHighlight | We already mentioned touchable components in one of our previous chapters. This chapter will show you how to use TouchableHighlight component.
We already done this in our previous chapters. We will create src/components/home/TouchableHighlight.js file.
This is container component. We are passing buttonPressed function ... | [
{
"code": null,
"e": 2487,
"s": 2344,
"text": "We already mentioned touchable components in one of our previous chapters. This chapter will show you how to use TouchableHighlight component."
},
{
"code": null,
"e": 2597,
"s": 2487,
"text": "We already done this in our previous ch... |
Python String maketrans() Method - GeeksforGeeks | 05 Oct, 2021
Python String maketrans() function is used to construct the transition table i.e specify the list of characters that need to be replaced in the whole string or the characters that need to be deleted from the string.
Syntax:
maketrans(str1, str2, str3)
Parameters:
str1: Specifies the list of characters that... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 24508,
"s": 24292,
"text": "Python String maketrans() function is used to construct the transition table i.e specify the list of characters that need to be replaced in the whole string or the... |
Python - Reading RSS feed | RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it. In python we take help of the below package to read and process these feeds.
pip install feedparser
In the below ex... | [
{
"code": null,
"e": 2869,
"s": 2587,
"text": "RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it. In python we take help of the below package to re... |
How can we take a backup of a particular table from a database by using mysqldump client program? | By using mysql dump client program we can take the backup of a particular table from the databases into a file having the extension ‘.sql’. It can be understood with the help of the following example −
In this example, with the help of mysql dump client program, we are taking the backup of a table named ‘student_info’ ... | [
{
"code": null,
"e": 1264,
"s": 1062,
"text": "By using mysql dump client program we can take the backup of a particular table from the databases into a file having the extension ‘.sql’. It can be understood with the help of the following example −"
},
{
"code": null,
"e": 1476,
"s":... |
Espresso Testing Framework - WebView | WebView is a special view provided by android to display web pages inside the application. WebView does not provide all the features of a full-fledged browser application like chrome and firefox. However, it provides complete control over the content to be shown and exposes all the android features to be invoked inside... | [
{
"code": null,
"e": 2689,
"s": 1976,
"text": "WebView is a special view provided by android to display web pages inside the application. WebView does not provide all the features of a full-fledged browser application like chrome and firefox. However, it provides complete control over the content to... |
Extract word from a String at specified position in R Programming – word() Function | 03 Jun, 2020
word() Function in R Language is used to extract words from a string from the position specified as argument.
Syntax: word(string, position)
Parameter:string: From which word needs to be extractedposition: Specified Index value
Example 1:
# R Program to illustrate # the use of word function # Loading Libr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "word() Function in R Language is used to extract words from a string from the position specified as argument."
},
{
"code": null,
"e": 169,
"s": 138,
"text... |
fsetpos() (Set File Position) in C | 30 Jun, 2021
The fsetpos() function moves the file position indicator to the location specified by the object pointed to by position. When fsetpos() is executed ,the end-of-file indicator is reset.Declaration
Parameters –
stream – This is the pointer to a FILE object that identifies the stream.
position – This is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 250,
"s": 52,
"text": "The fsetpos() function moves the file position indicator to the location specified by the object pointed to by position. When fsetpos() is executed ,the end-of-file indicator... |
response.url – Python requests | 01 Mar, 2020
response.url returns the URL of the response. It will show the main url which has returned the content, after all redirections, if done. Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a respons... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Mar, 2020"
},
{
"code": null,
"e": 528,
"s": 28,
"text": "response.url returns the URL of the response. It will show the main url which has returned the content, after all redirections, if done. Python requests are generally used to ... |
Special variables in Perl | 21 Nov, 2019
Special Variables in Perl are those which are already defined to carry out a specific function when required. The differentiating factor between a special Variable in Perl and a random character is the use of Punctuation mark after the variable, these could be @, $ or %, etc, for example, $_.
Perl Variable... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Special Variables in Perl are those which are already defined to carry out a specific function when required. The differentiating factor between a special Variable in Perl and... |
How to Drop Rows that Contain a Specific String in Pandas? | 03 Dec, 2021
In this article, we are going to see how to drop rows that contain a specific string in pandas. Now, to drop the rows with a specific string we can use the contains() function from the pandas library.
Syntax: series.str.contains(string, case=True, flags=0, na=None, regex=True)
Returns –
Series or index... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 255,
"s": 53,
"text": "In this article, we are going to see how to drop rows that contain a specific string in pandas. Now, to drop the rows with a specific string we can use the contains() functio... |
How to Build a Dice Game in Android? | 29 Dec, 2020
In this article, we will be building a Dice Game Project using Java and XML in Android. The Dice Game is based on a two-player game. Both players roll the dice and the player who gets the highest phase value will win the game. There will be a single activity in this application. This activity will show the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 622,
"s": 28,
"text": "In this article, we will be building a Dice Game Project using Java and XML in Android. The Dice Game is based on a two-player game. Both players roll the dice and the player ... |
How to Iterate over months between two dates in Python? | 18 Feb, 2022
In this article, we will discuss how to iterate over months between two dates using Python.
We can iterate over months between two dates using timedelta and rrule methods.
timedelta() is used for calculating differences in dates and also can be used for date manipulations in Python
Example:
But using time... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 121,
"s": 28,
"text": "In this article, we will discuss how to iterate over months between two dates using Python. "
},
{
"code": null,
"e": 201,
"s": 121,
"text": "We can iterat... |
How to hide the table header using JavaScript ? | 30 Jun, 2020
There are two approaches that can help to hide a table header with the help of JavaScript. They are discussed below:
Approach 1: Select the header using a CSS selector and modify the style property such that the value of the display property is set to none. This will hide the selected table header element... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "There are two approaches that can help to hide a table header with the help of JavaScript. They are discussed below: "
},
{
"code": null,
"e": 351,
"s": 146,
... |
Operations on Sparse Matrices | 06 Jan, 2020
Given two sparse matrices (Sparse Matrix and its representations | Set 1 (Using Arrays and Linked Lists)), perform operations such as add, multiply or transpose of the matrices in their sparse form itself. The result should consist of three sparse matrices, one obtained by adding the two input matrices, on... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jan, 2020"
},
{
"code": null,
"e": 446,
"s": 54,
"text": "Given two sparse matrices (Sparse Matrix and its representations | Set 1 (Using Arrays and Linked Lists)), perform operations such as add, multiply or transpose of the matric... |
Python program to check if number is palindrome (one-liner) | 23 Apr, 2020
Sometimes, we have an application of checking a number is palindrome or not and it’s quite common while day-day programming or competitive programming, it’s easy to reverse a number and check it but sometimes for readability and reducing lines of code, we require to perform this in one-liner logic. Let’s d... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Apr, 2020"
},
{
"code": null,
"e": 412,
"s": 54,
"text": "Sometimes, we have an application of checking a number is palindrome or not and it’s quite common while day-day programming or competitive programming, it’s easy to reverse a... |
Python | focus_set() and focus_get() method | 25 Jun, 2019
Tkinter has a number of widgets to provide functionality in any GUI. It also supports a variety of universal widget methods which can be applied on any of the widget.focus_get() and focus_set() methods are also universal widget methods. They can also be applied on Tk() method.
This method is used to set th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "Tkinter has a number of widgets to provide functionality in any GUI. It also supports a variety of universal widget methods which can be applied on any of the widget.focus_get... |
fmax() and fmin() in C++ | 13 Apr, 2018
fmax() and fmin() functions are defined in cmath header file.
fmax() function: The syntax of this function is:double fmax (double x, double y);
float fmax (float x, float y);
long double fmax (long double x, long double y);
The input to this function are two values of type float, double or long double. The... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2018"
},
{
"code": null,
"e": 90,
"s": 28,
"text": "fmax() and fmin() functions are defined in cmath header file."
},
{
"code": null,
"e": 3440,
"s": 90,
"text": "fmax() function: The syntax of this function ... |
ReactJS findDOMNode() Method | 26 May, 2021
React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at particular stages in the life-cycle of the component. In class-based components, the FindDOMNode() method is used to return DOM of t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 353,
"s": 28,
"text": "React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at ... |
How to display notnull rows and columns in a Python dataframe? | 03 Mar, 2021
In Python, not null rows and columns mean the rows and columns which have Nan values, especially in the Pandas library. To display not null rows and columns in a python data frame we are going to use different methods as dropna(), notnull(), loc[].
dropna() : This function is used to remove rows and column... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "In Python, not null rows and columns mean the rows and columns which have Nan values, especially in the Pandas library. To display not null rows and columns in a python data f... |
EAFP Principle in Python - GeeksforGeeks | 10 May, 2020
EAFP is a piece of gem advice in the Python community which may not be familiar to programmers of other communities. Quickly, EAFP or ‘Easier to Ask for Forgiveness than Permission’ means holding an optimistic view for the code you are working on, and if an exception is thrown catch it and deal with it lat... | [
{
"code": null,
"e": 25579,
"s": 25551,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25890,
"s": 25579,
"text": "EAFP is a piece of gem advice in the Python community which may not be familiar to programmers of other communities. Quickly, EAFP or ‘Easier to Ask for Forgivenes... |
Arranging clustering column in descending order in Cassandra - GeeksforGeeks | 15 Jan, 2020
Perquisite – CassandraIn this article, we are going to discuss how we can arrange table data and how we can arrange clustering column in descending order in a table.
To arrange clustering column in descending order first, we are going to create a table with clustering column.
First, we will see the results... | [
{
"code": null,
"e": 25393,
"s": 25365,
"text": "\n15 Jan, 2020"
},
{
"code": null,
"e": 25559,
"s": 25393,
"text": "Perquisite – CassandraIn this article, we are going to discuss how we can arrange table data and how we can arrange clustering column in descending order in a tabl... |
How to Use Word() Function in Arduino? | The word() function converts a variable of any data type to the word data type. It is essentially a cast function.
The syntax is −
word(var)
Where var is a variable of any datatype.
Alternatively, you can also construct a word by specifying two bytes, the higher byte and the lower byte.
The syntax is −
word(highByte, l... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "The word() function converts a variable of any data type to the word data type. It is essentially a cast function."
},
{
"code": null,
"e": 1193,
"s": 1177,
"text": "The syntax is −"
},
{
"code": null,
"e": 1203,
"s":... |
C program to represent the numbers in spiral pattern | The spiral pattern to represent the numbers is shown below −
The logic applied to print the numbers in spiral pattern is as follows −
for(i=1;i<=rows*2;i+=2){
if(k%2==1){
printf("%3d %3d",i,i+1);
k++;
}else{
printf("%3d %3d",i+1,i);
k++;
}
printf("\n");
}
Following is the C program f... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "The spiral pattern to represent the numbers is shown below −"
},
{
"code": null,
"e": 1196,
"s": 1123,
"text": "The logic applied to print the numbers in spiral pattern is as follows −"
},
{
"code": null,
"e": 1354,
"... |
Python Program to find the cube of each list element - GeeksforGeeks | 17 Feb, 2021
Given a list, the task is to write a python program to cube all the list elements.
Input: [1, 2, 3, 4]
Output: [1, 8, 27, 64]
Explanation: Cubing all the list elements
Input: [2, 4, 6]
Output: [8, 64, 216]
Method 1 : Using loop
This is the brute force way. In this, we just multiply the same element two tim... | [
{
"code": null,
"e": 24237,
"s": 24209,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 24320,
"s": 24237,
"text": "Given a list, the task is to write a python program to cube all the list elements."
},
{
"code": null,
"e": 24340,
"s": 24320,
"text": "Input: ... |
Count common characters in two strings in C++ | We are given with the two strings let’s say str1 and str2 and the task is to find the count of common characters in two strings i.e. if str1[i] = str[j], then they will be considered as a pair and count will increased to 1 and if str1[i]!=str2[j] then they willn’t be considered as a pair and count willn’t increase to 1... | [
{
"code": null,
"e": 1384,
"s": 1062,
"text": "We are given with the two strings let’s say str1 and str2 and the task is to find the count of common characters in two strings i.e. if str1[i] = str[j], then they will be considered as a pair and count will increased to 1 and if str1[i]!=str2[j] then t... |
WifiManager in Android - GeeksforGeeks | 23 Dec, 2021
WifiManager is the class related to the operations done with wifi. This class provides the primary API for managing all aspects of Wi-Fi connectivity. It deals with several categories of items:
The list of available configured networks. The list can be viewed and updated, and attributes of individual entri... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 24919,
"s": 24725,
"text": "WifiManager is the class related to the operations done with wifi. This class provides the primary API for managing all aspects of Wi-Fi connectivity. It deals wit... |
Getting Started with TabPy. An introduction to integrating Tableau... | by Kayla Hartman | Towards Data Science | In any field, it is essential to be resilient and adaptive, approaching new tools and ideas with diligence. In a field as young as data science, it is ever more important to be a self-learner and to take on new challenges. As I entered the final month of my data science bootcamp, I thought back to the below chart I had... | [
{
"code": null,
"e": 529,
"s": 172,
"text": "In any field, it is essential to be resilient and adaptive, approaching new tools and ideas with diligence. In a field as young as data science, it is ever more important to be a self-learner and to take on new challenges. As I entered the final month of ... |
What is the difference between IEnumerable and IQueryable in C#? | IEnumerable exists in System.Collections Namespace.
IQueryable exists in System. Linq Namespace.
Both IEnumerable and IQueryable are forward collection.
IEnumerable doesn’t support lazy loading
IQueryable support lazy loading
Querying data from a database, IEnumerable execute a select query on the server side, load dat... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "IEnumerable exists in System.Collections Namespace."
},
{
"code": null,
"e": 1159,
"s": 1114,
"text": "IQueryable exists in System. Linq Namespace."
},
{
"code": null,
"e": 1215,
"s": 1159,
"text": "Both IEnumerab... |
Calculate the Interquartile Range in R Programming - IQR() Function - GeeksforGeeks | 17 Jun, 2020
IQR() function in R Language is used to calculate the interquartile range of a data set.
Mathematically,IQR = Q3 – Q1
where,Q3 specifies the median of n largest valuesQ1 specifies the median of n smallest values
But, R provides in-built IQR() function to perform the upgiven calculations
Syntax: IQR(x)
Para... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n17 Jun, 2020"
},
{
"code": null,
"e": 25331,
"s": 25242,
"text": "IQR() function in R Language is used to calculate the interquartile range of a data set."
},
{
"code": null,
"e": 25360,
"s": 25331,
"text": "M... |
Maximum sum of pairwise product in an array with negative allowed in C++ program | In this problem, we are given an array arr[] that contains n integers values
(negative values allowed). Our task is to create a program to find the
maximum sum of pairwise products in an array with negative allowed.
Problem Description − We need to create pairs using the elements of the array such that the sum of the p... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "In this problem, we are given an array arr[] that contains n integers values\n(negative values allowed). Our task is to create a program to find the\nmaximum sum of pairwise products in an array with negative allowed."
},
{
"code": null,
"e"... |
MYBATIS - Dynamic SQL | Dynamic SQL is a very powerful feature of MyBatis. It enables programmers to build queries based on the scenario dynamically. For example, if you want to search the Student data base, based on the name of the student in MyBatis, you have to write the query using the dynamic SQL.
MyBatis uses a powerful Dynamic SQL lang... | [
{
"code": null,
"e": 2151,
"s": 1871,
"text": "Dynamic SQL is a very powerful feature of MyBatis. It enables programmers to build queries based on the scenario dynamically. For example, if you want to search the Student data base, based on the name of the student in MyBatis, you have to write the qu... |
JDBC - Streaming ASCII and Binary Data | A PreparedStatement object has the ability to use input and output streams to supply parameter data. This enables you to place entire files into database columns that can
hold large values, such as CLOB and BLOB data types.
There are following methods, which can be used to stream data −
setAsciiStream() − This method... | [
{
"code": null,
"e": 2386,
"s": 2162,
"text": "A PreparedStatement object has the ability to use input and output streams to supply parameter data. This enables you to place entire files into database columns that can\nhold large values, such as CLOB and BLOB data types."
},
{
"code": null,
... |
C++ IOS Library - rdbuf | It is used to get/set stream buffer. If sb is a null pointer, the function automatically sets the badbit error state flags (which may throw an exception if member exceptions has been passed badbit).
Some derived stream classes (such as stringstream and fstream) maintain their own internal stream buffer, to which they a... | [
{
"code": null,
"e": 2802,
"s": 2603,
"text": "It is used to get/set stream buffer. If sb is a null pointer, the function automatically sets the badbit error state flags (which may throw an exception if member exceptions has been passed badbit)."
},
{
"code": null,
"e": 3292,
"s": 28... |
AWT MouseAdapter Class | The class MouseAdapter is an abstract (adapter) class for receiving mouse events. All methods of this class are empty. This class is convenience class for creating listener objects.
Following is the declaration for java.awt.event.MouseAdapter class:
public abstract class MouseAdapter
extends Object
implements ... | [
{
"code": null,
"e": 1929,
"s": 1747,
"text": "The class MouseAdapter is an abstract (adapter) class for receiving mouse events. All methods of this class are empty. This class is convenience class for creating listener objects."
},
{
"code": null,
"e": 1997,
"s": 1929,
"text": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.