title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to get the width of device screen in JavaScript ? - GeeksforGeeks
28 Jun, 2019 Given an HTML document which is running on a device. The task is to find the width of the working screen device using JavaScript. Example 1: This example uses window.innerWidth to get the width of device screen. The innerWidth property is used to return the width of the device. <!DOCTYPE HTML> <html> <...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n28 Jun, 2019" }, { "code": null, "e": 26675, "s": 26545, "text": "Given an HTML document which is running on a device. The task is to find the width of the working screen device using JavaScript." }, { "code": null, "...
Check if the Object is a Matrix in R Programming - is.matrix() Function - GeeksforGeeks
12 Jun, 2020 is.matrix() function in R Language is used to return TRUE if the specified data is in the form of matrix else return FALSE. Syntax: is.matrix(x) Parameters:x: specified matrix Example 1: # R program to illustrate# is.matrix function # Specifying some different types of arraysA <- matrix(c(1:5))B <- matrix...
[ { "code": null, "e": 26103, "s": 26075, "text": "\n12 Jun, 2020" }, { "code": null, "e": 26227, "s": 26103, "text": "is.matrix() function in R Language is used to return TRUE if the specified data is in the form of matrix else return FALSE." }, { "code": null, "e": 26...
Python OpenCV - Depth map from Stereo Images - GeeksforGeeks
12 Dec, 2021 OpenCV is the huge open-source library for the computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems.Note: For more information, refer to Introduction to OpenCV Depth Map : A depth map is a picture where every...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n12 Dec, 2021" }, { "code": null, "e": 25796, "s": 25537, "text": "OpenCV is the huge open-source library for the computer vision, machine learning, and image processing and now it plays a major role in real-time operation which i...
Cache Hits in Memory Organization - GeeksforGeeks
01 May, 2022 The user has a memory machine. It has one layer for data storage and another layer for the cache. The user has stored an array with length N in the first layer. When the CPU needs data, it immediately checks in cache memory whether it has data or not. If data is present it results in CACHE HITS, else CACHE...
[ { "code": null, "e": 26051, "s": 26023, "text": "\n01 May, 2022" }, { "code": null, "e": 26489, "s": 26051, "text": "The user has a memory machine. It has one layer for data storage and another layer for the cache. The user has stored an array with length N in the first layer. Wh...
Exception Handling in C++ - GeeksforGeeks
07 Jul, 2021 One of the advantages of C++ over C is Exception Handling. Exceptions are run-time anomalies or abnormal conditions that a program encounters during its execution. There are two types of exceptions: a)Synchronous, b)Asynchronous(Ex:which are beyond the program’s control, Disc failure etc). C++ provides fol...
[ { "code": null, "e": 28207, "s": 28179, "text": "\n07 Jul, 2021" }, { "code": null, "e": 28827, "s": 28207, "text": "One of the advantages of C++ over C is Exception Handling. Exceptions are run-time anomalies or abnormal conditions that a program encounters during its execution....
Sort a Pandas Series in Python - GeeksforGeeks
05 Jul, 2021 Series is a one-dimensional labeled array capable of holding data of the type integer, string, float, python objects, etc. The axis labels are collectively called index. Now, Let’s see a program to sort a Pandas Series. For sorting a pandas series the Series.sort_values() method is used. Syntax: Series.so...
[ { "code": null, "e": 26177, "s": 26149, "text": "\n05 Jul, 2021" }, { "code": null, "e": 26348, "s": 26177, "text": "Series is a one-dimensional labeled array capable of holding data of the type integer, string, float, python objects, etc. The axis labels are collectively called ...
How to create Music Player UI Controls Component in ReactJS? - GeeksforGeeks
16 Sep, 2021 We can create a music-player basic UI in ReactJS using the following logic which is very simple and easy to implement. Material UI for React has this component available for us, and it is very easy to integrate. We can create it in ReactJS using the following approach. Creating React Application And Instal...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n16 Sep, 2021" }, { "code": null, "e": 26341, "s": 26071, "text": "We can create a music-player basic UI in ReactJS using the following logic which is very simple and easy to implement. Material UI for React has this component ava...
MongoDB - Logical Query Operators - GeeksforGeeks
10 May, 2020 MongoDB supports logical query operators. These operators are used for filtering the data and getting precise results based on the given conditions. The following table contains the comparison query operators: In the following examples, we are working with: Database: GeeksforGeeks Collection: contributor D...
[ { "code": null, "e": 25589, "s": 25561, "text": "\n10 May, 2020" }, { "code": null, "e": 25799, "s": 25589, "text": "MongoDB supports logical query operators. These operators are used for filtering the data and getting precise results based on the given conditions. The following ...
Create an n x n square matrix, where all the sub-matrix have the sum of opposite corner elements as even - GeeksforGeeks
04 Aug, 2021 Given an integer N. The task is to generate a square matrix of ( n x n ) having the elements ranging from 1 to n^2 with the following condition: The elements of the matrix should be distinct i.e used only once Numbers ranging from 1 to n^2 Every sub-matrix you choose should have the sum of opposite corner ...
[ { "code": null, "e": 26031, "s": 26003, "text": "\n04 Aug, 2021" }, { "code": null, "e": 26176, "s": 26031, "text": "Given an integer N. The task is to generate a square matrix of ( n x n ) having the elements ranging from 1 to n^2 with the following condition:" }, { "cod...
Python | sympy.atan2() method - GeeksforGeeks
24 Dec, 2021 In simpy, atan2() method is an inverse tangent function. Using the atan2(x, y) method in simpy module, we can computes the two-argument arctangent. This function is defined for real x and y only. Syntax : sympy.atan(x) Return : Returns the arc tangent of x Code #1: Below is the example using atan() meth...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n24 Dec, 2021" }, { "code": null, "e": 25734, "s": 25537, "text": "In simpy, atan2() method is an inverse tangent function. Using the atan2(x, y) method in simpy module, we can computes the two-argument arctangent. This function i...
How To Create a Plotly Visualization And Embed It On Websites | by Elizabeth Ter Sahakyan | Towards Data Science
Plotly is an open-source, simple-to-use charting library for python. Plotly.express was built as a wrapper for Plotly.py to make creating interactive visualizations as easy as writing one line of python ✨ plotly.express is to plotly what seaborn is to matplotlib There are so many cool interactive visualizations that ca...
[ { "code": null, "e": 376, "s": 171, "text": "Plotly is an open-source, simple-to-use charting library for python. Plotly.express was built as a wrapper for Plotly.py to make creating interactive visualizations as easy as writing one line of python ✨" }, { "code": null, "e": 434, "s":...
Align text and select boxes to the same width with HTML and CSS
When we set the width and height of an element in CSS then often the element appears bigger than the actual size. This is because by default, the padding and border are added to the element’s width and height and then the element is displayed. The box sizing property includes the padding and border of an element with a...
[ { "code": null, "e": 1306, "s": 1062, "text": "When we set the width and height of an element in CSS then often the element appears bigger than the actual size. This is because by default, the padding and border are added to the element’s width and height and then the element is displayed." }, {...
GAN — Ways to improve GAN performance | by Jonathan Hui | Towards Data Science
GAN models can suffer badly in the following areas comparing to other deep networks. Non-convergence: the models do not converge and worse they become unstable. Mode collapse: the generator produces limited modes, and Slow training: the gradient to train the generator vanished. As part of the GAN series, this article l...
[ { "code": null, "e": 257, "s": 172, "text": "GAN models can suffer badly in the following areas comparing to other deep networks." }, { "code": null, "e": 333, "s": 257, "text": "Non-convergence: the models do not converge and worse they become unstable." }, { "code": nul...
Democratising Machine learning with H2O | by Parul Pandey | Towards Data Science
It is important to make AI accessible to everyone for the sake of social and economic stability. Kaggle days is a two-day event where data science enthusiasts can talk to each other face to face, exchange knowledge, and compete together. Kaggle days San Francisco just concluded and as is customary, Kaggle also organise...
[ { "code": null, "e": 269, "s": 172, "text": "It is important to make AI accessible to everyone for the sake of social and economic stability." }, { "code": null, "e": 673, "s": 269, "text": "Kaggle days is a two-day event where data science enthusiasts can talk to each other face...
C++ Date and Time
The C++ standard library does not provide a proper date type. C++ inherits the structs and functions for date and time manipulation from C. To access date and time related functions and structures, you would need to include <ctime> header file in your C++ program. There are four time-related types: clock_t, time_t, siz...
[ { "code": null, "e": 2583, "s": 2318, "text": "The C++ standard library does not provide a proper date type. C++ inherits the structs and functions for date and time manipulation from C. To access date and time related functions and structures, you would need to include <ctime> header file in your C...
Exception Handling in Node.js - GeeksforGeeks
16 Feb, 2022 The exception handling refers to the mechanism by which the exceptions occurring in a code while an application is running is handled. Node.js supports several mechanisms for propagating and handling errors. This are the different methods which can be used for exception handling in Node.js: Exception han...
[ { "code": null, "e": 24035, "s": 24007, "text": "\n16 Feb, 2022" }, { "code": null, "e": 24329, "s": 24035, "text": "The exception handling refers to the mechanism by which the exceptions occurring in a code while an application is running is handled. Node.js supports several mec...
Unix / Linux - Shell Arithmetic Operators Example
The following arithmetic operators are supported by Bourne Shell. Assume variable a holds 10 and variable b holds 20 then − It is very important to understand that all the conditional expressions should be inside square braces with spaces around them, for example [ $a == $b ] is correct whereas, [$a==$b] is incorrect. ...
[ { "code": null, "e": 2813, "s": 2747, "text": "The following arithmetic operators are supported by Bourne Shell." }, { "code": null, "e": 2871, "s": 2813, "text": "Assume variable a holds 10 and variable b holds 20 then −" }, { "code": null, "e": 3067, "s": 2871, ...
jQuery | on() with Examples
16 Apr, 2020 The on() is an inbuilt method in jQuery which is used to attach one or more event handlers for the selected elements and child elements in the DOM tree. The DOM (Document Object Model) is a World Wide Web Consortium standard. This defines for accessing elements in the DOM tree.Syntax: $(selector).on(event,...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2020" }, { "code": null, "e": 314, "s": 28, "text": "The on() is an inbuilt method in jQuery which is used to attach one or more event handlers for the selected elements and child elements in the DOM tree. The DOM (Document Obje...
Text to text Transfer Transformer in Data Augmentation
22 Jan, 2021 Do you want to achieve ‘the-state-of-the-art’ results in your next NLP project? Is your data insufficient for training the machine learning model? Do you want to improve the accuracy of your machine learning model with some extra data? If yes, all you need is Data Augmentation. Whether you are building tex...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jan, 2021" }, { "code": null, "e": 132, "s": 52, "text": "Do you want to achieve ‘the-state-of-the-art’ results in your next NLP project?" }, { "code": null, "e": 199, "s": 132, "text": "Is your data insufficient...
Stream.distinct() in Java
06 Dec, 2018 distinct() returns a stream consisting of distinct elements in a stream. distinct() is the method of Stream interface. This method uses hashCode() and equals() methods to get distinct elements. In case of ordered streams, the selection of distinct elements is stable. But, in case of unordered streams, the ...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Dec, 2018" }, { "code": null, "e": 555, "s": 54, "text": "distinct() returns a stream consisting of distinct elements in a stream. distinct() is the method of Stream interface. This method uses hashCode() and equals() methods to get...
Average Cells Based On Multiple Criteria in Excel
23 Jun, 2021 Average a number expressing the central or typical value in a set of data, in particular the mode, median, or (most commonly) the mean, which is calculated by dividing the sum of the values in the set by their number. The basic formula for the average of n numbers x1,x2,......xn is A = (x1 + x2 ........xn)...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jun, 2021" }, { "code": null, "e": 311, "s": 28, "text": "Average a number expressing the central or typical value in a set of data, in particular the mode, median, or (most commonly) the mean, which is calculated by dividing the sum...
strftime() function in C/C++
The function strftime() is used to format the time and date as a string. It is declared in “time.h” header file in C language. It returns the total number of characters copied to the string, if string fits in less than size characters otherwise, returns zero. Here is the syntax of strftime() in C language, size_t strft...
[ { "code": null, "e": 1322, "s": 1062, "text": "The function strftime() is used to format the time and date as a string. It is declared in “time.h” header file in C language. It returns the total number of characters copied to the string, if string fits in less than size characters otherwise, returns...
PyQt5 - Introduction
PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.com PyQt API is a set of modules containing a large...
[ { "code": null, "e": 2236, "s": 1963, "text": "PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riv...
Find right sibling of a binary tree with parent pointers - GeeksforGeeks
14 Mar, 2022 Given a binary tree with parent pointers, find the right sibling of a given node(pointer to the node will be given), if it doesn’t exist return null. Do it in O(1) space and O(n) time?Examples: 1 / \ 2 3 / \ \ 4 6 5 / \ \ ...
[ { "code": null, "e": 35846, "s": 35818, "text": "\n14 Mar, 2022" }, { "code": null, "e": 36041, "s": 35846, "text": "Given a binary tree with parent pointers, find the right sibling of a given node(pointer to the node will be given), if it doesn’t exist return null. Do it in O(1)...
What are the rules need to follow when overriding a method that throws an exception in Java?
We need to follow some rules when we overriding a method that throws an Exception. When the parent class method doesn’t throw any exceptions, the child class method can’t throw any checked exception, but it may throw any unchecked exceptions. class Parent { void doSomething() { // ... } } class Child extend...
[ { "code": null, "e": 1145, "s": 1062, "text": "We need to follow some rules when we overriding a method that throws an Exception." }, { "code": null, "e": 1305, "s": 1145, "text": "When the parent class method doesn’t throw any exceptions, the child class method can’t throw any c...
File canWrite() method in Java with examples - GeeksforGeeks
13 Dec, 2021 The canWrite()function is a part of File class in Java . This function determines whether the program can write the file denoted by the abstract path name.The function returns true if the abstract file path exists and the application is allowed to write the file. Function signature: public boolean canWrite...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n13 Dec, 2021" }, { "code": null, "e": 24212, "s": 23948, "text": "The canWrite()function is a part of File class in Java . This function determines whether the program can write the file denoted by the abstract path name.The func...
MoviePy – Creating Image Sequence Clip - GeeksforGeeks
18 Aug, 2020 In this article we will see how we can create a image sequence clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Video is formed by the frames, combination of frames creates a video each frame is an individual image. Image sequence cl...
[ { "code": null, "e": 24456, "s": 24428, "text": "\n18 Aug, 2020" }, { "code": null, "e": 24855, "s": 24456, "text": "In this article we will see how we can create a image sequence clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operation...
Predictor-Corrector or Modified-Euler method for solving Differential equation - GeeksforGeeks
28 Dec, 2021 For a given differential equation with initial condition find the approximate solution using Predictor-Corrector method.Predictor-Corrector Method : The predictor-corrector method is also known as Modified-Euler method. In the Euler method, the tangent is drawn at a point and slope is calculated for a give...
[ { "code": null, "e": 24900, "s": 24872, "text": "\n28 Dec, 2021" }, { "code": null, "e": 25753, "s": 24900, "text": "For a given differential equation with initial condition find the approximate solution using Predictor-Corrector method.Predictor-Corrector Method : The predictor-...
VBA - WeekDay Name
The WeekDayName function returns the name of the weekday for the specified day. WeekdayName(weekday[,abbreviate[,firstdayofweek]]) Weekday − A required parameter. The number of the weekday. Weekday − A required parameter. The number of the weekday. Toabbreviate − An optional parameter. A Boolean value that indicates ...
[ { "code": null, "e": 2015, "s": 1935, "text": "The WeekDayName function returns the name of the weekday for the specified day." }, { "code": null, "e": 2068, "s": 2015, "text": "WeekdayName(weekday[,abbreviate[,firstdayofweek]]) \n" }, { "code": null, "e": 2127, "...
Parallel Algorithm - Matrix Multiplication
A matrix is a set of numerical and non-numerical data arranged in a fixed number of rows and column. Matrix multiplication is an important multiplication design in parallel computation. Here, we will discuss the implementation of matrix multiplication on various communication networks like mesh and hypercube. Mesh and ...
[ { "code": null, "e": 2337, "s": 1903, "text": "A matrix is a set of numerical and non-numerical data arranged in a fixed number of rows and column. Matrix multiplication is an important multiplication design in parallel computation. Here, we will discuss the implementation of matrix multiplication o...
How To Structure Your PyTorch Project | by Branislav Holländer | Towards Data Science
Ever since I started to train deep neural networks, I was wondering what would be the structure for all my Python code. Ideally, a good structure should support extensive experimenting with the model, allow for implementing various different models in a single compact framework and be easily understood by everybody rea...
[ { "code": null, "e": 867, "s": 47, "text": "Ever since I started to train deep neural networks, I was wondering what would be the structure for all my Python code. Ideally, a good structure should support extensive experimenting with the model, allow for implementing various different models in a si...
Redis - String Append Command
Redis APPEND command is used to add some value in a key. Integer reply, the length of the string after the append operation. Following is the basic syntax of Redis APPEND command. redis 127.0.0.1:6379> APPEND KEY_NAME NEW_VALUE redis 127.0.0.1:6379> SET mykey "hello" OK redis 127.0.0.1:6379> APPEND mykey " tutorials...
[ { "code": null, "e": 2102, "s": 2045, "text": "Redis APPEND command is used to add some value in a key." }, { "code": null, "e": 2170, "s": 2102, "text": "Integer reply, the length of the string after the append operation." }, { "code": null, "e": 2225, "s": 2170,...
How can we ENABLE AND DISABLE a particular MySQL event?
With the help of ALTER EVENT statement along with the ENABLE and DISABLE keyword, we can ENABLE and DISABLE the event. To illustrate it we are having the following example − mysql> ALTER EVENT hello DISABLE; Query OK, 0 rows affected (0.00 sec) The above query will DISABLE the event named ‘Hello’ and the query below wi...
[ { "code": null, "e": 1236, "s": 1062, "text": "With the help of ALTER EVENT statement along with the ENABLE and DISABLE keyword, we can ENABLE and DISABLE the event. To illustrate it we are having the following example −" }, { "code": null, "e": 1307, "s": 1236, "text": "mysql> A...
Run and share deep learning web application on Google Colab | Towards Data Science
In my previous work, I built a deep learning model using Fastai to colorize black and white photos and built a web app prototype using Streamlit. I wish to share it with my colleagues and friends to get some feedback, so I tried to deploy the web app to AWS and Heroku. towardsdatascience.com I was able to deploy my app...
[ { "code": null, "e": 442, "s": 172, "text": "In my previous work, I built a deep learning model using Fastai to colorize black and white photos and built a web app prototype using Streamlit. I wish to share it with my colleagues and friends to get some feedback, so I tried to deploy the web app to A...
How YOLOV5 solved an ambiguity encountered by YOLOv3 | Towards Data Science
To the ones who not might be knowing, a new version of YOLO (You Only Look Once) is here, namely YOLO v5. Many thanks to Ultralytics for putting this repository together. You only look once (YOLO) is a state-of-the-art, real-time object detection system. On a Pascal Titan X it processes images at 30 FPS and has a mAP o...
[ { "code": null, "e": 343, "s": 172, "text": "To the ones who not might be knowing, a new version of YOLO (You Only Look Once) is here, namely YOLO v5. Many thanks to Ultralytics for putting this repository together." }, { "code": null, "e": 518, "s": 343, "text": "You only look o...
C Program to Sort an array of names or strings - GeeksforGeeks
18 Jan, 2019 Given an array of strings in which all characters are of the same case, write a C function to sort them alphabetically. The idea is to use qsort() in C and write a comparison function that uses strcmp() to compare two strings. #include <stdio.h>#include <stdlib.h>#include <string.h> // Defining comparator...
[ { "code": null, "e": 24381, "s": 24353, "text": "\n18 Jan, 2019" }, { "code": null, "e": 24501, "s": 24381, "text": "Given an array of strings in which all characters are of the same case, write a C function to sort them alphabetically." }, { "code": null, "e": 24608,...
ADO.NET
ADO.NET provides a bridge between the front end controls and the back end database. The ADO.NET objects encapsulate all the data access operations and the controls interact with these objects to display data, thus hiding the details of movement of data. The following figure shows the ADO.NET objects at a glance: The da...
[ { "code": null, "e": 2601, "s": 2347, "text": "ADO.NET provides a bridge between the front end controls and the back end database. The ADO.NET objects encapsulate all the data access operations and the controls interact with these objects to display data, thus hiding the details of movement of data....
Scala Set toMap() method with example - GeeksforGeeks
18 Oct, 2019 The toMap() method is utilized to return a map consisting of all the elements of the set. Method Definition: def toMap[T, U]: Map[T, U] Return Type: It returns a map consisting of all the elements of the set. Example #1: // Scala program of toMap() // method // Creating object object GfG { // Main ...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n18 Oct, 2019" }, { "code": null, "e": 24016, "s": 23926, "text": "The toMap() method is utilized to return a map consisting of all the elements of the set." }, { "code": null, "e": 24062, "s": 24016, "text": "...
Deploy a Production-Ready On-Premise Kubernetes Cluster | by Joshua Yeung | Towards Data Science
Last year during the pandemic, I had a chance to deploy an on-premise Kubernetes myself. In this article, I would like to mark a few things to remind me and also tell you all that you should know when deploying an on-premise Kubernetes. Kubespray uses Ansible playbooks as an inventory and provisioning tool to help us t...
[ { "code": null, "e": 408, "s": 171, "text": "Last year during the pandemic, I had a chance to deploy an on-premise Kubernetes myself. In this article, I would like to mark a few things to remind me and also tell you all that you should know when deploying an on-premise Kubernetes." }, { "cod...
Conditionally change object property with JavaScript?
To conditionally change object property, use the logical AND operator ( &&). If both the operands are non-zero, then the condition becomes true in JavaScript’s logical AND operator. let marksDetails = { Mark1: 33, Mark2: 89 },isBacklog = false; console.log("Result when backlog is set to false==="); console.log({ ...mar...
[ { "code": null, "e": 1139, "s": 1062, "text": "To conditionally change object property, use the logical AND operator ( &&)." }, { "code": null, "e": 1244, "s": 1139, "text": "If both the operands are non-zero, then the condition becomes true in JavaScript’s logical AND\noperator....
How can we disable the cell editing inside a JTable in Java?
A JTable is a subclass of JComponent for displaying complex data structures. A JTable can follow the Model View Controller (MVC) design pattern for displaying the data in rows and columns. A JTable can fire TableModelListener, TableColumnModelListener, ListSelectionListener, CellEditorListener and RowSorterListener int...
[ { "code": null, "e": 1589, "s": 1062, "text": "A JTable is a subclass of JComponent for displaying complex data structures. A JTable can follow the Model View Controller (MVC) design pattern for displaying the data in rows and columns. A JTable can fire TableModelListener, TableColumnModelListener, ...
Print next greater number of Q queries
30 Jun, 2022 Given an array of n elements and q queries, for each query that has index i, find the next greater element and print its value. If there is no such greater element to its right then print -1. Examples: Input : arr[] = {3, 4, 2, 7, 5, 8, 10, 6} query indexes = {3, 6, 1} Output: 8 -1 7 Explanatio...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 256, "s": 52, "text": "Given an array of n elements and q queries, for each query that has index i, find the next greater element and print its value. If there is no such greater element to its rig...
Kotlin Coroutines on Android
04 Sep, 2020 Asynchronous programming is very important and it’s now a common part of modern application. It increases the amount of work that your app can perform in parallel. This allows running heavy tasks away from UI Thread in the background, which ultimately gives a smooth and better experience to the user of the...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Sep, 2020" }, { "code": null, "e": 367, "s": 54, "text": "Asynchronous programming is very important and it’s now a common part of modern application. It increases the amount of work that your app can perform in parallel. This allow...
time.Sleep() Function in Golang With Examples
01 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time.The Sleep() function in Go language is used to stop the latest go-routine for at least the stated duration d. And a negative or zero duration of sleep will cause this method to return instantly. Moreover, this func...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Apr, 2020" }, { "code": null, "e": 467, "s": 52, "text": "In Go language, time packages supplies functionality for determining as well as viewing time.The Sleep() function in Go language is used to stop the latest go-routine for at ...
Happens-Before Relationship in Java
18 Apr, 2022 Prerequisite: Threading, Synchronized Block, and volatile Keyword Happens-before is a concept, a phenomenon, or simply a set of rules that define the basis for reordering of instructions by a compiler or CPU. Happens-before is not any keyword or object in the Java language, it is simply a discipline put i...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Apr, 2022" }, { "code": null, "e": 121, "s": 54, "text": "Prerequisite: Threading, Synchronized Block, and volatile Keyword" }, { "code": null, "e": 517, "s": 121, "text": "Happens-before is a concept, a phenome...
Remove duplicates from unsorted array using Set data structure
03 Sep, 2021 Given an unsorted array of integers, print the array after removing the duplicate elements from it. We need to print distinct array elements according to their first occurrence. Examples: Input: arr[] = { 1, 2, 5, 1, 7, 2, 4, 2} Output: 1 2 5 7 4 Explanation: {1, 2} appear more than one time. Input: arr[...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Sep, 2021" }, { "code": null, "e": 230, "s": 52, "text": "Given an unsorted array of integers, print the array after removing the duplicate elements from it. We need to print distinct array elements according to their first occurren...
Sum of cousins of a given node in a Binary Tree
17 Jan, 2022 Given a binary tree and data value of a node. The task is to find the sum of cousin nodes of given node. If given node has no cousins then return -1. Note: It is given that all nodes have distinct values and the given node exists in the tree. Examples: Input: 1 / \ ...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jan, 2022" }, { "code": null, "e": 309, "s": 54, "text": "Given a binary tree and data value of a node. The task is to find the sum of cousin nodes of given node. If given node has no cousins then return -1. Note: It is given that a...
How to pass optional parameters to a function in Python?
04 Sep, 2021 In Python, when we define functions with default values for certain parameters, it is said to have its arguments set as an option for the user. Users can either pass their values or can pretend the function to use theirs default values which are specified. In this way, the user can call the function by eit...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Sep, 2021" }, { "code": null, "e": 285, "s": 28, "text": "In Python, when we define functions with default values for certain parameters, it is said to have its arguments set as an option for the user. Users can either pass their val...
Longest Prefix Matching in Routers
15 Jun, 2022 What is Forwarding? Forwarding is moving incoming packets to the appropriate interface. Routers use a forwarding table to decide which incoming packet should be forwarded to which next hop. What is an IP prefix? IP prefix is a prefix of IP address. All computers on one network have the same IP prefix. For...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jun, 2022" }, { "code": null, "e": 245, "s": 54, "text": "What is Forwarding? Forwarding is moving incoming packets to the appropriate interface. Routers use a forwarding table to decide which incoming packet should be forwarded to ...
Tailwind CSS Line Height
23 Mar, 2022 This class accepts lots of value in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS Line Height property. This class is used to set the amount of space used for lines, such as in the text. Negative values are not allowed. Line Height classes: leading...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 307, "s": 28, "text": "This class accepts lots of value in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS Line Height property. This class i...
JavaScript - RegExp ignoreCase Property
ignoreCase is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs case-insensitive matching, i.e., whether it was created with the "i" attribute. Its syntax is as follows − RegExpObject.ignoreCase Returns "TRUE" if the "i" modifier is set, "FALSE" otherwise. Tr...
[ { "code": null, "e": 2670, "s": 2466, "text": "ignoreCase is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs case-insensitive matching, i.e., whether it was created with the \"i\" attribute." }, { "code": null, "e": 2697, ...
Report Scriptlets
We have seen in our previous chapters, data displayed on the report is usually fetched from report parameters and report fields. This data can be processed using the report variables and their expressions. There are situations when a complex functionality cannot be achieved easily using report expressions or variables....
[ { "code": null, "e": 2841, "s": 2254, "text": "We have seen in our previous chapters, data displayed on the report is usually fetched from report parameters and report fields. This data can be processed using the report variables and their expressions. There are situations when a complex functionali...
Count of distinct permutations of length N having Bitwise AND as zero - GeeksforGeeks
19 Nov, 2021 Given an integer N., The task is to find the number of distinct permutations of length N, such that the bitwise AND value of each permutation is zero. Examples: Input: N = 1Output: 0 Explanation: There is only one permutation of length 1: [1] and it’s bitwise AND is 1 . Input: N = 3 Output: 6 Explanatio...
[ { "code": null, "e": 24597, "s": 24569, "text": "\n19 Nov, 2021" }, { "code": null, "e": 24749, "s": 24597, "text": "Given an integer N., The task is to find the number of distinct permutations of length N, such that the bitwise AND value of each permutation is zero. " }, { ...
DIV() Function in MySQL - GeeksforGeeks
10 Dec, 2020 DIV() function :This function in MySQL is used to return a quotient (integer) value when integer division is done. For example, when 7 is divided by 3, then 2 will be returned. Syntax : SELECT x DIV y; Parameter :This method accepts two parameters as given below as follows. x – Specified dividend which wil...
[ { "code": null, "e": 24366, "s": 24338, "text": "\n10 Dec, 2020" }, { "code": null, "e": 24543, "s": 24366, "text": "DIV() function :This function in MySQL is used to return a quotient (integer) value when integer division is done. For example, when 7 is divided by 3, then 2 will...
GATE | GATE CS 2018 | Question 30 - GeeksforGeeks
25 Feb, 2018 Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ . Note – This was Numerical Type que...
[ { "code": null, "e": 25847, "s": 25819, "text": "\n25 Feb, 2018" }, { "code": null, "e": 26120, "s": 25847, "text": "Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be r...
Faulty Keyboard | Practice | GeeksforGeeks
Geek has a unique keyboard containing only the numpad keys. ie - 1,2,3,4,5,6,7,8,9,0. But the keyboard is damaged and can only process M keys. Geek is supposed to use the keyboard to type as many natural numbers as possible starting from 1. What will be the greatest natural number he will type? Example 1: Input: M ...
[ { "code": null, "e": 536, "s": 238, "text": "Geek has a unique keyboard containing only the numpad keys. ie - 1,2,3,4,5,6,7,8,9,0. But the keyboard is damaged and can only process M keys. Geek is supposed to use the keyboard to type as many natural numbers as possible starting from 1. What will be t...
How do I check if raw input is integer in Python 3?
There is a method called isdigit() in String class that returns true if all characters in the string are digits and there is at least one character, false otherwise. Even if you input a float, it'll return false. You can call it as follows: >>> x = raw_input() 12345 >>> x.isdigit() True You can also use regexes for the...
[ { "code": null, "e": 1303, "s": 1062, "text": "There is a method called isdigit() in String class that returns true if all characters in the string are digits and there is at least one character, false otherwise. Even if you input a float, it'll return false. You can call it as follows:" }, { ...
Python | sympy.euler() method - GeeksforGeeks
14 Jul, 2019 With the help of sympy.euler() method, we can find the Euler number and Euler polynomial in SymPy. Syntax: euler(n) Parameter:n – It denotes the nth Euler number. Returns: Returns the nth Euler number. Example #1: # import sympy from sympy import * n = 4print("Value of n = {}".format(n)) # Use sympy.eule...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n14 Jul, 2019" }, { "code": null, "e": 25636, "s": 25537, "text": "With the help of sympy.euler() method, we can find the Euler number and Euler polynomial in SymPy." }, { "code": null, "e": 25653, "s": 25636, ...
Multimap of pairs in C++ with Examples - GeeksforGeeks
27 Dec, 2021 What is a multimap? In C++, a multimap is an associative container that is used to store elements in a mapped fashion. Internally, a multimap is implemented as a red-black tree. Each element of a multimap is treated as a pair. The first value is referred to as key and the second value is referred to as val...
[ { "code": null, "e": 25343, "s": 25315, "text": "\n27 Dec, 2021" }, { "code": null, "e": 25363, "s": 25343, "text": "What is a multimap?" }, { "code": null, "e": 25907, "s": 25363, "text": "In C++, a multimap is an associative container that is used to store e...
Associate user to its upload (post) in Django - GeeksforGeeks
27 Feb, 2020 Django provides built-in facilities of ForeignKey, ManytoManyField for associating one model to other model. To associate a user model to a post model, one can use various options. This article revolves around how to associate a user to its post (post model). This tutorial uses the concept of foreign keys ...
[ { "code": null, "e": 25564, "s": 25536, "text": "\n27 Feb, 2020" }, { "code": null, "e": 26021, "s": 25564, "text": "Django provides built-in facilities of ForeignKey, ManytoManyField for associating one model to other model. To associate a user model to a post model, one can use...
Check whether a given number N is a Nude Number or not - GeeksforGeeks
03 Mar, 2021 Given an integer N, the task is to check whether N is a Nude number or not. A Nude number is a number that is divisible by all of its digits (which should be nonzero). Example: Input: N = 672 Output: Yes Explanation: Since, 672 is divisible by all of its three digits 6, 7 and 2. Therefore the output i...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n03 Mar, 2021" }, { "code": null, "e": 26268, "s": 26191, "text": "Given an integer N, the task is to check whether N is a Nude number or not. " }, { "code": null, "e": 26362, "s": 26268, "text": "A Nude number...
BigDecimal Class in Java - GeeksforGeeks
04 Dec, 2018 The BigDecimal class provides operations on double numbers for arithmetic, scale handling, rounding, comparison, format conversion and hashing. It can handle very large and very small floating point numbers with great precision but compensating with the time complexity a bit.A BigDecimal consists of a rand...
[ { "code": null, "e": 25689, "s": 25661, "text": "\n04 Dec, 2018" }, { "code": null, "e": 26245, "s": 25689, "text": "The BigDecimal class provides operations on double numbers for arithmetic, scale handling, rounding, comparison, format conversion and hashing. It can handle very ...
Overview of Room in Android Architecture Components - GeeksforGeeks
09 May, 2021 Room is one of the Jetpack Architecture Components in Android. This provides an abstract layer over the SQLite Database to save and perform the operations on persistent data locally. This is recommended by Google over SQLite Database although the SQLite APIs are more powerful they are fairly low-level, whi...
[ { "code": null, "e": 26405, "s": 26377, "text": "\n09 May, 2021" }, { "code": null, "e": 26853, "s": 26405, "text": "Room is one of the Jetpack Architecture Components in Android. This provides an abstract layer over the SQLite Database to save and perform the operations on persi...
batch command in Linux with Examples - GeeksforGeeks
15 May, 2019 batch command is used to read commands from standard input or a specified file and execute them when system load levels permit i.e. when the load average drops below 1.5. Syntax: batch It is important to note that batch does not accepts any parameters. Other Similar Commands: atq: Used to display the queue...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n15 May, 2019" }, { "code": null, "e": 25822, "s": 25651, "text": "batch command is used to read commands from standard input or a specified file and execute them when system load levels permit i.e. when the load average drops bel...
Generate QR code using AngularJS - GeeksforGeeks
10 Mar, 2021 In this article, we will see how to generate and display QR codes in our Angular apps. A QR code is a matrix of black and white squares that can be read by a camera or a smartphone. A QR code can store information and URLs that make it easy to read for a bot or smartphone user. In a business scenario, QR c...
[ { "code": null, "e": 26378, "s": 26350, "text": "\n10 Mar, 2021" }, { "code": null, "e": 26869, "s": 26378, "text": "In this article, we will see how to generate and display QR codes in our Angular apps. A QR code is a matrix of black and white squares that can be read by a camer...
HTTP status codes | Client Error Responses - GeeksforGeeks
19 Jul, 2020 The browser and the site server have a conversation in the form of HTTP status codes. The server gives responses to the browser’s request in the form of a three-digit code known as HTTP status codes. The categorization of HTTP status codes is done in five sections which are listed below. Informational resp...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n19 Jul, 2020" }, { "code": null, "e": 26480, "s": 26191, "text": "The browser and the site server have a conversation in the form of HTTP status codes. The server gives responses to the browser’s request in the form of a three-di...
Hashcat Tool in Kali Linux - GeeksforGeeks
25 Jan, 2021 Hashcat is famous as the fastest password cracker and password recovery utility. Hashcat is designed to break or crack even the most complex passwords in a very less amount of time. Features of hashcat: The 90+ Algorithm can be implemented with performance and optimization in mind. The number of threads ca...
[ { "code": null, "e": 25785, "s": 25757, "text": "\n25 Jan, 2021" }, { "code": null, "e": 25967, "s": 25785, "text": "Hashcat is famous as the fastest password cracker and password recovery utility. Hashcat is designed to break or crack even the most complex passwords in a very le...
Python Program to Count Words in Text File - GeeksforGeeks
15 Dec, 2021 In this article, we are going to see how to count words in Text Files using Python. First, we create a text file of which we want to count the number of words. Let this file be SampleFile.txt with the following contents: Python3 # creating variable to store the# number of wordsnumber_of_words = 0 # Opening...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n15 Dec, 2021" }, { "code": null, "e": 25647, "s": 25563, "text": "In this article, we are going to see how to count words in Text Files using Python." }, { "code": null, "e": 25784, "s": 25647, "text": "First,...
Bitwise Operations on Digits of a Number - GeeksforGeeks
14 Aug, 2021 Given a number N, the task is to perform the bitwise operations on digits of the given number N. The bitwise operations include: Finding the XOR of all digits of the given number N Finding the OR of all digits of the given number N Finding the AND of all digits of the given number N Examples: Input: N ...
[ { "code": null, "e": 25917, "s": 25889, "text": "\n14 Aug, 2021" }, { "code": null, "e": 26048, "s": 25917, "text": "Given a number N, the task is to perform the bitwise operations on digits of the given number N. The bitwise operations include: " }, { "code": null, ...
Pyspark - Split multiple array columns into rows - GeeksforGeeks
16 May, 2021 Suppose we have a DataFrame that contains columns having different types of values like string, integer, etc., and sometimes the column data is in array format also. Working with the array is sometimes difficult and to remove the difficulty we wanted to split those array data into rows. To split multiple ...
[ { "code": null, "e": 26353, "s": 26325, "text": "\n16 May, 2021" }, { "code": null, "e": 26642, "s": 26353, "text": "Suppose we have a DataFrame that contains columns having different types of values like string, integer, etc., and sometimes the column data is in array format als...
Python | Gender Identification by name using NLTK - GeeksforGeeks
20 Jan, 2022 Natural Language Toolkit (NLTK) is a platform used for building programs for text analysis. We can observe that male and female names have some distinctive characteristics. Names ending in a, e and i are likely to be female, while names ending in k, o, r, s and t are likely to be male. Let’s build a classi...
[ { "code": null, "e": 25807, "s": 25779, "text": "\n20 Jan, 2022" }, { "code": null, "e": 26162, "s": 25807, "text": "Natural Language Toolkit (NLTK) is a platform used for building programs for text analysis. We can observe that male and female names have some distinctive charact...
A Product Array Puzzle | Set 3 - GeeksforGeeks
26 Sep, 2021 Given an array arr[] consisting of N integers, the task is to construct a Product array of the same size without using division (‘/’) operator such that each array element becomes equal to the product of all the elements of arr[] except arr[i]. Examples: Input: arr[] = {10, 3, 5, 6, 2}Output: 180 600 360 3...
[ { "code": null, "e": 26521, "s": 26493, "text": "\n26 Sep, 2021" }, { "code": null, "e": 26766, "s": 26521, "text": "Given an array arr[] consisting of N integers, the task is to construct a Product array of the same size without using division (‘/’) operator such that each array...
Variables and Datatypes in JavaScript - GeeksforGeeks
26 Jul, 2021 Datatypes in JavaScript There are majorly two types of languages. First, one is Statically typed language where each variable and expression type is already known at compile time. Once a variable is declared to be of a certain data type, it cannot hold values of other data types. Example: C, C++, Java. Ja...
[ { "code": null, "e": 31327, "s": 31299, "text": "\n26 Jul, 2021" }, { "code": null, "e": 31351, "s": 31327, "text": "Datatypes in JavaScript" }, { "code": null, "e": 31608, "s": 31351, "text": "There are majorly two types of languages. First, one is Statically...
Find a peak element - GeeksforGeeks
28 Apr, 2022 Given an array of integers. Find a peak element in it. An array element is a peak if it is NOT smaller than its neighbours. For corner elements, we need to consider only one neighbour. Example: Input: array[]= {5, 10, 20, 15} Output: 20 The element 20 has neighbours 10 and 15, both of them are less than 2...
[ { "code": null, "e": 42521, "s": 42493, "text": "\n28 Apr, 2022" }, { "code": null, "e": 42707, "s": 42521, "text": "Given an array of integers. Find a peak element in it. An array element is a peak if it is NOT smaller than its neighbours. For corner elements, we need to conside...
How to get substring of a string in jQuery?
To get substring of a string in jQuery, use the substring() method. It has the following two parameters: from: The from parameter specifies the index where to start the substring. to: The to parameter is optional. It specifies the index where to stop the extraction. This is an optional parameter, which extracts the rem...
[ { "code": null, "e": 1167, "s": 1062, "text": "To get substring of a string in jQuery, use the substring() method. It has the following two parameters:" }, { "code": null, "e": 1242, "s": 1167, "text": "from: The from parameter specifies the index where to start the substring." ...
Counting No. of Parameters in Deep Learning Models by Hand | by Raimi Karim | Towards Data Science
Why do we need to count the number of parameters in a deep learning model again? We don’t. But in cases where we need to reduce the file size of the model or even reduce the time taken for model inference, knowing the number of parameters before and after model quantization would come in handy. (See video here on Effic...
[ { "code": null, "e": 538, "s": 172, "text": "Why do we need to count the number of parameters in a deep learning model again? We don’t. But in cases where we need to reduce the file size of the model or even reduce the time taken for model inference, knowing the number of parameters before and after...
C++ Program to Perform Right Rotation on a Binary Search Tree
A Binary Search Tree is a sorted binary tree in which all the nodes have following two properties − The right sub-tree of a node has a key greater than to its parent node's key. The left sub-tree of a node has a key less than or equal to its parent node's key. Each node should not have more than two children. Tree rota...
[ { "code": null, "e": 1162, "s": 1062, "text": "A Binary Search Tree is a sorted binary tree in which all the nodes have following two properties −" }, { "code": null, "e": 1240, "s": 1162, "text": "The right sub-tree of a node has a key greater than to its parent node's key." }...
SAS - IF-THEN-DELETE Statement
An IF-THEN-DELETE statement consists of a boolean expression followed by SAS THEN DELETE statement. The basic syntax for creating an if statement in SAS is − IF (condition ) THEN DELETE; If the condition evaluates to be true, then the respective observation is processed. DATA EMPDAT; INPUT EMPID ENAME $ SALARY DEPT $...
[ { "code": null, "e": 2683, "s": 2583, "text": "An IF-THEN-DELETE statement consists of a boolean expression followed by SAS THEN DELETE statement." }, { "code": null, "e": 2741, "s": 2683, "text": "The basic syntax for creating an if statement in SAS is −" }, { "code": nu...
C# - For Loop
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. The syntax of a for loop in C# is − for ( init; condition; increment ) { statement(s); } Here is the flow of control in a for loop − The init step is executed first, and only on...
[ { "code": null, "e": 2409, "s": 2270, "text": "A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times." }, { "code": null, "e": 2445, "s": 2409, "text": "The syntax of a for loop in C# is −" }, ...
How to create a CSV file manually in PowerShell?
There are few methods to create a CSV file in the PowerShell, but we will use the best easy method to create it. First, to create a CSV file in PowerShell, we need to create headers for it. But before it, we need output file name along with its path. $outfile = "C:\temp\Outfile.csv" Here we have given output file name ...
[ { "code": null, "e": 1175, "s": 1062, "text": "There are few methods to create a CSV file in the PowerShell, but we will use the best easy method\nto create it." }, { "code": null, "e": 1313, "s": 1175, "text": "First, to create a CSV file in PowerShell, we need to create headers...
Largest rectangle that can be inscribed in a semicircle - GeeksforGeeks
15 Mar, 2021 Given a semicircle of radius r, we have to find the largest rectangle that can be inscribed in the semicircle, with base lying on the diameter.Examples: Input : r = 4 Output : 16 Input : r = 5 Output :25 Let r be the radius of the semicircle, x one half of the base of the rectangle, and y the heigh...
[ { "code": null, "e": 26811, "s": 26783, "text": "\n15 Mar, 2021" }, { "code": null, "e": 26966, "s": 26811, "text": "Given a semicircle of radius r, we have to find the largest rectangle that can be inscribed in the semicircle, with base lying on the diameter.Examples: " }, ...
Analysis of Algorithms | Set 1 (Asymptotic Analysis) - GeeksforGeeks
09 Nov, 2020 Why performance analysis?There are many important things that should be taken care of, like user friendliness, modularity, security, maintainability, etc. Why to worry about performance?The answer to this is simple, we can have all the above things only if we have performance. So performance is like curren...
[ { "code": null, "e": 34515, "s": 34487, "text": "\n09 Nov, 2020" }, { "code": null, "e": 35251, "s": 34515, "text": "Why performance analysis?There are many important things that should be taken care of, like user friendliness, modularity, security, maintainability, etc. Why to w...
Camel case of a given sentence - GeeksforGeeks
09 May, 2022 Given a sentence, task is to remove spaces from the sentence and rewrite in Camel case. It is a style of writing where we don’t have spaces and all words begin with capital letters.Examples: Input : I got intern at geeksforgeeks Output : IGotInternAtGeeksforgeeks Input : Here comes the garden Output :...
[ { "code": null, "e": 25953, "s": 25925, "text": "\n09 May, 2022" }, { "code": null, "e": 26146, "s": 25953, "text": "Given a sentence, task is to remove spaces from the sentence and rewrite in Camel case. It is a style of writing where we don’t have spaces and all words begin wit...
How to fix java.lang.ClassCastException while using the TreeMap in Java? - GeeksforGeeks
01 Oct, 2021 The java.lang.ClassCastException is one of the unchecked exception in Java. It can occur in our program when we tried to convert an object of one class type into an object of another class type. When we use custom class objects as keys in the TreeMap and neither implements the comparable interface nor comp...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n01 Oct, 2021" }, { "code": null, "e": 25542, "s": 25347, "text": "The java.lang.ClassCastException is one of the unchecked exception in Java. It can occur in our program when we tried to convert an object of one class type into a...
C Program For Swapping Nodes In A Linked List Without Swapping Data - GeeksforGeeks
30 Mar, 2022 Given a linked list and two keys in it, swap nodes for two given keys. Nodes should be swapped by changing links. Swapping data of nodes may be expensive in many situations when data contains many fields. It may be assumed that all keys in the linked list are distinct. Examples: Input : 10->15->12->13->20...
[ { "code": null, "e": 25531, "s": 25503, "text": "\n30 Mar, 2022" }, { "code": null, "e": 25736, "s": 25531, "text": "Given a linked list and two keys in it, swap nodes for two given keys. Nodes should be swapped by changing links. Swapping data of nodes may be expensive in many s...
find_elements_by_xpath() driver method - Selenium Python - GeeksforGeeks
14 Apr, 2020 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. After you have installed selenium and checked out – Navigating links using get method, you might want to play more with S...
[ { "code": null, "e": 26045, "s": 26017, "text": "\n14 Apr, 2020" }, { "code": null, "e": 26542, "s": 26045, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi...
sciPy stats.zmap() function | Python - GeeksforGeeks
20 Feb, 2019 scipy.stats.zmap(scores, compare, axis=0, ddof=0) function computes the relative Z-score of the input data. The scores that are standardized to zero mean and unit variance, where mean and variance are calculated from the comparison array. Its formula: Parameters :scores : [array_like]Input array or object ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n20 Feb, 2019" }, { "code": null, "e": 25776, "s": 25537, "text": "scipy.stats.zmap(scores, compare, axis=0, ddof=0) function computes the relative Z-score of the input data. The scores that are standardized to zero mean and unit ...
Java Program to check whether two Strings are an anagram or not.
According to wiki “An anagram is word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.” To compare whether two strings are anagrams check if their lengths are equal? If so, convert these two strings into character arrays then, sort them an...
[ { "code": null, "e": 1231, "s": 1062, "text": "According to wiki “An anagram is word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.”" }, { "code": null, "e": 1497, "s": 1231, "text": "To compare wh...
Apache CXF with JAX-RS
Before proceeding ahead into this chapter, we assume that you know how to write a RESTful web service in Java. I will show you how to use CXF on top of this JAX-RS (Java API for RESTful Web Services) . We will create a web service that maintains a list of latest movies. When the user requests a movie, he specifies the ...
[ { "code": null, "e": 2325, "s": 1763, "text": "Before proceeding ahead into this chapter, we assume that you know how to write a RESTful web service in Java. I will show you how to use CXF on top of this JAX-RS (Java API for RESTful Web Services) . We will create a web service that maintains a list ...
Establish communication between sibling components in Angular 11 - GeeksforGeeks
23 Feb, 2021 In this article, we will see how we can pass data between sibling components on client machine. In Angular, we divide our web page into multiple components and the relation among these component forms a tree like structure. A component may have a parent and multiple children. That said, it can also have s...
[ { "code": null, "e": 25133, "s": 25105, "text": "\n23 Feb, 2021" }, { "code": null, "e": 25230, "s": 25133, "text": "In this article, we will see how we can pass data between sibling components on client machine. " }, { "code": null, "e": 25633, "s": 25230, "t...
Space Science with Python — Space maps | by Thomas Albin | Towards Data Science
This is the 5th part of my Python tutorial series “Space Science with Python”. All codes that are shown here are uploaded on GitHub. Enjoy! In our last tutorials we computed the position and velocity vectors of different celestial objects. We determined the apparent angular distance between objects (so called phase-ang...
[ { "code": null, "e": 311, "s": 171, "text": "This is the 5th part of my Python tutorial series “Space Science with Python”. All codes that are shown here are uploaded on GitHub. Enjoy!" }, { "code": null, "e": 605, "s": 311, "text": "In our last tutorials we computed the position...
PyQt - QDialog Class
A QDialog widget presents a top level window mostly used to collect response from the user. It can be configured to be Modal (where it blocks its parent window) or Modeless (the dialog window can be bypassed). PyQt API has a number of preconfigured Dialog widgets such as InputDialog, FileDialog, FontDialog, etc. In the...
[ { "code": null, "e": 2136, "s": 1926, "text": "A QDialog widget presents a top level window mostly used to collect response from the user. It can be configured to be Modal (where it blocks its parent window) or Modeless (the dialog window can be bypassed)." }, { "code": null, "e": 2240, ...
Remove all duplicates from a given string in Python - GeeksforGeeks
13 Apr, 2022 We are given a string and we need to remove all duplicates from it? What will be the output if the order of character matters? Examples: Input : geeksforgeeksOutput : efgkors This problem has existing solution please refer Remove all duplicates from a given string.Method 1: from collections import OrderedD...
[ { "code": null, "e": 25172, "s": 25144, "text": "\n13 Apr, 2022" }, { "code": null, "e": 25299, "s": 25172, "text": "We are given a string and we need to remove all duplicates from it? What will be the output if the order of character matters?" }, { "code": null, "e":...
Nagios - NRPE
The Nagios daemon which run checks on remote machines in NRPE (Nagios Remote Plugin Executor). It allows you to run Nagios plugins on other machines remotely. You can monitor remote machine metrics such as disk usage, CPU load etc. It can also check metrics of remote windows machines through some windows agent addons. ...
[ { "code": null, "e": 2216, "s": 1896, "text": "The Nagios daemon which run checks on remote machines in NRPE (Nagios Remote Plugin Executor). It allows you to run Nagios plugins on other machines remotely. You can monitor remote machine metrics such as disk usage, CPU load etc. It can also check met...
Python | Multiple indices Replace in String - GeeksforGeeks
22 Apr, 2020 Sometimes, while working with Python Stings, we can have a problem, in which we need to perform the replace of characters based on several indices of String. This kind of problem can have applications in many domains. Lets discuss certain ways in which this task can be performed. Method #1 : Using loop + j...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n22 Apr, 2020" }, { "code": null, "e": 26478, "s": 26197, "text": "Sometimes, while working with Python Stings, we can have a problem, in which we need to perform the replace of characters based on several indices of String. This ...
C Program Addition and Subtraction without using + - Operators
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 We can do addition and subtraction without us...
[ { "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, ...
Convex Hull | Monotone chain algorithm - GeeksforGeeks
27 Jul, 2021 Given a set of points, the task is to find the convex hull of the given points. The convex hull is the smallest convex polygon that contains all the points. Please check this article first: Convex Hull | Set 1 (Jarvis’s Algorithm or Wrapping) Examples: Input: Points[] = {{0, 3}, {2, 2}, {1, 1}, {2, 1}, {...
[ { "code": null, "e": 26467, "s": 26439, "text": "\n27 Jul, 2021" }, { "code": null, "e": 26712, "s": 26467, "text": "Given a set of points, the task is to find the convex hull of the given points. The convex hull is the smallest convex polygon that contains all the points. Please...
How to Create an Ogive Graph in Python? - GeeksforGeeks
08 Mar, 2021 In this article, we will create an Ogive Graph. An ogive graph can also be called as cumulative histograms, this graph is used to determine the number of values that lie above or below a particular value in a data set. The class interval is plotted on the x-axis whereas the cumulative frequency is plotted ...
[ { "code": null, "e": 24316, "s": 24288, "text": "\n08 Mar, 2021" }, { "code": null, "e": 24697, "s": 24316, "text": "In this article, we will create an Ogive Graph. An ogive graph can also be called as cumulative histograms, this graph is used to determine the number of values th...
Doolittle Algorithm : LU Decomposition - GeeksforGeeks
12 Jun, 2021 In numerical analysis and linear algebra, LU decomposition (where ‘LU’ stands for ‘lower upper’, and also called LU factorization) factors a matrix as the product of a lower triangular matrix and an upper triangular matrix. Computers usually solve square systems of linear equations using the LU decompositi...
[ { "code": null, "e": 30110, "s": 30082, "text": "\n12 Jun, 2021" }, { "code": null, "e": 30597, "s": 30110, "text": "In numerical analysis and linear algebra, LU decomposition (where ‘LU’ stands for ‘lower upper’, and also called LU factorization) factors a matrix as the product ...
Arithmetic Mean - GeeksforGeeks
06 Jun, 2021 Arithmetic mean, also called the average or average value, is the quantity obtained by summing two or more numbers or variables and then dividing by the number of numbers or variables. The arithmetic mean is important in statistics. For example, Let’s say there are only two quantities involved, the arithme...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n06 Jun, 2021" }, { "code": null, "e": 25071, "s": 24692, "text": "Arithmetic mean, also called the average or average value, is the quantity obtained by summing two or more numbers or variables and then dividing by the number of ...