title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to convert string to integer in Python? - GeeksforGeeks
10 Jul, 2020 In Python, a string can be converted into an integer using the following methods : Method 1: Using built-in int() function: If your string contains a decimal integer and you wish to convert it into an int, in that case, pass your string to int() function and it will convert your string into an equivalent ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n10 Jul, 2020" }, { "code": null, "e": 24375, "s": 24292, "text": "In Python, a string can be converted into an integer using the following methods :" }, { "code": null, "e": 24417, "s": 24375, "text": "Method ...
Number of 1 Bits in Python
Suppose we have an unsigned number n. We have to find the number of 1s in a binary representation of this number. This is also known as Hamming Weight. So if the number is like 000000101101, then the result will be 4. To solve this, we will use these steps − Take the number and convert it into a binary string set count...
[ { "code": null, "e": 1280, "s": 1062, "text": "Suppose we have an unsigned number n. We have to find the number of 1s in a binary representation of this number. This is also known as Hamming Weight. So if the number is like 000000101101, then the result will be 4." }, { "code": null, "e"...
OpenCV: Segmentation using Thresholding
15 Jan, 2018 In this article, a basic technique for object segmentation called Thresholding.But before moving into anymore detail, below is a brief overview of OpenCV. OpenCV (Open Source Computer Vision) is a cross platform, open-source library of programming functions, aimed at performing real-time computer vision ta...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jan, 2018" }, { "code": null, "e": 209, "s": 54, "text": "In this article, a basic technique for object segmentation called Thresholding.But before moving into anymore detail, below is a brief overview of OpenCV." }, { "code...
Print indices of array elements whose removal makes the sum of odd and even-indexed elements equal
03 Jun, 2021 Given an array arr[] of size N, the task is to find indices of array elements whose removal makes the sum of odd and even indexed elements equal. If no such element exists, then print -1. Examples: Input: arr[] = {4, 1, 6, 2} Output: 1 Explanation: Removing arr[1] modifies arr[] to {4, 6, 2} Sum of even-in...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jun, 2021" }, { "code": null, "e": 240, "s": 52, "text": "Given an array arr[] of size N, the task is to find indices of array elements whose removal makes the sum of odd and even indexed elements equal. If no such element exists, t...
Python | Animation in Kivy
06 Feb, 2020 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. Animation and AnimationTran...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Feb, 2020" }, { "code": null, "e": 290, "s": 53, "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 d...
Exploring Correlation in Python
19 Jan, 2019 This article aims to give a better understanding of a very important technique of multivariate exploration. Correlation Matrix is basically a covariance matrix. Also known as the auto-covariance matrix, dispersion matrix, variance matrix, or variance-covariance matrix. It is a matrix in which i-j position ...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jan, 2019" }, { "code": null, "e": 136, "s": 28, "text": "This article aims to give a better understanding of a very important technique of multivariate exploration." }, { "code": null, "e": 416, "s": 136, "text":...
Java.util.Arraylist.indexOf() in Java
10 Oct, 2019 The indexOf() method of ArrayList returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. Syntax : public int IndexOf(Object o) obj : The element to search for. // Java code to demonstrate the working of// indexOf in ArrayList // f...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 Oct, 2019" }, { "code": null, "e": 217, "s": 53, "text": "The indexOf() method of ArrayList returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element." }, { ...
place_info(), pack_info() and grid_info() methods in Tkinter
01 Aug, 2020 To get all the information about the options of the geometry management of a widget place_info(), pack_info() and grid_info() methods in tkinter are used accordingly. This method is used for getting information about geometry management of a widget like position and size of a window, either in absolute t...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2020" }, { "code": null, "e": 197, "s": 28, "text": "To get all the information about the options of the geometry management of a widget place_info(), pack_info() and grid_info() methods in tkinter are used accordingly. " }, ...
Pandas Groupby and Computing Mean
26 Nov, 2020 Pandas is an open-source library that is built on top of NumPy library. It is a Python package that offers various data structures and operations for manipulating numerical data and time series. It is mainly popular for importing and analyzing data much easier. Pandas is fast and it has high-performance & ...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Nov, 2020" }, { "code": null, "e": 385, "s": 53, "text": "Pandas is an open-source library that is built on top of NumPy library. It is a Python package that offers various data structures and operations for manipulating numerical d...
ML | Mini-Batch Gradient Descent with Python
04 Jul, 2022 In machine learning, gradient descent is an optimization technique used for computing the model parameters (coefficients and bias) for algorithms like linear regression, logistic regression, neural networks, etc. In this technique, we repeatedly iterate through the training set and update the model paramet...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 572, "s": 54, "text": "In machine learning, gradient descent is an optimization technique used for computing the model parameters (coefficients and bias) for algorithms like linear regression, logi...
GATE | GATE-CS-2007 | Question 57
28 Jun, 2021 A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes th...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 473, "s": 28, "text": "A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, w...
Iterative searching in Binary Search Tree
16 Jul, 2021 Given a binary search tree and a key. Check the given key exists in BST or not without recursion. Please refer binary search tree insertion for recursive search. C++ Java Python3 C# Javascript // C++ program to demonstrate searching operation// in binary search tree without recursion#include <bits/stdc+...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Jul, 2021" }, { "code": null, "e": 152, "s": 53, "text": "Given a binary search tree and a key. Check the given key exists in BST or not without recursion. " }, { "code": null, "e": 218, "s": 152, "text": "Please...
codecs.decode() in Python
26 Mar, 2020 With the help of codecs.decode() method, we can decode the binary string into normal form by using codecs.decode() method. Syntax : codecs.decode(b_string) Return : Return the decoded string. Example #1 :In this example we can see that by using codecs.decode() method, we are able to get the decoded string ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 151, "s": 28, "text": "With the help of codecs.decode() method, we can decode the binary string into normal form by using codecs.decode() method." }, { "code": null, "e": 184, "s": 1...
Getting into Android OS remotely using Kali Linux
14 Sep, 2020 We will utilize msfvenom in order to make a payload and set it aside as a ‘.apk’ file. In the execution of generating a payload, now we have to frame-up a listener to the Metasploit framework. Then, we have to manipulate the victim in order that he/she is convinced to download that payload or the ‘.apk’ th...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Sep, 2020" }, { "code": null, "e": 808, "s": 54, "text": "We will utilize msfvenom in order to make a payload and set it aside as a ‘.apk’ file. In the execution of generating a payload, now we have to frame-up a listener to the Met...
Python Program for Odd-Even Sort / Brick Sort
28 Jun, 2021 This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements are sorted and in each iteration two phases occurs- Odd and Even Phases. In the odd phase, we perform a bubble sort on odd indexed elements and in the eve...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 254, "s": 28, "text": "This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements are sorted and in each...
Find even occurring elements in an array of limited range - GeeksforGeeks
02 Nov, 2021 Given an array that contains odd number of occurrences for all numbers except for a few elements which are present even number of times. Find the elements which have even occurrences in the array in O(n) time complexity and O(1) extra space. Assume array contain elements in the range 0 to 63. Examples : ...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n02 Nov, 2021" }, { "code": null, "e": 26374, "s": 26067, "text": "Given an array that contains odd number of occurrences for all numbers except for a few elements which are present even number of times. Find the elements which ha...
Program to count leaf nodes in a binary tree - GeeksforGeeks
10 Jan, 2022 A node is a leaf node if both left and right child nodes of it are NULL. Here is an algorithm to get the leaf node count. getLeafCount(node) 1) If node is NULL then return 0. 2) Else If left and right child nodes are NULL return 1. 3) Else recursively calculate leaf count of the tree using below formula. ...
[ { "code": null, "e": 26281, "s": 26253, "text": "\n10 Jan, 2022" }, { "code": null, "e": 26403, "s": 26281, "text": "A node is a leaf node if both left and right child nodes of it are NULL. Here is an algorithm to get the leaf node count." }, { "code": null, "e": 2670...
How to insert a new tag into a BeautifulSoup object? - GeeksforGeeks
16 Mar, 2021 In this article, we will see how to insert a new tag into a BeautifulSoup object. See the below examples to get a better idea about the topic. Example: HTML_DOC : “”” <html> <head> <title> Table Data </title> </head> <body> ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n16 Mar, 2021" }, { "code": null, "e": 25680, "s": 25537, "text": "In this article, we will see how to insert a new tag into a BeautifulSoup object. See the below examples to get a better idea about the topic." }, { "code"...
Find whether only two parallel lines contain all coordinates points or not - GeeksforGeeks
31 Mar, 2022 Given an array that represents the y coordinates of a set of points on a coordinate plane, where (i, arr[i]) represent a single point. Find whether it is possible to draw a pair of parallel lines that includes all the coordinate points given and also both lines must contain a point. Print 1 for possible an...
[ { "code": null, "e": 26309, "s": 26281, "text": "\n31 Mar, 2022" }, { "code": null, "e": 26637, "s": 26309, "text": "Given an array that represents the y coordinates of a set of points on a coordinate plane, where (i, arr[i]) represent a single point. Find whether it is possible ...
Using Ansible to Manage Remote Machines - GeeksforGeeks
02 Mar, 2021 Ansible is an automation tool used for common IT tasks such as configuring remote machines or container orchestration, continuous deployment, etc. In this article, we are going to use Ansible to configure multiple remote machines using a master or control node( machine which manages or pushes tasks to the...
[ { "code": null, "e": 25493, "s": 25465, "text": "\n02 Mar, 2021" }, { "code": null, "e": 25833, "s": 25493, "text": "Ansible is an automation tool used for common IT tasks such as configuring remote machines or container orchestration, continuous deployment, etc. In this article...
User-defined Exceptions in Python with Examples - GeeksforGeeks
10 Aug, 2021 Prerequisite- This article is an extension to Exception Handling.Python throws errors and exceptions when there is a code gone wrong, which may cause the program to stop abruptly. Python also provides an exception handling method with the help of try-except. Some of the standard exceptions which are most f...
[ { "code": null, "e": 42677, "s": 42649, "text": "\n10 Aug, 2021" }, { "code": null, "e": 43147, "s": 42677, "text": "Prerequisite- This article is an extension to Exception Handling.Python throws errors and exceptions when there is a code gone wrong, which may cause the program t...
Check if an array is increasing or decreasing - GeeksforGeeks
31 Mar, 2022 Given an array arr[] of N elements where N ≥ 2, the task is to check the type of array whether it is: Increasing.Decreasing.Increasing then decreasing.Decreasing then increasing. Increasing. Decreasing. Increasing then decreasing. Decreasing then increasing. Note that the given array is definitely one of...
[ { "code": null, "e": 26789, "s": 26761, "text": "\n31 Mar, 2022" }, { "code": null, "e": 26893, "s": 26789, "text": "Given an array arr[] of N elements where N ≥ 2, the task is to check the type of array whether it is: " }, { "code": null, "e": 26970, "s": 26893,...
Top 12 Most Used Git Commands For Developers - GeeksforGeeks
18 Oct, 2021 Git is a distributed version control system and open-source software. It enables developers to manage many versions of a source code with ease. You can use it to figure out who did what, when, and why. Git has become a must-have tool for any developer nowadays, and knowing Git commands is required for deve...
[ { "code": null, "e": 26297, "s": 26269, "text": "\n18 Oct, 2021" }, { "code": null, "e": 26704, "s": 26297, "text": "Git is a distributed version control system and open-source software. It enables developers to manage many versions of a source code with ease. You can use it to f...
Python | Indices of N largest elements in list - GeeksforGeeks
28 Aug, 2019 Sometimes, while working with Python lists, we can have a problem in which we wish to find N largest elements. This task can occur in many domains such as web development and while working with Databases. We might sometimes, require to just find the indices of them. Let’s discuss certain way to find indice...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n28 Aug, 2019" }, { "code": null, "e": 25877, "s": 25537, "text": "Sometimes, while working with Python lists, we can have a problem in which we wish to find N largest elements. This task can occur in many domains such as web deve...
Sort numeric strings in a list in Python - GeeksforGeeks
03 Apr, 2020 Sorting list is an easy task and has been dealt with in many situations. With Machine Learning and Data Science emerging, sometimes we can get the data in the format of list of numbers but with string as data type. Generic Sort functions give erroneous result in that case, hence, several other methods have...
[ { "code": null, "e": 25341, "s": 25313, "text": "\n03 Apr, 2020" }, { "code": null, "e": 25741, "s": 25341, "text": "Sorting list is an easy task and has been dealt with in many situations. With Machine Learning and Data Science emerging, sometimes we can get the data in the form...
Amazon QA role & Support Engineer Intern interview experience - GeeksforGeeks
12 Jul, 2019 Round 1: First we took an online test(20 mcq’s and 2 programming questions) in our college. After 3 days Amazon recruiters came to our college. On that day they asked us to write 2 programs. Given a string containing alphanumeric characters. Find the sum of the numbers in that string.Input:- aa123bb4 Outpu...
[ { "code": null, "e": 26209, "s": 26181, "text": "\n12 Jul, 2019" }, { "code": null, "e": 26400, "s": 26209, "text": "Round 1: First we took an online test(20 mcq’s and 2 programming questions) in our college. After 3 days Amazon recruiters came to our college. On that day they as...
ArrayList spliterator() method in Java - GeeksforGeeks
07 Aug, 2019 The spliterator() method of ArrayList returns a Spliterator of the same elements as ArrayList but created Spliterator is late-binding and fail-fast. A late-binding Spliterator binds to the source of elements. It means that Arraylist at the point of the first traversal, first split, or the first query for e...
[ { "code": null, "e": 25661, "s": 25633, "text": "\n07 Aug, 2019" }, { "code": null, "e": 26236, "s": 25661, "text": "The spliterator() method of ArrayList returns a Spliterator of the same elements as ArrayList but created Spliterator is late-binding and fail-fast. A late-binding...
GATE | GATE CS 2019 | Question 31 - GeeksforGeeks
15 Feb, 2019 The value of 351 mod 5 is _________ . Note: This was Numerical Type question.(A) 1(B) 2(C) 3(D) 4Answer: (B)Explanation: According to chinese remainder theorem: = 351 mod 5 = (33)17 mod 5 = (27)17 mod 5 = {(22)8*21} mod 5 = {(4)8*(2)} mod 5 = {(-1)8*(2)} mod 5 = {(1*2)} mod 5 = {(2)} mod 5 = 2 Note: Yo...
[ { "code": null, "e": 25649, "s": 25621, "text": "\n15 Feb, 2019" }, { "code": null, "e": 25687, "s": 25649, "text": "The value of 351 mod 5 is _________ ." }, { "code": null, "e": 25810, "s": 25687, "text": "Note: This was Numerical Type question.(A) 1(B) 2(C)...
Program to convert time from 12 hour to 24 hour format - GeeksforGeeks
24 Oct, 2021 Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. Note: Midnight is 12:00:00 AM on a 12-hour clock and 00:00:00 on a 24-hour clock. Noon is 12:00:00 PM on 12-hour clock and 12:00:00 on 24-hour clock Examples: Input : A single string containing a time in 12-hour clock format(hh:m...
[ { "code": null, "e": 25973, "s": 25945, "text": "\n24 Oct, 2021" }, { "code": null, "e": 26199, "s": 25973, "text": "Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. Note: Midnight is 12:00:00 AM on a 12-hour clock and 00:00:00 on a 24-hour clock. Noon...
Python - Add space between Numbers and Alphabets in String - GeeksforGeeks
02 Sep, 2020 Given a string consisting of numbers and Strings, add space between them. Input : test_str = ‘ge3eks4geeks is1for10geeks’Output : ge 3 eks 4 geeks is 1 for 10 geeksExplanation : Numbers separated from Characters. Input : test_str = ‘ge3eks4geeks’Output : ge 3 eks 4 geeksExplanation : Numbers separated from...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n02 Sep, 2020" }, { "code": null, "e": 25611, "s": 25537, "text": "Given a string consisting of numbers and Strings, add space between them." }, { "code": null, "e": 25750, "s": 25611, "text": "Input : test_str...
How to use make utility to build C projects?` - GeeksforGeeks
19 Dec, 2021 When we build projects in C/C++, we have dependencies among files. For example, there might be a file a.c that calls a function from b.c. So we must compile b.c before a.c. There might be many dependencies in a project and manually following these dependencies and compiling files one by one becomes difficu...
[ { "code": null, "e": 25477, "s": 25449, "text": "\n19 Dec, 2021" }, { "code": null, "e": 25992, "s": 25477, "text": "When we build projects in C/C++, we have dependencies among files. For example, there might be a file a.c that calls a function from b.c. So we must compile b.c be...
Tailwind CSS Font Family - GeeksforGeeks
23 Mar, 2022 This class accepts a lot of font names in tailwind CSS in which all the properties are covered in class form. It is the alternative to the CSS font-family property. This class is used to specify the font of an element. It can have multiple fonts as a backup system i.e. if the browser does not support one ...
[ { "code": null, "e": 37385, "s": 37357, "text": "\n23 Mar, 2022" }, { "code": null, "e": 37725, "s": 37385, "text": "This class accepts a lot of font names in tailwind CSS in which all the properties are covered in class form. It is the alternative to the CSS font-family propert...
Ruby - Hashes
A Hash is a collection of key-value pairs like this: "employee" = > "salary". It is similar to an Array, except that indexing is done via arbitrary keys of any object type, not an integer index. The order in which you traverse a hash by either key or value may seem arbitrary and will generally not be in the insertion o...
[ { "code": null, "e": 2489, "s": 2294, "text": "A Hash is a collection of key-value pairs like this: \"employee\" = > \"salary\". It is similar to an Array, except that indexing is done via arbitrary keys of any object type, not an integer index." }, { "code": null, "e": 2712, "s": 24...
MomentJS - Minute
This method will get/set the minutes. It takes input from 0-59, if greater than the range provided, then it will add to the hour. moment().minute(Number); moment().minute(); moment().minutes(Number); moment().minutes(); var m = moment().minute(); // gets the current minute var d = moment().minute(5); // sets the minut...
[ { "code": null, "e": 2090, "s": 1960, "text": "This method will get/set the minutes. It takes input from 0-59, if greater than the range\nprovided, then it will add to the hour." }, { "code": null, "e": 2181, "s": 2090, "text": "moment().minute(Number);\nmoment().minute();\nmomen...
Write Paragraph in Word Document
How to write a paragraph in a word document using Java. Following is the program to write a paragraph in a word document using Java. import java.io.File; import java.io.FileOutputStream; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.us...
[ { "code": null, "e": 2124, "s": 2068, "text": "How to write a paragraph in a word document using Java." }, { "code": null, "e": 2201, "s": 2124, "text": "Following is the program to write a paragraph in a word document using Java." }, { "code": null, "e": 3238, "s...
Some Magnificent Functions In Python 3.9 | by Emmett Boudreau | Towards Data Science
The Python programming language comes packed full of many fantastic functions and tools in the language itself, as well as some awesome abilities that are available in the standard library. This makes Python quite a versatile language on its own without needing to rely on dependencies nearly as much as some other langu...
[ { "code": null, "e": 794, "s": 172, "text": "The Python programming language comes packed full of many fantastic functions and tools in the language itself, as well as some awesome abilities that are available in the standard library. This makes Python quite a versatile language on its own without n...
How to change MySQL error message language?
You can use lc_messages to change MySQL error message language. The syntax is as follows − SET lc_messages = 'yourLanguage'; To understand the concept, let us create a table with some error and check the error message language. Here, we have set the local message to French. Let us first create a table − mysql> create t...
[ { "code": null, "e": 1153, "s": 1062, "text": "You can use lc_messages to change MySQL error message language. The syntax is as follows −" }, { "code": null, "e": 1187, "s": 1153, "text": "SET lc_messages = 'yourLanguage';" }, { "code": null, "e": 1290, "s": 1187,...
SAP HANA - Tables
Tables in HANA database can be accessed from HANA Studio in Catalogue tab under Schemas. New tables can be created using the two methods given below − Using SQL editor Using GUI option SQL Console can be opened by selecting Schema name, in which, new table has to be created using System View SQL Editor option or by Rig...
[ { "code": null, "e": 3258, "s": 3107, "text": "Tables in HANA database can be accessed from HANA Studio in Catalogue tab under Schemas. New tables can be created using the two methods given below −" }, { "code": null, "e": 3275, "s": 3258, "text": "Using SQL editor" }, { ...
Fade Out Right Animation Effect with CSS
To implement Fade Out Right Animation Effect on an image with CSS, you can try to run the following code − Live Demo <html> <head> <style> .animated { background-image: url(/css/images/logo.png); background-repeat: no-repeat; background-position: left top; ...
[ { "code": null, "e": 1169, "s": 1062, "text": "To implement Fade Out Right Animation Effect on an image with CSS, you can try to run the following code −" }, { "code": null, "e": 1179, "s": 1169, "text": "Live Demo" }, { "code": null, "e": 2601, "s": 1179, "te...
XAML - Dependency Properties
A dependency property is a specific type of property where the value is followed by a keen property system which is also a part of the Windows Runtime App. A class which defines a dependency property must be inherited from the DependencyObject class. Many of the UI control classes which are used in XAML are derived fro...
[ { "code": null, "e": 2174, "s": 1923, "text": "A dependency property is a specific type of property where the value is followed by a keen property system which is also a part of the Windows Runtime App. A class which defines a dependency property must be inherited from the DependencyObject class." ...
Word Break Problem | (Trie solution) - GeeksforGeeks
10 Aug, 2020 Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following examples for more details. This is a famous Google interview question, also being asked by many other companies now a days. Consider the followi...
[ { "code": null, "e": 24990, "s": 24962, "text": "\n10 Aug, 2020" }, { "code": null, "e": 25277, "s": 24990, "text": "Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following e...
Contour Plot using Matplotlib - Python - GeeksforGeeks
21 Apr, 2020 Contour plots also called level plots are a tool for doing multivariate analysis and visualizing 3-D plots in 2-D space. If we consider X and Y as our variables we want to plot then the response Z will be plotted as slices on the X-Y plane due to which contours are sometimes referred as Z-slices or iso-res...
[ { "code": null, "e": 24888, "s": 24860, "text": "\n21 Apr, 2020" }, { "code": null, "e": 25202, "s": 24888, "text": "Contour plots also called level plots are a tool for doing multivariate analysis and visualizing 3-D plots in 2-D space. If we consider X and Y as our variables we...
Exponentiation (Set 2) | Practice | GeeksforGeeks
For two given positive numbers a and b. Find ab. Output your number modulus 109+7. Example 1: Input: a = 1, b = 1 Output: 1 Explanation: 11 % (109+7) = 1 ​Example 2: Input: a = 2, b = 5 Output: 32 Explanation: 25 % (109+7) = 32 Your Task: You don't need to read input or print anything. Your task is to complete th...
[ { "code": null, "e": 321, "s": 238, "text": "For two given positive numbers a and b. Find ab. Output your number modulus 109+7." }, { "code": null, "e": 332, "s": 321, "text": "Example 1:" }, { "code": null, "e": 393, "s": 332, "text": "Input: a = 1, b = 1\nOu...
C++ Vector Library - empty() Function
The C++ function std::vector::empty() tests whether vector is empty or not. Vector of size zero is considered as empty vector. Following is the declaration for std::vector::empty() function form std::vector header. bool empty() const; bool empty() const noexcept; None Returns true if vector is empty otherwise false. ...
[ { "code": null, "e": 2730, "s": 2603, "text": "The C++ function std::vector::empty() tests whether vector is empty or not. Vector of size zero is considered as empty vector." }, { "code": null, "e": 2818, "s": 2730, "text": "Following is the declaration for std::vector::empty() f...
MongoEngine - QuerySet Methods
The QuerySet object possesses following useful methods for querying the database. First document satisfying the query is returned. Following code will return first document in products collection, that has price < 20000. qset=products.objects(price__lt=20000) doc=qset.first() print ('Name:',doc.Name, 'Price:',doc.price...
[ { "code": null, "e": 2392, "s": 2310, "text": "The QuerySet object possesses following useful methods for querying the database." }, { "code": null, "e": 2531, "s": 2392, "text": "First document satisfying the query is returned. Following code will return first document in produc...
How to reverse a string in Python?
String slicing and range operators can be used to reverse a string in Python. For example: >>> 'Hello'[::-1] ‘olleH’ >>>‘Halloween’[::-1] ‘neewollaH’ The [] operator can take 3 numbers separated by colon ‘:’. The first is start index, second is end index and third is the stride. Here we have specified the stride as -1 ...
[ { "code": null, "e": 1153, "s": 1062, "text": "String slicing and range operators can be used to reverse a string in Python. For example:" }, { "code": null, "e": 1212, "s": 1153, "text": ">>> 'Hello'[::-1]\n‘olleH’\n>>>‘Halloween’[::-1]\n‘neewollaH’" }, { "code": null, ...
PHP phar://
The phar:// stream wrapper is available in all PHP versions after 5.3.0. Phar stands for PHP Archive. It is used to distribute PHP application or library and is executed as a normal PHP file. The phar:// wrapper supports opening file with fopen() for read/write, rename, and directory stream operations opendir() as well...
[ { "code": null, "e": 1417, "s": 1062, "text": "The phar:// stream wrapper is available in all PHP versions after 5.3.0. Phar stands for PHP Archive. It is used to distribute PHP application or library and is executed as a normal PHP file. The phar:// wrapper supports opening file with fopen() for re...
Get the size of an ArrayList in Java
The size of an ArrayList can be obtained by using the java.util.ArrayList.size() method as it returns the number of elements in the ArrayList i.e. the size. A program that demonstrates this is given as follows − Live Demo import java.util.ArrayList; import java.util.List; public class Demo { public static void main...
[ { "code": null, "e": 1219, "s": 1062, "text": "The size of an ArrayList can be obtained by using the java.util.ArrayList.size() method as it returns the number of elements in the ArrayList i.e. the size." }, { "code": null, "e": 1274, "s": 1219, "text": "A program that demonstrat...
Seaborn - Plotting Wide Form Data
It is always preferable to use ‘long-from’ or ‘tidy’ datasets. But at times when we are left with no option rather than to use a ‘wide-form’ dataset, same functions can also be applied to “wide-form” data in a variety of formats, including Pandas Data Frames or two-dimensional NumPy arrays. These objects should be pass...
[ { "code": null, "e": 2444, "s": 2039, "text": "It is always preferable to use ‘long-from’ or ‘tidy’ datasets. But at times when we are left with no option rather than to use a ‘wide-form’ dataset, same functions can also be applied to “wide-form” data in a variety of formats, including Pandas Data F...
Node.js dns.resolve4() Method - GeeksforGeeks
13 Oct, 2021 The dns.resolve4() method is an inbuilt application programming interface of the dns module which is used to resolve IPv4 address (‘A’ record) for the specified hostname using DNS protocol. Syntax: dns.resolve4( hostname, options, callback ) Parameters: This method accept three parameters as mentioned abov...
[ { "code": null, "e": 37256, "s": 37228, "text": "\n13 Oct, 2021" }, { "code": null, "e": 37446, "s": 37256, "text": "The dns.resolve4() method is an inbuilt application programming interface of the dns module which is used to resolve IPv4 address (‘A’ record) for the specified ho...
How to add not null constraint to existing column in MySQL?
To add not null constraint to an existing column in MySQL, we will use the ALTER command. This is a type of validation to restrict the user from entering null values. Let us see an example. Firstly, we will create a table. The CREATE command is used to create a table. mysql> create table AddNotNUlldemo - > ( - > ...
[ { "code": null, "e": 1229, "s": 1062, "text": "To add not null constraint to an existing column in MySQL, we will use the ALTER command. This is a type of validation to restrict the user from entering null values." }, { "code": null, "e": 1331, "s": 1229, "text": "Let us see an e...
E-Mail Sentiment Analysis Using Python and Microsoft Azure — Part 2 | by Ben Prescott | Towards Data Science
This is Part 2 of a multi-part article. Just to recap real quick, Part 1 of this series was focused on grabbing a CSV export of your email Sent Items and using Microsoft Azure’s Text Analytics API to return a sentiment result for each line. The results that we grabbed from the API we used to increment a frequency table...
[ { "code": null, "e": 212, "s": 172, "text": "This is Part 2 of a multi-part article." }, { "code": null, "e": 413, "s": 212, "text": "Just to recap real quick, Part 1 of this series was focused on grabbing a CSV export of your email Sent Items and using Microsoft Azure’s Text Ana...
Java program to print ASCII value of a particular character
ASCII stands for American Standard Code for Information Interchange. There are 128 standard ASCII codes, each of which can be represented by a 7-digit binary number: 0000000 through 1111111. If you try to store a character into an integer value it stores the ASCII value of the respective character. import java.util.Sca...
[ { "code": null, "e": 1253, "s": 1062, "text": "ASCII stands for American Standard Code for Information Interchange. There are 128 standard ASCII codes, each of which can be represented by a 7-digit binary number: 0000000 through 1111111." }, { "code": null, "e": 1362, "s": 1253, ...
How to import External Data from Excel or Text file into SAS Programming? - GeeksforGeeks
14 Dec, 2021 PROC IMPORT: It is a procedure to import external files into SAS. It automates importing process. There is no need to specify the variable type and variable-length to import an external file. It supports various formats of files such as excel, txt, etc. Importing an Excel File into SAS: The main keywords u...
[ { "code": null, "e": 24868, "s": 24840, "text": "\n14 Dec, 2021" }, { "code": null, "e": 25122, "s": 24868, "text": "PROC IMPORT: It is a procedure to import external files into SAS. It automates importing process. There is no need to specify the variable type and variable-length...
Display two-digit year in Java
Use the ‘y’ date conversion character to display two-digit year. System.out.printf("Two-digit Year = %TY\n",d); Above, d is a date object − Date d = new Date(); The following is an example − Live Demo import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Demo { public s...
[ { "code": null, "e": 1127, "s": 1062, "text": "Use the ‘y’ date conversion character to display two-digit year." }, { "code": null, "e": 1174, "s": 1127, "text": "System.out.printf(\"Two-digit Year = %TY\\n\",d);" }, { "code": null, "e": 1202, "s": 1174, "text...
Python - tensorflow.GradientTape.jacobian() - GeeksforGeeks
10 Jul, 2020 TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. jacobian() is used to compute the jacobian using operations recorded in context of this tape. Syntax: jacobian( target, source, unconnected_gradients, parallel_iterations, exp...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n10 Jul, 2020" }, { "code": null, "e": 24424, "s": 24292, "text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. " }, { "code": null, ...
Variable Declaration and Scope in C - GeeksQuiz
09 Aug, 2019 x = 1, y = 2, z = 3 x = 10, y = 20.000000, z = 3 x = 1, y = 2, z = 100 x = 1, y = 2, z = 3 x = 10, y = 20.000000, z = 3 x = 10, y = 20.000000, z = 100 x = 1, y = 2, z = 3 x = 1, y = 2, z = 3 x = 1, y = 2, z = 3 Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the...
[ { "code": null, "e": 27610, "s": 27582, "text": "\n09 Aug, 2019" }, { "code": null, "e": 27684, "s": 27610, "text": " x = 1, y = 2, z = 3\n x = 10, y = 20.000000, z = 3\n x = 1, y = 2, z = 100" }, { "code": null, "e": 27768, "s": 27684, "text": " x = 1, y = 2,...
Java program to reverse each word in a sentence
Each word in a sentence can be reversed and the sentence displayed with the words in the same order as before. An example of this is given as follows − Original sentence = an apple is red Modified sentence = na elppa si der A program that demonstrates this is given as follows. Live Demo public class Example { public s...
[ { "code": null, "e": 1214, "s": 1062, "text": "Each word in a sentence can be reversed and the sentence displayed with the words in the same order as before. An example of this is given as follows −" }, { "code": null, "e": 1286, "s": 1214, "text": "Original sentence = an apple i...
C Program for N-th term of Arithmetic Progression series
Given ‘a’ the First term, ‘d’ the common difference and ‘n’ for the number of terms in a series. The task is to find the nth term of the series. So, before discussing how to write a program for the problem first we should know what is Arithmetic Progression. Arithmetic progression or arithmetic sequence is a sequence o...
[ { "code": null, "e": 1207, "s": 1062, "text": "Given ‘a’ the First term, ‘d’ the common difference and ‘n’ for the number of terms in a series. The task is to find the nth term of the series." }, { "code": null, "e": 1321, "s": 1207, "text": "So, before discussing how to write a ...
Program to find out the minimum number of moves for a chess piece to reach every position in Python
Suppose, we have a chessboard and a special knight piece K, that moves in an L shape within the board. If the piece is in position (x1, y1) and if it moves to (x2, y2) the movement can be described as x2 = x1 ± a ; y2 = y1 ± b or x2 = x1 ± b ; y2 = y1 ± a ; where a and b are integer numbers. We have to find out the min...
[ { "code": null, "e": 1762, "s": 1062, "text": "Suppose, we have a chessboard and a special knight piece K, that moves in an L shape within the board. If the piece is in position (x1, y1) and if it moves to (x2, y2) the movement can be described as x2 = x1 ± a ; y2 = y1 ± b or x2 = x1 ± b ; y2 = y1 ±...
C++ New Library - nothrow
This is a nothrow constant and this constant value is used as an argument for operator new and operator new[] to indicate that these functions shall not throw an exception on failure, but return a null pointer instead. Following is the declaration for std::nothrow. extern const nothrow_t nothrow; none none No-throw ...
[ { "code": null, "e": 2822, "s": 2603, "text": "This is a nothrow constant and this constant value is used as an argument for operator new and operator new[] to indicate that these functions shall not throw an exception on failure, but return a null pointer instead." }, { "code": null, "e...
Sort a linked list that is sorted alternating ascending and descending orders? - GeeksforGeeks
20 Jan, 2022 Given a Linked List. The Linked List is in alternating ascending and descending orders. Sort the list efficiently. Example: Input List: 10 -> 40 -> 53 -> 30 -> 67 -> 12 -> 89 -> NULL Output List: 10 -> 12 -> 30 -> 40 -> 53 -> 67 -> 89 -> NULL Input List: 1 -> 4 -> 3 -> 2 -> 5 -> NULL Output List: 1 -> 2 ...
[ { "code": null, "e": 24972, "s": 24944, "text": "\n20 Jan, 2022" }, { "code": null, "e": 25097, "s": 24972, "text": "Given a Linked List. The Linked List is in alternating ascending and descending orders. Sort the list efficiently. Example: " }, { "code": null, "e": 2...
Enum in Java
The java.lang.Enum class is the common base class of all Java language enumeration types. Following is the declaration for java.lang.Enum class − public abstract class Enum<E extends Enum<E>> extends Object implements Comparable<E>, Serializable This class inherits methods from the following classes − java.lang.Object ...
[ { "code": null, "e": 1152, "s": 1062, "text": "The java.lang.Enum class is the common base class of all Java language enumeration types." }, { "code": null, "e": 1208, "s": 1152, "text": "Following is the declaration for java.lang.Enum class −" }, { "code": null, "e":...
Convolution Theorem for Fourier Transform MATLAB - GeeksforGeeks
28 Jan, 2022 A Convolution Theorem states that convolution in the spatial domain is equal to the inverse Fourier transformation of the pointwise multiplication of both Fourier transformed signal and Fourier transformed padded filter (to the same size as that of the signal). In other words, the convolution theorem says ...
[ { "code": null, "e": 24672, "s": 24644, "text": "\n28 Jan, 2022" }, { "code": null, "e": 25091, "s": 24672, "text": "A Convolution Theorem states that convolution in the spatial domain is equal to the inverse Fourier transformation of the pointwise multiplication of both Fourier ...
Program to find the initials of a name in C++
In the program, we are given a string name that denotes the name of a person. Our task is to create a Program to find the initials of a name in C++. Code Description − Here, we have to find the initials of the name of the person given by the string. Let’s take an example to understand the problem, name = “ram kisan sar...
[ { "code": null, "e": 1211, "s": 1062, "text": "In the program, we are given a string name that denotes the name of a\nperson. Our task is to create a Program to find the initials of a name in C++." }, { "code": null, "e": 1312, "s": 1211, "text": "Code Description − Here, we have...
Tryit Editor v3.7
Tryit: class on headers
[]
Longest Increasing Subsequence Size (N log N) - GeeksforGeeks
15 Feb, 2022 Given an array of random numbers. Find longest increasing subsequence (LIS) in the array. I know many of you might have read recursive and dynamic programming (DP) solutions. There are few requests for O(N log N) algo in the forum posts. For the time being, forget about recursive and DP solutions. Let us t...
[ { "code": null, "e": 25312, "s": 25284, "text": "\n15 Feb, 2022" }, { "code": null, "e": 25550, "s": 25312, "text": "Given an array of random numbers. Find longest increasing subsequence (LIS) in the array. I know many of you might have read recursive and dynamic programming (DP)...
recv() - Unix, Linux System Call
Unix - Home Unix - Getting Started Unix - File Management Unix - Directories Unix - File Permission Unix - Environment Unix - Basic Utilities Unix - Pipes & Filters Unix - Processes Unix - Communication Unix - The vi Editor Unix - What is Shell? Unix - Using Variables Unix - Special Variables Unix - Using Arrays Unix -...
[ { "code": null, "e": 1466, "s": 1454, "text": "Unix - Home" }, { "code": null, "e": 1489, "s": 1466, "text": "Unix - Getting Started" }, { "code": null, "e": 1512, "s": 1489, "text": "Unix - File Management" }, { "code": null, "e": 1531, "s": 1...
Python - Numpy Array Column Deletion - GeeksforGeeks
27 Feb, 2020 Given a numpy array, write a programme to delete columns from numpy array. Examples – Input: [['akshat', 'nikhil'], ['manjeeet', 'akash']] Output: [['akshat']['manjeeet']] Input: [[1, 0, 0, 1, 0], [0, 1, 2, 1, 1]] Output: [[1 0 1 0][0 2 1 1]] Given below are various methods to delete columns from nu...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n27 Feb, 2020" }, { "code": null, "e": 24367, "s": 24292, "text": "Given a numpy array, write a programme to delete columns from numpy array." }, { "code": null, "e": 24378, "s": 24367, "text": "Examples –" }...
Digit multiplier | Practice | GeeksforGeeks
Given a positive integer N, find the smallest number S such that the product of all the digits of S is equal to the number N. If there's no such number, Print "-1". Example 1: Input: N = 100 Output: 455 Explanation: 4*5*5 = 100. There are no numbers less than 455 with the product of it's digit as 100. Example 2: Inpu...
[ { "code": null, "e": 403, "s": 238, "text": "Given a positive integer N, find the smallest number S such that the product of all the digits of S is equal to the number N. If there's no such number, Print \"-1\"." }, { "code": null, "e": 416, "s": 405, "text": "Example 1:" }, ...
Solving NLP task using Sequence2Sequence model: from Zero to Hero | by Dima Shulga | Towards Data Science
Today I want to solve a very popular NLP task called Named Entity Recognition (NER). In short, NER is a task of extracting Name Entities from a sequence of words (a sentence). For example, given the sentence: “Jim bought 300 shares of Acme Corp. in 2006.” We want to say that “Jim” is a person, “Acme” is an organization...
[ { "code": null, "e": 381, "s": 172, "text": "Today I want to solve a very popular NLP task called Named Entity Recognition (NER). In short, NER is a task of extracting Name Entities from a sequence of words (a sentence). For example, given the sentence:" }, { "code": null, "e": 428, ...
Tryit Editor v3.6 - Show C++
using namespace std; ​ int main () { // Create a text file ofstream MyWriteFile("filename.txt"); ​ // Write to the file MyWriteFile << "Files can be tricky, but it is fun enough!";
[ { "code": null, "e": 78, "s": 57, "text": "using namespace std;" }, { "code": null, "e": 80, "s": 78, "text": "​" }, { "code": null, "e": 94, "s": 80, "text": "int main () {" }, { "code": null, "e": 118, "s": 94, "text": " // Create a text...
Concatenation of two strings in PHP
PHP offers different kinds of operators having distinctive functionalities. Operators enable us to perform arithmetic activities, string concatenation, compare values and to perform boolean operations, more...In this article, we will learn string operators given by PHP. Let's first learn the types of string operators i...
[ { "code": null, "e": 1438, "s": 1062, "text": "PHP offers different kinds of operators having distinctive functionalities. Operators enable us to perform arithmetic activities, string concatenation, compare values and to perform boolean operations, more...In this article, we will learn string operat...
Understanding Probability And Statistics: Statistical Inference For Data Scientists | by Farhad Malik | Towards Data Science
Every data scientist must be familiar with the concepts of statistical inference. Therefore, this article aims to provide an overview of statistical inference. It will take you deep into the statistical world of inference in a manner that is easy to grasp and understand. Some scientists regard statistical inference as ...
[ { "code": null, "e": 443, "s": 171, "text": "Every data scientist must be familiar with the concepts of statistical inference. Therefore, this article aims to provide an overview of statistical inference. It will take you deep into the statistical world of inference in a manner that is easy to grasp...
New keyword in Java
Yes, it is similar to a new keyword of C++. a new keyword is used to initialize/create an object. See the following example − Employee employee = new Employee(); Here new keyword is used to create an object of class Employee. new Employee() invokes the constructor of the class Employee. new keyword can also be used wit...
[ { "code": null, "e": 1188, "s": 1062, "text": "Yes, it is similar to a new keyword of C++. a new keyword is used to initialize/create an object. See the following example −" }, { "code": null, "e": 1224, "s": 1188, "text": "Employee employee = new Employee();" }, { "code"...
HTTP headers | Retry-After
31 Oct, 2019 HTTP headers are used to pass additional information with HTTP request or response. HTTP Retry-After header is an HTTP response header which indicates how long to wait before making another request. Depending on different status codes, there are different use cases of the Retry-After response header. Statu...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2019" }, { "code": null, "e": 330, "s": 28, "text": "HTTP headers are used to pass additional information with HTTP request or response. HTTP Retry-After header is an HTTP response header which indicates how long to wait before ...
How to edit Bootstrap 4 date input value ?
08 Jan, 2021 We will learn about how to edit Bootstrap 4 date input value. The task is to change the value of the date field with the help of simple JavaScript code. Approach: We are going to use three web technologies that are HTML, JavaScript, and CSS. Generally, when we choose some random value and click on the “sub...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jan, 2021" }, { "code": null, "e": 207, "s": 54, "text": "We will learn about how to edit Bootstrap 4 date input value. The task is to change the value of the date field with the help of simple JavaScript code." }, { "code":...
Count of different numbers divisible by 3 that can be obtained by changing at most one digit
02 Mar, 2022 Given a string str representing a number having N digits, the task is to calculate the number of ways to make the given number divisible by 3 by changing at most one digit of the number. Examples: Input: str[] = “23”Output: 7Explanation: Below are the numbers that can be made from the string which are divi...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Mar, 2022" }, { "code": null, "e": 239, "s": 52, "text": "Given a string str representing a number having N digits, the task is to calculate the number of ways to make the given number divisible by 3 by changing at most one digit of...
TCP Timers
13 Jun, 2022 TCP uses several timers to ensure that excessive delays are not encountered during communications. Several of these timers are elegant, handling problems that are not immediately obvious at first analysis. Each of the timers used by TCP is examined in the following sections, which reveal its role in ensuri...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Jun, 2022" }, { "code": null, "e": 419, "s": 54, "text": "TCP uses several timers to ensure that excessive delays are not encountered during communications. Several of these timers are elegant, handling problems that are not immedia...
Moment.js isLeapYear() Function
29 Jul, 2020 It is used to check whether the given year is Leap Year or not in Moment.js using the isLeapYear() function that returns true if that year is a leap year, and false if it is not. Syntax: moment().isLeapYear(); Parameter: No parameters required. Returns: True or False Installation of moment module: You can...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2020" }, { "code": null, "e": 207, "s": 28, "text": "It is used to check whether the given year is Leap Year or not in Moment.js using the isLeapYear() function that returns true if that year is a leap year, and false if it is n...
Responsive Video or Slideshow Embeds in Bootstrap with Examples
24 Jan, 2019 Bootstrap allows creating responsive video or slideshow embeds based on the width of the display or parent element by creating a native ratio that scales with the device. Using responsive video or slideshow embeds the content can be scaled automatically as per the screen size or the parent container elemen...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2019" }, { "code": null, "e": 373, "s": 28, "text": "Bootstrap allows creating responsive video or slideshow embeds based on the width of the display or parent element by creating a native ratio that scales with the device. Usin...
Python – K length decimal Places
05 Sep, 2020 Given a Decimal Number, extent its digits to K length. Input : num = 76.8, K = 5Output : 76.80000Explanation : Length of decimal places is 5. Input : num = 76.8, K = 6Output : 76.800000Explanation : Length of decimal places is 6. Method : Using format() This is way in which this task can be done. In this,...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 83, "s": 28, "text": "Given a Decimal Number, extent its digits to K length." }, { "code": null, "e": 170, "s": 83, "text": "Input : num = 76.8, K = 5Output : 76.80000Explanation...
How to select only direct children from element with Sass?
02 Nov, 2020 Introduction:Sass is a scripting language that is compiled into Cascading style sheets (CSS). It is a kind of preprocessor language. It was initially designed by Hampton Catlin and then it was developed by Natalie Weizenbaum. After its initial versions, Weizenbaum and Chris Eppstein have continued to exten...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Nov, 2020" }, { "code": null, "e": 477, "s": 28, "text": "Introduction:Sass is a scripting language that is compiled into Cascading style sheets (CSS). It is a kind of preprocessor language. It was initially designed by Hampton Catli...
HashMap replaceAll(BiFunction) method in Java with Examples
15 Oct, 2019 The replaceAll(BiFunction) method of HashMap class replaces each value with the result of applying the given function(performs a certain operation) on the corresponding value. This process continues in the same manner until all the entries have been processed or until an exception is thrown by the function...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2019" }, { "code": null, "e": 396, "s": 28, "text": "The replaceAll(BiFunction) method of HashMap class replaces each value with the result of applying the given function(performs a certain operation) on the corresponding value....
OOP Concepts - GeeksforGeeks
11 Sep, 2014 Class P { void f(int i) { print(i); } } Class Q subclass of P { void f(int i) { print(2*i); } } P x = new Q(); Q y = new Q(); P z = new Q(); x.f(1); ((P)y).f(1); z.f(1); A publicly derived class is a subtype of its base class. Inheritance provides for code reuse. ...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n11 Sep, 2014" }, { "code": null, "e": 29715, "s": 29577, "text": "Class P\n{\n void f(int i)\n {\n print(i);\n }\n}\n\nClass Q subclass of P\n{\n void f(int i)\n {\n print(2*i);\n }\n}\n" }, { ...
Java Swing | JComboBox with examples
01 Jun, 2022 JComboBox is a part of Java Swing package. JComboBox inherits JComponent class . JComboBox shows a popup menu that shows a list and the user can select a option from that specified list . JComboBox can be editable or read- only depending on the choice of the programmer .Constructor of the JComboBox are: ...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jun, 2022" }, { "code": null, "e": 360, "s": 53, "text": "JComboBox is a part of Java Swing package. JComboBox inherits JComponent class . JComboBox shows a popup menu that shows a list and the user can select a option from that spe...
HTML hidden Attribute
02 Jun, 2022 The hidden attribute in HTML is used to define the visibility of elements. It contains a boolean value. It is a semantic indicator of state in HTML code. If this attribute is used then browsers will not display elements that have the hidden attribute specified. The hidden attribute can be seen using some c...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Jun, 2022" }, { "code": null, "e": 606, "s": 53, "text": "The hidden attribute in HTML is used to define the visibility of elements. It contains a boolean value. It is a semantic indicator of state in HTML code. If this attribute is...
How to Generate QR Code in Android?
06 Jul, 2021 QR codes are used in many apps for displaying data in machine-readable form. These codes are used to represent data in a secured manner that is readable only by machines and not by humans. We have seen many apps that provide QR codes that and we can scan that QR codes with our mobile device. In this articl...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jul, 2021" }, { "code": null, "e": 502, "s": 53, "text": "QR codes are used in many apps for displaying data in machine-readable form. These codes are used to represent data in a secured manner that is readable only by machines and ...
Reading and Writing to text files in Python
07 Jul, 2022 Python provides inbuilt functions for creating, writing, and reading files. There are two types of files that can be handled in python, normal text files and binary files (written in binary language, 0s, and 1s). Text files: In this type of file, Each line of text is terminated with a special character cal...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 265, "s": 52, "text": "Python provides inbuilt functions for creating, writing, and reading files. There are two types of files that can be handled in python, normal text files and binary files (wr...
Difference between Token based and Non-Token based Algorithms in Distributed System
21 Jun, 2022 A distributed system is a system in which components are situated in distinct places, these distinct places refer to networked computers which can easily communicate and coordinate their tasks by just exchanging asynchronous messages with each other. These components can communicate with each other to conq...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 773, "s": 54, "text": "A distributed system is a system in which components are situated in distinct places, these distinct places refer to networked computers which can easily communicate and coor...
Python | Pandas Series.to_numpy()
27 Feb, 2019 Pandas Series.to_numpy() function is used to return a NumPy ndarray representing the values in given Series or Index. This function will explain how we can convert the pandas Series to numpy Array. Although it’s very simple, but the concept behind this technique is very unique. Because we know the Series h...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Feb, 2019" }, { "code": null, "e": 146, "s": 28, "text": "Pandas Series.to_numpy() function is used to return a NumPy ndarray representing the values in given Series or Index." }, { "code": null, "e": 429, "s": 146, ...
Tensorflow.js tf.reshape() Function
21 Jun, 2021 Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also helps the developers to develop ML models in JavaScript language and can use ML directly in the browser or Node.js. The tf.reshape() ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2021" }, { "code": null, "e": 318, "s": 28, "text": "Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also h...
Delegation vs Inheritance in Java
23 Feb, 2022 Inheritance in Java programming is the process by which one class takes the property of another other class. i.e. the new classes, known as derived or child class, take over the attributes and behavior of the pre-existing classes, which are referred to as base classes or super or parent class.Delegation is...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Feb, 2022" }, { "code": null, "e": 417, "s": 54, "text": "Inheritance in Java programming is the process by which one class takes the property of another other class. i.e. the new classes, known as derived or child class, take over ...
Python – Setting up the Bokeh Environment
22 Jun, 2020 Bokeh is supported on CPython versions 3.6+ only both with Standard distribution and Anaconda distribution. Other Python versions or implementations may or may not function. Current version of Bokeh is 2.0.2 . Bokeh package has the following dependencies: 1. Required Dependencies PyYAML>=3.10 python-dateut...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2020" }, { "code": null, "e": 284, "s": 28, "text": "Bokeh is supported on CPython versions 3.6+ only both with Standard distribution and Anaconda distribution. Other Python versions or implementations may or may not function. C...
Diagonally Dominant Matrix
25 May, 2022 In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is larger than or equal to the sum of the magnitudes of all the other (non-diagonal) entries in that row. More precisely, the matrix A is diagonally dominant if F...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 May, 2022" }, { "code": null, "e": 358, "s": 52, "text": "In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is larger than or equal to the ...
How to display Pandas Dataframe in Python without Index?
Use index=False to ignore index. Let us first import the required library − import pandas as pd Create a DataFrame − dataFrame = pd.DataFrame([[10, 15], [20, 25], [30, 35]],index=['x', 'y', 'z'],columns=['a', 'b']) Select rows by passing label using loc − dataFrame.loc['x'] Display DataFrame without index − dataFrame....
[ { "code": null, "e": 1138, "s": 1062, "text": "Use index=False to ignore index. Let us first import the required library −" }, { "code": null, "e": 1158, "s": 1138, "text": "import pandas as pd" }, { "code": null, "e": 1179, "s": 1158, "text": "Create a DataFr...
PHP 7 | Features - GeeksforGeeks
22 Apr, 2019 Lots of features have been added in PHP7. After the release of PHP7, performance has been increased by 25-70% for the website. Now we will discuss the PHP7 features one by one through example. Scalar Datatype Hinting: Scalar datatypes are boolean, integer, float and string. Earlier we were unable to do typ...
[ { "code": null, "e": 24784, "s": 24756, "text": "\n22 Apr, 2019" }, { "code": null, "e": 24977, "s": 24784, "text": "Lots of features have been added in PHP7. After the release of PHP7, performance has been increased by 25-70% for the website. Now we will discuss the PHP7 feature...
How to remove hash from window.location with JavaScript without page refresh ? - GeeksforGeeks
26 Jul, 2021 The replaceState() method is used to modify the current history entry, replacing it with the state objects, title, and URL passed in the method parameters. This method is useful when you want to update the state object or URL of the current history entry in response to some user action. To remove the hash ...
[ { "code": null, "e": 25366, "s": 25338, "text": "\n26 Jul, 2021" }, { "code": null, "e": 25772, "s": 25366, "text": "The replaceState() method is used to modify the current history entry, replacing it with the state objects, title, and URL passed in the method parameters. This me...
How to read data from PDF file and display on console in Java?
There are several libraries to read data from a pdf using Java. Let us see how to read data from a PDF document and display it on the console using a library named PDFBox. You can extract text using the getText() method of the PDFTextStripper class. This class extracts all the text from the given PDF document to use th...
[ { "code": null, "e": 1234, "s": 1062, "text": "There are several libraries to read data from a pdf using Java. Let us see how to read data from a PDF document and display it on the console using a library named PDFBox." }, { "code": null, "e": 1386, "s": 1234, "text": "You can ex...
Tryit Editor v3.7
Tryit: HTML abbreviations
[]