title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to declare a variable in Python without assigning a value to it? | Python is dynamic, so you don't need to declare things; they exist automatically in the first scope where they're assigned. So, all you need is a regular old assignment statement that assigns None to the variable.
my_var = None
If you use this, you'll never end up with an uninitialized variable. But this doesn't mean ... | [
{
"code": null,
"e": 1402,
"s": 1187,
"text": "Python is dynamic, so you don't need to declare things; they exist automatically in the first scope where they're assigned. So, all you need is a regular old assignment statement that assigns None to the variable. "
},
{
"code": null,
"e": 1... |
HTML <body> bgcolor Attribute | 06 Jan, 2022
The HTML <body> bgcolor Attribute is used to define a Background color of a Document.
Note: It is not supported by HTML5
Syntax:
<body bgcolor="color_name | hex_number | rgb_number">
Attribute Values:
color_name: It specifies the name of the Background color of the Document.
hex_number: It specifies the he... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "The HTML <body> bgcolor Attribute is used to define a Background color of a Document."
},
{
"code": null,
"e": 149,
"s": 114,
"text": "Note: It is not supp... |
Python | Generate random string of given length | 22 May, 2019
The issue of generation of random numbers is quite common, but sometimes, we have applications that require us to better that and provide some functionality of generating a random string of digits and alphabets for applications such as passwords. Let’s discuss certain ways in which this can be performed.
M... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 359,
"s": 53,
"text": "The issue of generation of random numbers is quite common, but sometimes, we have applications that require us to better that and provide some functionality of generating a r... |
Word Wrap problem ( Space optimized solution ) | 23 Apr, 2021
Given a sequence of words, and a limit on the number of characters that can be put in one line (line width). Put line breaks in the given sequence such that the lines are printed neatly. Assume that the length of each word is smaller than the line width. When line breaks are inserted there is a possibility... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 1051,
"s": 54,
"text": "Given a sequence of words, and a limit on the number of characters that can be put in one line (line width). Put line breaks in the given sequence such that the lines are pr... |
Android progress notifications in Kotlin | 29 Dec, 2019
In this tutorial you’ll learn how to create a basic Progress Notification (Indeterminate progress indicator and Fixed-duration progress indicator) for Android using Kotlin.
Before we begin, let us first understand the components of a Notification in Android.
Small Icon – Required, can be set with setSmallI... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 201,
"s": 28,
"text": "In this tutorial you’ll learn how to create a basic Progress Notification (Indeterminate progress indicator and Fixed-duration progress indicator) for Android using Kotlin."
... |
Print all integers that are sum of powers of two given numbers | 09 Jun, 2021
Given three non-negative integers x, y and bound, the task is to print all the powerful integer ? bound in sorted order. A powerful integer is of the form xi + yj for all i, j ? 0.
Examples:
Input: x = 3, y = 5, bound = 10 Output: 2 4 6 8 10 30 + 50 = 1 + 1 = 2 30 + 51 = 1 + 5 = 6 31 + 50 = 3 + 1 = 4 31 +... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 235,
"s": 54,
"text": "Given three non-negative integers x, y and bound, the task is to print all the powerful integer ? bound in sorted order. A powerful integer is of the form xi + yj for all i, ... |
Machine Learning - Scatter Matrix Plot | Scatter plots shows how much one variable is affected by another or the relationship between them with the help of dots in two dimensions. Scatter plots are very much like line graphs in the concept that they use horizontal and vertical axes to plot data points.
In the following example, Python script will generate and... | [
{
"code": null,
"e": 2701,
"s": 2438,
"text": "Scatter plots shows how much one variable is affected by another or the relationship between them with the help of dots in two dimensions. Scatter plots are very much like line graphs in the concept that they use horizontal and vertical axes to plot dat... |
Matcher matches() method in Java with Examples | 26 Nov, 2018
The matches() method of Matcher Class is used to get the result whether this pattern matches with this matcher or not. It returns a boolean value showing the same.
Syntax:
public boolean matches()
Parameters: This method do not takes any parameter.
Return Value: This method returns a boolean value showing... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "The matches() method of Matcher Class is used to get the result whether this pattern matches with this matcher or not. It returns a boolean value showing the same."
},
{
... |
Create a Single Page Responsive Website Using Bootstrap | 31 Aug, 2021
Everyone wants to create the website which is compatible with all the devices like computer, laptops, tablets, and mobiles. So for making a website responsive the best way is to make a website using Bootstrap.
Since it is a single-page website when you click on any menu on the website it will reach you tow... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 264,
"s": 54,
"text": "Everyone wants to create the website which is compatible with all the devices like computer, laptops, tablets, and mobiles. So for making a website responsive the best way is... |
ML | Logistic Regression using Tensorflow | 01 Nov, 2019
Prerequisites: Understanding Logistic Regression and TensorFlow.
Brief Summary of Logistic Regression:Logistic Regression is Classification algorithm commonly used in Machine Learning. It allows categorizing data into discrete classes by learning the relationship from a given set of labeled data. It learns... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Nov, 2019"
},
{
"code": null,
"e": 117,
"s": 52,
"text": "Prerequisites: Understanding Logistic Regression and TensorFlow."
},
{
"code": null,
"e": 478,
"s": 117,
"text": "Brief Summary of Logistic Regression:Log... |
Logger getLevel() method in Java with Examples | 19 Mar, 2019
The getLevel() method of the Logger class in Java is used to get the log Level that has been specified for this Logger instance. Every Logger has specific log levels and if the result is null, which means that this logger’s effective level will be inherited from its parent.
Log Levels: The log levels contr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Mar, 2019"
},
{
"code": null,
"e": 303,
"s": 28,
"text": "The getLevel() method of the Logger class in Java is used to get the log Level that has been specified for this Logger instance. Every Logger has specific log levels and if th... |
What is the purpose of “role” attribute in HTML ? | 18 Nov, 2019
The main purpose of role attribute is to bolster ARIA i.e. Accessible Rich Internet Applications which helps in providing richness and quality from semantic perspective. Moreover, role attribute makes a website more facilitative and using this attribute is considered as a good practice. Generally, the role... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Nov, 2019"
},
{
"code": null,
"e": 409,
"s": 28,
"text": "The main purpose of role attribute is to bolster ARIA i.e. Accessible Rich Internet Applications which helps in providing richness and quality from semantic perspective. Moreo... |
How to split DataFrame in R | 23 Sep, 2021
In this article, we will discuss how to split the dataframe in R programming language.
A subset can be split both continuously as well as randomly based on rows and columns. The rows and columns of the dataframe can be referenced using the indexes as well as names. Multiple rows and columns can be referred... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "In this article, we will discuss how to split the dataframe in R programming language."
},
{
"code": null,
"e": 368,
"s": 115,
"text": "A subset can be spl... |
Lock framework vs Thread synchronization in Java | 24 Sep, 2021
Thread synchronization mechanism can be achieved using Lock framework, which is present in java.util.concurrent package. Lock framework works like synchronized blocks except locks can be more sophisticated than Java’s synchronized blocks. Locks allow more flexible structuring of synchronized code. This new... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 454,
"s": 54,
"text": "Thread synchronization mechanism can be achieved using Lock framework, which is present in java.util.concurrent package. Lock framework works like synchronized blocks except ... |
MongoDB - Drop Collection | In this chapter, we will see how to drop a collection using MongoDB.
MongoDB's db.collection.drop() is used to drop a collection from the database.
Basic syntax of drop() command is as follows −
db.COLLECTION_NAME.drop()
First, check the available collections into your database mydb.
>use mydb
switched to db mydb
>sho... | [
{
"code": null,
"e": 2756,
"s": 2687,
"text": "In this chapter, we will see how to drop a collection using MongoDB."
},
{
"code": null,
"e": 2835,
"s": 2756,
"text": "MongoDB's db.collection.drop() is used to drop a collection from the database."
},
{
"code": null,
"e... |
Creating a User With an Expiry Date in Linux | 22 Jun, 2020
Linux is a multi-user system and thus, it allows more than one person to interact with the system at the same time. There are numerous ways in which we can create new users in Linux. The system administrator has the responsibility to manage different users of the system. For types of users in Linux refer ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 374,
"s": 28,
"text": "Linux is a multi-user system and thus, it allows more than one person to interact with the system at the same time. There are numerous ways in which we can create new users in... |
GATE | GATE-IT-2004 | Question 74 - GeeksforGeeks | 15 Oct, 2019
Insert into department values (1, 'Mathematics')
Insert into department values (2, 'Physics')
Insert into student values (l, 'Navin', 1)
Insert into student values (2, 'Mukesh', 2)
Insert into student values (3, 'Gita', 1)
How many rows and columns will be retrieved by the following SQL statement?
Select ... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 25919,
"s": 25695,
"text": "Insert into department values (1, 'Mathematics')\nInsert into department values (2, 'Physics')\nInsert into student values (l, 'Navin', 1)\nInsert into student val... |
PySpark - Order by multiple columns - GeeksforGeeks | 19 Dec, 2021
In this article, we are going to see how to orderby multiple columns in PySpark DataFrames through Python.
Python3
# importing moduleimport pyspark # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSession # creating sparksession and giving an app namespark = SparkSession.buil... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 25645,
"s": 25537,
"text": "In this article, we are going to see how to orderby multiple columns in PySpark DataFrames through Python."
},
{
"code": null,
"e": 25653,
"s": 25... |
Interview Oracle India | Set 24 (For 5 Years Experienced) - GeeksforGeeks | 24 Mar, 2018
Round 1:
First round was multiple choice question based on Core Java on inheritance, exception handling, type erasure, threading etc.
Round 2:
Second round was coding round and the questions asked to me to code was as follows –
Priyanka works for an international toy company that ships by container. Her ta... | [
{
"code": null,
"e": 26739,
"s": 26711,
"text": "\n24 Mar, 2018"
},
{
"code": null,
"e": 26748,
"s": 26739,
"text": "Round 1:"
},
{
"code": null,
"e": 26873,
"s": 26748,
"text": "First round was multiple choice question based on Core Java on inheritance, excep... |
Python Program for array rotation - GeeksforGeeks | 19 Feb, 2022
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.
Rotation of the above array by 2 will make array
METHOD 1 (Using temp array):
Input arr[] = [1, 2, 3, 4, 5, 6, 7], d = 2, n =7
1) Store d elements in a temp array
temp[] = [1, 2]
2) Shift rest of the arr[]
arr[] = [3, 4,... | [
{
"code": null,
"e": 26273,
"s": 26245,
"text": "\n19 Feb, 2022"
},
{
"code": null,
"e": 26354,
"s": 26273,
"text": "Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements. "
},
{
"code": null,
"e": 26403,
"s": 26354,
"text": "Rotation ... |
Python | ASCII art using pyfiglet module - GeeksforGeeks | 29 Jun, 2018
pyfiglet takes ASCII text and renders it in ASCII art fonts. figlet_format method convert ASCII text into ASCII art fonts.
It takes following arguments :
text
font ( DEFAULT_FONT = 'standard' )
Command to install pyfiglet module :
pip install pyfiglet
Code #1: Text in default font
# import pyfiglet module... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n29 Jun, 2018"
},
{
"code": null,
"e": 25826,
"s": 25703,
"text": "pyfiglet takes ASCII text and renders it in ASCII art fonts. figlet_format method convert ASCII text into ASCII art fonts."
},
{
"code": null,
"e": 258... |
Python math library | isclose() method - GeeksforGeeks | 22 May, 2019
In Python math module, math.isclose() method is used to determine whether two floating point numbers are close in value. For using this function you must import math module.
Syntax: isclose(a, b, rel_tol = 1e-09, abs_tol 0.0)
Parameters:rel_tol: maximum difference for being considered “close”, relative to ... | [
{
"code": null,
"e": 25899,
"s": 25871,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 26073,
"s": 25899,
"text": "In Python math module, math.isclose() method is used to determine whether two floating point numbers are close in value. For using this function you must import ma... |
Prediction of Wine type using Deep Learning - GeeksforGeeks | 24 Jan, 2022
We use deep learning for the large data sets but to understand the concept of deep learning, we use the small data set of wine quality. You can find the wine quality data set from the UCI Machine Learning Repository which is available for free. The aim of this article is to get started with the libraries o... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 26137,
"s": 25537,
"text": "We use deep learning for the large data sets but to understand the concept of deep learning, we use the small data set of wine quality. You can find the wine quali... |
How to calculate days left until next Christmas using JavaScript ? - GeeksforGeeks | 14 Apr, 2021
In this article, we will learn how to calculate the number of days left until next Christmas using JavaScript. Christmas marks the birth of Christ, mainly celebrated by millions of people around the globe on 25 December every year as a religious and cultural festival.
Approach: In order to calculate the nu... | [
{
"code": null,
"e": 39239,
"s": 39211,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 39508,
"s": 39239,
"text": "In this article, we will learn how to calculate the number of days left until next Christmas using JavaScript. Christmas marks the birth of Christ, mainly celebrat... |
How to configure node.js console font ? - GeeksforGeeks | 27 Feb, 2020
You can format the console font in Node.js using the CHALK module. The chalk module is can be used to customize node console. By using it, one can change console look using features of it like bold the text, making underlines, highlighting the background color of a text, etc.
Features of Chalk module:
It’s... | [
{
"code": null,
"e": 26293,
"s": 26265,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 26570,
"s": 26293,
"text": "You can format the console font in Node.js using the CHALK module. The chalk module is can be used to customize node console. By using it, one can change console l... |
Python program to modify the content of a Binary File - GeeksforGeeks | 27 Dec, 2021
Given a binary file that contains some sentences (space separated words), let’s write a Python program to modify or alter any particular word of the sentence.
Approach:Step 1: Searching for the word in the binary file. Step 2: While searching in the file, the variable “pos” stores the position of file poin... | [
{
"code": null,
"e": 25621,
"s": 25593,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 25780,
"s": 25621,
"text": "Given a binary file that contains some sentences (space separated words), let’s write a Python program to modify or alter any particular word of the sentence."
}... |
Introduction to Markdown - GeeksforGeeks | 03 Mar, 2022
If you have ever worked with git platforms like GitHub, BitBucket or Submitted any question or answers to an online forum, chances are you pretty much have unknowingly used Markdown.
Markdown is a lightweight markup language. Created by John Gruber in 2004, Markdown is now one of the world’s most popular ... | [
{
"code": null,
"e": 26193,
"s": 26165,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 26377,
"s": 26193,
"text": "If you have ever worked with git platforms like GitHub, BitBucket or Submitted any question or answers to an online forum, chances are you pretty much have unknowi... |
Create XML Documents using Python - GeeksforGeeks | 10 May, 2020
Extensible Markup Language(XML), is a markup language that you can use to create your own tags. It was created by the World Wide Web Consortium (W3C) to overcome the limitations of HTML, which is the basis for all Web pages. XML is based on SGML – Standard Generalized Markup Language. It is used for storin... | [
{
"code": null,
"e": 25747,
"s": 25719,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26354,
"s": 25747,
"text": "Extensible Markup Language(XML), is a markup language that you can use to create your own tags. It was created by the World Wide Web Consortium (W3C) to overcome t... |
How to Effortlessly Handle Class Imbalance with Python and SMOTE | by Dario Radečić | Towards Data Science | How many times did you get a 99% accurate model that’s unusable? Building classification models is no-joke, especially when there’s a class imbalance in your data. You know, when there’s only one fraud in 1000 transactions.
You see, identifying 950 of 999 genuine transactions is easy. The trick is to correctly identify... | [
{
"code": null,
"e": 395,
"s": 171,
"text": "How many times did you get a 99% accurate model that’s unusable? Building classification models is no-joke, especially when there’s a class imbalance in your data. You know, when there’s only one fraud in 1000 transactions."
},
{
"code": null,
... |
Fail Fast and Fail Safe Iterators in Java - GeeksforGeeks | 29 Jan, 2021
In this article, I am going to explain how those collections behave which doesn’t iterate as fail-fast. First of all, there is no term as fail-safe given in many places as Java SE specifications does not use this term. I am using fail safe to segregate between Fail fast and Non fail-fast iterators.Concurre... | [
{
"code": null,
"e": 24550,
"s": 24522,
"text": "\n29 Jan, 2021"
},
{
"code": null,
"e": 25289,
"s": 24550,
"text": "In this article, I am going to explain how those collections behave which doesn’t iterate as fail-fast. First of all, there is no term as fail-safe given in many p... |
Android - TextView Control | A TextView displays text to the user and optionally allows them to edit it. A TextView is a complete text editor, however the basic class is configured to not allow editing.
Following are the important attributes related to TextView control. You can check Android official documentation for complete list of attributes a... | [
{
"code": null,
"e": 3781,
"s": 3607,
"text": "A TextView displays text to the user and optionally allows them to edit it. A TextView is a complete text editor, however the basic class is configured to not allow editing."
},
{
"code": null,
"e": 4005,
"s": 3781,
"text": "Followin... |
Sum of first n even numbers | 22 Jun, 2022
Given a number n. The problem is to find the sum of first n even numbers.Examples:
Input : n = 4
Output : 20
Sum of first 4 even numbers
= (2 + 4 + 6 + 8) = 20
Input : n = 20
Output : 420
Naive Approach: Iterate through the first n even numbers and add them.
C++
Java
Python3
C#
PHP
Javascript
// C++... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 137,
"s": 52,
"text": "Given a number n. The problem is to find the sum of first n even numbers.Examples: "
},
{
"code": null,
"e": 244,
"s": 137,
"text": "Input : n = 4\nOutpu... |
Plot multiple plots in Matplotlib | 03 Jan, 2021
Prerequisites: Matplotlib
In Matplotlib, we can draw multiple graphs in a single plot in two ways. One is by using subplot() function and other by superimposition of second graph on the first i.e, all graphs will appear on the same plot. We will look into both the ways one by one.
A subplot () function is ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 80,
"s": 54,
"text": "Prerequisites: Matplotlib"
},
{
"code": null,
"e": 336,
"s": 80,
"text": "In Matplotlib, we can draw multiple graphs in a single plot in two ways. One is b... |
Count pairs from two linked lists whose sum is equal to a given value | 14 Jun, 2022
Given two linked lists(can be sorted or unsorted) of size n1 and n2 of distinct elements. Given a value x. The problem is to count all pairs from both lists whose sum is equal to the given value x.
Note: The pair has an element from each linked list.
Examples:
Input : list1 = 3->1->5->7
list2 = 8-... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 250,
"s": 52,
"text": "Given two linked lists(can be sorted or unsorted) of size n1 and n2 of distinct elements. Given a value x. The problem is to count all pairs from both lists whose sum is equa... |
Writing to an excel sheet using Python | 29 Jul, 2019
Using xlwt module, one can perform multiple operations on spreadsheet. For example, writing or modifying the data can be done in Python. Also, the user might have to go through various sheets and retrieve data based on some criteria or modify some rows and columns and do a lot of work.
Let’s see how to cre... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 340,
"s": 53,
"text": "Using xlwt module, one can perform multiple operations on spreadsheet. For example, writing or modifying the data can be done in Python. Also, the user might have to go throu... |
C# | Remove all objects from the Queue | 01 Feb, 2019
Queue represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enqueue, and when you remove an item, it is called deque. Queue. Clear Method is used to remove the objects from the Queue. This method... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 394,
"s": 28,
"text": "Queue represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enq... |
Hugging Face: A Step Towards Democratizing NLP | by Anuj Syal | Towards Data Science | Hugging face; no, I am not referring to one of our favorite emoji to express thankfulness, love, or appreciation. In the world of data science, Hugging Face is a startup in the Natural Language Processing (NLP) domain, offering its library of models for use by some of the A-listers including Apple and Bing.
For those w... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "Hugging face; no, I am not referring to one of our favorite emoji to express thankfulness, love, or appreciation. In the world of data science, Hugging Face is a startup in the Natural Language Processing (NLP) domain, offering its library of models for u... |
Multi Class Text Classification with LSTM using TensorFlow 2.0 | by Susan Li | Towards Data Science | A lot of innovations on NLP have been how to add context into word vectors. One of the common ways of doing it is using Recurrent Neural Networks. The following are the concepts of Recurrent Neural Networks:
They make use of sequential information.
They have a memory that captures what have been calculated so far, i.e.... | [
{
"code": null,
"e": 379,
"s": 171,
"text": "A lot of innovations on NLP have been how to add context into word vectors. One of the common ways of doing it is using Recurrent Neural Networks. The following are the concepts of Recurrent Neural Networks:"
},
{
"code": null,
"e": 420,
"... |
Python Program for simple interest - GeeksforGeeks | 18 Apr, 2020
Simple interest formula is given by:Simple Interest = (P x T x R)/100Where,P is the principle amountT is the time andR is the rate
Examples:
EXAMPLE1:
Input : P = 10000
R = 5
T = 5
Output :2500
We need to find simple interest on
Rs. 10,000 at the rate of 5% for 5
units of time.
EXAMPLE2:... | [
{
"code": null,
"e": 24619,
"s": 24591,
"text": "\n18 Apr, 2020"
},
{
"code": null,
"e": 24750,
"s": 24619,
"text": "Simple interest formula is given by:Simple Interest = (P x T x R)/100Where,P is the principle amountT is the time andR is the rate"
},
{
"code": null,
... |
PyQt5 – How to hide the title bar of window ? - GeeksforGeeks | 26 Mar, 2020
When we design the GUI (Graphical User Interface) application using PyQt5, there exist the window. A window is a (usually) rectangular portion of the display on a computer monitor that presents its contents (e.g., the contents of a directory, a text file or an image) seemingly independently of the rest of ... | [
{
"code": null,
"e": 24647,
"s": 24619,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25046,
"s": 24647,
"text": "When we design the GUI (Graphical User Interface) application using PyQt5, there exist the window. A window is a (usually) rectangular portion of the display on a ... |
Matplotlib.axes.Axes.set_xticklabels() in Python - GeeksforGeeks | 21 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": 24894,
"s": 24866,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 25194,
"s": 24894,
"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, ... |
Maximum XOR subarray | Practice | GeeksforGeeks | Given an array arr[] of size, N. Find the subarray with maximum XOR. A subarray is a contiguous part of the array.
Example 1:
Input:
N = 4
arr[] = {1,2,3,4}
Output: 7
Explanation:
The subarray {3,4} has maximum xor
value equal to 7.
Your Task:
You don't need to read input or print anything. Your task is to compl... | [
{
"code": null,
"e": 353,
"s": 238,
"text": "Given an array arr[] of size, N. Find the subarray with maximum XOR. A subarray is a contiguous part of the array."
},
{
"code": null,
"e": 365,
"s": 353,
"text": "\nExample 1:"
},
{
"code": null,
"e": 476,
"s": 365,
... |
process.argv() Method in Node.js | The process.argv() method is used for returning all the command-line arguments that were passed when the Node.js process was being launched. The first element will always contains the same value as process.execPath.
process.argv()
Since it returns all the command line arguments passed before the node.js process. It doe... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "The process.argv() method is used for returning all the command-line arguments that were passed when the Node.js process was being launched. The first element will always contains the same value as process.execPath."
},
{
"code": null,
"e": ... |
Alternatively Merge two Strings in Java - GeeksforGeeks | 15 Dec, 2020
Given 2 strings, merge them in an alternate way, i.e. the final string’s first character is the first character of the first string, the second character of the final string is the first character of the second string and so on. And if once you reach end of one string while if another string is still remai... | [
{
"code": null,
"e": 26715,
"s": 26687,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 27085,
"s": 26715,
"text": "Given 2 strings, merge them in an alternate way, i.e. the final string’s first character is the first character of the first string, the second character of the fi... |
Machine Learning: Target Feature Label Imbalance Problems and Solutions | by Joseph Cohen | Towards Data Science | IntroductionWhat is train data?Why do we need to balance train data?What does “balancing data” actually look like in practice?Do we also need to balance test data?Evaluation metrics for imbalanced test data
Introduction
What is train data?
Why do we need to balance train data?
What does “balancing data” actually look l... | [
{
"code": null,
"e": 379,
"s": 172,
"text": "IntroductionWhat is train data?Why do we need to balance train data?What does “balancing data” actually look like in practice?Do we also need to balance test data?Evaluation metrics for imbalanced test data"
},
{
"code": null,
"e": 392,
"s... |
jQuery UI Sortable sort Event | 13 Dec, 2021
jQuery UI consists of GUI widgets, visual effects, and themes implemented using Query JavaScript Library. jQuery UI is great for building UI interfaces for the webpages. It can be used to build highly interactive web applications or can be used to add widgets easily.
The jQuery UI Sortable sort event is us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 296,
"s": 28,
"text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using Query JavaScript Library. jQuery UI is great for building UI interfaces for the webpages. It ca... |
Implement multiple LIKE operators in a single MySQL query | To implement multiple LIKE clauses, the syntax is as follows −
select * from yourTableName
where yourColumnName1 LIKE ('%yourValue1%' or yourColumnName2 LIKE '%yourValue2%') or (yourColumnName3 LIKE '%yourValue3');
Let us first create a table −
mysql> create table DemoTable1534
-> (
-> ClientId int NOT NULL AUTO... | [
{
"code": null,
"e": 1250,
"s": 1187,
"text": "To implement multiple LIKE clauses, the syntax is as follows −"
},
{
"code": null,
"e": 1403,
"s": 1250,
"text": "select * from yourTableName\n where yourColumnName1 LIKE ('%yourValue1%' or yourColumnName2 LIKE '%yourValue2%') or (yo... |
Python Tkinter – Menubutton Widget | 26 Mar, 2020
Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to create the GUI applications.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 382,
"s": 28,
"text": "Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python int... |
Node.js - Event Loop | Node.js is a single-threaded application, but it can support concurrency via the concept of event and callbacks. Every API of Node.js is asynchronous and being single-threaded, they use async function calls to maintain concurrency. Node uses observer pattern. Node thread keeps an event loop and whenever a task gets com... | [
{
"code": null,
"e": 2567,
"s": 2152,
"text": "Node.js is a single-threaded application, but it can support concurrency via the concept of event and callbacks. Every API of Node.js is asynchronous and being single-threaded, they use async function calls to maintain concurrency. Node uses observer pa... |
Python Number acos() Method | Python number method acos() returns the arc cosine of x, in radians.
Following is the syntax for acos() method −
acos(x)
Note − This function is not accessible directly, so we need to import math module and then we need to call this function using math static object.
x − This must be a numeric value in the range -1 t... | [
{
"code": null,
"e": 2448,
"s": 2378,
"text": "Python number method acos() returns the arc cosine of x, in radians."
},
{
"code": null,
"e": 2492,
"s": 2448,
"text": "Following is the syntax for acos() method −"
},
{
"code": null,
"e": 2501,
"s": 2492,
"text"... |
Python | Numpy np.assert_equal() method | 23 Jan, 2020
With the help of np.assert_equal() method, we can get the assertion error when two objects are not equal by using np.assert_equal() method.
Syntax : np.assert_equal(actual, desired)Return : Return assertion error if two object are unequal.
Example #1 :In this example we can see that by using np.assert_equa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "With the help of np.assert_equal() method, we can get the assertion error when two objects are not equal by using np.assert_equal() method."
},
{
"code": null,
"e"... |
HTML & CSS | Tabindex attribute & Navigation bars | 04 Dec, 2018
The tabindex attribute specifies the tab order of an element. “tab” button is used for navigation. The tabindex content attribute allows users to control whether an element is supposed to be focusable, whether it is supposed to be reachable using sequential focus navigation, and what is to be the relative ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 438,
"s": 53,
"text": "The tabindex attribute specifies the tab order of an element. “tab” button is used for navigation. The tabindex content attribute allows users to control whether an element i... |
Sherlock – Hunt Username on Social Media Kali Linux Tool | 20 Apr, 2021
Sherlock is a free and open-source tool available on GitHub. This tool is free you can download it from Github and can use it for free of cost. Sherlock is used to finding usernames on social media on 300 sites. As you know many users register themselves on social media platforms using their own name. Supp... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 804,
"s": 53,
"text": "Sherlock is a free and open-source tool available on GitHub. This tool is free you can download it from Github and can use it for free of cost. Sherlock is used to finding us... |
Java Program To Recursively Linearly Search An Element In An Array | 25 Jan, 2022
Given an array arr[] of n elements, write a function to recursively search a given element x in arr[].
Illustration:
Input : arr[] = {25, 60, 18, 3, 10}
Output : Element to be searched : 3
Input : arr[] = {10,20,30,24,15,40}
Output : -1
For x = 35
Element x is not present in arr[]
Procedure:
The idea i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 157,
"s": 54,
"text": "Given an array arr[] of n elements, write a function to recursively search a given element x in arr[]."
},
{
"code": null,
"e": 171,
"s": 157,
"text": "Il... |
Collections.nCopies() in Java | 28 Feb, 2018
The role of Collections.nCopies() is to return an immutable list which contains n copies of given object. This function helps if we want to create a list with n copies of given object. The newly allocated data object is tiny i.e, it contains a single reference to the data object.
Syntax :
public static <T>... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Feb, 2018"
},
{
"code": null,
"e": 335,
"s": 54,
"text": "The role of Collections.nCopies() is to return an immutable list which contains n copies of given object. This function helps if we want to create a list with n copies of giv... |
Python Program to Sort Words in Alphabetical Order | 23 Aug, 2021
Given an input string, our task is to write a Python program to sort the words present in the string in alphabetical order.
Examples:
Input : “geeks for Geeks”
Output : “for geeks geeks”
Input : “the Quick brown fox jumPs over the lazY Dog”
Output : “brown dog fox jumps lazy over quick the the”
sorted() ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 177,
"s": 53,
"text": "Given an input string, our task is to write a Python program to sort the words present in the string in alphabetical order."
},
{
"code": null,
"e": 187,
"s":... |
Method Class | hashCode() Method in Java | 24 Dec, 2021
The java.lang.reflect.Method.hashCode() method returns the hash code for the Method class object. The hashcode returned is computed by exclusive-or operation on the hashcodes for the method’s declaring class name and the method’s name. The hashcode is always the same if the object doesn’t change. Hashcode ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 555,
"s": 28,
"text": "The java.lang.reflect.Method.hashCode() method returns the hash code for the Method class object. The hashcode returned is computed by exclusive-or operation on the hashcodes ... |
JavaScript Narcissistic number | A narcissistic number in a given number base b is a number that is the sum of its own digits each raised to the power of the number of digits.
For example −
153 = 1^3 + 5^3 + 3^3 = 1+125+27 = 153
Similarly,
1 = 1^1 = 1
We will first count the number of digits using a while loop. Then with another while loop, we pick
la... | [
{
"code": null,
"e": 1330,
"s": 1187,
"text": "A narcissistic number in a given number base b is a number that is the sum of its own digits each raised to the power of the number of digits."
},
{
"code": null,
"e": 1344,
"s": 1330,
"text": "For example −"
},
{
"code": nul... |
Java.util.Collections.frequency() in Java with Examples | 07 Dec, 2018
java.util.Collections.frequency() method is present in java.util.Collections class. It is used to get the frequency of a element present in the specified list of Collection. More formally, it returns the number of elements e in the collection.
Syntax
public static int frequency(Collection<?> c, Object o)
P... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Dec, 2018"
},
{
"code": null,
"e": 296,
"s": 52,
"text": "java.util.Collections.frequency() method is present in java.util.Collections class. It is used to get the frequency of a element present in the specified list of Collection. ... |
Select row with maximum and minimum value in Pandas dataframe | 06 Jan, 2019
Let’s see how can we select row with maximum and minimum value in Pandas dataframe with help of different examples.
Consider this dataset.
# importing pandas and numpyimport pandas as pdimport numpy as np # data of 2018 drivers world championshipdict1 ={'Driver':['Hamilton', 'Vettel', 'Raikkonen', ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 144,
"s": 28,
"text": "Let’s see how can we select row with maximum and minimum value in Pandas dataframe with help of different examples."
},
{
"code": null,
"e": 167,
"s": 144,
... |
Node.js process.hrtime( ) Method | 29 Sep, 2021
The process.hrtime() method to measure code execution time which returns array which include current high-resolution real time in a [seconds, nanoseconds]. We measure the code execution time by providing the time returned by the first process.hrtime() call as a parameter in the second process.hrtime() call... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 337,
"s": 28,
"text": "The process.hrtime() method to measure code execution time which returns array which include current high-resolution real time in a [seconds, nanoseconds]. We measure the code... |
Handling Errors in R Programming | 28 Dec, 2021
Error Handling is a process in which we deal with unwanted or anomalous errors which may cause abnormal termination of the program during its execution. In R Programming, there are basically two ways in which we can implement an error handling mechanism. Either we can directly call the functions like stop(... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 519,
"s": 54,
"text": "Error Handling is a process in which we deal with unwanted or anomalous errors which may cause abnormal termination of the program during its execution. In R Programming, the... |
PyQt5 – QApplication | 25 Aug, 2021
The QApplication class manages the GUI application’s control flow and main settings. It specializes in the QGuiApplication with some functionality needed for QWidget based applications. It handles widget specific initialization, finalization. For any GUI application using Qt, there is precisely one QApplic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 547,
"s": 28,
"text": "The QApplication class manages the GUI application’s control flow and main settings. It specializes in the QGuiApplication with some functionality needed for QWidget based app... |
How to create a Scroll To Top button in React JS ? | 12 Mar, 2021
You will see there are lots of websites, that are using a useful feature like if you’re scrolling the webpage, and now you are at the bottom of that page then you can use this button to scroll up automatically like skip to the content. The following example covers create a Scroll To Top button in React JS ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 382,
"s": 52,
"text": "You will see there are lots of websites, that are using a useful feature like if you’re scrolling the webpage, and now you are at the bottom of that page then you can use thi... |
Queue Interface In Java | 08 Jul, 2022
The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First In First Out) order. It is an ordered list of objects with its use limited to inserting elements at the end of the list and deleting elements from the st... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 441,
"s": 52,
"text": "The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First In First Out) order.... |
ISRO CS 2014 - GeeksforGeeks | 27 Sep, 2021
while (m < n)
if (x > y ) and (a < b) then
a=a+1
y=y-1
end if
m=m+1
end while
= (number of edges) - (number of nodes) + 1 = 8-6+2 = 4
= Total number of regions = 4
= Total number of decision points + 1 = 3+1 = 4
S → SS
S → (S)
S → ε
1) S → (S)
2) S → (SS)
3) S → ((S)S)
4) S → ((SS)... | [
{
"code": null,
"e": 29498,
"s": 29470,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 29599,
"s": 29498,
"text": "while (m < n)\n if (x > y ) and (a < b) then\n a=a+1\n y=y-1\n end if\n m=m+1 \nend while "
},
{
"code": null,
"e": 29734,
"s": 295... |
ABS() Function in SQL Server | 29 Dec, 2020
ABS() function :
This function in SQL Server is used to return the absolute value of a specified number. Absolute value is used for depicting the distance of a number on the number line from 0. The direction of the number from zero is not considered since the absolute value of a number is never negative. T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 45,
"s": 28,
"text": "ABS() function :"
},
{
"code": null,
"e": 580,
"s": 45,
"text": "This function in SQL Server is used to return the absolute value of a specified number. Abs... |
How to draw with mouse in HTML 5 canvas ? | 20 Mar, 2020
In this article, we shall explore a few ways to draw with the mouse pointer on the HTML 5 canvas. The HTML canvas is essentially a container for various graphics elements such as squares, rectangles, arcs, images, etc. It gives us flexible control over animating the graphics elements inside the canvas. How... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Mar, 2020"
},
{
"code": null,
"e": 430,
"s": 53,
"text": "In this article, we shall explore a few ways to draw with the mouse pointer on the HTML 5 canvas. The HTML canvas is essentially a container for various graphics elements suc... |
Python – Assign values to Values List | 02 Sep, 2020
Given 2 dictionaries, assign values to value list elements mapping from dictionary 2.
Input : test_dict = {‘Gfg’ : [3, 6], ‘best’ :[9]}, look_dict = {3 : [1, 5], 6 : “Best”, 9 : 12}Output : {‘Gfg’: {3: [1, 5], 6: ‘Best’}, ‘best’: {9: 12}}Explanation : 3 is replaced by key 3 and value [1, 5] and so on.
Inpu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "Given 2 dictionaries, assign values to value list elements mapping from dictionary 2."
},
{
"code": null,
"e": 331,
"s": 114,
"text": "Input : test_dict = ... |
Python program to convert integer to roman | 21 Dec, 2021
Given an integer, the task is to write a Python program to convert integer to roman.
Examples:
Input: 5
Output: V
Input: 9
Output: IX
Input: 40
Output: XL
Input: 1904
Output: MCMIV
Below table shows the list of Roman symbols including their corresponding integer values also:
Idea is to convert the un... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 138,
"s": 53,
"text": "Given an integer, the task is to write a Python program to convert integer to roman."
},
{
"code": null,
"e": 150,
"s": 138,
"text": "Examples: "
},
... |
Create a Bar chart using Recharts in ReactJS | 27 Jul, 2021
Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, with the help of React and D3 (Data-Driven Documents).
To create Bar Chart using Recharts, we create a dataset with x and y coordinate details. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 246,
"s": 28,
"text": "Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, with the help ... |
Plot line graph from NumPy array | 17 Dec, 2021
For plotting graphs in Python, we will use the Matplotlib library. Matplotlib is used along with NumPy data to plot any type of graph. From matplotlib we use the specific function i.e. pyplot(), which is used to plot two-dimensional data.
Different functions used are explained below:
np.arange(start, end):... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "For plotting graphs in Python, we will use the Matplotlib library. Matplotlib is used along with NumPy data to plot any type of graph. From matplotlib we use the specific fun... |
Materialize CSS Grids | 24 Mar, 2022
There are 12 standard columns fluid responsive grid systems that helps you to layout your page in an ordered and easy way. It uses the row and column style classes to define rows and columns respectively. Rows are used to specify a padding-less container to be used for responsive columns and col are used t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Mar, 2022"
},
{
"code": null,
"e": 372,
"s": 28,
"text": "There are 12 standard columns fluid responsive grid systems that helps you to layout your page in an ordered and easy way. It uses the row and column style classes to define r... |
How to fixed one column and scrollable other column or columns in Bootstrap ? | 30 Nov, 2019
Bootstrap provides several built-in features to the users. This makes development faster and smoother. However, in some cases, external CSS and jQuery has to be implemented to the web page’s coding in order to give it a personalized touch. Usually, the Bootstrap grid is used to divide the web-page into 12 ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2019"
},
{
"code": null,
"e": 884,
"s": 28,
"text": "Bootstrap provides several built-in features to the users. This makes development faster and smoother. However, in some cases, external CSS and jQuery has to be implemented to... |
Java Runtime Polymorphism with multilevel inheritance | Method overriding is an example of runtime polymorphism. In method overriding, a subclass overrides a method with the same signature as that of in its superclass. During compile time, the check is made on the reference type. However, in the runtime, JVM figures out the object type and would run the method that belongs ... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "Method overriding is an example of runtime polymorphism. In method overriding, a subclass overrides a method with the same signature as that of in its superclass. During compile time, the check is made on the reference type. However, in the runtime, JVM... |
Hardware Synchronization | In Synchronization hardware, we explore several more solutions to the critical-section problem using techniques ranging from hardware to software based APIs available to application programmers. These solutions are based on the premise of locking; however, the design of such locks can be quite sophisticated.
These Hard... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "In Synchronization hardware, we explore several more solutions to the critical-section problem using techniques ranging from hardware to software based APIs available to application programmers. These solutions are based on the premise of locking; howev... |
Python Program to Select the nth Smallest Element from a List in Expected Linear Time | When it is required to select the nth smallest element from a list in linear time complexity, two methods are required. One method to find the smallest element, and another method that divides the list into two parts. This division depends on the ‘i’ value that is given by user. Based on this value, the list is split, ... | [
{
"code": null,
"e": 1422,
"s": 1062,
"text": "When it is required to select the nth smallest element from a list in linear time complexity, two methods are required. One method to find the smallest element, and another method that divides the list into two parts. This division depends on the ‘i’ va... |
Convert Json String to Java Object Using GSON - GeeksforGeeks | 24 Jan, 2022
Pre-requisite: Convert Java Object to Json String Using GSONJSON Stand for JavaScript Object Notation. It’s a standard text-based format which shows structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications. JSON is highly recommended to transmit data ... | [
{
"code": null,
"e": 24922,
"s": 24894,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 25340,
"s": 24922,
"text": "Pre-requisite: Convert Java Object to Json String Using GSONJSON Stand for JavaScript Object Notation. It’s a standard text-based format which shows structured dat... |
Python os.pipe() Method | Python method pipe() creates a pipe and returns a pair of file descriptors (r, w) usable for reading and writing, respectively
Following is the syntax for pipe() method −
os.pipe()
NA
NA
This method returns a pair of file descriptors.
The following example shows the usage of pipe() method.
#!/usr/bin/python
import os... | [
{
"code": null,
"e": 2371,
"s": 2244,
"text": "Python method pipe() creates a pipe and returns a pair of file descriptors (r, w) usable for reading and writing, respectively"
},
{
"code": null,
"e": 2415,
"s": 2371,
"text": "Following is the syntax for pipe() method −"
},
{
... |
Maximum Subarray Sum in a given Range in C++ | We are given with an array of integer elements of any given size. The task is to find the maximum sum which will be calculated by forming the subarrays from the given array within the given range which can be started from any possible index value in an array.
Let us see various input output scenarios for this -
In − in... | [
{
"code": null,
"e": 1322,
"s": 1062,
"text": "We are given with an array of integer elements of any given size. The task is to find the maximum sum which will be calculated by forming the subarrays from the given array within the given range which can be started from any possible index value in an ... |
Difference between Traditional and Reactive Computer System - GeeksforGeeks | 04 May, 2020
1. Traditional Computer System :Traditional Computer System takes the input from the user and computes the output as the function of the input. It basically computes function on the input.
Output data = f(input data)
Example:If x is input and f is some function, y(output) = f(x)
2. Reactive Computer Syste... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 25047,
"s": 24858,
"text": "1. Traditional Computer System :Traditional Computer System takes the input from the user and computes the output as the function of the input. It basically comput... |
Google Guice - Scopes | Guice returns a new instance every time when it supplies a value as its default behaviour. It is configurable via scopes. Following are the scopes that Guice supports:
@Singleton - Single instance for lifetime of the application. @Singleton object needs to be threadsafe.
@Singleton - Single instance for lifetime of th... | [
{
"code": null,
"e": 2270,
"s": 2102,
"text": "Guice returns a new instance every time when it supplies a value as its default behaviour. It is configurable via scopes. Following are the scopes that Guice supports:"
},
{
"code": null,
"e": 2375,
"s": 2270,
"text": "@Singleton - S... |
Natural Language Toolkit - Tokenizing Text | It may be defined as the process of breaking up a piece of text into smaller parts, such as sentences and words. These smaller parts are called tokens. For example, a word is a token in a sentence, and a sentence is a token in a paragraph.
As we know that NLP is used to build applications such as sentiment analysis, QA... | [
{
"code": null,
"e": 2624,
"s": 2384,
"text": "It may be defined as the process of breaking up a piece of text into smaller parts, such as sentences and words. These smaller parts are called tokens. For example, a word is a token in a sentence, and a sentence is a token in a paragraph."
},
{
... |
Java - Object and Classes | Java is an Object-Oriented Language. As a language that has the Object-Oriented feature, Java supports the following fundamental concepts −
Polymorphism
Inheritance
Encapsulation
Abstraction
Classes
Objects
Instance
Method
Message Passing
In this chapter, we will look into the concepts - Classes and Objects.
Object − O... | [
{
"code": null,
"e": 2517,
"s": 2377,
"text": "Java is an Object-Oriented Language. As a language that has the Object-Oriented feature, Java supports the following fundamental concepts −"
},
{
"code": null,
"e": 2530,
"s": 2517,
"text": "Polymorphism"
},
{
"code": null,
... |
Send Chrome Notification Using Python - GeeksforGeeks | 29 Jun, 2021
In this article, we are going to see how to send a Chrome notification from your PC to a phone or several devices in this article. We may send messages, links, and other content. For this, we’ll use Python’s notify2 module and its various capabilities, which will help us in delivering messages to many devi... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 24604,
"s": 24292,
"text": "In this article, we are going to see how to send a Chrome notification from your PC to a phone or several devices in this article. We may send messages, links, and... |
5 Ways to Merge Dictionaries in Python | by Jimit Dholakia | Towards Data Science | In Python, a dictionary is a data structure which contains elements in the form of a key-value pair where keys are used to access the values of the dictionary. Python dictionaries are unordered and mutable i.e. the elements of the dictionaries can be changed.
In this article, we will explore five different ways to merg... | [
{
"code": null,
"e": 432,
"s": 172,
"text": "In Python, a dictionary is a data structure which contains elements in the form of a key-value pair where keys are used to access the values of the dictionary. Python dictionaries are unordered and mutable i.e. the elements of the dictionaries can be chan... |
What are the most important tags for an HTML Document? | HTML has various tags to format content, heading, align content, add sections, etc to a website. The most important tags for an HTML document is doctype, <html>, <head> and <body>.
doctypedoctype is the doctype declaration type. It is used for specifying which version of HTML the document is using.
<!DOCTYPE html>
<htm... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "HTML has various tags to format content, heading, align content, add sections, etc to a website. The most important tags for an HTML document is doctype, <html>, <head> and <body>."
},
{
"code": null,
"e": 1362,
"s": 1243,
"text": "d... |
Data Scientist vs Machine Learning Scientist Difference | Towards Data Science | IntroductionData ScientistsMachine Learning ScientistsSummaryReferences
Introduction
Data Scientists
Machine Learning Scientists
Summary
References
These two roles can sometimes be interchangeable amongst recruiters, however, if you are specialized in either of these roles, you know there is a difference. Both roles sh... | [
{
"code": null,
"e": 243,
"s": 171,
"text": "IntroductionData ScientistsMachine Learning ScientistsSummaryReferences"
},
{
"code": null,
"e": 256,
"s": 243,
"text": "Introduction"
},
{
"code": null,
"e": 272,
"s": 256,
"text": "Data Scientists"
},
{
"c... |
PHP ob_get_clean() Function - GeeksforGeeks | 17 Mar, 2021
The ob_get_clean() function is an in-built PHP function that is used to clean or delete the current output buffer. It’s also used to get the output buffering again after cleaning the buffer. The ob_get_clean() function is the combination of both ob_get_contents() and ob_end_clean().
Syntax:
string|false ob... | [
{
"code": null,
"e": 24972,
"s": 24944,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 25256,
"s": 24972,
"text": "The ob_get_clean() function is an in-built PHP function that is used to clean or delete the current output buffer. It’s also used to get the output buffering again... |
Java Program for Recursive Bubble Sort | Following is the Java Program for Recursice Bubble Sort −
Live Demo
import java.util.Arrays;
public class Demo{
static void bubble_sort(int my_arr[], int len_arr){
if (len_arr == 1)
return;
for (int i=0; i<len_arr-1; i++)
if (my_arr[i] > my_arr[i+1]){
int temp = my_arr[i];
... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "Following is the Java Program for Recursice Bubble Sort −"
},
{
"code": null,
"e": 1131,
"s": 1120,
"text": " Live Demo"
},
{
"code": null,
"e": 1758,
"s": 1131,
"text": "import java.util.Arrays;\npublic class Dem... |
How to image copy the entire DB2 table TAB1 into a dataset? | The image copy allows us to download or copy the DB2 table into a mainframe dataset. There are two types of Image copy i.e. Full image copy and Incremental image copy. The full image copy is used to take the backup of the entire table. The incremental image copy refers to the differential backup. In order to take the f... | [
{
"code": null,
"e": 1445,
"s": 1062,
"text": "The image copy allows us to download or copy the DB2 table into a mainframe dataset. There are two types of Image copy i.e. Full image copy and Incremental image copy. The full image copy is used to take the backup of the entire table. The incremental i... |
How to implement Dictionary with Python3 | Dictionaries in python are a type of data structure that map keys to values as a key-value pair. They are one of the frequently used data structures and have many interesting properties. They are presented by enclosing them in a pair of curly brace like below.
dict = {'day1':'Mon' ,'day2':'Tue','day3':'Wed'}
The elemen... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "Dictionaries in python are a type of data structure that map keys to values as a key-value pair. They are one of the frequently used data structures and have many interesting properties. They are presented by enclosing them in a pair of curly brace like... |
Python - Create progress bar using tqdm module - GeeksforGeeks | 22 Apr, 2020
In this article we will see how to make progress bar with the help of tqdm module. A progress bar is a graphical control element used to visualize the progression of an extended computer operation, such as a download, file transfer, or installation. Sometimes, the graphic is accompanied by a textual repres... | [
{
"code": null,
"e": 24320,
"s": 24292,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24673,
"s": 24320,
"text": "In this article we will see how to make progress bar with the help of tqdm module. A progress bar is a graphical control element used to visualize the progression ... |
Jupyter + IDE: how to make it work | by Denis Kazakov | Towards Data Science | If you work with data in Python, you probably know of Jupyter notebooks. The format just makes sense for simultaneously writing code and exploring data ..or does it?!
Most of critique about relying on notebooks can be found in this excellent talk: I don’t like notebooks, Joel Grus. To summarize, notebooks are not a gre... | [
{
"code": null,
"e": 339,
"s": 172,
"text": "If you work with data in Python, you probably know of Jupyter notebooks. The format just makes sense for simultaneously writing code and exploring data ..or does it?!"
},
{
"code": null,
"e": 717,
"s": 339,
"text": "Most of critique ab... |
C# | Boolean.Equals(Boolean) Method - GeeksforGeeks | 28 Jun, 2021
This method is used to return a value indicating whether this instance is equal to a specified Boolean object.Syntax:
public bool Equals (bool obj);
Here, obj is a boolean value to compare to this instance.Return Value: This method returns true if obj has the same value as this instance otherwise it retu... | [
{
"code": null,
"e": 25593,
"s": 25565,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25713,
"s": 25593,
"text": "This method is used to return a value indicating whether this instance is equal to a specified Boolean object.Syntax: "
},
{
"code": null,
"e": 25744,... |
Get MySQL maximum value from 3 different columns? | To get the maximum value from three different columns, use the GREATEST() function.
The syntax is as follows
SELECT GREATEST(yourColumnName1,yourColumnName2,yourColumnName3) AS anyAliasName FROM yourTableName;
To understand the above syntax, let us create a table. The query to create a table is as follows
mysql> create... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To get the maximum value from three different columns, use the GREATEST() function."
},
{
"code": null,
"e": 1171,
"s": 1146,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1272,
"s": 1171,
"text": "SE... |
Data Types in C | Variables in C are associated with data type. Each data type requires an amount of memory and performs specific operations.
There are some common data types in C −
int − Used to store an integer value.
int − Used to store an integer value.
char − Used to store a single character.
char − Used to store a single character... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "Variables in C are associated with data type. Each data type requires an amount of memory and performs specific operations."
},
{
"code": null,
"e": 1226,
"s": 1186,
"text": "There are some common data types in C −"
},
{
"cod... |
Batch Script - String length | In DOS scripting, there is no length function defined for finding the length of a string. There are custom-defined functions which can be used for the same. Following is an example of a custom-defined function for seeing the length of a string.
@echo off
set str = Hello World
call :strLen str strlen
echo String is %str... | [
{
"code": null,
"e": 2414,
"s": 2169,
"text": "In DOS scripting, there is no length function defined for finding the length of a string. There are custom-defined functions which can be used for the same. Following is an example of a custom-defined function for seeing the length of a string."
},
... |
Microsoft Interview Experience | On-Campus (Virtual) - GeeksforGeeks | 05 Apr, 2021
Microsoft conducted entire process virtually due to COVID.
Round 1: (Date 29.11.20)
Online test:(90 min)
CGPA criteria is 7.50 and open for CSE/MnC/EEE/ECE
There were different sets with varied difficulties. Some sets were easy and some were difficult. There are 3 coding questions.
My set consisted of f... | [
{
"code": null,
"e": 26465,
"s": 26437,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 26524,
"s": 26465,
"text": "Microsoft conducted entire process virtually due to COVID."
},
{
"code": null,
"e": 26549,
"s": 26524,
"text": "Round 1: (Date 29.11.20)"
},
... |
Convert singly linked list into circular linked list - GeeksforGeeks | 16 Mar, 2022
Given a singly linked list, we have to convert it into circular linked list. For example, we have been given a singly linked list with four nodes and we want to convert this singly linked list into circular linked list.
The above singly linked list is converted into circular linked list.
Approach: The... | [
{
"code": null,
"e": 32366,
"s": 32338,
"text": "\n16 Mar, 2022"
},
{
"code": null,
"e": 32587,
"s": 32366,
"text": "Given a singly linked list, we have to convert it into circular linked list. For example, we have been given a singly linked list with four nodes and we want to co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.