title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Flutter – Wakelock | 21 Oct, 2020
The Wakelock package in Flutter is used to keep the screen awake while using it. It can be adjusted according to the requirements (how long to stay awake). These are very simple things that enhance the quality of the app and increases the user-friendliness of the same.
In this article, we will explore the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2020"
},
{
"code": null,
"e": 298,
"s": 28,
"text": "The Wakelock package in Flutter is used to keep the screen awake while using it. It can be adjusted according to the requirements (how long to stay awake). These are very simp... |
GATE | GATE CS 2010 | Question 23 | 28 Jun, 2021
Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned.
Method Used by P1
while (S1 == S2) ;
Critica1 Section
S1 = S2;
Method Used by P2
while (S1 != S2) ;
Critic... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 252,
"s": 52,
"text": "Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and ... |
enum in Java | 24 Jan, 2022
Enumerations serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck of playing cards may be 4 enumerators named Club, Diamond, Heart, and Spade, belonging to an enumerated type named Suit. Other examples include natural enumerated types (l... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 424,
"s": 54,
"text": "Enumerations serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck of playing cards may be 4 enumerators ... |
Minimize length of a string by removing suffixes and prefixes of same characters | 20 Apr, 2021
Given a string S of length N consisting only of characters ‘a’, ‘b’, and ‘c’, the task is to minimize the length of the given string by performing the following operations only once:
Divide the string into two non-empty substrings and then, append the left substring to the end of the right substring.
While... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 235,
"s": 52,
"text": "Given a string S of length N consisting only of characters ‘a’, ‘b’, and ‘c’, the task is to minimize the length of the given string by performing the following operations on... |
Sum of an array using pthreads | 05 Jan, 2018
Sum of array is a small problem where we have to add each element in the array by traversing through the entire array. But when the number of elements are too large, it could take a lot of time. But this could solved by dividing the array into parts and finding sum of each part simultaneously i.e. by findi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jan, 2018"
},
{
"code": null,
"e": 395,
"s": 52,
"text": "Sum of array is a small problem where we have to add each element in the array by traversing through the entire array. But when the number of elements are too large, it could... |
MongoDB query to match documents whose _id is in an array as part of a subdocument? | Let us create a collection with documents −
> db.demo568.insertOne({ _id: 101, details: [ {id : 101 }, { id:103 } ] });
{ "acknowledged" : true, "insertedId" : 101 }
Display all documents from a collection with the help of find() method −
> db.demo568.find();
This will produce the following output −
{ "_id" : 101, "det... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "Let us create a collection with documents −"
},
{
"code": null,
"e": 1228,
"s": 1106,
"text": "> db.demo568.insertOne({ _id: 101, details: [ {id : 101 }, { id:103 } ] });\n{ \"acknowledged\" : true, \"insertedId\" : 101 }"
},
{
... |
Correct Ways to Close InputStream and OutputStream in Java with Examples - GeeksforGeeks | 12 Mar, 2021
Since IO needs you to deal with streams, channels, and file descriptors that need to be closed properly, it is uncomfortable for Java developers to deal with them. Because of this, many Java programmers never bother doing clean-up, the laziness of just doing work and ignoring anything is really easy. For p... | [
{
"code": null,
"e": 23972,
"s": 23944,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 24373,
"s": 23972,
"text": "Since IO needs you to deal with streams, channels, and file descriptors that need to be closed properly, it is uncomfortable for Java developers to deal with them.... |
Output of C Program | Set 26 - GeeksforGeeks | 27 Dec, 2016
Predict the output of following C programs.
Question 1
#include <stdio.h> int main(){ int arr[] = {}; printf("%d", sizeof(arr)); return 0;}
Output: 0C (or C++) allows arrays of size 0. When an array is declared with empty initialization list, size of the array becomes 0.
Question 2
#include<stdio.h> ... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n27 Dec, 2016"
},
{
"code": null,
"e": 24374,
"s": 24330,
"text": "Predict the output of following C programs."
},
{
"code": null,
"e": 24385,
"s": 24374,
"text": "Question 1"
},
{
"code": "#include <st... |
Geographic Clustering with HDBSCAN | by João Paulo Figueira | Towards Data Science | Your smartphone knows when you are at home or the office. At least, mine does, and can even tell me when to leave to get at one of my common destinations on time. We all accept that our smart devices collect information about our preferences and send them over to the cloud for processing. These come back as recommendat... | [
{
"code": null,
"e": 443,
"s": 46,
"text": "Your smartphone knows when you are at home or the office. At least, mine does, and can even tell me when to leave to get at one of my common destinations on time. We all accept that our smart devices collect information about our preferences and send them ... |
Passing Arrays as Subprogram Arguments | Pascal allows passing arrays as subprogram parameters. Following function will take an array as an argument and return average of the numbers passed through the array as follows −
program arrayToFunction;
const
size = 5;
type
a = array [1..size] of integer;
var
balance: a = (1000, 2, 3, 17, 50);
average: r... | [
{
"code": null,
"e": 2263,
"s": 2083,
"text": "Pascal allows passing arrays as subprogram parameters. Following function will take an array as an argument and return average of the numbers passed through the array as follows −"
},
{
"code": null,
"e": 2757,
"s": 2263,
"text": "pr... |
CSS - Syntax | A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts −
Selector − A selector is an HTML tag at which a style will be applied. This could be any tag like <h1> or <table> etc.
Selector − A selector is an HTM... | [
{
"code": null,
"e": 2796,
"s": 2626,
"text": "A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts −"
},
{
"code": null,
"e": 2915,
"s": 2796,
"text": "Selector − A... |
halt, poweroff and reboot Commands in Linux - GeeksforGeeks | 24 May, 2019
Below are typical uses of halt, poweroff and reboot.
halt : Instructs hardware to stop CPU functions.poweroff : Instructs the system to power down.reboot : Restarts or reboots the system.
halt : Instructs hardware to stop CPU functions.
poweroff : Instructs the system to power down.
reboot : Restarts or re... | [
{
"code": null,
"e": 24020,
"s": 23992,
"text": "\n24 May, 2019"
},
{
"code": null,
"e": 24073,
"s": 24020,
"text": "Below are typical uses of halt, poweroff and reboot."
},
{
"code": null,
"e": 24208,
"s": 24073,
"text": "halt : Instructs hardware to stop CPU... |
How to create a zebra stripped table with CSS ? - GeeksforGeeks | 04 Feb, 2022
A zebra-stripped table is a table that has alternating rows (or columns) in a different shade of color. The benefits of using zebra-stripped tables are many, such as increasing the readability of rows (or columns), laying emphasis on a specific set of rows (or columns), etc.
This article will tell you how ... | [
{
"code": null,
"e": 26757,
"s": 26729,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 27033,
"s": 26757,
"text": "A zebra-stripped table is a table that has alternating rows (or columns) in a different shade of color. The benefits of using zebra-stripped tables are many, such ... |
Create a drop-down list that options fetched from a MySQL database in PHP - GeeksforGeeks | 22 Jul, 2021
In many scenarios, we may need to create a dropdown input that can display all the options consistent with the current state of the database. This form of input is used many times in real life and the following examples may help to understand the same.
A set of students who have unique registration numbe... | [
{
"code": null,
"e": 26560,
"s": 26529,
"text": " \n22 Jul, 2021\n"
},
{
"code": null,
"e": 26813,
"s": 26560,
"text": "In many scenarios, we may need to create a dropdown input that can display all the options consistent with the current state of the database. This form of input... |
How to implement Builder pattern in Kotlin? | In object-oriented programming, the creation of objects is very easy via
constructors when the object definitions are simple, but sometimes, it may so
happen that the constructors need more variables or functions in order to
initialize an object. In such cases, the "builder pattern" comes into picture
which helps progr... | [
{
"code": null,
"e": 1459,
"s": 1062,
"text": "In object-oriented programming, the creation of objects is very easy via\nconstructors when the object definitions are simple, but sometimes, it may so\nhappen that the constructors need more variables or functions in order to\ninitialize an object. In ... |
CSS | drop-shadow() Function - GeeksforGeeks | 08 Aug, 2019
The drop-shadow() function is an inbuilt function which is used to apply a filter to the image to set the shadow of the image. The drop-shadow() function creates a blurred shadow in a given offset and color.
Syntax:
drop-shadow( offset-x offset-y blur-radius spread-radius color )
Parameters: This function ... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n08 Aug, 2019"
},
{
"code": null,
"e": 25584,
"s": 25376,
"text": "The drop-shadow() function is an inbuilt function which is used to apply a filter to the image to set the shadow of the image. The drop-shadow() function creates a... |
Number of permutation with K inversions | Practice | GeeksforGeeks | Given an array, an inversion is defined as a pair a[i], a[j] such that a[i] > a[j] and i < j. Given two numbers N and K, the task is to find the count of the number of permutations of first N numbers have exactly K inversion.
Note: Answer can be large, output answer modulo 109 + 7
Example 1:
Input: N = 3, K = 1
Output:... | [
{
"code": null,
"e": 464,
"s": 238,
"text": "Given an array, an inversion is defined as a pair a[i], a[j] such that a[i] > a[j] and i < j. Given two numbers N and K, the task is to find the count of the number of permutations of first N numbers have exactly K inversion."
},
{
"code": null,
... |
Count of number of given string in 2D character array - GeeksforGeeks | 25 Sep, 2021
Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be present left to right, right to left, top to down or down to top.
Examples:
Input : a ={
{D,D,D,G,D,D},
{B,B,D,E,B,S},
... | [
{
"code": null,
"e": 24734,
"s": 24706,
"text": "\n25 Sep, 2021"
},
{
"code": null,
"e": 24957,
"s": 24734,
"text": "Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be presen... |
Program to swap nodes in a linked list in Python | Suppose we have a list L and another value k. We have to swap kth node from start and kth node from end and return the final list at end.
So, if the input is like L = [1,5,6,7,1,6,3,9,12] k = 3, then the output will be [1,5,3,7,1,6,6,9,12], the 3rd node from start is 6 and from end is 3, so they are swapped.
To solve t... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "Suppose we have a list L and another value k. We have to swap kth node from start and kth node from end and return the final list at end."
},
{
"code": null,
"e": 1372,
"s": 1200,
"text": "So, if the input is like L = [1,5,6,7,1,6,3,... |
Largest number with one swap allowed - GeeksforGeeks | 12 May, 2022
Given a positive integer, find the largest number that could be generated by swapping only two digits at most once.Examples:
Input: 2736
Output : 7236
Explanation:
If we swap the number 2 and the number
7 then the generated number would be
the largest number.
Input : 432
Output : 432
Explanation:
Here,... | [
{
"code": null,
"e": 26111,
"s": 26083,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 26238,
"s": 26111,
"text": "Given a positive integer, find the largest number that could be generated by swapping only two digits at most once.Examples: "
},
{
"code": null,
"e":... |
Linear Search | Linear searching techniques are the simplest technique. In this technique, the items are searched one by one. This procedure is also applicable for unsorted data set. Linear search is also known as sequential search. It is named as linear because its time complexity is of the order of n O(n).
Time Complexity: O(n)
Spac... | [
{
"code": null,
"e": 1356,
"s": 1062,
"text": "Linear searching techniques are the simplest technique. In this technique, the items are searched one by one. This procedure is also applicable for unsorted data set. Linear search is also known as sequential search. It is named as linear because its ti... |
MLflow Part 1: Getting Started with MLflow! | by David Hundley | Towards Data Science | Hello again friends! We’re back here with another quick tip, and because I do attempt to keep these posts quick, this is actually going to be part one in a series of tips related to MLFlow. In the spirit of full transparency, MLFlow is pretty new to me, so I’m going to be learning things alongside you all over the next... | [
{
"code": null,
"e": 604,
"s": 172,
"text": "Hello again friends! We’re back here with another quick tip, and because I do attempt to keep these posts quick, this is actually going to be part one in a series of tips related to MLFlow. In the spirit of full transparency, MLFlow is pretty new to me, s... |
Dart - URIs - GeeksforGeeks | 30 Aug, 2020
The Uri class supports functions to encode and decode strings for use in URIs (which you might know as URLs). These functions control characters that are unique for URIs, such as & and =. This class also parses and exposes the components of a URI—host, port, scheme, and so on.
The encodeFull() and decodeFu... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 24288,
"s": 24010,
"text": "The Uri class supports functions to encode and decode strings for use in URIs (which you might know as URLs). These functions control characters that are unique fo... |
pandas-to-sql — Moving code from SQL to Python and Pandas | by Amir Pupko | Towards Data Science | pandas-to-sql is a python library, allowing the use of python’s Pandas DataFrames for creating SQL strings that can later be used to query a database. Here are some examples you can run.
A common structure of a data science project will start from the data fetching and preparation phase. In case the database that holds... | [
{
"code": null,
"e": 234,
"s": 47,
"text": "pandas-to-sql is a python library, allowing the use of python’s Pandas DataFrames for creating SQL strings that can later be used to query a database. Here are some examples you can run."
},
{
"code": null,
"e": 504,
"s": 234,
"text": "... |
OBIEE â Administration | In OBIEE 10g, most of OBIEE administration tasks were mostly performed either through the Administration tool, the web-based Presentation Server administration screen, or through editing files in the filesystem. There were around 700 or so configuration options spread over multiple tools and configuration files, with s... | [
{
"code": null,
"e": 2481,
"s": 2076,
"text": "In OBIEE 10g, most of OBIEE administration tasks were mostly performed either through the Administration tool, the web-based Presentation Server administration screen, or through editing files in the filesystem. There were around 700 or so configuration... |
1 Line of Python Code for Data Profiling | by Pranjal Saxena | Towards Data Science | Python is one of the most used programming languages for programmers and data scientists. Programmers love Python because of its programmers’ friendly behaviour. Data scientists love Python because most machine learning and deep learning libraries are available in Python.
When we talk about programmers or data scientis... | [
{
"code": null,
"e": 320,
"s": 47,
"text": "Python is one of the most used programming languages for programmers and data scientists. Programmers love Python because of its programmers’ friendly behaviour. Data scientists love Python because most machine learning and deep learning libraries are avai... |
CSS background-position Property - GeeksforGeeks | 22 Oct, 2021
The background-position property in CSS is mainly used to sets the initial position for the background image ie., it is used to set an image at a certain position. The position that is relative to the positioning layer, can be set by using the background-origin property.
Syntax:
background-position: value;... | [
{
"code": null,
"e": 23674,
"s": 23646,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 23946,
"s": 23674,
"text": "The background-position property in CSS is mainly used to sets the initial position for the background image ie., it is used to set an image at a certain position.... |
HSQLDB - Update Query | Whenever you want to modify the values of a table, you can use the UPDATE command. This will modify any field value from any HSQLDB table.
Here is the generic syntax for UPDATE command.
UPDATE table_name SET field1 = new-value1, field2 = new-value2 [WHERE Clause]
You can update one or more field altogether.
You can sp... | [
{
"code": null,
"e": 2121,
"s": 1982,
"text": "Whenever you want to modify the values of a table, you can use the UPDATE command. This will modify any field value from any HSQLDB table."
},
{
"code": null,
"e": 2168,
"s": 2121,
"text": "Here is the generic syntax for UPDATE comma... |
How to Create and Customize Venn Diagrams in Python | by Julia Kho | Towards Data Science | Venn diagrams are great for illustrating the relationship between two or three groups; you can easily see the commonalities and differences. This article will show you how to create Venn diagrams in Python and how to customize the diagrams to your liking.
First of all, you will have to install the library to your compu... | [
{
"code": null,
"e": 427,
"s": 171,
"text": "Venn diagrams are great for illustrating the relationship between two or three groups; you can easily see the commonalities and differences. This article will show you how to create Venn diagrams in Python and how to customize the diagrams to your liking.... |
How can I display an image using cv2 in Python? | To read an image in Python cv2, we can take the following steps−
Load an image from a file.
Display the image in the specified window.
Wait for a pressed key.
Destroy all of the HighGUI windows.
import cv2
img = cv2.imread("baseball.png", cv2.IMREAD_COLOR)
cv2.imshow("baseball", img)
cv2.waitKey(0)
cv2.destroyAllWindow... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "To read an image in Python cv2, we can take the following steps−"
},
{
"code": null,
"e": 1154,
"s": 1127,
"text": "Load an image from a file."
},
{
"code": null,
"e": 1197,
"s": 1154,
"text": "Display the image i... |
Find median in a stream | Practice | GeeksforGeeks | Given an input stream of N integers. The task is to insert these numbers into a new stream and find the median of the stream formed by each insertion of X to the new stream.
Example 1:
Input:
N = 4
X[] = 5,15,1,3
Output:
5
10
5
4
Explanation:Flow in stream : 5, 15, 1, 3
5 goes to stream --> median 5 (5)
15 goes to st... | [
{
"code": null,
"e": 412,
"s": 238,
"text": "Given an input stream of N integers. The task is to insert these numbers into a new stream and find the median of the stream formed by each insertion of X to the new stream."
},
{
"code": null,
"e": 423,
"s": 412,
"text": "Example 1:"
... |
C++ program to find the probability of a state at a given time in a Markov chain | In this article, we will be discussing a program to find the probability of reaching from the initial state to the final state in a given time period in Markov chain.
Markov chain is a random process that consists of various states and the associated probabilities of going from one state to another. It takes unit time ... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "In this article, we will be discussing a program to find the probability of reaching from the initial state to the final state in a given time period in Markov chain."
},
{
"code": null,
"e": 1417,
"s": 1229,
"text": "Markov chain is... |
Flex - Quick Guide | Flex is a powerful, open source application framework that allows you to build traditional applications for browser, mobile and desktop using the same programming model, tool, and codebase.
Flex provides FLEX SDK consisting of the Flex class library (ActionScript classes), the Flex compilers, the debugger, the MXML and... | [
{
"code": null,
"e": 2237,
"s": 2047,
"text": "Flex is a powerful, open source application framework that allows you to build traditional applications for browser, mobile and desktop using the same programming model, tool, and codebase."
},
{
"code": null,
"e": 2493,
"s": 2237,
"... |
Camera Calibration with Python - OpenCV - GeeksforGeeks | 09 Jun, 2021
Prerequisites: OpenCV
A camera is an integral part of several domains like robotics, space exploration, etc camera is playing a major role. It helps to capture each and every moment and helpful for many analyses. In order to use the camera as a visual sensor, we should know the parameters of the camera. Ca... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 24314,
"s": 24292,
"text": "Prerequisites: OpenCV"
},
{
"code": null,
"e": 24879,
"s": 24314,
"text": "A camera is an integral part of several domains like robotics, space... |
Python program to find Most Frequent Character in a String | When it is required to find the most frequent character in a string, an empty dictionary is created, and the elements in the string are iterated over. When a character is found in the dictionary, it is increment, else it is assigned to 1. The maximum of the values in the dictionary is found, and assigned to a variable.... | [
{
"code": null,
"e": 1383,
"s": 1062,
"text": "When it is required to find the most frequent character in a string, an empty dictionary is created, and the elements in the string are iterated over. When a character is found in the dictionary, it is increment, else it is assigned to 1. The maximum of... |
Rotating axis text for each subplot in Matplotlib | To rotate axis text for each subplot, we can use text with rotation in the argument.
Create a new figure or activate an existing figure.
Create a new figure or activate an existing figure.
Add an '~.axes.Axes' to the figure as part of a subplot arrangement using add_subplot() method.
Add an '~.axes.Axes' to the figure ... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To rotate axis text for each subplot, we can use text with rotation in the argument."
},
{
"code": null,
"e": 1199,
"s": 1147,
"text": "Create a new figure or activate an existing figure."
},
{
"code": null,
"e": 1251,
... |
Cassandra - Drop Keyspace | You can drop a KeySpace using the command DROP KEYSPACE. Given below is the syntax for dropping a KeySpace.
DROP KEYSPACE <identifier>
i.e.
DROP KEYSPACE “KeySpace name”
The following code deletes the keyspace tutorialspoint.
cqlsh> DROP KEYSPACE tutorialspoint;
Verify the keyspaces using the command Describe and ch... | [
{
"code": null,
"e": 2395,
"s": 2287,
"text": "You can drop a KeySpace using the command DROP KEYSPACE. Given below is the syntax for dropping a KeySpace."
},
{
"code": null,
"e": 2423,
"s": 2395,
"text": "DROP KEYSPACE <identifier>\n"
},
{
"code": null,
"e": 2428,
... |
Python Program to Find All Nodes Reachable from a Node using BFS in a Graph | When it is required to find the sum of all the nodes of a tree, a class is created, and it contains methods to set the root node, add elements to the tree, search for a specific element, and add elements of the tree to find the sum and so on. An instance of the class can be created to access and use these methods.
Belo... | [
{
"code": null,
"e": 1378,
"s": 1062,
"text": "When it is required to find the sum of all the nodes of a tree, a class is created, and it contains methods to set the root node, add elements to the tree, search for a specific element, and add elements of the tree to find the sum and so on. An instanc... |
JavaScript - Date getSeconds() Method | Javascript date getSeconds() method returns the seconds in the specified date according to local time. The value returned by getSeconds() is an integer between 0 and 59.
Its syntax is as follows −
Date.getSeconds()
Returns the seconds in the specified date according to local time.
Try the following example.
<html>
... | [
{
"code": null,
"e": 2636,
"s": 2466,
"text": "Javascript date getSeconds() method returns the seconds in the specified date according to local time. The value returned by getSeconds() is an integer between 0 and 59."
},
{
"code": null,
"e": 2663,
"s": 2636,
"text": "Its syntax i... |
C++ Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! + ...... n/n! | Here we will see how we can get the sum of the given series. The value of n will be given by user. We can solve this problem by making a factorial function, and get factorial in each step in the loop. But factorial calculation is costlier task than normal addition. We will use the previous factorial term in the next on... | [
{
"code": null,
"e": 1544,
"s": 1062,
"text": "Here we will see how we can get the sum of the given series. The value of n will be given by user. We can solve this problem by making a factorial function, and get factorial in each step in the loop. But factorial calculation is costlier task than norm... |
Aptitude | GATE CS 1998 | Question 22 - GeeksforGeeks | 11 Oct, 2017
Give the correct matching for the following pairs:
A. O(log n) 1. Selection sort
B. O(n) 2. Insertion sort
C. O(nlog n) 3. Binary search
D. O(n^2) 4. Merge sort
codes:
A B C D
a. 3 1 2 4
b. 3 1 4 2
c. 1 3 4 2
d. 1 4 3 2
(A) a(B) b(C) c(D) d... | [
{
"code": null,
"e": 24428,
"s": 24400,
"text": "\n11 Oct, 2017"
},
{
"code": null,
"e": 24479,
"s": 24428,
"text": "Give the correct matching for the following pairs:"
},
{
"code": null,
"e": 24715,
"s": 24479,
"text": "A. O(log n) 1. Selection sort\nB. O... |
CSS - elevation | The elevation property describes the position of a sound source along the vertical axis of the listener's environment.
angle − Angle values are in the range -90deg to 90deg. An angle value of 0deg corresponds to a point which is level with the listener, whereas 90deg corresponds to a point directly above, and -90deg di... | [
{
"code": null,
"e": 2745,
"s": 2626,
"text": "The elevation property describes the position of a sound source along the vertical axis of the listener's environment."
},
{
"code": null,
"e": 2960,
"s": 2745,
"text": "angle − Angle values are in the range -90deg to 90deg. An angle... |
What is a constant and how to define constants in Java? | A constant is a variable whose value cannot change once it has been assigned. Java doesn't have built-in support for constants.
A constant can make our program more easily read and understood by others. In addition, a constant is cached by the JVM as well as our application, so using a constant can improve performance.... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "A constant is a variable whose value cannot change once it has been assigned. Java doesn't have built-in support for constants."
},
{
"code": null,
"e": 1383,
"s": 1190,
"text": "A constant can make our program more easily read and u... |
Show decimal places and scientific notation on the axis of a Matplotlib plot | To show decimal places and scientific notation on the axis of a matplotlib, we can use scalar formatter by overriding _set_format() method.
Create x and y data points using numpy.
Create x and y data points using numpy.
Plot x and y using plot() method.
Plot x and y using plot() method.
Using gca() method, get the curr... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "To show decimal places and scientific notation on the axis of a matplotlib, we can use scalar formatter by overriding _set_format() method."
},
{
"code": null,
"e": 1242,
"s": 1202,
"text": "Create x and y data points using numpy."
... |
Swap two numbers | Practice | GeeksforGeeks | Swap given two numbers and print them. (Try to do it without a temporary variable.) and return it.
Example 1:
Input: a = 13, b = 9
Output: 9 13
Explanation: after swapping it
becomes 9 and 13.
​Example 2:
Input: a = 15, b = 8
Output: 8 15
Explanation: after swapping it
becomes 8 and 15.
Your Task:
You don't need ... | [
{
"code": null,
"e": 337,
"s": 238,
"text": "Swap given two numbers and print them. (Try to do it without a temporary variable.) and return it."
},
{
"code": null,
"e": 348,
"s": 337,
"text": "Example 1:"
},
{
"code": null,
"e": 432,
"s": 348,
"text": "Input: ... |
How to create a date picker using JavaFX? | Typically, a date picker displays a calendar, from which you can browse through different months and pick a date. The picked date is formatted and inputs into the system.
In JavaFX the javafx.scene.control.DatePicker class represents the date picker. This contains a text (date) filed and a date chooser. You can either ... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "Typically, a date picker displays a calendar, from which you can browse through different months and pick a date. The picked date is formatted and inputs into the system."
},
{
"code": null,
"e": 1447,
"s": 1233,
"text": "In JavaFX t... |
Constructors in C++ | Constructors are functions of a class that are executed when new objects of the class are created. The constructors have the same name as the class and no return type, not even void. They are primarily useful for providing initial values for variables of the class.
The two main types of constructors are default constru... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "Constructors are functions of a class that are executed when new objects of the class are created. The constructors have the same name as the class and no return type, not even void. They are primarily useful for providing initial values for variables o... |
Inorder Successor in BST in C++ | Suppose we have a binary search tree and a node in it, we have to search the in-order successor of that node in the BST. As we know that the successor of a node p is the node with the smallest key greater than p.val.
So, if the input is like root = [2,1,3], p = 1,
then the output will be 2,
To solve this, we will follo... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "Suppose we have a binary search tree and a node in it, we have to search the in-order successor of that node in the BST. As we know that the successor of a node p is the node with the smallest key greater than p.val."
},
{
"code": null,
"e":... |
How to reduce the space between two plots that are joined with grid.arrange in R? | When we join or combine plots using grid.arrange the scales of the first plot comes in between as X-axis even if the independent variable in both of the plots is same.
Therefore, we might want to remove the space between the plots while joining to get only one X-axis. This can be done by using theme function.
Consider ... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "When we join or combine plots using grid.arrange the scales of the first plot comes in between as X-axis even if the independent variable in both of the plots is same."
},
{
"code": null,
"e": 1373,
"s": 1230,
"text": "Therefore, we ... |
DAX Filter - USERELATIONSHIP function | Specifies the relationship to be used in a specific calculation as the one that exists between columnName1 and columnName2.
USERELATIONSHIP (<columnName1>, <columnName2>)
columnName1
A fully qualified name of a column that represents the many side of the relationship to be used.
If the parameters are given in a rever... | [
{
"code": null,
"e": 2125,
"s": 2001,
"text": "Specifies the relationship to be used in a specific calculation as the one that exists between columnName1 and columnName2."
},
{
"code": null,
"e": 2174,
"s": 2125,
"text": "USERELATIONSHIP (<columnName1>, <columnName2>) \n"
},
... |
Python SQLite - Cursor Object - GeeksforGeeks | 16 Feb, 2022
In this article, we are going to discuss cursor objects in sqlite3 module of Python.
It is an object that is used to make the connection for executing SQL queries. It acts as middleware between SQLite database connection and SQL query. It is created after giving connection to SQLite database.
Syntax: curso... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 23986,
"s": 23901,
"text": "In this article, we are going to discuss cursor objects in sqlite3 module of Python."
},
{
"code": null,
"e": 24195,
"s": 23986,
"text": "It is... |
Learning in Graphs with Python (Part 3) | by Maël Fabien | Towards Data Science | Graphs are becoming central to machine learning these days, whether you’d like to understand the structure of a social network by predicting potential connections, detecting fraud, understand customer’s behavior of a car rental service or making real-time recommendations for example.
In this article, we’ll cover :
The ... | [
{
"code": null,
"e": 457,
"s": 172,
"text": "Graphs are becoming central to machine learning these days, whether you’d like to understand the structure of a social network by predicting potential connections, detecting fraud, understand customer’s behavior of a car rental service or making real-time... |
ArgumentNullException in C# | The exception thrown when a null reference is passed to a method that does not accept it as a valid argument.
Let us see an example.
When we set a null parameter to int.Parse() method, then ArgumentNullException is thrown as shown below −
using System;
class Demo {
static void Main() {
string val = null;
... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "The exception thrown when a null reference is passed to a method that does not accept it as a valid argument."
},
{
"code": null,
"e": 1195,
"s": 1172,
"text": "Let us see an example."
},
{
"code": null,
"e": 1301,
"s... |
ggplot2 - Working with Legends | Axes and legends are collectively called as guides. They allow us to read observations from the plot and map them back with respect to original values. The legend keys and tick labels are both determined by the scale breaks. Legends and axes are produced automatically based on the respective scales and geoms which are ... | [
{
"code": null,
"e": 2359,
"s": 2022,
"text": "Axes and legends are collectively called as guides. They allow us to read observations from the plot and map them back with respect to original values. The legend keys and tick labels are both determined by the scale breaks. Legends and axes are produce... |
cal - Unix, Linux Command | cal - To display a calendar.
cal [-mjy] [[month] year]
A single parameter specifies the 4 digit year (1 - 9999) to be displayed. Two parameters denote the Month (1 - 12) and Year (1 - 9999). If arguments are not specified, the current month is displayed. A year starts on 01 Jan.
To display current month's calendar
$ ca... | [
{
"code": null,
"e": 10606,
"s": 10577,
"text": "cal - To display a calendar."
},
{
"code": null,
"e": 10632,
"s": 10606,
"text": "cal [-mjy] [[month] year]"
},
{
"code": null,
"e": 10857,
"s": 10632,
"text": "A single parameter specifies the 4 digit year (1 -... |
Apache Cassandra tools - GeeksforGeeks | 24 Jul, 2020
Prerequisites –
Introduction to Apache Cassandra
Apache Cassandra (NOSQL database)
Architecture of Apache Cassandra
In this article, we are going to discuss the tools of Apache Cassandra which help to perform in various aspects of tasks such that the status of the node, the status of the ring, back up and ... | [
{
"code": null,
"e": 25435,
"s": 25407,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 25451,
"s": 25435,
"text": "Prerequisites –"
},
{
"code": null,
"e": 25484,
"s": 25451,
"text": "Introduction to Apache Cassandra"
},
{
"code": null,
"e": 2551... |
jQuery - is( selector ) Method | The is( selector ) method checks the current selection against an expression and returns true, if at least one element of the selection fits the given selector.
If no element fits, or the selector is not valid, then the response will be 'false'.
Here is the simple syntax to use this method −
element.is( selector )
Her... | [
{
"code": null,
"e": 2483,
"s": 2322,
"text": "The is( selector ) method checks the current selection against an expression and returns true, if at least one element of the selection fits the given selector."
},
{
"code": null,
"e": 2568,
"s": 2483,
"text": "If no element fits, o... |
Java infinite do-while loop | Yes. Following do-while loop is a valid statement and causes an infinite loop.
do{} while(true); | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "Yes. Following do-while loop is a valid statement and causes an infinite loop."
},
{
"code": null,
"e": 1160,
"s": 1141,
"text": "do{} while(true);\n"
}
] |
Square root of a number | Practice | GeeksforGeeks | Given an integer x, find the square root of x. If x is not a perfect square, then return floor(√x).
Example 1:
Input:
x = 5
Output: 2
Explanation: Since, 5 is not a perfect
square, floor of square_root of 5 is 2.
Example 2:
Input:
x = 4
Output: 2
Explanation: Since, 4 is a perfect
square, so its square root is 2.
... | [
{
"code": null,
"e": 338,
"s": 238,
"text": "Given an integer x, find the square root of x. If x is not a perfect square, then return floor(√x)."
},
{
"code": null,
"e": 351,
"s": 340,
"text": "Example 1:"
},
{
"code": null,
"e": 455,
"s": 351,
"text": "Input:... |
Count of elements on the left which are divisible by current element - GeeksforGeeks | 10 Mar, 2022
Given an array A[] of N integers, the task is to generate an array B[] such that B[i] contains the count of indices j in A[] such that j < i and A[j] % A[i] = 0Examples:
Input: arr[] = {3, 5, 1} Output: 0 0 2 3 and 5 do not divide any element on their left but 1 divides 3 and 5.Input: arr[] = {8, 1, 28, ... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 24968,
"s": 24796,
"text": "Given an array A[] of N integers, the task is to generate an array B[] such that B[i] contains the count of indices j in A[] such that j < i and A[j] % A[i] = 0Exa... |
Partition Operators in LINQ | Divide an input sequence into two separate sections without rearranging the elements of the sequence and then returning one of them.
Module Module1
Sub Main()
Dim words = {"once", "upon", "a", "time", "there", "was", "a", "jungle"}
Dim query = From word In words
Skip 4
Dim ... | [
{
"code": null,
"e": 1869,
"s": 1736,
"text": "Divide an input sequence into two separate sections without rearranging the elements of the sequence and then returning one of them."
},
{
"code": null,
"e": 2265,
"s": 1869,
"text": "Module Module1\n\n Sub Main()\n \n Dim w... |
Zoho Interview Experience | Set 37 (Java Developer) - GeeksforGeeks | 24 Jul, 2019
Round 1: There were 20 Aptitude Questions and 10 Java MCQ.No C or C++ questions.
Round 2: This time it was quite easy ..
1.Given a String with or without special characters find if it is Palindrome or Not.. No splitting of array must be done or No additional spaces must be used for storing the array..
Eg: ... | [
{
"code": null,
"e": 24585,
"s": 24557,
"text": "\n24 Jul, 2019"
},
{
"code": null,
"e": 24666,
"s": 24585,
"text": "Round 1: There were 20 Aptitude Questions and 10 Java MCQ.No C or C++ questions."
},
{
"code": null,
"e": 24706,
"s": 24666,
"text": "Round 2: ... |
Matplotlib.axes.Axes.table() in Python - GeeksforGeeks | 21 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 24201,
"s": 23901,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ... |
Clustering with K-means. Using unsupervised machine learning to... | by Mahima Kaushiva | Towards Data Science | One of the most commonly used techniques of unsupervised learning is clustering. As the name suggests, clustering is the act of grouping data that shares similar characteristics. In machine learning, clustering is used when there are no pre-specified labels of data available, i.e. we don’t know what kind of groupings t... | [
{
"code": null,
"e": 568,
"s": 171,
"text": "One of the most commonly used techniques of unsupervised learning is clustering. As the name suggests, clustering is the act of grouping data that shares similar characteristics. In machine learning, clustering is used when there are no pre-specified labe... |
Python program to sort digits of a number in ascending order - GeeksforGeeks | 23 Feb, 2021
Given an integer N, the task is to sort the digits in ascending order. Print the new number obtained after excluding leading zeroes.
Examples:
Input: N = 193202042Output: 1222349Explanation: Sorting all digits of the given number generates 001222349.Final number obtained after removal of leading 0s is 1222... | [
{
"code": null,
"e": 24636,
"s": 24608,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 24769,
"s": 24636,
"text": "Given an integer N, the task is to sort the digits in ascending order. Print the new number obtained after excluding leading zeroes."
},
{
"code": null,
... |
Modin — Speed up your Pandas Notebooks, Scripts, and Libraries | by Satyam Kumar | Towards Data Science | Pandas is an open-source library providing high performance, easy to use data structures and data analytics tools for the Python language. Pandas is a fundamentally high-level building block for doing real-world data analysis in Python. It has the broader goal of becoming the most powerful and flexible open-source data... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "Pandas is an open-source library providing high performance, easy to use data structures and data analytics tools for the Python language. Pandas is a fundamentally high-level building block for doing real-world data analysis in Python. It has the broader... |
Data Engineering — How to Set Dependencies Between Data Pipelines in Apache Airflow | by Nicholas Leong | Towards Data Science | Greetings my fellow readers, it’s me again.That guy who writes about his life experiences and a little tad bit about data.Just a little bit.Article after article, I always start with how important is data in a strong organisation. How large companies are using data to impact their business, impact our society and in tu... | [
{
"code": null,
"e": 739,
"s": 171,
"text": "Greetings my fellow readers, it’s me again.That guy who writes about his life experiences and a little tad bit about data.Just a little bit.Article after article, I always start with how important is data in a strong organisation. How large companies are ... |
How to remove percentage sign at last position from every value in R data frame column? | To remove percentage sign at last position from every value in R data frame column, we can follow the below steps −
First of all, create a data frame with a column having percent sign at last position in every value.
First of all, create a data frame with a column having percent sign at last position in every value.
Th... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "To remove percentage sign at last position from every value in R data frame column, we can follow the below steps −"
},
{
"code": null,
"e": 1279,
"s": 1178,
"text": "First of all, create a data frame with a column having percent sig... |
How to insert/store JSON array into a database using JDBC? | A Json array is an ordered collection of values that are enclosed in square brackets i.e. it begins with ‘[’ and ends with ‘]’. The values in the arrays are separated by ‘,’ (comma).
{
"books": [ Java, JavaFX, Hbase, Cassandra, WebGL, JOGL]
}
The json-simple is a light weight library which is used to process JSON ob... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "A Json array is an ordered collection of values that are enclosed in square brackets i.e. it begins with ‘[’ and ends with ‘]’. The values in the arrays are separated by ‘,’ (comma)."
},
{
"code": null,
"e": 1308,
"s": 1245,
"text": ... |
Difference Between Syntax and Semantics - GeeksforGeeks | 29 Dec, 2021
Syntax:
It refers to the rules and regulations for writing any statement in a programming language like C/C++.
It does not have to do anything with the meaning of the statement.
A statement is syntactically valid if it follows all the rules.
It is related to the grammar and structure of the language.
Seman... | [
{
"code": null,
"e": 25453,
"s": 25425,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 25461,
"s": 25453,
"text": "Syntax:"
},
{
"code": null,
"e": 25564,
"s": 25461,
"text": "It refers to the rules and regulations for writing any statement in a programming ... |
Build an MSSQL Docker Container. Level up development with container... | by Richard Peterson | Towards Data Science | Level up development with container databases
You can stop waiting for your database admin to give you access to a dev server, or sifting through the endless documentation for setting up a MS SQL database on your computer’s locked-down work environment, and get to the bare bones of what you really NEED. A sql server th... | [
{
"code": null,
"e": 218,
"s": 172,
"text": "Level up development with container databases"
},
{
"code": null,
"e": 590,
"s": 218,
"text": "You can stop waiting for your database admin to give you access to a dev server, or sifting through the endless documentation for setting up... |
Prime Numbers - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 407,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
Linkedin Network Visualisation using Plotly | by Saiteja Kura | Towards Data Science | For many years Linkedin has been the go-to platform for building a network and premium job searching. People land in their dream jobs and internships by establishing connections on this platform. Most of us have many connections on Linkedin. Let us try and visualize these connections.
I also believe Linkedin connection... | [
{
"code": null,
"e": 458,
"s": 172,
"text": "For many years Linkedin has been the go-to platform for building a network and premium job searching. People land in their dream jobs and internships by establishing connections on this platform. Most of us have many connections on Linkedin. Let us try an... |
SQL Tryit Editor v1.6 | SELECT * FROM Products
WHERE Price NOT BETWEEN 10 AND 20;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-vers... | [
{
"code": null,
"e": 23,
"s": 0,
"text": "SELECT * FROM Products"
},
{
"code": null,
"e": 58,
"s": 23,
"text": "WHERE Price NOT BETWEEN 10 AND 20;"
},
{
"code": null,
"e": 60,
"s": 58,
"text": ""
},
{
"code": null,
"e": 123,
"s": 60,
"text... |
XAML - SearchBox | A SearchBox represents a control that can be used to enter search query text. WPF projects do not support SearchBox, so it will be implemented in Windows App. The hierarchical inheritance of SearchBox class is as follow −
PlaceholderText
Gets or sets the text that is displayed in the control until the value is changed ... | [
{
"code": null,
"e": 2279,
"s": 2057,
"text": "A SearchBox represents a control that can be used to enter search query text. WPF projects do not support SearchBox, so it will be implemented in Windows App. The hierarchical inheritance of SearchBox class is as follow −"
},
{
"code": null,
... |
Python | Maximum frequency character in String | 30 Jun, 2022
This article gives us the methods to find the frequency of maximum occurring character in a python string. This is quite important utility nowadays and knowledge of it is always useful. Let’s discuss certain ways in which this task can be performed.
Method 1 : Naive method + max()
In this method, we simp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 303,
"s": 52,
"text": "This article gives us the methods to find the frequency of maximum occurring character in a python string. This is quite important utility nowadays and knowledge of it is alw... |
SQL | Comments | 08 Nov, 2019
As is any programming languages comments matter a lot in SQL also. In this set we will learn about writing comments in any SQL snippet.
Comments can be written in the following three formats:
Single line comments.Multi line commentsIn line comments
Single line comments.
Multi line comments
In line comments... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Nov, 2019"
},
{
"code": null,
"e": 189,
"s": 53,
"text": "As is any programming languages comments matter a lot in SQL also. In this set we will learn about writing comments in any SQL snippet."
},
{
"code": null,
"e": 2... |
Style Binding in Angular 8 | 14 Sep, 2020
It is very easy to give the CSS styles to HTML elements using style binding in Angular 8. Style binding is used to set a style of a view element. We can set the inline styles of an HTML element using the style binding in angular. You can also add styles conditionally to an element, hence creating a dynamic... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 382,
"s": 54,
"text": "It is very easy to give the CSS styles to HTML elements using style binding in Angular 8. Style binding is used to set a style of a view element. We can set the inline styles... |
Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming) | 23 Jun, 2022
Travelling Salesman Problem (TSP):
Given a set of cities and the distance between every pair of cities, the problem is to find the shortest possible route that visits every city exactly once and returns to the starting point. Note the difference between Hamiltonian Cycle and TSP. The Hamiltonian cycle pro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 88,
"s": 52,
"text": "Travelling Salesman Problem (TSP): "
},
{
"code": null,
"e": 605,
"s": 88,
"text": "Given a set of cities and the distance between every pair of cities, th... |
Find maximum height pyramid from the given array of objects | 24 Nov, 2021
Given n objects, with each object has width wi. We need to arrange them in a pyramidal way such that :
Total width of ith is less than (i + 1)th.Total number of objects in the ith is less than (i + 1)th.
Total width of ith is less than (i + 1)th.
Total number of objects in the ith is less than (i + 1)th.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 157,
"s": 52,
"text": "Given n objects, with each object has width wi. We need to arrange them in a pyramidal way such that : "
},
{
"code": null,
"e": 258,
"s": 157,
"text": "... |
How to check form submission in PHP ? | 01 Aug, 2021
Given a form and the task is to check form submitted successfully or not. Use the PHP program for the backend to check form submission and HTML and CSS to create the form as frontend.
Syntax:
if (!empty($_POST))
if (isset($_POST['submit']))
Use these two statements to check whether the form submitted succe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 236,
"s": 52,
"text": "Given a form and the task is to check form submitted successfully or not. Use the PHP program for the backend to check form submission and HTML and CSS to create the form as ... |
Wildcard Pattern Matching | 19 Jun, 2022
Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text. The matching should cover the entire text (not partial text). The wildcard pattern can include the characters ‘?’ and ‘*’
‘?’ – matches any single character
‘*’ – Matche... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Jun, 2022"
},
{
"code": null,
"e": 311,
"s": 52,
"text": "Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text. The matching should cover the entire t... |
How to compare times in Golang? | 27 Jul, 2020
With the help of Before() and After() and Equal(), function we can compare the time as well as date but we are also going to use the time.Now() and time.Now().Add() function for comparison.
Functions Used: These functions compares the times as seconds.
Before(temp) – This function is used to check if the g... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jul, 2020"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "With the help of Before() and After() and Equal(), function we can compare the time as well as date but we are also going to use the time.Now() and time.Now().Add() function f... |
How to split a string with a string delimiter in C#? | Delimiters are the commas that you can see in the below string.
string str = "Welcome,to,New York";
Now set the delimiter separately.
char[] newDelimiter = new char[] { ',' };
Use theSplit() method to split the string considering the delimiter as the parameter.
str.Split(newDelimiter, StringSplitOptions.None);
To split... | [
{
"code": null,
"e": 1251,
"s": 1187,
"text": "Delimiters are the commas that you can see in the below string."
},
{
"code": null,
"e": 1287,
"s": 1251,
"text": "string str = \"Welcome,to,New York\";"
},
{
"code": null,
"e": 1321,
"s": 1287,
"text": "Now set t... |
Python | Pandas Series.str.contains() | 22 Oct, 2021
Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.contains() function is used to test if pattern or regex is contained within a string of a Series or Index. The function returns boolean Series or Index based on whether a given pattern or... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 394,
"s": 28,
"text": "Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.contains() function is used to test if pattern or regex... |
std::max in C++ | 11 Jun, 2022
std::max is defined in the header file <algorithm> and is used to find out the largest of the number passed to it. It returns the first of them, if there are more than one.
>
It can be used in following manners:
It compares the two numbers passed in its arguments and returns the larger of the two, and if ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jun, 2022"
},
{
"code": null,
"e": 225,
"s": 52,
"text": "std::max is defined in the header file <algorithm> and is used to find out the largest of the number passed to it. It returns the first of them, if there are more than one."
... |
fmt.Errorf() Function in Golang With Examples | 05 May, 2020
In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Errorf() function in Go language allow us use formatting features to create descriptive error messages. Moreover, this function is defined under the fmt package. Here, you need to imp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 May, 2020"
},
{
"code": null,
"e": 390,
"s": 28,
"text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Errorf() function in Go language allow us use forma... |
How to Convert HashMap to ArrayList in Java? | 22 Aug, 2021
HashMap is a part of Java’s collection since Java 1.2. It provides the basic implementation of the Map interface of Java. It stores the data in (Key, Value) pairs. Unlike Hashmap, an ArrayList is used to provides us with dynamic arrays in Java. It is an alternative to an array that provides a lot more flex... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Aug, 2021"
},
{
"code": null,
"e": 890,
"s": 52,
"text": "HashMap is a part of Java’s collection since Java 1.2. It provides the basic implementation of the Map interface of Java. It stores the data in (Key, Value) pairs. Unlike Has... |
Raising Exceptions in Ruby | 27 Dec, 2021
An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at runtime, that disrupts the normal flow of the program’s instructions. As we know, the code enclosed between begin and end block is totally secured for handling Exceptions and the rescue block tells the ru... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 867,
"s": 28,
"text": "An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at runtime, that disrupts the normal flow of the program’s instructions. As... |
string find in C++ | 07 Feb, 2019
String find is used to find the first occurrence of sub-string in the specified string being called upon. It returns the index of the first occurrence of the substring in the string from given starting position. The default value of starting position is 0.
Function Template:
size_t find (const string& str,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Feb, 2019"
},
{
"code": null,
"e": 309,
"s": 52,
"text": "String find is used to find the first occurrence of sub-string in the specified string being called upon. It returns the index of the first occurrence of the substring in the... |
time.NewTicker() Function in Golang With Examples | 21 Apr, 2020
In Go language, time packages supplies functionality for determining as well as viewing time. The NewTicker() function in Go language is used to output a new Ticker that contains a channel in order to transmit the time with a period as stated by the duration parameter. It is helpful in setting the interval... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 738,
"s": 28,
"text": "In Go language, time packages supplies functionality for determining as well as viewing time. The NewTicker() function in Go language is used to output a new Ticker that conta... |
Java.lang.String.lastIndexOf() Method | 30 Sep, 2019
There are four variants of lastIndexOf() method.This article depicts about all of them, as follows:1. lastIndexOf() : This method returns the index of the last occurrence of the character in the character sequence .
Syntax:
int lastIndexOf(int ch)
Parameters:
ch : a character.
Return Value:
This method ret... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 269,
"s": 53,
"text": "There are four variants of lastIndexOf() method.This article depicts about all of them, as follows:1. lastIndexOf() : This method returns the index of the last occurrence of ... |
Simple Task Manager CLI using Node.js | 19 Jan, 2021
Before creating a simple Task Manager CLI using NodeJS, let’s run our first basic Node.js application with the following simple steps:
Note: You can download and install the Node.js application from href=”https://nodejs.org/en/”Step 1: Create a Directory for our Task Manager CLI named TODO-CLI, you can giv... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Jan, 2021"
},
{
"code": null,
"e": 187,
"s": 52,
"text": "Before creating a simple Task Manager CLI using NodeJS, let’s run our first basic Node.js application with the following simple steps:"
},
{
"code": null,
"e": 38... |
Reverse actual bits of the given number | 03 Jun, 2022
Given a non-negative integer n. The problem is to reverse the bits of n and print the number obtained after reversing the bits. Note that the actual binary representation of the number is being considered for reversing the bits, no leading 0’s are being considered.Examples :
Input : 11
Output : 13
(11)10... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 332,
"s": 54,
"text": "Given a non-negative integer n. The problem is to reverse the bits of n and print the number obtained after reversing the bits. Note that the actual binary representation of ... |
How to Install Scala Kernal in Jupyter? | 09 Nov, 2021
Jupyter notebook is widely used by almost everyone in the data science community. While it’s a tool with extensive support for python-based development of machine learning projects, one can also use it for Scala development as well, using the spylon-kernel. In this article, we will see how to install spylo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 403,
"s": 28,
"text": "Jupyter notebook is widely used by almost everyone in the data science community. While it’s a tool with extensive support for python-based development of machine learning pro... |
Flip minimum signs of array elements to get minimum sum of positive elements possible | 20 May, 2021
Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements of array should be minimum non-negative (as close to zero as possible). Return the minimum no. of elements whose sign needs to be flipped such that the resultant sum is minimum... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 449,
"s": 52,
"text": "Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements of array should be minimum non-negative (as... |
JavaScript Date toTimeString() Method | 21 Oct, 2021
Below is the example of Date toTimeString() method.
Example:<script> // Here a date has been assigned // while creating Date object var dateobj = new Date('October 15, 1996 05:35:32'); // Contents of above date object // of time portion is returned // using toTimeString() function. var B... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 80,
"s": 28,
"text": "Below is the example of Date toTimeString() method."
},
{
"code": null,
"e": 438,
"s": 80,
"text": "Example:<script> // Here a date has been assigned //... |
Conditional Access System and its Functionalities | 08 Nov, 2021
A Conditional Access System or a CA system uses the scrambling and encryption techniques to prevent the reception that is not authorized. Scrambling is a process of making the data, photos as well as music incomprehensible. Encryption on the other hand is a process of protecting the data that is sent over ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 617,
"s": 28,
"text": "A Conditional Access System or a CA system uses the scrambling and encryption techniques to prevent the reception that is not authorized. Scrambling is a process of making the... |
JavaFX | BorderPane Class | 01 Sep, 2021
BorderPane class is a part of JavaFX. BorderPane class lays its children in top, bottom, center, left and, right positions. BorderPane lays out each child set in the five positions regardless of the child’s visible property value unmanaged children are ignored. BorderPane class inherits Pane class. Constru... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 355,
"s": 28,
"text": "BorderPane class is a part of JavaFX. BorderPane class lays its children in top, bottom, center, left and, right positions. BorderPane lays out each child set in the five posi... |
Stream takeWhile() method in Java with examples | 25 Apr, 2019
The takeWhile(java.util.function.Predicate) method returns a stream of the remaining elements of this stream after taken the longest prefix of elements that match the given predicate if the stream is ordered else a stream of a subset of elements taken from this stream that match the given predicate.In the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Apr, 2019"
},
{
"code": null,
"e": 1174,
"s": 28,
"text": "The takeWhile(java.util.function.Predicate) method returns a stream of the remaining elements of this stream after taken the longest prefix of elements that match the given p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.