title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
p5.js | loadTable() Function
21 Mar, 2020 The loadTable() function is used to read the contents of a file or URL and create a p5.Table object from it. The options parameter can be used to define the type of format that the data is expected to be read. All the files loaded and saved are in UTF-8 encoding. This function is asynchronous, therefore it...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Mar, 2020" }, { "code": null, "e": 292, "s": 28, "text": "The loadTable() function is used to read the contents of a file or URL and create a p5.Table object from it. The options parameter can be used to define the type of format tha...
MongoDB – findOneAndDelete() Method
08 Feb, 2021 The findOneAndDelete() method deletes a single document based on the selection criteria from the collection. It deletes the first document from the collection that matches the given filter query expression. It takes five parameters the first parameter is the selection criteria and the others are optional. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Feb, 2021" }, { "code": null, "e": 336, "s": 28, "text": "The findOneAndDelete() method deletes a single document based on the selection criteria from the collection. It deletes the first document from the collection that matches the...
Working with Legends in R using ggplot2
28 Jul, 2021 A legend in a plot helps us to understand which groups belong to each bar, line, or box based on its type, color, etc. We can add a legend box in R using the legend() function. These work as guides. The keys can be determined by scale breaks. In this article, we will be working with legends and associated ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2021" }, { "code": null, "e": 391, "s": 28, "text": "A legend in a plot helps us to understand which groups belong to each bar, line, or box based on its type, color, etc. We can add a legend box in R using the legend() function...
Convert image to binary using Python
17 Dec, 2020 In this article, we are going to convert the image into its binary form. A binary image is a monochromatic image that consists of pixels that can have one of exactly two colors, usually black and white. Binary images are also called bi-level or two-level. This means that each pixel is stored as a single bi...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2020" }, { "code": null, "e": 351, "s": 28, "text": "In this article, we are going to convert the image into its binary form. A binary image is a monochromatic image that consists of pixels that can have one of exactly two color...
Python String splitlines() Method
Python string method splitlines() returns a list with all the lines in string, optionally including the line breaks (if num is supplied and is true) Following is the syntax for splitlines() method − str.splitlines() Keepends − This is an optional parameter, if its value as true, line breaks need are also included in ...
[ { "code": null, "e": 2528, "s": 2378, "text": "Python string method splitlines() returns a list with all the lines in string, optionally including the line breaks (if num is supplied and is true)" }, { "code": null, "e": 2578, "s": 2528, "text": "Following is the syntax for spli...
PyQt5 QDockWidget – Setting Multiple Widgets Inside it
24 May, 2022 In this article we will see how we add/set multiple widgets to the QDockWidget. QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the dock widget area around the central widget in a QMainWindow(original window). We ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 May, 2022" }, { "code": null, "e": 439, "s": 28, "text": "In this article we will see how we add/set multiple widgets to the QDockWidget. QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windows...
Final variable in Java
A final variable can be explicitly initialized only once. A reference variable declared final can never be reassigned to refer to a different object. However, the data within the object can be changed. So, the state of the object can be changed but not the reference. With variables, the final modifier often is used wi...
[ { "code": null, "e": 1338, "s": 1187, "text": "A final variable can be explicitly initialized only once. A reference variable declared final can never be reassigned to refer to a different object. " }, { "code": null, "e": 1456, "s": 1338, "text": "However, the data within the ob...
Django settings file – step by step Explanation
01 Jun, 2021 Once we create the Django project, it comes with predefined Directory structure having the following files with each file having their own uses. Lets take an example // Create a Django Project "mysite" django-admin startproject mysite cd /pathTo/mysite // Create a Django app "polls" inside project "my...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jun, 2021" }, { "code": null, "e": 199, "s": 53, "text": "Once we create the Django project, it comes with predefined Directory structure having the following files with each file having their own uses. " }, { "code": null, ...
Count common subsequence in two strings
01 Sep, 2021 Given two string S and Q. The task is to count the number of the common subsequence in S and T. Examples: Input : S = “ajblqcpdz”, T = “aefcnbtdi” Output : 11 Common subsequences are : { “a”, “b”, “c”, “d”, “ab”, “bd”, “ad”, “ac”, “cd”, “abd”, “acd” } Input : S = “a”, T = “ab” Output : 1 To find the number...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Sep, 2021" }, { "code": null, "e": 148, "s": 52, "text": "Given two string S and Q. The task is to count the number of the common subsequence in S and T." }, { "code": null, "e": 158, "s": 148, "text": "Examples:...
Simple Tic-Tac-Toe Game using JavaScript
02 Feb, 2022 How to implement a 2-player Tic-Tac-Toe game using JavaScript? It is quite easy to develop with some simple validations and error checks. Player-1 starts playing the game and both the players make their moves in consecutive turns. The player who makes a straight 3-block chain wins the game. This game is b...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Feb, 2022" }, { "code": null, "e": 118, "s": 54, "text": "How to implement a 2-player Tic-Tac-Toe game using JavaScript? " }, { "code": null, "e": 433, "s": 118, "text": "It is quite easy to develop with some sim...
PySpark Groupby
19 Dec, 2021 In this article, we are going to discuss Groupby function in PySpark using Python. Python3 # importing moduleimport pyspark # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSession # creating sparksession and giving an app namespark = SparkSession.builder.appName('sparkdf').ge...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 111, "s": 28, "text": "In this article, we are going to discuss Groupby function in PySpark using Python." }, { "code": null, "e": 119, "s": 111, "text": "Python3" }, { "...
Perl | Passing Complex Parameters to a Subroutine
07 May, 2019 Prerequisite: Perl | Subroutines or Functions A Perl function or subroutine is a group of statements that together perform a specific task. In every programming language, the user wants to reuse the code. So the user puts the section of code in a function or subroutine so that there will be no need to rewr...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 May, 2019" }, { "code": null, "e": 74, "s": 28, "text": "Prerequisite: Perl | Subroutines or Functions" }, { "code": null, "e": 582, "s": 74, "text": "A Perl function or subroutine is a group of statements that to...
TextView in Kotlin
29 Oct, 2021 Android TextView is simply a view that are used to display the text to the user and optionally allow us to modify or edit it. First of all, open Kotlin project in Android Studio.Following steps are used to create TextView in Kotlin: Add a TextView in activity_main.xml file inside LinearLayout.Add attribute...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Oct, 2021" }, { "code": null, "e": 286, "s": 53, "text": "Android TextView is simply a view that are used to display the text to the user and optionally allow us to modify or edit it. First of all, open Kotlin project in Android Stu...
Dictionary and counter in Python to find winner of election
16 Jun, 2022 Given an array of names of candidates in an election. A candidate name in the array represents a vote cast to the candidate. Print the name of candidates received Max vote. If there is tie, print a lexicographically smaller name.Examples: Input : votes[] = {"john", "johnny", "jackie", ...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 293, "s": 52, "text": "Given an array of names of candidates in an election. A candidate name in the array represents a vote cast to the candidate. Print the name of candidates received Max vote. I...
Character.isLetterOrDigit() in Java with examples
06 Dec, 2018 The java.lang.Character.isLetterOrDigit(char ch) is an inbuilt method in java which determines if the specified character is a letter or digit. Syntax: public static boolean isLetterOrDigit(char ch) Parameters: The function accepts a single mandatory parameter ch which signifies the character to be tested...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2018" }, { "code": null, "e": 172, "s": 28, "text": "The java.lang.Character.isLetterOrDigit(char ch) is an inbuilt method in java which determines if the specified character is a letter or digit." }, { "code": null, ...
LinkedList toArray() method in Java with Example
27 May, 2022 This java.util.LinkedList.toArray() method is used to convert and LinkedList into an Array. It returns the same LinkedList elements but in the form of Array only. We have to method to convert LinkedList into an Array toArray() – without parameter toArray(arrayName) – with parameter The Java.util.LinkedLis...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 May, 2022" }, { "code": null, "e": 218, "s": 54, "text": "This java.util.LinkedList.toArray() method is used to convert and LinkedList into an Array. It returns the same LinkedList elements but in the form of Array only." }, { ...
Graph - GeeksforGeeks
19 Nov, 2018 I. 7, 6, 5, 4, 4, 3, 2, 1 II. 6, 6, 6, 6, 3, 3, 2, 2 III. 7, 6, 6, 4, 4, 3, 2, 2 IV. 8, 7, 7, 6, 4, 2, 1, 1 Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here. Must Do Coding Questions for Product Based Companies How to Replace Values in Column Based on Condit...
[ { "code": null, "e": 28965, "s": 28937, "text": "\n19 Nov, 2018" }, { "code": null, "e": 29074, "s": 28965, "text": "I. 7, 6, 5, 4, 4, 3, 2, 1\nII. 6, 6, 6, 6, 3, 3, 2, 2\nIII. 7, 6, 6, 4, 4, 3, 2, 2\nIV. 8, 7, 7, 6, 4, 2, 1, 1 " }, { "code": null, "e": 29172, "s"...
Find subarray with given sum | Set 1 (Nonnegative Numbers) - GeeksforGeeks
29 Mar, 2022 Given an unsorted array arr of nonnegative integers and an integer sum, find a continuous subarray which adds to a given sum. There may be more than one subarrays with sum as the given sum, print first such subarray. Examples : Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33Output: Sum found between indexes...
[ { "code": null, "e": 41374, "s": 41346, "text": "\n29 Mar, 2022" }, { "code": null, "e": 41603, "s": 41374, "text": "Given an unsorted array arr of nonnegative integers and an integer sum, find a continuous subarray which adds to a given sum. There may be more than one subarrays ...
How to validate if input in input field must contains a seed word using express-validator ? - GeeksforGeeks
14 Jan, 2022 In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, we often need to validate input so that it must contain a see...
[ { "code": null, "e": 26897, "s": 26869, "text": "\n14 Jan, 2022" }, { "code": null, "e": 27428, "s": 26897, "text": "In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow onl...
ByteBuffer getLong() method in Java with Examples - GeeksforGeeks
17 Jun, 2019 The getLong() method of java.nio.ByteBuffer class is used to read the next eight bytes at this buffer’s current position, composing them into a long value according to the current byte order, and then increments the position by eight. Syntax: public abstract long getLong() Return Value: This method returns...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n17 Jun, 2019" }, { "code": null, "e": 25582, "s": 25347, "text": "The getLong() method of java.nio.ByteBuffer class is used to read the next eight bytes at this buffer’s current position, composing them into a long value accordin...
How to clear Tkinter Canvas? - GeeksforGeeks
11 Dec, 2020 Tkinter is a Python Package for creating effective GUI applications. Tkinter’s Canvas widget is nothing but a rectangular area that is used for drawing pictures, simple shapes, or any complex graph. We can place any widgets like text, button, or frames on the canvas. The task here is to generate a Python s...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n11 Dec, 2020" }, { "code": null, "e": 25915, "s": 25647, "text": "Tkinter is a Python Package for creating effective GUI applications. Tkinter’s Canvas widget is nothing but a rectangular area that is used for drawing pictures, s...
A Practical Approach Using YOUR Uber Rides Dataset | by Felipe Alves Santos | Towards Data Science
Exploring data is certainly one of the most important stages in Data Science processes. Despite its simplicity, it can be a powerful tool to put you ahead on data and business context, as well as to determine crutial treatments before creating machine learning models. To turn things a little bit more interesting, I’ve ...
[ { "code": null, "e": 441, "s": 172, "text": "Exploring data is certainly one of the most important stages in Data Science processes. Despite its simplicity, it can be a powerful tool to put you ahead on data and business context, as well as to determine crutial treatments before creating machine lea...
How to Check if Android EditText is empty in Kotlin?
This example demonstrates how to Check if Android EditText is empty in Kotlin. Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Relative...
[ { "code": null, "e": 1141, "s": 1062, "text": "This example demonstrates how to Check if Android EditText is empty in Kotlin." }, { "code": null, "e": 1269, "s": 1141, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details ...
BaseExpandableListAdapter in Android with Example - GeeksforGeeks
10 Nov, 2020 In many android apps, the developer may need to show multi-data for huge main data items. i.e. as per our example, under “Programming languages”, we need to show “Python”, “Java” etc., and under “Relational database” we need to show “Oracle”, “MySQL’ etc., For that purpose, we can use “BaseExpandableListAd...
[ { "code": null, "e": 24534, "s": 24506, "text": "\n10 Nov, 2020" }, { "code": null, "e": 25423, "s": 24534, "text": "In many android apps, the developer may need to show multi-data for huge main data items. i.e. as per our example, under “Programming languages”, we need to show “...
Write your own len() in Python - GeeksforGeeks
01 Feb, 2018 The method len() returns the number of elements in the list or length of the string depending upon the argument you are passing. How to implement without using len(): 1. Take input and pass the string/list into a function which return its length. 2. Initialize a count variable to 0, this count varia...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n01 Feb, 2018" }, { "code": null, "e": 25690, "s": 25561, "text": "The method len() returns the number of elements in the list or length of the string depending upon the argument you are passing." }, { "code": null, "e...
How To Merge Two DataFrames in R ? - GeeksforGeeks
26 Mar, 2021 In this article, We are going to see how to merge two R dataFrames. Merging of Data frames in R can be done in two ways. Merging columns Merging rows In this way, we merge the database horizontally. We use the merge function to merge two frames by one or more common key variables(i.e., an inner join). data...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n26 Mar, 2021" }, { "code": null, "e": 26608, "s": 26487, "text": "In this article, We are going to see how to merge two R dataFrames. Merging of Data frames in R can be done in two ways." }, { "code": null, "e": 26624...
Sum of all proper divisors from 1 to N - GeeksforGeeks
06 Jun, 2021 Given a positive integer N, the task is to find the value of where function F(x) can be defined as sum of all proper divisors of ‘x‘.Examples: Input: N = 4 Output: 5 Explanation: Sum of all proper divisors of numbers: F(1) = 0 F(2) = 1 F(3) = 1 F(4) = 1 + 2 = 3 Total Sum = F(1) + F(2) + F(3) + F(4) = 0 +...
[ { "code": null, "e": 25937, "s": 25909, "text": "\n06 Jun, 2021" }, { "code": null, "e": 26082, "s": 25937, "text": "Given a positive integer N, the task is to find the value of where function F(x) can be defined as sum of all proper divisors of ‘x‘.Examples: " }, { "cod...
Python String | ljust(), rjust(), center() - GeeksforGeeks
02 Feb, 2018 String alignment is frequently used in many day-day applications. Python in its language offers several functions that helps to align string. Also, offers a way to add user specified padding instead of blank space. These functions are : str.ljust(s, width[, fillchar]) str.rjust(s, width[, fillchar]) str.ce...
[ { "code": null, "e": 25473, "s": 25445, "text": "\n02 Feb, 2018" }, { "code": null, "e": 25688, "s": 25473, "text": "String alignment is frequently used in many day-day applications. Python in its language offers several functions that helps to align string. Also, offers a way to...
Remove end characters from strings in Julia - strip(), lstrip() and rstrip() Methods - GeeksforGeeks
01 Apr, 2020 The strip() is an inbuilt function in julia which is used to remove leading and trailing characters from the specified string str. These removing elements is specified by given characters chars. Syntax:strip(str::AbstractString, chars) Parameters: str::AbstractString: Specified string. chars: Specified cha...
[ { "code": null, "e": 25533, "s": 25505, "text": "\n01 Apr, 2020" }, { "code": null, "e": 25728, "s": 25533, "text": "The strip() is an inbuilt function in julia which is used to remove leading and trailing characters from the specified string str. These removing elements is speci...
HTML <pre> Tag - GeeksforGeeks
17 Mar, 2022 The <pre> tag in HTML is used to define the block of preformatted text which preserves the text spaces, line breaks, tabs, and other formatting characters which are ignored by web browsers. Text in the <pre> element is displayed in a fixed-width font, but it can be changed using CSS. The <pre> tag requires...
[ { "code": null, "e": 24331, "s": 24303, "text": "\n17 Mar, 2022" }, { "code": null, "e": 24672, "s": 24331, "text": "The <pre> tag in HTML is used to define the block of preformatted text which preserves the text spaces, line breaks, tabs, and other formatting characters which ar...
How to compile 32-bit program on 64-bit gcc in C and C++ - GeeksforGeeks
11 Oct, 2021 Mostly compiler(gcc or clang) of C and C++, nowadays come with default 64-bit version. Well it would be a good option in terms of speed purposes. But it would lead to problem, if someone wants to run their program as a 32-bit rather than 64-bit for testing or debugging purposes. Therefore we must have a kn...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n11 Oct, 2021" }, { "code": null, "e": 26044, "s": 25561, "text": "Mostly compiler(gcc or clang) of C and C++, nowadays come with default 64-bit version. Well it would be a good option in terms of speed purposes. But it would lead...
Sliding Window Maximum (Maximum of all subarrays of size k) - GeeksforGeeks
11 May, 2022 Given an array and an integer K, find the maximum for each and every contiguous subarray of size k. Examples : Input: arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}, K = 3 Output: 3 3 4 5 5 5 6 Explanation: Maximum of 1, 2, 3 is 3 Maximum of 2, 3, 1 is 3 Maximum of 3, 1, 4 is 4 Maximum of 1, 4, 5 is 5 Maximum of 4...
[ { "code": null, "e": 26375, "s": 26347, "text": "\n11 May, 2022" }, { "code": null, "e": 26475, "s": 26375, "text": "Given an array and an integer K, find the maximum for each and every contiguous subarray of size k." }, { "code": null, "e": 26487, "s": 26475, ...
Queries for decimal values of subarrays of a binary array - GeeksforGeeks
23 Aug, 2021 Given a binary array arr[], we to find the number represented by the subarray a[l..r]. There are multiple such queries.Examples: Input : arr[] = {1, 0, 1, 0, 1, 1}; l = 2, r = 4 l = 4, r = 5 Output : 5 3 Subarray 2 to 4 is 101 which is 5 in decimal. Subarray 4 to 5 is 11 whic...
[ { "code": null, "e": 26527, "s": 26499, "text": "\n23 Aug, 2021" }, { "code": null, "e": 26658, "s": 26527, "text": "Given a binary array arr[], we to find the number represented by the subarray a[l..r]. There are multiple such queries.Examples: " }, { "code": null, ...
How to make animated counter using JavaScript ? - GeeksforGeeks
31 Oct, 2021 In this article, we will create an animated counter using JavaScript and basic HTML for designing. An animated counter is used to display the counts in an animation starting from 0 and ending at a specific number. This is generally used by many websites to make a web page more attractive. Approach: In the ...
[ { "code": null, "e": 26164, "s": 26136, "text": "\n31 Oct, 2021" }, { "code": null, "e": 26263, "s": 26164, "text": "In this article, we will create an animated counter using JavaScript and basic HTML for designing." }, { "code": null, "e": 26454, "s": 26263, ...
Java Program for Insertion Sort - GeeksforGeeks
06 Aug, 2018 Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. // Java program for implementation of Insertion Sortclass InsertionSort{ /*Function to sort array using insertion sort*/ void sort(int arr[]) { int n = arr.length; for (int i=1; i<n; +...
[ { "code": null, "e": 26131, "s": 26103, "text": "\n06 Aug, 2018" }, { "code": null, "e": 26231, "s": 26131, "text": "Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands." }, { "code": "// Java program for implementation of In...
Merge two sorted arrays with O(1) extra space - GeeksforGeeks
10 May, 2022 We are given two sorted arrays. We need to merge these two arrays such that the initial numbers (after complete sorting) are in the first array and the remaining numbers are in the second array. Extra space allowed in O(1). Example: Input: ar1[] = {10}; ar2[] = {2, 3}; Output: ar1[] = {2} a...
[ { "code": null, "e": 42521, "s": 42493, "text": "\n10 May, 2022" }, { "code": null, "e": 42745, "s": 42521, "text": "We are given two sorted arrays. We need to merge these two arrays such that the initial numbers (after complete sorting) are in the first array and the remaining n...
PYGLET – Drawing Circle - GeeksforGeeks
25 Aug, 2021 In this article we will see how we can draw circles on window in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia etc. A window is a “heavyweight” object occupying operating system resources. Windows may appear as float...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n25 Aug, 2021" }, { "code": null, "e": 26268, "s": 25537, "text": "In this article we will see how we can draw circles on window in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich G...
List retainAll() Method in Java with Examples - GeeksforGeeks
02 Jan, 2019 This method is used to retain all the elements present in the collection from the specified collection into the list. Syntax: boolean retainAll(Collection c) Parameters: This method has only argument, collection of which elements are to be retained in the given list. Returns: This method returns True if el...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n02 Jan, 2019" }, { "code": null, "e": 25343, "s": 25225, "text": "This method is used to retain all the elements present in the collection from the specified collection into the list." }, { "code": null, "e": 25351, ...
Combinations from n arrays picking one element from each array - GeeksforGeeks
18 Feb, 2022 Given a list of arrays, find all combinations where each combination contains one element from each given array. Examples: Input : [ [1, 2], [3, 4] ] Output : 1 3 1 4 2 3 2 4 Input : [ [1], [2, 3, 4], [5] ] Output : 1 2 5 1 3 5 1 4 5 We ...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n18 Feb, 2022" }, { "code": null, "e": 26180, "s": 26067, "text": "Given a list of arrays, find all combinations where each combination contains one element from each given array." }, { "code": null, "e": 26190, "s...
Count of all even numbers in the range [L, R] whose sum of digits is divisible by 3 in C++
We are given two numbers L and R that define a range [L,R]. The goal is to find all numbers between L and R that are even, and sum of whose digits is divisible by 3. We will do this by calculating the sum of digits of all even numbers between L and R and increment count if that sum%3==0. Let us understand with examples...
[ { "code": null, "e": 1228, "s": 1062, "text": "We are given two numbers L and R that define a range [L,R]. The goal is to find all numbers between L and R that are even, and sum of whose digits is divisible by 3." }, { "code": null, "e": 1351, "s": 1228, "text": "We will do this ...
Android Animations in Kotlin - GeeksforGeeks
12 Nov, 2021 Animation is a method in which a collection of images are combined in a specific way and processed then they appear as moving images. Building animations make on-screen objects seem to be alive. Android has quite a few tools to help you create animations with relative ease. so in this article we will learn...
[ { "code": null, "e": 24042, "s": 24014, "text": "\n12 Nov, 2021" }, { "code": null, "e": 24461, "s": 24042, "text": "Animation is a method in which a collection of images are combined in a specific way and processed then they appear as moving images. Building animations make on-s...
How to Create a Dynamic Audio Player in Android with Firebase Realtime Database? - GeeksforGeeks
20 Jan, 2021 Many online music player apps require so many songs, audio files inside their apps. So to handle so many files we have to either use any type of database and manage all these files. Storing files inside your application will not be a better approach. So in this article, we will take a look at implementing ...
[ { "code": null, "e": 25116, "s": 25088, "text": "\n20 Jan, 2021" }, { "code": null, "e": 25467, "s": 25116, "text": "Many online music player apps require so many songs, audio files inside their apps. So to handle so many files we have to either use any type of database and manag...
How to use a final or effectively final variable in lambda expression in Java?
The effectively final variables refer to local variables that are not declared final explicitly and can't be changed once initialized. A lambda expression can use a local variable in outer scopes only if they are effectively final. (optional) (Arguments) -> body In the below example, the "size" variable is not declared...
[ { "code": null, "e": 1294, "s": 1062, "text": "The effectively final variables refer to local variables that are not declared final explicitly and can't be changed once initialized. A lambda expression can use a local variable in outer scopes only if they are effectively final." }, { "code":...
Change Legend background using facecolor in MatplotLib - GeeksforGeeks
22 Jan, 2021 In this article, we will see how can we can change the background color of a legend in our graph using MatplotLib, Here we will take two different examples to showcase different background colors of a legend in our graph. Requirements: pip install matplotlib Approach: Import required module. Create data. C...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n22 Jan, 2021" }, { "code": null, "e": 24514, "s": 24292, "text": "In this article, we will see how can we can change the background color of a legend in our graph using MatplotLib, Here we will take two different examples to show...
PyQt5 QListWidget - Setting Drag Drop Property - GeeksforGeeks
06 Aug, 2020 In this article we will see how we can set the drag drop property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. Describes the ...
[ { "code": null, "e": 24758, "s": 24730, "text": "\n06 Aug, 2020" }, { "code": null, "e": 25275, "s": 24758, "text": "In this article we will see how we can set the drag drop property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic i...
Program to find a list of product of all elements except the current index in Python
Suppose we have a list of numbers called nums, we have to find a new list such that each element at index i of the newly generated list is the product of all the numbers in the original list except the one at index i. Here we have to solve it without using division. So, if the input is like nums = [2, 3, 4, 5, 6], then...
[ { "code": null, "e": 1329, "s": 1062, "text": "Suppose we have a list of numbers called nums, we have to find a new list such that each element at index i of the newly generated list is the product of all the numbers in the original list except the one at index i. Here we have to solve it without us...
Execute operations (plus, minus, multiply, divide) while updating a MySQL table?
Following is the syntax executing the plus (+) operator − update yourTableName set yourColumnName3=(yourColumnName1+yourColumnName2) The above syntax is only for plus operator. You need to change symbol like -,*,/ for other operations. Let us first create a table − mysql> create table DemoTable -> ( -> Number1 in...
[ { "code": null, "e": 1120, "s": 1062, "text": "Following is the syntax executing the plus (+) operator −" }, { "code": null, "e": 1195, "s": 1120, "text": "update yourTableName set yourColumnName3=(yourColumnName1+yourColumnName2)" }, { "code": null, "e": 1328, "s...
How to connect to an already open browser using Selenium Webdriver?
We can connect to an already open browser using Selenium webdriver. This can be done using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method. This is generally used for debugging purposes when we have a large number of steps i...
[ { "code": null, "e": 1298, "s": 1062, "text": "We can connect to an already open browser using Selenium webdriver. This can be done using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method." }, { "co...
Group thousands of similar spreadsheet text cells in seconds | by Luke Whyte | Towards Data Science
Here’s a common spreadsheet or database problem: +-----+-------------------+| row | fullname |+-----+-------------------+| 1 | John F. Doe || 2 | Esquivel, Mara || 3 | Doe, John F || 4 | Whyte, Luke || 5 | Doe, John Francis |+-----+-------------------+ Rows 1, 3 and 5 likely refe...
[ { "code": null, "e": 221, "s": 172, "text": "Here’s a common spreadsheet or database problem:" }, { "code": null, "e": 465, "s": 221, "text": "+-----+-------------------+| row | fullname |+-----+-------------------+| 1 | John F. Doe || 2 | Esquivel, Mara || ...
Databricks: How to Save Data Frames as CSV Files on Your Local Computer | by Deborah Kewon | Towards Data Science
When I work on Python projects dealing with large datasets, I usually use Spyder. The environment of Spyder is very simple; I can browse through working directories, maintain large code bases and review data frames I create. However, if I don’t subset the large data, I constantly face memory issues and struggle with ve...
[ { "code": null, "e": 717, "s": 172, "text": "When I work on Python projects dealing with large datasets, I usually use Spyder. The environment of Spyder is very simple; I can browse through working directories, maintain large code bases and review data frames I create. However, if I don’t subset the...
Android Animation using Android Studio - GeeksforGeeks
31 Mar, 2021 In today’s world which is filled with full of imagination and visualizations, there are some areas that are covered with the word animation. When this word will come to anyone’s mind they always create a picture of cartoons and some Disney world shows. As we already know that among kids, animation movies a...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n31 Mar, 2021" }, { "code": null, "e": 26994, "s": 26407, "text": "In today’s world which is filled with full of imagination and visualizations, there are some areas that are covered with the word animation. When this word will co...
Check if a given array can be divided into pairs with even sum
13 Sep, 2021 Given an array arr[] consisting of N integers, the task is to check if it is possible to divide the entire array into pairs such that the sum of each pair is even. If it is possible, print “Yes”. Otherwise, print “No”. Examples: Input: arr[] = {3, 2, 1, 4, 7, 5, }Output: YesExplanation:The given array can ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Sep, 2021" }, { "code": null, "e": 271, "s": 52, "text": "Given an array arr[] consisting of N integers, the task is to check if it is possible to divide the entire array into pairs such that the sum of each pair is even. If it is p...
Longest Path in a Directed Acyclic Graph | Set 2
04 Jul, 2022 Given a Weighted Directed Acyclic Graph (DAG) and a source vertex in it, find the longest distances from source vertex to all other vertices in the given graph. We have already discussed how we can find Longest Path in Directed Acyclic Graph(DAG) in Set 1. In this post, we will discuss another interesting ...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 213, "s": 52, "text": "Given a Weighted Directed Acyclic Graph (DAG) and a source vertex in it, find the longest distances from source vertex to all other vertices in the given graph." }, { ...
Send message to Telegram user using Python
16 Sep, 2021 Have you ever wondered how people do automation on Telegram? You may know that Telegram has a big user base and so it is one of the preferred social media to read people. What good thing about Telegram is that it provides a bunch of API’s methods, unlike Whatsapp which restricts such things. So in this pos...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Sep, 2021" }, { "code": null, "e": 436, "s": 52, "text": "Have you ever wondered how people do automation on Telegram? You may know that Telegram has a big user base and so it is one of the preferred social media to read people. Wha...
Order of operands for logical operators
28 May, 2017 The order of operands of logical operators &&, || are important in C/C++. In mathematics, logical AND, OR, etc... operations are commutative. The result will not change even if we swap RHS and LHS of the operator. In C/C++ (may be in other languages as well) even though these operators are commutative, th...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2017" }, { "code": null, "e": 128, "s": 54, "text": "The order of operands of logical operators &&, || are important in C/C++." }, { "code": null, "e": 268, "s": 128, "text": "In mathematics, logical AND, OR...
Underscore.js _.filter Function
28 Dec, 2021 The Underscore.js is a JavaScript library that provides a lot of useful functions like the map, filter, invokes, etc even without using any built-in objects. The _.filter() is used to check which elements in the passed array satisfy the condition. It will form a new array of all those elements which satisf...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Dec, 2021" }, { "code": null, "e": 186, "s": 28, "text": "The Underscore.js is a JavaScript library that provides a lot of useful functions like the map, filter, invokes, etc even without using any built-in objects." }, { "co...
Difference between readonly and const keyword in C#
12 May, 2021 In C#, a const keyword is used to declare constant fields and constant local. The value of the constant field is the same throughout the program or in other words, once the constant field is assigned the value of this field is not be changed. In C#, constant fields and locals are not variables, a constant ...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 May, 2021" }, { "code": null, "e": 421, "s": 52, "text": "In C#, a const keyword is used to declare constant fields and constant local. The value of the constant field is the same throughout the program or in other words, once the c...
Python | Sum of number digits in List
30 Jun, 2021 The problem of finding the summation of digits of numbers is quite common. This can sometimes come in form of a list and we need to perform that. This has application in many domains such as school programming and web development. Let’s discuss certain ways in which this problem can be solved. Method #1 :...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2021" }, { "code": null, "e": 350, "s": 54, "text": "The problem of finding the summation of digits of numbers is quite common. This can sometimes come in form of a list and we need to perform that. This has application in many...
How to extract certain columns from a list of dataframe in R?
13 Dec, 2021 A nested list may contain other lists, or various objects, arrays, vectors or dataframes as its components. Each component is mapped to a unique index position in the R programming language. Any element can be easily indexed using the [[]] operator, which is used for referencing the particular indexes of t...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Dec, 2021" }, { "code": null, "e": 509, "s": 28, "text": "A nested list may contain other lists, or various objects, arrays, vectors or dataframes as its components. Each component is mapped to a unique index position in the R progra...
Print all possible permutations of an array with duplicates using Backtracking
20 Aug, 2021 Given an array nums[] of size N, the task is to print all possible distinct permutations of the array nums[] (including duplicates). Input: nums[] = { 1, 2, 2 }Output: 1 2 12 1 22 2 1 Input: nums[] = { 1, 1 }Output: 1 1 Approach : Follow the steps below to solve the problem Traverse the array.Generate perm...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Aug, 2021" }, { "code": null, "e": 185, "s": 52, "text": "Given an array nums[] of size N, the task is to print all possible distinct permutations of the array nums[] (including duplicates)." }, { "code": null, "e": 236,...
JavaScript Error message Property
19 May, 2022 Below is the example of the Error message property. Example: JavaScript <script> try { alert("A computer science portal"); } catch(err) { document.write(err.message); }</script> Output: allert is not defined In JavaScript error message property is used to set or return...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 May, 2022" }, { "code": null, "e": 80, "s": 28, "text": "Below is the example of the Error message property." }, { "code": null, "e": 90, "s": 80, "text": "Example: " }, { "code": null, "e": 101, "...
Select rows that contain specific text using Pandas
07 Apr, 2021 While preprocessing data using pandas dataframe there may be a need to find the rows that contain specific text. In this article we will discuss methods to find the rows that contain specific text in the columns or rows of a dataframe in pandas. Dataset in use: Using the contains() function of strings to f...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Apr, 2021" }, { "code": null, "e": 274, "s": 28, "text": "While preprocessing data using pandas dataframe there may be a need to find the rows that contain specific text. In this article we will discuss methods to find the rows that ...
WebAssembly - Working with C
In this chapter, we are going to compile a simple C program to javascript and execute the same in the browser. For Example − C Program #include<stdio.h> int square(int n) { return n*n; } We have done the installation of emsdk in folder wa/. In same folder, create another folder cprog/ and save above code as squar...
[ { "code": null, "e": 2478, "s": 2367, "text": "In this chapter, we are going to compile a simple C program to javascript and execute the same in the browser." }, { "code": null, "e": 2502, "s": 2478, "text": "For Example − C Program" }, { "code": null, "e": 2560, ...
Benefits of Double Division Operator over Single Division Operator in Python
24 Feb, 2020 The Double Division operator in Python returns the floor value for both integer and floating-point arguments after division. # A Python program to demonstrate use of # "//" for both integers and floating points print(5//2)print(-5//2)print(5.0//2) Output: 2 -3 2.0 The single division operator behaves abn...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Feb, 2020" }, { "code": null, "e": 177, "s": 52, "text": "The Double Division operator in Python returns the floor value for both integer and floating-point arguments after division." }, { "code": "# A Python program to demo...
URL Encoding/Decoding using Base64 in Java
30 Jul, 2019 Base 64 is an encoding scheme that converts binary data into text format so that encoded textual data can be easily transported over network un-corrupted and without any data loss.(Base 64 format reference). The URL encoding is the same as Basic encoding the only difference is that it encodes or decodes th...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jul, 2019" }, { "code": null, "e": 236, "s": 28, "text": "Base 64 is an encoding scheme that converts binary data into text format so that encoded textual data can be easily transported over network un-corrupted and without any data ...
Virtual Reality vs Augmented Reality: What’s the difference?
26 Aug, 2019 Reality is merely an illusion, albeit a very persistent one! Can you guess who said that? In case you thought Albert Einstein, you are absolutely correct! (And in case you didn’t, do brush up on your general knowledge!) Anyway, Albert Einstein was probably not thinking about the myriad ways that modern rea...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Aug, 2019" }, { "code": null, "e": 114, "s": 53, "text": "Reality is merely an illusion, albeit a very persistent one!" }, { "code": null, "e": 439, "s": 114, "text": "Can you guess who said that? In case you tho...
Finding the Odd Word amongst given words using Word2Vec embeddings
27 Jan, 2021 Odd One out the problem is one of the most interesting and goto problems when it comes to testing the logical reasoning skills of an individual. It is often used in many competitive exams and placement rounds as it checks the individual’s analytical skills and decision-making ability. In this article, we a...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2021" }, { "code": null, "e": 437, "s": 28, "text": "Odd One out the problem is one of the most interesting and goto problems when it comes to testing the logical reasoning skills of an individual. It is often used in many compe...
Python | Move element to end of the list
12 Mar, 2019 The manipulation of lists is quite common in day-day programming. One can come across various issues where one wishes to perform using just one-liners. One such problem can be of moving a list element to the rear ( end of list ). Let’s discuss certain ways in which this can be done. Method #1 : Using appen...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Mar, 2019" }, { "code": null, "e": 312, "s": 28, "text": "The manipulation of lists is quite common in day-day programming. One can come across various issues where one wishes to perform using just one-liners. One such problem can be...
How to create AGE Calculator Web App PyWebIO in Python ? - GeeksforGeeks
17 Jun, 2021 In this article, we are going to create an AGE Calculator that will show your age in years, months, and days with the help of the current date. We will use the PyWebIO module for creating a simple and interactive interface on the web. This is a python module mostly used to create simple and interactive int...
[ { "code": null, "e": 23927, "s": 23899, "text": "\n17 Jun, 2021" }, { "code": null, "e": 24324, "s": 23927, "text": "In this article, we are going to create an AGE Calculator that will show your age in years, months, and days with the help of the current date. We will use the PyW...
E-Mail Format - GeeksforGeeks
20 Oct, 2020 Electronic Mail (e-mail) is one of the most widely used services of the Internet. This service allows an Internet user to send a message in a formatted manner (mail) to other Internet users in any part of the world. Message in the mail not only contain text, but it also contains images, audio and videos da...
[ { "code": null, "e": 24982, "s": 24954, "text": "\n20 Oct, 2020" }, { "code": null, "e": 25433, "s": 24982, "text": "Electronic Mail (e-mail) is one of the most widely used services of the Internet. This service allows an Internet user to send a message in a formatted manner (mai...
C Program for Rabin-Karp Algorithm for Pattern Searching
Pattern matching in C − We have to find if a string is present in another string, as an example, the string "algorithm” is present within the string "naive algorithm". If it is found, then its location (i.e. position it is present at) is displayed. We tend to create a function that receives 2character arrays and return...
[ { "code": null, "e": 1439, "s": 1062, "text": "Pattern matching in C − We have to find if a string is present in another string, as an example, the string \"algorithm” is present within the string \"naive algorithm\". If it is found, then its location (i.e. position it is present at) is displayed. W...
IntStream toArray() in Java with Examples - GeeksforGeeks
06 Dec, 2018 IntStream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a result or a side-effect. After the terminal operation is performed, the stream pipeline is considered consumed, and can no longer be used. Syntax : int[] toAr...
[ { "code": null, "e": 23868, "s": 23840, "text": "\n06 Dec, 2018" }, { "code": null, "e": 24156, "s": 23868, "text": "IntStream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a result or a si...
Publishing a Docker Image on Dockerhub
Dockerhub or the official docker registry consists of numerous pre-built Docker Images as well as customized images by other users that you can pull to your system if they have been made public. In order to pull or push images to the docker registry, you need to first have an account in Dockerhub. To create an account ...
[ { "code": null, "e": 1361, "s": 1062, "text": "Dockerhub or the official docker registry consists of numerous pre-built Docker Images as well as customized images by other users that you can pull to your system if they have been made public. In order to pull or push images to the docker registry, yo...
How to pass a date variable in sql query in a JSP?
The <sql:dateParam> tag is used as a nested action for the <sql:query> and the <sql:update> tag to supply a date and time value for a value placeholder. If a null value is provided, the value is set to SQL NULL for the placeholder. The <sql:dateParam> tag has the following attributes − To start with basic concept, let ...
[ { "code": null, "e": 1294, "s": 1062, "text": "The <sql:dateParam> tag is used as a nested action for the <sql:query> and the <sql:update> tag to supply a date and time value for a value placeholder. If a null value is provided, the value is set to SQL NULL for the placeholder." }, { "code":...
fgetc() and fputc() in C
The function fgetc() is used to read the character from the file. It returns the character pointed by file pointer, if successful otherwise, returns EOF. Here is the syntax of fgetc() in C language, int fgetc(FILE *stream) Here is an example of fgetc() in C language, Let’s say we have “new.txt” file with the following ...
[ { "code": null, "e": 1216, "s": 1062, "text": "The function fgetc() is used to read the character from the file. It returns the character pointed by file pointer, if successful otherwise, returns EOF." }, { "code": null, "e": 1261, "s": 1216, "text": "Here is the syntax of fgetc(...
C Quiz - 101 | Question 5 - GeeksforGeeks
28 Jun, 2021 Consider the following variable declarations and definitions in C i) int var_9 = 1;ii) int 9_var = 2;iii) int _ = 3; Choose the correct statement w.r.t. above variables.(A) Both i) and iii) are valid.(B) Only i) is valid.(C) Both i) and ii) are valid.(D) All are valid.Answer: (A)Explanation: In C language,...
[ { "code": null, "e": 24540, "s": 24512, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24606, "s": 24540, "text": "Consider the following variable declarations and definitions in C" }, { "code": "i) int var_9 = 1;ii) int 9_var = 2;iii) int _ = 3;", "e": 24657, "...
Image Captioning using Python - GeeksforGeeks
17 Apr, 2019 Image captioning is a very classical and challenging problem coming to Deep Learning domain, in which we generate the textual description of image using its property, but we will not use Deep learning here. In this article, we will simply learn how can we simply caption the images using PIL. Preprocessing ...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n17 Apr, 2019" }, { "code": null, "e": 25848, "s": 25555, "text": "Image captioning is a very classical and challenging problem coming to Deep Learning domain, in which we generate the textual description of image using its proper...
Python | Check if a list exists in given list of lists - GeeksforGeeks
27 Mar, 2019 Given a list of lists, the task is to check if a list exists in given list of lists. Input : lst = [[1, 1, 1, 2], [2, 3, 4], [1, 2, 3], [4, 5, 6]] list_search = [4, 5, 6] Output: True Input : lst = [[5, 6, 7], [12, 54, 9], [1, 2, 3]] list_search = [4, 12, 54] Output: False Let’s discuss certain ways ...
[ { "code": null, "e": 24511, "s": 24483, "text": "\n27 Mar, 2019" }, { "code": null, "e": 24596, "s": 24511, "text": "Given a list of lists, the task is to check if a list exists in given list of lists." }, { "code": null, "e": 24791, "s": 24596, "text": "Input...
Portable Computer Vision: TensorFlow 2.0 on a Raspberry Pi | by Leigh Johnson | Towards Data Science
For roughly $100 USD, you can add deep learning to an embedded system or your next internet-of-things project. Are you just getting started with machine/deep learning, TensorFlow, or Raspberry Pi? Perfect, this blog series is for you! In this series, I will show you how to: Deploy a pre-trained image classification mod...
[ { "code": null, "e": 283, "s": 172, "text": "For roughly $100 USD, you can add deep learning to an embedded system or your next internet-of-things project." }, { "code": null, "e": 407, "s": 283, "text": "Are you just getting started with machine/deep learning, TensorFlow, or Ras...
Learning to be precise | Practice | GeeksforGeeks
There are times when your answer is a floating point that contains undesired amount of digits after decimal. Here, we'll learn how to get a precise answer out of a floating number. You are given two floating numbers a and b. You need to output a/b and decimal precision of a/b upto 3 places after the decimal point. Note...
[ { "code": null, "e": 594, "s": 278, "text": "There are times when your answer is a floating point that contains undesired amount of digits after decimal. Here, we'll learn how to get a precise answer out of a floating number. You are given two floating numbers a and b. You need to output a/b and dec...
How do I find the location of Python module sources?
For a pure python module you can find the location of the source files by looking at the module.__file__. For example, >>> import mymodule >>> mymodule.__file__ C:/Users/Ayush/mymodule.py Many built in modules, however,are written in C, and therefore module.__file__ points to a .so file (there is no module.__file__ ...
[ { "code": null, "e": 1181, "s": 1062, "text": "For a pure python module you can find the location of the source files by looking at the module.__file__. For example," }, { "code": null, "e": 1252, "s": 1181, "text": " >>> import mymodule\n>>> mymodule.__file__\nC:/Users/Ayush/mym...
How do we use a simple drop-down list of items in HTML forms?
With HTML, you can create a simple drop-down list of items to get user input in HTML forms. A select box also called drop-down box provides an option to list down various options in the form of drop-down list, from where a user can select one or more options. The <select> tag is used to create a drop-down list in HTML,...
[ { "code": null, "e": 1406, "s": 1062, "text": "With HTML, you can create a simple drop-down list of items to get user input in HTML forms. A select box also called drop-down box provides an option to list down various options in the form of drop-down list, from where a user can select one or more op...
Replace a letter with its alphabet position JavaScript
We are required to write a function that takes in a string, trims it off any whitespaces, converts it to lowercase and returns an array of numbers describing corresponding characters positions in the english alphabets, any whitespace or special character within the string should be ignored. For example − Input → ‘Hello...
[ { "code": null, "e": 1354, "s": 1062, "text": "We are required to write a function that takes in a string, trims it off any whitespaces, converts it\nto lowercase and returns an array of numbers describing corresponding characters positions in\nthe english alphabets, any whitespace or special charac...
Which MySQL datatype to used to store an IP address?
We can store an IP address with the help of INT unsigned. While using INSERT, include INET_ATON() and with SELECT, include INET_NTOA(). IP address is in dotted format. Let us see an example. Creating a table. mysql> create table IPV4AddressDemo -> ( -> `IPV4Address` INT UNSIGNED -> ); Query OK, 0 rows affected...
[ { "code": null, "e": 1230, "s": 1062, "text": "We can store an IP address with the help of INT unsigned. While using INSERT, include INET_ATON() and with SELECT, include INET_NTOA(). IP address is in dotted format." }, { "code": null, "e": 1253, "s": 1230, "text": "Let us see an ...
Building Convolutional Neural Network using NumPy from Scratch | by Ahmed Gad | Towards Data Science
Using already existing models in ML/DL libraries might be helpful in some cases. But to have better control and understanding, you should try to implement them yourself. This article shows how a CNN is implemented just using NumPy. Convolutional neural network (CNN) is the state-of-art technique for analyzing multidime...
[ { "code": null, "e": 279, "s": 47, "text": "Using already existing models in ML/DL libraries might be helpful in some cases. But to have better control and understanding, you should try to implement them yourself. This article shows how a CNN is implemented just using NumPy." }, { "code": nu...
Matplotlib.colors.BoundaryNorm class in Python - GeeksforGeeks
19 Oct, 2021 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. The matplotlib.colors.BoundaryNorm class belongs to the matplotlib.colors module. The matplotl...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n19 Oct, 2021" }, { "code": null, "e": 24114, "s": 23901, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays an...
Check whether triangle is valid or not if sides are given - GeeksforGeeks
19 Apr, 2022 Given three sides, check whether triangle is valid or not. Examples: Input : a = 7, b = 10, c = 5 Output : Valid Input : a = 1 b = 10 c = 12 Output : Invalid Approach: A triangle is valid if sum of its two sides is greater than the third side. If three sides are a, b and c, then three conditions sh...
[ { "code": null, "e": 24933, "s": 24905, "text": "\n19 Apr, 2022" }, { "code": null, "e": 25004, "s": 24933, "text": "Given three sides, check whether triangle is valid or not. Examples: " }, { "code": null, "e": 25097, "s": 25004, "text": "Input : a = 7, b =...
Probability in a Weighted Coin-flip Game using Python and Numpy | by Michael Salmon | Towards Data Science
A short, fun one for this week: Two players are playing a game where they flip a not necessarily fair coin, starting with Player 1. The first person to flip heads wins. The probability that a coin flipped lands on heads is p. What is the probability that Player 1 will win the game? We can explore this problem with a si...
[ { "code": null, "e": 204, "s": 172, "text": "A short, fun one for this week:" }, { "code": null, "e": 455, "s": 204, "text": "Two players are playing a game where they flip a not necessarily fair coin, starting with Player 1. The first person to flip heads wins. The probability t...
Conda: Essential Concepts and Tips | by Giacomo Vianello | Towards Data Science
In this blog post, I will describe what conda is, and how to use it effectively, whether it is the first time you look at it or you are a seasoned user. While in the latter case many things will be known to you, you will still find some tricks you could use to improve your experience. · Why conda· Entry-level examples·...
[ { "code": null, "e": 458, "s": 172, "text": "In this blog post, I will describe what conda is, and how to use it effectively, whether it is the first time you look at it or you are a seasoned user. While in the latter case many things will be known to you, you will still find some tricks you could u...
Product Segmentation for Retail with Python | by Samir Saci | Towards Data Science
Product segmentation refers to the activity of grouping products that have similar characteristics and serve a similar market. It is usually related to marketing (Sales Categories) or manufacturing (Production Processes). However, as a Logistics Manager, you rarely care about the product itself when managing goods flow...
[ { "code": null, "e": 394, "s": 172, "text": "Product segmentation refers to the activity of grouping products that have similar characteristics and serve a similar market. It is usually related to marketing (Sales Categories) or manufacturing (Production Processes)." }, { "code": null, "...
How to check if a given array represents a Binary Heap? - GeeksforGeeks
25 Mar, 2022 Given an array, how to check if the given array represents a Binary Max-Heap.Examples: Input: arr[] = {90, 15, 10, 7, 12, 2} Output: True The given array represents below tree 90 / \ 15 10 / \ / 7 12 2 The tree follows max-heap property as every node is greater than a...
[ { "code": null, "e": 24722, "s": 24694, "text": "\n25 Mar, 2022" }, { "code": null, "e": 24810, "s": 24722, "text": "Given an array, how to check if the given array represents a Binary Max-Heap.Examples: " }, { "code": null, "e": 25307, "s": 24810, "text": "In...
How to remove the row names or column names from a matrix in R?
To remove the row names or column names from a matrix, we just need to set them to NULL, in this way all the names will be nullified. For example, if we have a matrix M that contain row names and column names then we can remove those names by using the command colnames(M)<-NULL for columns and rownames(M)<-NULL for row...
[ { "code": null, "e": 1385, "s": 1062, "text": "To remove the row names or column names from a matrix, we just need to set them to NULL, in this way all the names will be nullified. For example, if we have a matrix M that contain row names and column names then we can remove those names by using the ...
Deploy a Machine Learning Model from a Jupyter Notebook | by Brandon Walker | Towards Data Science
To put it frankly, if you can’t get your machine learning models out of a notebook, it’s probably not going to get used. This article should help you create a deployment of your model as quickly as possible, so that you can infuse your models with business processes. This is an important skill to have since it means yo...
[ { "code": null, "e": 559, "s": 172, "text": "To put it frankly, if you can’t get your machine learning models out of a notebook, it’s probably not going to get used. This article should help you create a deployment of your model as quickly as possible, so that you can infuse your models with busines...
Python - find_element_by_id() method in Selenium - GeeksforGeeks
01 Jun, 2021 While performing any action on a web page using selenium, there is need of locators to perform specific tasks.Locators in web page are used to identify unique elements within a webpage. Web elements could be anything that the user sees on the page, such as title, table, links, buttons, toggle button, or an...
[ { "code": null, "e": 24720, "s": 24692, "text": "\n01 Jun, 2021" }, { "code": null, "e": 25237, "s": 24720, "text": "While performing any action on a web page using selenium, there is need of locators to perform specific tasks.Locators in web page are used to identify unique elem...
Th3Inspector - OSINT Tool for Reconnaissance - GeeksforGeeks
18 Jul, 2021 Th3 Inspector is an OSINT tool used for information gathering and reconnaissance which is available on Github. One can easily find a lot of information about the target, such as details about the server, whois info, target IP, mobile number, email, sub-domains, etc. Open your terminal and type the followin...
[ { "code": null, "e": 24040, "s": 24012, "text": "\n18 Jul, 2021" }, { "code": null, "e": 24307, "s": 24040, "text": "Th3 Inspector is an OSINT tool used for information gathering and reconnaissance which is available on Github. One can easily find a lot of information about the t...
Java How To Add Two Numbers
Learn how to add two numbers in Java: int x = 5; int y = 6; int sum = x + y; System.out.println(sum); // Print the sum of x + y Learn how to add two numbers with user input: import java.util.Scanner; // Import the Scanner class class MyClass { public static void main(String[] args) { int x, y, sum; Scanner m...
[ { "code": null, "e": 38, "s": 0, "text": "Learn how to add two numbers in Java:" }, { "code": null, "e": 128, "s": 38, "text": "int x = 5;\nint y = 6;\nint sum = x + y;\nSystem.out.println(sum); // Print the sum of x + y" }, { "code": null, "e": 174, "s": 128, ...
Cleaning Text Data with Python | Towards Data Science
The data format is not always on tabular format. As we are getting into the big data era, the data comes with a pretty diverse format, including images, texts, graphs, and many more. Because the format is pretty diverse, ranging from one data to another, it’s really essential to preprocess those data into a readable fo...
[ { "code": null, "e": 355, "s": 172, "text": "The data format is not always on tabular format. As we are getting into the big data era, the data comes with a pretty diverse format, including images, texts, graphs, and many more." }, { "code": null, "e": 511, "s": 355, "text": "Bec...
Most frequent element in an array in C++
We are given a array and we need to find the most frequent element from it. Let's see an example. Input arr = [1, 2, 3, 3, 2, 2, 1, 1, 2, 3, 4] Output 2 In the above array, 2 occurs 4 times which is most frequent than any other in the array. Initialise the array. Initialise the array. Initialise a map to store the freq...
[ { "code": null, "e": 1160, "s": 1062, "text": "We are given a array and we need to find the most frequent element from it. Let's see an example." }, { "code": null, "e": 1166, "s": 1160, "text": "Input" }, { "code": null, "e": 1206, "s": 1166, "text": "arr = [...
Speech Recognition with Tensorflow.js | by Benson Ruan | Towards Data Science
Voice Assistants like Amazon Alexa and Google Home have become widely popular, they allow users to quickly get things done by using speech recognition. Thanks to an improvement in speech recognition technology, Tensorflow.js released a JavaScript module that enables the recognition of spoken commands. In this article, ...
[ { "code": null, "e": 324, "s": 172, "text": "Voice Assistants like Amazon Alexa and Google Home have become widely popular, they allow users to quickly get things done by using speech recognition." }, { "code": null, "e": 475, "s": 324, "text": "Thanks to an improvement in speech...
Data Preprocessing with Python Pandas — Part 5 Binning | by Angelica Lo Duca | Towards Data Science
Data binning (or bucketing) groups data in bins (or buckets), in the sense that it replaces values contained into a small interval with a single representative value for that interval. Sometimes binning improves accuracy in predictive models. Data binning is a type of data preprocessing, a mechanism which includes also...
[ { "code": null, "e": 415, "s": 172, "text": "Data binning (or bucketing) groups data in bins (or buckets), in the sense that it replaces values contained into a small interval with a single representative value for that interval. Sometimes binning improves accuracy in predictive models." }, { ...