title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Finding the path from one vertex to rest using BFS - GeeksforGeeks
06 Aug, 2021 Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph using BFS.Examples: Input: Output: 0 <- 2 1 <- 0 <- 2 2 3 <- 1 <- 0 <- 2 4 <- 5 <- 2 5 <- 2 6 <- 2 Approach: In the images shown below: que[] array stores the vertices r...
[ { "code": null, "e": 25052, "s": 25024, "text": "\n06 Aug, 2021" }, { "code": null, "e": 25208, "s": 25052, "text": "Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph using BFS.Examples: " }, ...
Tryit Editor v3.7
CSS Grid Intro Tryit: Grid elements
[ { "code": null, "e": 24, "s": 9, "text": "CSS Grid Intro" } ]
How to create dynamic values and objects in JavaScript ?
23 Feb, 2021 In JavaScript, you can choose dynamic values or variable names and object names and choose to edit the variable name in the future without accessing the array. To do, so you can create a variable and assign it a particular value. Then while in the array, when you are declaring the variable use square brack...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2021" }, { "code": null, "e": 188, "s": 28, "text": "In JavaScript, you can choose dynamic values or variable names and object names and choose to edit the variable name in the future without accessing the array." }, { "...
Part of Speech Tagging with Stop words using NLTK in python
11 Apr, 2022 The Natural Language Toolkit (NLTK) is a platform used for building programs for text analysis. One of the more powerful aspects of the NLTK module is the Part of Speech tagging.In order to run the below python program you must have to install NLTK. Please follow the installation steps. Open your termina...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Apr, 2022" }, { "code": null, "e": 342, "s": 52, "text": "The Natural Language Toolkit (NLTK) is a platform used for building programs for text analysis. One of the more powerful aspects of the NLTK module is the Part of Speech tagg...
How to compare values in two Pandas Dataframes?
12 Jan, 2022 Let’s discuss how to compare values in the Pandas dataframe. Here are the steps for comparing values in two pandas Dataframes: Step 1 Dataframe Creation: The dataframes for the two datasets can be created using the following code: Python3 import pandas as pd # elements of first datasetfirst_Set = {'Prod_1...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Jan, 2022" }, { "code": null, "e": 155, "s": 28, "text": "Let’s discuss how to compare values in the Pandas dataframe. Here are the steps for comparing values in two pandas Dataframes:" }, { "code": null, "e": 260, "s...
Cristian's Algorithm - GeeksforGeeks
10 Nov, 2021 Cristian’s Algorithm is a clock synchronization algorithm is used to synchronize time with a time server by client processes. This algorithm works well with low-latency networks where Round Trip Time is short as compared to accuracy while redundancy-prone distributed systems/applications do not go hand in ...
[ { "code": null, "e": 24057, "s": 24029, "text": "\n10 Nov, 2021" }, { "code": null, "e": 24586, "s": 24057, "text": "Cristian’s Algorithm is a clock synchronization algorithm is used to synchronize time with a time server by client processes. This algorithm works well with low-la...
How to step up your Folium Choropleth Map skills | by Navid Mashinchi | Towards Data Science
The purpose of this tutorial is to take your Foilium skills to the next level. In this article, we will create a more advanced Choroplet map than usual. We will add customized functionalities to add a draggable legend, hover functionalities, and cross-hatching (crossing lines). If you would like to learn those skills, ...
[ { "code": null, "e": 966, "s": 172, "text": "The purpose of this tutorial is to take your Foilium skills to the next level. In this article, we will create a more advanced Choroplet map than usual. We will add customized functionalities to add a draggable legend, hover functionalities, and cross-hat...
Clojure - Strings
A String literal is constructed in Clojure by enclosing the string text in quotations. Strings in Clojure need to be constructed using the double quotation marks such as “Hello World”. Following is an example of the usage of strings in Clojure. (ns clojure.examples.hello (:gen-class)) (defn hello-world [] (printl...
[ { "code": null, "e": 2559, "s": 2374, "text": "A String literal is constructed in Clojure by enclosing the string text in quotations. Strings in Clojure need to be constructed using the double quotation marks such as “Hello World”." }, { "code": null, "e": 2619, "s": 2559, "text"...
How to play background music in Android app?
This example demonstrates how do I play background music in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmln...
[ { "code": null, "e": 1131, "s": 1062, "text": "This example demonstrates how do I play background music in android." }, { "code": null, "e": 1260, "s": 1131, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create...
ReactJS - Building & Deployment
Let us learn how to do production build and deployment of React application in this chapter. Once a React application development is done, application needs to be bundled and deployed to a production server. Let us learn the command available to build and deploy the application in this chapter. A single command is enou...
[ { "code": null, "e": 2126, "s": 2033, "text": "Let us learn how to do production build and deployment of React application in this chapter." }, { "code": null, "e": 2329, "s": 2126, "text": "Once a React application development is done, application needs to be bundled and deploye...
How to find the action attribute and method of a form in JavaScript?
Action attribute and method are not inbuilt in a form, they have to be specified in a form externally. Javascript has provided document.action and document.method methods to get the action attribute and method of a form respectively. Let's discuss them individually. In the following example, the action attribute of the...
[ { "code": null, "e": 1329, "s": 1062, "text": "Action attribute and method are not inbuilt in a form, they have to be specified in a form externally. Javascript has provided document.action and document.method methods to get the action attribute and method of a form respectively. Let's discuss them ...
Java Examples - Read a file
How to read a file ? This example shows how to read a file using readLine method of BufferedReader class. import java.io.*; public class Main { public static void main(String[] args) { try { BufferedReader in = new BufferedReader(new FileReader("c:\\filename")); String str; ...
[ { "code": null, "e": 2089, "s": 2068, "text": "How to read a file ?" }, { "code": null, "e": 2175, "s": 2089, "text": "This example shows how to read a file using readLine method of BufferedReader class. " }, { "code": null, "e": 2561, "s": 2175, "text": "impo...
Understand Data Normalization in Machine Learning | by Zixuan Zhang | Towards Data Science
If you’re new to data science/machine learning, you probably wondered a lot about the nature and effect of the buzzword ‘feature normalization’. If you’ve read any Kaggle kernels, it is very likely that you found feature normalization in the data preprocessing section. So, what is data normalization and why the heck is...
[ { "code": null, "e": 404, "s": 47, "text": "If you’re new to data science/machine learning, you probably wondered a lot about the nature and effect of the buzzword ‘feature normalization’. If you’ve read any Kaggle kernels, it is very likely that you found feature normalization in the data preproces...
JasperReports - Crosstabs
Crosstab (cross-tabulation) reports are the reports containing tables that arrange data across rows and columns in a tabular form. Crosstab object is used for inserting a crosstab report within the main report. Crosstabs can be used with any level of data (nominal, ordinal, interval, or ratio), and usually display the...
[ { "code": null, "e": 2742, "s": 2254, "text": "Crosstab (cross-tabulation) reports are the reports containing tables that arrange data across rows and columns in a tabular form. Crosstab object is used for inserting a crosstab report within the main report. Crosstabs can be used with any level of d...
Analyzing Video Games Data in R. Being a gamer myself, I had a lot of... | by Hamza Rafiq | Towards Data Science
Being a gamer myself, I had a lot of fun analyzing this dataset. Actually, this dataset was made from merging two different datasets: Tidytuesday and Kaggle. Reason for using two datasets is because the Tidytuesday dataset didn't have enough information for an interesting analysis. That is why I merged the two to get m...
[ { "code": null, "e": 642, "s": 171, "text": "Being a gamer myself, I had a lot of fun analyzing this dataset. Actually, this dataset was made from merging two different datasets: Tidytuesday and Kaggle. Reason for using two datasets is because the Tidytuesday dataset didn't have enough information f...
Create a Pandas DataFrame from Lists - GeeksforGeeks
02 Jun, 2021 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Creating Pandas Dataframe can be achieved in multiple ways. Let’s see how can we create a Pan...
[ { "code": null, "e": 24827, "s": 24799, "text": "\n02 Jun, 2021" }, { "code": null, "e": 25041, "s": 24827, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a...
How to create a Dice Rolling App using ReactJS ? - GeeksforGeeks
22 Apr, 2022 Suppose there are two dice and a button to roll the dices. As we click the button both dices shake and generate a new number that shows on the upper face of the dice (in dotted form as a standard dice). The numbers shown on the upper face generates randomly each time we roll the dice. There are two compone...
[ { "code": null, "e": 26775, "s": 26747, "text": "\n22 Apr, 2022" }, { "code": null, "e": 27061, "s": 26775, "text": "Suppose there are two dice and a button to roll the dices. As we click the button both dices shake and generate a new number that shows on the upper face of the di...
How to use the Reverse() method of array class in C#
The Reverse() method in array class reverses the sequence of the elements in the entire one-dimensional Array. To reverse an array, just use the Array.Reverse() method − Array.Reverse(temp); Within the reverse method, set the elements like the following code snippet. int[] list = { 29, 15, 30, 98}; int[] temp = list; Y...
[ { "code": null, "e": 1173, "s": 1062, "text": "The Reverse() method in array class reverses the sequence of the elements in the entire one-dimensional Array." }, { "code": null, "e": 1232, "s": 1173, "text": "To reverse an array, just use the Array.Reverse() method −" }, { ...
Exploratory Data Analysis using Pandas | by Mamtha | Towards Data Science
In this article we will focus on ‘Brazil’s Amazon Forest Fires Dataset’ and perform some basic analysis using Pandas library and visualise data using Matplotlib and Seaborn libraries. Pandas is a most powerful tool of Python that allows us to do anything and everything with datasets such as — analysing the data, organi...
[ { "code": null, "e": 356, "s": 172, "text": "In this article we will focus on ‘Brazil’s Amazon Forest Fires Dataset’ and perform some basic analysis using Pandas library and visualise data using Matplotlib and Seaborn libraries." }, { "code": null, "e": 601, "s": 356, "text": "Pa...
JavaScript Sleep() function?
With the help of Sleep() we can make a function to pause execution for a fixed amount of time. In programming languages such as C and Php we would call sleep(sec). Java has thread.sleep(), python has time.sleep() and GO has time.Sleep(2 * time.Second). javascript doesn't have these kinds of sleep functions. But we shou...
[ { "code": null, "e": 1315, "s": 1062, "text": "With the help of Sleep() we can make a function to pause execution for a fixed amount of time. In programming languages such as C and\nPhp we would call sleep(sec). Java has thread.sleep(), python has time.sleep() and GO has time.Sleep(2 * time.Second)....
Java Program to convert java.util.Date to LocalDate
At first set the date with java.util.Date − java.util.Date date = new Date(); Now, convert the date to LocalDate − Instant instant = Instant.ofEpochMilli(date.getTime()); System.out.println("LocalDate = "+LocalDateTime.ofInstant(instant, ZoneId.systemDefault()).toLocalDate()); Live Demo import java.time.Instant; impor...
[ { "code": null, "e": 1106, "s": 1062, "text": "At first set the date with java.util.Date −" }, { "code": null, "e": 1140, "s": 1106, "text": "java.util.Date date = new Date();" }, { "code": null, "e": 1177, "s": 1140, "text": "Now, convert the date to LocalDat...
Yii - Error Handling
Yii includes a built-in error handler. The Yii error handler does the following − Converts all non-fatal PHP errors into catchable exceptions. Displays all errors and exceptions with a detailed call stack. Supports different error formats. Supports using a controller action to display errors. To disable the error handl...
[ { "code": null, "e": 2915, "s": 2833, "text": "Yii includes a built-in error handler. The Yii error handler does the following −" }, { "code": null, "e": 2976, "s": 2915, "text": "Converts all non-fatal PHP errors into catchable exceptions." }, { "code": null, "e": 30...
How to compare two dates in String format in Java?
The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string. One of the constructors of this class accepts a String value representing the desired date format and creates SimpleDateFormat object. To parse/convert a string as a Date object Instantiate this class by passing desir...
[ { "code": null, "e": 1164, "s": 1062, "text": "The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string." }, { "code": null, "e": 1300, "s": 1164, "text": "One of the constructors of this class accepts a String value representing the de...
Java Program to adjust LocalDate to last Day of Month with TemporalAdjusters class
Let us first set a date: LocalDate localDate = LocalDate.of(2019, Month.JUNE, 15) Now, adjust LocalDate to last Day of month; LocalDate day = localDate.with(TemporalAdjusters.lastDayOfMonth()); import java.time.LocalDate; import java.time.Month; import java.time.temporal.TemporalAdjusters; public class Demo { public...
[ { "code": null, "e": 1087, "s": 1062, "text": "Let us first set a date:" }, { "code": null, "e": 1144, "s": 1087, "text": "LocalDate localDate = LocalDate.of(2019, Month.JUNE, 15)" }, { "code": null, "e": 1188, "s": 1144, "text": "Now, adjust LocalDate to last...
How to center a JLabel in a JPanel with GridBagLayout in Java?
Center a component in a JPanel with GridBagLayout. Let us first create a JFrame and JPanel inside it - JFrame frame = new JFrame("Demo Frame"); JPanel panel = new JPanel(); Now, we will add our components − JLabel label = new JLabel("Demo Label (Centered)"); label.setForeground(Color.white); JCheckBox checkBox = new JC...
[ { "code": null, "e": 1165, "s": 1062, "text": "Center a component in a JPanel with GridBagLayout. Let us first create a JFrame and JPanel inside it -" }, { "code": null, "e": 1235, "s": 1165, "text": "JFrame frame = new JFrame(\"Demo Frame\");\nJPanel panel = new JPanel();" }, ...
Plot Arrows Between Points in a Graph in R Programming - arrows() Function - GeeksforGeeks
25 Jun, 2020 arrows() function in R Language is used to create arrows between the points on the graph specified. Syntax: arrows(x0, y0, x1, y1, length) Parameters:x0: represents x-coordinate of point from which to draw the arrowy0: represents y-coordinate of point from which to draw the arrowx1: represents x-coordinate...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n25 Jun, 2020" }, { "code": null, "e": 24951, "s": 24851, "text": "arrows() function in R Language is used to create arrows between the points on the graph specified." }, { "code": null, "e": 24990, "s": 24951, ...
How to validate if input in input field has integer number only using express-validator ?
08 Apr, 2022 In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only integer numbers are allowed i.e. there not allowed any s...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2022" }, { "code": null, "e": 509, "s": 28, "text": "In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer in...
Print system time in C++ (3 different ways)
10 Dec, 2018 First MethodPrinting current date and time using time() Second Method // CPP program to print current date and time// using time and ctime.#include <stdio.h>#include <stdlib.h>#include <time.h> int main(){ // declaring argument of time() time_t my_time = time(NULL); // ctime() used to give the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Dec, 2018" }, { "code": null, "e": 108, "s": 52, "text": "First MethodPrinting current date and time using time()" }, { "code": null, "e": 122, "s": 108, "text": "Second Method" }, { "code": "// CPP progr...
Life Cycle of Java Applet
17 Dec, 2021 An applet is a Java program that can be embedded into a web page. It runs inside the web browser and works on the client-side. An applet is embedded in an HTML page using the APPLET or OBJECT tag and hosted on a web server. The entire life cycle of an applet is managed by the Applet Container. All applets ...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Dec, 2021" }, { "code": null, "e": 533, "s": 52, "text": "An applet is a Java program that can be embedded into a web page. It runs inside the web browser and works on the client-side. An applet is embedded in an HTML page using the...
Stream count() method in Java with examples
06 Dec, 2018 long count() returns the count of elements in the stream. This is a special case of a reduction (A reduction operation takes a sequence of input elements and combines them into a single summary result by repeated application of a combining operation). This is a terminal operation i.e, it may traverse the s...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Dec, 2018" }, { "code": null, "e": 519, "s": 54, "text": "long count() returns the count of elements in the stream. This is a special case of a reduction (A reduction operation takes a sequence of input elements and combines them in...
numpy.mod() in Python
10 Feb, 2019 numpy.mod() is another function for doing mathematical operations in numpy.It returns element-wise remainder of division between two array arr1 and arr2 i.e. arr1 % arr2 .It returns 0 when arr2 is 0 and both arr1 and arr2 are (arrays of) integers. Syntax : numpy.mod(arr1, arr2, /, out=None, *, where=True, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2019" }, { "code": null, "e": 276, "s": 28, "text": "numpy.mod() is another function for doing mathematical operations in numpy.It returns element-wise remainder of division between two array arr1 and arr2 i.e. arr1 % arr2 .It r...
TABBY Hack The Box Walkthrough for Root Flag
25 Aug, 2020 This is a root flag Walkthrough or Solution for the machine TABBY on Hack The Box. This machine is a Linux based machine in which we have to own root and user both. Its difficulty level is easy and has an IP 10.10.10.194 for me and it could depend on your account. The link for the machine is https://www.ha...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2020" }, { "code": null, "e": 293, "s": 28, "text": "This is a root flag Walkthrough or Solution for the machine TABBY on Hack The Box. This machine is a Linux based machine in which we have to own root and user both. Its diffic...
Convert a String to Character Array in Java
13 May, 2022 Here we are converting a string into a primitive datatype. It is recommended to have good knowledge of Wrapper classes and concepts like autoboxing and unboxing as in java they are frequently used in converting data types. Illustrations: Input : Hello World Output : [H, e, l, l, o,, W, o, r, l, d] Input...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 May, 2022" }, { "code": null, "e": 275, "s": 52, "text": "Here we are converting a string into a primitive datatype. It is recommended to have good knowledge of Wrapper classes and concepts like autoboxing and unboxing as in java th...
When do we use Initializer List in C++?
19 Apr, 2022 Initializer List is used in initializing the data members of a class. The list of members to be initialized is indicated with constructor as a comma-separated list followed by a colon. Following is an example that uses the initializer list to initialize x and y of Point class. C++ #include<iostream>using n...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Apr, 2022" }, { "code": null, "e": 332, "s": 54, "text": "Initializer List is used in initializing the data members of a class. The list of members to be initialized is indicated with constructor as a comma-separated list followed b...
Speech Recognition in Real-Time using Python | by Behic Guven | Towards Data Science
In this post, I will show you how to convert your speech to text in real-time using Python. We will write a program that understands what we are saying and translates it into written words. This translation is known as speech recognition. Speech Recognition is a pretty exciting and fun field to get started with Machine...
[ { "code": null, "e": 406, "s": 47, "text": "In this post, I will show you how to convert your speech to text in real-time using Python. We will write a program that understands what we are saying and translates it into written words. This translation is known as speech recognition. Speech Recognitio...
Changed SAP password not working while resetting using BAPI
You are using the structure Password for resetting the password. It is of type “BAPIPWD” and comprises of a field which is again named as “BAPIPWD” When you need to reset the password, you need to specify the correct field name instead of password. JCO.Structure structPassword = userChangeInput.getStructure("PASSWORD")...
[ { "code": null, "e": 1210, "s": 1062, "text": "You are using the structure Password for resetting the password. It is of type “BAPIPWD” and comprises of a field which is again named as “BAPIPWD”" }, { "code": null, "e": 1311, "s": 1210, "text": "When you need to reset the passwor...
Create n-child process from same parent process using fork() in C - GeeksforGeeks
03 Nov, 2017 fork() is a system call function which can generate child process from parent main process. Using some conditions we can generate as many child process as needed. We have given n , we have to create n-child processes from same parent process (main process ). Examples: Input :3 Output :[son] pid 25332 from ...
[ { "code": null, "e": 24131, "s": 24103, "text": "\n03 Nov, 2017" }, { "code": null, "e": 24294, "s": 24131, "text": "fork() is a system call function which can generate child process from parent main process. Using some conditions we can generate as many child process as needed."...
Haskell - Quick Guide
Haskell is a Functional Programming Language that has been specially designed to handle symbolic computation and list processing applications. Functional programming is based on mathematical functions. Besides Haskell, some of the other popular languages that follow Functional Programming paradigm include: Lisp, Python...
[ { "code": null, "e": 2271, "s": 1915, "text": "Haskell is a Functional Programming Language that has been specially designed to handle symbolic computation and list processing applications. Functional programming is based on mathematical functions. Besides Haskell, some of the other popular language...
numpy.matmul()
The numpy.matmul() function returns the matrix product of two arrays. While it returns a normal product for 2-D arrays, if dimensions of either argument is >2, it is treated as a stack of matrices residing in the last two indexes and is broadcast accordingly. On the other hand, if either argument is 1-D array, it is pr...
[ { "code": null, "e": 2503, "s": 2243, "text": "The numpy.matmul() function returns the matrix product of two arrays. While it returns a normal product for 2-D arrays, if dimensions of either argument is >2, it is treated as a stack of matrices residing in the last two indexes and is broadcast accord...
How to add a Time picker in Form using HTML5 ? - GeeksforGeeks
25 Oct, 2021 As we know that a Time picker is used to provide tp select single value from a pre-determined set. Basically, it creates an input field that accepts a time. We can open a time picker by clicking on a clock icon. The UI Design of the Time picker is different from browser to browsers. Follow the below approa...
[ { "code": null, "e": 24503, "s": 24475, "text": "\n25 Oct, 2021" }, { "code": null, "e": 24787, "s": 24503, "text": "As we know that a Time picker is used to provide tp select single value from a pre-determined set. Basically, it creates an input field that accepts a time. We can...
Can constructors be marked final, abstract or static in Java?
Except public, protected and, private constructor does not allow any other modifier. When you use a final keyword with a method or constructor it cannot be overridden. But, a constructor in Java cannot be overridden therefore, there is no need of using the final keyword with the constructor. When you use a final keywor...
[ { "code": null, "e": 1147, "s": 1062, "text": "Except public, protected and, private constructor does not allow any other modifier." }, { "code": null, "e": 1355, "s": 1147, "text": "When you use a final keyword with a method or constructor it cannot be overridden. But, a constru...
Tryit Editor v3.7
RWD Media Queries Tryit: Using media queries
[ { "code": null, "e": 27, "s": 9, "text": "RWD Media Queries" } ]
C# Program to remove whitespaces in a string
Let’s say the following is the string − StringBuilder str = new StringBuilder("Patience is key!"); To remove whitespace, you can use the replace method. str.Replace(" ", ""); Let us see the complete code. Live Demo using System; using System.Text; class Demo { static void Main() { // Initial String Stri...
[ { "code": null, "e": 1102, "s": 1062, "text": "Let’s say the following is the string −" }, { "code": null, "e": 1161, "s": 1102, "text": "StringBuilder str = new StringBuilder(\"Patience is key!\");" }, { "code": null, "e": 1215, "s": 1161, "text": "To remove ...
How to create a password field using JavaFX?
The text field accepts and displays the text. In the latest versions of JavaFX, it accepts only a single line. In JavaFX the javafx.scene.control.TextField class represents the text field, this class inherits the javafx.scene.control.TextInputControl (base class of all the text controls) class. Using this you can accep...
[ { "code": null, "e": 1437, "s": 1062, "text": "The text field accepts and displays the text. In the latest versions of JavaFX, it accepts only a single line. In JavaFX the javafx.scene.control.TextField class represents the text field, this class inherits the javafx.scene.control.TextInputControl (b...
A Comprehensive Introduction to Bayesian Deep Learning | by Joris Baan | Towards Data Science
Table of Contents1. Preamble2. Neural Network Generalization3. Back to Basics: The Bayesian Approach 3.1 Frequentists 3.2 Bayesianists 3.3 Bayesian Inference and Marginalization4. How to Use a Posterior in Practice? 4.1 Maximum A Posteriori Estimation 4.2 Full Predictive Distribution 4.3 Approximate P...
[ { "code": null, "e": 797, "s": 171, "text": "Table of Contents1. Preamble2. Neural Network Generalization3. Back to Basics: The Bayesian Approach 3.1 Frequentists 3.2 Bayesianists 3.3 Bayesian Inference and Marginalization4. How to Use a Posterior in Practice? 4.1 Maximum A Posteriori Es...
Most Common Loss Functions in Machine Learning | by Sparsh Gupta | Towards Data Science
In mathematical optimization and decision theory, a loss function or cost function is a function that maps an event or values of one or more variables onto a real number intuitively representing some “cost” associated with the event. — Wikipedia As a core element, the Loss function is a method of evaluating your Machin...
[ { "code": null, "e": 418, "s": 172, "text": "In mathematical optimization and decision theory, a loss function or cost function is a function that maps an event or values of one or more variables onto a real number intuitively representing some “cost” associated with the event. — Wikipedia" }, {...
How to calculate natural log of a number in Python?
In the math module, two functions for calculation of logarithmic value are defined. The log() function returns natural logarithm of a number, whereas log10() calculates the standard loarithm i.e. to the base 10 The log() function takes two arguments, the number and base import math print ("math.log(100.12) : ", math.lo...
[ { "code": null, "e": 1273, "s": 1062, "text": "In the math module, two functions for calculation of logarithmic value are defined. The log() function returns natural logarithm of a number, whereas log10() calculates the standard loarithm i.e. to the base 10" }, { "code": null, "e": 1333,...
numpy.percentile() in python - GeeksforGeeks
01 Sep, 2020 numpy.percentile()function used to compute the nth percentile of the given data (array elements) along the specified axis. Syntax : numpy.percentile(arr, n, axis=None, out=None) Parameters : arr :input array. n : percentile value. axis : axis along which we want to calculate the percentile value. Otherwi...
[ { "code": null, "e": 23823, "s": 23795, "text": "\n01 Sep, 2020" }, { "code": null, "e": 23948, "s": 23823, "text": "numpy.percentile()function used to compute the nth percentile of the given data (array elements) along the specified axis. " }, { "code": null, "e": 2...
Garbage Collection in Python - GeeksforGeeks
24 Aug, 2021 Python’s memory allocation and deallocation method is automatic. The user does not have to preallocate or deallocate memory similar to using dynamic memory allocation in languages such as C or C++. Python uses two strategies for memory allocation: Reference counting Garbage collection Prior to Python vers...
[ { "code": null, "e": 24316, "s": 24288, "text": "\n24 Aug, 2021" }, { "code": null, "e": 24565, "s": 24316, "text": "Python’s memory allocation and deallocation method is automatic. The user does not have to preallocate or deallocate memory similar to using dynamic memory allocat...
Find the number of distinct islands in a 2D matrix in Python
Suppose we have a binary matrix. We have to count the number of islands in it. An island is place that is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. We can assume that all four edges of the grid are all surrounded by water. Suppose the grid is like − There are three islan...
[ { "code": null, "e": 1334, "s": 1062, "text": "Suppose we have a binary matrix. We have to count the number of islands in it. An island is place that is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. We can assume that all four edges of the grid are all su...
VBA - Date Function
The Function returns the current system date. date() Add a button and add the following function. Private Sub Constant_demo_Click() Dim a as Variant a = date() msgbox "The Value of a : " & a End Sub When you execute the function, it produces the following output. The Value of a : 19/07/2014 101 Lecture...
[ { "code": null, "e": 1981, "s": 1935, "text": "The Function returns the current system date." }, { "code": null, "e": 1989, "s": 1981, "text": "date()\n" }, { "code": null, "e": 2034, "s": 1989, "text": "Add a button and add the following function." }, { ...
How to create a smooth scrolling effect with CSS?
To create a smooth scrolling effect with CSS, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <style> html { scroll-behavior: smooth; } * { box-sizing: border-box; } body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; margin: 0px; padding: ...
[ { "code": null, "e": 1133, "s": 1062, "text": "To create a smooth scrolling effect with CSS, the code is as follows −" }, { "code": null, "e": 1144, "s": 1133, "text": " Live Demo" }, { "code": null, "e": 2145, "s": 1144, "text": "<!DOCTYPE html>\n<html>\n<hea...
Tryit Editor v3.7
Tryit: class on span elements
[]
Creating an associative array in JavaScript?
You can create an associative array in JavaScript using an array of objects with key and value pair. Associative arrays are basically objects in JavaScript where indexes are replaced by user defined keys. var customerDetails= [ { "customerId":"customer-1", "customerName":"David", "customerCountryNa...
[ { "code": null, "e": 1163, "s": 1062, "text": "You can create an associative array in JavaScript using an array of objects with key and value pair." }, { "code": null, "e": 1267, "s": 1163, "text": "Associative arrays are basically objects in JavaScript where indexes are replaced...
How to Make XGBoost 200x Faster | Towards Data Science
As Data Scientists, we like to run many time-intensive experiments. Reducing the training speed of our models means that we can conduct more experiments in the same amount of time. Moreover, we can also leverage this speed by creating bigger model ensembles, ultimately resulting in higher accuracy. Chen and Guestrin (f...
[ { "code": null, "e": 472, "s": 172, "text": "As Data Scientists, we like to run many time-intensive experiments. Reducing the training speed of our models means that we can conduct more experiments in the same amount of time. Moreover, we can also leverage this speed by creating bigger model ensembl...
C++ Program to Multiply Two Matrix Using Multi-dimensional Arrays
A matrix is a rectangular array of numbers that is arranged in the form of rows and columns. An example of a matrix is as follows. A 3*3 matrix has 3 rows and 3 columns as shown below − 8 6 3 7 1 9 5 1 9 A program that multiplies two matrices using multidimensional arrays is as follows. Live Demo #include<iostream> us...
[ { "code": null, "e": 1155, "s": 1062, "text": "A matrix is a rectangular array of numbers that is arranged in the form of rows and columns." }, { "code": null, "e": 1193, "s": 1155, "text": "An example of a matrix is as follows." }, { "code": null, "e": 1248, "s":...
How to use Link Component in ReactJS? - GeeksforGeeks
08 Feb, 2021 The Link component allows you to easily customize anchor elements with our own theme colors and typography styles. Material UI for React has this component available for us and it is very easy to integrate. We can use Link Component in ReactJS using the following approach: Creating React Application And In...
[ { "code": null, "e": 24945, "s": 24917, "text": "\n08 Feb, 2021" }, { "code": null, "e": 25219, "s": 24945, "text": "The Link component allows you to easily customize anchor elements with our own theme colors and typography styles. Material UI for React has this component availab...
WebAssembly - Text Format
WebAssembly has the code in a binary format called WASM. You can also get the text format in WebAssembly and it is called WAT (WebAssembly Text format). As a developer you are not supposed to write code in WebAssembly, instead, you have to compile high-level languages like C, C++ and Rust to WebAssembly. Let us write W...
[ { "code": null, "e": 2539, "s": 2233, "text": "WebAssembly has the code in a binary format called WASM. You can also get the text format in WebAssembly and it is called WAT (WebAssembly Text format). As a developer you are not supposed to write code in WebAssembly, instead, you have to compile high-...
Authentication Using Fingerprint in Android - GeeksforGeeks
20 Dec, 2021 Fingerprint authentication came with Android 6.0 (Marshmallow), with the newly released APIs allowing users to authenticate their smartphones with fingerprint sensors. In order to authenticate users using fingerprint sensors we need the instance of FingerprintManager class and call the authenticate() metho...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n20 Dec, 2021" }, { "code": null, "e": 25112, "s": 24725, "text": "Fingerprint authentication came with Android 6.0 (Marshmallow), with the newly released APIs allowing users to authenticate their smartphones with fingerprint sens...
Check valid date format in JavaScript?
To check for valid date format, match the date with − const dateFormat = /^\d{4}\-\d{2}\-\d{2}$/; Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initialscale=1.0"> <title>Document</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12...
[ { "code": null, "e": 1116, "s": 1062, "text": "To check for valid date format, match the date with −" }, { "code": null, "e": 1160, "s": 1116, "text": "const dateFormat = /^\\d{4}\\-\\d{2}\\-\\d{2}$/;" }, { "code": null, "e": 1171, "s": 1160, "text": " Live De...
HTML - <a> Tag
The HTML <a> tag is used for creating a hyperlink to either another document, or somewhere within the current document. <!DOCTYPE html> <html> <head> <title>HTML a Tag</title> </head> <body> <p>This is a link to <a href = "http://www.amrood.com">AMROOD.com</a></p> </body> </html> This will p...
[ { "code": null, "e": 2494, "s": 2374, "text": "The HTML <a> tag is used for creating a hyperlink to either another document, or somewhere within the current document." }, { "code": null, "e": 2683, "s": 2494, "text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML a Tag<...
Demand Forecasting: Boston Crime Data | by Alptekin Uzel | Towards Data Science
A model that can predict how likely a violent crime may happen on a certain day and at a specific location. Demand forecasting is a hot topic and a never ending goal in retail, supply-chain management and logistics. Decision makers need to optimize their resources based on the predicted demand, so it is directly linked...
[ { "code": null, "e": 279, "s": 171, "text": "A model that can predict how likely a violent crime may happen on a certain day and at a specific location." }, { "code": null, "e": 528, "s": 279, "text": "Demand forecasting is a hot topic and a never ending goal in retail, supply-ch...
Sentiment Analysis using LSTM Step by Step Tutorial | Deep Learning | Towards Data Science
I think this result from google dictionary gives a very succinct definition. I don’t have to re-emphasize how important sentiment analysis has become. So, here we will build a classifier on IMDB movie dataset using a Deep Learning technique called RNN. I’m outlining a step-by-step process for how Recurrent Neural Netwo...
[ { "code": null, "e": 425, "s": 172, "text": "I think this result from google dictionary gives a very succinct definition. I don’t have to re-emphasize how important sentiment analysis has become. So, here we will build a classifier on IMDB movie dataset using a Deep Learning technique called RNN." ...
Counting frequencies of array elements in C++
We are given an array of integer elements which contains duplicate values and the task is to calculate the frequencies of the distinct elements present in an array and print the result. Input − int arr[] = {1, 1, 2, 3, 4, 1, 2, 3} Output − frequency of 1 is: 3 frequency of 2 is: 2 frequency of 3 is: 2 Frequency of 4 is...
[ { "code": null, "e": 1248, "s": 1062, "text": "We are given an array of integer elements which contains duplicate values and the task is to calculate the frequencies of the distinct elements present in an array and print the result." }, { "code": null, "e": 1293, "s": 1248, "text...
What is the data type for unix_timestamp in MySQL?
The best data type for unix_timestamp in MySQL is integer. The integer data type is as follows int(11); The integer data type is useful for condition checking like ( > ,<= ) and indexing. The return type of unix_timestamp is an integer. However, let us see what we get as UNIX Timestamp, when we convert datetime to time...
[ { "code": null, "e": 1157, "s": 1062, "text": "The best data type for unix_timestamp in MySQL is integer. The integer data type is as follows" }, { "code": null, "e": 1166, "s": 1157, "text": "int(11);" }, { "code": null, "e": 1299, "s": 1166, "text": "The int...
Sort Characters By Frequency in C++
Suppose we have a string, we have to sort the characters based on the frequency. So if the string is like “abbbacbcc”, then the output will be “bbbbcccaa” To solve this, we will follow these steps − create an array of pairs called v, create one map m for all characters in string,increase value of m[character] by 1 incr...
[ { "code": null, "e": 1217, "s": 1062, "text": "Suppose we have a string, we have to sort the characters based on the frequency. So if the string is like “abbbacbcc”, then the output will be “bbbbcccaa”" }, { "code": null, "e": 1261, "s": 1217, "text": "To solve this, we will foll...
jQuery - removeAttr( name ) Method
The removeAttr( name ) method removes an attribute from each of the matched elements. Here is the simple syntax to use this method selector.removeAttr( name ) Here is the description of all the parameters used by this method − name − The name of the property to be removed. name − The name of the property to be removed...
[ { "code": null, "e": 2408, "s": 2322, "text": "The removeAttr( name ) method removes an attribute from each of the matched elements." }, { "code": null, "e": 2453, "s": 2408, "text": "Here is the simple syntax to use this method" }, { "code": null, "e": 2482, "s":...
Why can't variables be declared in a switch statement in C/C++?
Variables can be declared in a switch statement. You'll just need to declare them and use them within a new scope in the switch statement. For example, #include<iostream> using namespace std; int main() { int i = 10; switch(i) { case 2: //some code break; case 10:{ int x = 13; ...
[ { "code": null, "e": 1214, "s": 1062, "text": "Variables can be declared in a switch statement. You'll just need to declare them and use them within a new scope in the switch statement. For example," }, { "code": null, "e": 1428, "s": 1214, "text": "#include<iostream>\nusing name...
Display the collapsible content by default with Bootstrap
Use the ‘collapse in’ class in Bootstrap to show collapsible content by default − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/boots...
[ { "code": null, "e": 1144, "s": 1062, "text": "Use the ‘collapse in’ class in Bootstrap to show collapsible content by default −" }, { "code": null, "e": 1154, "s": 1144, "text": "Live Demo" }, { "code": null, "e": 1753, "s": 1154, "text": "<!DOCTYPE html>\n<h...
Pascal - Memory Management
This chapter explains dynamic memory management in Pascal. Pascal programming language provides several functions for memory allocation and management. While doing programming, if you are aware about the size of an array, then it is easy and you can define it as an array. For example, to store a name of any person, it ...
[ { "code": null, "e": 2235, "s": 2083, "text": "This chapter explains dynamic memory management in Pascal. Pascal programming language provides several functions for memory allocation and management." }, { "code": null, "e": 2470, "s": 2235, "text": "While doing programming, if yo...
How to resize Image in Android App using Kotlin?
This example demonstrates how to resize Image in an Android App using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Relative...
[ { "code": null, "e": 1140, "s": 1062, "text": "This example demonstrates how to resize Image in an Android App using Kotlin." }, { "code": null, "e": 1269, "s": 1140, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ...
JavaScript Array some() function
The some() method of JavaScript is used to check if any of the elements in an array fulfills the condition. The syntax is as follows − array.some(function(currentVal, index, arr), val) Above, the parameters under function(), include currentVal – value of the current element, index – array index, whereas val the array o...
[ { "code": null, "e": 1170, "s": 1062, "text": "The some() method of JavaScript is used to check if any of the elements in an array fulfills the condition." }, { "code": null, "e": 1197, "s": 1170, "text": "The syntax is as follows −" }, { "code": null, "e": 1247, ...
How to train Tensorflow models. Using GPUs | by DeviceHive | Towards Data Science
In recent years, there has been significant progress in the field of machine learning. Much of this progress can be attributed to the increasing usage of graphics processing units (GPUs) to accelerate the training of machine learning models. In particular, the extra computational power has lead to the popularization of...
[ { "code": null, "e": 651, "s": 172, "text": "In recent years, there has been significant progress in the field of machine learning. Much of this progress can be attributed to the increasing usage of graphics processing units (GPUs) to accelerate the training of machine learning models. In particular...
Rexx - TRUNC
This method truncates a number. TRUNC(i) i − This the input number for which the value needs to be truncated. i − This the input number for which the value needs to be truncated. Returns the truncated number. /* Main program */ say TRUNC(12.22) When we run the above program, we will get the following result. 12 ...
[ { "code": null, "e": 2371, "s": 2339, "text": "This method truncates a number." }, { "code": null, "e": 2382, "s": 2371, "text": "TRUNC(i) \n" }, { "code": null, "e": 2451, "s": 2382, "text": "i − This the input number for which the value needs to be truncated...
How can I convert string to double in C/C++?
Here is an example to convert a string to double. Live Demo #include <iostream> using namespace std; int main() { char s[20] = "18.2894 is a number"; char *p; double result; result = strtod(s, &p); cout<<"The number after conversion of string : "<<result; return(0); } The number after conversion of s...
[ { "code": null, "e": 1112, "s": 1062, "text": "Here is an example to convert a string to double." }, { "code": null, "e": 1123, "s": 1112, "text": " Live Demo" }, { "code": null, "e": 1350, "s": 1123, "text": "#include <iostream>\nusing namespace std;\nint mai...
Instruction type RRC in 8085 Microprocessor
In 8085 Instruction set, RRC stands for “Rotate Right Accumulator”. With the help of this instruction, we can rotate the Accumulator current content to the right by 1-bit position. The following Fig. will depict the rotation operation. In this right rotation, the least significant bit will come out from the Accumulator...
[ { "code": null, "e": 1298, "s": 1062, "text": "In 8085 Instruction set, RRC stands for “Rotate Right Accumulator”. With the help of this instruction, we can rotate the Accumulator current content to the right by 1-bit position. The following Fig. will depict the rotation operation." }, { "co...
A Data Science/Big Data Laboratory — part 2 of 4: Hadoop 3.2.1 and Spark 3.0.0 over Ubuntu 20.04 in a 3-node cluster | by Pier Taranti | Towards Data Science
This text can be used to support the installation in any Ubuntu 20.04 server clusters, and this is the beauty of well-designed layered software. Furthermore, if you have more nodes, you can distribute the software as you like. The text assumes you know Linux command line, including ssh, vim, and nano. I do not recommen...
[ { "code": null, "e": 350, "s": 47, "text": "This text can be used to support the installation in any Ubuntu 20.04 server clusters, and this is the beauty of well-designed layered software. Furthermore, if you have more nodes, you can distribute the software as you like. The text assumes you know Lin...
The accept() method in Java Stream.Builder
Add an element to the stream using the accept() method of Java Stream.Builder. The following is the syntax: void accept(T t) Here, t is the argument to be inserted. Import the following package for the Stream.Builder class in Java: import java.util.stream.Stream; First, declare a Stream.Builder: Stream.Builder<String> ...
[ { "code": null, "e": 1141, "s": 1062, "text": "Add an element to the stream using the accept() method of Java Stream.Builder." }, { "code": null, "e": 1170, "s": 1141, "text": "The following is the syntax:" }, { "code": null, "e": 1187, "s": 1170, "text": "voi...
Get the dates of Yesterday, Today, and Tomorrow using NumPy - GeeksforGeeks
26 Nov, 2020 In NumPy with the help of NumPy.datetime64(‘today’, ‘D’), we will find today date and if we want some date before today then we will subtract the no-of-date with the help of np.timedelta64() from today. And if we want some date after today then we will add the no of date with the help of np.timedelta64() f...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n26 Nov, 2020" }, { "code": null, "e": 24292, "s": 23901, "text": "In NumPy with the help of NumPy.datetime64(‘today’, ‘D’), we will find today date and if we want some date before today then we will subtract the no-of-date with t...
Different Ways to Add Stacktrace or debug Option when Building Android Studio Project
19 Jun, 2021 While developing your favorite app, you might at some point of time arrived upon this strange error, :GfGapp:processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. * Try: Run with --stacktrace option to get the stac...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jun, 2021" }, { "code": null, "e": 130, "s": 28, "text": "While developing your favorite app, you might at some point of time arrived upon this strange error, " }, { "code": null, "e": 402, "s": 130, "text": ":GfG...
Sum of previous numbers that are greater than current number for given array
11 Mar, 2022 Given an array A[], for each element in the array, the task is to find the sum of all the previous elements which are strictly greater than the current element. Examples: Input: A[] = {2, 6, 4, 1, 7}Output: 0 0 6 12 0Explanation: For 2 and 6 there is no element greater to it on the left.For 4 there is 6.Fo...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Mar, 2022" }, { "code": null, "e": 189, "s": 28, "text": "Given an array A[], for each element in the array, the task is to find the sum of all the previous elements which are strictly greater than the current element." }, { ...
Basics of Python
10 Jun, 2022 Introduction to Python has been dealt with in this article. Now, let us begin with learning python. Running your First Code in Python Python programs are not compiled, rather they are interpreted. Now, let us move to writing a python code and running it. Please make sure that python is installed on the sys...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2022" }, { "code": null, "e": 152, "s": 52, "text": "Introduction to Python has been dealt with in this article. Now, let us begin with learning python." }, { "code": null, "e": 459, "s": 152, "text": "Runni...
Remove comments from a given C/C++ program
23 Jun, 2022 Given a C/C++ program, remove comments from it. We strongly recommend to minimize your browser and try this yourself first. The idea is to maintain two flag variables, one to indicate that a single line comment is started, another to indicate that a multiline comment is started. When a flag is set, we loo...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 101, "s": 52, "text": "Given a C/C++ program, remove comments from it. " }, { "code": null, "e": 177, "s": 101, "text": "We strongly recommend to minimize your browser and try t...
Print Longest substring without repeating characters
05 Jul, 2021 Given a string, print the longest substring without repeating characters. For example, the longest substrings without repeating characters for “ABDEFGABEF” are “BDEFGA” and “DEFGAB”, with length 6. For “BBBB” the longest substring is “B”, with length 1. The desired time complexity is O(n) where n is the le...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jul, 2021" }, { "code": null, "e": 461, "s": 54, "text": "Given a string, print the longest substring without repeating characters. For example, the longest substrings without repeating characters for “ABDEFGABEF” are “BDEFGA” and “...
Group all co-prime numbers from 1 to N
08 Nov, 2021 Given an integer N, the task is to group numbers such that each group is mutually co-prime together with the total grouping is minimum. Examples: Input: N = 8 Output: 1 2 3 4 5 6 7 8 Input: N = 5 Output: 1 2 3 4 5 Approach: The key observation in this problem is two consecutive numbers are always co-prime....
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Nov, 2021" }, { "code": null, "e": 190, "s": 54, "text": "Given an integer N, the task is to group numbers such that each group is mutually co-prime together with the total grouping is minimum." }, { "code": null, "e": 2...
Python Program To Add Two Numbers Represented By Linked Lists- Set 1 - GeeksforGeeks
21 Dec, 2021 Given two numbers represented by two lists, write a function that returns the sum list. The sum list is a list representation of the addition of two input numbers. Example: Input: List1: 5->6->3 // represents number 563 List2: 8->4->2 // represents number 842 Output: Resultant list: 1->4->0->5 // represent...
[ { "code": null, "e": 26179, "s": 26151, "text": "\n21 Dec, 2021" }, { "code": null, "e": 26343, "s": 26179, "text": "Given two numbers represented by two lists, write a function that returns the sum list. The sum list is a list representation of the addition of two input numbers....
Monitor vs Semaphore - GeeksforGeeks
16 Mar, 2020 Both semaphores and monitors are used to solve the critical section problem (as they allow processes to access the shared resources in mutual exclusion) and to achieve process synchronization in the multiprocessing environment. Monitor:A Monitor type high-level synchronization construct. It is an abstract ...
[ { "code": null, "e": 25627, "s": 25599, "text": "\n16 Mar, 2020" }, { "code": null, "e": 25855, "s": 25627, "text": "Both semaphores and monitors are used to solve the critical section problem (as they allow processes to access the shared resources in mutual exclusion) and to ach...
init command in Linux with examples - GeeksforGeeks
26 Aug, 2020 init is parent of all Linux processes with PID or process ID of 1. It is the first process to start when a computer boots up and runs until the system shuts down. init stands for initialization. In simple words the role of init is to create processes from script stored in the file /etc/inittab which is a c...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n26 Aug, 2020" }, { "code": null, "e": 26071, "s": 25651, "text": "init is parent of all Linux processes with PID or process ID of 1. It is the first process to start when a computer boots up and runs until the system shuts down. ...
Ways to place K bishops on an N×N chessboard so that no two attack - GeeksforGeeks
06 May, 2021 Given two integers N and K, the task is to find the number of ways to place K bishops on an N × N chessboard so that no two bishops attack each other. Here is an example for a 5×5 chessboard. Examples: Input: N = 2, K = 2 Output: 4 The different ways to place 2 bishops in a 2 * 2 chessboard are : ...
[ { "code": null, "e": 25941, "s": 25913, "text": "\n06 May, 2021" }, { "code": null, "e": 26094, "s": 25941, "text": "Given two integers N and K, the task is to find the number of ways to place K bishops on an N × N chessboard so that no two bishops attack each other. " }, { ...
Permissions in Linux - GeeksforGeeks
26 Apr, 2022 Linux is a multi-user operating system, so it has security to prevent people from accessing each other’s confidential files. When you execute an “ls” command, you are not given any information about the security of the files, because by default “ls” only lists the names of files. You can get more inform...
[ { "code": null, "e": 25813, "s": 25785, "text": "\n26 Apr, 2022" }, { "code": null, "e": 25939, "s": 25813, "text": "Linux is a multi-user operating system, so it has security to prevent people from accessing each other’s confidential files. " }, { "code": null, "e": ...
C# | Check if HashSet and the specified collection contain the same elements - GeeksforGeeks
01 Feb, 2019 A HashSet is an unordered collection of the unique elements. It comes under System.Collections.Generic namespace. It is used in a situation where we want to prevent duplicates from being inserted in the collection. As far as performance is concerned, it is better in comparison to the list. HashSet.SetEqual...
[ { "code": null, "e": 25919, "s": 25891, "text": "\n01 Feb, 2019" }, { "code": null, "e": 26341, "s": 25919, "text": "A HashSet is an unordered collection of the unique elements. It comes under System.Collections.Generic namespace. It is used in a situation where we want to preven...
Java Program to Read a Grade & Display the Equivalent Description - GeeksforGeeks
31 Jul, 2021 Problem Statement: Numbers on a scale of 1 to 100 are randomly given the grade as the input from the user and then match the input grade of the user against the given cases to generate the desired output. Real life Example Consider a number on a scale of 1 to 100 are written on a piece of paper slips. Now ...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n31 Jul, 2021" }, { "code": null, "e": 25430, "s": 25225, "text": "Problem Statement: Numbers on a scale of 1 to 100 are randomly given the grade as the input from the user and then match the input grade of the user against the gi...
How to create a simple editable canvas textbox using Fabric.js? - GeeksforGeeks
08 Feb, 2022 In this article, we are going to create a canvas textbox using Fabric.js. The canvas means text written in the Textbox is movable and can be stretched according to requirement. Further, the text itself can be edited into anything else too because it is a textbox.Creating structure: To make this possible we...
[ { "code": null, "e": 25997, "s": 25969, "text": "\n08 Feb, 2022" }, { "code": null, "e": 26397, "s": 25997, "text": "In this article, we are going to create a canvas textbox using Fabric.js. The canvas means text written in the Textbox is movable and can be stretched according to...
Matcher toString() method in Java with Examples - GeeksforGeeks
27 Nov, 2018 The toString() method of Matcher Class is used to get the String representation of this matcher. This method is derived from the Object Class and behaves in the similar way. Syntax: public String toString() Parameters: This method takes no parameters. Return Value: This method returns a String value which...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n27 Nov, 2018" }, { "code": null, "e": 25399, "s": 25225, "text": "The toString() method of Matcher Class is used to get the String representation of this matcher. This method is derived from the Object Class and behaves in the si...
AtomicIntegerArray accumulateAndGet() method in Java with Examples - GeeksforGeeks
27 Feb, 2019 The Java.util.concurrent.atomic.AtomicIntegerArray.accumulateAndGet() is an inbuilt method in java that atomically updates the element at index i with the results of applying the given function to the current and given values, returning the updated value. The function should be side-effect-free, since it m...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n27 Feb, 2019" }, { "code": null, "e": 25736, "s": 25225, "text": "The Java.util.concurrent.atomic.AtomicIntegerArray.accumulateAndGet() is an inbuilt method in java that atomically updates the element at index i with the results ...
Bootstrap 4 | Tables - GeeksforGeeks
28 Apr, 2022 Bootstrap provides a series of classes that can be used to apply various styling to the tables such as changing the heading appearance, making the rows stripped, adding or removing borders, making rows hoverable, etc. Bootstrap also provides classes for making tables responsive. Simple Table: The .table cl...
[ { "code": null, "e": 29685, "s": 29657, "text": "\n28 Apr, 2022" }, { "code": null, "e": 29965, "s": 29685, "text": "Bootstrap provides a series of classes that can be used to apply various styling to the tables such as changing the heading appearance, making the rows stripped, a...
AngularJS | Services - GeeksforGeeks
21 May, 2019 Services are used to create variables/data that can be shared and can be used outside the component in which it is defined. STEP #1: Creating a service:-ng g s service-names is a short-form for service.This creates two files service-name.service.spec.ts which is not supposed to be changed and a service-nam...
[ { "code": null, "e": 29516, "s": 29488, "text": "\n21 May, 2019" }, { "code": null, "e": 29640, "s": 29516, "text": "Services are used to create variables/data that can be shared and can be used outside the component in which it is defined." }, { "code": null, "e": 29...
What is Query in LINQ? - GeeksforGeeks
06 Aug, 2021 A query is an expression which is used to recover data from the data source. Generally, queries are expressed in some specialized language. Different types of languages are developed to access the different type of data sources like SQL for a relational database, XQuery for XML, etc. So, every time the dev...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n06 Aug, 2021" }, { "code": null, "e": 26495, "s": 25547, "text": "A query is an expression which is used to recover data from the data source. Generally, queries are expressed in some specialized language. Different types of lang...
Batch Script - Length of an Array - GeeksforGeeks
28 Nov, 2021 The length of the array is the number of elements in the array. The index of the array starts from “0” to “N-1” where N is a number of elements. For example arr[0]=1 arr[1]=2 arr[2]=3 Here we can see that the index starts from 0 and ends with 2 . So, we know that the index of the element goes from 0 to N...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n28 Nov, 2021" }, { "code": null, "e": 25797, "s": 25651, "text": "The length of the array is the number of elements in the array. The index of the array starts from “0” to “N-1” where N is a number of elements. " }, { "co...
How to apply inline CSS ?
17 Mar, 2021 Inline CSS contains the CSS property in the body section attached with the element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute. It is used to apply a unique style to a single HTML element. Syntax: <tag style = " "></tag> Example 1: HTML <!DOCTYPE htm...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2021" }, { "code": null, "e": 298, "s": 52, "text": "Inline CSS contains the CSS property in the body section attached with the element is known as inline CSS. This kind of style is specified within an HTML tag using the style ...