title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Python | Copy and Paste Images onto other Image using Pillow
18 Jan, 2022 In this article, we will learn how to copy an image over another image using pillow library. We will use image module from pillow and copy() and paste() methods to achieve this task. We will need to create copies of both images so that it does not affect the original image with the help of copy() method an...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2022" }, { "code": null, "e": 433, "s": 28, "text": "In this article, we will learn how to copy an image over another image using pillow library. We will use image module from pillow and copy() and paste() methods to achieve thi...
How to Find the Position of a Number in an Array in MATLAB?
04 Jul, 2021 Finding the position of a number in an array, which can be done using the find() function. The find() function is used to find the indices and values of the specified nonzero elements. find(X) Parameters: This function accepts a parameter. X: This is the specified number whose position is going to be found...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jul, 2021" }, { "code": null, "e": 213, "s": 28, "text": "Finding the position of a number in an array, which can be done using the find() function. The find() function is used to find the indices and values of the specified nonzero ...
Python – Lemmatization Approaches with Examples
11 Apr, 2022 The following is a step by step guide to exploring various kinds of Lemmatization approaches in python along with a few examples and code implementation. It is highly recommended that you stick to the given flow unless you have an understanding of the topic, in which case you can look up any of the approac...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Apr, 2022" }, { "code": null, "e": 353, "s": 28, "text": "The following is a step by step guide to exploring various kinds of Lemmatization approaches in python along with a few examples and code implementation. It is highly recommen...
Path of greater than equal to k length | Practice | GeeksforGeeks
Given a graph, a source vertex in the graph, and a number k, find if there is a simple path, of path length greater than or equal to k,(without any cycle) starting from a given source and ending at any other vertex. Source vertex should always be 0. Example 1: Input: V = 4 , E = 3 and K = 8 A[] = [0, 1, 5, 1, 2, 1, 2,...
[ { "code": null, "e": 477, "s": 226, "text": "Given a graph, a source vertex in the graph, and a number k, find if there is a simple path, of path length greater than or equal to k,(without any cycle) starting from a given source and ending at any other vertex.\nSource vertex should always be 0." ...
Flutter – Using Google fonts
21 Oct, 2020 Any UI developer that builds an application has to deal with fonts. Google Fonts provides a wide range of fonts that can be used to improve the fonts of the User Interface. Flutter provides a Google fonts package that can be used to implements various available fonts. Some fonts that are available for use ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Oct, 2020" }, { "code": null, "e": 386, "s": 28, "text": "Any UI developer that builds an application has to deal with fonts. Google Fonts provides a wide range of fonts that can be used to improve the fonts of the User Interface. Fl...
Linux Virtualization : Resource throttling using cgroups
05 Nov, 2021 In Linux Virtualization – Chroot Jail article, we discussed about kernel namespaces and process jailing. To understand this article, you may not need to read the earlier one, but I strongly suggest that you go through it once before diving into resource throttling. It should help tremendously in understand...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Nov, 2021" }, { "code": null, "e": 383, "s": 54, "text": "In Linux Virtualization – Chroot Jail article, we discussed about kernel namespaces and process jailing. To understand this article, you may not need to read the earlier one,...
Puppet - SSL Sign Certificate Setup
When the Puppet agent software runs for the first time on any Puppet node, it generates a certificate and sends the certificate signing request to the Puppet master. Before the Puppet server is able to communicate and control the agent nodes, it must sign that particular agent node’s certificate. In the following secti...
[ { "code": null, "e": 2562, "s": 2173, "text": "When the Puppet agent software runs for the first time on any Puppet node, it generates a certificate and sends the certificate signing request to the Puppet master. Before the Puppet server is able to communicate and control the agent nodes, it must si...
JavaScript Quicksort recursive
We are required to write a JavaScript function that takes in an array of Numbers. The function should apply the algorithm of quicksort to sort the array either in increasing or decreasing order. Quicksort follows the below steps − Step 1 − Make any element as the pivot (preferably first or last, but any element can be ...
[ { "code": null, "e": 1257, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of Numbers. The function should apply the algorithm of quicksort to sort the array either in increasing or decreasing order." }, { "code": null, "e": 1293, "s": 1257, ...
How to load an ImageView by URL on Android using Picasso?
This example demonstrates about how do I load an ImageView on Android using Picasso. 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 − Gradle Scripts from Project → Click build.gradle (Module: app) → add dependency − Implementation ...
[ { "code": null, "e": 1147, "s": 1062, "text": "This example demonstrates about how do I load an ImageView on Android using Picasso." }, { "code": null, "e": 1276, "s": 1147, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d...
Java Examples - Create a temporary File
How to create a temporary file ? This example shows how to create a temporary file using createTempFile() method of File class. import java.io.*; public class Main { public static void main(String[] args) throws Exception { File temp = File.createTempFile ("pattern", ".suffix"); temp.deleteOnExit(); ...
[ { "code": null, "e": 2101, "s": 2068, "text": "How to create a temporary file ?" }, { "code": null, "e": 2196, "s": 2101, "text": "This example shows how to create a temporary file using createTempFile() method of File class." }, { "code": null, "e": 2563, "s": 21...
Java program to implement linear search
Linear search is a very simple search algorithm. In this type of search, a sequential search is done for all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection. 1.Get the length of the array. 2.Get the...
[ { "code": null, "e": 1342, "s": 1062, "text": "Linear search is a very simple search algorithm. In this type of search, a sequential search is done for all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the e...
\widehat - Tex Command
\widehat - Used to create widehat symbol. { \widehat} \widehat command draws widehat symbol. \widehat a a^ \widehat A A^ \widehat AB A^B \widehat{AB} AB^ \widehat a a^ \widehat a \widehat A A^ \widehat A \widehat AB A^B \widehat AB \widehat{AB} AB^ \widehat{AB} 14 Lectures 52 mins ...
[ { "code": null, "e": 8028, "s": 7986, "text": "\\widehat - Used to create widehat symbol." }, { "code": null, "e": 8040, "s": 8028, "text": "{ \\widehat}" }, { "code": null, "e": 8079, "s": 8040, "text": "\\widehat command draws widehat symbol." }, { "...
DAX Date & Time - DATEDIFF function
Returns the count of interval boundaries crossed between two dates. DAX DATEDIFF function is new in Excel 2016. DATEDIFF (<start_date>, <end_date>, <interval>) start_date A scalar datetime value. end_date A scalar datetime value. interval The interval to use when comparing the dates. The value can be one of the follo...
[ { "code": null, "e": 2069, "s": 2001, "text": "Returns the count of interval boundaries crossed between two dates." }, { "code": null, "e": 2113, "s": 2069, "text": "DAX DATEDIFF function is new in Excel 2016." }, { "code": null, "e": 2163, "s": 2113, "text": ...
Check if a graph is strongly connected | Set 1 (Kosaraju using DFS) - GeeksforGeeks
18 Jan, 2022 Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if there is a path between any two pair of vertices. For example, following is a strongly connected graph. It is easy for undirected graph, we can just do a BFS and DFS starting from any...
[ { "code": null, "e": 25228, "s": 25200, "text": "\n18 Jan, 2022" }, { "code": null, "e": 25456, "s": 25228, "text": "Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if there is a path between any two pair of ...
Continuous Tree - GeeksforGeeks
06 Jul, 2021 A tree is a Continuous tree if in each root to leaf path, the absolute difference between keys of two adjacent is 1. We are given a binary tree, we need to check if the tree is continuous or not. Examples: Input : 3 / \ 2 4 / \ \ ...
[ { "code": null, "e": 35846, "s": 35818, "text": "\n06 Jul, 2021" }, { "code": null, "e": 36042, "s": 35846, "text": "A tree is a Continuous tree if in each root to leaf path, the absolute difference between keys of two adjacent is 1. We are given a binary tree, we need to check i...
Count pairs with given sum | Practice | GeeksforGeeks
Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K. Example 1: Input: N = 4, K = 6 arr[] = {1, 5, 7, 1} Output: 2 Explanation: arr[0] + arr[1] = 1 + 5 = 6 and arr[1] + arr[3] = 5 + 1 = 6. Example 2: Input: N = 4, K = 2 arr[] = {1, 1, 1, 1} Outp...
[ { "code": null, "e": 361, "s": 238, "text": "Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K." }, { "code": null, "e": 373, "s": 361, "text": "\nExample 1:" }, { "code": null, "e": 501, "s":...
Boyer Moore Algorithm for Pattern Searching - GeeksforGeeks
27 Jan, 2022 Pattern searching is an important problem in computer science. When we do search for a string in a notepad/word file, browser, or database, pattern searching algorithms are used to show the search results. A typical problem statement would be- Given a text txt[0..n-1] and a pattern pat[0..m-1] where n is t...
[ { "code": null, "e": 34594, "s": 34566, "text": "\n27 Jan, 2022" }, { "code": null, "e": 35092, "s": 34594, "text": "Pattern searching is an important problem in computer science. When we do search for a string in a notepad/word file, browser, or database, pattern searching algor...
Python - Sort by Uppercase Frequency - GeeksforGeeks
24 Oct, 2020 Given a list of strings, perform sorting by frequency of uppercase characters. Input : test_list = [“Gfg”, “is”, “FoR”, “GEEKS”] Output : [‘is’, ‘Gfg’, ‘FoR’, ‘GEEKS’] Explanation : 0, 1, 2, 5 uppercase letters in strings respectively. Input : test_list = [“is”, “GEEKS”] Output : [‘is’, ‘GEEKS’] Explanat...
[ { "code": null, "e": 24668, "s": 24640, "text": "\n24 Oct, 2020" }, { "code": null, "e": 24748, "s": 24668, "text": "Given a list of strings, perform sorting by frequency of uppercase characters. " }, { "code": null, "e": 24906, "s": 24748, "text": "Input : te...
How do we stash changes in Git?
This question can be rephrased as "How to save work in progress (WIP) in Git and return to it later when convenient?" The problem − When we switch branches, Git resets our working directory to contain the snapshot stored in the last commit of the target branch. For example, if we switch from feature to the master branc...
[ { "code": null, "e": 1180, "s": 1062, "text": "This question can be rephrased as \"How to save work in progress (WIP) in Git and return to it later when convenient?\"" }, { "code": null, "e": 1711, "s": 1180, "text": "The problem − When we switch branches, Git resets our working ...
A Practical Guide for Exploratory Data Analysis — Churn Dataset | by Soner Yıldırım | Towards Data Science
Exploratory data analysis (EDA) is an essential part of the data science or the machine learning pipeline. In order to create a robust and valuable product using the data, you need to explore the data, understand the relations among variables, and the underlying structure of the data. In this post, we will explore a cu...
[ { "code": null, "e": 457, "s": 171, "text": "Exploratory data analysis (EDA) is an essential part of the data science or the machine learning pipeline. In order to create a robust and valuable product using the data, you need to explore the data, understand the relations among variables, and the und...
Python OpenCV: Building Instagram-Like Image Filters | by Marius Borcan | Towards Data Science
OpenCV is a library built for solving a large number of computer vision tasks. It is packed with lots of basic and advanced features, very easy to pick up and available for several programming languages. In this article, we are going to apply some basic image transformation techniques in order to obtain image filters. ...
[ { "code": null, "e": 376, "s": 172, "text": "OpenCV is a library built for solving a large number of computer vision tasks. It is packed with lots of basic and advanced features, very easy to pick up and available for several programming languages." }, { "code": null, "e": 752, "s": ...
SCAN (Elevator) Disk Scheduling Algorithms - GeeksforGeeks
19 Aug, 2021 Prerequisite-Disk scheduling algorithms.Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations done to access all the requested tracks if SCAN disk scheduling algorithm is used. SCAN (Elevator) algorithm In SCAN disk scheduling algorithm, hea...
[ { "code": null, "e": 27809, "s": 27781, "text": "\n19 Aug, 2021" }, { "code": null, "e": 28052, "s": 27809, "text": "Prerequisite-Disk scheduling algorithms.Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations don...
Does MySQL support table inheritance?
MySQL uses foreign key constraint instead of inheritance. MySQL does not support table inheritance. You can achieve the same with the help of foreign key constraint. Let us create a table and use the foreign key constraint. The query to create the first table is as follows − mysql> create table Parent_Table -> ( ...
[ { "code": null, "e": 1162, "s": 1062, "text": "MySQL uses foreign key constraint instead of inheritance. MySQL does not support table inheritance." }, { "code": null, "e": 1338, "s": 1162, "text": "You can achieve the same with the help of foreign key constraint. Let us create a ...
Type Parameter Naming Conventions
By convention, type parameter names are named as single, uppercase letters so that a type parameter can be distinguished easily with an ordinary class or interface name. Following is the list of commonly used type parameter names − E − Element, and is mainly used by Java Collections framework. E − Element, and is mainl...
[ { "code": null, "e": 2872, "s": 2640, "text": "By convention, type parameter names are named as single, uppercase letters so that a type parameter can be distinguished easily with an ordinary class or interface name. Following is the list of commonly used type parameter names −" }, { "code":...
How to remove specific value from array using jQuery ? - GeeksforGeeks
24 Apr, 2020 Given an array elements and the task is to remove the specific value element from the array with the help of JQuery. There are two approaches that are discussed below: Approach 1: We can use the not() method which removes the element that we want. Later, use get() method to get the rest of the elements fro...
[ { "code": null, "e": 25296, "s": 25268, "text": "\n24 Apr, 2020" }, { "code": null, "e": 25464, "s": 25296, "text": "Given an array elements and the task is to remove the specific value element from the array with the help of JQuery. There are two approaches that are discussed be...
Count of index pairs with equal elements in an array - GeeksforGeeks
15 Sep, 2021 Given an array of n elements. The task is to count the total number of indices (i, j) such that arr[i] = arr[j] and i < jExamples : Input : arr[] = {1, 1, 2} Output : 1 As arr[0] = arr[1], the pair of indices is (0, 1) Input : arr[] = {1, 1, 1} Output : 3 As arr[0] = arr[1], the pair of indices is (0, 1...
[ { "code": null, "e": 26465, "s": 26437, "text": "\n15 Sep, 2021" }, { "code": null, "e": 26599, "s": 26465, "text": "Given an array of n elements. The task is to count the total number of indices (i, j) such that arr[i] = arr[j] and i < jExamples : " }, { "code": null, ...
ArrayStoreException in Java - GeeksforGeeks
10 Oct, 2018 ArrayStoreException in Java occurs whenever an attempt is made to store the wrong type of object into an array of objects. The ArrayStoreException is a class which extends RuntimeException, which means that it is an exception thrown at the runtime. Class Hierarchy: java.lang.Object ↳ java.lang.Throwable ...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n10 Oct, 2018" }, { "code": null, "e": 25596, "s": 25347, "text": "ArrayStoreException in Java occurs whenever an attempt is made to store the wrong type of object into an array of objects. The ArrayStoreException is a class which...
Android TableLayout in Kotlin - GeeksforGeeks
21 Feb, 2022 Android TableLayout is a ViewGroup subclass which is used to display the child View elements in rows and columns. It will arrange all the children elements into rows and columns and does not display any border lines in between rows, columns or cells. The working of TableLayout is almost similar to HTML tab...
[ { "code": null, "e": 25297, "s": 25269, "text": "\n21 Feb, 2022" }, { "code": null, "e": 25548, "s": 25297, "text": "Android TableLayout is a ViewGroup subclass which is used to display the child View elements in rows and columns. It will arrange all the children elements into ro...
Google Cloud Platform - Introduction to PhoneInfoga an OSINT Reconnaissance Tool - GeeksforGeeks
27 May, 2021 PhoneInfoga is one of the most advanced tools which one can use to scan phone numbers and get detailed information about them using only free resources. The motive is to gather basic information such as country, area, line, and carrier on any international phone numbers with very good accuracy. Then try to...
[ { "code": null, "e": 26417, "s": 26389, "text": "\n27 May, 2021" }, { "code": null, "e": 26826, "s": 26417, "text": "PhoneInfoga is one of the most advanced tools which one can use to scan phone numbers and get detailed information about them using only free resources. The motive...
Explain how to define a variable in SASS - GeeksforGeeks
09 Nov, 2021 SASS is a short form of Syntactically Awesome Style Sheet which is an extension to Cascading StyleSheet (CSS). It is a preprocessor of CSS. It is compiled to CSS & is fully compatible with every version of CSS. Sass reduces the repetition of CSS and hence saves time. It allows using the variables, nested r...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n09 Nov, 2021" }, { "code": null, "e": 26025, "s": 25376, "text": "SASS is a short form of Syntactically Awesome Style Sheet which is an extension to Cascading StyleSheet (CSS). It is a preprocessor of CSS. It is compiled to CSS &...
Run Animation backward first and then forwards with CSS
Use the animation-direction property to run animation in first backward and then forward. The property is used with the alternate-reverse animation value to achieve this. Live Demo <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: re...
[ { "code": null, "e": 1233, "s": 1062, "text": "Use the animation-direction property to run animation in first backward and then forward. The property is used with the alternate-reverse animation value to achieve this." }, { "code": null, "e": 1243, "s": 1233, "text": "Live Demo" ...
Can we return Result sets in JDBC?
Yes, just like any other objects in Java we can pass a ResultSet object as a parameter to a method and, return it from a method. Let us create a table with name MyPlayers in MySQL database using CREATE statement as shown below − CREATE TABLE MyPlayers( ID INT, First_Name VARCHAR(255), Last_Name VARCHAR(255), ...
[ { "code": null, "e": 1191, "s": 1062, "text": "Yes, just like any other objects in Java we can pass a ResultSet object as a parameter to a method and, return it from a method." }, { "code": null, "e": 1291, "s": 1191, "text": "Let us create a table with name MyPlayers in MySQL da...
How to convert Long array list to long array in Java?
Firstly, declare a Long array list and add some elements to it: ArrayList < Long > arrList = new ArrayList < Long > (); arrList.add(100000 L); arrList.add(200000 L); arrList.add(300000 L); arrList.add(400000 L); arrList.add(500000 L); Now, set the same size for the newly created long array: final long[] arr = new long[...
[ { "code": null, "e": 1126, "s": 1062, "text": "Firstly, declare a Long array list and add some elements to it:" }, { "code": null, "e": 1297, "s": 1126, "text": "ArrayList < Long > arrList = new ArrayList < Long > ();\narrList.add(100000 L);\narrList.add(200000 L);\narrList.add(3...
Python Number seed() Method
Python number method seed() sets the integer starting value used in generating random numbers. Call this function before calling any other random module function. Following is the syntax for seed() method − seed ( [x] ) Note − This function is not accessible directly, so we need to import the random module and then we...
[ { "code": null, "e": 2407, "s": 2244, "text": "Python number method seed() sets the integer starting value used in generating random numbers. Call this function before calling any other random module function." }, { "code": null, "e": 2451, "s": 2407, "text": "Following is the sy...
How to assign a column value in a data frame based on another column in another R data frame?
To assign a column value based on another column, we can use ifelse function. The ifelse function checks whether the value in one column of one data frame matches the value in another column of another data frame by using equal sign (==) and then replace the original value with the new column if there is no match else ...
[ { "code": null, "e": 1472, "s": 1062, "text": "To assign a column value based on another column, we can use ifelse function. The ifelse function checks whether the value in one column of one data frame matches the value in another column of another data frame by using equal sign (==) and then replac...
Building Kriging Models in R. Utilizing Spatial Statistics Algorithms... | by Aisha Sikder, PhD | Towards Data Science
In our world today, we have access to enormous amounts of geo-tagged data. Instead of letting it sit in a database or text file, we have the ability to utilize that information in various ways enabling us to create new information for better decision making. One of the benefits to spatial statistics models is being abl...
[ { "code": null, "e": 430, "s": 171, "text": "In our world today, we have access to enormous amounts of geo-tagged data. Instead of letting it sit in a database or text file, we have the ability to utilize that information in various ways enabling us to create new information for better decision maki...
Binary Tree to BST | Practice | GeeksforGeeks
Given a Binary Tree, convert it to Binary Search Tree in such a way that keeps the original structure of Binary Tree intact. Example 1: Input: 1 / \ 2 3 Output: 1 2 3 Example 2: Input: 1 / \ 2 3 / 4 Output: 1 2 3 4 Explanation: The converted BST w...
[ { "code": null, "e": 353, "s": 226, "text": "Given a Binary Tree, convert it to Binary Search Tree in such a way that keeps the original structure of Binary Tree intact.\n " }, { "code": null, "e": 364, "s": 353, "text": "Example 1:" }, { "code": null, "e": 415, "...
Remove duplicate rows based on multiple columns using Dplyr in R - GeeksforGeeks
28 Jul, 2021 In this article, we will learn how to remove duplicate rows based on multiple columns using dplyr in R programming language. Dataframe in use: lang value usage 1 Java 21 21 2 C 21 21 3 Python 3 0 4 GO 5 99 5 RUST 180 44 6 Ja...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n28 Jul, 2021" }, { "code": null, "e": 24976, "s": 24851, "text": "In this article, we will learn how to remove duplicate rows based on multiple columns using dplyr in R programming language." }, { "code": null, "e": 2...
while loop in C
A while loop in C programming repeatedly executes a target statement as long as a given condition is true. The syntax of a while loop in C programming language is − while(condition) { statement(s); } Here, statement(s) may be a single statement or a block of statements. The condition may be any expression, and true...
[ { "code": null, "e": 2191, "s": 2084, "text": "A while loop in C programming repeatedly executes a target statement as long as a given condition is true." }, { "code": null, "e": 2249, "s": 2191, "text": "The syntax of a while loop in C programming language is −" }, { "co...
Java Program to add Period to LocalDate
Let us first set a Period with month and days: Period p = Period.ofMonths(5).plusDays(15); Now set the LocalDate: LocalDate date = LocalDate.of(2019, 4, 10); Add period to LocalDate: LocalDate res = date.plus(p); import java.time.LocalDate; import java.time.Period; public class Demo { public static void main(String[...
[ { "code": null, "e": 1109, "s": 1062, "text": "Let us first set a Period with month and days:" }, { "code": null, "e": 1153, "s": 1109, "text": "Period p = Period.ofMonths(5).plusDays(15);" }, { "code": null, "e": 1176, "s": 1153, "text": "Now set the LocalDat...
How do I replace “+”(plus sign) with SPACE in MySQL?
To replace, use REPLACE() function from MySQL. Let us first create a table − mysql> create table DemoTable ( Number varchar(100) ); Query OK, 0 rows affected (0.86 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values('+916578675547'); Query OK, 1 row affected (0.17 sec) my...
[ { "code": null, "e": 1139, "s": 1062, "text": "To replace, use REPLACE() function from MySQL. Let us first create a table −" }, { "code": null, "e": 1234, "s": 1139, "text": "mysql> create table DemoTable\n(\n Number varchar(100)\n);\nQuery OK, 0 rows affected (0.86 sec)" }, ...
LocalDate ofInstant() method in Java with Examples - GeeksforGeeks
17 May, 2020 The ofInstant(Instant instant, ZoneId zone) method of LocalDate class in Java is used to create an instance of LocalDate from an Instant and zone ID. These two parameters are passed to the method and on the basis of those, an instance of LocalDate is created. The calculation of the LocalDate follows the fo...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n17 May, 2020" }, { "code": null, "e": 23878, "s": 23557, "text": "The ofInstant(Instant instant, ZoneId zone) method of LocalDate class in Java is used to create an instance of LocalDate from an Instant and zone ID. These two par...
How to use threading in PyQt5?
24 Feb, 2021 Prerequisite: PyQt5 and multithreading Multithreading refers to concurrently executing multiple threads by rapidly switching the control of the CPU between threads (called context switching). The Python Global Interpreter Lock limits one thread to run at a time even if the machine contains multiple process...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Feb, 2021" }, { "code": null, "e": 67, "s": 28, "text": "Prerequisite: PyQt5 and multithreading" }, { "code": null, "e": 341, "s": 67, "text": "Multithreading refers to concurrently executing multiple threads by r...
Destructors in Python
21 Jan, 2022 Constructors in PythonDestructors are called when an object gets destroyed. In Python, destructors are not needed as much as in C++ because Python has a garbage collector that handles memory management automatically. The __del__() method is a known as a destructor method in Python. It is called when all re...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jan, 2022" }, { "code": null, "e": 478, "s": 52, "text": "Constructors in PythonDestructors are called when an object gets destroyed. In Python, destructors are not needed as much as in C++ because Python has a garbage collector tha...
Output of C++ programs | Set 50
07 Jul, 2021 Question 1: CPP #include <cstdlib>#include <iostream>using namespace std;int main(){ int ran = rand(); cout << ran << endl; return 0;} Output: 1804289383 Explanation: As the declared number is an integer, It will produce the random number from 0 to RAND_MAX. The value of RAND_MAX is library-de...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2021" }, { "code": null, "e": 66, "s": 52, "text": "Question 1: " }, { "code": null, "e": 70, "s": 66, "text": "CPP" }, { "code": "#include <cstdlib>#include <iostream>using namespace std;int main()...
Inline function in C
03 Dec, 2018 Inline Function are those function whose definitions are small and be substituted at the place where its function call is happened. Function substitution is totally compiler choice. Let’s take below example: #include <stdio.h> // Inline function in Cinline int foo(){ return 2;} // Driver codeint main(...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 Dec, 2018" }, { "code": null, "e": 236, "s": 54, "text": "Inline Function are those function whose definitions are small and be substituted at the place where its function call is happened. Function substitution is totally compiler ...
Understanding storage of static methods and static variables in Java
23 Mar, 2022 In every programming language, memory is a vital resource and is also scarce in nature. Hence it’s essential that the memory is managed thoroughly without any leaks. Allocation and deallocation of memory is a critical task and requires a lot of care and consideration. In this article, we will understand th...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Mar, 2022" }, { "code": null, "e": 616, "s": 52, "text": "In every programming language, memory is a vital resource and is also scarce in nature. Hence it’s essential that the memory is managed thoroughly without any leaks. Allocati...
Tensorflow tf.sub() Function
07 Jun, 2022 The tf.sub() function returns the subtraction of two tf.Tensor objects element wise. The tf.Tensor object represents the multidimensional array of numbers. Syntax: tf.sub( a, b ) Parameters: a: It contains the first tf.Tensor object. The value of this parameter can be tf.TensorTypedArray|Array. b: It conta...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 184, "s": 28, "text": "The tf.sub() function returns the subtraction of two tf.Tensor objects element wise. The tf.Tensor object represents the multidimensional array of numbers." }, { "code...
Python Dictionary pop() method
01 Jul, 2022 Python dictionary pop() method removes and returns the specified element from the dictionary. Syntax : dict.pop(key, def) Parameters : key : The key whose key-value pair has to be returned and removed. def : The default value to return if specified key is not present. Returns : Value associated to deleted...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jul, 2022" }, { "code": null, "e": 147, "s": 53, "text": "Python dictionary pop() method removes and returns the specified element from the dictionary." }, { "code": null, "e": 175, "s": 147, "text": "Syntax : di...
Zoho Software Developer Interview Experience
11 Dec, 2019 I was interviewed in Zoho’s Chennai office in November 2019. The whole process took two weeks. Round 1: First round was a written round of 20 questions for 75 minutes. 10 questions from C and 10 based on aptitude. The C questions tested your knowledge on basic C concepts like functions, recursion, string ...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Dec, 2019" }, { "code": null, "e": 149, "s": 54, "text": "I was interviewed in Zoho’s Chennai office in November 2019. The whole process took two weeks." }, { "code": null, "e": 592, "s": 149, "text": "Round 1: F...
Check if all bits of a number are set
22 Jun, 2022 Given a number n. The problem is to check whether every bit in the binary representation of the given number is set or not. Here 0 <= n.Examples : Input : 7 Output : Yes (7)10 = (111)2 Input : 14 Output : No Method 1: If n = 0, then answer is ‘No’. Else perform the two operations until n becomes 0. Whil...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 200, "s": 52, "text": "Given a number n. The problem is to check whether every bit in the binary representation of the given number is set or not. Here 0 <= n.Examples : " }, { "code": null...
Input and Output
07 Jun, 2022 Let us discuss what is Console in Python. Console (also called Shell) is basically a command-line interpreter that takes input from the user i.e one command at a time and interprets it. If it is error-free then it runs the command and gives the required output otherwise shows the error message. A Python Co...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Jun, 2022" }, { "code": null, "e": 383, "s": 53, "text": "Let us discuss what is Console in Python. Console (also called Shell) is basically a command-line interpreter that takes input from the user i.e one command at a time and int...
Python – Get number of characters, words, spaces and lines in a file
29 Dec, 2020 Prerequisite: File Handling in Python Given a text file fname, the task is to count the total number of characters, words, spaces and lines in the file. As we know, Python provides multiple in-built features and modules for handling files. Let’s discuss different ways to calculate total number of character...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Dec, 2020" }, { "code": null, "e": 91, "s": 53, "text": "Prerequisite: File Handling in Python" }, { "code": null, "e": 206, "s": 91, "text": "Given a text file fname, the task is to count the total number of cha...
Infix to Postfix using different Precedence Values for In-Stack and Out-Stack
19 Mar, 2022 Conversion of infix to postfix expression can be done elegantly using two precedence function. Each operator is assigned a value (larger value means higher precedence) which depends upon whether the operator is inside or outside the stack. Also the right and left associativity for different operators can b...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Mar, 2022" }, { "code": null, "e": 501, "s": 52, "text": "Conversion of infix to postfix expression can be done elegantly using two precedence function. Each operator is assigned a value (larger value means higher precedence) which ...
GWT - Label Widget
The Label can contains only arbitrary text and it can not be interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout. Following is the declaration for com.google.gwt.user.client.ui.Label class − public class Label extends Widget implements HasHorizontalAlignment, H...
[ { "code": null, "e": 2185, "s": 2023, "text": "The Label can contains only arbitrary text and it can not be interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout." }, { "code": null, "e": 2262, "s": 2185, "text": "Following is the dec...
Building UI Using Jetpack Compose in Android - GeeksforGeeks
15 Nov, 2021 Jetpack Compose is a modern UI toolkit that is designed to simplify UI development in Android. It consists of a reactive programming model with conciseness and ease of Kotlin programming language. It is fully declarative so that you can describe your UI by calling some series of functions that will transfo...
[ { "code": null, "e": 26421, "s": 26393, "text": "\n15 Nov, 2021" }, { "code": null, "e": 26885, "s": 26421, "text": "Jetpack Compose is a modern UI toolkit that is designed to simplify UI development in Android. It consists of a reactive programming model with conciseness and eas...
How to prevent MongoDB from returning the object ID while finding a document?
To prevent MongoDB from returning the Object ID while finding a document, you need to set _id to 0. Let us first create a collection with documents > db.preventObjectIdDemo.insertOne( ... { ... ... "StudentName" : "Chris", ... "StudentDetails" : [ ... { ... "StudentTotalScore" : 540,...
[ { "code": null, "e": 1210, "s": 1062, "text": "To prevent MongoDB from returning the Object ID while finding a document, you need to set _id\nto 0. Let us first create a collection with documents" }, { "code": null, "e": 1667, "s": 1210, "text": "> db.preventObjectIdDemo.insertOn...
TensorFlow - TensorBoard Visualization
TensorFlow includes a visualization tool, which is called the TensorBoard. It is used for analyzing Data Flow Graph and also used to understand machine-learning models. The important feature of TensorBoard includes a view of different types of statistics about the parameters and details of any graph in vertical alignme...
[ { "code": null, "e": 2639, "s": 2315, "text": "TensorFlow includes a visualization tool, which is called the TensorBoard. It is used for analyzing Data Flow Graph and also used to understand machine-learning models. The important feature of TensorBoard includes a view of different types of statistic...
Pascal - Packed Array
These arrays are bit-packed, i.e., each character or truth values are stored in consecutive bytes instead of using one storage unit, usually a word (4 bytes or more). Normally, characters and Boolean values are stored in such a way that each character or truth value uses one storage unit like a word. This is called unp...
[ { "code": null, "e": 2250, "s": 2083, "text": "These arrays are bit-packed, i.e., each character or truth values are stored in consecutive bytes instead of using one storage unit, usually a word (4 bytes or more)." }, { "code": null, "e": 2606, "s": 2250, "text": "Normally, chara...
Building a Soft Decision Tree in TensorFlow | by Benoit Descamps | Towards Data Science
Deep learning products have grown in interests within the industry. While being computationally expensive, they have proven efficient in tackling classification of unstructured data such as in natural language or image processing. The goal of a high-value data science product lies not only within its high-value deliver...
[ { "code": null, "e": 402, "s": 171, "text": "Deep learning products have grown in interests within the industry. While being computationally expensive, they have proven efficient in tackling classification of unstructured data such as in natural language or image processing." }, { "code": nu...
How to align the bars of a barplot with the X-axis using ggplot2 in R?
The bar plot is created with geom_bar function but there always exist some space between the bars and the X-axis labels. If we want to reduce that space or completely remove it we need to use scale_y_continuous function by defining expand argument for former and scale_y_continuous(expand=c(0,0)) for latter. Live Demo ...
[ { "code": null, "e": 1371, "s": 1062, "text": "The bar plot is created with geom_bar function but there always exist some space between the bars and the X-axis labels. If we want to reduce that space or completely remove it we need to use scale_y_continuous function by defining expand argument for f...
How to set random background for Recyclerview in Android?
Before getting into set random background color for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items. This example demonstrates How t...
[ { "code": null, "e": 1351, "s": 1062, "text": "Before getting into set random background color for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view w...
Heap overflow and Stack overflow in C
Heap is used to store dynamic variables. It is a region of process’s memory. malloc(), calloc(), resize() all these inbuilt functions are generally used to store dynamic variables. Heap overflow occurs when − A) If we allocate dynamic large number of variables − int main() { float *ptr = (int *)malloc(sizeof(float)*...
[ { "code": null, "e": 1243, "s": 1062, "text": "Heap is used to store dynamic variables. It is a region of process’s memory. malloc(), calloc(), resize() all these inbuilt functions are generally used to store dynamic variables." }, { "code": null, "e": 1271, "s": 1243, "text": "H...
GATE-CS-2009 - GeeksforGeeks
22 Nov, 2021 What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n >= 2. n-1 3 2 n The chromatic number of a graph is the smallest number of colours needed to colour the vertices of so that no two adjacent vertices share the same colour. These type...
[ { "code": null, "e": 28855, "s": 28827, "text": "\n22 Nov, 2021" }, { "code": null, "e": 28983, "s": 28855, "text": "What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n >= 2. " }, { "code": null, "e"...
C# | Uri.IsWellFormedOriginalString() Method - GeeksforGeeks
30 Apr, 2019 Uri.IsWellFormedOriginalString() Method is used to show whether the string used to construct this Uri was well-formed and is not required to be further escaped. Syntax: public bool IsWellFormedOriginalString (); Return Value: This method returns true if the string was well-formed otherwise, false. Below pr...
[ { "code": null, "e": 25657, "s": 25629, "text": "\n30 Apr, 2019" }, { "code": null, "e": 25818, "s": 25657, "text": "Uri.IsWellFormedOriginalString() Method is used to show whether the string used to construct this Uri was well-formed and is not required to be further escaped." ...
Rust vs Dart – Which is More Likely to Replace C++?
15 Feb, 2021 Dennis M Ritchie developed C in the year 1972 as a successor of the B language. And it is widely used in the system as well as application programming. Its popularity has grown tremendously these years and now an object-oriented language derivative from C called C++ is becoming mature and stable programmin...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Feb, 2021" }, { "code": null, "e": 347, "s": 28, "text": "Dennis M Ritchie developed C in the year 1972 as a successor of the B language. And it is widely used in the system as well as application programming. Its popularity has grow...
Django Sign Up and login with confirmation Email | Python
25 May, 2022 Django by default provides an authentication system configuration. User objects are the core of the authentication system.today we will implement Django’s authentication system. Modules required : django : django install crispy_forms : pip install --upgrade django-crispy-forms Basic setup :Start a projec...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 May, 2022" }, { "code": null, "e": 231, "s": 52, "text": "Django by default provides an authentication system configuration. User objects are the core of the authentication system.today we will implement Django’s authentication syst...
Python infinity
10 Sep, 2021 As ironic as it may seem infinity is defined as an undefined number that can either be a positive or negative value. All arithmetic operations performed on an infinite value always lead to an infinite number, say it be sum, subtraction, multiplication, or any other operation.In the world of computer scienc...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Sep, 2021" }, { "code": null, "e": 492, "s": 52, "text": "As ironic as it may seem infinity is defined as an undefined number that can either be a positive or negative value. All arithmetic operations performed on an infinite value ...
Find index of closing bracket for a given opening bracket in an expression
10 Jan, 2019 Given a string with brackets. If the start index of the open bracket is given, find the index of the closing bracket. Examples: Input : string = [ABC[23]][89] index = 0 Output : 8 The opening bracket at index 0 corresponds to closing bracket at index 8. The idea is to use Stack data structure. We ...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jan, 2019" }, { "code": null, "e": 170, "s": 52, "text": "Given a string with brackets. If the start index of the open bracket is given, find the index of the closing bracket." }, { "code": null, "e": 180, "s": 170, ...
How to play an Audio file using Java
03 Jul, 2022 In this article we will see, how can we play an audio file in pure java, here pure means, we are not going to use any external library. You can create your own music player by the help of this article. Java inbuilt libraries support only AIFC, AIFF, AU, SND and WAVE formats.There are 2 different interfaces...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jul, 2022" }, { "code": null, "e": 561, "s": 52, "text": "In this article we will see, how can we play an audio file in pure java, here pure means, we are not going to use any external library. You can create your own music player b...
D3.js group() Method
23 Sep, 2020 With the help of d3.group() method, we can group the iterable data structure into a map where the key is defined as the element from iterable and values as an array. Syntax: d3.group( iterable, ...keys ) Return value: It returns the map having key as element and value as an array. Note: To execute the belo...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2020" }, { "code": null, "e": 194, "s": 28, "text": "With the help of d3.group() method, we can group the iterable data structure into a map where the key is defined as the element from iterable and values as an array." }, {...
PostgreSQL – Backup Database
16 Jun, 2022 All commercial firms and corporations are never 100% free of data threats. Being wary of scenarios like data corruption, host or network failures or even deliberate storage facility destruction is extremely important. Therefore, backing up data is a critical activity that every firm depends on to ensure it...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Jun, 2022" }, { "code": null, "e": 509, "s": 28, "text": "All commercial firms and corporations are never 100% free of data threats. Being wary of scenarios like data corruption, host or network failures or even deliberate storage fa...
replace() in Python to replace a substring
23 Nov, 2020 Given a string str that may contain one more occurrences of “AB”. Replace all occurrences of “AB” with “C” in str. Examples: Input : str = "helloABworld" Output : str = "helloCworld" Input : str = "fghABsdfABysu" Output : str = "fghCsdfCysu" This problem has existing solution please refer Replace all o...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Nov, 2020" }, { "code": null, "e": 168, "s": 53, "text": "Given a string str that may contain one more occurrences of “AB”. Replace all occurrences of “AB” with “C” in str." }, { "code": null, "e": 178, "s": 168, ...
D3.JS (Data Driven Documents) - GeeksforGeeks
15 Jan, 2019 Introduction: The D3 is an abbreviation of Data Driven Documents, and D3.js is a resource JavaScript library for managing documents based on data. D3 is one of the most effective framework to work on data visualization. It allows the developer to create dynamic, interactive data visualizations in the brows...
[ { "code": null, "e": 24628, "s": 24600, "text": "\n15 Jan, 2019" }, { "code": null, "e": 25854, "s": 24628, "text": "Introduction: The D3 is an abbreviation of Data Driven Documents, and D3.js is a resource JavaScript library for managing documents based on data. D3 is one of the...
Consensus Theorem in Digital Logic - GeeksforGeeks
13 Dec, 2019 Prerequisite – Properties of Boolean algebra, Minimization of Boolean Functions Redundancy theorem is used as a Boolean algebra trick in Digital Electronics. It is also known as Consensus Theorem: AB + A'C + BC = AB + A'C The consensus or resolvent of the terms AB and A’C is BC. It is the conjunction of ...
[ { "code": null, "e": 26836, "s": 26808, "text": "\n13 Dec, 2019" }, { "code": null, "e": 26916, "s": 26836, "text": "Prerequisite – Properties of Boolean algebra, Minimization of Boolean Functions" }, { "code": null, "e": 27033, "s": 26916, "text": "Redundancy...
C library function - strxfrm()
The C library function size_t strxfrm(char *dest, const char *src, size_t n) transforms the first n characters of the string src into current locale and place them in the string dest. Following is the declaration for strxfrm() function. size_t strxfrm(char *dest, const char *src, size_t n) dest − This is the pointer to...
[ { "code": null, "e": 2191, "s": 2007, "text": "The C library function size_t strxfrm(char *dest, const char *src, size_t n) transforms the first n characters of the string src into current locale and place them in the string dest." }, { "code": null, "e": 2244, "s": 2191, "text":...
Introduction to Regression in Python with PyCaret | by Moez Ali | Towards Data Science
PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. It is an end-to-end machine learning and model management tool that speeds up the experiment cycle exponentially and makes you more productive. In comparison with the other open-source machine learning libr...
[ { "code": null, "e": 305, "s": 47, "text": "PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. It is an end-to-end machine learning and model management tool that speeds up the experiment cycle exponentially and makes you more productive...
How to measure similarity between two correlation matrices | by Jin Hyun Cheong, PhD | Towards Data Science
Comparing the similarity between matrices can offer a way to assess the structural relationships among variables and is commonly used across disciplines such as neuroscience, epidemiology, and ecology. Let’s assume you have data on how people react when watching a short Youtube video. This could be measured by facial e...
[ { "code": null, "e": 374, "s": 172, "text": "Comparing the similarity between matrices can offer a way to assess the structural relationships among variables and is commonly used across disciplines such as neuroscience, epidemiology, and ecology." }, { "code": null, "e": 774, "s": 37...
Java Math asin() method with Example - GeeksforGeeks
06 Apr, 2018 The java.lang.Math.asin() returns the arc sine of an angle in between -pi/2 and pi/2. Arc sine is also called as an inverse of a sine. If the argument is NaN or its absolute value is greater than 1, then the result is NaN. If the argument is zero, then the result is a zero with the same sign as the argumen...
[ { "code": null, "e": 25897, "s": 25869, "text": "\n06 Apr, 2018" }, { "code": null, "e": 26032, "s": 25897, "text": "The java.lang.Math.asin() returns the arc sine of an angle in between -pi/2 and pi/2. Arc sine is also called as an inverse of a sine." }, { "code": null, ...
BigInteger Multiply | Practice | GeeksforGeeks
Given two BigIntegers X and Y. You have to multiply X and Y. Example 1: Input: X = 3, Y = 4 Output: 12 Explanation: Multiplication of X and Y is 12 Example 2: Input: X = 8, Y = 2 Output: 16 Explanation: Multiplication of X and Y is 16. Your Task: Your task is to complete the function mul() which accepts x and y...
[ { "code": null, "e": 287, "s": 226, "text": "Given two BigIntegers X and Y. You have to multiply X and Y." }, { "code": null, "e": 300, "s": 289, "text": "Example 1:" }, { "code": null, "e": 377, "s": 300, "text": "Input:\nX = 3, Y = 4\nOutput:\n12\nExplanatio...
Count Inversions of size three in a given array - GeeksforGeeks
20 Jan, 2022 Given an array arr[] of size n. Three elements arr[i], arr[j] and arr[k] form an inversion of size 3 if a[i] > a[j] >a[k] and i < j < k. Find total number of inversions of size 3.Example : Input: {8, 4, 2, 1} Output: 4 The four inversions are (8,4,2), (8,4,1), (4,2,1) and (8,2,1). Input: {9, 6, 4, 5, ...
[ { "code": null, "e": 24328, "s": 24300, "text": "\n20 Jan, 2022" }, { "code": null, "e": 24519, "s": 24328, "text": "Given an array arr[] of size n. Three elements arr[i], arr[j] and arr[k] form an inversion of size 3 if a[i] > a[j] >a[k] and i < j < k. Find total number of inver...
ReactJS – componentWillUpdate() Method
In this article, we are going to see how to execute a function before the component is updated in the DOM tree. This method is used during the updating phase of the React lifecycle. This function is generally called before the component is updated or when the state or props passed to the component changes. Don’t call s...
[ { "code": null, "e": 1174, "s": 1062, "text": "In this article, we are going to see how to execute a function before the component is updated in the DOM tree." }, { "code": null, "e": 1498, "s": 1174, "text": "This method is used during the updating phase of the React lifecycle. ...
Find last unique URL from long list of URLs in single traversal - GeeksforGeeks
28 Jun, 2021 Given a very long list of URLs, find out last unique URL. Only one traversal of all URLs is allowed. Examples: Input: https://www.geeksforgeeks.org https://www.geeksforgeeks.org/quiz-corner-gq/ http://qa.geeksforgeeks.org https://practice.geeksforgeeks.org https://ide.geeksforgeeks.org https://write.gee...
[ { "code": null, "e": 24095, "s": 24067, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24196, "s": 24095, "text": "Given a very long list of URLs, find out last unique URL. Only one traversal of all URLs is allowed." }, { "code": null, "e": 24206, "s": 24196, ...
Java Program to Find Sum of Fibonacci Series Numbers of First N Even Indexes - GeeksforGeeks
17 Mar, 2021 For a given positive integer N, the purpose is to find the value of F2 + F4 + F6 +.........+ F2n till N number. Where Fi indicates the i’th Fibonacci number. The Fibonacci Series are the numbers in the below-given integer sequence. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...... Examples: Input: n = 4 Outp...
[ { "code": null, "e": 23581, "s": 23553, "text": "\n17 Mar, 2021" }, { "code": null, "e": 23739, "s": 23581, "text": "For a given positive integer N, the purpose is to find the value of F2 + F4 + F6 +.........+ F2n till N number. Where Fi indicates the i’th Fibonacci number." },...
Python Pandas - Basic Functionality
By now, we learnt about the three Pandas DataStructures and how to create them. We will majorly focus on the DataFrame objects because of its importance in the real time data processing and also discuss a few other DataStructures. axes Returns a list of the row axis labels dtype Returns the dtype of the object. empty R...
[ { "code": null, "e": 2674, "s": 2443, "text": "By now, we learnt about the three Pandas DataStructures and how to create them. We will majorly focus on the DataFrame objects because of its importance in the real time data processing and also discuss a few other DataStructures." }, { "code": ...
Machine Translation Evaluation with sacreBLEU and BERTScore | by Ng Wai Foong | Towards Data Science
By reading this piece, you will learn to evaluate your machine translation models using the following packages: sacreBLEU BERTScore For your information, BLEU (bilingual evaluation understudy) is one of the most popular metric for evaluating machine-translated text. It can be used to evaluate translations of any langua...
[ { "code": null, "e": 283, "s": 171, "text": "By reading this piece, you will learn to evaluate your machine translation models using the following packages:" }, { "code": null, "e": 293, "s": 283, "text": "sacreBLEU" }, { "code": null, "e": 303, "s": 293, "tex...
Matplotlib.figure.Figure.set_figheight() in Python - GeeksforGeeks
03 May, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n03 May, 2020" }, { "code": null, "e": 25958, "s": 25647, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic...
BCD to binary conversion in 8051
In this problem, we will see how to convert 8-bit BCD number to its Binary (Hexadecimal)equivalent. The BCD number is stored at location 20H. After converting, the results will be stored at 30H. So let us assume the data is D5H. The program converts the binary value ofD5H to BCD value 213D. MOVR0,#20H; Initialize th...
[ { "code": null, "e": 1257, "s": 1062, "text": "In this problem, we will see how to convert 8-bit BCD number to its Binary (Hexadecimal)equivalent. The BCD number is stored at location 20H. After converting, the results will be stored at 30H." }, { "code": null, "e": 1354, "s": 1257, ...
std::bad_array_new_length class in C++ with Examples
28 May, 2020 Standard C++ contains several built-in exception classes, std::bad_array_new_length is one of them.It is an exception on bad array length and thrown if the size of array is less than zero and if the array size is greater than the limit. Below is the syntax for the same: Header File: <new> Syntax: class ba...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2020" }, { "code": null, "e": 299, "s": 28, "text": "Standard C++ contains several built-in exception classes, std::bad_array_new_length is one of them.It is an exception on bad array length and thrown if the size of array is le...
starts_with() and ends_with() in C++20 with Examples
28 Jan, 2021 In this article, we will be discussing starts_with() and ends_with() with examples in C++20. This function efficiently checks if a string begins with the given prefix or not. This function written in both std::basic_string and in std::basic_string_view. Syntax: template <typename PrefixType> bool starts_w...
[ { "code": null, "e": 53, "s": 25, "text": "\n28 Jan, 2021" }, { "code": null, "e": 146, "s": 53, "text": "In this article, we will be discussing starts_with() and ends_with() with examples in C++20." }, { "code": null, "e": 308, "s": 146, "text": "This functio...
Python program to find tuples which have all elements divisible by K from a list of tuples
05 Sep, 2020 Given a list of tuples. The task is to extract all tuples which have all elements divisible by K. Input : test_list = [(6, 24, 12), (60, 12, 6), (12, 18, 21)], K = 6 Output : [(6, 24, 12), (60, 12, 6)] Explanation : Both tuples have all elements multiple of 6. Input : test_list = [(6, 24, 12), (60, 10, 5),...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 126, "s": 28, "text": "Given a list of tuples. The task is to extract all tuples which have all elements divisible by K." }, { "code": null, "e": 289, "s": 126, "text": "Input : ...
std::uniform_real_ distribution class in C++ with Examples
15 Jul, 2021 In Probability, Uniform Distribution Function refers to the distribution in which the probabilities are defined on a continuous random variable, one which can take any value between two numbers, then the distribution is said to be a continuous probability distribution. For example, the temperature througho...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2021" }, { "code": null, "e": 474, "s": 28, "text": "In Probability, Uniform Distribution Function refers to the distribution in which the probabilities are defined on a continuous random variable, one which can take any value b...
TreeMap ceilingKey() in Java with Examples - GeeksforGeeks
18 Sep, 2018 The ceilingKey() function of TreeMap Class returns the least key greater than or equal to the given key or null if the such a key is absent. Syntax: public K ceilingKey(K key) Parameters: This method accepts a mandatory parameter key which is the key to be searched for. Return Value: This method returns th...
[ { "code": null, "e": 24442, "s": 24414, "text": "\n18 Sep, 2018" }, { "code": null, "e": 24583, "s": 24442, "text": "The ceilingKey() function of TreeMap Class returns the least key greater than or equal to the given key or null if the such a key is absent." }, { "code": ...
Kali Linux - Reporting Tools
In this chapter, we will learn about some reporting tools in Kali Linux. In all this work that we have performed, it is important to share the results that was produced, to track our work, etc. For this purpose, Kali has a reporting tool called dradis which is a web service. Step 1 − To start Dradis, type “service drad...
[ { "code": null, "e": 2102, "s": 2029, "text": "In this chapter, we will learn about some reporting tools in Kali Linux." }, { "code": null, "e": 2305, "s": 2102, "text": "In all this work that we have performed, it is important to share the results that was produced, to track our...
Perl | Reverse an array - GeeksforGeeks
23 Sep, 2018 Reverse an array or string in Perl. Iterative Way:Iterate over the array from 0 to mid of array.Swap the arr[i] element with arr[size-i] element. #Perl code to reverse an array iteratively #declaring an array of integers@arr = (2, 3, 4, 5, 6, 7); # Store length on array in $n variable$n = $#arr; #Print ...
[ { "code": null, "e": 23990, "s": 23962, "text": "\n23 Sep, 2018" }, { "code": null, "e": 24026, "s": 23990, "text": "Reverse an array or string in Perl." }, { "code": null, "e": 24136, "s": 24026, "text": "Iterative Way:Iterate over the array from 0 to mid of ...
Batch Script - Creating Files
The creation of a new file is done with the help of the redirection filter >. This filter can be used to redirect any output to a file. Following is a simple example of how to create a file using the redirection command. @echo off echo "Hello">C:\new.txt If the file new.txt is not present in C:\, then it will be create...
[ { "code": null, "e": 2390, "s": 2169, "text": "The creation of a new file is done with the help of the redirection filter >. This filter can be used to redirect any output to a file. Following is a simple example of how to create a file using the redirection command." }, { "code": null, ...
Smallest number greater than or equal to X whose sum of digits is divisible by Y - GeeksforGeeks
08 Nov, 2021 Given two integers X and Y, the task is to find the smallest number greater than or equal to X whose sum of digits is divisible by Y. Note: 1 <= X <= 1000, 1 <= Y <= 50.Examples: Input: X = 10, Y = 5 Output: 14 Explanation: 14 is the smallest number greater than 10 whose sum of digits (1+4 = 5) is divisi...
[ { "code": null, "e": 24833, "s": 24805, "text": "\n08 Nov, 2021" }, { "code": null, "e": 25014, "s": 24833, "text": "Given two integers X and Y, the task is to find the smallest number greater than or equal to X whose sum of digits is divisible by Y. Note: 1 <= X <= 1000, 1 <= Y ...
Python - Create list of tuples using for loop - GeeksforGeeks
14 Sep, 2021 In this article, we will discuss how to create a List of Tuples using for loop in Python. Let’s suppose we have a list and we want a create a list of tuples from that list where every element of the tuple will contain the list element and its corresponding index. Here we will use the for loop along with th...
[ { "code": null, "e": 24732, "s": 24704, "text": "\n14 Sep, 2021" }, { "code": null, "e": 24822, "s": 24732, "text": "In this article, we will discuss how to create a List of Tuples using for loop in Python." }, { "code": null, "e": 24996, "s": 24822, "text": "...
StringStream in C++ for Decimal to Hexadecimal and back - GeeksforGeeks
09 May, 2018 Stringstream is stream class present in C++ which is used for doing operations on a string. It can be used for formatting/parsing/converting a string to number/char etc.Hex is an I/O manipulator that takes reference to an I/O stream as parameter and returns reference to the stream after manipulation.Here i...
[ { "code": null, "e": 24303, "s": 24275, "text": "\n09 May, 2018" }, { "code": null, "e": 24682, "s": 24303, "text": "Stringstream is stream class present in C++ which is used for doing operations on a string. It can be used for formatting/parsing/converting a string to number/cha...
C - switch statement
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case. The syntax for a switch statement in C programming language is as follows − switch(expression) { case constant-expression : ...
[ { "code": null, "e": 2270, "s": 2084, "text": "A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case." }, { "code": null, "e": 2346, "s": 2270, "text...