title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to maximize a plt.show() window using Python? | Using plt.get_current_fig_manager() and mng.full_screen_toggle() methods, we can maximise a plot.
Add a subplot to the current figure, where nrow = 1, ncols = 1 and index = 1.
Add a subplot to the current figure, where nrow = 1, ncols = 1 and index = 1.
Create a pie chart using list [1, 2, 3] and pie() method.
Create a... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "Using plt.get_current_fig_manager() and mng.full_screen_toggle() methods, we can maximise a plot."
},
{
"code": null,
"e": 1238,
"s": 1160,
"text": "Add a subplot to the current figure, where nrow = 1, ncols = 1 and index = 1."
},
... |
How to make the corners of a button round in Android? | This example demonstrates how to make the corners of a button round in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<androi... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrates how to make the corners of a button round in Android."
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detail... |
How to get the list of empty folders using PowerShell? | To get the list of empty folder on the windows OS using PowerShell, we can use the below method.
gci C:\Temp -Recurse | foreach {
if( $_.psiscontainer -eq $true){
if((gci $_.FullName) -eq $null){$_.FullName}
}
}
The above command checks the C:\Temp folder and its subfolders and if the content is empty it re... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "To get the list of empty folder on the windows OS using PowerShell, we can use the below method."
},
{
"code": null,
"e": 1286,
"s": 1159,
"text": "gci C:\\Temp -Recurse | foreach {\n if( $_.psiscontainer -eq $true){\n if((gci... |
How to maximize the browser in Selenium? | We can maximize the browser in Selenium with the help of method maximize().
The present active window becomes maximized with this method.
Code implementation.
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.se... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "We can maximize the browser in Selenium with the help of method maximize()."
},
{
"code": null,
"e": 1200,
"s": 1138,
"text": "The present active window becomes maximized with this method."
},
{
"code": null,
"e": 1221,
... |
Find last two digits of sum of N factorials - GeeksforGeeks | 12 Apr, 2021
Given a number N, the task is to find unit and tens places digit of the first N natural numbers factorials, i.e last last two digit of 1!+2!+3!+....N! where N<=10e18.Examples:
Input : n = 2
Output :3
1! + 2! = 3
Last two digit is 3
Input :4
Output :33
1!+2!+3!+4!=33
Last two digit is 33
Naive Approa... | [
{
"code": null,
"e": 25076,
"s": 25048,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 25254,
"s": 25076,
"text": "Given a number N, the task is to find unit and tens places digit of the first N natural numbers factorials, i.e last last two digit of 1!+2!+3!+....N! where N<=10e... |
Arithmetic Number in C++ | The arithmetic number is a number which has the average of all positive divisors is an integer i.e. for a number n if the number of divisors can divide the sum of divisors then n is an arithmetic number.
Let’s take an example to understand the concept better,
Input : n = 6
Output : YES
Explanation :
Divisors are 1 , 2 ... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "The arithmetic number is a number which has the average of all positive divisors is an integer i.e. for a number n if the number of divisors can divide the sum of divisors then n is an arithmetic number."
},
{
"code": null,
"e": 1322,
"s... |
Timer in C++ using system calls | Here we will see how to design timer in C++ using a system call. We will not use any graphics or animations. Here timer means the stopwatch, that is up-counting the time. The used system calls are −
sleep(n) − This will help the program to sleep for n number of seconds
system() − This is used to execute the system comm... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "Here we will see how to design timer in C++ using a system call. We will not use any graphics or animations. Here timer means the stopwatch, that is up-counting the time. The used system calls are −"
},
{
"code": null,
"e": 1332,
"s": 12... |
Cryptography GUI using python - GeeksforGeeks | 29 Dec, 2020
Using cryptography techniques we can generate keys for a plain text which can not be predicted easily. We use Cryptography to ensure the safe and secure flow of data from one source to another without being accessed by a malicious user.
Prerequisites:
Language used – Python.Tkinter – This module is used to... | [
{
"code": null,
"e": 25598,
"s": 25570,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 25835,
"s": 25598,
"text": "Using cryptography techniques we can generate keys for a plain text which can not be predicted easily. We use Cryptography to ensure the safe and secure flow of da... |
IMS DB - Data Retrieval | The various data retrieval methods used in IMS DL/I calls are as follows −
GU Call
GN Call
Using Command Codes
Multiple Processing
Let us consider the following IMS database structure to understand the data retrieval function calls −
The fundamentals of GU call are as follows −
GU call is known as Get Unique call. It i... | [
{
"code": null,
"e": 2021,
"s": 1946,
"text": "The various data retrieval methods used in IMS DL/I calls are as follows −"
},
{
"code": null,
"e": 2029,
"s": 2021,
"text": "GU Call"
},
{
"code": null,
"e": 2037,
"s": 2029,
"text": "GN Call"
},
{
"code"... |
Check if a number is Palindrome in PL/SQLs | In this section we will see how to check whether a number is Palindrome or not using the PL/SQL. In PL/SQL code, some group of commands are arranged within a block of related declaration of statements.
A number is palindrome if the number, and the reverse of that number are same. Suppose a number 12321, this is palindr... | [
{
"code": null,
"e": 1264,
"s": 1062,
"text": "In this section we will see how to check whether a number is Palindrome or not using the PL/SQL. In PL/SQL code, some group of commands are arranged within a block of related declaration of statements."
},
{
"code": null,
"e": 1418,
"s":... |
Line Separator in Java | Strings have no newlines. We can form them into two lines by concatenating a newline string. Use System lineSeparator to get a platform-dependent newline string.
The following is an example.
Live Demo
public class Demo {
public static void main(String[] args) {
String str = "one" + System.lineSeparator() + "t... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "Strings have no newlines. We can form them into two lines by concatenating a newline string. Use System lineSeparator to get a platform-dependent newline string."
},
{
"code": null,
"e": 1253,
"s": 1224,
"text": "The following is an ... |
Python | os.kill() method - GeeksforGeeks | 03 Jul, 2021
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.os.kill() method in Python is used to send specified signal to the process with specified... | [
{
"code": null,
"e": 24732,
"s": 24704,
"text": "\n03 Jul, 2021"
},
{
"code": null,
"e": 25152,
"s": 24732,
"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... |
Degree of an Array in C++ | Suppose we have an array of non-negative integers called nums, the degree of this array is actually the maximum frequency of any one of its elements. We have to find the smallest possible length of a contiguous subarray of nums, that has the same degree as nums.
So, if the input is like [1,2,2,3,1], then the output wil... | [
{
"code": null,
"e": 1325,
"s": 1062,
"text": "Suppose we have an array of non-negative integers called nums, the degree of this array is actually the maximum frequency of any one of its elements. We have to find the smallest possible length of a contiguous subarray of nums, that has the same degree... |
Dynamically split/create multiple datasets from single dataset in SAS | by Pramod K | Towards Data Science | Splitting a dataset into multiple datasets is a challenge often faced by SAS programmers. For example, splitting data collected from all over the world into unique country-wise datasets, where each datsaset contains data specific only to that country. In such scenarios, programmers are often forced to hard code the pro... | [
{
"code": null,
"e": 680,
"s": 172,
"text": "Splitting a dataset into multiple datasets is a challenge often faced by SAS programmers. For example, splitting data collected from all over the world into unique country-wise datasets, where each datsaset contains data specific only to that country. In ... |
How can we get the client's IP address in ASP.NET MVC C#? | Every machine on a network has a unique identifier. Just as you would address a letter
to send in the mail, computers use the unique identifier to send data to specific
computers on a network. Most networks today, including all computers on the
internet, use the TCP/IP protocol as the standard for how to communicate on... | [
{
"code": null,
"e": 1483,
"s": 1062,
"text": "Every machine on a network has a unique identifier. Just as you would address a letter\nto send in the mail, computers use the unique identifier to send data to specific\ncomputers on a network. Most networks today, including all computers on the\ninter... |
Python | How to copy data from one excel sheet to another - GeeksforGeeks | 03 Oct, 2019
In this article, we will learn how to copy data from one excel sheet to destination excel workbook using openpyxl module in Python.
For working with excel files, we require openpyxl, which is a Python library that is used for reading, writing and modifying excel (with extension xlsx/xlsm/xltx/xltm) files. ... | [
{
"code": null,
"e": 24930,
"s": 24902,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 25062,
"s": 24930,
"text": "In this article, we will learn how to copy data from one excel sheet to destination excel workbook using openpyxl module in Python."
},
{
"code": null,
... |
Python - tensorflow.math.square() - GeeksforGeeks | 16 Jun, 2020
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
square() is used to compute element wise square of x i.e x*x.
Syntax: tensorflow.math.square(x, name)
Parameters:
x: It’s a tensor. Allowed dtypes are bfloat16, half, float32, ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 24423,
"s": 24292,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks."
},
{
"code": null,
... |
How to install and configure prometheus using docker on centos 7 | In this article, we will learn how to install Prometheus server to collect the metrics and query them and also install Grafana – a web based graphical dashboard builder. Prometheus is an open source monitoring tool with time series database. It addresses many aspects for monitoring and generating a collection of metric... | [
{
"code": null,
"e": 1457,
"s": 1062,
"text": "In this article, we will learn how to install Prometheus server to collect the metrics and query them and also install Grafana – a web based graphical dashboard builder. Prometheus is an open source monitoring tool with time series database. It addresse... |
Two Step Facial Recognition With Colab | by Dev Dash MD MPH | Towards Data Science | It’s Monday morning and I’m channeling my inner Jeremy Howard (again). Over the last few months, I have seen plenty of facial recognition guides and some of them are really quite good.
The problem is, each student of deep learning or machine vision becomes interested through different venues. Maybe you’re a musician in... | [
{
"code": null,
"e": 357,
"s": 172,
"text": "It’s Monday morning and I’m channeling my inner Jeremy Howard (again). Over the last few months, I have seen plenty of facial recognition guides and some of them are really quite good."
},
{
"code": null,
"e": 564,
"s": 357,
"text": "T... |
How to query a key having space in its name with MongoDB? | To query a key having space in its name, you can use dot(.) notation.
Step 1: First, you need to create a set in which a key has space in its name. Following is the
query:
> myValues["Details"] = {}
{ }
> myValues["Details"]["Student Name"]="John";
John
> myValues["Details"]["StudentAge"]=26;
26
Step 2: Now you need to... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "To query a key having space in its name, you can use dot(.) notation."
},
{
"code": null,
"e": 1234,
"s": 1132,
"text": "Step 1: First, you need to create a set in which a key has space in its name. Following is the\nquery:"
},
{... |
C++ Program to Subtract Complex Number using Operator Overloading | Operator overloading can be done with most of the built-in operators in C++. The overloaded operators are functions with the keyword operator followed by the operator symbol that is defined. The overloaded operators have a return type and a parameter list like any function.
A program that subtracts complex numbers usin... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "Operator overloading can be done with most of the built-in operators in C++. The overloaded operators are functions with the keyword operator followed by the operator symbol that is defined. The overloaded operators have a return type and a parameter li... |
MongoDB - Replication | Replication is the process of synchronizing data across multiple servers. Replication provides redundancy and increases data availability with multiple copies of data on different database servers. Replication protects a database from the loss of a single server. Replication also allows you to recover from hardware fai... | [
{
"code": null,
"e": 3006,
"s": 2553,
"text": "Replication is the process of synchronizing data across multiple servers. Replication provides redundancy and increases data availability with multiple copies of data on different database servers. Replication protects a database from the loss of a sing... |
How to resolve the ERROR 1115 (42000): Unknown character set: 'utf8mb4'? | You will get this type of error when your MySQL version is below 5.5.3. This is because “utf8mb4” introduced in MySQL version 5.5.3.
Firstly, you need to check the current version. If its less than 5.5.3, then you need to upgrade to solve the above error.
Check the current version −
mysql> select version();
Here, our M... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "You will get this type of error when your MySQL version is below 5.5.3. This is because “utf8mb4” introduced in MySQL version 5.5.3."
},
{
"code": null,
"e": 1318,
"s": 1195,
"text": "Firstly, you need to check the current version. I... |
Python - Data Wrangling | Data wrangling involves processing the data in various formats like - merging, grouping, concatenating etc. for the purpose of analysing or getting them ready to be used with another set of data.
Python has built-in features to apply these wrangling methods to various data sets to achieve the analytical goal. In this c... | [
{
"code": null,
"e": 2912,
"s": 2529,
"text": "Data wrangling involves processing the data in various formats like - merging, grouping, concatenating etc. for the purpose of analysing or getting them ready to be used with another set of data.\nPython has built-in features to apply these wrangling me... |
Maximum height of the binary search tree created from the given array - GeeksforGeeks | 30 Jun, 2021
Given an array arr[] of N integers, the task is to make two binary search trees. One while traversing from the left side of the array and another while traversing from the right and find which tree has a greater height.Examples:
Input: arr[] = {2, 1, 3, 4}
Output: 0
BST starting from first index ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 26272,
"s": 26041,
"text": "Given an array arr[] of N integers, the task is to make two binary search trees. One while traversing from the left side of the array and another while traversing ... |
Calculate difference between dataframe rows by group in R - GeeksforGeeks | 16 Dec, 2021
In this article, we will see how to find the difference between rows by the group in dataframe in R programming language.
The group_by method is used to divide and segregate date based on groups contained within the specific columns. The required column to group by is specified as an argument of this funct... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26609,
"s": 26487,
"text": "In this article, we will see how to find the difference between rows by the group in dataframe in R programming language."
},
{
"code": null,
"e": 2683... |
Lodash _.update() Method - GeeksforGeeks | 16 Sep, 2020
The _.update() method accepts updater to produce the value to set. This method use _.updateWith() function to customize path creation. It is almost the same as _.set() function.
Syntax:
_.update(object, path, updater)
Parameters: This method accepts three parameters as mentioned above and described below:... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n16 Sep, 2020"
},
{
"code": null,
"e": 26723,
"s": 26545,
"text": "The _.update() method accepts updater to produce the value to set. This method use _.updateWith() function to customize path creation. It is almost the same as _.s... |
Find number of unique triangles among given N triangles - GeeksforGeeks | 05 Aug, 2021
Given three arrays a[], b[] and c[] of N elements representing the three sides of N triangles. The task is to find the number of triangles that are unique out of given triangles. A triangle is non-unique if all of its sides match with all the sides of some other triangle in length.Examples:
Input: a[] = ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 26335,
"s": 26041,
"text": "Given three arrays a[], b[] and c[] of N elements representing the three sides of N triangles. The task is to find the number of triangles that are unique out of g... |
Data Structures | Heap | Question 3 - GeeksforGeeks | 28 Jun, 2021
A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the first location, a[0], nodes in the next level, from left to right, is stored from a[1] to a[3]. The nodes from the second level of ... | [
{
"code": null,
"e": 26061,
"s": 26033,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26588,
"s": 26061,
"text": "A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is s... |
Select DataFrame Rows where Column Values are in Range in R - GeeksforGeeks | 23 Sep, 2021
In this article, we will discuss how to select dataframe rows where column values are in a range in R programming language.
Data frame indexing can be used to extract rows or columns from the dataframe. The condition can be applied to the specific columns of the dataframe and combined using the logical ope... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26611,
"s": 26487,
"text": "In this article, we will discuss how to select dataframe rows where column values are in a range in R programming language."
},
{
"code": null,
"e": 26... |
Maximum sum of pairs with specific difference - GeeksforGeeks | 12 May, 2022
Given an array of integers and a number k. We can pair two numbers of the array if the difference between them is strictly less than k. The task is to find the maximum possible sum of disjoint pairs. Sum of P pairs is the sum of all 2P numbers of pairs.
Examples:
Input : arr[] = {3, 5, 10, 15, 17, 12, 9},... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 26321,
"s": 26067,
"text": "Given an array of integers and a number k. We can pair two numbers of the array if the difference between them is strictly less than k. The task is to find the max... |
PyQt5 – How to make semi-transparent label ? - GeeksforGeeks | 26 Mar, 2020
While designing a GUI (Graphical User Interface) application we tend to make lot of labels, but sometimes some labels overlaps each other and only label which is on top is visible, that’s why semi transparent label is needed.
Normal label vs Semi-transparent label –
In order to create semi-transpar... | [
{
"code": null,
"e": 26225,
"s": 26197,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 26451,
"s": 26225,
"text": "While designing a GUI (Graphical User Interface) application we tend to make lot of labels, but sometimes some labels overlaps each other and only label which is o... |
aplaymidi Command in Linux with Examples - GeeksforGeeks | 24 Jun, 2019
aplaymidi command in Linux is used to play standard MIDI(Musical Instrument Digital Interface) files, by sending the content of a MIDI file to an ALSA(Advanced Linux Sound Architecture) MIDI port, sound renderer like timidity or a hardware MIDI device are required to play MIDI files.
Syntax:
aplaymidi [opt... | [
{
"code": null,
"e": 25331,
"s": 25303,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 25616,
"s": 25331,
"text": "aplaymidi command in Linux is used to play standard MIDI(Musical Instrument Digital Interface) files, by sending the content of a MIDI file to an ALSA(Advanced Lin... |
Things You Should Know About React Hooks - GeeksforGeeks | 18 Jul, 2021
React...We all know the importance of this library in the tech industry. Most of the applications are switching to React because of its advantages and features. There are many features of React. React hooks is one of them. React hooks was first released in October 2018. In React a lot of developers use the... | [
{
"code": null,
"e": 26313,
"s": 26285,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 26749,
"s": 26313,
"text": "React...We all know the importance of this library in the tech industry. Most of the applications are switching to React because of its advantages and features. Th... |
Three address code in Compiler - GeeksforGeeks | 11 Sep, 2019
Prerequisite – Intermediate Code Generation
Three address code is a type of intermediate code which is easy to generate and can be easily converted to machine code.It makes use of at most three addresses and one operator to represent an expression and the value computed at each instruction is stored in tem... | [
{
"code": null,
"e": 26488,
"s": 26460,
"text": "\n11 Sep, 2019"
},
{
"code": null,
"e": 26532,
"s": 26488,
"text": "Prerequisite – Intermediate Code Generation"
},
{
"code": null,
"e": 26907,
"s": 26532,
"text": "Three address code is a type of intermediate c... |
Itertools in Python3 - GeeksforGeeks | 22 Sep, 2021
Itertools is a module in Python, it is used to iterate over data structures that can be stepped over using a for-loop. Such data structures are also known as iterables. This module works as a fast, memory-efficient tool that is used either by themselves or in combination to form iterator algebra.
This mod... | [
{
"code": null,
"e": 26049,
"s": 26021,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 26348,
"s": 26049,
"text": "Itertools is a module in Python, it is used to iterate over data structures that can be stepped over using a for-loop. Such data structures are also known as itera... |
Optimal Strategy for the Divisor game using Dynamic Programming - GeeksforGeeks | 25 May, 2021
Given an integer N and two players, A and B are playing a game. On each player’s turn, that player makes a move by subtracting a divisor of current N (which is less than N) from current N, thus forming a new N for the next turn. The player who does not have any divisor left to subtract loses the game. The ... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 26497,
"s": 26065,
"text": "Given an integer N and two players, A and B are playing a game. On each player’s turn, that player makes a move by subtracting a divisor of current N (which is les... |
CSS | scrollbar-width Property - GeeksforGeeks | 30 Jun, 2021
The scrollbar-width property is used to set the width or thickness of an element’s scrollbar when shown. This property can be used on pages where the user interface requires the element to be displayed more prominently and shrinking the scrollbar width gives more space to the element.This a currently an ex... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 27009,
"s": 26621,
"text": "The scrollbar-width property is used to set the width or thickness of an element’s scrollbar when shown. This property can be used on pages where the user interfac... |
Benefit of NumPy arrays over Python arrays - GeeksforGeeks | 05 Sep, 2020
The need for NumPy arises when we are working with multi-dimensional arrays. The traditional array module does not support multi-dimensional arrays.
Let’s first try to create a single-dimensional array (i.e one row & multiple columns) in Python without installing NumPy Package to get a more clear picture.
... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 25712,
"s": 25563,
"text": "The need for NumPy arises when we are working with multi-dimensional arrays. The traditional array module does not support multi-dimensional arrays."
},
{
... |
How to display text on boxplot in Python? - GeeksforGeeks | 21 Jul, 2021
Boxplot is an important graphical plot that can be used to get a summary of data present in numerical form. The plot can give us information about statistical measures such as percentile, median, minimum and maximum values of the numerical data. In the box plot, the line which passes through the center of ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 25983,
"s": 25537,
"text": "Boxplot is an important graphical plot that can be used to get a summary of data present in numerical form. The plot can give us information about statistical meas... |
Jetpack DataStore in Android - GeeksforGeeks | 03 Sep, 2021
Jetpack DataStore is a data storage solution that uses protocol buffers to store key-value pairs or typed objects. DataStore stores data asynchronously, reliably, and transactionally using Kotlin coroutines and Flow. In this article, we will look at why we need Jetpack DataStore Preferences, how to build t... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 26784,
"s": 26381,
"text": "Jetpack DataStore is a data storage solution that uses protocol buffers to store key-value pairs or typed objects. DataStore stores data asynchronously, reliably, ... |
How to restrict UITextField to take only numbers in Swift? | In iOS apps sometimes we need to restrict our text field to take only numbers as an input, this can be done in several ways, let’s see some of them.
Select the text field that you want to restrict to numeric input.
Go to its attribute inspector.
Select the keyboard type and choose number pad from there.
Select the text... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "In iOS apps sometimes we need to restrict our text field to take only numbers as an input, this can be done in several ways, let’s see some of them."
},
{
"code": null,
"e": 1277,
"s": 1211,
"text": "Select the text field that you wa... |
StAX XML Parser in Java - GeeksforGeeks | 29 Dec, 2021
This article focuses on how one can parse a XML file in Java.XML : XML stands for eXtensible Markup Language. It was designed to store and transport data. It was designed to be both human- and machine-readable. That’s why, the design goals of XML emphasize simplicity, generality, and usability across the I... | [
{
"code": null,
"e": 26391,
"s": 26363,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 26708,
"s": 26391,
"text": "This article focuses on how one can parse a XML file in Java.XML : XML stands for eXtensible Markup Language. It was designed to store and transport data. It was d... |
Bloomberg Interview | Set 1 (Phone Interview) - GeeksforGeeks | 05 May, 2015
Click here to see the documentation of the video conference.
Before proceeding to reading this, make sure you read a little about bloomberg, and most importantly its R&D center in London, you will be given a good portion of time to tell the interviewer what you know about bloomberg, the interviewer said he... | [
{
"code": null,
"e": 27105,
"s": 27077,
"text": "\n05 May, 2015"
},
{
"code": null,
"e": 27166,
"s": 27105,
"text": "Click here to see the documentation of the video conference."
},
{
"code": null,
"e": 27545,
"s": 27166,
"text": "Before proceeding to reading ... |
Tryit Editor v3.7 | Tryit: Different RGBA colors | [] |
Regular Dictionary vs Ordered Dictionary in Python - GeeksforGeeks | 06 Aug, 2021
Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair. Key-value is provided in the dictionary to make it more optimized. A regular dictionary type does n... | [
{
"code": null,
"e": 24104,
"s": 24076,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 24931,
"s": 24104,
"text": "Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as ... |
Gaussian Mixture Models:
implemented from scratch | by Vasile Păpăluță | Towards Data Science | From the rising of the Machine Learning and Artificial Intelligence fields Probability Theory was a powerful tool, that allowed us to handle uncertainty in a lot of applications, from classification to forecasting tasks. Today I would like to talk with you more about the use of Probability and Gaussian distribution in ... | [
{
"code": null,
"e": 573,
"s": 172,
"text": "From the rising of the Machine Learning and Artificial Intelligence fields Probability Theory was a powerful tool, that allowed us to handle uncertainty in a lot of applications, from classification to forecasting tasks. Today I would like to talk with yo... |
OpenCV - Drawing a Circle | You can draw various shapes like Circle, Rectangle, Line, Ellipse, Polylines, Convex, Polylines, Polylines on an image using the respective methods of the org.opencv.imgproc package.
You can draw a circle on an image using the method circle() of the imgproc class. Following is the syntax of this method −
circle(img, ce... | [
{
"code": null,
"e": 3187,
"s": 3004,
"text": "You can draw various shapes like Circle, Rectangle, Line, Ellipse, Polylines, Convex, Polylines, Polylines on an image using the respective methods of the org.opencv.imgproc package."
},
{
"code": null,
"e": 3310,
"s": 3187,
"text": ... |
An introduction to Debugging (in C and lldb), Part- I | by Shubhadeep Roychowdhury | Towards Data Science | How the word “bug” (and hence the word “debugging”) took the meaning that we (computer programmers) have associated with it, is not entirely clear. It could be thanks to the legendary moth in the Mark II computer at Harvard or could have been coined long ago than that. Whatever the origin is, as programmers, we all hav... | [
{
"code": null,
"e": 819,
"s": 172,
"text": "How the word “bug” (and hence the word “debugging”) took the meaning that we (computer programmers) have associated with it, is not entirely clear. It could be thanks to the legendary moth in the Mark II computer at Harvard or could have been coined long ... |
Dynamic ImageView in Kotlin - GeeksforGeeks | 22 Jun, 2021
An ImageView as the name suggests is used to display images in Android Applications. In this article, we will be discussing how to create an ImageView programmatically in Kotlin.
The first step is to create a new project in Android Studio. For this follow these steps:
Click on File, then New, and then New... | [
{
"code": null,
"e": 24050,
"s": 24022,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 24229,
"s": 24050,
"text": "An ImageView as the name suggests is used to display images in Android Applications. In this article, we will be discussing how to create an ImageView programmatic... |
Convert JSON to/from Map using Jackson library in Java? | The JSON Jackson is a library for Java and it has very powerful data binding capabilities and provides a framework to serialize custom java objects to JSON and deserialize JSON back to Java object. We can convert JSON to/from
Map using readValue() and writeValueAsString() methods of com.fasterxml.jackson.databind.Objec... | [
{
"code": null,
"e": 1397,
"s": 1062,
"text": "The JSON Jackson is a library for Java and it has very powerful data binding capabilities and provides a framework to serialize custom java objects to JSON and deserialize JSON back to Java object. We can convert JSON to/from\nMap using readValue() and ... |
How to give a div tag 100% height of the browser window using CSS - GeeksforGeeks | 04 Dec, 2018
CSS allows to adjust the height of an element using the height property. While there are several units to specify the height of an element. The vh is a relative unit that is commonly used.
vh: It stands for viewport-height. The viewport refers to the browser window size. Thus when use vh as a unit, the ele... | [
{
"code": null,
"e": 24807,
"s": 24779,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 24996,
"s": 24807,
"text": "CSS allows to adjust the height of an element using the height property. While there are several units to specify the height of an element. The vh is a relative un... |
Difference Between JavaScript and jQuery - GeeksforGeeks | 24 Nov, 2021
In this article, we will learn Javascript & jQuery, & their basic differences through the examples.
JavaScript: It is a major scripting programming language that is used to make websites more responsive and interactive. It is one of the pivoted parts alongside HTML and CSS which are used to create web page... | [
{
"code": null,
"e": 24994,
"s": 24966,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 25094,
"s": 24994,
"text": "In this article, we will learn Javascript & jQuery, & their basic differences through the examples."
},
{
"code": null,
"e": 25789,
"s": 25094,
... |
SciPy - ODR | ODR stands for Orthogonal Distance Regression, which is used in the regression studies. Basic linear regression is often used to estimate the relationship between the two variables y and x by drawing the line of best fit on the graph.
The mathematical method that is used for this is known as Least Squares, and aims to ... | [
{
"code": null,
"e": 2122,
"s": 1887,
"text": "ODR stands for Orthogonal Distance Regression, which is used in the regression studies. Basic linear regression is often used to estimate the relationship between the two variables y and x by drawing the line of best fit on the graph."
},
{
"cod... |
How to use the IndexOf(,) method of array class in C#? | The IndexOf() method of array class in C# searches for the specified object and returns the index of the first occurrence within the entire one-dimensional Array.
We have set the array.
int[] arr = new int[10];
arr[0] = 100;
arr[1] = 200;
arr[2] = 300;
arr[3] = 400;
arr[4] = 500;
arr[5] = 600;
arr[6] = 700;
arr[7] = 80... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "The IndexOf() method of array class in C# searches for the specified object and returns the index of the first occurrence within the entire one-dimensional Array."
},
{
"code": null,
"e": 1248,
"s": 1225,
"text": "We have set the arr... |
Python & Vectorization. In this story, I have discussed... | by Rochak Agrawal | Towards Data Science | Computer hardware in today’s world leverages parallel computing for faster computation by making use of SIMD (Single Instruction, Multiple Data) architectures. SIMD is a class of parallel computing in which the logical processors perform a single instruction on multiple data points simultaneously. We need to vectorize ... | [
{
"code": null,
"e": 882,
"s": 171,
"text": "Computer hardware in today’s world leverages parallel computing for faster computation by making use of SIMD (Single Instruction, Multiple Data) architectures. SIMD is a class of parallel computing in which the logical processors perform a single instruct... |
Number of Irreflexive Relations on a Set - GeeksforGeeks | 30 Apr, 2021
Given a positive integer N, the task is to find the number of irreflexive relations that can be formed over the given set of elements. Since the count can be very large, print it to modulo 109 + 7.
A relation R on a set A is called reflexive if no (a, a) € R holds for every element a € A.For Example: If s... | [
{
"code": null,
"e": 25003,
"s": 24975,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25202,
"s": 25003,
"text": "Given a positive integer N, the task is to find the number of irreflexive relations that can be formed over the given set of elements. Since the count can be very... |
What is the difference between append() and appendTo() in jQuery? | The append (content) method appends content to the inside of every matched element, whereas the appendTo (selector) method appends all of the matched elements to another, specified, set of elements.
jQuery append() function
The append (content) method appends content to the inside of every matched element.
Here is the ... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "The append (content) method appends content to the inside of every matched element, whereas the appendTo (selector) method appends all of the matched elements to another, specified, set of elements."
},
{
"code": null,
"e": 1286,
"s": 12... |
A Beginner’s Guide to Graph Neural Networks Using PyTorch Geometric — Part 1 | by Rohith Teja | Towards Data Science | You have stumbled on Graph Neural Networks somehow and now you’re interested in using it to solve a problem. Let’s explore on how we can model a problem using different tools available at our disposal.
At first, we need a problem to solve.
Let’s pick a simple graph dataset like Zachary’s Karate Club. Here, the nodes re... | [
{
"code": null,
"e": 374,
"s": 172,
"text": "You have stumbled on Graph Neural Networks somehow and now you’re interested in using it to solve a problem. Let’s explore on how we can model a problem using different tools available at our disposal."
},
{
"code": null,
"e": 412,
"s": 37... |
Demonstrate static variables, methods and blocks in Java | The static variable is a class level variable and it is common to all the class objects i.e. a single copy of the static variable is shared among all the class objects.
A static method manipulates the static variables in a class. It belongs to the class instead of the class objects and can be invoked without using a cl... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "The static variable is a class level variable and it is common to all the class objects i.e. a single copy of the static variable is shared among all the class objects."
},
{
"code": null,
"e": 1394,
"s": 1231,
"text": "A static meth... |
How to Deploy a Secure API with FastAPI, Docker and Traefik | by Ahmed Besbes | Towards Data Science | When we deploy an API to serve a machine learning model, we rarely care about that green padlock that makes the HTTP connection supposedly safe and the browser happy.
We usually take HTTPS for granted, and we may think that it just can be turned on with some easy configuration.
The truth is, adding HTTPS requires a few... | [
{
"code": null,
"e": 339,
"s": 172,
"text": "When we deploy an API to serve a machine learning model, we rarely care about that green padlock that makes the HTTP connection supposedly safe and the browser happy."
},
{
"code": null,
"e": 451,
"s": 339,
"text": "We usually take HTT... |
Arithmetic operations with std::bitset in C++ - GeeksforGeeks | 17 Jun, 2021
A bitset is an array of boolean values, but each boolean value is not stored separately. Instead, bitset optimizes the space such that each bool takes 1-bit space only, so space taken by bitset say, bs is less than that of bool bs[N] and vector<bool> bs(N). However, a limitation of bitset is, N must be kno... | [
{
"code": null,
"e": 24988,
"s": 24960,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25393,
"s": 24988,
"text": "A bitset is an array of boolean values, but each boolean value is not stored separately. Instead, bitset optimizes the space such that each bool takes 1-bit space ... |
PyQt5 - QLineEdit Widget | QLineEdit object is the most commonly used input field. It provides a box in which one line of text can be entered. In order to enter multi-line text, QTextEdit object is required.
The following table lists a few important methods of QLineEdit class −
setAlignment()
Aligns the text as per alignment constants
Qt.AlignLe... | [
{
"code": null,
"e": 2144,
"s": 1963,
"text": "QLineEdit object is the most commonly used input field. It provides a box in which one line of text can be entered. In order to enter multi-line text, QTextEdit object is required."
},
{
"code": null,
"e": 2215,
"s": 2144,
"text": "T... |
How to convert String to Number in JavaScript? | You can try to run the following to learn how to convert String to Number in JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<body>
<p>Convert String to Number</p>
<script>
var myString = "Amit";
document.write("Number : " + Number(myString));
</script>
</body>
</html> | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "You can try to run the following to learn how to convert String to Number in JavaScript −"
},
{
"code": null,
"e": 1162,
"s": 1152,
"text": "Live Demo"
},
{
"code": null,
"e": 1372,
"s": 1162,
"text": "<!DOCTYPE h... |
Caret Bootstrap class | Use carets to indicate dropdown functionality and direction. To get this functionality use the class caret with a <span> element.
You can try to run the following code to implement caret Bootstrap class
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "Use carets to indicate dropdown functionality and direction. To get this functionality use the class caret with a <span> element."
},
{
"code": null,
"e": 1265,
"s": 1192,
"text": "You can try to run the following code to implement c... |
In CSS using Images as List Markers | The CSS list-style-image property is used to set an image as a marker for the list item.
The syntax of CSS list-style-image property is as follows −
Selector {
list-style-image: /*value*/
}
The following examples illustrate CSS list-style-image property −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
ul {
widt... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "The CSS list-style-image property is used to set an image as a marker for the list item."
},
{
"code": null,
"e": 1211,
"s": 1151,
"text": "The syntax of CSS list-style-image property is as follows −"
},
{
"code": null,
"... |
Infinity or exception in Java when divide by 0? | Consider the following code snippet where we divide a number by 0.
Live Demo
public class Tester{
public static void main(String[] args) {
double d = 100;
System.out.println(d/0);
}
}
Infinity
Now consider the following code snippet.
Live Demo
public class Tester{
public static void main(String[]... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Consider the following code snippet where we divide a number by 0."
},
{
"code": null,
"e": 1140,
"s": 1129,
"text": " Live Demo"
},
{
"code": null,
"e": 1265,
"s": 1140,
"text": "public class Tester{\n public s... |
Batch Script - How to Modifying an Array - GeeksforGeeks | 04 Jan, 2022
In this article, we are going to learn how we can modify any array using Batch Script.
We can modify any array in two ways. We can add elements in any array or we can replace elements of any array.
Modify an array by adding an element.
Code :
@echo off
set arr[0]=Geeks
set arr[1]=for
set arr[2]=Geeks
::ad... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24493,
"s": 24406,
"text": "In this article, we are going to learn how we can modify any array using Batch Script."
},
{
"code": null,
"e": 24604,
"s": 24493,
"text": "We ... |
Lambda expression in Python to rearrange positive and negative numbers | In this article, we will learn about using lambda expressions that will take an input array of positive and negative integers. We compute two separate arrays one containing negative numbers and other containing positive numbers.
Here we define a Rearrange() function that accepts only one argument i.e. array of integers... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "In this article, we will learn about using lambda expressions that will take an input array of positive and negative integers. We compute two separate arrays one containing negative numbers and other containing positive numbers."
},
{
"code": nu... |
The Basics of Regular Expressions | by SAURABH RANA | Towards Data Science | What are Regular Expressions?
Regular Expression is a special text string command which is used to match specific string sequences from huge chunks of data which if done manually by a person can take a lot of time. You can use regular expressions to match various patterns of string like:-
To extract all the email addre... | [
{
"code": null,
"e": 202,
"s": 172,
"text": "What are Regular Expressions?"
},
{
"code": null,
"e": 462,
"s": 202,
"text": "Regular Expression is a special text string command which is used to match specific string sequences from huge chunks of data which if done manually by a pe... |
Count of Prime digits in a Number - GeeksforGeeks | 24 Nov, 2021
Given an integer N, the task is to count the number of prime digits in N.Examples:
Input: N = 12 Output: 1 Explanation: Digits of the number – {1, 2} But, only 2 is prime number.Input: N = 1032 Output: 2 Explanation: Digits of the number – {1, 0, 3, 2} 3 and 2 are prime number
Approach: The idea is to ... | [
{
"code": null,
"e": 24824,
"s": 24796,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 24909,
"s": 24824,
"text": "Given an integer N, the task is to count the number of prime digits in N.Examples: "
},
{
"code": null,
"e": 25106,
"s": 24909,
"text": "Input... |
DynamoDB - Local Secondary Indexes | Some applications only perform queries with the primary key, but some situations benefit from an alternate sort key. Allow your application a choice by creating a single or multiple local secondary indexes.
Complex data access requirements, such as combing millions of items, make it necessary to perform more efficient ... | [
{
"code": null,
"e": 2598,
"s": 2391,
"text": "Some applications only perform queries with the primary key, but some situations benefit from an alternate sort key. Allow your application a choice by creating a single or multiple local secondary indexes."
},
{
"code": null,
"e": 2935,
... |
Create an N-Gram Ranking in Power BI | by Ednalyn C. De Dios | Towards Data Science | In a previous article, I wrote a quick start guide on creating and visualizing n-gram ranking using nltk for natural language processing. However, I needed a way to share my findings with others who don’t have Python or Jupyter Notebook installed in their machines. I needed to use our organization’s BI reporting tool: ... | [
{
"code": null,
"e": 502,
"s": 172,
"text": "In a previous article, I wrote a quick start guide on creating and visualizing n-gram ranking using nltk for natural language processing. However, I needed a way to share my findings with others who don’t have Python or Jupyter Notebook installed in their... |
Rich: Generate Rich and Beautiful Text in the Terminal with Python | by Khuyen Tran | Towards Data Science | After developing a useful Python package or a useful function, you might wish for your teammates or other users to use your code. However, the output of your code in the terminal is a little bit boring and is confusing to understand.
Is there a way that you can make the output clearer and prettier like below?
That is w... | [
{
"code": null,
"e": 405,
"s": 171,
"text": "After developing a useful Python package or a useful function, you might wish for your teammates or other users to use your code. However, the output of your code in the terminal is a little bit boring and is confusing to understand."
},
{
"code":... |
MySQL Tryit Editor v1.0 | SELECT OrderID, Quantity,
CASE WHEN Quantity > 30 THEN 'The quantity is greater than 30'
WHEN Quantity = 30 THEN 'The quantity is 30'
ELSE 'The quantity is under 30'
END AS QuantityText
FROM OrderDetails;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in th... | [
{
"code": null,
"e": 26,
"s": 0,
"text": "SELECT OrderID, Quantity,"
},
{
"code": null,
"e": 89,
"s": 26,
"text": "CASE WHEN Quantity > 30 THEN 'The quantity is greater than 30'"
},
{
"code": null,
"e": 134,
"s": 89,
"text": "WHEN Quantity = 30 THEN 'The quant... |
Python program for most frequent word in Strings List - GeeksforGeeks | 04 Oct, 2021
Given Strings List, write a Python program to get word with most number of occurrences.
Example:
Input : test_list = [“gfg is best for geeks”, “geeks love gfg”, “gfg is best”] Output : gfg Explanation : gfg occurs 3 times, most in strings in total.
Input : test_list = [“geeks love gfg”, “geeks are best”] O... | [
{
"code": null,
"e": 24735,
"s": 24707,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 24823,
"s": 24735,
"text": "Given Strings List, write a Python program to get word with most number of occurrences."
},
{
"code": null,
"e": 24832,
"s": 24823,
"text": "Ex... |
JavaScript - Get href value | Let’s say we have the following anchor tag with URL −
<a class="demo" title="get the url" href="./mainPage.jsp/1245">href value at console</a>
We need to get only the URL value i.e. the href attribute value. For this, use attr() −
attr('href')
Following is the code −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "Let’s say we have the following anchor tag with URL −"
},
{
"code": null,
"e": 1205,
"s": 1116,
"text": "<a class=\"demo\" title=\"get the url\" href=\"./mainPage.jsp/1245\">href value at console</a>"
},
{
"code": null,
"... |
Get the union of two sets in Java | To get the union of two sets, use the addAll() method.
The first set −
HashSet <String> set1 = new HashSet <String>();
set1.add("Mat");
set1.add("Sat");
set1.add("Cat");
The second set −
HashSet <String> set2 = new HashSet <String>();
set2.add("Mat");
set2.add("Cat");
set2.add("Fat");
set2.add("Hat");
Get the union −
s... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "To get the union of two sets, use the addAll() method."
},
{
"code": null,
"e": 1133,
"s": 1117,
"text": "The first set −"
},
{
"code": null,
"e": 1232,
"s": 1133,
"text": "HashSet <String> set1 = new HashSet <Str... |
What is 'void' Operator in JavaScript? | The void is an important keyword in JavaScript, which can be used as a unary operator that appears before its single operand, which may be of any type. This operator specifies an expression to be evaluated without returning a value.
The syntax of void can be either of the following two −
<head>
<script>
<!--
... | [
{
"code": null,
"e": 1295,
"s": 1062,
"text": "The void is an important keyword in JavaScript, which can be used as a unary operator that appears before its single operand, which may be of any type. This operator specifies an expression to be evaluated without returning a value."
},
{
"code"... |
How to use D3js with WebComponents | by Ruben Triviño | Towards Data Science | D3 is a fantastic open source library for data visualization developed originally by Mike Bostock. The great variety of tools it offers allow to make rare graphs from scratch or using pre-built templates. The possibilities offered by D3 are unlimited, you only need to have a look at their gallery.
If you have already w... | [
{
"code": null,
"e": 471,
"s": 172,
"text": "D3 is a fantastic open source library for data visualization developed originally by Mike Bostock. The great variety of tools it offers allow to make rare graphs from scratch or using pre-built templates. The possibilities offered by D3 are unlimited, you... |
numpy.nanpercentile() in Python | 07 Jul, 2022
numpy.nanpercentile()function used to compute the nth percentile of the given data (array elements) along the specified axis ang ignores nan values.
Syntax :
numpy.nanpercentile(arr, q, axis=None, out=None)
Parameters :
arr :input array.
q : percentile value.
axis :axis along which we want to calculat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "numpy.nanpercentile()function used to compute the nth percentile of the given data (array elements) along the specified axis ang ignores nan values."
},
{
"code": null... |
Choose optimal number of epochs to train a neural network in Keras | 08 Jun, 2020
One of the critical issues while training a neural network on the sample data is Overfitting. When the number of epochs used to train a neural network model is more than necessary, the training model learns patterns that are specific to sample data to a great extent. This makes the model incapable to perfo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 595,
"s": 52,
"text": "One of the critical issues while training a neural network on the sample data is Overfitting. When the number of epochs used to train a neural network model is more than nece... |
Migration to Open JDK from Oracle JDK | 09 Mar, 2021
Let us first discuss the need for migration. It is as follows as in the year 2018, Oracle announced that after January 2019, businesses will need to purchase a commercial license (i.e., from Oracle) in order to receive software updates. Keep Oracle Java and upgrade to supported patch level and pay the subs... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 660,
"s": 53,
"text": "Let us first discuss the need for migration. It is as follows as in the year 2018, Oracle announced that after January 2019, businesses will need to purchase a commercial lic... |
DoubleFunction Interface in Java with Examples | 08 Oct, 2018
The DoubleFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which takes in a double-valued argument and produces a result of type R.
This functional interface takes in only one generic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2018"
},
{
"code": null,
"e": 284,
"s": 28,
"text": "The DoubleFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a f... |
Scala | reduce() Function | 01 Jun, 2021
The reduce() method is a higher-order function that takes all the elements in a collection (Array, List, etc) and combines them using a binary operation to produce a single value. It is necessary to make sure that operations are commutative and associative. Anonymous functions are passed as parameter to th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 389,
"s": 53,
"text": "The reduce() method is a higher-order function that takes all the elements in a collection (Array, List, etc) and combines them using a binary operation to produce a single v... |
What is the difference between printf, sprintf and fprintf? | 13 Dec, 2018
printf:printf function is used to print character stream of data on stdout console.
Syntax :
int printf(const char* str, ...);
Example :
// simple print on stdout #include<stdio.h>int main(){ printf("hello geeksquiz"); return 0;}
Output :
hello geeksquiz
sprintf:Syntax:
int sprintf(char *str, const ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Dec, 2018"
},
{
"code": null,
"e": 136,
"s": 52,
"text": "printf:printf function is used to print character stream of data on stdout console."
},
{
"code": null,
"e": 145,
"s": 136,
"text": "Syntax :"
},
{
... |
MatSnackBar in Angular Material | 23 Feb, 2021
Angular Material is a UI component library developed by Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have done it you can enter the below command and can download it. MatSnackBar is used t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 419,
"s": 28,
"text": "Angular Material is a UI component library developed by Angular team to build design components for desktop and mobile web applications. In order to install it, we need to hav... |
Python | Rearrange Positive and Negative Elements | 05 Sep, 2019
Sometimes, while working with Python lists, we can have a problem in which we need to perform a sort in list. There are many variations of sorting that might be required to perform. Once such variation can be to sort elements of list, but keeping in mind, positive elements appear before negative elements. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 392,
"s": 28,
"text": "Sometimes, while working with Python lists, we can have a problem in which we need to perform a sort in list. There are many variations of sorting that might be required to pe... |
How to convert C style strings to std::string and vice versa? | 06 Jul, 2017
What are C style strings?These strings are array of characters terminating with a NULL character. C style strings can be declared in following ways:
Declaration and initialization
/* To demonstrate C style strings */#include<iostream>using namespace std;int main(){ /* Null character has to be added expl... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Jul, 2017"
},
{
"code": null,
"e": 202,
"s": 53,
"text": "What are C style strings?These strings are array of characters terminating with a NULL character. C style strings can be declared in following ways:"
},
{
"code": nul... |
Built in & Custom Model Managers in Django | 18 May, 2021
Django manager is a class that acts as an interface through which Django models interact with databases. Every model has at least one manager object. It has a lot of methods, attributes to ease working with databases. In fact, many beginner-level Django developers do not know that they use the Manager clas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 467,
"s": 28,
"text": "Django manager is a class that acts as an interface through which Django models interact with databases. Every model has at least one manager object. It has a lot of methods, ... |
Check if Matrix sum is prime or not - GeeksforGeeks | 05 Apr, 2021
Given a matrix mat[][], the task is to check that the sum of the elements of the matrix is prime or not.Examples:
Input: mat[][] = {{1, 2}, {2, 1}} Output: NO Explanation: Sum of Matrix = 1 + 2 + 2 + 1 = 6 Since 6 is not prime. Therefore, output is NOInput: mat[][] = {{1, 2}, {2, 2}} Output: YES Explanat... | [
{
"code": null,
"e": 24692,
"s": 24664,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 24808,
"s": 24692,
"text": "Given a matrix mat[][], the task is to check that the sum of the elements of the matrix is prime or not.Examples: "
},
{
"code": null,
"e": 25083,
... |
JavaScript JSON stringify() Method - GeeksforGeeks | 15 Nov, 2021
The JSON.stringify() method in Javascript is used to create a JSON string out of it. While developing an application using JavaScript, many times it is needed to serialize the data to strings for storing the data into a database or for sending the data to an API or web server. The data has to be in the for... | [
{
"code": null,
"e": 25017,
"s": 24989,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 25444,
"s": 25017,
"text": "The JSON.stringify() method in Javascript is used to create a JSON string out of it. While developing an application using JavaScript, many times it is needed to s... |
Replace an element at a specified index of the Vector in Java | An element in a Vector can be replaced at a specified index using the java.util.Vector.set() method. This method has two parameters i.e the index at which the Vector element is to be replaced and the element that it should be replaced with. Vector.set() method returns the element that was at the position specified at t... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "An element in a Vector can be replaced at a specified index using the java.util.Vector.set() method. This method has two parameters i.e the index at which the Vector element is to be replaced and the element that it should be replaced with. Vector.set()... |
Context Manager in Python - GeeksforGeeks | 26 Nov, 2018
Managing Resources : In any programming language, the usage of resources like file operations or database connections is very common. But these resources are limited in supply. Therefore, the main problem lies in making sure to release these resources after usage. If they are not released then it will lead... | [
{
"code": null,
"e": 24298,
"s": 24270,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 24990,
"s": 24298,
"text": "Managing Resources : In any programming language, the usage of resources like file operations or database connections is very common. But these resources are limit... |
Returning an Array from a Method in Java | A method may also return an array. For example, the following method returns an array that is the reversal of another array -
public static int[] reverse(int[] list) {
int[] result = new int[list.length];
for (int i = 0, j = result.length - 1; i < list.length; i++, j--) {
result[j] = list[i];
}
return... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "A method may also return an array. For example, the following method returns an array that is the reversal of another array -"
},
{
"code": null,
"e": 1393,
"s": 1188,
"text": "public static int[] reverse(int[] list) {\n int[] resu... |
How to find K in K-Means? | by Ankit Goel | Jul, 2020 | Towards Data Science | K-Means is the most used clustering algorithm in unsupervised Machine Learning problems and it is really useful to find similar data points and to determine the structure of the data. In this article, I assume that you have a basic understanding of K-Means and will focus more on how you can-
Find the value of K (number... | [
{
"code": null,
"e": 465,
"s": 172,
"text": "K-Means is the most used clustering algorithm in unsupervised Machine Learning problems and it is really useful to find similar data points and to determine the structure of the data. In this article, I assume that you have a basic understanding of K-Mean... |
Firebase - Filtering Data | Firebase offers several ways to filter data.
Let us understand what limit to first and last is.
limitToFirst method returns the specified number of items beginning from the first one.
limitToFirst method returns the specified number of items beginning from the first one.
limitToLast method returns a specified number of... | [
{
"code": null,
"e": 2211,
"s": 2166,
"text": "Firebase offers several ways to filter data."
},
{
"code": null,
"e": 2262,
"s": 2211,
"text": "Let us understand what limit to first and last is."
},
{
"code": null,
"e": 2350,
"s": 2262,
"text": "limitToFirst me... |
Python Program Exit handlers (atexit) | The atexit module in the standard distribution of Python has two functions – register() and unregister(). Both functions take some existing function as an argument. Registered functions are executed automatically when the interpreter session is terminated normally.
If more than one functions are registered, their execu... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "The atexit module in the standard distribution of Python has two functions – register() and unregister(). Both functions take some existing function as an argument. Registered functions are executed automatically when the interpreter session is terminat... |
Interactive Topic Modeling with BERTopic | Towards Data Science | Every day, businesses deal with large volumes of unstructured text. From customer interactions in emails to online feedback and reviews. To deal with this large amount of text, we look towards topic modeling. A technique to automatically extract meaning from documents by identifying recurrent topics.
A few months ago, ... | [
{
"code": null,
"e": 473,
"s": 171,
"text": "Every day, businesses deal with large volumes of unstructured text. From customer interactions in emails to online feedback and reviews. To deal with this large amount of text, we look towards topic modeling. A technique to automatically extract meaning f... |
MySQL - Multiplication Operator (*) | This operator is used to multiply two numbers in MySQL.
Following is an example of the "*" operator −
mysql> SELECT 4156456*56445;
+---------------+
| 4156456*56445 |
+---------------+
| 234611158920 |
+---------------+
1 row in set (0.00 sec)
Let us see another example −
mysql> SELECT 547.5478*657.3547*5475;
+-------... | [
{
"code": null,
"e": 2389,
"s": 2333,
"text": "This operator is used to multiply two numbers in MySQL."
},
{
"code": null,
"e": 2435,
"s": 2389,
"text": "Following is an example of the \"*\" operator −"
},
{
"code": null,
"e": 2578,
"s": 2435,
"text": "mysql> ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.