title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Change the legend position in Matplotlib
26 May, 2021 In this article, we will learn how to Change the legend position in Matplotlib. Let’s discuss some concepts : Matplotlib is a tremendous visualization library in Python for 2D plots of arrays. Matplotlib may be a multi-platform data visualization library built on NumPy arrays and designed to figure with th...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2021" }, { "code": null, "e": 138, "s": 28, "text": "In this article, we will learn how to Change the legend position in Matplotlib. Let’s discuss some concepts :" }, { "code": null, "e": 418, "s": 138, "text...
How to Sort a Pandas DataFrame by Both Index and Column?
23 Dec, 2021 In this article, we will discuss how to sort a Pandas dataframe by both index and columns. We can sort a Pandas DataFrame based on Index and column using sort_index method. To sort the DataFrame based on the index we need to pass axis=0 as a parameter to sort_index method. To sort the DataFrame based on th...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Dec, 2021" }, { "code": null, "e": 119, "s": 28, "text": "In this article, we will discuss how to sort a Pandas dataframe by both index and columns." }, { "code": null, "e": 201, "s": 119, "text": "We can sort a P...
Python | Combining two sorted lists
24 Dec, 2018 Many a times we encounter a problem where we wish to use the merge function of merge sort and is a classical problem that occurs many times while doing competitive programming. This type of problem when known shorter and compact way to perform them are always quite handy. Let’s discuss certain ways of comb...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 Dec, 2018" }, { "code": null, "e": 326, "s": 53, "text": "Many a times we encounter a problem where we wish to use the merge function of merge sort and is a classical problem that occurs many times while doing competitive programmin...
SQLite - Transactions
A transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order, whether in a manual fashion by a user or automatically by some sort of a database program. A transaction is the propagation of one or more changes to the database. For examp...
[ { "code": null, "e": 3010, "s": 2772, "text": "A transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order, whether in a manual fashion by a user or automatically by some sort of a database program." }, { "...
C# | Tuple Class
29 Nov, 2019 In C#, Tuple class is used to provide static methods for creating tuples and this class defined under System namespace. This class itself does not represent a tuple, but it provides static methods that are used to create an instance of the tuple type. Or in other words, the Tuple class provides helper meth...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2019" }, { "code": null, "e": 618, "s": 28, "text": "In C#, Tuple class is used to provide static methods for creating tuples and this class defined under System namespace. This class itself does not represent a tuple, but it pr...
Web Scraping – Amazon Customer Reviews
08 Sep, 2021 In this article, we are going to see how we can scrape the amazon customer review using Beautiful Soup in Python. bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module does not come built-in with Python. To install this type the below command in the terminal. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Sep, 2021" }, { "code": null, "e": 142, "s": 28, "text": "In this article, we are going to see how we can scrape the amazon customer review using Beautiful Soup in Python." }, { "code": null, "e": 335, "s": 142, "...
Lexicographically smallest string obtained after concatenating array
07 Jul, 2022 Given n strings, concatenate them in an order that produces the lexicographically smallest possible string.Examples: Input : a[] = ["c", "cb", "cba"] Output : cbacbc Possible strings are ccbcba, ccbacb, cbccba, cbcbac, cbacbc and cbaccb. Among all these strings, cbacbc is the lexicographically smalle...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jul, 2022" }, { "code": null, "e": 173, "s": 54, "text": "Given n strings, concatenate them in an order that produces the lexicographically smallest possible string.Examples: " }, { "code": null, "e": 418, "s": 173,...
Matplotlib.pyplot.pcolor() function in Python
25 Nov, 2020 Matplotlib is the well-known Python package used in data visualization. Numpy is the numerical mathematics extension of Matplotlib. Matplotlib is capable of producing high-quality graphs, charts, and figures. Matplotlib produces object-oriented API for embedding plots into projects using GUI toolkits like ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Nov, 2020" }, { "code": null, "e": 467, "s": 28, "text": "Matplotlib is the well-known Python package used in data visualization. Numpy is the numerical mathematics extension of Matplotlib. Matplotlib is capable of producing high-qua...
zlib.compress(s) in python
06 Mar, 2020 With the help of zlib.compress(s) method, we can get compress the bytes of string by using zlib.compress(s) method. Syntax : zlib.compress(string)Return : Return compressed string. Example #1 :In this example we can see that by using zlib.compress(s) method, we are able to compress the string in the byte f...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Mar, 2020" }, { "code": null, "e": 144, "s": 28, "text": "With the help of zlib.compress(s) method, we can get compress the bytes of string by using zlib.compress(s) method." }, { "code": null, "e": 209, "s": 144, ...
Count unique subsequences of length K
13 Sep, 2021 Given an array of N numbers and an integer K. The task is to print the number of unique subsequences possible of length K. Examples: Input : a[] = {1, 2, 3, 4}, k = 3 Output : 4. Unique Subsequences are: {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4} Input: a[] = {1, 1, 1, 2, 2, 2 }, k = 3 Output : 4 Uni...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Sep, 2021" }, { "code": null, "e": 178, "s": 54, "text": "Given an array of N numbers and an integer K. The task is to print the number of unique subsequences possible of length K. " }, { "code": null, "e": 188, "s":...
How to create Tables using Plotly in Python?
05 Sep, 2020 Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library. A tab...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 330, "s": 28, "text": "Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, an...
Ruby - Operators
Ruby supports a rich set of operators, as you'd expect from a modern language. Most operators are actually method calls. For example, a + b is interpreted as a.+(b), where the + method in the object referred to by variable a is called with b as its argument. For each operator (+ - * / % ** & | ^ << >> && ||), there is ...
[ { "code": null, "e": 2553, "s": 2294, "text": "Ruby supports a rich set of operators, as you'd expect from a modern language. Most operators are actually method calls. For example, a + b is interpreted as a.+(b), where the + method in the object referred to by variable a is called with b as its argu...
Horizontal Navigation
In this chapter, we will learn how to add horizontal navigation or menu items to the website. Step 1 − To create menu items or horizontal navigation, let’s add the following code in <div id = “top-nav”> in the index.html file, which contains the list of menu items. <div id = "top-nav"> <ul> <li></li> ...
[ { "code": null, "e": 2290, "s": 2196, "text": "In this chapter, we will learn how to add horizontal navigation or menu items to the website." }, { "code": null, "e": 2462, "s": 2290, "text": "Step 1 − To create menu items or horizontal navigation, let’s add the following code in ...
How to Create Python Web Apps for your Data Science Projects | Towards Data Science
Web development isn’t a data scientist’s core competency. Most data scientists don’t bother to learn different technologies to do it. It’s just not their cup of coffee. Yet, most data science projects also have a software development component. Developers sometimes have a different understanding of the problem, and the...
[ { "code": null, "e": 341, "s": 172, "text": "Web development isn’t a data scientist’s core competency. Most data scientists don’t bother to learn different technologies to do it. It’s just not their cup of coffee." }, { "code": null, "e": 605, "s": 341, "text": "Yet, most data sc...
Program to check if all the values in a list that are greater than a given value in Python
In this tutorial, we will check whether all the elements in a list are greater than a number or not. For example, we have a list [1, 2, 3, 4, 5] and a number 0. If every value in the list is greater than the given value then, we return True else False. It's a simple program. We write it in less than 3 minutes. Try it y...
[ { "code": null, "e": 1315, "s": 1062, "text": "In this tutorial, we will check whether all the elements in a list are greater than a number or not. For example, we have a list [1, 2, 3, 4, 5] and a number 0. If every value in the list is greater than the given value then, we return True else False."...
How to create a Modal Box with CSS and JavaScript?
To create a modal box with CSS and JavaScript, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { font-family: Arial, Helvetica, sans-serif; } .modal { text-align: center; display: none; ...
[ { "code": null, "e": 1134, "s": 1062, "text": "To create a modal box with CSS and JavaScript, the code is as follows −" }, { "code": null, "e": 1145, "s": 1134, "text": " Live Demo" }, { "code": null, "e": 2696, "s": 1145, "text": "<!DOCTYPE html>\n<html>\n<he...
Find the transition point in a binary array - GeeksforGeeks
20 Apr, 2022 Given a sorted array containing only numbers 0 and 1, the task is to find the transition point efficiently. The transition point is the point where “0” ends and “1” begins. Examples : Input: 0 0 0 1 1 Output: 3 Explanation: Index of first 1 is 3 Input: 0 0 0 0 1 1 1 1 Output: 4 Explanation: Index of firs...
[ { "code": null, "e": 26373, "s": 26345, "text": "\n20 Apr, 2022" }, { "code": null, "e": 26546, "s": 26373, "text": "Given a sorted array containing only numbers 0 and 1, the task is to find the transition point efficiently. The transition point is the point where “0” ends and “1...
Program to convert a Map to a Stream in Java - GeeksforGeeks
11 Dec, 2018 A Stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. Below are various method to convert Map to Stream in Java: Converting complete Map<Key, Value> into Stream: This can be done with the help of Map.entrySet() method which returns a Set view ...
[ { "code": null, "e": 25483, "s": 25455, "text": "\n11 Dec, 2018" }, { "code": null, "e": 25601, "s": 25483, "text": "A Stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result." }, { "code": null, "e": 25660, ...
Program to build DFA that starts and end with 'a' from input (a, b) - GeeksforGeeks
10 Jul, 2021 DFA (Deterministic Finite Automaton or Acceptor) is a finite state machine that accepts or rejects strings of symbols. DFA accepts the string if it reaches the final state and rejects otherwise. Now the problem is, provided a string as input character by character and we have to check whether the string st...
[ { "code": null, "e": 26099, "s": 26071, "text": "\n10 Jul, 2021" }, { "code": null, "e": 26830, "s": 26099, "text": "DFA (Deterministic Finite Automaton or Acceptor) is a finite state machine that accepts or rejects strings of symbols. DFA accepts the string if it reaches the fin...
Variable Length Argument in C - GeeksforGeeks
12 Nov, 2017 Variable length argument is a feature that allows a function to receive any number of arguments. There are situations where we want a function to handle variable number of arguments according to requirement.1) Sum of given numbers.2) Minimum of given numbers.and many more. Variable number of arguments are ...
[ { "code": null, "e": 25477, "s": 25449, "text": "\n12 Nov, 2017" }, { "code": null, "e": 25751, "s": 25477, "text": "Variable length argument is a feature that allows a function to receive any number of arguments. There are situations where we want a function to handle variable n...
Replace each node in binary tree with the sum of its inorder predecessor and successor - GeeksforGeeks
25 Apr, 2022 Given a binary tree containing n nodes. The problem is to replace each node in the binary tree with the sum of its inorder predecessor and inorder successor. Examples: Input : 1 / \ 2 3 / \ / \ 4 5 6 7 Output : 11 ...
[ { "code": null, "e": 37093, "s": 37065, "text": "\n25 Apr, 2022" }, { "code": null, "e": 37251, "s": 37093, "text": "Given a binary tree containing n nodes. The problem is to replace each node in the binary tree with the sum of its inorder predecessor and inorder successor." },...
Swap three numbers in cycle - GeeksforGeeks
28 May, 2018 Given three numbers, swap them in cyclic form. First number should get the value of third, second should get the value of first and third should get value of second. Examples: Input : a = 2, b = 4, c = 7 Output : a = 7, b = 2, c = 4 Input : a = 10, b = 20, c = 30 Output : a = 30, b = 10, c = 20 Prerequis...
[ { "code": null, "e": 25439, "s": 25411, "text": "\n28 May, 2018" }, { "code": null, "e": 25605, "s": 25439, "text": "Given three numbers, swap them in cyclic form. First number should get the value of third, second should get the value of first and third should get value of secon...
Minimum increment or decrement required to sort the array | Top-down Approach - GeeksforGeeks
29 Oct, 2021 Given an array arr[] of N integers, the task is to sort the array in increasing order by performing a minimum number of operations. In a single operation, an element of the array can either be incremented or decremented by 1. Print the minimum number of operations required.Examples: Input: arr[] = {5, 4, 3...
[ { "code": null, "e": 26593, "s": 26565, "text": "\n29 Oct, 2021" }, { "code": null, "e": 26877, "s": 26593, "text": "Given an array arr[] of N integers, the task is to sort the array in increasing order by performing a minimum number of operations. In a single operation, an eleme...
Ruby | Array Join (*) method - GeeksforGeeks
07 Jan, 2020 Array#*() is an Array class method which performs set join operation on the arrays. And returns new array by concatenation of int copies of the self. Syntax: Array.*() Parameter: Arrays for performing the join or concatenation operation. Return: New arrays with concatenated int copies of self Example #1 : ...
[ { "code": null, "e": 24833, "s": 24805, "text": "\n07 Jan, 2020" }, { "code": null, "e": 24983, "s": 24833, "text": "Array#*() is an Array class method which performs set join operation on the arrays. And returns new array by concatenation of int copies of the self." }, { ...
How to change the color of ttk button in Tkinter?
Tkinter widgets have a consistent look and style across all the platforms and operating systems. Ttk works like CSS in an HTML script. It has many inbuilt functions, modules and methods that add style to a regular tkinter widget. Tkinter ttk buttons generally have a default color scheme, thus we can change the backgrou...
[ { "code": null, "e": 1433, "s": 1062, "text": "Tkinter widgets have a consistent look and style across all the platforms and operating systems. Ttk works like CSS in an HTML script. It has many inbuilt functions, modules and methods that add style to a regular tkinter widget. Tkinter ttk buttons gen...
Generalized Abbreviation in C++
Suppose there is a word. We have to define a function that can generate the generalized abbreviations of a word. So, if the input is like "word", then the output will be ["word", "1ord", "w1rd", "wo1d", "wor1", "2rd", "w2d", "wo2", "1o1d", "1or1", "w1r1", "1o2", "2r1", "3d", "w3", "4"] To solve this, we will follow the...
[ { "code": null, "e": 1175, "s": 1062, "text": "Suppose there is a word. We have to define a function that can generate the generalized abbreviations of a word." }, { "code": null, "e": 1349, "s": 1175, "text": "So, if the input is like \"word\", then the output will be [\"word\",...
How to use Radar Chart graph in android?
This example demonstrates How to use Radar chart graph in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Open build.gradle(module level) and add library dependency. apply plugin: 'com.android.application' android { pa...
[ { "code": null, "e": 1129, "s": 1062, "text": "This example demonstrates How to use Radar chart graph in android." }, { "code": null, "e": 1258, "s": 1129, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a...
12 Math Tricks to Help You Solve Problems Without a Calculator | by Andrew Jamieson | Towards Data Science
The first trick is to simplify your problem by breaking it into smaller pieces. For example, we can rewrite 567 + 432 = 567 + (400 + 30 + 2)= 967 + 30 + 2 = 997 + 2 = 999 It’s often easier to work with adding a smaller number, so instead of 131 + 858, swap the numbers 858 + 131 = 858 + 100 + 30 + 1 = 989 Using the comp...
[ { "code": null, "e": 280, "s": 172, "text": "The first trick is to simplify your problem by breaking it into smaller pieces. For example, we can rewrite" }, { "code": null, "e": 343, "s": 280, "text": "567 + 432 = 567 + (400 + 30 + 2)= 967 + 30 + 2 = 997 + 2 = 999" }, { "...
How to submit a form in Selenium webdriver if submit button can't be identified?
We can submit a form in Selenium webdriver even if the submit button cannot be identified. This can be achieved by locating any element within the form tag and the applying submit method on it. A form in the html code is identified by the <form> tag. Let us investigate the html code of element with in a form tag − In t...
[ { "code": null, "e": 1313, "s": 1062, "text": "We can submit a form in Selenium webdriver even if the submit button cannot be identified. This can be achieved by locating any element within the form tag and the applying submit method on it. A form in the html code is identified by the <form> tag." ...
How to update MongoDB collection using $toLower?
There is a $toLower operator in MongoDB to be used as part of aggregate framework. But, we can also use the for loop to iterate over the specific field and update one by one. Let us first create a collection with documents > db.toLowerDemo.insertOne({"StudentId":101,"StudentName":"John"}); { "acknowledged" : true, ...
[ { "code": null, "e": 1237, "s": 1062, "text": "There is a $toLower operator in MongoDB to be used as part of aggregate framework. But, we can also use the for loop to iterate over the specific field and update one by one." }, { "code": null, "e": 1285, "s": 1237, "text": "Let us ...
Unpacking tuple of lists in Python
When it is required to unpack a tuple of list, the 'reduce' method can be used. A tuple is an immutable data type. It means, values once defined can't be changed by accessing their index elements. If we try to change the elements, it results in an error. They are important contains since they ensure read-only access. A...
[ { "code": null, "e": 1381, "s": 1062, "text": "When it is required to unpack a tuple of list, the 'reduce' method can be used. A tuple is an immutable data type. It means, values once defined can't be changed by accessing their index elements. If we try to change the elements, it results in an error...
LESS - Escaping
It builds selectors dynamically and uses property or variable value as arbitrary string. The following example demonstrates the use of escaping in the LESS file − <html> <head> <title>Less Escaping</title> <link rel = "stylesheet" type = "text/css" href = "style.css" /> </head> <body> <h1...
[ { "code": null, "e": 2639, "s": 2550, "text": "It builds selectors dynamically and uses property or variable value as arbitrary string." }, { "code": null, "e": 2713, "s": 2639, "text": "The following example demonstrates the use of escaping in the LESS file −" }, { "code...
How Are Convolutions Actually Performed Under the Hood? | by Anirudh Shenoy | Towards Data Science
Convolutions have become a fundamental part of modern neural networks because of their ability to capture local information and reduce the number of parameters with weight sharing. Since almost all vision-based models (and a few NLP-models) use convolutions of one form or the other, it’s obvious that we would like to m...
[ { "code": null, "e": 534, "s": 172, "text": "Convolutions have become a fundamental part of modern neural networks because of their ability to capture local information and reduce the number of parameters with weight sharing. Since almost all vision-based models (and a few NLP-models) use convolutio...
Get min at pop | Practice | GeeksforGeeks
Now, we'll try to solve a famous stack problem. You are given an array A of size N. You need to first push the elements of the array into a stack and then print minimum in the stack at each pop. Example 1: Input: N = 5 A = {1 2 3 4 5} Output: 1 1 1 1 1 Explanation: After pushing elements to the stack, the stack wil...
[ { "code": null, "e": 422, "s": 226, "text": "Now, we'll try to solve a famous stack problem. \nYou are given an array A of size N. You need to first push the elements of the array into a stack and then print minimum in the stack at each pop." }, { "code": null, "e": 433, "s": 422, ...
Why floating-point values do not represent exact value
07 Sep, 2020 The floating-point numbers serve as rough approximations of mathematical real numbers. They do not represent the exact value. For this reason, we compare the arithmetic results of float variables with a minimum tolerance value. Example: C++ Java Python3 C# // C++ program to illustrate the// floating point ...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Sep, 2020" }, { "code": null, "e": 265, "s": 28, "text": "The floating-point numbers serve as rough approximations of mathematical real numbers. They do not represent the exact value. For this reason, we compare the arithmetic result...
BigInteger intValue() Method in Java
04 Dec, 2018 The java.math.BigInteger.intValue() converts this BigInteger to an integer value. If the value returned by this function is too big to fit into integer value, then it will return only the low-order 32 bits. Further there is chance that this conversion can loose information about the overall magnitude of th...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Dec, 2018" }, { "code": null, "e": 414, "s": 28, "text": "The java.math.BigInteger.intValue() converts this BigInteger to an integer value. If the value returned by this function is too big to fit into integer value, then it will ret...
How to compare password and confirm password inputs using express-validator ?
14 Jan, 2022 The registration or Sign Up in any website always requires a confirm password input and it must be the same as the password. It is basically to ensure that the user enters the password full of his sense and there is no conflict happens. This functionality can be implemented anywhere in our code like in ind...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jan, 2022" }, { "code": null, "e": 582, "s": 52, "text": "The registration or Sign Up in any website always requires a confirm password input and it must be the same as the password. It is basically to ensure that the user enters th...
EtherChannel in Computer Network
23 Mar, 2022 EtherChannel is a port link aggregation technology in which multiple physical port links are grouped into one logical link. It is used to provide high-speed links and redundancy. A maximum of 8 links can be aggregated to form a single logical link. Need of EtherChannel – Here is a topology in which two s...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Mar, 2022" }, { "code": null, "e": 304, "s": 54, "text": "EtherChannel is a port link aggregation technology in which multiple physical port links are grouped into one logical link. It is used to provide high-speed links and redunda...
HTML | <frame> frameborder Attribute
30 Sep, 2019 The HTML <frame> frameborder attribute is used to specify whether or not a border should be displayed between the frames. For this, we use two values 0 and 1, where 0 defines no border and 1 defines the border. Syntax <frame frameborder="1|0"> Attribute Values: 0: It has a default value. It sets the borde...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2019" }, { "code": null, "e": 239, "s": 28, "text": "The HTML <frame> frameborder attribute is used to specify whether or not a border should be displayed between the frames. For this, we use two values 0 and 1, where 0 defines ...
Python Pillow – Writing Text on Image
13 Jul, 2021 In this article, we will see how to write text on images with the Python Pillow module. This module is not preloaded with Python. So to install it execute the following command in the command-line: pip install pillow Stepwise implementation: Step 1: Import Pillow library To complete this task the functions...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jul, 2021" }, { "code": null, "e": 140, "s": 52, "text": "In this article, we will see how to write text on images with the Python Pillow module." }, { "code": null, "e": 250, "s": 140, "text": "This module is no...
Multiple of x closest to n
27 Apr, 2021 Given two numbers n and x, we need to calculate the smallest value of x that is closest to given number n.Examples: Input : n = 9, x = 4 Output : 8 Input : n = 2855, x = 13 Output : 2860 Input : n = 46426171, x = 43 Output : 46426154 Input : n = 1, x = 3 Output : 3 We need to find a k such th...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Apr, 2021" }, { "code": null, "e": 170, "s": 52, "text": "Given two numbers n and x, we need to calculate the smallest value of x that is closest to given number n.Examples: " }, { "code": null, "e": 330, "s": 170, ...
Node.js socket.send() Method
06 May, 2021 The socket.send() method is an inbuilt application programming interface of class Socket within dgram module which is used to send the message from one socket to another socket. Syntax: socket.send(msg[, offset, length][, port][, address][, callback]) Parameters: This method takes the following parameter:...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 May, 2021" }, { "code": null, "e": 207, "s": 28, "text": "The socket.send() method is an inbuilt application programming interface of class Socket within dgram module which is used to send the message from one socket to another sock...
Storage of integer and character values in C
25 Jul, 2018 Integer and character variables are used so often in the programs, but how these values are actually stored in C are known to few.Below are a few examples to understand this: Taking a positive integer value as char:#include <stdio.h>int main(){ char a = 278; printf("%d", a); return 0;}Output:22 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jul, 2018" }, { "code": null, "e": 229, "s": 54, "text": "Integer and character variables are used so often in the programs, but how these values are actually stored in C are known to few.Below are a few examples to understand this:...
Python | Miscellaneous | Question 4
28 Jun, 2021 What is the output of the following program : print 0.1 + 0.2 == 0.3 (A) True(B) False(C) Machine dependent(D) ErrorAnswer: (B)Explanation: Neither of 0.1, 0.2 and 0.3 can be represented accurately in binary. The round off errors from 0.1 and 0.2 accumulate and hence there is a difference of 5.5511e-17 bet...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2021" }, { "code": null, "e": 100, "s": 54, "text": "What is the output of the following program :" }, { "code": "print 0.1 + 0.2 == 0.3", "e": 123, "s": 100, "text": null }, { "code": null, "e":...
Matplotlib.dates.drange() in Python
19 Apr, 2020 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.dates.drange() function returns a sequence of equally spaced Matplotlib dates. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 240, "s": 28, "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 and designed t...
D3.js nest.key() Function
19 Jul, 2020 nest.key() function in D3.js is used to register a new key function which is invoked for each element in the input array. Whenever a new key is registered, it is then pushed in the array to the end. Syntax: nest.keys(key) Parameters: It takes only one parameter i.e the key function. Return: It returns a st...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jul, 2020" }, { "code": null, "e": 227, "s": 28, "text": "nest.key() function in D3.js is used to register a new key function which is invoked for each element in the input array. Whenever a new key is registered, it is then pushed i...
T-distributed Stochastic Neighbor Embedding(t-SNE) | by Renu Khandelwal | Towards Data Science
In this article, you will learn: Difference between t-SNE and PCA(Principal Component Analysis) Simple to understand explanation of how t-SNE works Understand different parameters available for t-SNE Applying t-SNE and PCA on MNIST What if you have hundreds of features or data points in a dataset, and you want to repre...
[ { "code": null, "e": 205, "s": 172, "text": "In this article, you will learn:" }, { "code": null, "e": 268, "s": 205, "text": "Difference between t-SNE and PCA(Principal Component Analysis)" }, { "code": null, "e": 320, "s": 268, "text": "Simple to understand ...
Conducting Bayesian Inference in Python using PyMC3 | by Dr. Robert Kübler | Towards Data Science
We have covered the intuition and basics of Bayesian inference in my article A gentle Introduction to Bayesian Inference. We then moved on to actually conducting Bayesian inference by hand using a coin example in my article Beginner-friendly Bayesian Inference. If you still feel unsure about this topic, take a look at ...
[ { "code": null, "e": 434, "s": 172, "text": "We have covered the intuition and basics of Bayesian inference in my article A gentle Introduction to Bayesian Inference. We then moved on to actually conducting Bayesian inference by hand using a coin example in my article Beginner-friendly Bayesian Infe...
Batch Normalisation Explained. A simple, clear and in-depth guide to... | by Robin Vinod | Towards Data Science
In this article, I take a detailed look at Batch Normalisation and how it works. Batch Normalisation was introduced in 2015 by Loffe and Szegedy and quickly became a standard feature implemented in almost every deep network. Internal Covariate ShiftVanishing and exploding gradientsHow does Batch Normalisation work?Adva...
[ { "code": null, "e": 397, "s": 172, "text": "In this article, I take a detailed look at Batch Normalisation and how it works. Batch Normalisation was introduced in 2015 by Loffe and Szegedy and quickly became a standard feature implemented in almost every deep network." }, { "code": null, ...
How to access an associative array by integer index in PHP? - GeeksforGeeks
11 Feb, 2019 There are two types of arrays in PHP, indexed and associative arrays. In case of indexed array strict numeric indexing is followed but in case of associative array there are keys corresponding to each element.The elements of an associative array can only be accessed by the corresponding keys. As there is n...
[ { "code": null, "e": 24163, "s": 24135, "text": "\n11 Feb, 2019" }, { "code": null, "e": 24580, "s": 24163, "text": "There are two types of arrays in PHP, indexed and associative arrays. In case of indexed array strict numeric indexing is followed but in case of associative array...
Tryit Editor v3.6 - Show Node.js Command Prompt
var mysql = require('mysql'); ​ var con = mysql.createConnection({ host: "localhost", user: "myusername", password: "mypassword", database: "mydb" }); ​ con.connect(function(err) { if (err) throw err; [ { id: 1, name: 'John', address: 'Highway 71'}, { id: 2, name: 'Peter', address: 'Lowstreet 4'}, { id:...
[ { "code": null, "e": 30, "s": 0, "text": "var mysql = require('mysql');" }, { "code": null, "e": 32, "s": 30, "text": "​" }, { "code": null, "e": 67, "s": 32, "text": "var con = mysql.createConnection({" }, { "code": null, "e": 88, "s": 67, ...
JavaScript Array shift() Method
04 Oct, 2021 Below is the example of Array shift() method. Example:<script>function func() { // Original array var array = ["GFG", "Geeks", "for", "Geeks"]; // Checking for condition in array var value = array.shift(); document.write(value); document.write("<br />"); document.write(...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Oct, 2021" }, { "code": null, "e": 74, "s": 28, "text": "Below is the example of Array shift() method." }, { "code": null, "e": 364, "s": 74, "text": "Example:<script>function func() { // Original array ...
How to create a Shared Folder between two Local User in Linux?
11 Jul, 2022 This article shows how to set-up a shared folder between two local users in Linux. The shared directory/folder will be accessible to both the users, they will be able to read/write each other’s file. Let us create shared directory /home/shareFolder for user Bob and Alice and add them to a common group name...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jul, 2022" }, { "code": null, "e": 228, "s": 28, "text": "This article shows how to set-up a shared folder between two local users in Linux. The shared directory/folder will be accessible to both the users, they will be able to read/...
Sorting in Java
03 Oct, 2021 Whenever we do hear sorting algorithms come into play such as selection sort, bubble sort, insertion sort, radix sort, bucket sort, etc but if we look closer here we are not asked to use any kind of algorithms. It is as simple sorting with the help of linear and non-linear data structures present within ja...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Oct, 2021" }, { "code": null, "e": 501, "s": 52, "text": "Whenever we do hear sorting algorithms come into play such as selection sort, bubble sort, insertion sort, radix sort, bucket sort, etc but if we look closer here we are not ...
Method Overloading with Autoboxing and Widening in Java
28 Mar, 2022 Let us go through the basic pre-requisites such as Method Overloading, Autoboxing, and Unboxing. So method overloading in java is based on the number and type of the parameters passed as an argument to the methods. We can not define more than one method with the same name, Order, and type of the arguments....
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Mar, 2022" }, { "code": null, "e": 707, "s": 54, "text": "Let us go through the basic pre-requisites such as Method Overloading, Autoboxing, and Unboxing. So method overloading in java is based on the number and type of the paramete...
Java Program for Iterative Merge Sort
Following is the Java program for Iterative Merge Sort − Live Demo import java.util.Arrays; public class Demo{ public static void merge_sort(int[] my_arr){ if(my_arr == null){ return; } if(my_arr.length > 1){ int mid = my_arr.length / 2; int[] left = new int[mid]; ...
[ { "code": null, "e": 1244, "s": 1187, "text": "Following is the Java program for Iterative Merge Sort −" }, { "code": null, "e": 1255, "s": 1244, "text": " Live Demo" }, { "code": null, "e": 2630, "s": 1255, "text": "import java.util.Arrays;\npublic class Demo...
Program to wish Women’s Day
20 Jul, 2021 This article demonstrates the pattern to print the Venus Symbol (International gender symbol for females). C++ Java Python3 C# Javascript // C++ code to wish happY Women's DaY #include <bits/stdc++.h>using namespace std;int main(){ // Initializing size of // design int n = 5; // Loop to prin...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jul, 2021" }, { "code": null, "e": 163, "s": 54, "text": "This article demonstrates the pattern to print the Venus Symbol (International gender symbol for females). " }, { "code": null, "e": 167, "s": 163, "text...
JavaScript | Convert a string to boolean
28 Mar, 2019 Sometimes it is needed to convert a string representing boolean value “true”, “false” into intrinsic type of JavaScript. Given a string and the task is to convert given string to its boolean value. Example 1: This example uses == operator to convert string to its boolean value. <!DOCTYPE html> <html> <he...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Mar, 2019" }, { "code": null, "e": 226, "s": 28, "text": "Sometimes it is needed to convert a string representing boolean value “true”, “false” into intrinsic type of JavaScript. Given a string and the task is to convert given string...
Python 3 basics
30 Jun, 2022 Python was developed by Guido van Rossum in the early 1990s and its latest version is 3.10.4, we can simply call it Python3. Python 3.0 was released in 2008. and is interpreted language i.e it’s not compiled and the interpreter will check the code line by line. This article can be used to learn the very ba...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 617, "s": 52, "text": "Python was developed by Guido van Rossum in the early 1990s and its latest version is 3.10.4, we can simply call it Python3. Python 3.0 was released in 2008. and is interpret...
Remove key value from Map in Scala
13 Aug, 2019 The deletion of Scala map keys can be obtained by utilizing – operator. This operator is utilized to delete the set of keys of the map.Syntax: def -(elem1: A, elem2: A, elems: A*): Map[A, B] It returns a new map containing all the elements of the given Map except the set of keys which are deleted using th...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2019" }, { "code": null, "e": 171, "s": 28, "text": "The deletion of Scala map keys can be obtained by utilizing – operator. This operator is utilized to delete the set of keys of the map.Syntax:" }, { "code": null, ...
Multiple barplots in R
24 Sep, 2021 Bar plots are a visual representation of the grouped data. It is the most commonly used plot in data analysis activity. In multiple bar plots, we have various bar plots in the form of horizontal and vertical rectangular bars. In these multiple bar plots, the bar represents the relationship between numeric ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Sep, 2021" }, { "code": null, "e": 445, "s": 28, "text": "Bar plots are a visual representation of the grouped data. It is the most commonly used plot in data analysis activity. In multiple bar plots, we have various bar plots in the...
Introduction to Tensor with Tensorflow
06 Dec, 2020 TensorFlow is an open-source software library for dataflow programming across a range of tasks. It is a symbolic math library, and also used for machine learning applications such as neural networks. Google open-sourced TensorFlow in November 2015. Since then, TensorFlow has become the most starred machine...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2020" }, { "code": null, "e": 410, "s": 28, "text": "TensorFlow is an open-source software library for dataflow programming across a range of tasks. It is a symbolic math library, and also used for machine learning applications ...
MapReduce - Algorithm
The MapReduce algorithm contains two important tasks, namely Map and Reduce. The map task is done by means of Mapper Class The reduce task is done by means of Reducer Class. Mapper class takes the input, tokenizes it, maps and sorts it. The output of Mapper class is used as input by Reducer class, which in turn search...
[ { "code": null, "e": 2001, "s": 1924, "text": "The MapReduce algorithm contains two important tasks, namely Map and Reduce." }, { "code": null, "e": 2047, "s": 2001, "text": "The map task is done by means of Mapper Class" }, { "code": null, "e": 2098, "s": 2047, ...
Plot a bar using matplotlib using a dictionary
First, we can define our dictionary and then, convert that dictionary into keys and values. Finally, we can use the data to plot a bar chart. Create a dictionary, i.e., data, where milk and water are the keys. Create a dictionary, i.e., data, where milk and water are the keys. Get the list of keys of the dictionary. Ge...
[ { "code": null, "e": 1204, "s": 1062, "text": "First, we can define our dictionary and then, convert that dictionary into keys and values. Finally, we can use the data to plot a bar chart." }, { "code": null, "e": 1272, "s": 1204, "text": "Create a dictionary, i.e., data, where m...
M1 competes with 20 cores Xeon®on TensorFlow training | Towards Data Science
In the first part of M1 Benchmark article I was comparing a MacBook Air M1 with an iMac 27" core i5, a 8 cores Xeon(R) Platinum, a K80 GPU instance and a T4 GPU instance on three TensorFlow models. While the GPU was not as efficient as expected, maybe because of the very early version of TensorFlow not yet entirely opt...
[ { "code": null, "e": 369, "s": 171, "text": "In the first part of M1 Benchmark article I was comparing a MacBook Air M1 with an iMac 27\" core i5, a 8 cores Xeon(R) Platinum, a K80 GPU instance and a T4 GPU instance on three TensorFlow models." }, { "code": null, "e": 625, "s": 369, ...
MicroPython on ESP Using Jupyter Notebook | by Marcelo Rovai | Towards Data Science
Let’s play with MicroPython on an ESP using a Jupyter Notebook in order to get data from sensors and taking action in a physical world. On a previous article, we explored how to control a Raspberry Pi using Jupyter Notebook: Physical Computing Using Jupyter Notebook It was a great experience, and once the project worke...
[ { "code": null, "e": 307, "s": 171, "text": "Let’s play with MicroPython on an ESP using a Jupyter Notebook in order to get data from sensors and taking action in a physical world." }, { "code": null, "e": 438, "s": 307, "text": "On a previous article, we explored how to control ...
\mbox - Tex Command
\mbox - creates a box just wide enough to hold the text in its argument;no linebreaks are allowed in the text;text appears in \rm. { \mbox <text argument>} \mbox command creates a box just wide enough to hold the text in its argument;no linebreaks are allowed in the text;text appears in \rm. a + b \mbox{ (are you pay...
[ { "code": null, "e": 8118, "s": 7986, "text": "\\mbox - creates a box just wide enough to hold the text in its argument;no linebreaks are allowed in the text;text appears in \\rm. " }, { "code": null, "e": 8143, "s": 8118, "text": "{ \\mbox <text argument>}" }, { "code": ...
Getting an array of all items of a collection in Julia - collect() Method - GeeksforGeeks
26 Mar, 2020 The collect() is an inbuilt function in julia which is used to return an array of all items in the specified collection or iterator. Syntax:collect(collection)orcollect(element_type, collection) Parameters: collection: Specified collection or iterator. element_type: Specified type of elements. Returns: It ...
[ { "code": null, "e": 24284, "s": 24256, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24417, "s": 24284, "text": "The collect() is an inbuilt function in julia which is used to return an array of all items in the specified collection or iterator." }, { "code": null, ...
Beyond One-Hot. 17 Ways of Transforming Categorical Features Into Numeric Features | by Samuele Mazzanti | Towards Data Science
“Which gradient boostings do you know?” “Xgboost, LightGBM, Catboost, HistGradient.” “And which categorical encodings do you know?” “One-hot.” I wouldn’t be surprised to hear such a conversation during a data science interview. Still, it would be quite striking, since just a small portion of data-science projects invol...
[ { "code": null, "e": 212, "s": 172, "text": "“Which gradient boostings do you know?”" }, { "code": null, "e": 257, "s": 212, "text": "“Xgboost, LightGBM, Catboost, HistGradient.”" }, { "code": null, "e": 304, "s": 257, "text": "“And which categorical encodings...
Functional Programming - Lambda Expressions
Lambda expressions are introduced in Java 8 and are touted to be the biggest feature of Java 8. Lambda expression facilitates functional programming, and simplifies the development a lot. A lambda expression is characterized by the following syntax. parameter -> expression body Following are the important characterist...
[ { "code": null, "e": 2277, "s": 2089, "text": "Lambda expressions are introduced in Java 8 and are touted to be the biggest feature of Java 8. Lambda expression facilitates functional programming, and simplifies the development a lot." }, { "code": null, "e": 2339, "s": 2277, "te...
Tryit Editor v3.7
Tryit: HTML link to another folder
[]
Difference between OOP and POP - GeeksforGeeks
20 Aug, 2019 OOP:Related with the real life objects and their properties. OOP Concepts: 1. Class and Objects 2. Data abstraction 3. Encapsulation 4. Polymorphism 5. Inheritance POP:Related with the conventional style. This approach is also known as the top-down approach. In this approach, a program is divided into fun...
[ { "code": null, "e": 24883, "s": 24855, "text": "\n20 Aug, 2019" }, { "code": null, "e": 24958, "s": 24883, "text": "OOP:Related with the real life objects and their properties. OOP Concepts:" }, { "code": null, "e": 25048, "s": 24958, "text": "1. Class and Ob...
Tryit Editor v3.7
Tryit: SVG circle
[]
Faster Machine Learning Training with a GPU or TPU | by Bruce H. Cottman, Ph.D. | Towards Data Science
You can use the Jupyter Notebook on your local computer. Google Colab improves on the Jupyter Notebook in many ways. Here are the seven most powerful reasons to use Google Colab: You can get any public Jupyter Notebook from a GitHub repository.You load, edit, and save any .ipynbfile to the Google Drive associated with ...
[ { "code": null, "e": 351, "s": 172, "text": "You can use the Jupyter Notebook on your local computer. Google Colab improves on the Jupyter Notebook in many ways. Here are the seven most powerful reasons to use Google Colab:" }, { "code": null, "e": 609, "s": 351, "text": "You can...
XAML Vs C# Code
You can use XAML to create, initialize, and set the properties of objects. The same activities can also be performed using programming code. XAML is just another simple and easy way to design UI elements. With XAML, it is up to you to decide whether you want to declare objects in XAML or declare them using code. Let’s ...
[ { "code": null, "e": 2064, "s": 1923, "text": "You can use XAML to create, initialize, and set the properties of objects. The same activities can also be performed using programming code." }, { "code": null, "e": 2237, "s": 2064, "text": "XAML is just another simple and easy way ...
Bandit - A Wargame For Linux Beginners - GeeksforGeeks
22 Jan, 2021 The Bandit is a wargame for those who are beginners at Linux/UNIX environment and are facing problems while learning the real-time use of Linux commands. The game will teach the basics of Linux and will make you compatible to play even other wargames. This game basically provides you the environment which ...
[ { "code": null, "e": 24430, "s": 24402, "text": "\n22 Jan, 2021" }, { "code": null, "e": 25225, "s": 24430, "text": "The Bandit is a wargame for those who are beginners at Linux/UNIX environment and are facing problems while learning the real-time use of Linux commands. The game ...
Finding minimum absolute difference within a Binary Search Tree in JavaScript
We are required to write a JavaScript function that takes in the root of a BST that holds some numerical data like this − 1 \ 3 / 2 The function should return the minimum absolute difference between any two nodes of the tree. For example − For the above tree, the output should be − const output = 1; because |1 - 2| = |...
[ { "code": null, "e": 1184, "s": 1062, "text": "We are required to write a JavaScript function that takes in the root of a BST that holds some numerical data like this −" }, { "code": null, "e": 1194, "s": 1184, "text": "1\n\\\n3\n/\n2" }, { "code": null, "e": 1288, ...
List add() Method in Java with Examples - GeeksforGeeks
02 Jan, 2019 This method of List interface is used to append the specified element in argument to the end of the list. Syntax: boolean add(E e) Parameters: This function has a single parameter, i.e, e – element to be appended to this list. Returns: It returns true if the specified element is appended and list changes. ...
[ { "code": null, "e": 24418, "s": 24390, "text": "\n02 Jan, 2019" }, { "code": null, "e": 24524, "s": 24418, "text": "This method of List interface is used to append the specified element in argument to the end of the list." }, { "code": null, "e": 24532, "s": 2452...
Print all possible strings of length k that can be formed from a set of n characters
28 May, 2022 Given a set of characters and a positive integer k, print all possible strings of length k that can be formed from the given set. Examples: Input: set[] = {'a', 'b'}, k = 3 Output: aaa aab aba abb baa bab bba bbb Input: set[] = {'a', 'b', 'c', 'd'}, k = 1 Output: a b c d For a given set of size n, the...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2022" }, { "code": null, "e": 184, "s": 54, "text": "Given a set of characters and a positive integer k, print all possible strings of length k that can be formed from the given set." }, { "code": null, "e": 194, ...
Check Armstrong Number in PL/SQL
04 Jul, 2018 Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if. abcd... = pow(a, n) + pow(b, n) + pow(c, n) + pow(d, n) + .... Example: Input : 153 Output : Yes 153 is an Armstrong numb...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jul, 2018" }, { "code": null, "e": 213, "s": 28, "text": "Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n (order is number of di...
Retrieve elements from Python Set
18 Jan, 2022 Prerequisites: Python Set In this article, we will discuss how to retrieve elements from the sets in Python. By iterating the elements in a set using for loop we can get them all set elements. Example: Python3 # create a set with integer elementsdata = {7058, 7059, 7072, 7074, 7076} # display set elements ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2022" }, { "code": null, "e": 54, "s": 28, "text": "Prerequisites: Python Set" }, { "code": null, "e": 137, "s": 54, "text": "In this article, we will discuss how to retrieve elements from the sets in Python....
Python | Consecutive elements pairing in list
18 May, 2020 Sometimes, while working with lists, we need to pair up the like elements in the list and then store them as lists of lists. This particular task has its utility in many domains, be it web development or day-day programming. Let’s discuss certain ways in which this can be achieved. Method #1 : Using list c...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 May, 2020" }, { "code": null, "e": 337, "s": 54, "text": "Sometimes, while working with lists, we need to pair up the like elements in the list and then store them as lists of lists. This particular task has its utility in many doma...
Object.seal( ) In JavaScript
09 Nov, 2021 Object and Object Constructors in JavaScript? In the living world of object-oriented programming, we already know the importance of classes and objects but unlike other programming languages, JavaScript does not have the traditional classes as seen in other languages. But JavaScript has objects and constru...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Nov, 2021" }, { "code": null, "e": 442, "s": 54, "text": "Object and Object Constructors in JavaScript? In the living world of object-oriented programming, we already know the importance of classes and objects but unlike other progr...
Bootstrap-5 Forms
06 Jul, 2021 Form controls: <input>, <select>, <textarea> are the tags used for general appearance like input field, select item and textareas. Note: To make the user interface more presentable, use properties like padding, margins as per the need. Example: HTML <!DOCTYPE html><html> <head> <!-- CSS only --> ...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jul, 2021" }, { "code": null, "e": 189, "s": 53, "text": "Form controls: <input>, <select>, <textarea> are the tags used for general appearance like input field, select item and textareas. " }, { "code": null, "e": 2...
GATE | Gate IT 2005 | Question 8
29 Mar, 2018 Using Booth’s Algorithm for multiplication, the multiplier -57 will be recoded as(A) 0 -1 0 0 1 0 0 -1(B) 1 1 0 0 0 1 1 1(C) 0 -1 0 0 1 0 0 0(D) 0 1 0 0 -1 0 0 1Answer: (A)Explanation: Booth’s algorithm: first take 2’s complement of given number if number is negative, then append 0 into LSB. Then, for each...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Mar, 2018" }, { "code": null, "e": 321, "s": 28, "text": "Using Booth’s Algorithm for multiplication, the multiplier -57 will be recoded as(A) 0 -1 0 0 1 0 0 -1(B) 1 1 0 0 0 1 1 1(C) 0 -1 0 0 1 0 0 0(D) 0 1 0 0 -1 0 0 1Answer: (A)Exp...
Implementing Csurf Middleware in Node.js
16 Jun, 2021 Csurf module in Node.js prevents the Cross-Site Request Forgery(CSRF) attack on an application. By using this module, when a browser renders up a page from the server, it sends a randomly generated string as a CSRF token. Therefore, when the POST request is performed, it will send the random CSRF token as ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Jun, 2021" }, { "code": null, "e": 445, "s": 28, "text": "Csurf module in Node.js prevents the Cross-Site Request Forgery(CSRF) attack on an application. By using this module, when a browser renders up a page from the server, it send...
Power Set in Lexicographic order
22 Jun, 2022 This article is about generating Power set in lexicographical order. Examples : Input : abc Output : a ab abc ac b bc c The idea is to sort array first. After sorting, one by one fix characters and recursively generates all subsets starting from them. After every recursive call, we remove last characte...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 136, "s": 54, "text": "This article is about generating Power set in lexicographical order. Examples : " }, { "code": null, "e": 176, "s": 136, "text": "Input : abc\nOutput : a...
How to draw a polyline in HTML5 SVG?
SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG. To draw a polygon in HTML SVG, use the SVG <polyline> element. The ...
[ { "code": null, "e": 1315, "s": 1062, "text": "SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG."...
jQuery | :has() Selector with example - GeeksforGeeks
27 Feb, 2019 The :has() selector in jQuery is used to select all elements that have one or more elements inside of them, that matches the specified selector. Syntax: $(":has(selector)") Parameter: This selector contains single parameter selector which is mandatory and used to specify the element to select. It is also r...
[ { "code": null, "e": 26316, "s": 26288, "text": "\n27 Feb, 2019" }, { "code": null, "e": 26461, "s": 26316, "text": "The :has() selector in jQuery is used to select all elements that have one or more elements inside of them, that matches the specified selector." }, { "cod...
Commonly Asked C Programming Interview Questions | Set 3 - GeeksforGeeks
26 Apr, 2021 Q.1 Write down the smallest executable code? Ans. main is necessary for executing the code. Code is C void main(){} Q.2 What are entry control and exit control loops? Ans. C support only 2 loops: Entry Control: This loop is categorized in 2 part a. while loop b. for loopExit control: In this category...
[ { "code": null, "e": 24152, "s": 24124, "text": "\n26 Apr, 2021" }, { "code": null, "e": 24252, "s": 24152, "text": "Q.1 Write down the smallest executable code? Ans. main is necessary for executing the code. Code is" }, { "code": null, "e": 24254, "s": 24252, ...
Tryit Editor v3.7
Background Image Repeat Tryit: Strange background image
[ { "code": null, "e": 49, "s": 25, "text": "Background Image Repeat" } ]
How to change text font for JLabel with HTML in Java?
To change text font, you can use the setFont() method of JLabel − label.setFont(new Font("Verdana", Font.PLAIN, 12)); The following is an example to change text font for JLabel with HTML − import java.awt.Font; import javax.swing.*; public class SwingDemo { public static void main(String args[]) { JFrame frame...
[ { "code": null, "e": 1128, "s": 1062, "text": "To change text font, you can use the setFont() method of JLabel −" }, { "code": null, "e": 1180, "s": 1128, "text": "label.setFont(new Font(\"Verdana\", Font.PLAIN, 12));" }, { "code": null, "e": 1251, "s": 1180, ...
Downloading OpenImages Dataset in Google Drive using Colab | by MRINALI GUPTA | Towards Data Science
Want to train your Computer Vision model on a custom dataset but don't want to scrape the web for the images. Try out OpenImages, an open-source dataset having ~9 million varied images with 600 object categories and rich annotations provided by google. The dataset contains image-level labels annotations, object boundin...
[ { "code": null, "e": 576, "s": 172, "text": "Want to train your Computer Vision model on a custom dataset but don't want to scrape the web for the images. Try out OpenImages, an open-source dataset having ~9 million varied images with 600 object categories and rich annotations provided by google. Th...
How To Dockerize an Existing Ruby on Rails Application | by Mahbub Zaman | Towards Data Science
Ruby on Rails is an open-source web application development framework based on Ruby. Many big companies use Rails to build their products, such as GitHub, Shopify, Airbnb, and Twitch. From this post, you’ll learn how to dockerize an existing Ruby on Rails application to make development faster and easier. First, we nee...
[ { "code": null, "e": 356, "s": 172, "text": "Ruby on Rails is an open-source web application development framework based on Ruby. Many big companies use Rails to build their products, such as GitHub, Shopify, Airbnb, and Twitch." }, { "code": null, "e": 479, "s": 356, "text": "Fr...
How do I set browser width and height in Selenium WebDriver?
We can set browser width and height in Selenium webdriver. There are multiple methods available to achieve this. Whenever an application is launched, it opens in its default browser size. We can resize the browser with the help of the Dimension class in Java. We create an object of the Dimension class and pass the desi...
[ { "code": null, "e": 1250, "s": 1062, "text": "We can set browser width and height in Selenium webdriver. There are multiple methods available to achieve this. Whenever an application is launched, it opens in its default browser size." }, { "code": null, "e": 1535, "s": 1250, "te...
JSF - h:selectOneListbox
The h:selectOneListbox tag renders an HTML input element of the type "select" with size specified. <h:selectOneListbox value = "#{userData.data}"> <f:selectItem itemValue = "1" itemLabel = "Item 1" /> <f:selectItem itemValue = "2" itemLabel = "Item 2" /> </h:selectOneListbox> <select name = "j_idt6:j_idt8" ...
[ { "code": null, "e": 2051, "s": 1952, "text": "The h:selectOneListbox tag renders an HTML input element of the type \"select\" with size specified." }, { "code": null, "e": 2241, "s": 2051, "text": "<h:selectOneListbox value = \"#{userData.data}\"> \n <f:selectItem itemValue = ...
How to use user variables in MySQL LIKE clause?
Using the CONCAT() function, we can work with user variables in LIKE clause. The syntax is as follows. set @anyVariableName='anyValue'; select yourColumnName1,yourColumnName2,yourColumnName3,...N from yourTableName whereyourColumnName like CONCAT('%', @anyVariableName, '%'); To understand the above syntax, let us first...
[ { "code": null, "e": 1165, "s": 1062, "text": "Using the CONCAT() function, we can work with user variables in LIKE clause. The syntax is as follows." }, { "code": null, "e": 1338, "s": 1165, "text": "set @anyVariableName='anyValue';\nselect yourColumnName1,yourColumnName2,yourCo...
Understand TextRank for Keyword Extraction by Python | by Xu LIANG | Towards Data Science
TextRank is an algorithm based on PageRank, which often used in keyword extraction and text summarization. In this article, I will help you understand how TextRank works with a keyword extraction example and show the implementation by Python. Understand PageRank Implementation of PageRank Keyword Extraction by TextRank...
[ { "code": null, "e": 415, "s": 172, "text": "TextRank is an algorithm based on PageRank, which often used in keyword extraction and text summarization. In this article, I will help you understand how TextRank works with a keyword extraction example and show the implementation by Python." }, { ...
Bootstrap 4 .card-group class
Use the card-group class to create a group of cards in Bootstrap 4 − <div class="card-group"> <div class="card bg-success"> <! - - One - - > </div> <div class="card bg-success"> <! - - Two - - > </div> <div class="card bg-success"> <! - - Three - - > </div> </div> Let us create a group o...
[ { "code": null, "e": 1131, "s": 1062, "text": "Use the card-group class to create a group of cards in Bootstrap 4 −" }, { "code": null, "e": 1359, "s": 1131, "text": "<div class=\"card-group\">\n\n <div class=\"card bg-success\">\n <! - - One - - >\n </div>\n <div class=\...
Dimensionality Reduction for Data Visualization: PCA vs TSNE vs UMAP vs LDA | by Sivakar Sivarajah | Towards Data Science
In this story, we are gonna go through three Dimensionality reduction techniques specifically used for Data Visualization: PCA, t-SNE, LDA and UMAP. We are going to explore them in details using the Sign Language MNIST Dataset, without going in-depth with the maths behind the algorithms. Many Machine Learning problems ...
[ { "code": null, "e": 461, "s": 172, "text": "In this story, we are gonna go through three Dimensionality reduction techniques specifically used for Data Visualization: PCA, t-SNE, LDA and UMAP. We are going to explore them in details using the Sign Language MNIST Dataset, without going in-depth with...