title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
What are Python coding standards/best practices? | You can use the PEP8 guide as a holy grail. Almost all python world uses this guide to write clean understandable and standard python code. This is available as an extension as a linter for all modern text editors. You can check it out at http://www.python.org/dev/peps/pep-0008/
Properly Structure your folders. All pr... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "You can use the PEP8 guide as a holy grail. Almost all python world uses this guide to write clean understandable and standard python code. This is available as an extension as a linter for all modern text editors. You can check it out at http://www.py... |
Predicting vehicle fuel efficiency | by Ranganath Venkataraman | Towards Data Science | My previous posts focused on the application of machine learning and neural networks in datasets from the oil industry. These efforts gave me the confidence to successfully implement XGBoost and artificial neural networks to predict a major safety hazard at the oil refinery where I work. A major success that I’m very p... | [
{
"code": null,
"e": 500,
"s": 171,
"text": "My previous posts focused on the application of machine learning and neural networks in datasets from the oil industry. These efforts gave me the confidence to successfully implement XGBoost and artificial neural networks to predict a major safety hazard ... |
Install and run multiple Java versions on Linux and MacOS | by Md Kamaruzzaman | Towards Data Science | If you are a Java developer, you may need to install multiple Java versions on your machine. You may use Java8 or Java11 in your project, but want to learn newer versions of Java. Or maybe you are working on two different projects where two different versions of Java are used.
One way to achieve this is to install mult... | [
{
"code": null,
"e": 449,
"s": 171,
"text": "If you are a Java developer, you may need to install multiple Java versions on your machine. You may use Java8 or Java11 in your project, but want to learn newer versions of Java. Or maybe you are working on two different projects where two different vers... |
How to add new contacts in Android App using Kotlin? | This example demonstrates how to determine if network type (2G, 3G or 4G) in Android 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-... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrates how to determine if network type (2G, 3G or 4G) in Android Kotlin."
},
{
"code": null,
"e": 1283,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all req... |
Type Inference in C++ (auto and decltype) | In this tutorial, we will be discussing a program to understand Type interference in C++ (auto and decltype).
In case of auto keyword, the type of the variable is defined from the type of its initializer. Further with decltype, it lets you extract the type of variable from the called element.
Live Demo
#include <bits/... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand Type interference in C++ (auto and decltype)."
},
{
"code": null,
"e": 1356,
"s": 1172,
"text": "In case of auto keyword, the type of the variable is defined from the ty... |
Scala - Functions Call-by-Name | Typically, parameters to functions are by-value parameters; that is, the value of the parameter is determined before it is passed to the function. But what if we need to write a function that accepts as a parameter an expression that we don't want evaluated until it's called within our function? For this circumstance, ... | [
{
"code": null,
"e": 2356,
"s": 1998,
"text": "Typically, parameters to functions are by-value parameters; that is, the value of the parameter is determined before it is passed to the function. But what if we need to write a function that accepts as a parameter an expression that we don't want evalu... |
Statistical - TRIMMEAN Function | The TRIMMEAN function returns the mean of the interior of a data set. TRIMMEAN calculates the mean taken by excluding a percentage of data points from the top and bottom tails of a data set. You can use this function when you wish to exclude outlying data from your analysis.
TRIMMEAN (array, percent)
TRIMMEAN rounds t... | [
{
"code": null,
"e": 2130,
"s": 1854,
"text": "The TRIMMEAN function returns the mean of the interior of a data set. TRIMMEAN calculates the mean taken by excluding a percentage of data points from the top and bottom tails of a data set. You can use this function when you wish to exclude outlying da... |
How many ways can we read data from the keyboard in Java? | The java.io package provides various classes to read write data from various sources and destinations.
You can read data from user (keyboard) using various classes such as, Scanner, BufferedReader, InputStreamReader, Console etc.
From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path a... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "The java.io package provides various classes to read write data from various sources and destinations."
},
{
"code": null,
"e": 1292,
"s": 1165,
"text": "You can read data from user (keyboard) using various classes such as, Scanner, ... |
Count of subarrays having product as a perfect cube - GeeksforGeeks | 01 Nov, 2021
Given an array arr[] consisting of N positive integers, the task is to count the number of subarrays with product of its elements equal to a perfect cube.
Examples:
Input: arr[] = {1, 8, 4, 2}Output: 6Explanation:The subarrays with product of elements equal to a perfect cube are:
{1}. Therefore, product of... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24975,
"s": 24820,
"text": "Given an array arr[] consisting of N positive integers, the task is to count the number of subarrays with product of its elements equal to a perfect cube."
},
... |
Why do we use import statement in Java? Where it should be included in the class? | The import statement can be used to import an entire package or sometimes import certain classes and interfaces inside the package. The import statement is written before the class definition and after the package statement(if there is any). Also, the import statement is optional.
A program that demonstrates this in Ja... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "The import statement can be used to import an entire package or sometimes import certain classes and interfaces inside the package. The import statement is written before the class definition and after the package statement(if there is any). Also, the i... |
How to find the inner height and inner width of a browser window in JavaScript? | Javascript window object simply represents the browser window. This method is supported by all browsers. To get the inner height and inner width this method has provided some properties such as window.innerHeight and window.innerwidth respectively. Using these properties, it is easy to find the height and width of a br... | [
{
"code": null,
"e": 1429,
"s": 1062,
"text": "Javascript window object simply represents the browser window. This method is supported by all browsers. To get the inner height and inner width this method has provided some properties such as window.innerHeight and window.innerwidth respectively. Usin... |
Android Notification Example with Vibration, Sound, Action and Big View Styles | This example demonstrate about Android Notification Example with Vibration, Sound, Action and Big View Styles
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": 1172,
"s": 1062,
"text": "This example demonstrate about Android Notification Example with Vibration, Sound, Action and Big View Styles"
},
{
"code": null,
"e": 1301,
"s": 1172,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Projec... |
C# Properties (Get and Set) | Before we start to explain properties, you should have a basic understanding of "Encapsulation".
The meaning of Encapsulation, is to make sure that "sensitive" data is hidden
from users. To achieve this, you must:
declare fields/variables as private
provide public get
and set methods, through properties, to access a... | [
{
"code": null,
"e": 97,
"s": 0,
"text": "Before we start to explain properties, you should have a basic understanding of \"Encapsulation\"."
},
{
"code": null,
"e": 216,
"s": 97,
"text": "The meaning of Encapsulation, is to make sure that \"sensitive\" data is hidden \nfrom user... |
How to overlay two images in Android to set an ImageView? | This example demonstrates how do I overlay two images In Android to set an ImageView.
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"?>
<... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "This example demonstrates how do I overlay two images In Android to set an ImageView."
},
{
"code": null,
"e": 1277,
"s": 1148,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required ... |
MATLAB - Algebra - GeeksforGeeks | 09 Feb, 2021
Algebra is all about the study of mathematical symbols and rules for manipulating these symbols. Here variables are used to store/represent quantities. In MATLAB, there are certain in-built methods to solve algebra equations. Roots of equations, solving for x, simplifying an expression are some things we c... | [
{
"code": null,
"e": 24486,
"s": 24458,
"text": "\n09 Feb, 2021"
},
{
"code": null,
"e": 24815,
"s": 24486,
"text": "Algebra is all about the study of mathematical symbols and rules for manipulating these symbols. Here variables are used to store/represent quantities. In MATLAB, ... |
Split a number into individual digits using JavaScript | 24 Jan, 2022
In this article, we will get some input from user by using <input> element and the task is to split the given number into the individual digits with the help of JavaScript. There two approaches that are discussed below:Approach 1: First take the element from input element in string format (No need to conve... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 553,
"s": 52,
"text": "In this article, we will get some input from user by using <input> element and the task is to split the given number into the individual digits with the help of JavaScript. T... |
HTML | <button> name Attribute | 18 May, 2019
The <button> name attribute is used to specify the name attribute of <button> element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript.
Syntax:
<button name="name">
Attribute Values: It contains a single value name which describes the name of the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2019"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "The <button> name attribute is used to specify the name attribute of <button> element. It is used to reference the form-data after submitting the form or to reference the elem... |
Shortest Superstring Problem | Set 2 (Using Set Cover) | 29 Feb, 2016
Given a set of n strings S, find the smallest string that contains each string in the given set as substring. We may assume that no string in arr[] is substring of another string.
Examples:
Input: S = {"001", "01101", "010"}
Output: 0011010
Input: S = {"geeks", "quiz", "for"}
Output: geeksquizfor
Inp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Feb, 2016"
},
{
"code": null,
"e": 232,
"s": 52,
"text": "Given a set of n strings S, find the smallest string that contains each string in the given set as substring. We may assume that no string in arr[] is substring of another st... |
Partition array into two subarrays with every element in the right subarray strictly greater than every element in left subarray | 11 Jun, 2021
Given an array arr[] consisting of N integers, the task is to partition the array into two non-empty subarrays such that every element present in the right subarray is strictly greater than every element present in the left subarray. If it is possible to do so, then print the two resultant subarrays. Other... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 387,
"s": 54,
"text": "Given an array arr[] consisting of N integers, the task is to partition the array into two non-empty subarrays such that every element present in the right subarray is strict... |
JavaScript Date UTC() Method | 21 Oct, 2021
Below is the example of Date UTC() method.
Example:<script> var gfg = Date.UTC(2020, 07, 03); document.write("Output : " + gfg);</script>
<script> var gfg = Date.UTC(2020, 07, 03); document.write("Output : " + gfg);</script>
Output:Output : 1596412800000
Output : 1596412800000
The Date.UTC() method... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 71,
"s": 28,
"text": "Below is the example of Date UTC() method."
},
{
"code": null,
"e": 170,
"s": 71,
"text": "Example:<script> var gfg = Date.UTC(2020, 07, 03); document.w... |
Find all Pairs possible from the given Array | 27 Jan, 2022
Given an array arr[] of N integers, the task is to find all the pairs possible from the given array. Note:
(arr[i], arr[i]) is also considered as a valid pair.(arr[i], arr[j]) and (arr[j], arr[i]) are considered as two different pairs.
(arr[i], arr[i]) is also considered as a valid pair.
(arr[i], arr[j])... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 161,
"s": 52,
"text": "Given an array arr[] of N integers, the task is to find all the pairs possible from the given array. Note: "
},
{
"code": null,
"e": 290,
"s": 161,
"text... |
Python SQLite – CRUD Operations | 21 Apr, 2021
In this article, we will go through the CRUD Operation using the SQLite module in Python.
The abbreviation CRUD expands to Create, Read, Update and Delete. These four are fundamental operations in a database. In the sample database, we will create it, and do some operations. Let’s discuss these operations ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "In this article, we will go through the CRUD Operation using the SQLite module in Python."
},
{
"code": null,
"e": 373,
"s": 118,
"text": "The abbreviation... |
How to pass an Array to a Function in Golang? | 25 Mar, 2021
Arrays in Golang or Go programming language is much similar to other programming languages. In the program, sometimes we need to store a collection of data of the same type, like a list of student marks. Such type of collection is stored in a program using an Array. An array is a fixed-length sequence whic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Mar, 2021"
},
{
"code": null,
"e": 596,
"s": 28,
"text": "Arrays in Golang or Go programming language is much similar to other programming languages. In the program, sometimes we need to store a collection of data of the same type, l... |
How to use cURL to Get JSON Data and Decode JSON Data in PHP ? | 01 Apr, 2022
In this article, we are going to see how to use cURL to Get JSON data and Decode JSON data in PHP.
cURL:
It stands for Client URL.
It is a command line tool for sending and getting files using URL syntax.
cURL allows communicating with other servers using HTTP, FTP, Telnet, and more.
Approach:
We are goin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2022"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "In this article, we are going to see how to use cURL to Get JSON data and Decode JSON data in PHP."
},
{
"code": null,
"e": 134,
"s": 127,
"text": "cURL: "... |
Ceiling in a sorted array | 29 Jun, 2022
Given a sorted array and a value x, the ceiling of x is the smallest element in an array greater than or equal to x, and the floor is the greatest element smaller than or equal to x. Assume that the array is sorted in non-decreasing order. Write efficient functions to find the floor and ceiling of x. Examp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 366,
"s": 52,
"text": "Given a sorted array and a value x, the ceiling of x is the smallest element in an array greater than or equal to x, and the floor is the greatest element smaller than or equ... |
Reverse Diagonal elements of matrix | 28 Apr, 2021
Given a square matrix of order n*n, we have to reverse the elements of both diagonals.Examples:
Input : {1, 2, 3,
4, 5, 6,
7, 8, 9}
Output :{9, 2, 7,
4, 5, 6,
3, 8, 1}
Explanation:
Major Diagonal Elements before: 1 5 9
After ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 150,
"s": 52,
"text": "Given a square matrix of order n*n, we have to reverse the elements of both diagonals.Examples: "
},
{
"code": null,
"e": 671,
"s": 150,
"text": "Input :... |
Python OpenCV – cv2.transpose() method | 08 Jul, 2020
OpenCV is a library of programming functions mainly aimed at real-time computer vision. cv2.transpose() method is used to transpose a 2D array. The function cv::transpose rotate the image 90 degrees Counter clockwise.
Syntax: cv2.cv.transpose( src[, dst] )
Parameters:src: It is the image whose matrix is to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 246,
"s": 28,
"text": "OpenCV is a library of programming functions mainly aimed at real-time computer vision. cv2.transpose() method is used to transpose a 2D array. The function cv::transpose rota... |
How to open a component in a new tab in ReactJS ? | 19 Oct, 2021
React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, and keeps the UI in sync with the URL. In this tutorial, you will understand how to open a new component in another tab while residin... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 563,
"s": 53,
"text": "React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, ... |
Solidity – Break and Continue Statements | 11 May, 2022
In any programming language, Control statements are used to change the execution of the program. Solidity allows us to handle loops and switch statements. These statements are usually used when we have to terminate the loop without reaching the bottom or we have to skip some part of the block of code and s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 443,
"s": 28,
"text": "In any programming language, Control statements are used to change the execution of the program. Solidity allows us to handle loops and switch statements. These statements are... |
How to use labels in Java code? | Java provides two types of branching/control statements namely, break and continue.
This statement terminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch.
Following is the example of the break statement. Here we are trying to print elements up to 10 and... | [
{
"code": null,
"e": 1271,
"s": 1187,
"text": "Java provides two types of branching/control statements namely, break and continue."
},
{
"code": null,
"e": 1409,
"s": 1271,
"text": "This statement terminates the loop or switch statement and transfers execution to the statement im... |
Variables and autograd in Pytorch | 29 Jun, 2021
PyTorch is a python library developed by Facebook to run and train the machine and deep learning algorithms. In a neural network, we have to perform backpropagation which involves optimizing the parameter to minimize the error in its prediction.
For this PyTorch offers torch.autograd that does automatic di... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 274,
"s": 28,
"text": "PyTorch is a python library developed by Facebook to run and train the machine and deep learning algorithms. In a neural network, we have to perform backpropagation which invo... |
Single Responsibility Principle in Java with Examples | 06 Jun, 2021
SOLID is an acronym used to refer to a group of five important principles followed in software development. This principle is an acronym of the five principles which are given below...
Single Responsibility Principle (SRP)Open/Closed PrincipleLiskov’s Substitution Principle (LSP)Interface Segregation Princ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 237,
"s": 52,
"text": "SOLID is an acronym used to refer to a group of five important principles followed in software development. This principle is an acronym of the five principles which are give... |
Program to print circle pattern | 09 Apr, 2021
Given a positive integer n i.e, radius of the circle, print a circle using stars. Examples :
Input : n = 3
Output :
***
* *
* *
* *
* *
* *
***
Input : n = 6
Output :
*****
** **
** **
* *
* *
* *
* *
* *... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 148,
"s": 53,
"text": "Given a positive integer n i.e, radius of the circle, print a circle using stars. Examples : "
},
{
"code": null,
"e": 431,
"s": 148,
"text": "Input : n ... |
Find the maximum number of handshakes | 02 May, 2022
There are N persons in a room. Find the maximum number of Handshakes possible. Given the fact that any two persons shake hand exactly once.
Examples :
Input : N = 2
Output : 1.
There are only 2 persons in the room. 1 handshake take place.
Input : N = 10
Output : 45.
To maximize the number of handshakes, ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 193,
"s": 53,
"text": "There are N persons in a room. Find the maximum number of Handshakes possible. Given the fact that any two persons shake hand exactly once."
},
{
"code": null,
"e... |
Python | Pandas Series.pct_change() | 21 Jul, 2021
Pandas pct_change() method is applied on series with numeric data to calculate Percentage change after n number of elements. By default, it calculates percentage change of current element from the previous element. (Current-Previous/Previous) * 100.First, n(n=period) values are always NaN, since there is n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 374,
"s": 28,
"text": "Pandas pct_change() method is applied on series with numeric data to calculate Percentage change after n number of elements. By default, it calculates percentage change of cur... |
Fix "Execution Failed for task :app:compileDebugJavaWithJavac" in Android Studio - GeeksforGeeks | 19 Jun, 2021
Working on some important java project with Java code involved, and just when you hit that Build hammer icon, you get this:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* What went wrong:
Execution failed for task ':app:... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n19 Jun, 2021"
},
{
"code": null,
"e": 24849,
"s": 24725,
"text": "Working on some important java project with Java code involved, and just when you hit that Build hammer icon, you get this:"
},
{
"code": null,
"e": 25... |
Python Risk Management: Kelly Criterion | by Lester Leong | Towards Data Science | From the recent events in the financial market correction, I thought it would be a fun time to talk about risk management. Specifically, we’ll go over the Kelly Criterion with a concrete example in Python. First, we’ll discuss a brief overview of the Kelly Criterion. Next, we’ll go over a simple coin flip example. Last... | [
{
"code": null,
"e": 562,
"s": 172,
"text": "From the recent events in the financial market correction, I thought it would be a fun time to talk about risk management. Specifically, we’ll go over the Kelly Criterion with a concrete example in Python. First, we’ll discuss a brief overview of the Kell... |
A Demystifying Introduction to Formal Concept Analysis (FCA) | by Mathieu d'Aquin | Towards Data Science | How often does this happen? A new data repository comes up or someone points you to a nice new dataset from which you could see that there might be something interesting to do. Then you look at it, and well... it is a bunch of numbers. You can run some stats, and poke around, but what does it really mean?
Maybe formal ... | [
{
"code": null,
"e": 479,
"s": 172,
"text": "How often does this happen? A new data repository comes up or someone points you to a nice new dataset from which you could see that there might be something interesting to do. Then you look at it, and well... it is a bunch of numbers. You can run some st... |
How to validate XML response in Rest Assured? | We can validate XML response in Rest Assured. For obtaining an XML response, we have to pass the parameter ContentType.XML to the accept method. We shall first send a GET request via Postman on a mock API URL.
Using Rest Assured, we shall validate its XML Response containing the name of the subjects Rest Assured, Postm... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "We can validate XML response in Rest Assured. For obtaining an XML response, we have to pass the parameter ContentType.XML to the accept method. We shall first send a GET request via Postman on a mock API URL."
},
{
"code": null,
"e": 1426,
... |
What is the use of set.seed in R? | The set.seed helps to create the replicate of the random generation. If the name of the object changes that does not mean the replication will be changed but if we change the position then it will. Here, in the below example x4 in the first random generation and the x_4 in the second random generation with the same set... | [
{
"code": null,
"e": 1434,
"s": 1062,
"text": "The set.seed helps to create the replicate of the random generation. If the name of the object changes that does not mean the replication will be changed but if we change the position then it will. Here, in the below example x4 in the first random gener... |
How to enable or disable the GPS programmatically on Kotlin? | This example demonstrates how to enable or disable the GPS programmatically on 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 &minsu; Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "This example demonstrates how to enable or disable the GPS programmatically on Kotlin."
},
{
"code": null,
"e": 1278,
"s": 1149,
"text": "Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required... |
Selenium - Exception Handling | When we are developing tests, we should ensure that the scripts can continue their execution even if the test fails. An unexpected exception would be thrown if the worst case scenarios are not handled properly.
If an exception occurs due to an element not found or if the expected result doesn't match with actuals, we s... | [
{
"code": null,
"e": 2086,
"s": 1875,
"text": "When we are developing tests, we should ensure that the scripts can continue their execution even if the test fails. An unexpected exception would be thrown if the worst case scenarios are not handled properly."
},
{
"code": null,
"e": 2301,... |
numpy.select() function | Python | 22 Apr, 2020
numpy.select()() function return an array drawn from elements in choicelist, depending on conditions.
Syntax : numpy.select(condlist, choicelist, default = 0)Parameters :condlist : [list of bool ndarrays] It determine from which array in choicelist the output elements are taken. When multiple conditions ar... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "numpy.select()() function return an array drawn from elements in choicelist, depending on conditions."
},
{
"code": null,
"e": 717,
"s": 130,
"text": "Synt... |
Fill an array with specific values in Julia | Array fill() method | 27 Jan, 2022
The fill() is an inbuilt function in julia which is used to return an array of specified dimensions filled with a specific value passed to it as parameter.
Syntax: fill(Value, Dimension)Parameters:
Value: To be filled in the array
Dimension: Required size of the array
Returns: It returns an array of nXn... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "The fill() is an inbuilt function in julia which is used to return an array of specified dimensions filled with a specific value passed to it as parameter. "
},
{
"cod... |
Compute Variance and Standard Deviation of a value in R Programming – var() and sd() Function | 26 May, 2020
var() function in R Language computes the sample variance of a vector. It is the measure of how much value is away from the mean value.
Syntax: var(x)
Parameters:x : numeric vector
Example 1: Computing variance of a vector
# R program to illustrate# variance of vector # Create example vectorx <- c(1, 2, 3... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 188,
"s": 52,
"text": "var() function in R Language computes the sample variance of a vector. It is the measure of how much value is away from the mean value."
},
{
"code": null,
"e": 2... |
React-Bootstrap Tables Component | 23 Sep, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. Bootstrap was re-built and revamped for React, hence it is known as React-Bootstrap.
Tables in react-bootstrap come with predefined style classes which are both responsive and reliable.
Table props:
bordered: Adds borders on... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Bootstrap was re-built and revamped for React, hence it is known as React-Bootstrap. "
},
... |
Linear Congruence method for generating Pseudo Random Numbers | 17 Jul, 2021
Linear Congruential Method is a class of Pseudo Random Number Generator (PRNG) algorithms used for generating sequences of random-like numbers in a specific range. This method can be defined as:
where,
X, is the sequence of pseudo-random numbersm, ( > 0) the modulusa, (0, m) the multiplierc, (0, m) the in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jul, 2021"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Linear Congruential Method is a class of Pseudo Random Number Generator (PRNG) algorithms used for generating sequences of random-like numbers in a specific range. This method... |
C++ Program to Find all triplets with zero sum | 06 Jan, 2022
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero.
Examples :
Input : arr[] = {0, -1, 2, -3, 1}
Output : (0 -1 1), (2 -3 1)
Explanation : The triplets with zero sum are
0 + -1 + 1 = 0 and 2 + -3 + 1 = 0
Input : arr[] = {1, -2, 1, 0, 5}
Output : 1 -2 1
Ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "Given an array of distinct elements. The task is to find triplets in the array whose sum is zero."
},
{
"code": null,
"e": 138,
"s": 126,
"text": "Examples... |
Length of the longest valid substring | 28 Feb, 2022
Given a string consisting of opening and closing parenthesis, find the length of the longest valid parenthesis substring.
Examples:
Input : ((()
Output : 2
Explanation : ()
Input: )()())
Output : 4
Explanation: ()()
Input: ()(()))))
Output: 6
Explanation: ()(())
A Simple Approach is to find all the s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 176,
"s": 54,
"text": "Given a string consisting of opening and closing parenthesis, find the length of the longest valid parenthesis substring."
},
{
"code": null,
"e": 187,
"s": 1... |
JavaScript | Math.round( ) function | 09 Feb, 2022
The Math.round() function in JavaScript is used to round the number passed as parameter to its nearest integer.Syntax
Math.round(value)
Parameters :
The number to be rounded to its nearest integer.
Returns :
Result after rounding the number passed as a parameter to the function passed as parameter.
Below a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "The Math.round() function in JavaScript is used to round the number passed as parameter to its nearest integer.Syntax"
},
{
"code": null,
"e": 164,
"s": 146,
... |
Communication between two process using signals in C | 31 Jan, 2019
Prerequisite : C signal handling
In this post, the communication between child and parent processes is done using kill() and signal(), fork() system call.
fork() creates the child process from the parent. The pid can be checked to decide whether it is the child (if pid == 0) or the parent (pid = child proc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 85,
"s": 52,
"text": "Prerequisite : C signal handling"
},
{
"code": null,
"e": 207,
"s": 85,
"text": "In this post, the communication between child and parent processes is done... |
LISP - Numbers | Common Lisp defines several kinds of numbers. The number data type includes various kinds of numbers supported by LISP.
The number types supported by LISP are −
Integers
Ratios
Floating-point numbers
Complex numbers
The following diagram shows the number hierarchy and various numeric data types available in LISP −
The ... | [
{
"code": null,
"e": 2180,
"s": 2060,
"text": "Common Lisp defines several kinds of numbers. The number data type includes various kinds of numbers supported by LISP."
},
{
"code": null,
"e": 2221,
"s": 2180,
"text": "The number types supported by LISP are −"
},
{
"code":... |
\text - Tex Command | \text - Used to produce text-mode material within a mathematical expression.
{ \text #1}
\text command is used to produce text-mode material (in a given font) within a mathematical expression.
|x| = x \text{ for all \(x \ge 0\)}
|x|=x for all x≥0
\text{\alpha in text mode }\alpha
\alpha in text mode α
|x| = x \... | [
{
"code": null,
"e": 8063,
"s": 7986,
"text": "\\text - Used to produce text-mode material within a mathematical expression."
},
{
"code": null,
"e": 8075,
"s": 8063,
"text": "{ \\text #1}"
},
{
"code": null,
"e": 8179,
"s": 8075,
"text": "\\text command is us... |
What is the best way to auto scale TextView Text to Fit within Bounds on Android? | This example demonstrates how to do I auto scale TextView text to fit within the bounds on 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.
Add the following dependencies to build.gradle: Module: App)
implementation 'com.android.su... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "This example demonstrates how to do I auto scale TextView text to fit within the bounds on android."
},
{
"code": null,
"e": 1291,
"s": 1162,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill... |
Android | How to add Radio Buttons in an Android Application? - GeeksforGeeks | 29 Sep, 2021
Pre-requisites:
Android App Development Fundamentals for Beginners
Guide to Install and Set up Android Studio
Android | Starting with first app/android project
Android | Running your first Android app
Android radio button is a widget which can have more than one option to choose from. The user can choose ... | [
{
"code": null,
"e": 24206,
"s": 24178,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 24223,
"s": 24206,
"text": "Pre-requisites: "
},
{
"code": null,
"e": 24274,
"s": 24223,
"text": "Android App Development Fundamentals for Beginners"
},
{
"code": ... |
Synchronization by using Semaphore in Python - GeeksforGeeks | 11 Oct, 2020
In Lock and RLock, at a time only one Thread is allowed to execute but sometimes our requirement is to execute a particular number of Threads at a time.
Suppose we have to allow at a time 10 members to access the Database and only 4 members are allowed to access Network Connection. To handle such types ... | [
{
"code": null,
"e": 24686,
"s": 24658,
"text": "\n11 Oct, 2020"
},
{
"code": null,
"e": 24842,
"s": 24686,
"text": "In Lock and RLock, at a time only one Thread is allowed to execute but sometimes our requirement is to execute a particular number of Threads at a time. "
},
... |
Python Module for easy data pre-processing for beginners | by Benjamin Lau | Towards Data Science | Features in structured data can come in many forms including continuous, categorical, datetime and more. Normally to build a predictive model, we would look at feature selection or feature engineering to gather more insights or input more relevant data into the model. However, in cases where the data has a large number... | [
{
"code": null,
"e": 757,
"s": 172,
"text": "Features in structured data can come in many forms including continuous, categorical, datetime and more. Normally to build a predictive model, we would look at feature selection or feature engineering to gather more insights or input more relevant data in... |
Convert an image into Blur using HTML/CSS - GeeksforGeeks | 16 Feb, 2019
Given an image and the task is to convert the image into blur image using CSS property. In CSS, filter property is used to convert an image into blur image. Filter property is mainly used to set the visual effect of an image.
Syntax:
filter: blur()
Example 1: This example use blur filter to convert the im... | [
{
"code": null,
"e": 24846,
"s": 24818,
"text": "\n16 Feb, 2019"
},
{
"code": null,
"e": 25072,
"s": 24846,
"text": "Given an image and the task is to convert the image into blur image using CSS property. In CSS, filter property is used to convert an image into blur image. Filter... |
How to style an hr element with CSS? | To style an hr element with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<style>
body{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 20px;
}
hr{
margin-bottom: 20px;
}
... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "To style an hr element with CSS, the code is as follows −"
},
{
"code": null,
"e": 1131,
"s": 1120,
"text": " Live Demo"
},
{
"code": null,
"e": 1913,
"s": 1131,
"text": "<!DOCTYPE html>\n<html>\n<meta name=\"view... |
Generating Fractals with Blender and Animation-Nodes | by 5agado | Towards Data Science | What: this is a collection of tutorials, examples and resources for generating fractals visuals using Blender. I’ll cover topics such as recursion, n-flakes, L-systems, Mandelbrot/Julia sets and derivations.
Why: if you are fascinated by fractals patterns, interested in procedural generation in Blender and want to get ... | [
{
"code": null,
"e": 379,
"s": 171,
"text": "What: this is a collection of tutorials, examples and resources for generating fractals visuals using Blender. I’ll cover topics such as recursion, n-flakes, L-systems, Mandelbrot/Julia sets and derivations."
},
{
"code": null,
"e": 575,
"... |
Cubic Bezier Curve Implementation in C - GeeksforGeeks | 04 Jan, 2022
What is a bezier curve? So a Bezier curve is a mathematically defined curve used in two-dimensional graphic applications like adobe Illustrator, Inkscape etc. The curve is defined by four points: the initial position and the terminating position i.e P0 and P3 respectively (which are called “anchors”) and t... | [
{
"code": null,
"e": 24506,
"s": 24478,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 25892,
"s": 24506,
"text": "What is a bezier curve? So a Bezier curve is a mathematically defined curve used in two-dimensional graphic applications like adobe Illustrator, Inkscape etc. The ... |
How to import a single function from a Python module? | You can use the "from module import function" statement to import a specific function from a Python module. For example, if you want to import the sin function from the math library without importing any other function, you can do it as follows:
>>> from math import sin
>>> sin(0)
0.0
Note that you don't have to prefix... | [
{
"code": null,
"e": 1308,
"s": 1062,
"text": "You can use the \"from module import function\" statement to import a specific function from a Python module. For example, if you want to import the sin function from the math library without importing any other function, you can do it as follows:"
},... |
Maximum value of difference of a pair of elements and their Index | Practice | GeeksforGeeks | Given an array arr[] of N positive integers. Find maximum value of |arr[i] – arr[j]| + |i – j|, (0 <= i, j <= N – 1)
Example 1:
Input:
N = 4
arr[] = {1, 2, 3, 1}
Output:
4
Explanation:
Choosing i=0 and j=2, will result in
|1-3|+|0-2| = 4, which is the maximum
possible value.
Example 2:
Input:
N = 3
A[] = {1, 1, 1}... | [
{
"code": null,
"e": 355,
"s": 238,
"text": "Given an array arr[] of N positive integers. Find maximum value of |arr[i] – arr[j]| + |i – j|, (0 <= i, j <= N – 1)"
},
{
"code": null,
"e": 368,
"s": 357,
"text": "Example 1:"
},
{
"code": null,
"e": 518,
"s": 368,
... |
Scrape Data from PDF Files Using Python and tabula-py | by Aaron Zhu | Towards Data Science | Data science professionals are dealing with data in all shapes and forms. Data could be stored in popular SQL databases, such as PostgreSQL, MySQL, or an old-fashioned excel spreadsheet. Sometimes, data might also be saved in an unconventional format, such as PDF. In this article, I am going to talk about how to scrape... | [
{
"code": null,
"e": 540,
"s": 172,
"text": "Data science professionals are dealing with data in all shapes and forms. Data could be stored in popular SQL databases, such as PostgreSQL, MySQL, or an old-fashioned excel spreadsheet. Sometimes, data might also be saved in an unconventional format, suc... |
All Pandas groupby() You Should Know for Grouping Data and Performing Operations | by B. Chen | Towards Data Science | In exploratory data analysis, we often would like to analyze data by some categories. In SQL, the GROUP BY statement groups row that has the same category values into summary rows. In Pandas, SQL’s GROUP BY operation is performed using the similarly named groupby() method. Pandas’ groupby() allows us to split data into... | [
{
"code": null,
"e": 554,
"s": 172,
"text": "In exploratory data analysis, we often would like to analyze data by some categories. In SQL, the GROUP BY statement groups row that has the same category values into summary rows. In Pandas, SQL’s GROUP BY operation is performed using the similarly named... |
Tryit Editor v3.7 | Tryit: The flex-basis property | [] |
C# | Gets or Sets the element at the specified index in the List - GeeksforGeeks | 01 Feb, 2019
List<T>.Item[Int32] Property is used to gets or sets the element at the specified index.
Properties of List:
It is different from the arrays. A list can be resized dynamically but arrays cannot.
List class can accept null as a valid value for reference types and it also allows duplicate elements.
If the Co... | [
{
"code": null,
"e": 24127,
"s": 24099,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24216,
"s": 24127,
"text": "List<T>.Item[Int32] Property is used to gets or sets the element at the specified index."
},
{
"code": null,
"e": 24236,
"s": 24216,
"text": "P... |
ASP.NET MVC - Routing | Routing is the process of directing an HTTP request to a controller and the functionality of this processing is implemented in System.Web.Routing. This assembly is not part of ASP.NET MVC. It is actually part of the ASP.NET runtime, and it was officially released with the ASP.NET as a .NET 3.5 SP1.
System.Web.Routing i... | [
{
"code": null,
"e": 2569,
"s": 2269,
"text": "Routing is the process of directing an HTTP request to a controller and the functionality of this processing is implemented in System.Web.Routing. This assembly is not part of ASP.NET MVC. It is actually part of the ASP.NET runtime, and it was officiall... |
Capsule Neural Networks – Part 2: What is a Capsule? | by Tomer Eldor | Towards Data Science | This is the second part of a Capsule Networks explanation series. Post #1 is here, check it out if you haven’t yet.
In classic CNNs, each neuron in the first layer represents a pixel. Then, it feeds this information forward to next layers. The next convolutional layers group a bunch of neurons together, so that a singl... | [
{
"code": null,
"e": 287,
"s": 171,
"text": "This is the second part of a Capsule Networks explanation series. Post #1 is here, check it out if you haven’t yet."
},
{
"code": null,
"e": 838,
"s": 287,
"text": "In classic CNNs, each neuron in the first layer represents a pixel. Th... |
How to set different opacity of edgecolor and facecolor of a patch in Matplotlib? | To set different opacity of edge and face color, we can use a color tuple and the 4th index of the tuple could set the opacity value of the colors.
Set the figure size and adjust the padding between and around the subplots.
Create a figure and a set of subplots using subplots() method.
Set different values for edge and... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "To set different opacity of edge and face color, we can use a color tuple and the 4th index of the tuple could set the opacity value of the colors."
},
{
"code": null,
"e": 1286,
"s": 1210,
"text": "Set the figure size and adjust the... |
C++ Program to implement Linear Extrapolation | In this tutorial, we will be discussing a program to implement Linear Extrapolation.
Extrapolation is defined as a process in which the required value for a certain function is beyond the lower or the upper limits of the function definition.
In the case of Linear Extrapolation, the value beyond the scope is found using... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to implement Linear Extrapolation."
},
{
"code": null,
"e": 1304,
"s": 1147,
"text": "Extrapolation is defined as a process in which the required value for a certain function is beyon... |
Python - Dictionary Key Value lists combinations - GeeksforGeeks | 01 Aug, 2020
Given dictionary with values as list, extract all the possible combinations, both cross keys and with values.
Input : test_dict = {“Gfg” : [4, 5], “is” : [1, 2], “Best” : [9, 4]}Output : {0: [[‘Gfg’, 4], [‘is’, 1], [‘Best’, 9]], 1: [[‘Gfg’, 4], [‘is’, 1], [‘Best’, 4]], 2: [[‘Gfg’, 4], [‘is’, 2], [‘Best’, 9... | [
{
"code": null,
"e": 25727,
"s": 25699,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 25837,
"s": 25727,
"text": "Given dictionary with values as list, extract all the possible combinations, both cross keys and with values."
},
{
"code": null,
"e": 26333,
"s": ... |
Count non-NA values by group in DataFrame in R - GeeksforGeeks | 30 Jun, 2021
In this article, we will discuss how to count non-NA values by the group in dataframe in R Programming Language.
The dplyr package is used to perform simulations in the data by performing manipulations and transformations. The group_by() method in R programming language is used to group the specified dataf... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 26600,
"s": 26487,
"text": "In this article, we will discuss how to count non-NA values by the group in dataframe in R Programming Language."
},
{
"code": null,
"e": 26919,
"s... |
How to design Meet the Team Page using HTML and CSS ? - GeeksforGeeks | 13 Aug, 2021
Creating Structure: In this section, we will create a basic structure for the meet the team page. We will attach the icon and put the text that will be placed on the card of members will add button.
CDN links for the Icons from the Font Awesome:
<link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/aj... | [
{
"code": null,
"e": 31624,
"s": 31596,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 31823,
"s": 31624,
"text": "Creating Structure: In this section, we will create a basic structure for the meet the team page. We will attach the icon and put the text that will be placed on t... |
Loops in MySQL - GeeksforGeeks | 17 Jan, 2022
The MySQL LOOP statement could be used to run a block of code or set of statements, again and again, depends on the condition.
Syntax :
[labelname:] LOOP
statements
END LOOP [labelname]
Parameters –
labelname : It is an optional label at the start and end.
statements : They could have one or multiple st... | [
{
"code": null,
"e": 25562,
"s": 25534,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 25689,
"s": 25562,
"text": "The MySQL LOOP statement could be used to run a block of code or set of statements, again and again, depends on the condition."
},
{
"code": null,
"e":... |
How to pass an argument to the event handler in Tkinter? | In most situations, the callback functions can refer to as an Instance Method. An instance method accesses all its members and performs operations with them without specifying any arguments.
Let's consider a case where more than one component is defined and we want to handle some events with those components. To run mu... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "In most situations, the callback functions can refer to as an Instance Method. An instance method accesses all its members and performs operations with them without specifying any arguments."
},
{
"code": null,
"e": 1453,
"s": 1253,
... |
\bf - Tex Command | \bf - Used to turn on boldface; affects uppercase and lowercase letters, and digits.
{ \bf ... }
\bf command is used to turn on boldface; affects uppercase and lowercase letters, and digits.
\bf AaBb\alpha\beta123
AaBbαβ123
{\bf A B} A B
ABAB
\bf AB \rm CD
ABCD
\bf{AB}CD
ABCD
\bf AaBb\alpha\beta123
... | [
{
"code": null,
"e": 8071,
"s": 7986,
"text": "\\bf - Used to turn on boldface; affects uppercase and lowercase letters, and digits."
},
{
"code": null,
"e": 8083,
"s": 8071,
"text": "{ \\bf ... }"
},
{
"code": null,
"e": 8177,
"s": 8083,
"text": "\\bf command... |
Mobile Angular UI - Accordions | Accordions are mostly used when the content is supposed to be in section type of view and any one section is visible at a time. You can hide and open the next section to view the contents in it.
Let us work on an example to see the working of an Accordion in Mobile Angular UI.
<!DOCTYPE html>
<html>
<head>
<me... | [
{
"code": null,
"e": 2506,
"s": 2311,
"text": "Accordions are mostly used when the content is supposed to be in section type of view and any one section is visible at a time. You can hide and open the next section to view the contents in it."
},
{
"code": null,
"e": 2589,
"s": 2506,
... |
Displaying distinct values in a column filtered on other column in SAP BO report | There are multiple ways to do this. First is by creating a variable like this:
Terms Count =Count([Terms Code]) in ([Sales #])
You have to add this variable to your report. It will display 1 for all Sales # 1000 and 2 for all Sales # 1001. You can apply a filter on Count > 1.
You can also do this using PREVIOUS() funct... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "There are multiple ways to do this. First is by creating a variable like this:"
},
{
"code": null,
"e": 1189,
"s": 1141,
"text": "Terms Count =Count([Terms Code]) in ([Sales #])"
},
{
"code": null,
"e": 1339,
"s": 118... |
C# | Remove() Method - GeeksforGeeks | 31 Jan, 2019
In C#, Remove() method is a String Method. It is used for removing all the characters from the specified position of a string. If the length is not specified, then it will remove all the characters after specified position. This method can be overloaded by changing the number of arguments passed to it.
Syn... | [
{
"code": null,
"e": 24436,
"s": 24408,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24740,
"s": 24436,
"text": "In C#, Remove() method is a String Method. It is used for removing all the characters from the specified position of a string. If the length is not specified, then... |
Batch Script - NET STOP/START | This command is used to stop and start a particular service.
Net stop/start [servicename]
NET STOP Spooler
The above command is used to stop the printer spooler service. Following is the output of the above command.
The Print Spooler service is stopping.
The Print Spooler service was stopped successfully.
NET START Sp... | [
{
"code": null,
"e": 2230,
"s": 2169,
"text": "This command is used to stop and start a particular service."
},
{
"code": null,
"e": 2260,
"s": 2230,
"text": "Net stop/start [servicename]\n"
},
{
"code": null,
"e": 2277,
"s": 2260,
"text": "NET STOP Spooler"
... |
Python - Merge DataFrames of different length | To merge dataframes of different length, we need to use the merge() method. Let’s say the following is our 1st DataFrame with length 4 −
dataFrame1 = pd.DataFrame(
{
"Car": ['BMW', 'Lexus', 'Audi', 'Jaguar']
}
)
print("DataFrame1 ...\n",dataFrame1)
print("DataFrame1 length = ", len(dataFrame1))
Following i... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "To merge dataframes of different length, we need to use the merge() method. Let’s say the following is our 1st DataFrame with length 4 −"
},
{
"code": null,
"e": 1371,
"s": 1199,
"text": "dataFrame1 = pd.DataFrame(\n {\n \"Car... |
Solidity - Libraries | Libraries are similar to Contracts but are mainly intended for reuse. A Library contains functions which other contracts can call. Solidity have certain restrictions on use of a Library. Following are the key characteristics of a Solidity Library.
Library functions can be called directly if they do not modify the state... | [
{
"code": null,
"e": 2803,
"s": 2555,
"text": "Libraries are similar to Contracts but are mainly intended for reuse. A Library contains functions which other contracts can call. Solidity have certain restrictions on use of a Library. Following are the key characteristics of a Solidity Library."
},... |
YouTube Downloader with Python | Towards Data Science | Hello readers! Today, we will be building a YouTube downloader inPython3 using the PyTube3 library. The original pytube library no longer works and so we need to use the pytube3 library which only works with Python3 and not with Python2.
We will see various things we can do with our Youtube Downloader and the various f... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "Hello readers! Today, we will be building a YouTube downloader inPython3 using the PyTube3 library. The original pytube library no longer works and so we need to use the pytube3 library which only works with Python3 and not with Python2."
},
{
"co... |
Count of subsets having maximum possible XOR value - GeeksforGeeks | 17 Jan, 2022
Given an array arr[] consisting of N positive integers. The task is to count the number of different non-empty subsets of arr[] having maximum bitwise XOR.
Examples:
Input: arr[] = {3, 1}Output: 1Explanation: The maximum possible bitwise XOR of a subset is 3. In arr[] there is only one subset with bitwis... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 24953,
"s": 24796,
"text": "Given an array arr[] consisting of N positive integers. The task is to count the number of different non-empty subsets of arr[] having maximum bitwise XOR. "
},
... |
Find the values of X and Y in the Given Equations - GeeksforGeeks | 15 Apr, 2021
Given two numbers and . Find the values of X and Y in the equations.
A = X + YB = X xor Y
A = X + Y
B = X xor Y
The task is to make X as minimum as possible. If it is not possible to find any valid values for X and Y then print -1.Examples:
Input : A = 12, B = 8
Output : X = 2, Y = 10
Input : A = 12, ... | [
{
"code": null,
"e": 26253,
"s": 26225,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 26324,
"s": 26253,
"text": "Given two numbers and . Find the values of X and Y in the equations. "
},
{
"code": null,
"e": 26345,
"s": 26324,
"text": "A = X + YB = X xor ... |
Forecasting COVID-19 cases in India | by Ishan Choudhary | Towards Data Science | COVID-19 has taken the world by storm after first being reported in Wuhan, China in December-2019. Since then, there has been an exponential growth in the number of such cases around the globe. As of 28th March 2020, the total reported cases reached 668,352 out of which 31,027 have died. The below figure shows the outb... | [
{
"code": null,
"e": 531,
"s": 172,
"text": "COVID-19 has taken the world by storm after first being reported in Wuhan, China in December-2019. Since then, there has been an exponential growth in the number of such cases around the globe. As of 28th March 2020, the total reported cases reached 668,3... |
GZIPOutputStream Class in Java - GeeksforGeeks | 20 Jul, 2021
The java.util.zip package provides classes to compress and decompress the file contents. FileInputStream, FileOutputStream, and GZIPOutputStream classes are provided in Java to compress and decompress the files. The GZIPOutputStream class is useful for writing compressed data in GZIP file format. However, ... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 25670,
"s": 25237,
"text": "The java.util.zip package provides classes to compress and decompress the file contents. FileInputStream, FileOutputStream, and GZIPOutputStream classes are provid... |
Check if a given string is a valid number (Integer or Floating Point) in Java - GeeksforGeeks | 11 Dec, 2018
In the article Check if a given string is a valid number, we have discussed general approach to check whether a string is a valid number or not. In Java we can use Wrapper classes parse() methods along with try-catch blocks to check for a number.
For integer number
Integer class provides a static method pa... | [
{
"code": null,
"e": 24866,
"s": 24838,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 25113,
"s": 24866,
"text": "In the article Check if a given string is a valid number, we have discussed general approach to check whether a string is a valid number or not. In Java we can use... |
Working with Flux.jl Models on the Hugging Face Hub 🤗 | by Logan Kilpatrick | Towards Data Science | This article will go over the details of how to save a model in Flux.jl (the 100% Julia Deep Learning package) and then upload or retrieve it from the Hugging Face Hub. For those who don’t know what Hugging Face (HF) is, it’s like GitHub, but for Machine Learning models. Traditionally, machine learning models would oft... | [
{
"code": null,
"e": 785,
"s": 172,
"text": "This article will go over the details of how to save a model in Flux.jl (the 100% Julia Deep Learning package) and then upload or retrieve it from the Hugging Face Hub. For those who don’t know what Hugging Face (HF) is, it’s like GitHub, but for Machine ... |
C# | Check if a SortedList object contains a specific value - GeeksforGeeks | 06 Sep, 2021
SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based indexing). This comes under System.Collections namespace. SortedList.ContainsValue(Object) method is used to check whether a SortedList object c... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 26282,
"s": 25941,
"text": "SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based ... |
Find Prime numbers in a 2D Array (Matrix) - GeeksforGeeks | 29 Nov, 2021
Given a 2d array mat[][], the task is to find and print the prime numbers along with their position (1-based indexing) in this 2d array.
Examples:
Input: mat[][] = {{1, 2}, {2, 1}}
Output:
1 2 2
2 1 2
Explanation: First prime is at position row 1 and column 2 and the value is 2
Second prime is at posi... | [
{
"code": null,
"e": 26115,
"s": 26084,
"text": " \n29 Nov, 2021\n"
},
{
"code": null,
"e": 26252,
"s": 26115,
"text": "Given a 2d array mat[][], the task is to find and print the prime numbers along with their position (1-based indexing) in this 2d array."
},
{
"code": n... |
C++ Program to Implement Queue in STL | A queue is a linear structure which follows First In First Out (FIFO) order in which the operations are performed on the elements of the queue.
Functions used here:
q.size() = Returns the size of queue.
q.push() = It is used to insert elements to the queue.
q.pop() = To pop out the value from the queue.
q.f... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "A queue is a linear structure which follows First In First Out (FIFO) order in which the operations are performed on the elements of the queue."
},
{
"code": null,
"e": 1484,
"s": 1206,
"text": "Functions used here:\n q.size() = Re... |
Java Program to Segregate 0s on Left Side & 1s on Right Side of the Array - GeeksforGeeks | 30 Mar, 2022
You are given an array of 0s and 1s in random order. Segregate 0s on the left side and 1s on the right side of the array. The basic goal is to traverse array elements and sort in segregating 0s and 1s.
Illustration:
Input array = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0]
Output array = [0, 0, 0, 0, 0, 1, 1, 1... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n30 Mar, 2022"
},
{
"code": null,
"e": 25440,
"s": 25237,
"text": "You are given an array of 0s and 1s in random order. Segregate 0s on the left side and 1s on the right side of the array. The basic goal is to traverse array eleme... |
SQL | Aliases | 09 Jan, 2019
Aliases are the temporary names given to table or column for the purpose of a particular SQL query. It is used when name of column or table is used other than their original names, but the modified name is only temporary.
Aliases are created to make table or column names more readable.
The renaming is just... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jan, 2019"
},
{
"code": null,
"e": 276,
"s": 54,
"text": "Aliases are the temporary names given to table or column for the purpose of a particular SQL query. It is used when name of column or table is used other than their original ... |
Python – Case insensitive string replacement | 23 Jun, 2022
Given a string of words. The task is to write a Python program to replace the given word irrespective of the case with the given string.
Examples:
Input : test_str = “gfg is BeSt”, repl = “good”, subs = “best”
Output : gfg is good
Explanation : BeSt is replaced by “good” ignoring cases.
Input : test_str = ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "Given a string of words. The task is to write a Python program to replace the given word irrespective of the case with the given string."
},
{
"code": null,
"e": 1... |
Python | ARIMA Model for Time Series Forecasting | 19 Feb, 2020
A Time Series is defined as a series of data points indexed in time order. The time order can be daily, monthly, or even yearly. Given below is an example of a Time Series that illustrates the number of passengers of an airline per month from the year 1949 to 1960.
Time Series ForecastingTime Series foreca... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 320,
"s": 54,
"text": "A Time Series is defined as a series of data points indexed in time order. The time order can be daily, monthly, or even yearly. Given below is an example of a Time Series th... |
How to Completely Uninstall Android Studio on Mac? | 29 Jul, 2021
Maybe you messed up with your current installation of Android Studio or maybe some nasty error came in even after restarting it several times, well, and doing all the troubleshooting steps didn’t help you either...So...? Uninstalling seems the only way out, let’s have a look at how to uninstall Android Stu... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 394,
"s": 53,
"text": "Maybe you messed up with your current installation of Android Studio or maybe some nasty error came in even after restarting it several times, well, and doing all the trouble... |
Python – Reverse Row sort in Lists of List | 16 Jun, 2022
Sometimes, while working with data, we can have a problem in which we need to perform the sorting of rows of the matrix in descending order. This kind of problem has its application in the web development and Data Science domain. Let’s discuss certain ways in which this task can be performed.
Method #1: Us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Sometimes, while working with data, we can have a problem in which we need to perform the sorting of rows of the matrix in descending order. This kind of problem has its appli... |
Stream min() method in Java with Examples | 25 Jul, 2019
Stream.min() returns the minimum element of the stream based on the provided Comparator. A Comparator is a comparison function, which imposes a total ordering on some collection of objects. min() is a terminal operation which combines stream elements and returns a summary result. So, min() is a special cas... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Jul, 2019"
},
{
"code": null,
"e": 413,
"s": 52,
"text": "Stream.min() returns the minimum element of the stream based on the provided Comparator. A Comparator is a comparison function, which imposes a total ordering on some collect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.