title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Calculate Standard Error in R | 07 Sep, 2021
In this article, we are going to see how to calculate standard error in R Programming Language.
Mathematically we can calculate standard error by using the formula:
standard deviation/squareroot(n)
Using sd() function with length function
By using the standard error formula.
Using plotrix package.
Here we... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "In this article, we are going to see how to calculate standard error in R Programming Language. "
},
{
"code": null,
"e": 194,
"s": 125,
"text": "Mathemati... |
Program to Print Matrix in Z form | 28 Jun, 2022
Given a square matrix of order n*n, we need to print elements of the matrix in Z form
Input: [[4, 5, 6, 8],
[1, 2, 3, 1],
[7, 8, 9, 4],
[1, 8, 7, 5]]
Output: 4 5 6 8
3
8
1 8 7 5
Input: [[4, 5, 6, 8, ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 140,
"s": 53,
"text": "Given a square matrix of order n*n, we need to print elements of the matrix in Z form "
},
{
"code": null,
"e": 629,
"s": 140,
"text": " Input: [[4, 5,... |
Find the maximum node at a given level in a binary tree | 31 Mar, 2022
Given a Binary Tree and a Level. The task is to find the node with the maximum value at that given level.
The idea is to traverse the tree along depth recursively and return the nodes once the required level is reached and then return the maximum of left and right subtrees for each subsequent call. So that... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 159,
"s": 53,
"text": "Given a Binary Tree and a Level. The task is to find the node with the maximum value at that given level."
},
{
"code": null,
"e": 488,
"s": 159,
"text": ... |
How to iterate over a 2D list (list of lists) in Java | 17 Mar, 2020
Given a 2D list, the task is to iterate this 2D list in Java.
2D list (list of lists)The 2D list refers to a list of lists, i.e. each row of the list is another list.
[
[5, 10],
[1],
[20, 30, 40]
]
Iterate a 2D list: There are two ways of iterating over a list of list in Java.
Iterating over the l... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Mar, 2020"
},
{
"code": null,
"e": 90,
"s": 28,
"text": "Given a 2D list, the task is to iterate this 2D list in Java."
},
{
"code": null,
"e": 195,
"s": 90,
"text": "2D list (list of lists)The 2D list refers to a... |
Perfect Sum Problem | Practice | GeeksforGeeks | Given an array arr[] of non-negative integers and an integer sum, the task is to count all subsets of the given array with a sum equal to a given sum.
Note: Answer can be very large, so, output answer modulo 109+7
Example 1:
Input: N = 6, arr[] = {2, 3, 5, 6, 8, 10}
sum = 10
Output: 3
Explanation: {2, 3, 5}, {2,... | [
{
"code": null,
"e": 389,
"s": 238,
"text": "Given an array arr[] of non-negative integers and an integer sum, the task is to count all subsets of the given array with a sum equal to a given sum."
},
{
"code": null,
"e": 452,
"s": 389,
"text": "Note: Answer can be very large, so,... |
JavaScript Array findIndex() Method | 10 Jun, 2022
This article will help us to understand all the facts as well as required information in detail along with the implementation of the Array.findIndex() Method.
Let us start with an example of the method Array findIndex() which is used to find the first index of positive number from an array.
Example:
JavaS... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "This article will help us to understand all the facts as well as required information in detail along with the implementation of the Array.findIndex() Method."
},
{
"c... |
Apply Operations To Groups In Pandas | 09 Mar, 2022
Prerequisites: Pandas
Pandas is a Python library for data analysis and data manipulation. Often data analysis requires data to be broken into groups to perform various operations on these groups. The GroupBy function in Pandas employs the split-apply-combine strategy meaning it performs a combination of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 52,
"s": 28,
"text": "Prerequisites: Pandas "
},
{
"code": null,
"e": 518,
"s": 52,
"text": "Pandas is a Python library for data analysis and data manipulation. Often data analy... |
Java Program to Make a Rollback | 08 Jun, 2022
Calling a rollback operation undoes all the effects or modifications that have been done by a Transaction(Ti) and terminate the Ti and all the variables get their previous values stored. Rollback is mainly called when you get one or more than one SQL exception in the statements of Transaction(Ti), then the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 685,
"s": 28,
"text": "Calling a rollback operation undoes all the effects or modifications that have been done by a Transaction(Ti) and terminate the Ti and all the variables get their previous val... |
Soroco India Interview Experience | 04 Oct, 2021
Round 1: Coding Assessment
Maximum subarray sum
Sliding window maximum
Round 2: Video Call Interview
Coding round :
Find the kth largest element in a given array (using heaps)
List out the unique elements present in a string (use sets)
Round 3: video call interview
System Design Round + coding
Maximum suba... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 80,
"s": 53,
"text": "Round 1: Coding Assessment"
},
{
"code": null,
"e": 101,
"s": 80,
"text": "Maximum subarray sum"
},
{
"code": null,
"e": 124,
"s": 101,
... |
Comparator function of qsort() in C | 02 Jun, 2017
Standard C library provides qsort() that can be used for sorting an array. As the name suggests, the function uses QuickSort algorithm to sort the given array. Following is prototype of qsort()
void qsort (void* base, size_t num, size_t size, int (*comparator)(const void*,const void*));
The key... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Jun, 2017"
},
{
"code": null,
"e": 248,
"s": 54,
"text": "Standard C library provides qsort() that can be used for sorting an array. As the name suggests, the function uses QuickSort algorithm to sort the given array. Following is p... |
C program to sort an array in an ascending order | Sort the given array in descending or ascending order based on the code that has been written.
An array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number".
The syntax for declaring an array is as follows −
datatype array_name [s... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "Sort the given array in descending or ascending order based on the code that has been written."
},
{
"code": null,
"e": 1310,
"s": 1157,
"text": "An array is a group of related data items which share’s a common name. A particular val... |
Geopandas Hands-on: Introduction to Geospatial Machine Learning | by Juan Nathaniel | Towards Data Science | Part 1: Introduction to geospatial concepts (this post)Part 2: Geospatial visualization and geometry creation (follow here)Part 3: Geospatial operations (follow here)Part 4: Building geospatial machine learning pipeline (follow here)
In this post we are going to cover the preliminary ground of basic geospatial datatype... | [
{
"code": null,
"e": 406,
"s": 172,
"text": "Part 1: Introduction to geospatial concepts (this post)Part 2: Geospatial visualization and geometry creation (follow here)Part 3: Geospatial operations (follow here)Part 4: Building geospatial machine learning pipeline (follow here)"
},
{
"code":... |
10x Faster Parallel Python Without Python Multiprocessing | by Robert Nishihara | Towards Data Science | While Python’s multiprocessing library has been used successfully for a wide range of applications, in this blog post, we show that it falls short for several important classes of applications including numerical data processing, stateful computation, and computation with expensive initialization. There are two main re... | [
{
"code": null,
"e": 499,
"s": 172,
"text": "While Python’s multiprocessing library has been used successfully for a wide range of applications, in this blog post, we show that it falls short for several important classes of applications including numerical data processing, stateful computation, and... |
Count and display vowels in a string in Python | Given a string of characters let's analyse how many of the characters are vowels.
We first find out all the individual and unique characters and then test if they are present in the string representing the vowels.
Live Demo
stringA = "Tutorialspoint is best"
print("Given String: \n",stringA)
vowels = "AaEeIiOoUu"
# Ge... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Given a string of characters let's analyse how many of the characters are vowels."
},
{
"code": null,
"e": 1276,
"s": 1144,
"text": "We first find out all the individual and unique characters and then test if they are present in the ... |
How to update Python on Windows? - GeeksforGeeks | 31 Aug, 2021
In this article, we are going to see how to update Python in the Windows system. For the sake of example, we will be upgrading from Python 3.6.8 to Python 3.9.6.
To check the current version of python on your system, use the following command in the command prompt:
python -V
This will show you your current... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 24374,
"s": 24212,
"text": "In this article, we are going to see how to update Python in the Windows system. For the sake of example, we will be upgrading from Python 3.6.8 to Python 3.9.6."
... |
Predictive Modeling: Picking the Best Model | by Kailey Smith | Towards Data Science | Whether you are working on predicting data in an office setting or just competing in a Kaggle competition, it’s important to test out different models to find the best fit for the data you are working with.
I recently had the opportunity to compete with some very smart colleagues in a private Kaggle competition predict... | [
{
"code": null,
"e": 378,
"s": 171,
"text": "Whether you are working on predicting data in an office setting or just competing in a Kaggle competition, it’s important to test out different models to find the best fit for the data you are working with."
},
{
"code": null,
"e": 616,
"s... |
C++ Set Library - set() Function | The C++ constructor std::set::set() (Initializer-List Constructor) constructs a set container with the contents of the initializer list init
Following is the declaration for std::set::set() Initializer-list constructor from std::set header.
set (initializer_list<value_type> init,
const key_compare& comp = key_comp... | [
{
"code": null,
"e": 2744,
"s": 2603,
"text": "The C++ constructor std::set::set() (Initializer-List Constructor) constructs a set container with the contents of the initializer list init"
},
{
"code": null,
"e": 2844,
"s": 2744,
"text": "Following is the declaration for std::set... |
Concatenate null to a string in Java | To concatenate null to a string, use the + operator.
Let’s say the following is our string.
String str = "Demo Text";
We will now see how to effortlessly concatenate null to string.
String strNULL = str + "null";
The following is the final example.
Live Demo
public class Demo {
public static void main(String[] arg... | [
{
"code": null,
"e": 1115,
"s": 1062,
"text": "To concatenate null to a string, use the + operator."
},
{
"code": null,
"e": 1154,
"s": 1115,
"text": "Let’s say the following is our string."
},
{
"code": null,
"e": 1180,
"s": 1154,
"text": "String str = \"Demo... |
Express.js res.headersSent Property - GeeksforGeeks | 08 Jul, 2020
The res.headersSent property is a boolean property that indicates if the app sent HTTP headers for the response.
Syntax:
res.headersSent
Parameter: No parameters.
Return Value: This property returns a Boolean value either True or False.
Installation of express module:
You can visit the link to Install expr... | [
{
"code": null,
"e": 29590,
"s": 29562,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 29703,
"s": 29590,
"text": "The res.headersSent property is a boolean property that indicates if the app sent HTTP headers for the response."
},
{
"code": null,
"e": 29711,
"s... |
Reader close() method in Java with Examples - GeeksforGeeks | 13 Feb, 2019
The close() method of Reader Class in Java is used to close the stream and release the resources that were busy in the stream, if any. This method has following results:
If the stream is open, it closes the stream releasing the resources
If the stream is already closed, it will have no effect.
If any read ... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 24118,
"s": 23948,
"text": "The close() method of Reader Class in Java is used to close the stream and release the resources that were busy in the stream, if any. This method has following re... |
Custom neural networks in Keras: a street fighter’s guide to build a graphCNN | by Shuyi Yang | Towards Data Science | At a certain point in our lives, predefined layers in Tensorflow Keras are not enough anymore! We want more! We want to build custom neural networks with creative structures and bizarre layers! Luckily for us, we can easily perform this task within Keras by defining our custom layers and models. In this step-by-step tu... | [
{
"code": null,
"e": 645,
"s": 172,
"text": "At a certain point in our lives, predefined layers in Tensorflow Keras are not enough anymore! We want more! We want to build custom neural networks with creative structures and bizarre layers! Luckily for us, we can easily perform this task within Keras ... |
Finding count of special characters in a string in JavaScript | Let’s say that we have a string that may contain any of the following characters.
'!', "," ,"\'" ,";" ,"\"", ".", "-" ,"?"
We are required to write a JavaScript function that takes in a string and count the number of
appearances of these characters in the string and return that count.
The code for this will be −
const ... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Let’s say that we have a string that may contain any of the following characters."
},
{
"code": null,
"e": 1185,
"s": 1144,
"text": "'!', \",\" ,\"\\'\" ,\";\" ,\"\\\"\", \".\", \"-\" ,\"?\""
},
{
"code": null,
"e": 1348,... |
jsoup - Set Attributes | Following example will showcase use of method to set attributes of a dom element, bulk updates and add/remove class methods after parsing an HTML String into a Document object.
Document document = Jsoup.parse(html);
Element link = document.select("a").first();
link.attr("href","www.yahoo.com");
link.addCl... | [
{
"code": null,
"e": 2207,
"s": 2030,
"text": "Following example will showcase use of method to set attributes of a dom element, bulk updates and add/remove class methods after parsing an HTML String into a Document object."
},
{
"code": null,
"e": 2399,
"s": 2207,
"text": "Docum... |
How to filter non-null value in Java? | Let’s say the following is our List with string elements:
List<String> leagues = Arrays.asList("BBL", "IPL", "MLB", "FPL","NBA", "NFL");
Now, create a stream and filter elements that end with a specific letter:
Stream<String> stream = leagues.stream().filter(leagueName -> leagueName.endsWith("L"));
Now, use Objects::no... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "Let’s say the following is our List with string elements:"
},
{
"code": null,
"e": 1199,
"s": 1120,
"text": "List<String> leagues = Arrays.asList(\"BBL\", \"IPL\", \"MLB\", \"FPL\",\"NBA\", \"NFL\");"
},
{
"code": null,
"... |
Python - Uppercase Selective Substrings in String - GeeksforGeeks | 30 Aug, 2020
Given a String, perform uppercase of particular Substrings from List.
Input : test_str = ‘geeksforgeeks is best for cs’, sub_list = [“best”, “geeksforgeeks”]Output : GEEKSFORGEEKS is BEST for csExplanation : geeksforgeeks and best uppercased.
Input : test_str = ‘geeksforgeeks is best for best’, sub_list = ... | [
{
"code": null,
"e": 25449,
"s": 25421,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 25519,
"s": 25449,
"text": "Given a String, perform uppercase of particular Substrings from List."
},
{
"code": null,
"e": 25692,
"s": 25519,
"text": "Input : test_str = ‘... |
Top 25 Interview Questions - GeeksforGeeks | 07 Oct, 2021
Here is the collection of TOP 25 frequently asked questions based on experience (mine and friends) of interviews in multiple companies.
1) Lowest common Ancestor (https://www.geeksforgeeks.org/lowest-common-ancestor-binary-tree-set-1/)
2) A unsorted array of integers is given; you need to find the max pr... | [
{
"code": null,
"e": 26317,
"s": 26289,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 26454,
"s": 26317,
"text": "Here is the collection of TOP 25 frequently asked questions based on experience (mine and friends) of interviews in multiple companies. "
},
{
"code": null... |
MATLAB | Complement colors in a Grayscale Image - GeeksforGeeks | 22 Oct, 2018
In MATLAB, a Grayscale image is a 2-D Image array ( M*N ) of color pixel. When we complement colors in a Grayscale image, Each color pixel in grayscale image is replaced with their complementary color pixel.
Dark areas become lighter and light areas become darker in the grayscale image as result of complem... | [
{
"code": null,
"e": 25895,
"s": 25867,
"text": "\n22 Oct, 2018"
},
{
"code": null,
"e": 26103,
"s": 25895,
"text": "In MATLAB, a Grayscale image is a 2-D Image array ( M*N ) of color pixel. When we complement colors in a Grayscale image, Each color pixel in grayscale image is re... |
p5.js Geometry() Method - GeeksforGeeks | 21 May, 2021
p5.Geometry() method is used to represent 3d objects. It is returned by the loadModel() function and also used internally by the 3d primitive drawing functions.
This function requires p5.dom library. So add the following line in the head section of the index.html file.
Javascript
<script language="javascr... | [
{
"code": null,
"e": 26627,
"s": 26599,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 26789,
"s": 26627,
"text": "p5.Geometry() method is used to represent 3d objects. It is returned by the loadModel() function and also used internally by the 3d primitive drawing functions. "
... |
Role of KL-divergence in Variational Autoencoders - GeeksforGeeks | 27 Jan, 2022
Variational autoencoder was proposed in 2013 by Knigma and Welling at Google and Qualcomm. A variational autoencoder (VAE) provides a probabilistic manner for describing an observation in latent space. Thus, rather than building an encoder that outputs a single value to describe each latent state attribute... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 25992,
"s": 25589,
"text": "Variational autoencoder was proposed in 2013 by Knigma and Welling at Google and Qualcomm. A variational autoencoder (VAE) provides a probabilistic manner for desc... |
Find smallest possible Number from a given large Number with same count of digits - GeeksforGeeks | 20 Jan, 2022
Given a number K of length N, the task is to find the smallest possible number that can be formed from K of N digits by swapping the digits any number of times.
Examples:
Input: N = 15, K = 325343273113434 Output: 112233333344457 Explanation: The smallest number possible after swapping the digits of the ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 26203,
"s": 26041,
"text": "Given a number K of length N, the task is to find the smallest possible number that can be formed from K of N digits by swapping the digits any number of times. "
... |
C# | Remove a range of elements from the ArrayList - GeeksforGeeks | 01 Feb, 2019
ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory allocation, adding, searching and sorting items in the list. ArrayList.RemoveRange(Int32, Int32) method is used to remove a range of elements f... | [
{
"code": null,
"e": 26193,
"s": 26165,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 26519,
"s": 26193,
"text": "ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory... |
How to draw a pie chart using react bootstrap ? - GeeksforGeeks | 02 Jul, 2021
A Pie Chart is a circular statistical plot that can display only one series of data. The area of the chart is the total percentage of the given data. The area of slices of the pie represents the percentage of the parts of the data.
Creating React Application And Installing Module:
Step 1: Create a React a... | [
{
"code": null,
"e": 25585,
"s": 25557,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 25818,
"s": 25585,
"text": "A Pie Chart is a circular statistical plot that can display only one series of data. The area of the chart is the total percentage of the given data. The area of s... |
tmpnam() function in C - GeeksforGeeks | 06 Sep, 2017
The tmpnam() function is a special function which is declared inside “stdio.h” header file. It generates a different temporary file name each time it is called up to at least TMP_MAX names. Here TMP_MAX represents maximum number of different file names that can be produce by tmpnam() function. If it is cal... | [
{
"code": null,
"e": 25549,
"s": 25521,
"text": "\n06 Sep, 2017"
},
{
"code": null,
"e": 26015,
"s": 25549,
"text": "The tmpnam() function is a special function which is declared inside “stdio.h” header file. It generates a different temporary file name each time it is called up ... |
Count digits present in each element of a given Matrix - GeeksforGeeks | 07 Mar, 2022
Given a matrix arr[][] of dimensions M * N, the task is to count the number of digits of every element present in the given matrix.
Examples:
Input: arr[][] = { { 27, 173, 5 }, { 21, 6, 624 }, { 5, 321, 49 } }Output: 2 3 12 1 31 3 2
Input: arr[][] = { {11, 12, 33 }, { 64, 57, 61 }, { 74, 88, 39 } }Output: ... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 26069,
"s": 25937,
"text": "Given a matrix arr[][] of dimensions M * N, the task is to count the number of digits of every element present in the given matrix."
},
{
"code": null,
... |
Lodash _.mean() Method - GeeksforGeeks | 09 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.mean() method is used to find the mean of the values in the array.
Syntax:
_.mean( array )
Parameters: This method accepts a single parameter as mentioned above ... | [
{
"code": null,
"e": 38681,
"s": 38653,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 38821,
"s": 38681,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": n... |
JavaScript | Encode/Decode a string to Base64. - GeeksforGeeks | 29 Apr, 2019
In order to encode/decode a string in JavaScript, We are using built-in functions provided by JavaScript.
btoa():This method encodes a string in base-64 and uses the “A-Z”, “a-z”, “0-9”, “+”, “/” and “=” characters to encode the provided string.
Syntax:window.btoa(String)
window.btoa(String)
Parameter:St... | [
{
"code": null,
"e": 25527,
"s": 25499,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 25633,
"s": 25527,
"text": "In order to encode/decode a string in JavaScript, We are using built-in functions provided by JavaScript."
},
{
"code": null,
"e": 25773,
"s": 2563... |
Datasets in Keras - GeeksforGeeks | 17 Jul, 2020
Keras is a python library which is widely used for training deep learning models. One of the common problems in deep learning is finding the proper dataset for developing models. In this article, we will see the list of popular datasets which are already incorporated in the keras.datasets module.
MNIST (Cl... | [
{
"code": null,
"e": 26269,
"s": 26241,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 26567,
"s": 26269,
"text": "Keras is a python library which is widely used for training deep learning models. One of the common problems in deep learning is finding the proper dataset for dev... |
JavaFX | Popup Class - GeeksforGeeks | 30 Aug, 2018
Popup class is a part of JavaFX. Popup class creates a popup with no content, a null fill and is transparent. Popup class is used to display a notification, buttons, or a drop-down menu and so forth. The popup has no decorations. It essentially acts as a specialized scene/window which has no decorations.
C... | [
{
"code": null,
"e": 25335,
"s": 25307,
"text": "\n30 Aug, 2018"
},
{
"code": null,
"e": 25641,
"s": 25335,
"text": "Popup class is a part of JavaFX. Popup class creates a popup with no content, a null fill and is transparent. Popup class is used to display a notification, button... |
GATE | GATE-CS-2004 | Question 32 - GeeksforGeeks | 28 Jun, 2021
Consider the following program fragment for reversing the digits in a given integer to obtain a new integer. Let n = D1D2...Dm
int n, rev;rev = 0;while (n > 0){ rev = rev*10 + n%10; n = n/10;}
The loop invariant condition at the end of the ith iteration is:(A) n = D1D2....Dm-i and rev = DmDm-1...Dm-i+1... | [
{
"code": null,
"e": 25721,
"s": 25693,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25848,
"s": 25721,
"text": "Consider the following program fragment for reversing the digits in a given integer to obtain a new integer. Let n = D1D2...Dm"
},
{
"code": "int n, rev;re... |
Java | Packages | Question 1 - GeeksforGeeks | 28 Jun, 2021
Which of the following is/are true about packages in Java?
1) Every class is part of some package.
2) All classes in a file are part of the same package.
3) If no package is specified, the classes in the file
go into a special unnamed package
4) If no package is specified, a new package is created w... | [
{
"code": null,
"e": 25431,
"s": 25403,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25490,
"s": 25431,
"text": "Which of the following is/are true about packages in Java?"
},
{
"code": null,
"e": 25806,
"s": 25490,
"text": "1) Every class is part of some ... |
Kubernetes - Images | Kubernetes (Docker) images are the key building blocks of Containerized Infrastructure. As of now, we are only supporting Kubernetes to support Docker images. Each container in a pod has its Docker image running inside it.
When we are configuring a pod, the image property in the configuration file has the same syntax a... | [
{
"code": null,
"e": 2418,
"s": 2195,
"text": "Kubernetes (Docker) images are the key building blocks of Containerized Infrastructure. As of now, we are only supporting Kubernetes to support Docker images. Each container in a pod has its Docker image running inside it."
},
{
"code": null,
... |
AWT Color Class | The Color class states colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Following is the declaration for java.awt.Color class:
public class Color
extends Object
implements Paint, Serializable
Following are the fields for java.awt.geom.Arc2D class:
static Co... | [
{
"code": null,
"e": 1873,
"s": 1747,
"text": "The Color class states colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace."
},
{
"code": null,
"e": 1928,
"s": 1873,
"text": "Following is the declaration for java.awt.Color class:"
... |
LCM and HCF of fractions - GeeksforGeeks | 07 Apr, 2021
Given n fractions as two arrays Num and Den. The task is to find out the L.C.M of the fractions.
Examples:
Input: num[] = {1, 7, 4}, den[] = {2, 3, 6} Output: LCM is = 28/1 The given fractions are 1/2, 7/3 and 4/6. The LCM is 28/1
Input: num[] = {24, 48, 72, 96}, den[] = {2, 6, 8, 3} Output: LCM is = 288/... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24813,
"s": 24716,
"text": "Given n fractions as two arrays Num and Den. The task is to find out the L.C.M of the fractions."
},
{
"code": null,
"e": 24824,
"s": 24813,
"t... |
How to use Meta Tag to redirect an HTML page? | Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.
To use a META Tag to redirect your site is quite easy. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribut... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection."
},
{
"code": null,
"e": 1385,
"s": 1224,
"text": "To use a META Tag to... |
Using Python to insert data into SAP with PyRFC | by Rafael Cordeiro | Towards Data Science | Today we are seeing the daily increase of Machine Learning (ML) development and the largest development tool is Python and each day more and more people are trying to return the results of the ML models into their Enterprise Resource Planning systems (ERPs).
SAP is one of the most used ERPs systems and to insert the re... | [
{
"code": null,
"e": 306,
"s": 47,
"text": "Today we are seeing the daily increase of Machine Learning (ML) development and the largest development tool is Python and each day more and more people are trying to return the results of the ML models into their Enterprise Resource Planning systems (ERPs... |
Time Series - Variations of ARIMA | In the previous chapter, we have now seen how ARIMA model works, and its limitations that it cannot handle seasonal data or multivariate time series and hence, new models were introduced to include these features.
A glimpse of these new models is given here −
It is a generalized version of auto regression model for mul... | [
{
"code": null,
"e": 2355,
"s": 2141,
"text": "In the previous chapter, we have now seen how ARIMA model works, and its limitations that it cannot handle seasonal data or multivariate time series and hence, new models were introduced to include these features."
},
{
"code": null,
"e": 24... |
8085 program to multiply two 16-bit numbers - GeeksforGeeks | 19 Feb, 2021
Problem – Write an assembly language program in 8085 microprocessor to multiply two 16 bit numbers.
Assumption –
Starting address of program: 2000
Input memory location: 2050, 2051, 2052, 2053
Output memory location: 2054, 2055, 2056, 2057
Example –
INPUT:
(2050H) = 04H
(2051H) = 0... | [
{
"code": null,
"e": 24806,
"s": 24778,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 24907,
"s": 24806,
"text": "Problem – Write an assembly language program in 8085 microprocessor to multiply two 16 bit numbers. "
},
{
"code": null,
"e": 24922,
"s": 24907,
... |
In-Depth Pandas Tutorial. The Ultimate Python library for working... | by Mandy Gu | Towards Data Science | Earlier this month, Edward Qian and I started working on a set of comprehensive lessons for aspiring Data Scientists, which can be found on our website www.dscrashcourse.com
I will be cross-posting slightly modified lessons to Medium to make them available to a broader audience. If you find these articles helpful, chec... | [
{
"code": null,
"e": 345,
"s": 171,
"text": "Earlier this month, Edward Qian and I started working on a set of comprehensive lessons for aspiring Data Scientists, which can be found on our website www.dscrashcourse.com"
},
{
"code": null,
"e": 546,
"s": 345,
"text": "I will be cr... |
Difference between TimeSpan Seconds() and TotalSeconds() | TimeSpan Seconds() is part of time, whereas TimeSpan TotalSeconds() converts entire time to seconds.
Let us first see the TimeSpan Seconds() method.
Live Demo
using System;
using System.Linq;
public class Demo {
public static void Main() {
TimeSpan ts = new TimeSpan(0, 100, 0, 20, 0);
// seconds
C... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "TimeSpan Seconds() is part of time, whereas TimeSpan TotalSeconds() converts entire time to seconds."
},
{
"code": null,
"e": 1211,
"s": 1163,
"text": "Let us first see the TimeSpan Seconds() method."
},
{
"code": null,
"... |
[TUTORIAL]: Deploy ML model as REST API on Azure and protect it with SSL | by Ivan Zidov | Towards Data Science | Data Scientists often forget that their new awesome models aren’t so useful if they can't be used in production. In this tutorial, I will show you how you can deploy Tensorflow model to Azure Container Instances and protect it with SSL.
There will be 3 types of deployment:
Deployment #1: Local deployment:Model will be ... | [
{
"code": null,
"e": 409,
"s": 172,
"text": "Data Scientists often forget that their new awesome models aren’t so useful if they can't be used in production. In this tutorial, I will show you how you can deploy Tensorflow model to Azure Container Instances and protect it with SSL."
},
{
"cod... |
MFC - Internet Programming | Microsoft provides many APIs for programming both client and server applications. Many new applications are being written for the Internet, and as technologies, browser capabilities, and security options change, new types of applications will be written. Your custom application can retrieve information and provide data... | [
{
"code": null,
"e": 2405,
"s": 2067,
"text": "Microsoft provides many APIs for programming both client and server applications. Many new applications are being written for the Internet, and as technologies, browser capabilities, and security options change, new types of applications will be written... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider the relation X(P, Q, R, S, T, U) with the following set of functional dependencies
F = {
{P, R} → {S,T},
{P, S, U} → {Q, R}
}
Which of the following is the trivial functional dependency in F+ is closure of F?
(A) {P,R}→{S,T}(B) {P,R}→{R,T}(C) {P,S}→{S}(D) {P,S,U}→{Q}Answer: (C)... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24510,
"s": 24418,
"text": "Consider the relation X(P, Q, R, S, T, U) with the following set of functional dependencies"
},
{
"code": null,
"e": 24573,
"s": 24510,
"text":... |
What is stored procedure and how can we create MySQL stored procedures? | Stored procedure, in the context of regular computing language, may be defined as a subroutine like a subprogram that is stored in a database. In the context of MySQL, it is a segment of declarative SQL statements stored inside the database catalog. Before writing stored procedures in MySQL, we must have to check the v... | [
{
"code": null,
"e": 1492,
"s": 1062,
"text": "Stored procedure, in the context of regular computing language, may be defined as a subroutine like a subprogram that is stored in a database. In the context of MySQL, it is a segment of declarative SQL statements stored inside the database catalog. Bef... |
How to Install xlrd in Python in Windows? - GeeksforGeeks | 26 Sep, 2021
The xlrd module in python is used to retrieve information from a spreadsheet. In this article, we will look into the process of installing the xldr module in a Windows machine.
The only thing that you need for installing the xlrd module on Windows are:
Python
PIP or Conda (depending upon user preference)
I... | [
{
"code": null,
"e": 24611,
"s": 24583,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 24788,
"s": 24611,
"text": "The xlrd module in python is used to retrieve information from a spreadsheet. In this article, we will look into the process of installing the xldr module in a Win... |
Number of 1 Bits | Practice | GeeksforGeeks | Given a positive integer N, print count of set bits in it.
Example 1:
Input:
N = 6
Output:
2
Explanation:
Binary representation is '110'
So the count of the set bit is 2.
Example 2:
Input:
8
Output:
1
Explanation:
Binary representation is '1000'
So the count of the set bit is 1.
Your Task:
You don't need to read i... | [
{
"code": null,
"e": 298,
"s": 238,
"text": "Given a positive integer N, print count of set bits in it. "
},
{
"code": null,
"e": 309,
"s": 298,
"text": "Example 1:"
},
{
"code": null,
"e": 411,
"s": 309,
"text": "Input:\nN = 6\nOutput:\n2\nExplanation:\nBinar... |
Swing Examples - Add Title Border to JPanel | Following example showcase how to add title to border of a JPanel in a Java Swing application.
We are using the following APIs.
BorderFactory.createTitledBorder() − To create a titled border.
BorderFactory.createTitledBorder() − To create a titled border.
JPanel.setBorder(border) − To set the desired border to the JPan... | [
{
"code": null,
"e": 2134,
"s": 2039,
"text": "Following example showcase how to add title to border of a JPanel in a Java Swing application."
},
{
"code": null,
"e": 2167,
"s": 2134,
"text": "We are using the following APIs."
},
{
"code": null,
"e": 2231,
"s": 21... |
SQL LIKE Operator | The LIKE operator is used in a
WHERE clause to search for a specified pattern in a column.
There are two wildcards often used in conjunction with the
LIKE operator:
The percent sign (%) represents zero, one, or multiple characters
The underscore sign (_) represents one, single character
Note: MS Access uses an aste... | [
{
"code": null,
"e": 92,
"s": 0,
"text": "The LIKE operator is used in a \nWHERE clause to search for a specified pattern in a column."
},
{
"code": null,
"e": 167,
"s": 92,
"text": "There are two wildcards often used in conjunction with the \nLIKE operator:"
},
{
"code":... |
How to get the table name of the current ResultSet using JDBC? | You can get the name of the table in the current ResultSet object using the getTableName() method of the ResultSetMetaData interface. This method accepts an integer value representing the index of a column and, returns a String value representing the name of the table that contains the given column.
Let us create a tab... | [
{
"code": null,
"e": 1363,
"s": 1062,
"text": "You can get the name of the table in the current ResultSet object using the getTableName() method of the ResultSetMetaData interface. This method accepts an integer value representing the index of a column and, returns a String value representing the na... |
Python program to read input from console | Suppose we have to take firstname and lastname from console and write a prompt like "Hello <firstname> <lastname>, you are welcome!". To get the result we can use the format() class.We can placeholder into the string using {}, then pass arguments into format() function.
So, if the input is like Ashish Dutta, then the o... | [
{
"code": null,
"e": 1333,
"s": 1062,
"text": "Suppose we have to take firstname and lastname from console and write a prompt like \"Hello <firstname> <lastname>, you are welcome!\". To get the result we can use the format() class.We can placeholder into the string using {}, then pass arguments into... |
Road detection using segmentation models and albumentations libraries on Keras | by Insaf Ashrapov | Towards Data Science | In this article, I will show how to write own data generator and how to use albumentations as augmentation library. Along with segmentation_models library, which provides dozens of pretrained heads to Unet and other unet-like architectures. For the full code go to Github. Link to dataset.
Check out my Machine & Deep Le... | [
{
"code": null,
"e": 337,
"s": 47,
"text": "In this article, I will show how to write own data generator and how to use albumentations as augmentation library. Along with segmentation_models library, which provides dozens of pretrained heads to Unet and other unet-like architectures. For the full co... |
How to get the value in a particular cell inside the worksheet in Selenium with python? | We can get the value in a particular cell inside the worksheet in Selenium.
Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook
has multiple sheets and each sheet consists of rows and columns.
Out of all the worksheets, while we are accessing a particular sheet that is called as
an active ... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "We can get the value in a particular cell inside the worksheet in Selenium.\nExcel is a spreadsheet which is saved with the .xlsx extension. An excel workbook\nhas multiple sheets and each sheet consists of rows and columns."
},
{
"code": null,
... |
How to display JTextArea in the form of a table with GridLayout in Java? | Display a component in the form of rows and columns using the GridLayout. Here, we have set a panel, within which we will create a layout with 3 rows and 5 columns −
JPanel panel = new JPanel(new GridLayout(3, 5, 5, 5));
Now, loop through and display JTextArea from 1 to 15 i.e. 3 rows and 5 columns −
for (int i = 1; i ... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Display a component in the form of rows and columns using the GridLayout. Here, we have set a panel, within which we will create a layout with 3 rows and 5 columns −"
},
{
"code": null,
"e": 1283,
"s": 1228,
"text": "JPanel panel = n... |
Valid Parenthesis String in C++ | Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid.
To solve this, we will follow these steps −
Traverse through the exp... | [
{
"code": null,
"e": 1314,
"s": 1062,
"text": "Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid."
... |
How to create bulk users in the active directory using PowerShell? | To create bulk users in the AD using PowerShell, there are multiple methods. For example, let say if you want to create 50 sample users for the lab environment without considering the other required properties, then you can use the below command,
$pass = Read-Host "Enter Account Password " -AsSecureString 1..50 | forea... | [
{
"code": null,
"e": 1309,
"s": 1062,
"text": "To create bulk users in the AD using PowerShell, there are multiple methods. For example, let say if you want to create 50 sample users for the lab environment without considering the other required properties, then you can use the below command,"
},
... |
Java Swing Login Example | Swing Login with Validations | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
This example shows you how to create a simple... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Data Structure and Algorithms Linear Search | Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.
Linear Search ( Array A, Value x)
Step... | [
{
"code": null,
"e": 2861,
"s": 2580,
"text": "Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the ... |
How to Check the Battery Level in Android Programmatically? - GeeksforGeeks | 23 Feb, 2021
Sometimes, it is useful to determine the current battery level. One may choose to reduce the rate of your background updates if the battery charge is below a certain level. But one cannot continuously monitor the battery state. In general, the impact of constantly monitoring the battery level has a more si... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25658,
"s": 25036,
"text": "Sometimes, it is useful to determine the current battery level. One may choose to reduce the rate of your background updates if the battery charge is below a certa... |
How to write a case insensitive Python regular expression without re.compile? | We can pass re.IGNORECASE to the flags parameter of search, match, or sub −
import re
print (re.search('bush', 'BuSh', re.IGNORECASE))
print (re.match('bush', 'BuSh', re.IGNORECASE))
print (re.sub('bush', 'xxxx', 'Bushmeat', flags=re.IGNORECASE))
<_sre.SRE_Match object at 0x0000000005316648>
<_sre.SRE_Match object at 0... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "We can pass re.IGNORECASE to the flags parameter of search, match, or sub −"
},
{
"code": null,
"e": 1309,
"s": 1138,
"text": "import re\nprint (re.search('bush', 'BuSh', re.IGNORECASE))\nprint (re.match('bush', 'BuSh', re.IGNORECASE... |
Convert from float to String in Java | To convert float to string, use the toString() method. It represents a value in a string.
Let’s say the following is our float.
float f = 0.9F;
Converting the float value to string.
String s = Float.toString(f);
Let us see the complete example to convert float to String in Java with output.
Live Demo
public class Demo... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To convert float to string, use the toString() method. It represents a value in a string."
},
{
"code": null,
"e": 1190,
"s": 1152,
"text": "Let’s say the following is our float."
},
{
"code": null,
"e": 1206,
"s": 11... |
How to search a string in backwards direction in Python? | Python has a rfind() method which searches from the end of a string for the occurrence of a substring. It returns the index of the last occurrence if found, else -1. You can use it as follows:
>>> "CocacolaPepsi".rfind('cola')
4
>>> 'CocacolaPepsi'.rfind('coke')
-1 | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "Python has a rfind() method which searches from the end of a string for the occurrence of a substring. It returns the index of the last occurrence if found, else -1. You can use it as follows:"
},
{
"code": null,
"e": 1328,
"s": 1255,
... |
Maximum consecutive numbers present in an array in C++ | We are given with an array of positive integers. The goal is to find the maximum number of
consecutive numbers present in it. First of all we will sort the array and then compare adjacent
elements arr[j]==arr[i]+1 (j=i+1), if difference is 1 then increment count and indexes i++,j++ else
change count=1. Store the maximu... | [
{
"code": null,
"e": 1419,
"s": 1062,
"text": "We are given with an array of positive integers. The goal is to find the maximum number of\nconsecutive numbers present in it. First of all we will sort the array and then compare adjacent\nelements arr[j]==arr[i]+1 (j=i+1), if difference is 1 then incr... |
ReactJS UI Ant Design Notification Component - GeeksforGeeks | 01 Jun, 2021
Ant Design Library has this component pre-built, and it is very easy to integrate as well. Notification Component is used to display a notification message globally. We can use the following approach in ReactJS to use the Ant Design Notification Component.
Notification Config Props:
bottom: When the placem... | [
{
"code": null,
"e": 34158,
"s": 34130,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 34415,
"s": 34158,
"text": "Ant Design Library has this component pre-built, and it is very easy to integrate as well. Notification Component is used to display a notification message globall... |
How to extract variables of an S4 object in R? | Suppose we want to create an S4 with defined name data and two numerical columns called by x and y then we can use setClass("data",representation(x1="numeric",x2="numeric")). Now, if we want to extract the variables of this S4 object then we would need to use @ sign instead of $ sign as in a data frame.
> setClass("dat... | [
{
"code": null,
"e": 1367,
"s": 1062,
"text": "Suppose we want to create an S4 with defined name data and two numerical columns called by x and y then we can use setClass(\"data\",representation(x1=\"numeric\",x2=\"numeric\")). Now, if we want to extract the variables of this S4 object then we would... |
How to customize search bar in Next.js - GeeksforGeeks | 22 Oct, 2021
In this article, we will learn How we can add a customized search bar in the NextJS project using Algolia. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac. The linking of dynamic paths helps in rendering your Nex... | [
{
"code": null,
"e": 26805,
"s": 26777,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 27142,
"s": 26805,
"text": "In this article, we will learn How we can add a customized search bar in the NextJS project using Algolia. NextJS is a React-based framework. It has the power to D... |
Unicornscan - Penetration Testing Tool in Kali Linux - GeeksforGeeks | 24 Jun, 2021
Unicornscan is a free and open-source Automated Penetration Testing tool available on GitHub which is very useful for security researchers for information gathering and testing of the security of websites and web servers.Unicornscan provides many integrated tools to perform penetration testing on the targe... | [
{
"code": null,
"e": 25651,
"s": 25623,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 26462,
"s": 25651,
"text": "Unicornscan is a free and open-source Automated Penetration Testing tool available on GitHub which is very useful for security researchers for information gatherin... |
How to Label Image in Android using Firebase ML Kit? - GeeksforGeeks | 24 Feb, 2021
We have seen many apps in Android in which we will detect the object present in the image whether it may be any object. In this article, we will take a look at the implementation of image labeling in Android using Firebase ML Kit.
We will be building a simple application in which we will be capturing an i... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 26613,
"s": 26381,
"text": "We have seen many apps in Android in which we will detect the object present in the image whether it may be any object. In this article, we will take a look at the... |
How to Execute C# Program on cmd (command-line)? - GeeksforGeeks | 30 Jan, 2020
C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. C# is among the languages for Common Language Infrastructure and the current version of C# is version 8.0. C# is a lot similar to Java syntactically and is easy for the users who know C, C++ or Java.
Since the... | [
{
"code": null,
"e": 25147,
"s": 25119,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 25445,
"s": 25147,
"text": "C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. C# is among the languages for Common Language Infrastructure and ... |
Solidity - Enums and Structs - GeeksforGeeks | 11 May, 2022
Enums are the way of creating user-defined data types, it is usually used to provide names for integral constants which makes the contract better for maintenance and reading. Enums restrict the variable with one of few predefined values, these values of the enumerated list are called as enums. Options of a... | [
{
"code": null,
"e": 25651,
"s": 25623,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 26123,
"s": 25651,
"text": "Enums are the way of creating user-defined data types, it is usually used to provide names for integral constants which makes the contract better for maintenance a... |
Java Program to Separate the Individual Characters from a String - GeeksforGeeks | 27 Jan, 2021
The string is a sequence of characters including spaces. Objects of String are immutable in java, which means that once an object is created in a string, it’s content cannot be changed. In this particular problem statement, we are given to separate each individual characters from the string provided as the... | [
{
"code": null,
"e": 26332,
"s": 26304,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 26760,
"s": 26332,
"text": "The string is a sequence of characters including spaces. Objects of String are immutable in java, which means that once an object is created in a string, it’s cont... |
RustScan - Faster Nmap Scanning with Rust - GeeksforGeeks | 23 Sep, 2021
Port Scanning is the process of detection of active ports on the Web Server. In some cases, if there is an unfamiliar port running on the server, this can lead to breaches. We can perform use various automated tools like Nmap, Masscan, etc for port detection. RustScan is the tool that assures the fastest r... | [
{
"code": null,
"e": 25651,
"s": 25623,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26347,
"s": 25651,
"text": "Port Scanning is the process of detection of active ports on the Web Server. In some cases, if there is an unfamiliar port running on the server, this can lead to ... |
Mathematics | Introduction to Propositional Logic | Set 2 - GeeksforGeeks | 30 Sep, 2021
Prerequisite : Introduction to Propositional Logic – Set 1
De Morgan’s Law :
In propositional logic and boolean algebra, De Morgan’s laws are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow... | [
{
"code": null,
"e": 31277,
"s": 31249,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 31336,
"s": 31277,
"text": "Prerequisite : Introduction to Propositional Logic – Set 1"
},
{
"code": null,
"e": 31354,
"s": 31336,
"text": "De Morgan’s Law :"
},
{
... |
How to get the floor, ceiling and truncated values of the elements of a numpy array? - GeeksforGeeks | 29 Aug, 2020
In this article, let’s discuss how to get the floor, ceiling, and truncated values of the elements of a Numpy array. First, we need to import the NumPy library to use all the functions available in it. This can be done with this import statement:
import numpy as np
The greatest integer that is less than o... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 25784,
"s": 25537,
"text": "In this article, let’s discuss how to get the floor, ceiling, and truncated values of the elements of a Numpy array. First, we need to import the NumPy library to ... |
Output of C programs | Set 47 (Decision and Control Statements) - GeeksforGeeks | 30 Aug, 2017
Decision and Loops & Control Statements
QUE.1 What is the output of this program ?
#include <stdio.h>#include <stdio.h> void main(){ while (printf("geeks")) { }}
OPTIONa) geeksb) infinite time geeksc) Compile time errord) No Output
Answer: b
Explanation: printf returns the number of characters of “g... | [
{
"code": null,
"e": 25811,
"s": 25783,
"text": "\n30 Aug, 2017"
},
{
"code": null,
"e": 25851,
"s": 25811,
"text": "Decision and Loops & Control Statements"
},
{
"code": null,
"e": 25894,
"s": 25851,
"text": "QUE.1 What is the output of this program ?"
},
... |
Get UTC timestamp in Python - GeeksforGeeks | 17 Mar, 2021
Datetime module supplies classes to work with date and time. These classes provide a number of functions to deal with dates, times and time intervals. Date and datetime are an object in Python, so when you manipulate them, you are actually manipulating objects and not string or timestamps.
Note: For more i... | [
{
"code": null,
"e": 26075,
"s": 26047,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 26366,
"s": 26075,
"text": "Datetime module supplies classes to work with date and time. These classes provide a number of functions to deal with dates, times and time intervals. Date and dat... |
Maximum difference between node and its ancestor in a Directed Acyclic Graph ( DAG ) - GeeksforGeeks | 14 Sep, 2021
Given a 2D array Edges[][], representing a directed edge between the pair of nodes in a Directed Acyclic Connected Graph consisting of N nodes valued from [1, N] and an array arr[] representing weights of each node, the task is to find the maximum absolute difference between the weights of any node and any... | [
{
"code": null,
"e": 26939,
"s": 26911,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 27265,
"s": 26939,
"text": "Given a 2D array Edges[][], representing a directed edge between the pair of nodes in a Directed Acyclic Connected Graph consisting of N nodes valued from [1, N] a... |
Multiply two integers without using multiplication, division and bitwise operators, and no loops | 08 Jul, 2022
By making use of recursion, we can multiply two integers with the given constraints. To multiply x and y, recursively add x y times.
Approach:
Since we cannot use any of the given symbols, the only way left is to use recursion, with the fact that x is to be added to x y times.
Base case: When the numbers... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 187,
"s": 52,
"text": "By making use of recursion, we can multiply two integers with the given constraints. To multiply x and y, recursively add x y times. "
},
{
"code": null,
"e": 19... |
locate command in Linux with Examples | 23 May, 2019
locate command in Linux is used to find the files by name. There is two most widely used file searching utilities accessible to users are called find and locate. The locate utility works better and faster than find command counterpart because instead of searching the file system when a file search is initi... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 677,
"s": 53,
"text": "locate command in Linux is used to find the files by name. There is two most widely used file searching utilities accessible to users are called find and locate. The locate u... |
Matplotlib.pyplot.subplot() function in Python | 20 May, 2022
Prerequisites: matplotlib
subplot() function adds subplot to a current figure at the specified grid position. It is similar to the subplots() function however unlike subplots() it adds one subplot at a time. So to create multiple plots you will need several lines of code with the subplot() function. Anoth... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 May, 2022"
},
{
"code": null,
"e": 80,
"s": 54,
"text": "Prerequisites: matplotlib"
},
{
"code": null,
"e": 473,
"s": 80,
"text": "subplot() function adds subplot to a current figure at the specified grid positio... |
How to use Scrapy to parse PDF pages online? | 18 Jul, 2021
Prerequisite: Scrapy, PyPDF2, URLLIB
In this article, we will be using Scrapy to parse any online PDF without downloading it onto the system. To do that we have to use the PDF parser or editor library of Python know as PyPDF2.
PyPDF2 is a pdf parsing library of python, which provides various methods like ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 65,
"s": 28,
"text": "Prerequisite: Scrapy, PyPDF2, URLLIB"
},
{
"code": null,
"e": 256,
"s": 65,
"text": "In this article, we will be using Scrapy to parse any online PDF withou... |
How to get the duration of audio in Python? | 24 Feb, 2021
It is possible to find the duration of the audio files using Python language which is rich in the use of its libraries. The use of some libraries like mutagen, wave, audioread, etc. is not only limited to extract the length/duration of the audio files but comes with much more functionality.
Source Audio Fi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 320,
"s": 28,
"text": "It is possible to find the duration of the audio files using Python language which is rich in the use of its libraries. The use of some libraries like mutagen, wave, audioread... |
SQRT() Function in SQL Server | 30 Dec, 2020
SQRT() function :This function in SQL Server is used to return the square root of a specified positive number. For example, if the specified number is 81, this function will return 9.
Features :
This function is used to find the square root of a given number.
This function accepts only positive numbers.
Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 212,
"s": 28,
"text": "SQRT() function :This function in SQL Server is used to return the square root of a specified positive number. For example, if the specified number is 81, this function will r... |
Java Program to Crop Image Using BufferedImage Class | 30 Jul, 2021
In the Java programming language, we need some classes to crop an image. So these classes are as follows:
1. To read and write an image file we have to import the File class. This class represents file and directory path names in general.
import java.io.File
2. To handle errors we use the IOException class... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 134,
"s": 28,
"text": "In the Java programming language, we need some classes to crop an image. So these classes are as follows:"
},
{
"code": null,
"e": 267,
"s": 134,
"text": "... |
What does “dereferencing” a pointer mean in C/C++? | Dereferencing is used to access or manipulate data contained in memory location pointed to by a pointer. *(asterisk) is used with pointer variable when dereferencing the pointer variable, it refers to variable being pointed, so this is called dereferencing of pointers.
int main() {
int a = 7, b ;
int *p; // Un-in... | [
{
"code": null,
"e": 1457,
"s": 1187,
"text": "Dereferencing is used to access or manipulate data contained in memory location pointed to by a pointer. *(asterisk) is used with pointer variable when dereferencing the pointer variable, it refers to variable being pointed, so this is called dereferenc... |
Merge Two Balanced Binary Search Trees | 17 Jun, 2022
You are given two balanced binary search trees e.g., AVL or Red-Black Tree. Write a function that merges the two given balanced BSTs into a balanced binary search tree. Let there be m elements in the first tree and n elements in the other tree. Your merge function should take O(m+n) time.In the following s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 520,
"s": 54,
"text": "You are given two balanced binary search trees e.g., AVL or Red-Black Tree. Write a function that merges the two given balanced BSTs into a balanced binary search tree. Let t... |
Compile 32-bit program on 64-bit gcc in C and C++ | Nowadays the compiler comes with default 64-bit version. Sometimes we need to compile and execute a code into some 32bit system. In that time, we have to use thisS feature.
At first, we Shave to check the current target version of the gcc compiler. To check this, we have to type this command.
gcc –v
Using built-in spec... | [
{
"code": null,
"e": 1360,
"s": 1187,
"text": "Nowadays the compiler comes with default 64-bit version. Sometimes we need to compile and execute a code into some 32bit system. In that time, we have to use thisS feature."
},
{
"code": null,
"e": 1481,
"s": 1360,
"text": "At first,... |
Variable Length Arrays in C and C++ | Here we will discuss about the variable length arrays in C++. Using this we can allocate an auto array of variable size. In C, it supports variable sized arrays from C99 standard. The following format supports this concept −
void make_arr(int n){
int array[n];
}
int main(){
make_arr(10);
}
But, in C++ standard (t... | [
{
"code": null,
"e": 1412,
"s": 1187,
"text": "Here we will discuss about the variable length arrays in C++. Using this we can allocate an auto array of variable size. In C, it supports variable sized arrays from C99 standard. The following format supports this concept −"
},
{
"code": null,
... |
Inline namespaces and usage of the “using” directive inside namespaces | 14 Sep, 2021
Prerequisite : Namespaces in C++An inline namespace is a namespace that uses the optional keyword inline in its original-namespace-definition.
CPP
// C++ program to demonstrate working of// inline namespaces#include <iostream>using namespace std; namespace ns1{ inline namespace ns2 { int var = 1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 196,
"s": 52,
"text": "Prerequisite : Namespaces in C++An inline namespace is a namespace that uses the optional keyword inline in its original-namespace-definition. "
},
{
"code": null,
... |
Bootstrap 4 .float-left class | Use the float-left class in Bootstrap to float an element to the left.
To place it on the left −
<h1 class="float-left">
I am on the left.
</h1>
<p class="float-left">
I am on the left.
</p>
You can try to run the following code to implement the float-left class −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
... | [
{
"code": null,
"e": 1258,
"s": 1187,
"text": "Use the float-left class in Bootstrap to float an element to the left."
},
{
"code": null,
"e": 1284,
"s": 1258,
"text": "To place it on the left −"
},
{
"code": null,
"e": 1383,
"s": 1284,
"text": "<h1 class=\"fl... |
Customize the tooltip font, color , background and foreground color in Java | To customize the tooltip font, color and background, use UIManager.
UIManager.put("ToolTip.background", Color.ORANGE);
UIManager.put("ToolTip.foreground", Color.BLACK);
UIManager.put("ToolTip.font", new Font("Arial", Font.BOLD, 14));
Above, we have set the font with −
Tooltip.font
We have set the foreground and backgro... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To customize the tooltip font, color and background, use UIManager."
},
{
"code": null,
"e": 1296,
"s": 1130,
"text": "UIManager.put(\"ToolTip.background\", Color.ORANGE);\nUIManager.put(\"ToolTip.foreground\", Color.BLACK);\nUIManag... |
SQL Query to Convert Rows to Columns in SQL Server - GeeksforGeeks | 16 Dec, 2021
In this article we will see, how to convert Rows to Column in SQL Server. In a table where many columns have the have same data for many entries in the table, it is advisable to convert the rows to column. This will help to reduce the table and make the table more readable.
For example, Suppose we have a t... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 24152,
"s": 23877,
"text": "In this article we will see, how to convert Rows to Column in SQL Server. In a table where many columns have the have same data for many entries in the table, it i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.