title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Java program to add two integers
The + operator in Java is used to multiply two numbers. Read required numbers from the user using Scanner class and add these two integers using the + operator. import java.util.Scanner; public class AddinTwoNumbers { public static void main(String args[]){ Scanner sc = new Scanner(System.in); System.out...
[ { "code": null, "e": 1223, "s": 1062, "text": "The + operator in Java is used to multiply two numbers. Read required numbers from the user using Scanner class and add these two integers using the + operator." }, { "code": null, "e": 1660, "s": 1223, "text": "import java.util.Scan...
How to write a conditional expression in lambda expression in Java?
The conditional operator is used to make conditional expressions in Java. It is also called a Ternary operator because it has three operands such as boolean condition, first expression, and second expression. We can also write a conditional expression in lambda expression in the below program. interface Algebra { in...
[ { "code": null, "e": 1271, "s": 1062, "text": "The conditional operator is used to make conditional expressions in Java. It is also called a Ternary operator because it has three operands such as boolean condition, first expression, and second expression." }, { "code": null, "e": 1357, ...
10 Steps to Setup a Comprehensive Data Science Workspace with VSCode on Windows | by Gong Na | Towards Data Science
To start a data science project, choosing an effective development environment is always the first step. Jupyter Notebook/Lab is a common choice. I like it very much. But it’s really not enough. When I started my first professional data science project, I used many tools together: Jupyter Notebook for model training, P...
[ { "code": null, "e": 366, "s": 171, "text": "To start a data science project, choosing an effective development environment is always the first step. Jupyter Notebook/Lab is a common choice. I like it very much. But it’s really not enough." }, { "code": null, "e": 731, "s": 366, ...
How to appropriately plot the losses values acquired by (loss_curve_) from MLPClassifier? (Matplotlib)
To appropriately plot losses values acquired by (loss_curve_) from MLPCIassifier, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Make a params, a list of dictionaries. Make a list of labels and plot arguments. Create a figure and a set of subplots, with nro...
[ { "code": null, "e": 1178, "s": 1062, "text": "To appropriately plot losses values acquired by (loss_curve_) from MLPCIassifier, we can take the following steps −" }, { "code": null, "e": 1254, "s": 1178, "text": "Set the figure size and adjust the padding between and around the ...
MongoDB query to remove subdocument from document?
To remove subdocument from a document, use $pull along with update(). Let us first create a collection with documents − > db.demo538.insertOne( ... { ... id:101, ... "details": ... { ... anotherDetails: ... [ ... { ... "Name":"Chris", ... Age:21 ... }, ... ...
[ { "code": null, "e": 1182, "s": 1062, "text": "To remove subdocument from a document, use $pull along with update(). Let us first create a collection with documents −" }, { "code": null, "e": 1666, "s": 1182, "text": "> db.demo538.insertOne(\n... {\n... id:101,\n... \"detai...
Shortest Path Faster Algorithm - GeeksforGeeks
07 Feb, 2022 Prerequisites: Bellman-Ford AlgorithmGiven a directed weighted graph with V vertices, E edges and a source vertex S. The task is to find the shortest path from the source vertex to all other vertices in the given graph.Example: Input: V = 5, S = 1, arr = {{1, 2, 1}, {2, 3, 7}, {2, 4, -2}, {1, 3, 8}, {1, ...
[ { "code": null, "e": 24097, "s": 24069, "text": "\n07 Feb, 2022" }, { "code": null, "e": 24327, "s": 24097, "text": "Prerequisites: Bellman-Ford AlgorithmGiven a directed weighted graph with V vertices, E edges and a source vertex S. The task is to find the shortest path from the...
Data Cleaning and Exploratory Analysis in Python and R | by Sagar Uprety | Towards Data Science
This notebook is about using a combination of Python and R to perform data preproccesing and some exploratory statistical analysis on an untidy dataset. Blogs and articles for upcoming data scientists often harp on the need for using real-world data which is messy and the importance of learning data cleaning and prepro...
[ { "code": null, "e": 858, "s": 172, "text": "This notebook is about using a combination of Python and R to perform data preproccesing and some exploratory statistical analysis on an untidy dataset. Blogs and articles for upcoming data scientists often harp on the need for using real-world data which...
Closest value to K from an unsorted array - GeeksforGeeks
05 May, 2021 Given an array arr[] consisting of N integers and an integer K, the task is to find the array element closest to K. If multiple closest values exist, then print the smallest one. Examples: Input: arr[]={4, 2, 8, 11, 7}, K = 6Output: 7Explanation:The absolute difference between 4 and 6 is |4 – 6| = 2The abs...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n05 May, 2021" }, { "code": null, "e": 24999, "s": 24820, "text": "Given an array arr[] consisting of N integers and an integer K, the task is to find the array element closest to K. If multiple closest values exist, then print th...
Binary Search a String in C++
In Binary search a string, we are given a sorted array of strings and we have to search for a string in the array of strings using binary search algorithm. Input : stringArray = {“I”, “Love”, “Programming”, “tutorials”, “point”}. Element = “programming” Output : string found at index 3 Explanation : The index of string...
[ { "code": null, "e": 1218, "s": 1062, "text": "In Binary search a string, we are given a sorted array of strings and we have to search for a string in the array of strings using binary search algorithm." }, { "code": null, "e": 1513, "s": 1218, "text": "Input : stringArray = {“I”...
SAP Payroll - Quick Guide
SAP Payroll is one of the key modules in SAP Human Capital Management. This is used to calculate the remuneration for each employee with respect to the work performed by them. SAP Payroll not only consists of remuneration part, but also the other benefits that the organization has to provide for the employee welfare ac...
[ { "code": null, "e": 2377, "s": 1982, "text": "SAP Payroll is one of the key modules in SAP Human Capital Management. This is used to calculate the remuneration for each employee with respect to the work performed by them. SAP Payroll not only consists of remuneration part, but also the other benefi...
Program to implement the fractional knapsack problem in Python
Suppose we have two lists, weights and values of same length and another value capacity. The weights[i] and values[i] represent the weight and value of ith element. So if we can take at most capacity weights, and that we can take a fraction of an item's weight with proportionate value, we have to find the maximum amoun...
[ { "code": null, "e": 1442, "s": 1062, "text": "Suppose we have two lists, weights and values of same length and another value capacity. The weights[i] and values[i] represent the weight and value of ith element. So if we can take at most capacity weights, and that we can take a fraction of an item's...
Multithreading in C++
Multithreading is a specialized form of multitasking and a multitasking is the feature that allows your computer to run two or more programs concurrently. In general, there are two types of multitasking: process-based and thread-based. Process-based multitasking handles the concurrent execution of programs. Threadbased...
[ { "code": null, "e": 1298, "s": 1062, "text": "Multithreading is a specialized form of multitasking and a multitasking is the feature\nthat allows your computer to run two or more programs concurrently. In general,\nthere are two types of multitasking: process-based and thread-based." }, { "...
Go - The goto Statement
A goto statement in Go programming language provides an unconditional jump from the goto to a labeled statement in the same function. Note − Use of goto statement is highly discouraged in any programming language because it becomes difficult to trace the control flow of a program, making the program difficult to unders...
[ { "code": null, "e": 2071, "s": 1937, "text": "A goto statement in Go programming language provides an unconditional jump from the goto to a labeled statement in the same function." }, { "code": null, "e": 2356, "s": 2071, "text": "Note − Use of goto statement is highly discourag...
A Step-by-Step Guide in detecting causal relationships using Bayesian Structure Learning in Python | by Erdogan Taskesen | Towards Data Science
Determining causality across variables can be a challenging step but it is important for strategic actions. I will summarize the concepts of causal models in terms of Bayesian probabilistic, followed by a hands-on tutorial to detect causal relationships using Bayesian structure learning. I will use the sprinkler datase...
[ { "code": null, "e": 588, "s": 171, "text": "Determining causality across variables can be a challenging step but it is important for strategic actions. I will summarize the concepts of causal models in terms of Bayesian probabilistic, followed by a hands-on tutorial to detect causal relationships u...
Ticket Counter | Practice | GeeksforGeeks
N people standing in the queue of a movie ticket counter. It is a weird counter, distributes tickets to first K people and then last K people and again first K people and so on. The task is to find the last person to get the ticket. Example: Let N = 9, K = 3, starting queue will like {1, 2, 3, 4, 5, 6, 7, 8, 9}. After...
[ { "code": null, "e": 723, "s": 226, "text": "N people standing in the queue of a movie ticket counter. It is a weird counter, distributes tickets to first K people and then last K people and again first K people and so on. The task is to find the last person to get the ticket.\n\nExample: Let N = 9,...
Implementation of Non-Restoring Division Algorithm for Unsigned Integer - GeeksforGeeks
20 May, 2020 In the previous article, we have already discussed the Non-Restoring Division Algorithm. In this article, we will discuss the implementation of this algorithm. Non-restoring division algorithm is used to divide two unsigned integers. The other form of this algorithm is Restoring Division. This algorithm is...
[ { "code": null, "e": 24577, "s": 24549, "text": "\n20 May, 2020" }, { "code": null, "e": 24737, "s": 24577, "text": "In the previous article, we have already discussed the Non-Restoring Division Algorithm. In this article, we will discuss the implementation of this algorithm." ...
How to get default phone number in android?
This example demonstrate about How to get default phone number 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"?> <LinearLayou...
[ { "code": null, "e": 1137, "s": 1062, "text": "This example demonstrate about How to get default phone number in android." }, { "code": null, "e": 1266, "s": 1137, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...
JavaScript DOM Elements
This page teaches you how to find and access HTML elements in an HTML page. Often, with JavaScript, you want to manipulate HTML elements. To do so, you have to find the elements first. There are several ways to do this: Finding HTML elements by id Finding HTML elements by tag name Finding HTML elements by class name ...
[ { "code": null, "e": 77, "s": 0, "text": "This page teaches you how to find and access HTML elements in \nan HTML page." }, { "code": null, "e": 139, "s": 77, "text": "Often, with JavaScript, you want to manipulate HTML elements." }, { "code": null, "e": 221, "s":...
Python | Pandas Series.sort_index() - GeeksforGeeks
05 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.sort_index() function is used to sor...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n05 Feb, 2019" }, { "code": null, "e": 24158, "s": 23901, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label...
Ruby - Modules and Mixins
Modules are a way of grouping together methods, classes, and constants. Modules give you two major benefits. Modules provide a namespace and prevent name clashes. Modules provide a namespace and prevent name clashes. Modules implement the mixin facility. Modules implement the mixin facility. Modules define a namespace,...
[ { "code": null, "e": 2403, "s": 2294, "text": "Modules are a way of grouping together methods, classes, and constants. Modules give you two major benefits." }, { "code": null, "e": 2457, "s": 2403, "text": "Modules provide a namespace and prevent name clashes." }, { "code...
How to Create Your First Machine Learning Model | by Rebecca Vickery | Towards Data Science
Many machine learning tutorials focus on specific elements of the machine learning workflow such as data cleaning, model training or algorithm optimisation. However, if you are very new to machine learning it can be difficult to fully grasp the basic end to end workflow without a complete simple explanation or walkthro...
[ { "code": null, "e": 497, "s": 172, "text": "Many machine learning tutorials focus on specific elements of the machine learning workflow such as data cleaning, model training or algorithm optimisation. However, if you are very new to machine learning it can be difficult to fully grasp the basic end ...
Automatic Vision Object Tracking. A pan/tilt servo device helping a... | by Marcelo Rovai | Towards Data Science
A pan/tilt servo device helping a camera to automatically track color objects using vision. On a previous tutorial, we explored how to control a Pan/Tilt Servo device in order to position a PiCam. Now we will use our device to help the camera to automatically tracking color objects as you can see below: This is my firs...
[ { "code": null, "e": 264, "s": 172, "text": "A pan/tilt servo device helping a camera to automatically track color objects using vision." }, { "code": null, "e": 477, "s": 264, "text": "On a previous tutorial, we explored how to control a Pan/Tilt Servo device in order to positio...
How to join points on a scatterplot with smooth lines in R using plot function?
It is very difficult to join points on a scatterplot with smooth lines if the scatteredness is high but we might want to look at the smoothness that cannot be understood by just looking at the points. It is also helpful to understand whether the model is linear or not. We can do this by plotting the model with loess us...
[ { "code": null, "e": 1401, "s": 1062, "text": "It is very difficult to join points on a scatterplot with smooth lines if the scatteredness is high but we might want to look at the smoothness that cannot be understood by just looking at the points. It is also helpful to understand whether the model i...
Python Pandas - Return numpy array of python datetime.time objects
To return numpy array of python datetime.time objects, use the datetimeindex.time property in Pandas. At first, import the required libraries − import pandas as pd Create a DatetimeIndex with period 3 and frequency as us i.e. nanoseconds. The timezone is Australia/Sydney − datetimeindex = pd.date_range('2021-10-20 02:3...
[ { "code": null, "e": 1164, "s": 1062, "text": "To return numpy array of python datetime.time objects, use the datetimeindex.time property in Pandas." }, { "code": null, "e": 1206, "s": 1164, "text": "At first, import the required libraries −" }, { "code": null, "e": 1...
Visualizing and Analyzing Proteins in Python | by Aren Carpenter | Towards Data Science
Human biology is incredibly complex. Even with our ever-growing understanding, our answers only uncover more and more questions. The completion of the Human Genome Project gave many scientists confidence that we could solve pressing issues in biology through genomics. However, as our understanding of biology has grown,...
[ { "code": null, "e": 745, "s": 172, "text": "Human biology is incredibly complex. Even with our ever-growing understanding, our answers only uncover more and more questions. The completion of the Human Genome Project gave many scientists confidence that we could solve pressing issues in biology thro...
Policy-Gradient Methods. REINFORCE algorithm | by Jordi TORRES.AI | Towards Data Science
This is a new post devoted to Policy-Gradient Methods, in the “Deep Reinforcement Learning Explained” series. Policy-Gradient methods are a subclass of Policy-Based methods that estimate an optimal policy’s weights through gradient ascent. Intuitively, gradient ascent begins with an initial guess for the value of polic...
[ { "code": null, "e": 412, "s": 172, "text": "This is a new post devoted to Policy-Gradient Methods, in the “Deep Reinforcement Learning Explained” series. Policy-Gradient methods are a subclass of Policy-Based methods that estimate an optimal policy’s weights through gradient ascent." }, { "...
How and where does String literals in Java stored in the memory?
Strings are used to store a sequence of characters in Java, they are treated as objects. The String class of the java.lang package represents a String. You can create a String either by using the new keyword (like any other object) or, by assigning value to the literal (like any other primitive datatype). public class ...
[ { "code": null, "e": 1214, "s": 1062, "text": "Strings are used to store a sequence of characters in Java, they are treated as objects. The String class of the java.lang package represents a String." }, { "code": null, "e": 1369, "s": 1214, "text": "You can create a String either...
Hyperparameter Tuning with Grid Search and Random Search | by Idil Ismiguzel | Towards Data Science
Hyperparameter tuning also known as hyperparameter optimization is an important step in any machine learning model training that directly affects model performance. This article covers two very popular hyperparameter tuning techniques: grid search and random search and shows how to combine these two algorithms with coa...
[ { "code": null, "e": 337, "s": 172, "text": "Hyperparameter tuning also known as hyperparameter optimization is an important step in any machine learning model training that directly affects model performance." }, { "code": null, "e": 658, "s": 337, "text": "This article covers t...
How to handle right-to-left and left-to-right swipe gestures on Android using Kotlin?
This example demonstrates how to handle right-to-left and left-to-right swipe gestures on Android 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=...
[ { "code": null, "e": 1174, "s": 1062, "text": "This example demonstrates how to handle right-to-left and left-to-right swipe gestures on Android using Kotlin." }, { "code": null, "e": 1303, "s": 1174, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Proj...
How to set Wallpaper Image programmatically in Android?
This example demonstrates how do I set Android Wallpaper image 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. <LinearLayout xmlns:android="http://schemas.android....
[ { "code": null, "e": 1137, "s": 1062, "text": "This example demonstrates how do I set Android Wallpaper image in Android." }, { "code": null, "e": 1265, "s": 1137, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...
F# - Program Structure
F# is a Functional Programming language. In F#, functions work like data types. You can declare and use a function in the same way like any other variable. In general, an F# application does not have any specific entry point. The compiler executes all top-level statements in the file from top to bottom. However, to fol...
[ { "code": null, "e": 2202, "s": 2161, "text": "F# is a Functional Programming language." }, { "code": null, "e": 2317, "s": 2202, "text": "In F#, functions work like data types. You can declare and use a function in the same way like any other variable." }, { "code": null...
Math.Ceiling() Method in C#
The Math.Ceiling() method in C# is used to return the smallest integral value greater than or equal to the specified number. Following is the syntax − public static decimal Ceiling (decimal val); public static double Ceiling(double val) For the first syntax above, the value Val is the decimal number, whereas Val in the...
[ { "code": null, "e": 1187, "s": 1062, "text": "The Math.Ceiling() method in C# is used to return the smallest integral value greater than or equal to the specified number." }, { "code": null, "e": 1213, "s": 1187, "text": "Following is the syntax −" }, { "code": null, ...
How to create a simple alert dialog with Ok and cancel buttons using Kotlin?
This example demonstrates how to create a simple alert dialog with Ok and cancel buttons 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" enco...
[ { "code": null, "e": 1165, "s": 1062, "text": "This example demonstrates how to create a simple alert dialog with Ok and cancel buttons using Kotlin." }, { "code": null, "e": 1293, "s": 1165, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fi...
How to Identify Potential Customers Among the Crowd? | by Harsh Darji | Towards Data Science
In this project, a mail-order sales company in Germany is interested in identifying segments of the general population to target with their marketing to grow. Demographics information has been provided (by Arvato Finacial Solutions through Udacity) for both the general population at large as well as for prior customers...
[ { "code": null, "e": 671, "s": 172, "text": "In this project, a mail-order sales company in Germany is interested in identifying segments of the general population to target with their marketing to grow. Demographics information has been provided (by Arvato Finacial Solutions through Udacity) for bo...
How to insert a row into a table that has only a single autoincrement column?
You can easily insert a row into a table that has only a single auto increment column. The syntax is as follows − insert into yourTableName set yourColumnName =NULL; You can use the below syntax − insert into yourTableName values(NULL); To understand the above syntax, let us create a table. The query to create a table ...
[ { "code": null, "e": 1176, "s": 1062, "text": "You can easily insert a row into a table that has only a single auto increment column. The syntax is as follows −" }, { "code": null, "e": 1228, "s": 1176, "text": "insert into yourTableName set yourColumnName =NULL;" }, { "c...
final local variable in Java
Local variables are declared in methods, constructors, or blocks. Local variables are declared in methods, constructors, or blocks. Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block. Local variables are created...
[ { "code": null, "e": 1128, "s": 1062, "text": "Local variables are declared in methods, constructors, or blocks." }, { "code": null, "e": 1194, "s": 1128, "text": "Local variables are declared in methods, constructors, or blocks." }, { "code": null, "e": 1355, "s"...
Arithmetic Operations on NumPy Arrays - onlinetutorialspoint
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 In this tutorial, we will see how to perform ...
[ { "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, ...
How to programmatically turn on Wifi on Android device?
This example demonstrates how do I programmatically turn on wifi in android device. 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"?> <Li...
[ { "code": null, "e": 1146, "s": 1062, "text": "This example demonstrates how do I programmatically turn on wifi in android device." }, { "code": null, "e": 1275, "s": 1146, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required de...
Python program to calculate Date, Month and Year from Seconds - GeeksforGeeks
15 Mar, 2021 Given the number of seconds, the task is to write a Python program to calculate the date, month, and year in the format MM-DD-YYYY that have been passed from 1 January 1947. Examples: Input: 0 Output: 01-01-1947 Input: 123456789 Output: 11-29-1950 Input: 9876543210 Output: 12-22-2259 Step-by-step Approa...
[ { "code": null, "e": 23973, "s": 23942, "text": " \n15 Mar, 2021\n" }, { "code": null, "e": 24147, "s": 23973, "text": "Given the number of seconds, the task is to write a Python program to calculate the date, month, and year in the format MM-DD-YYYY that have been passed from 1 ...
Increment and Decrement Operators in Python?
Python does not have unary increment/decrement operator( ++/--). Instead to increament a value, use a += 1 to decrement a value, use− a -= 1 >>> a = 0 >>> >>> #Increment >>> a +=1 >>> >>> #Decrement >>> a -= 1 >>> >>> #value of a >>> a 0 Python does not provide multiple ways to do the same thing . However, be careful i...
[ { "code": null, "e": 1162, "s": 1062, "text": "Python does not have unary increment/decrement operator( ++/--). Instead to increament a value, use" }, { "code": null, "e": 1169, "s": 1162, "text": "a += 1" }, { "code": null, "e": 1196, "s": 1169, "text": "to d...
A Flask API for serving scikit-learn models | by Amir Ziai | Towards Data Science
Scikit-learn is an intuitive and powerful Python machine learning library that makes training and validating many models fairly easy. Scikit-learn models can be persisted (pickled) to avoid retraining the model every time they are used. You can use Flask to create an API that can provide predictions based on a set of i...
[ { "code": null, "e": 529, "s": 171, "text": "Scikit-learn is an intuitive and powerful Python machine learning library that makes training and validating many models fairly easy. Scikit-learn models can be persisted (pickled) to avoid retraining the model every time they are used. You can use Flask ...
How to parse JSON object in JavaScript?
To parse JSON object in JavaScript, implement the following code − <!DOCTYPE html> <html> <body> <script> myData = JSON.parse('{"event1":{"title":"Employment period","start":"12\/29\/2011 10:20 ","end":"12\/15\/2013 00:00 "},"event2":{"title":"Employment period","start":"12\/14\/2011 10:20 ","end":"12...
[ { "code": null, "e": 1129, "s": 1062, "text": "To parse JSON object in JavaScript, implement the following code −" }, { "code": null, "e": 1800, "s": 1129, "text": "<!DOCTYPE html>\n<html>\n <body>\n <script>\n myData = JSON.parse('{\"event1\":{\"title\":\"Employme...
MD2 Hash In Java - GeeksforGeeks
27 Sep, 2018 The MD2 is a Message-Digest Algorithm. It is a cryptographic hash function developed by Ronald Rivest in 1989. It is optimized for 8-bit computers. The MD2 algorithm is used in public key infrastructures as part of certificates generated with MD2 and RSA. From 2014, this algorithm is now not considered as ...
[ { "code": null, "e": 24119, "s": 24091, "text": "\n27 Sep, 2018" }, { "code": null, "e": 24446, "s": 24119, "text": "The MD2 is a Message-Digest Algorithm. It is a cryptographic hash function developed by Ronald Rivest in 1989. It is optimized for 8-bit computers. The MD2 algorit...
Different Servers in Node.js - GeeksforGeeks
04 Jan, 2022 Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside a browser. You need to remember that NodeJS is not a framework and it’s not a programming language. Most of the people are confused and understand it’s a framework or a programming language. We often use ...
[ { "code": null, "e": 25002, "s": 24974, "text": "\n04 Jan, 2022" }, { "code": null, "e": 25386, "s": 25002, "text": "Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside a browser. You need to remember that NodeJS is not a framewo...
Removing leading zeros from a String using apache commons library in Java
The stripStart() method of the org.apache.commons.lang.StringUtils class accepts two strings and removes the set of characters represented by the second string from the string of the first string. To remove leading zeros from a string using apache communal library − Add the following dependency to your pom.xml file Add...
[ { "code": null, "e": 1259, "s": 1062, "text": "The stripStart() method of the org.apache.commons.lang.StringUtils class accepts two strings and removes the set of characters represented by the second string from the string of the first string." }, { "code": null, "e": 1329, "s": 1259...
Python program to convert seconds into hours, minutes and seconds
In this article, we will learn about the solution to the problem statement given below. Problem statement: We are given time, we need to convert seconds into hours & minutes to seconds. There are three approaches as discussed below− Live Demo def convert(seconds): seconds = seconds % (24 * 3600) hour = seconds /...
[ { "code": null, "e": 1150, "s": 1062, "text": "In this article, we will learn about the solution to the problem statement given below." }, { "code": null, "e": 1248, "s": 1150, "text": "Problem statement: We are given time, we need to convert seconds into hours & minutes to secon...
Bootstrap nav-pills class
To turn the tabs into pills, use the class .nav-pills. You can try to run the following code to implement Bootstrap Pills Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.j...
[ { "code": null, "e": 1184, "s": 1062, "text": "To turn the tabs into pills, use the class .nav-pills. You can try to run the following code to implement Bootstrap Pills" }, { "code": null, "e": 1194, "s": 1184, "text": "Live Demo" }, { "code": null, "e": 1766, "s"...
Basics of BASH for Beginners.. Learn about some of the most useful... | by Parul Pandey | Towards Data Science
Most computers today are not powered by electricity. They instead seem to be powered by the “pumping” motion of the mouse: William Shotts Have you ever noticed how a super nerdy hacker in movies, can easily infiltrate the most secure banks and rob them all off by merely typing some commands ferociously and staring at t...
[ { "code": null, "e": 185, "s": 47, "text": "Most computers today are not powered by electricity. They instead seem to be powered by the “pumping” motion of the mouse: William Shotts" }, { "code": null, "e": 761, "s": 185, "text": "Have you ever noticed how a super nerdy hacker in...
Ashok - Osint Recon Tool in Kali Linux - GeeksforGeeks
28 Apr, 2021 Ashok is a free and open-source tool available on GitHub. Ashok is used for information gathering. Ashok is used to scan websites for information gathering and finding vulnerabilities in websites and webapps. Ashok is one of the easiest and useful tools for performing reconnaissance on websites and web app...
[ { "code": null, "e": 24638, "s": 24610, "text": "\n28 Apr, 2021" }, { "code": null, "e": 25164, "s": 24638, "text": "Ashok is a free and open-source tool available on GitHub. Ashok is used for information gathering. Ashok is used to scan websites for information gathering and fin...
How to send a SMS using SMSmanager in Dual SIM mobile in Android using Kotlin?
This example demonstrates how to send a SMS using SMSmanager in Dual SIM mobile in Android 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" e...
[ { "code": null, "e": 1167, "s": 1062, "text": "This example demonstrates how to send a SMS using SMSmanager in Dual SIM mobile in Android using Kotlin." }, { "code": null, "e": 1296, "s": 1167, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and...
Next Greater Element | Practice | GeeksforGeeks
Given an array arr[ ] of size N having distinct elements, the task is to find the next greater element for each element of the array in order of their appearance in the array. Next greater element of an element in the array is the nearest element on the right which is greater than the current element. If there does not...
[ { "code": null, "e": 711, "s": 238, "text": "Given an array arr[ ] of size N having distinct elements, the task is to find the next greater element for each element of the array in order of their appearance in the array.\nNext greater element of an element in the array is the nearest element on the ...
__name__ (A Special variable) in Python
Unlike other programming languages, python is not designed to start execution of the code from a main function explicitly. A special variable called __name__ provides the functionality of the main function. As it is an in-built variable in python language, we can write a program just to see the value of this variable a...
[ { "code": null, "e": 1391, "s": 1062, "text": "Unlike other programming languages, python is not designed to start execution of the code from a main function explicitly. A special variable called __name__ provides the functionality of the main function. As it is an in-built variable in python langua...
K'th Smallest/Largest Element in Unsorted Array | Set 3 (Worst Case Linear Time) - GeeksforGeeks
31 Oct, 2021 We recommend reading following posts as a prerequisite of this post.K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)Given an array and a number k where k is smaller than the size of the array, we need to find the k’th sma...
[ { "code": null, "e": 24860, "s": 24832, "text": "\n31 Oct, 2021" }, { "code": null, "e": 25262, "s": 24860, "text": "We recommend reading following posts as a prerequisite of this post.K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Element in Unsort...
How to pass pointers as parameters to methods in C#?
To pass pointers as parameters to methods, refer the below steps − Firstly, crate a function swap with unsafe modifier. public unsafe void swap(int* p, int *q) { int temp = *p; *p = *q; *q = temp; } Now under static void main, add the value for the first and second variable, set pointers for both of them. Disp...
[ { "code": null, "e": 1129, "s": 1062, "text": "To pass pointers as parameters to methods, refer the below steps −" }, { "code": null, "e": 1182, "s": 1129, "text": "Firstly, crate a function swap with unsafe modifier." }, { "code": null, "e": 1270, "s": 1182, ...
Terraform + SageMaker Part 1: Terraform Initialization | by David Hundley | Towards Data Science
Hello there, folks! Today, we’re starting a new series on using Terraform to create resources on AWS SageMaker. I expect you’re likely familiar with what SageMaker is, even if only on a very general level. In a nutshell, SageMaker is AWS’s machine learning service. AWS has poured a lot of energy into this particular se...
[ { "code": null, "e": 880, "s": 171, "text": "Hello there, folks! Today, we’re starting a new series on using Terraform to create resources on AWS SageMaker. I expect you’re likely familiar with what SageMaker is, even if only on a very general level. In a nutshell, SageMaker is AWS’s machine learnin...
Class or Static Variables in Python - GeeksforGeeks
03 Aug, 2021 All objects share class or static variables. An instance or non-static variables are different for different objects (every object has a copy). For example, let a Computer Science Student be represented by class CSStudent. The class may have a static variable whose value is “cse” for all objects. And class...
[ { "code": null, "e": 41552, "s": 41524, "text": "\n03 Aug, 2021" }, { "code": null, "e": 42204, "s": 41552, "text": "All objects share class or static variables. An instance or non-static variables are different for different objects (every object has a copy). For example, let a ...
What happen when we exceed valid range of built-in data types in C++? - GeeksforGeeks
12 Feb, 2021 Consider the below programs. 1) Program to show what happens when we cross range of ‘char’ : CPP // C++ program to demonstrate// the problem with 'char'#include <iostream> using namespace std; int main(){ for (char a = 0; a <= 225; a++) cout << a; return 0;} a is declared as char. Here the lo...
[ { "code": null, "e": 24514, "s": 24486, "text": "\n12 Feb, 2021" }, { "code": null, "e": 24608, "s": 24514, "text": "Consider the below programs. 1) Program to show what happens when we cross range of ‘char’ : " }, { "code": null, "e": 24612, "s": 24608, "text...
2D Shapes PathElement Vertical Line
The path element Vertical Line is used to draw a vertical line to a point in the specified coordinates from the current position. It is represented by a class named VLineTo. This class belongs to the package javafx.scene.shape. This class has a property of the double datatype namely − Y − The y coordinate of the point ...
[ { "code": null, "e": 2030, "s": 1900, "text": "The path element Vertical Line is used to draw a vertical line to a point in the specified coordinates from the current position." }, { "code": null, "e": 2128, "s": 2030, "text": "It is represented by a class named VLineTo. This cla...
Arithmetic Progression - Common difference and Nth term | Class 10 Maths - GeeksforGeeks
27 Oct, 2020 Arithmetic Progression is a sequence of numbers where the difference between any two successive numbers is constant. For example 1, 3, 5, 7, 9....... is in a series which has a common difference (3 – 1) between two successive terms is equal to 2. If we take natural numbers as an example of series 1, 2, 3, ...
[ { "code": null, "e": 24442, "s": 24414, "text": "\n27 Oct, 2020" }, { "code": null, "e": 24837, "s": 24442, "text": "Arithmetic Progression is a sequence of numbers where the difference between any two successive numbers is constant. For example 1, 3, 5, 7, 9....... is in a serie...
Robot Bounded In Circle C++
Suppose we have an infinite plane, a robot initially stands at position (0, 0) and faces north. The robot can receive one of three instructions − G − go straight 1 unit; G − go straight 1 unit; L − turn 90 degrees to the left direction; L − turn 90 degrees to the left direction; R − turn 90 degrees to the right directi...
[ { "code": null, "e": 1208, "s": 1062, "text": "Suppose we have an infinite plane, a robot initially stands at position (0, 0) and faces north. The robot can receive one of three instructions −" }, { "code": null, "e": 1232, "s": 1208, "text": "G − go straight 1 unit;" }, { ...
How to open json file ?
31 Oct, 2021 A JSON file stores the data and object in the JSON format. A JSON ( JavaScript object notation )format is a standard format to store and exchange data. Initially, JSON file is only used to exchange the data between the web application and server. Now, it is used for many purposes such as to take and restor...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2021" }, { "code": null, "e": 354, "s": 28, "text": "A JSON file stores the data and object in the JSON format. A JSON ( JavaScript object notation )format is a standard format to store and exchange data. Initially, JSON file is...
Cyclic Redundancy Check and Modulo-2 Division
01 Jul, 2022 CRC or Cyclic Redundancy Check is a method of detecting accidental changes/errors in the communication channel. CRC uses Generator Polynomial which is available on both sender and receiver side. An example generator polynomial is of the form like x3 + x + 1. This generator polynomial represents key 1011. A...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Jul, 2022" }, { "code": null, "e": 412, "s": 54, "text": "CRC or Cyclic Redundancy Check is a method of detecting accidental changes/errors in the communication channel. CRC uses Generator Polynomial which is available on both sende...
Matplotlib.axes.Axes.get_xticklabels() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
Minimum number of basic logic gates required to realize given Boolean expression
13 Sep, 2021 Given a string S of length N representing a boolean expression, the task is to find the minimum number of AND, OR, and NOT gates required to realize the given expression. Examples: Input: S = “A+B.C”Output: 2Explanation: Realizing the expression requires 1 AND gate represented by ‘.’ and 1 OR gate represen...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Sep, 2021" }, { "code": null, "e": 223, "s": 52, "text": "Given a string S of length N representing a boolean expression, the task is to find the minimum number of AND, OR, and NOT gates required to realize the given expression." ...
std::search in C++
27 Dec, 2021 std::search is defined in the header file <algorithm> and used to find out the presence of a subsequence satisfying a condition (equality if no such predicate is defined) with respect to another sequence. It searches the sequence [first1, last1) for the first occurrence of the subsequence defined by [first...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Dec, 2021" }, { "code": null, "e": 259, "s": 54, "text": "std::search is defined in the header file <algorithm> and used to find out the presence of a subsequence satisfying a condition (equality if no such predicate is defined) wit...
Understanding the /etc/passwd File
28 Jul, 2021 The /etc/passwd file is the most important file in Linux operating system. This file stores essential information about the users on the system. This file is owned by the root user and to edit this file we must have root privileges. But try to avoid edit this file. Now let’s see actually how this file look...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2021" }, { "code": null, "e": 336, "s": 28, "text": "The /etc/passwd file is the most important file in Linux operating system. This file stores essential information about the users on the system. This file is owned by the root...
How to Create Custom Shape Button using SVG ?
27 Apr, 2020 To design the shape of an HTML button we can use SVG elements (Scalable Vector Graphics). It basically defines the vector-based graphics in XML format. Every element and every attribute in SVG files can be animated. We can use SVG to create 2-D graphics of any custom shape. Example 1: This example creating...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2020" }, { "code": null, "e": 303, "s": 28, "text": "To design the shape of an HTML button we can use SVG elements (Scalable Vector Graphics). It basically defines the vector-based graphics in XML format. Every element and every...
Flutter – SilverAppBar Widget
22 Feb, 2022 SliverAppBar is a Material Design widget in flutter which gives scrollable or collapsible app-bar. The word Sliver is given to scrollable areas here. SliverAppBar basically gives us means to create an app-bar that can change appearance, blend in the background, or even disappear as we scroll. We already ha...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Feb, 2022" }, { "code": null, "e": 817, "s": 52, "text": "SliverAppBar is a Material Design widget in flutter which gives scrollable or collapsible app-bar. The word Sliver is given to scrollable areas here. SliverAppBar basically g...
SQL Query to select Data from Tables Using Join and Where
27 Apr, 2021 The aim of this article is to make a simple program to Join two tables using Join and Where clause using MySQL. Below is the method to do the same using MySQL. The prerequisites of this article are MySQL and Apache Server on your computer are installed. A SQL query is a request passed for data/information ...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Apr, 2021" }, { "code": null, "e": 308, "s": 54, "text": "The aim of this article is to make a simple program to Join two tables using Join and Where clause using MySQL. Below is the method to do the same using MySQL. The prerequisi...
Rust – Traits
20 Sep, 2021 A trait tells the Rust compiler about functionality a particular type has and can share with other types. Traits are an abstract definition of shared behavior amongst different types. So, we can say that traits are to Rust what interfaces are to Java or abstract classes are to C++. A trait method is able t...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2021" }, { "code": null, "e": 377, "s": 28, "text": "A trait tells the Rust compiler about functionality a particular type has and can share with other types. Traits are an abstract definition of shared behavior amongst differen...
Python | os.DirEntry.path attribute
28 Aug, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.scandir() method of os module yields os.DirEntry objects corresponding to the entries...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2019" }, { "code": null, "e": 247, "s": 28, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin...
How to create a hidden input field in form using HTML ?
18 Oct, 2021 In this article, we will learn how to add a hidden input field into our form using HTML. A hidden control stores the data that is not visible to the user. It is used to send some information to the server which is not edited by the user. Normally, this hidden field usually contains the value which is comm...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Oct, 2021" }, { "code": null, "e": 402, "s": 28, "text": "In this article, we will learn how to add a hidden input field into our form using HTML. A hidden control stores the data that is not visible to the user. It is used to send s...
How to Extract the Last Word From a Cell in Excel?
30 Nov, 2021 In this article, we explain how to extract the last word from a text in a cell using the Excel function. Extracting words from a text is an important task in text processing. Eg. Suppose we have a data file with a field called “Product_Category”, which was combined both product name and their respectiv...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 206, "s": 28, "text": "In this article, we explain how to extract the last word from a text in a cell using the Excel function. Extracting words from a text is an important task in text processing....
Scanner nextDouble() method in Java with Examples
12 Oct, 2018 The nextDouble() method of java.util.Scanner class scans the next token of the input as a Double. If the translation is successful, the scanner advances past the input that matched. Syntax: public double nextDouble() Parameters: The function does not accepts any parameter. Return Value: This function retur...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 Oct, 2018" }, { "code": null, "e": 235, "s": 53, "text": "The nextDouble() method of java.util.Scanner class scans the next token of the input as a Double. If the translation is successful, the scanner advances past the input that m...
How to create a list of uniformly spaced numbers using a logarithmic scale with Python?
15 Mar, 2021 In this article, we will create a list of uniformly spaced numbers using a logarithmic scale. It means on a log scale difference between two adjacent samples is the same. The goal can be achieved using two different functions from the Python Numpy library. numpy.logspace: This function returns number scale...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Mar, 2021" }, { "code": null, "e": 285, "s": 28, "text": "In this article, we will create a list of uniformly spaced numbers using a logarithmic scale. It means on a log scale difference between two adjacent samples is the same. The ...
Number of divisors of a given number N which are divisible by K
06 May, 2021 Given a number N and a number K. The task is to find the number of divisors of N which are divisible by K. Here K is a number always less than or equal to √(N) Examples: Input: N = 12, K = 3 Output: 3 Input: N = 8, K = 2 Output: 3 Simple Approach: A simple approach is to check all the numbers from 1 to N...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 May, 2021" }, { "code": null, "e": 214, "s": 54, "text": "Given a number N and a number K. The task is to find the number of divisors of N which are divisible by K. Here K is a number always less than or equal to √(N)" }, { ...
Python | Reverse sequence of strictly increasing integers in a list
17 Apr, 2019 Given a list of integers, write a Python program to reverse the order of consecutively incrementing chunk in given list. Examples: Input : [0, 1, 9, 8, 7, 5, 3, 14] Output : [9, 1, 0, 8, 7, 5, 14, 3] Explanation: There are two chunks of strictly increasing elements (0, 1, 9) and (3, 14). Inp...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Apr, 2019" }, { "code": null, "e": 149, "s": 28, "text": "Given a list of integers, write a Python program to reverse the order of consecutively incrementing chunk in given list." }, { "code": null, "e": 159, "s": 149...
Plot t Distribution in R
27 Jul, 2021 The t-distribution, also known as the Student’s t-distribution is a type of probability distribution that is used to perform sampling of a normally distributed distribution where the sample size is small and the standard deviation of the input distribution is unknown. The distribution normally forms a bell...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jul, 2021" }, { "code": null, "e": 453, "s": 28, "text": "The t-distribution, also known as the Student’s t-distribution is a type of probability distribution that is used to perform sampling of a normally distributed distribution wh...
How to disable (grey out) a checkbutton in Tkinter?
Tkinter provides a variety of input widgets such as entry widget, text widget, listbox, combobox, spinbox, checkbox, etc. Checkboxes are used for taking validity input and the state gets active whenever the user clicks on the checkbutton. In terms of a particular application, we can enable and disable the state of Chec...
[ { "code": null, "e": 1545, "s": 1187, "text": "Tkinter provides a variety of input widgets such as entry widget, text widget, listbox, combobox, spinbox, checkbox, etc. Checkboxes are used for taking validity input and the state gets active whenever the user clicks on the checkbutton. In terms of a ...
How to prevent sticky hover effects for buttons on touch devices ?
27 Oct, 2020 When we add a hover effect to an element in CSS, it sticks in touch devices. In this article, we will learn how to solve this issue. There are two possible approaches to solve this problem – 1. Without Using JavaScript: It can be solved by using media query in CSS. The condition ‘hover: hover’ refers to t...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Oct, 2020" }, { "code": null, "e": 187, "s": 53, "text": "When we add a hover effect to an element in CSS, it sticks in touch devices. In this article, we will learn how to solve this issue. " }, { "code": null, "e": 245...
Generating dynamic URLs in Flask
15 Oct, 2021 Prerequisites: Basics of Flask When creating an application, it’s quite cumbersome to hard-code each URL. A better way to resolve this problem is through building Dynamic URLs. Let us briefly understand the meaning of a few common terms first. Dynamic Routing: It is the process of getting dynamic data(var...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2021" }, { "code": null, "e": 59, "s": 28, "text": "Prerequisites: Basics of Flask" }, { "code": null, "e": 273, "s": 59, "text": "When creating an application, it’s quite cumbersome to hard-code each URL. A ...
Typedef in Dart
08 Oct, 2020 Typedef in Dart is used to create a user-defined identity (alias) for a function, and we can use that identity in place of the function in the program code. When we use typedef we can define the parameters of the function. Syntax: typedef function_name ( parameters ); With the help of typedef, we can also...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2020" }, { "code": null, "e": 251, "s": 28, "text": "Typedef in Dart is used to create a user-defined identity (alias) for a function, and we can use that identity in place of the function in the program code. When we use typede...
Explain the different variants of for loop in TypeScript
16 Dec, 2021 Loops are used to execute a specific block of code a specific number of times. There are 2 types of loops in TypeScript which are Definite Loop (for), and Indefinite Loops (while, do..while) In TypeScript, we have basically 3 kinds of for loops. for for .. of for .. in for loop: The for loop is used to exe...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Dec, 2021" }, { "code": null, "e": 219, "s": 28, "text": "Loops are used to execute a specific block of code a specific number of times. There are 2 types of loops in TypeScript which are Definite Loop (for), and Indefinite Loops (wh...
Convert 2D array to object using map or reduce in JavaScript
Let’s say, we have a two-dimensional array that contains some data about the age of some people. The data is given by the following 2D array const data = [ ['Rahul',23], ['Vikky',27], ['Sanjay',29], ['Jay',19], ['Dinesh',21], ['Sandeep',45], ['Umesh',32], ['Rohit',28], ]; We are required to writ...
[ { "code": null, "e": 1284, "s": 1187, "text": "Let’s say, we have a two-dimensional array that contains some data about the age of some\npeople." }, { "code": null, "e": 1328, "s": 1284, "text": "The data is given by the following 2D array" }, { "code": null, "e": 148...
Handling Deadlocks
24 May, 2022 Deadlock is a situation where a process or a set of processes is blocked, waiting for some other resource that is held by some other waiting process. It is an undesirable state of the system. The following are the four conditions that must hold simultaneously for a deadlock to occur. Mutual Exclusion – A r...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2022" }, { "code": null, "e": 337, "s": 52, "text": "Deadlock is a situation where a process or a set of processes is blocked, waiting for some other resource that is held by some other waiting process. It is an undesirable sta...
D3.js | d3.mean() function
26 Jun, 2019 The d3.mean() function in D3.js is used to return the mean or average of the given array’s elements. If the array is empty then it returns undefined. Syntax: d3.mean(Array) Parameters: This function accepts a parameters Array which is an array of elements whose mean are to be calculated. Here elements shou...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jun, 2019" }, { "code": null, "e": 178, "s": 28, "text": "The d3.mean() function in D3.js is used to return the mean or average of the given array’s elements. If the array is empty then it returns undefined." }, { "code": nul...
How to overwrite or remove PowerShell alias?
You can overwrite the Powershell alias by redefining it. For example, if the alias is created Edit for Notepad.exe and if you want to overwrite it with another program, say wordpad.exe then use the below command. We will overwrite the Edit alias cmdlet with Wordpad.exe using the Set-Alias command. When you close the Po...
[ { "code": null, "e": 1400, "s": 1187, "text": "You can overwrite the Powershell alias by redefining it. For example, if the alias is created Edit for Notepad.exe and if you want to overwrite it with another program, say wordpad.exe then use the below command." }, { "code": null, "e": 158...
Map.has( ) In JavaScript
21 Jan, 2022 What is a Map in JavaScript ? Map is a data structure in JavaScript which allows storing of [key, value] pairs where any value can be either used as a key or value. The keys and values in the map collection may be of any type and if a value is added to the map collection using a key which already exists in...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jan, 2022" }, { "code": null, "e": 58, "s": 28, "text": "What is a Map in JavaScript ?" }, { "code": null, "e": 193, "s": 58, "text": "Map is a data structure in JavaScript which allows storing of [key, value] pai...
Toggle bits in the given range
05 Jul, 2022 Given a non-negative number n and two values l and r. The problem is to toggle the bits in the range l to r in the binary representation of n, i.e, to toggle bits from the rightmost lth bit to the rightmost rth bit. A toggle operation flips a bit 0 to 1 and a bit 1 to 0.Constraint: 1 <= l <= r <= number of...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jul, 2022" }, { "code": null, "e": 412, "s": 54, "text": "Given a non-negative number n and two values l and r. The problem is to toggle the bits in the range l to r in the binary representation of n, i.e, to toggle bits from the ri...
Where Does Python Look for Modules?
20 Aug, 2021 Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that module in that file and then we can use them. Modules can exist in various directories. In this article, we will discuss where does pyth...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Aug, 2021" }, { "code": null, "e": 287, "s": 28, "text": "Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that modu...
PySpark Collect() – Retrieve data from DataFrame
17 Jun, 2021 Collect() is the function, operation for RDD or Dataframe that is used to retrieve the data from the Dataframe. It is used useful in retrieving all the elements of the row from each partition in an RDD and brings that over the driver node/program. So, in this article, we are going to learn how to retrieve ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2021" }, { "code": null, "e": 276, "s": 28, "text": "Collect() is the function, operation for RDD or Dataframe that is used to retrieve the data from the Dataframe. It is used useful in retrieving all the elements of the row fro...
How to avoid ConcurrentModificationException while iterating a collection in java?
When you are working with collection objects, while one thread is iterating over a particular collection object, if you try to add or remove elements from it, a ConcurrentModificationException will be thrown. Not only that, If you are iterating a collection object, add or remove elements to it and try to iterate its co...
[ { "code": null, "e": 1396, "s": 1187, "text": "When you are working with collection objects, while one thread is iterating over a particular collection object, if you try to add or remove elements from it, a ConcurrentModificationException will be thrown." }, { "code": null, "e": 1659, ...
How to add a prefix to columns of an R data frame?
If we want to provide more information about the data, we have in columns of an R data frames then we might want to use prefixes. These prefixes help everyone to understand the data, for example, we can use data set name as a prefix, the analysis objective as a prefix, or something that is common among all the columns....
[ { "code": null, "e": 1636, "s": 1187, "text": "If we want to provide more information about the data, we have in columns of an R data frames then we might want to use prefixes. These prefixes help everyone to understand the data, for example, we can use data set name as a prefix, the analysis object...
Traverse through a HashSet in Java
14 Dec, 2021 As we all know HashSet elements are unordered so the traversed elements can be printed in any order. In order to perform operations over our HashSet such as insertion, deletion, updating elements than first we need to reach out in order to access the HashSet. below are few ways with which we can iterate ov...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Dec, 2021" }, { "code": null, "e": 438, "s": 53, "text": "As we all know HashSet elements are unordered so the traversed elements can be printed in any order. In order to perform operations over our HashSet such as insertion, deleti...
Python | Intersect two dictionaries through keys
28 Feb, 2019 Given two dictionaries, the task is to find the intersection of these two dictionaries through keys. Let’s see different ways to do this task.Method #1: Using dict comprehension # Python code to demonstrate# intersection of two dictionaries # using dict comprehension # inititialising dictionaryini_dict1 =...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Feb, 2019" }, { "code": null, "e": 206, "s": 28, "text": "Given two dictionaries, the task is to find the intersection of these two dictionaries through keys. Let’s see different ways to do this task.Method #1: Using dict comprehensi...
Material Design Lite - Icons
MDL provides a range of CSS classes to apply various predefined visual and behavioral enhancements and display the different types of checkboxes as icons. The following tables lists down the available classes and their effects. mdl-icon-toggle Identifies label as an MDL component and is required on label element. mdl-j...
[ { "code": null, "e": 2114, "s": 1886, "text": "MDL provides a range of CSS classes to apply various predefined visual and behavioral enhancements and display the different types of checkboxes as icons. The following tables lists down the available classes and their effects." }, { "code": nul...
Pascal - For-do Loop
A for-do 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 for the for-do loop in Pascal is as follows − for < variable-name > := < initial_value > to [down to] < final_value > do S; Where, the variable-name specifies a va...
[ { "code": null, "e": 2225, "s": 2083, "text": "A for-do 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": 2282, "s": 2225, "text": "The syntax for the for-do loop in Pascal...
T-SQL - UPDATE Statement
The SQL Server UPDATE Query is used to modify the existing records in a table. You can use WHERE clause with UPDATE query to update selected rows otherwise all the rows would be affected. Following is the basic syntax of UPDATE query with WHERE clause − UPDATE table_name SET column1 = value1, column2 = value2...., col...
[ { "code": null, "e": 2139, "s": 2060, "text": "The SQL Server UPDATE Query is used to modify the existing records in a table." }, { "code": null, "e": 2248, "s": 2139, "text": "You can use WHERE clause with UPDATE query to update selected rows otherwise all the rows would be affe...
Understanding Multicollinearity and How to Detect it in Python | by Terence Shin | Towards Data Science
Be sure to subscribe here or to my personal newsletter to never miss another article on data science guides, tricks and tips, life lessons, and more! Over the next few articles, I want to write about some really powerful topics related to regression analysis. For the longest time, I didn’t think there was much to linea...
[ { "code": null, "e": 322, "s": 172, "text": "Be sure to subscribe here or to my personal newsletter to never miss another article on data science guides, tricks and tips, life lessons, and more!" }, { "code": null, "e": 614, "s": 322, "text": "Over the next few articles, I want t...
D3.js - Colors API
Colors are displayed combining RED, GREEN and BLUE. Colors can be specified in the following different ways − By color names As RGB values As hexadecimal values As HSL values As HWB values The d3-color API provides representations for various colors. You can perform conversion and manipulation operations in API. Let us...
[ { "code": null, "e": 2240, "s": 2130, "text": "Colors are displayed combining RED, GREEN and BLUE. Colors can be specified in the following different ways −" }, { "code": null, "e": 2255, "s": 2240, "text": "By color names" }, { "code": null, "e": 2269, "s": 2255,...