title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
JavaScript | Callbacks | 17 Jul, 2018
Callbacks are a great way to handle something after something else has been completed. By something here we mean a function execution. If we want to execute a function right after the return of some other function, then callbacks can be used.
JavaScript functions have the type of Objects. So, much like any... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jul, 2018"
},
{
"code": null,
"e": 295,
"s": 52,
"text": "Callbacks are a great way to handle something after something else has been completed. By something here we mean a function execution. If we want to execute a function right ... |
Python List append() Method | 04 Aug, 2021
The Python List append() method is used for appending and adding elements to the end of the List.
Syntax: list.append(item)
Parameters:
item: an item to be added at the end of the list
Returns:
The method doesn’t return any value
Python
# my_listmy_list = ['geeks', 'for'] # Add 'geeks' to the listmy_lis... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 151,
"s": 52,
"text": "The Python List append() method is used for appending and adding elements to the end of the List. "
},
{
"code": null,
"e": 177,
"s": 151,
"text": "Syntax... |
How to Make TextView and EditText Selectable in Android? | 21 Apr, 2021
In this article, we are going to implement a very important feature related to TextView. While using any social media app or like using Facebook you may have seen there is a particular type of TextView which you cannot copy like a caption that people write on their posts. You can select the message but the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "In this article, we are going to implement a very important feature related to TextView. While using any social media app or like using Facebook you may have seen there is a p... |
JP Morgan Archives - GeeksforGeeks | JP Morgan Chase Interview Questions
JP Morgan Chase & Co. (JPMC) Interview Experience | (Full time Software Engineer)
JPMorgan Chase & Co. Code for Good Internship Interview Experience 2021
JP Morgan Chase - Code for Good Interview Experience for Software Engineer FTE
JP Morgan Interview Experience for Quantitative Res... | [
{
"code": null,
"e": 24166,
"s": 24130,
"text": "JP Morgan Chase Interview Questions"
},
{
"code": null,
"e": 24248,
"s": 24166,
"text": "JP Morgan Chase & Co. (JPMC) Interview Experience | (Full time Software Engineer)"
},
{
"code": null,
"e": 24320,
"s": 24248,
... |
How to create a REST API using Java Spring Boot | 01 Jun, 2020
Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services, provide interoperability between computer systems on the Internet. RESTful... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 634,
"s": 52,
"text": "Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to ... |
Python | PanedWindow Widget in Tkinter | 07 Jun, 2019
Tkinter supports a variety of widgets to make GUI more and more attractive and functional. The PanedWindow widget is a geometry manager widget, which can contain one or more child widgets panes. The child widgets can be resized by the user, by moving separator lines sashes using the mouse.
Syntax: PanedWin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 319,
"s": 28,
"text": "Tkinter supports a variety of widgets to make GUI more and more attractive and functional. The PanedWindow widget is a geometry manager widget, which can contain one or more c... |
Python | Ways to flatten a 2D list | 03 Aug, 2021
Given a 2D list, write a Python program to convert the given list into a flattened list.
Method #1: Using chain.iterable()
Python3
# Python code to demonstrate# converting 2d list into 1d list# using chain.from_iterables # import chainfrom itertools import chain ini_list = [[1, 2, 3], [3, 6, 7... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 144,
"s": 54,
"text": "Given a 2D list, write a Python program to convert the given list into a flattened list. "
},
{
"code": null,
"e": 179,
"s": 144,
"text": "Method #1: Usin... |
Python | Sort a tuple by its float element | 24 Dec, 2017
In this article, we will see how we can sort a tuple (consisting of float elements) using its float elements. Here we will see how to do this by using the built-in method sorted() and how can this be done using in place method of sorting.
Examples:
Input : tuple = [('lucky', '18.265'), ('nikhil', '14.107')... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Dec, 2017"
},
{
"code": null,
"e": 292,
"s": 53,
"text": "In this article, we will see how we can sort a tuple (consisting of float elements) using its float elements. Here we will see how to do this by using the built-in method sor... |
cmd | cls command | 29 Sep, 2020
Cls is a internal command found inside windows command interpreter cmd, that is used for clearing the console window.It does so by removing the entry of all previously entered commands, and their corresponding outputs. The command was first introduced in the MSDOS Version 2. Initially it was for command.co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Sep, 2020"
},
{
"code": null,
"e": 663,
"s": 28,
"text": "Cls is a internal command found inside windows command interpreter cmd, that is used for clearing the console window.It does so by removing the entry of all previously entered... |
Hangman Game in Python | 11 Mar, 2022
Hangman Wiki: The origins of Hangman are obscure meaning not discovered, but it seems to have arisen in Victorian times, ” says Tony Augarde, author of The Oxford Guide to Word Games. The game is mentioned in Alice Bertha Gomme’s “Traditional Games” in 1894 under the name “Birds, Beasts and Fishes.” The ru... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 580,
"s": 54,
"text": "Hangman Wiki: The origins of Hangman are obscure meaning not discovered, but it seems to have arisen in Victorian times, ” says Tony Augarde, author of The Oxford Guide to Wo... |
Event Binding in Angular 8 | 14 Sep, 2020
In Angular 8, event binding is used to handle the events raised by the user actions like button click, mouse movement, keystrokes, etc. When the DOM event happens at an element(e.g. click, keydown, keyup), it calls the specified method in the particular component.
Using Event Binding we can bind data from... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "In Angular 8, event binding is used to handle the events raised by the user actions like button click, mouse movement, keystrokes, etc. When the DOM event happens at an elemen... |
Python - Heat Maps | A heatmap contains values representing various shades of the same colour for each value to be plotted. Usually the darker shades of the chart represent higher values than the lighter shade. For a very different value a completely different colour can also be used.
The below example is a two-dimensional plot of values... | [
{
"code": null,
"e": 2930,
"s": 2663,
"text": "A heatmap contains values representing various shades of the same colour for each value to be plotted. Usually the darker shades of the chart represent higher values than the lighter shade. For a very different value a completely different colour can al... |
Scatter Plot Matrix | 21 Nov, 2021
In a dataset, for k set of variables/columns (X1, X2, ....Xk), the scatter plot matrix plot all the pairwise scatter between different variables in the form of a matrix.
Scatter plot matrix answer the following questions:
Are there any pair-wise relationships between different variables? And if there are... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2021"
},
{
"code": null,
"e": 200,
"s": 28,
"text": "In a dataset, for k set of variables/columns (X1, X2, ....Xk), the scatter plot matrix plot all the pairwise scatter between different variables in the form of a matrix. "
... |
How to use links on card-img-overlay class in Bootstrap 4 ? | 15 Apr, 2020
When we put any link inside of a bootstrap card it performs well until we used card-img-overlay to put an image as a background of that card.
Bootstrap Card: A card in BootStrap 4 is a flexible and extensible content container. It includes options for headers, footers, content, colors, links etc.
Card Imag... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2020"
},
{
"code": null,
"e": 170,
"s": 28,
"text": "When we put any link inside of a bootstrap card it performs well until we used card-img-overlay to put an image as a background of that card."
},
{
"code": null,
"... |
Python | Find maximum value in each sublist | 14 Feb, 2019
Given list of lists in Python, write a Python program to find maximum value of list each sub-list.
Examples:
Input : [[10, 13, 454, 66, 44], [10, 8, 7, 23]]
Output : [454, 23]
Input : [[15, 12, 27, 1, 33], [101, 58, 77, 23]]
Output : [33, 101]
Method #1: Using list comprehension.
# Python code to Find ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2019"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "Given list of lists in Python, write a Python program to find maximum value of list each sub-list."
},
{
"code": null,
"e": 137,
"s": 127,
"text": "Example... |
Program for FCFS CPU Scheduling | Set 1 | 19 Apr, 2021
Given n processes with their burst times, the task is to find average waiting time and average turn around time using FCFS scheduling algorithm. First in, first out (FIFO), also known as first come, first served (FCFS), is the simplest scheduling algorithm. FIFO simply queues processes in the order that th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 645,
"s": 52,
"text": "Given n processes with their burst times, the task is to find average waiting time and average turn around time using FCFS scheduling algorithm. First in, first out (FIFO), a... |
Convert class object to JSON in Python | 29 Dec, 2020
Conversion of the class object to JSON is done using json package in Python. json.dumps() converts Python object into a json string. Every Python object has an attribute which is denoted by __dict__ and this stores the object’s attributes.
Object is first converted into dictionary format using __dict__ at... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "Conversion of the class object to JSON is done using json package in Python. json.dumps() converts Python object into a json string. Every Python object has an attribute which... |
Namespaces and Scope in Python | 09 Feb, 2021
A namespace is a system that has a unique name for each and every object in Python. An object might be a variable or a method. Python itself maintains a namespace in the form of a Python dictionary. Let’s go through an example, a directory-file system structure in computers. Needless to say, that one can h... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Feb, 2021"
},
{
"code": null,
"e": 1341,
"s": 52,
"text": "A namespace is a system that has a unique name for each and every object in Python. An object might be a variable or a method. Python itself maintains a namespace in the for... |
Kotlin Nested class and Inner class | 05 Oct, 2021
A class is declared within another class then it is called a nested class. By default nested class is static so we can access the nested class property or variables using dot(.) notation without creating an object of the class.Syntax of declaration:
class outerClass {
............
// outer cl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 303,
"s": 52,
"text": "A class is declared within another class then it is called a nested class. By default nested class is static so we can access the nested class property or variables using dot... |
Python – Find text using beautifulSoup then replace in original soup variable | 29 Nov, 2021
Python provides a library called BeautifulSoap to easily allow web scraping. BeautifulSoup object is provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automated tools to make the process faster. The BeautifulSoup o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 494,
"s": 28,
"text": "Python provides a library called BeautifulSoap to easily allow web scraping. BeautifulSoup object is provided by Beautiful Soup which is a web scraping framework for Python. W... |
Java Program to check Armstrong Number | 27 Sep, 2021
Problem Statement – Given a number x. Write a Java Program to determine whether the given number is Armstrong’s number or not.
Examples –
Input : 153
Output : Yes
153 is an Armstrong number.
1*1*1 + 5*5*5 + 3*3*3 = 153
Input : 120
Output : No
120 is not a Armstrong number.
1*1*1 + 2*2*2 + 0*0*0 = 9
Inp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 180,
"s": 52,
"text": "Problem Statement – Given a number x. Write a Java Program to determine whether the given number is Armstrong’s number or not. "
},
{
"code": null,
"e": 192,
... |
Set isEmpty() method in Java with Examples | 31 Dec, 2018
The java.util.Set.isEmpty() method is used to check if a Set is empty or not. It returns True if the Set is empty otherwise it returns False.
Syntax:
boolean isEmpty()
Parameters: This method does not take any parameter
Return Value: The method returns True if the set is empty else returns False.
Below pro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2018"
},
{
"code": null,
"e": 170,
"s": 28,
"text": "The java.util.Set.isEmpty() method is used to check if a Set is empty or not. It returns True if the Set is empty otherwise it returns False."
},
{
"code": null,
"... |
Firebase - Data | The Firebase data is representing JSON objects. If you open your app from Firebase dashboard, you can add data manually by clicking on the + sign.
We will create a simple data structure. You can check the image below.
In the previous chapter, we connected Firebase to our app. Now, we can log Firebase to the console.
co... | [
{
"code": null,
"e": 2313,
"s": 2166,
"text": "The Firebase data is representing JSON objects. If you open your app from Firebase dashboard, you can add data manually by clicking on the + sign."
},
{
"code": null,
"e": 2384,
"s": 2313,
"text": "We will create a simple data struct... |
How to get the number of days between two Dates in JavaScript? | To get the number of days between two dates, use the Maths.floor() method.
You can try to run the following code to get days between two dates −
Live Demo
<html>
<head>
<title>JavaScript Get Days</title>
</head>
<body>
<script>
var date1, date2;
date1 = new Date();
docume... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To get the number of days between two dates, use the Maths.floor() method."
},
{
"code": null,
"e": 1207,
"s": 1137,
"text": "You can try to run the following code to get days between two dates −"
},
{
"code": null,
"e": ... |
Logistic Regression. A simpler intuitive explanation. | by Abhishek Kumar | Towards Data Science | Contrary to its name logistic regression is a classification algorithm. Given an input example, a logistic regression model assigns the example to a relevant class.
A note on the notation. x_{i} means x subscript i and x_{^th} means x superscript th.
Linear Regression is used to predict a real-valued output anywhere be... | [
{
"code": null,
"e": 337,
"s": 172,
"text": "Contrary to its name logistic regression is a classification algorithm. Given an input example, a logistic regression model assigns the example to a relevant class."
},
{
"code": null,
"e": 423,
"s": 337,
"text": "A note on the notatio... |
Reproducible model training: deep dive | by Vladislav Grozin | Towards Data Science | Reproducible research is easy. Just log your parameters and metrics somewhere, fix seeds, and you are good to go
— me, about two weeks ago.
Oh boy, I was wrong.
There are a lot of workshops, tutorials, and conferences on reproducible research.
A plethora of utilities, tools, and frameworks are made to help us make nice... | [
{
"code": null,
"e": 285,
"s": 172,
"text": "Reproducible research is easy. Just log your parameters and metrics somewhere, fix seeds, and you are good to go"
},
{
"code": null,
"e": 312,
"s": 285,
"text": "— me, about two weeks ago."
},
{
"code": null,
"e": 333,
... |
How to Copy Files in Python | Towards Data Science | Copying files programmatically, is one of the most common tasks in day-to-day software development. In today’s short guide we will explore a few different ways for copying files in Python using a library called shutil.
The shutil module is part of the Python’s Standard Library and offers a wide range of high level file... | [
{
"code": null,
"e": 390,
"s": 171,
"text": "Copying files programmatically, is one of the most common tasks in day-to-day software development. In today’s short guide we will explore a few different ways for copying files in Python using a library called shutil."
},
{
"code": null,
"e":... |
How to choose stocks to invest in with Python | by Khuyen Tran | Towards Data Science | You plan to invest in several stocks in the coming 3 years, each with a different expected return for each dollar invested and a specific amount of investment, as shown in the table below (all in thousands of dollars). Given that the amount you can invest in stock purchases is limited each year, you want to decide whic... | [
{
"code": null,
"e": 561,
"s": 172,
"text": "You plan to invest in several stocks in the coming 3 years, each with a different expected return for each dollar invested and a specific amount of investment, as shown in the table below (all in thousands of dollars). Given that the amount you can invest... |
MATLAB - Quick Guide | MATLAB (matrix laboratory) is a fourth-generation high-level programming language and interactive environment for numerical computation, visualization and programming.
It allows matrix manipulations; plotting of functions and data; implementation of algorithms; creation of user interfaces; interfacing with programs wri... | [
{
"code": null,
"e": 2309,
"s": 2141,
"text": "MATLAB (matrix laboratory) is a fourth-generation high-level programming language and interactive environment for numerical computation, visualization and programming."
},
{
"code": null,
"e": 2593,
"s": 2309,
"text": "It allows matr... |
ReactJS ReactStrap Tooltip Component - GeeksforGeeks | 28 Jul, 2021
Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Tooltip component helps in displaying informative text when users hover over, focus on, or tap an element. We can use the following approach ... | [
{
"code": null,
"e": 25312,
"s": 25284,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 25679,
"s": 25312,
"text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. T... |
Difference between align-content and align-items - GeeksforGeeks | 14 Aug, 2020
Both align-content and align-items function on the cross-axis.Cross-axis in flexbox is dependent on the flex-direction and runs perpendicular to the main-axis, if flex-direction is either row or row-reverse then the cross-axis is vertical, if flex-direction is either column or column-reverse then the cross... | [
{
"code": null,
"e": 25400,
"s": 25372,
"text": "\n14 Aug, 2020"
},
{
"code": null,
"e": 25728,
"s": 25400,
"text": "Both align-content and align-items function on the cross-axis.Cross-axis in flexbox is dependent on the flex-direction and runs perpendicular to the main-axis, if ... |
Single and Multi-Step Temperature Time Series Forecasting for Vilnius Using LSTM Deep Learning Model | by Eligijus Bujokas | Towards Data Science | The aim of this article is to provide code examples and explain the intuition behind modeling time series data using python and TensorFlow.
All the code and data is public and can be seen in the following repository:
github.com
This article is a generalization of one of my previous articles:
towardsdatascience.com
The ... | [
{
"code": null,
"e": 311,
"s": 171,
"text": "The aim of this article is to provide code examples and explain the intuition behind modeling time series data using python and TensorFlow."
},
{
"code": null,
"e": 388,
"s": 311,
"text": "All the code and data is public and can be see... |
Pair in C++ Standard Template Library (STL) | In this tutorial, we will be discussing a program to understand pair in C++ Standard Template Library.
Pair is a container defined in the utility header that contains two values. It is used to combine two values and associate them even if they are of different types.
Live Demo
#include <iostream>
#include <utility>
us... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand pair in C++ Standard Template Library."
},
{
"code": null,
"e": 1330,
"s": 1165,
"text": "Pair is a container defined in the utility header that contains two values. It ... |
How to Easily Perform Pandas Operations on S3 With AWS Data Wrangler | by Ahmed Besbes | Towards Data Science | I’ve always found it a bit complex and non-intuitive to programmatically interact with S3 to perform simple tasks such as file readings or writings, bulk downloads or uploads or even massive file deletions (with wildcards and stuff).
My typical use-cases deal with Pandas dataframes I download from (or save to) S3 in an... | [
{
"code": null,
"e": 405,
"s": 171,
"text": "I’ve always found it a bit complex and non-intuitive to programmatically interact with S3 to perform simple tasks such as file readings or writings, bulk downloads or uploads or even massive file deletions (with wildcards and stuff)."
},
{
"code":... |
Private VLAN - GeeksforGeeks | 02 Nov, 2021
Prerequisite – Virtual LAN (VLAN)Virtual LAN (VLAN) is used to break a broadcast domain into smaller domain at layer 2. Only (all) hosts belonging to same VLAN are able to communicate with each other while communicating with other VLAN hosts, Inter Vlan routing is done. But in same VLAN, if we want some ho... | [
{
"code": null,
"e": 23825,
"s": 23797,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 24281,
"s": 23825,
"text": "Prerequisite – Virtual LAN (VLAN)Virtual LAN (VLAN) is used to break a broadcast domain into smaller domain at layer 2. Only (all) hosts belonging to same VLAN are... |
Check if concatenation of two strings is balanced or not - GeeksforGeeks | 24 Sep, 2021
Given two bracket sequences S1 and S2 consisting of ‘(‘ and ‘)’. The task is to check if the string obtained by concatenating both the sequences is balanced or not. Concatenation can be done by s1+s2 or s2+s1.
Examples:
Input: s1 = “)()(())))”, s2 = “(()(()(” Output: Balanced s2 + s1 = “(()(()()()(())))”,... | [
{
"code": null,
"e": 25012,
"s": 24984,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 25222,
"s": 25012,
"text": "Given two bracket sequences S1 and S2 consisting of ‘(‘ and ‘)’. The task is to check if the string obtained by concatenating both the sequences is balanced or not... |
Using Jupyter Notebook in Virtual Environment | 14 Sep, 2021
In this article, we are going to see how to set Virtual Environment in Jupyter. Sometimes we want to use the Jupyter notebook in a virtual environment so that only selected packages are available in the scope of the notebook. To do this we have to add a new kernel for the virtual environment in the list of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 406,
"s": 28,
"text": "In this article, we are going to see how to set Virtual Environment in Jupyter. Sometimes we want to use the Jupyter notebook in a virtual environment so that only selected pa... |
GUI Automation using Python | 15 Jul, 2021
In this article, we will explore how we can do GUI automation using Python. There are many modules that can do these things, but in this article, we will use a module named PyAutoGUI to perform GUI and desktop automation using python.
We would explore two sections –
How to automatically use the mouse poin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 264,
"s": 28,
"text": "In this article, we will explore how we can do GUI automation using Python. There are many modules that can do these things, but in this article, we will use a module named Py... |
Python program to find birthdate on the same day you were born | 11 Dec, 2019
Write a program to find birthdates till a given year on the same day you were born. Let the input be of the format: YYYY-MM-DD
Examples:
Input: 1996-11-12Output: [‘1996-11-12’, ‘2002-11-12’, ‘2013-11-12’, ‘2019-11-12’, ‘2024-11-12’, ‘2030-11-12’, ‘2041-11-12’, ‘2047-11-12’]
Input: 1992-11-2Output: [‘1992-1... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2019"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Write a program to find birthdates till a given year on the same day you were born. Let the input be of the format: YYYY-MM-DD"
},
{
"code": null,
"e": 165,
"s... |
Java Program For Decimal to Hexadecimal Conversion | 25 Apr, 2022
Given a decimal number N, convert N into an equivalent hexadecimal number i.e convert the number with base value 10 to base value 16. The decimal number system uses 10 digits 0-9 and the Hexadecimal number system uses 0-9, A-F to represent any numeric value.
Examples:
Input : 10Output: A
Input : 2545Outpu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Apr, 2022"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "Given a decimal number N, convert N into an equivalent hexadecimal number i.e convert the number with base value 10 to base value 16. The decimal number system uses 10 digits ... |
Minimum number of replacements to make the binary string alternating | Set 2 | 22 Apr, 2022
Given a binary string str, the task is to find the minimum number of characters in the string that have to be replaced in order to make the string alternating (i.e. of the form 01010101... or 10101010...).Examples:
Input: str = “1100” Output: 2 Replace 2nd character with ‘0’ and 3rd character with ‘1’Inp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 269,
"s": 52,
"text": "Given a binary string str, the task is to find the minimum number of characters in the string that have to be replaced in order to make the string alternating (i.e. of the fo... |
Modular exponentiation (Recursive) | 31 May, 2022
Given three numbers a, b and c, we need to find (ab) % cNow why do “% c” after exponentiation, because ab will be really large even for relatively small values of a, b and that is a problem because the data type of the language that we try to code the problem, will most probably not let us store such a lar... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 383,
"s": 54,
"text": "Given three numbers a, b and c, we need to find (ab) % cNow why do “% c” after exponentiation, because ab will be really large even for relatively small values of a, b and th... |
Find an array element such that all elements are divisible by it | 14 Jun, 2022
Given an array of numbers, find the number among them such that all numbers are divisible by it. If not possible print -1.Examples:
Input : arr = {25, 20, 5, 10, 100}
Output : 5
Explanation : 5 is an array element
which divides all numbers.
Input : arr = {9, 3, 6, 2, 15}
Output : -1
Explanation : N... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 187,
"s": 53,
"text": "Given an array of numbers, find the number among them such that all numbers are divisible by it. If not possible print -1.Examples: "
},
{
"code": null,
"e": 406... |
java.nio.file.Paths Class in Java | 12 Mar, 2021
java.nio.file.Paths class contains static methods for converting path string or URI into Path.
Class declaration :
public final class Paths
extends Object
Methods:
get(String first, String... more)
This method converts a path string, or a sequence of strings that when joined form a path string, to a Path.... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 148,
"s": 53,
"text": "java.nio.file.Paths class contains static methods for converting path string or URI into Path."
},
{
"code": null,
"e": 168,
"s": 148,
"text": "Class decl... |
Next Sentence Prediction using BERT | 27 Jan, 2022
Pre-requisite: BERT-GFG
BERT stands for Bidirectional Representation for Transformers. It was proposed by researchers at Google Research in 2018. Although, the main aim of that was to improve the understanding of the meaning of queries related to Google Search. A study shows that Google encountered 15% of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 52,
"s": 28,
"text": "Pre-requisite: BERT-GFG"
},
{
"code": null,
"e": 500,
"s": 52,
"text": "BERT stands for Bidirectional Representation for Transformers. It was proposed by re... |
Find the k-th smallest divisor of a natural number N | 27 May, 2021
You’re given a number N and a number K. Our task is to find the kth smallest divisor of N.Examples:
Input : N = 12, K = 5
Output : 6
The divisors of 12 after sorting are 1, 2, 3, 4, 6 and 12.
Where the value of 5th divisor is equal to 6.
Input : N = 16, K 2
Output : 2
Simple Approach: A simple approach ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 153,
"s": 52,
"text": "You’re given a number N and a number K. Our task is to find the kth smallest divisor of N.Examples: "
},
{
"code": null,
"e": 324,
"s": 153,
"text": "Inpu... |
Python | os.nice() method | 27 Jun, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
All functions in os module raise OSError in the case of invalid or inaccessible file nam... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jun, 2019"
},
{
"code": null,
"e": 247,
"s": 28,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin... |
Tailwind CSS Rotate | 23 Mar, 2022
This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is used to rotate an element based on the given angle as an argument. The angle can be set in terms of degrees, radians, or turns. In CSS, we can do that by using the CSS rotate() function.
Ro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is used to rotate an element based on the given angle as an ... |
Machine Learning : Decision Tree using Spark For Layman | by Sandeep Khurana | Towards Data Science | We will go over the definition, intuition and algorithm of a Decision Tree in this article.
Then we will write our own code, without using any ML library (like tensorflow etc). This will give good understanding and hands on experience for implementing decision tree.
Definition from study.com
A decision tree is a graphi... | [
{
"code": null,
"e": 264,
"s": 172,
"text": "We will go over the definition, intuition and algorithm of a Decision Tree in this article."
},
{
"code": null,
"e": 439,
"s": 264,
"text": "Then we will write our own code, without using any ML library (like tensorflow etc). This will... |
Create a Donut Chart using Recharts in ReactJS - GeeksforGeeks | 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 Donut Chart using Recharts, we create a dataset that contains actual data. The... | [
{
"code": null,
"e": 25304,
"s": 25273,
"text": " \n27 Jul, 2021\n"
},
{
"code": null,
"e": 25522,
"s": 25304,
"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,... |
Which Evaluation Metric Should You Use in Machine Learning Regression Problems? | by Jeff Hale | Towards Data Science | If you’re like me, you might have used R-Squared (R2), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE )evaluation metrics in your regression problems without giving them a lot of thought. 🤔
Although all of them are common metrics, it’s not obvious which one to use when. After writing this article I have ... | [
{
"code": null,
"e": 375,
"s": 171,
"text": "If you’re like me, you might have used R-Squared (R2), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE )evaluation metrics in your regression problems without giving them a lot of thought. 🤔"
},
{
"code": null,
"e": 556,
"s":... |
How to make photo sliding effect using HTML and CSS ? - GeeksforGeeks | 22 Jun, 2021
It is an easy and amazing animation effect created with HTML and CSS, where the photos are moving horizontally one by one like a roller. When the mouse pointer comes upon the photo then the specific photo stops moving.
Approach: The basic idea of these animation comes from the hover effect of CSS animation... | [
{
"code": null,
"e": 25296,
"s": 25268,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 25515,
"s": 25296,
"text": "It is an easy and amazing animation effect created with HTML and CSS, where the photos are moving horizontally one by one like a roller. When the mouse pointer com... |
Find last index of a character in a string - GeeksforGeeks | 30 Apr, 2021
Given a string str and a character x, find last index of x in str.Examples :
Input : str = "geeks", x = 'e'
Output : 2
Last index of 'e' in "geeks" is: 2
Input : str = "Hello world!", x = 'o'
Output : 7
Last index of 'o' is: 7
Method 1 (Simple : Traverse from left) : Traverse given string from left ... | [
{
"code": null,
"e": 24616,
"s": 24588,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 24695,
"s": 24616,
"text": "Given a string str and a character x, find last index of x in str.Examples : "
},
{
"code": null,
"e": 24848,
"s": 24695,
"text": "Input : str... |
PHP - Function MySQLi Fetch Object | mysqli_fetch_object(result,classname,params);
It returns the current row of a result set, as an object.
It returns string properties for the fetched row or NULL if there are no more rows in the result set
result
It specifies the result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_resu... | [
{
"code": null,
"e": 2804,
"s": 2757,
"text": "mysqli_fetch_object(result,classname,params);\n"
},
{
"code": null,
"e": 2862,
"s": 2804,
"text": "It returns the current row of a result set, as an object."
},
{
"code": null,
"e": 2963,
"s": 2862,
"text": "It re... |
How to Use IterativeImputer and KNNImputer For Powerful Missing Data Imputation | Towards Data Science | Despite the massive number of MOOCs and other online resources, there are still skill gaps in dealing with certain data problems. One example is properly dealing with missing data in real-world datasets. Beginner learners might take this problem lightly, and they are not to blame. Even though it is such a pressing issu... | [
{
"code": null,
"e": 641,
"s": 172,
"text": "Despite the massive number of MOOCs and other online resources, there are still skill gaps in dealing with certain data problems. One example is properly dealing with missing data in real-world datasets. Beginner learners might take this problem lightly, ... |
Extracting Keywords from a Text Using R Regex (Easy) | by Deborah Kewon | Towards Data Science | When you have a large volume of text files, extracting only relevant information is not so easy. It is complicated and time-consuming. For this reason, I want to show you how I used Regex to extract locations from U.S. job description.
Here is the structure of a job description. My goal is to extract only states from t... | [
{
"code": null,
"e": 408,
"s": 172,
"text": "When you have a large volume of text files, extracting only relevant information is not so easy. It is complicated and time-consuming. For this reason, I want to show you how I used Regex to extract locations from U.S. job description."
},
{
"code... |
Explain ValueFromPipeline in PowerShell Advanced Functions. | Consider the below example, we have created Advanced function to get the specific process
information like Process Name, Process ID (PID), Start Time, Responding status, etc.
function Get-ProcessInformation{
[cmdletbinding()]
param(
[Parameter(Mandatory=$True)]
[string[]]$name
)
Begin{
Wri... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "Consider the below example, we have created Advanced function to get the specific process\ninformation like Process Name, Process ID (PID), Start Time, Responding status, etc."
},
{
"code": null,
"e": 1617,
"s": 1237,
"text": "functi... |
5 Easy Ways of Customizing Pandas Plots and Charts | by Alan Jones | Towards Data Science | Perhaps you are a data journalist putting a new story together, or a data scientist preparing a paper or presentation. You’ve got a nice set of charts that are looking good but a bit of tweaking would be helpful. Maybe you want to give them all titles. Maybe some would be improved with a grid, or the ticks are in the w... | [
{
"code": null,
"e": 533,
"s": 172,
"text": "Perhaps you are a data journalist putting a new story together, or a data scientist preparing a paper or presentation. You’ve got a nice set of charts that are looking good but a bit of tweaking would be helpful. Maybe you want to give them all titles. Ma... |
Difference between grep and fgrep command - GeeksforGeeks | 27 Dec, 2018
The grep filter searches a file for a particular pattern of characters and displays all lines that contain that pattern. The fgrep filter searches for fixed-character strings in a file or files.
Syntax of grep command:
grep [options] pattern [files]
Syntax of fgrep command:
fgrep [options] pattern [files]... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n27 Dec, 2018"
},
{
"code": null,
"e": 25053,
"s": 24858,
"text": "The grep filter searches a file for a particular pattern of characters and displays all lines that contain that pattern. The fgrep filter searches for fixed-charac... |
Scan-line Polygon filling using OPENGL in C | 06 Jun, 2022
Figures on a computer screen can be drawn using polygons. To fill those figures with color, we need to develop some algorithm.There are two famous algorithms for this purpose: Boundary fill and Scanline fill algorithms.Boundary filling requires a lot of processing and thus encounters few problems in real t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 535,
"s": 52,
"text": "Figures on a computer screen can be drawn using polygons. To fill those figures with color, we need to develop some algorithm.There are two famous algorithms for this purpose... |
How to Replace specific values in column in R DataFrame ? | 01 Jun, 2021
In this article, we will see how to replace specific values in a column of DataFrame in R Programming Language.
Method 1: Using Replace() function.
replace() function in R Language is used to replace the values in the specified string vector x with indices given in list by those given in values.
Syntax: r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "In this article, we will see how to replace specific values in a column of DataFrame in R Programming Language. "
},
{
"code": null,
"e": 177,
"s": 141,
"t... |
Python | Pandas Series.ix | 28 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Matplotlib.axes.Axes.axvline() in Python | 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": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
Matplotlib – Animate Multiple Lines | 07 Jul, 2021
In this article, we are going to learn about how to make an animated chart of multiple lines using matplotlib. Animating the charts can make things more attractive and also help others to visualize the data more appropriately rather than static charts. Animations make even more sense when we are working wi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 476,
"s": 54,
"text": "In this article, we are going to learn about how to make an animated chart of multiple lines using matplotlib. Animating the charts can make things more attractive and also h... |
Ruby Search and Replace | 25 Sep, 2019
sub and gsub string methods that use regular expressions, and their in-place variants are sub! and gsub!. The sub & sub! replaces the first occurrence of the pattern and gsub & gsub! replaces all occurrences. All of these methods perform a search-and-replace operation using a Regexp pattern. sub! and gsub!... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 504,
"s": 28,
"text": "sub and gsub string methods that use regular expressions, and their in-place variants are sub! and gsub!. The sub & sub! replaces the first occurrence of the pattern and gsub ... |
Minimum number of socks required to picked to have at least K pairs of the same color | 05 May, 2021
Given an array arr[] consisting of N integers such that arr[i] representing the number of socks of the color i and an integer K, the task is to find the minimum number of socks required to be picked to get at least K pairs of socks of the same color.
Examples:
Input: arr[] = {3, 4, 5, 3}, K = 6Output: 15Ex... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 303,
"s": 52,
"text": "Given an array arr[] consisting of N integers such that arr[i] representing the number of socks of the color i and an integer K, the task is to find the minimum number of soc... |
Why is Numpy faster in Python? | 13 Aug, 2021
NumPy is a Python fundamental package used for efficient manipulations and operations on High-level mathematical functions, Multi-dimensional arrays, Linear algebra, Fourier Transformations, Random Number Capabilities, etc. It provides tools for integrating C, C++, and Fortran code in Python. NumPy is most... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 404,
"s": 52,
"text": "NumPy is a Python fundamental package used for efficient manipulations and operations on High-level mathematical functions, Multi-dimensional arrays, Linear algebra, Fourier ... |
Balanced Binary Search Trees - GeeksforGeeks | 06 May, 2017
a
/ \
/ \
b c
/ \ /
/ \ /
d e g
/
/
h
A
100
/
50 200
/
10 300
B
100
/
50 200
... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n06 May, 2017"
},
{
"code": null,
"e": 29749,
"s": 29577,
"text": " a\n / \\\n / \\\n b c\n / \\ /\n / \\ /\n d e g\n ... |
Program to compute Log n | 05 Oct, 2021
Write a one-line C function that calculates and returns . For example, if n = 64, then your function should return 6, and if n = 128, then your function should return 7.
Using Recursion
C++
C
Java
Python3
C#
Javascript
// C++ program to find log(n) using Recursion#include <iostream>using namespace std; u... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "Write a one-line C function that calculates and returns . For example, if n = 64, then your function should return 6, and if n = 128, then your function should return 7. "
... |
Given a string, print all possible palindromic partitions | 28 May, 2022
Given a string, find all possible palindromic partitions of given string.Example:
Note that this problem is different from Palindrome Partitioning Problem, there the task was to find the partitioning with minimum cuts in input string. Here we need to print all possible partitions.The idea is to go thro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 May, 2022"
},
{
"code": null,
"e": 136,
"s": 52,
"text": "Given a string, find all possible palindromic partitions of given string.Example: "
},
{
"code": null,
"e": 582,
"s": 138,
"text": "Note that this proble... |
JasperReports - Exporting Reports | We have seen in the previous chapter, how to print and view a JasperReport generated document. Here, we shall see how to transform or export these reports into other formats such as PDF, HTML, and XLS. Facade class net.sf.jasperreports.engine.JasperExportManager is provided to achieve this functionality. Exporting mean... | [
{
"code": null,
"e": 2785,
"s": 2388,
"text": "We have seen in the previous chapter, how to print and view a JasperReport generated document. Here, we shall see how to transform or export these reports into other formats such as PDF, HTML, and XLS. Facade class net.sf.jasperreports.engine.JasperExpo... |
MATLAB | Converting a Grayscale Image to Binary Image using Thresholding | 28 Oct, 2021
Thresholding is the simplest method of image segmentation and the most common way to convert a grayscale image to a binary image.In thresholding, we select a threshold value and then all the gray level value which is below the selected threshold value is classified as 0(black i.e background ) and all the g... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 467,
"s": 52,
"text": "Thresholding is the simplest method of image segmentation and the most common way to convert a grayscale image to a binary image.In thresholding, we select a threshold value ... |
How to make calculator using kivy | Python | 19 Oct, 2021
Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
???????? Kivy Tutorial – Learn Kivy with Examples.
In this article, we... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 291,
"s": 54,
"text": "Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it do... |
POSIX Threads in OS | 16 Jul, 2021
POSIX Threads in OS :The POSIX thread libraries are a C/C++ thread API based on standards. It enables the creation of a new concurrent process flow. It works well on multi-processor or multi-core systems, where the process flow may be scheduled to execute on another processor, increasing speed through para... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 760,
"s": 54,
"text": "POSIX Threads in OS :The POSIX thread libraries are a C/C++ thread API based on standards. It enables the creation of a new concurrent process flow. It works well on multi-pr... |
Time Complexity Analysis | Tower Of Hanoi (Recursion) | 27 Jan, 2022
Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules: 1) Only one disk can be moved at a time. 2) Each move consists of taking the upper disk from one of the stacks and placin... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 512,
"s": 54,
"text": "Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following si... |
Record-Based Data Model | 24 Aug, 2020
Data Model is the model that organizes elements of the data and tell how they relate to one-another and with the properties of real-world entities. The basic purpose of the data model is to make sure that the data stored in the data model is understood fully.
Further, it has three types-
1. Physical Data M... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Aug, 2020"
},
{
"code": null,
"e": 313,
"s": 53,
"text": "Data Model is the model that organizes elements of the data and tell how they relate to one-another and with the properties of real-world entities. The basic purpose of the d... |
C | Macro & Preprocessor | Question 1 - GeeksforGeeks | 12 Jan, 2013
#include <stdio.h>#define PRINT(i, limit) do \ { \ if (i++ < limit) \ { \ printf("GeeksQuiz\n"); \ continue; \ } \ }wh... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n12 Jan, 2013"
},
{
"code": "#include <stdio.h>#define PRINT(i, limit) do \\ { \\ if (i++ < limit) \\ { \\ printf(\"GeeksQuiz\\n\"); \... |
Do you Really Need A GPU For Deep Learning? | by Bharath K | Towards Data Science | I have always been a huge fan of gaming and a bit of a gaming nerd.
Since childhood, the only requirement I saw for graphics cards was for the purpose of gaming.
Luckily for me, after I started getting into artificial intelligence and data science, especially deep learning, I realized the true potential of graphics car... | [
{
"code": null,
"e": 240,
"s": 172,
"text": "I have always been a huge fan of gaming and a bit of a gaming nerd."
},
{
"code": null,
"e": 334,
"s": 240,
"text": "Since childhood, the only requirement I saw for graphics cards was for the purpose of gaming."
},
{
"code": nu... |
Count composite fibonacci numbers from given array - GeeksforGeeks | 09 Jun, 2021
Given an array arr[] of size N, the task is to find the composite Fibonacci numbers present in the given array.
Examples:
Input: arr[] = {13, 55, 7, 3, 5, 21, 233, 144, 6}Output: 55 21 144Explanation: Composite array elements are {55, 21, 144, 6}. Fibonacci array elements are {55, 21, 144}. Therefore, arra... | [
{
"code": null,
"e": 25400,
"s": 25372,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 25512,
"s": 25400,
"text": "Given an array arr[] of size N, the task is to find the composite Fibonacci numbers present in the given array."
},
{
"code": null,
"e": 25522,
"s"... |
Inplace vs Standard Operators in Python - GeeksforGeeks | 10 Aug, 2021
Inplace Operators – Set 1, Set 2Normal operators do the simple assigning job. On other hand, Inplace operators behave similarly to normal operators except that they act in a different manner in case of mutable and Immutable targets.
The _add_ method, does simple addition, takes two arguments, returns the... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 24160,
"s": 23925,
"text": "Inplace Operators – Set 1, Set 2Normal operators do the simple assigning job. On other hand, Inplace operators behave similarly to normal operators except that the... |
Find the Majority Element | Set 3 (Bit Magic) - GeeksforGeeks | 12 Feb, 2022
Pre-requisite: Majority Element, Majority Element | Set-2 (Hashing)Given an array of size N, find the majority element. The majority element is the element that appears more than n/2 times in the given array.
Examples:
Input: {3, 3, 4, 2, 4, 4, 2, 4, 4}
Output: 4
Input: {3, 3, 6, 2, 4, 4, 2, 4}
Output: ... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n12 Feb, 2022"
},
{
"code": null,
"e": 25031,
"s": 24822,
"text": "Pre-requisite: Majority Element, Majority Element | Set-2 (Hashing)Given an array of size N, find the majority element. The majority element is the element that ap... |
Displaying bar graphs using Matplotlib | In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is −
import matplotlib.pyplot as plt
Pyplot is a collection of command style functions that make Matplotlib ... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is −"
},
{
"code": null,
"e":... |
How to read and write Excel file in Node.js ? - GeeksforGeeks | 10 Jan, 2022
Node.js is an open-source and cross-platform JavaScript runtime environment that can also be used to read from a file and write to a file which can be in txt, ods, xlsx, docx, etc format.
The following example covers how an excel file(.xlsx) file is read from an excel file and then converted into JSON and ... | [
{
"code": null,
"e": 24534,
"s": 24506,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 24722,
"s": 24534,
"text": "Node.js is an open-source and cross-platform JavaScript runtime environment that can also be used to read from a file and write to a file which can be in txt, ods,... |
Best Python libraries for Machine Learning - GeeksforGeeks | 24 Jan, 2022
Machine Learning, as the name suggests, is the science of programming a computer by which they are able to learn from different kinds of data. A more general definition given by Arthur Samuel is – “Machine Learning is the field of study that gives computers the ability to learn without being explicitly pro... | [
{
"code": null,
"e": 23835,
"s": 23807,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 24810,
"s": 23835,
"text": "Machine Learning, as the name suggests, is the science of programming a computer by which they are able to learn from different kinds of data. A more general defin... |
How does JavaScript focus() method works? | Javascript focus() methods helps to highlight a HTML form element. It sets the element as an active element in the current document. In current documentation, focus can be applied to only one single element. The focus can be applied either to a text, a button, etc.
element.focus(options);
In the following example, in... | [
{
"code": null,
"e": 1330,
"s": 1062,
"text": "Javascript focus() methods helps to highlight a HTML form element. It sets the element as an active element in the current document. In current documentation, focus can be applied to only one single element. The focus can be applied either to a text, a ... |
NLP | Using dateutil to parse dates. - GeeksforGeeks | 18 Jun, 2019
The parser module can parse datetime strings in many more formats. There can be no better library than dateutil to parse dates and times in Python. To lookup the timezones, the tz module provides everything. When these modules are combined, they make it very easy to parse strings into timezone-aware dateti... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n18 Jun, 2019"
},
{
"code": null,
"e": 25908,
"s": 25589,
"text": "The parser module can parse datetime strings in many more formats. There can be no better library than dateutil to parse dates and times in Python. To lookup the t... |
Java Program For Hexadecimal to Decimal Conversion - GeeksforGeeks | 09 Mar, 2021
Given a Hexadecimal number N, convert N into an equivalent decimal number i.e convert the number with base value 16 to base value 10. The decimal number system uses 10 digits 0-9 and the Hexadecimal number system uses 0-9, A-F to represent any numeric value.
Illustration:
Input : 1AB
Output: 427
Input : ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 25484,
"s": 25225,
"text": "Given a Hexadecimal number N, convert N into an equivalent decimal number i.e convert the number with base value 16 to base value 10. The decimal number system use... |
Dart - Standard Input Output - GeeksforGeeks | 30 Jun, 2021
In Dart programming language, you can take standard input from the user through the console via the use of .readLineSync() function. To take input from the console you need to import a library, named dart:io from libraries of Dart.
About Stdin Class:
This class allows the user to read data from standard ... | [
{
"code": null,
"e": 25302,
"s": 25274,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 25535,
"s": 25302,
"text": "In Dart programming language, you can take standard input from the user through the console via the use of .readLineSync() function. To take input from the console... |
How to change the size of figures drawn with matplotlib? - GeeksforGeeks | 26 May, 2021
The main purpose of matplotlib is to create a figure representing data. The use of visualizing data is to tell stories by curating data into a form easier to understand, highlighting the trends and outliers. We can populate the figure with all different types of data, including axes, a graph plot, a geomet... | [
{
"code": null,
"e": 26261,
"s": 26233,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 26735,
"s": 26261,
"text": "The main purpose of matplotlib is to create a figure representing data. The use of visualizing data is to tell stories by curating data into a form easier to under... |
“static const” vs “#define” vs “enum” - GeeksforGeeks | 25 Oct, 2018
In this article, we will be analyzing “static const”, “#define” and “enum”. These three are often confusing and choosing which one to use can sometimes be a difficult task.
static const
static const : “static const” is basically a combination of static(a storage specifier) and const(a type qualifier).
Stat... | [
{
"code": null,
"e": 25478,
"s": 25450,
"text": "\n25 Oct, 2018"
},
{
"code": null,
"e": 25651,
"s": 25478,
"text": "In this article, we will be analyzing “static const”, “#define” and “enum”. These three are often confusing and choosing which one to use can sometimes be a diffic... |
PostgreSQL - Change Column Type - GeeksforGeeks | 28 Aug, 2020
In this article, we will discuss the step by step process of changing the data type of a column using the ALTER TABLE statement in PostgreSQL.
Syntax:
ALTER TABLE table_name
ALTER COLUMN column_name [SET DATA] TYPE new_data_type;
Let’s analyze the above syntax:
First, specify the name of the table to which... | [
{
"code": null,
"e": 25355,
"s": 25327,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 25498,
"s": 25355,
"text": "In this article, we will discuss the step by step process of changing the data type of a column using the ALTER TABLE statement in PostgreSQL."
},
{
"code"... |
ZoneId systemDefault() method in Java with Examples - GeeksforGeeks | 19 Aug, 2019
The systemDefault() method of the ZoneId class in Java is used to return the system default time-zone.
Syntax:
public String systemDefault()
Parameters: This method does not accepts any parameters.
Return Value: This method returns the zone ID.
Exceptions: This method throws following exception:
DateTimeE... | [
{
"code": null,
"e": 25303,
"s": 25275,
"text": "\n19 Aug, 2019"
},
{
"code": null,
"e": 25406,
"s": 25303,
"text": "The systemDefault() method of the ZoneId class in Java is used to return the system default time-zone."
},
{
"code": null,
"e": 25414,
"s": 25406,
... |
Functions in Go Language - GeeksforGeeks | 16 Oct, 2020
Functions are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, provides better readability of the code. So basically, a function is a collection of st... | [
{
"code": null,
"e": 26176,
"s": 26148,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 26637,
"s": 26176,
"text": "Functions are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive u... |
How to use an ES6 import in Node.js? - GeeksforGeeks | 08 Feb, 2021
Introduction to ES6 import:
The import statement is used to import modules that are exported by some other module. A module is a file that contains a piece of reusable code. The import modules are in strict mode whether it is declared or not.
Syntax of import:
import name from 'module-name'
Importing can ... | [
{
"code": null,
"e": 26219,
"s": 26191,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 26248,
"s": 26219,
"text": "Introduction to ES6 import: "
},
{
"code": null,
"e": 26463,
"s": 26248,
"text": "The import statement is used to import modules that are expor... |
PyQtGraph – Setting Fixed Size of Image View - GeeksforGeeks | 28 Dec, 2021
In this article, we will see how we can set the fixed size of the image view in PyQTGraph. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics for displ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 26405,
"s": 25537,
"text": "In this article, we will see how we can set the fixed size of the image view in PyQTGraph. PyQtGraph is a graphics and user interface library for Python that provi... |
For Loop- primeCheck - Java | Practice | GeeksforGeeks | What do you do when you need to execute certain statements more than once? You put them in a loop. Loops are very powerful. Majority of coding questions need loops to work. You can't even input testcases without loops!
Here, we will use for loop and check if the given number n is prime or not.
Note: A number is prime i... | [
{
"code": null,
"e": 497,
"s": 278,
"text": "What do you do when you need to execute certain statements more than once? You put them in a loop. Loops are very powerful. Majority of coding questions need loops to work. You can't even input testcases without loops!"
},
{
"code": null,
"e":... |
Flutter - AppBar Widget - GeeksforGeeks | 22 Oct, 2020
AppBar is usually the topmost component of the app (or sometimes the bottom-most), it contains the toolbar and some other common action buttons. As all the components in a flutter application is a widget or a combination of widgets. So AppBar is also a built-in class or widget in flutter which gives the fu... | [
{
"code": null,
"e": 27185,
"s": 27157,
"text": "\n22 Oct, 2020"
},
{
"code": null,
"e": 27941,
"s": 27185,
"text": "AppBar is usually the topmost component of the app (or sometimes the bottom-most), it contains the toolbar and some other common action buttons. As all the compone... |
C++ Switch | Use the switch statement to select one of many code blocks to be executed.
This is how it works:
The switch expression is evaluated once
The value of the expression is compared with the values of each case
If there is a match, the associated block of code is executed
The break and default keywords are optional, and wil... | [
{
"code": null,
"e": 75,
"s": 0,
"text": "Use the switch statement to select one of many code blocks to be executed."
},
{
"code": null,
"e": 97,
"s": 75,
"text": "This is how it works:"
},
{
"code": null,
"e": 137,
"s": 97,
"text": "The switch expression is e... |
Moving X-axis in Matplotlib during real-time plot | To move X-axis in Matplotlib during real-time plot, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a figure and a set of subplots.
Create x and y data points using numpy.
Plot x and y data points using plot() method.
Make an animation by repeatedly c... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "To move X-axis in Matplotlib during real-time plot, we can take the following steps −"
},
{
"code": null,
"e": 1224,
"s": 1148,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code"... |
Deploy Machine Learning Web App on Azure | by Sagnik Chattopadhyaya | Towards Data Science | As a Machine Learning Engineer you role isn’t limited to building a model, but it also covers to make Models Deployable. Which on later stage is handled by DevOps team. In this Story,I will show you step by step how you can deploy an ML Classification Web App on Azure. This article is a part of the MSP Developer Storie... | [
{
"code": null,
"e": 556,
"s": 172,
"text": "As a Machine Learning Engineer you role isn’t limited to building a model, but it also covers to make Models Deployable. Which on later stage is handled by DevOps team. In this Story,I will show you step by step how you can deploy an ML Classification Web... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.