title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Hamming Distance in Python
Consider we have two integers. We have to find the Hamming distance of them. The hamming distance is the number of bit different bit count between two numbers. So if the numbers are 7 and 15, they are 0111 and 1111 in binary, here the MSb is different, so the Hamming distance is 1. To solve this, we will follow these s...
[ { "code": null, "e": 1345, "s": 1062, "text": "Consider we have two integers. We have to find the Hamming distance of them. The hamming distance is the number of bit different bit count between two numbers. So if the numbers are 7 and 15, they are 0111 and 1111 in binary, here the MSb is different, ...
Python - Ways to Copy Dictionary
A dictionary is a collection which is unordered, changeable and indexed. In Python dictionaries are written with curly brackets, and they have keys and values. They copy() method returns a shallow copy of the dictionary. Live Demo #creating a dictionary original = {1:'vishesh', 2:'python'} # copying using copy() funct...
[ { "code": null, "e": 1283, "s": 1062, "text": "A dictionary is a collection which is unordered, changeable and indexed. In Python dictionaries are written with curly brackets, and they have keys and values. They copy() method returns a shallow copy of the dictionary." }, { "code": null, ...
MIME Media Types
MIME (Multipurpose Internet Mail Extension) media types were originally devised so that e-mails could include information other than plain text. MIME media types indicate the following things − How different parts of a message, such as text and attachments, are combined into the message. How different parts of a messag...
[ { "code": null, "e": 2568, "s": 2374, "text": "MIME (Multipurpose Internet Mail Extension) media types were originally devised so that e-mails could include information other than plain text. MIME media types indicate the following things −" }, { "code": null, "e": 2663, "s": 2568, ...
Histograms Equalization in OpenCV - GeeksforGeeks
22 Feb, 2018 Prerequisite : Analyze-image-using-histogram Histogram equalization is a method in image processing of contrast adjustment using the image’s histogram. This method usually increases the global contrast of many images, especially when the usable data of the image is represented by close contrast values. Thr...
[ { "code": null, "e": 24107, "s": 24079, "text": "\n22 Feb, 2018" }, { "code": null, "e": 24152, "s": 24107, "text": "Prerequisite : Analyze-image-using-histogram" }, { "code": null, "e": 24259, "s": 24152, "text": "Histogram equalization is a method in image p...
CSS cue Property - GeeksforGeeks
20 Nov, 2020 It is a shorthand version for both cue-before and cue-after property. It specifies that an auditory icon played before or after the element to distinguish and set the element. Syntax: cue: <cue-before> <cue-after>? Property Values: CSS cue-before: It is used to define an auditory icon played before the e...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n20 Nov, 2020" }, { "code": null, "e": 25553, "s": 25376, "text": "It is a shorthand version for both cue-before and cue-after property. It specifies that an auditory icon played before or after the element to distinguish and set ...
Automate getting Tableau Server Users with REST API and Python | by Cristian Saavedra Desmoineaux | Towards Data Science
How many times someone asked you, can you check if these people have Tableau access? And, when you open the list, it has more than 50 emails. As a Tableau Site Administrator, one of the most tedious tasks is to return a list to the business owners of the unlicensed people or don’t exist in Tableau server so they can re...
[ { "code": null, "e": 314, "s": 172, "text": "How many times someone asked you, can you check if these people have Tableau access? And, when you open the list, it has more than 50 emails." }, { "code": null, "e": 519, "s": 314, "text": "As a Tableau Site Administrator, one of the ...
Ruby - Date & Time
The Time class represents dates and times in Ruby. It is a thin layer over the system date and time functionality provided by the operating system. This class may be unable on your system to represent dates before 1970 or after 2038. This chapter makes you familiar with all the most wanted concepts of date and time. Fo...
[ { "code": null, "e": 2528, "s": 2294, "text": "The Time class represents dates and times in Ruby. It is a thin layer over the system date and time functionality provided by the operating system. This class may be unable on your system to represent dates before 1970 or after 2038." }, { "code...
Permutations in Python
Suppose we have a collection of distinct integers; we have to find all possible permutations. So if the array is like [2,1,3], then the result will be [[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]] To solve this, we will follow these steps − We will use the recursive approach, this will make the list, start, cu...
[ { "code": null, "e": 1268, "s": 1062, "text": "Suppose we have a collection of distinct integers; we have to find all possible permutations. So if the array is like [2,1,3], then the result will be [[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]" }, { "code": null, "e": 1312, ...
Generate array of random unique numbers in PHP?
For random unique numbers array, use range() along with shuffle(). The PHP code is as follows Live Demo <!DOCTYPE html> <html> <body> <?php $limit_random_array_values = range(10, 20); shuffle($limit_random_array_values); $all_five_random_array_value = array_slice($limit_random_array_values ,0,5); print_r($all_five_ran...
[ { "code": null, "e": 1129, "s": 1062, "text": "For random unique numbers array, use range() along with shuffle()." }, { "code": null, "e": 1156, "s": 1129, "text": "The PHP code is as follows" }, { "code": null, "e": 1167, "s": 1156, "text": " Live Demo" }, ...
How to select the second index in Java JList?
To select the second index, use the setSelectedIndex() method − JList new JList(sports); list.setSelectedIndex(2); The following is an example to select the second index in Java JList − package my; import java.awt.event.*; import java.awt.*; import javax.swing.*; class SwingDemo extends JFrame { static JFrame frame;...
[ { "code": null, "e": 1126, "s": 1062, "text": "To select the second index, use the setSelectedIndex() method −" }, { "code": null, "e": 1177, "s": 1126, "text": "JList new JList(sports);\nlist.setSelectedIndex(2);" }, { "code": null, "e": 1248, "s": 1177, "tex...
What is Interface segregation principle and how to implement it in C#?
Clients should not be forced to depend upon interfaces that they don't use. The Interface Segregation Principle states that clients should not be forced to implement interfaces they don't use. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule pub...
[ { "code": null, "e": 1138, "s": 1062, "text": "Clients should not be forced to depend upon interfaces that they don't use." }, { "code": null, "e": 1255, "s": 1138, "text": "The Interface Segregation Principle states that clients should not be forced to implement interfaces they ...
Ansible - Introduction
Ansible is simple open source IT engine which automates application deployment, intra service orchestration, cloud provisioning and many other IT tools. Ansible is easy to deploy because it does not use any agents or custom security infrastructure. Ansible uses playbook to describe automation jobs, and playbook uses ve...
[ { "code": null, "e": 1944, "s": 1791, "text": "Ansible is simple open source IT engine which automates application deployment, intra service orchestration, cloud provisioning and many other IT tools." }, { "code": null, "e": 2040, "s": 1944, "text": "Ansible is easy to deploy bec...
Why you should be using PHATE for dimensionality reduction | by Jamshaid Shahir | Towards Data Science
As data scientists, we often work with high-dimensional data with more than 3 features, or dimensions, of interest. In supervised machine learning, we may use this data for training and classification for example and may reduce the dimensions to speed up the training. In unsupervised learning, we use this type of data ...
[ { "code": null, "e": 1228, "s": 172, "text": "As data scientists, we often work with high-dimensional data with more than 3 features, or dimensions, of interest. In supervised machine learning, we may use this data for training and classification for example and may reduce the dimensions to speed up...
Add the slug field inside Django Model - GeeksforGeeks
05 Mar, 2021 It is a way of generating a valid URL, generally using data already obtained. For instance, using the title of an article to generate a URL. Let’s assume our blog have a post with the title ‘The Django book by Geeksforgeeks’ with primary key id= 2. We might refer to this post with www.geeksforgeeks.org/po...
[ { "code": null, "e": 24196, "s": 24168, "text": "\n05 Mar, 2021" }, { "code": null, "e": 24479, "s": 24196, "text": "It is a way of generating a valid URL, generally using data already obtained. For instance, using the title of an article to generate a URL. Let’s assume our blog ...
Image Augmentation Examples in Python | by Connor Shorten | Towards Data Science
I am currently working on a study reviewing the depth and effectiveness of image data augmentations. The goal of this research is to learn how to increase our dataset size to train robust Convolutional Network models with limited or small amounts of data. This study requires listing all the image augmentations we can t...
[ { "code": null, "e": 428, "s": 172, "text": "I am currently working on a study reviewing the depth and effectiveness of image data augmentations. The goal of this research is to learn how to increase our dataset size to train robust Convolutional Network models with limited or small amounts of data....
What are class instances in C#?
Class instances are objects. Like any other object-oriented language, C# also has object and classes. Objest are real-world entities and instance of a class. Access the members of the class using an object. To access the class members, you use the dot (.) operator after the object name. The dot operator links the name ...
[ { "code": null, "e": 1269, "s": 1062, "text": "Class instances are objects. Like any other object-oriented language, C# also has object and classes. Objest are real-world entities and instance of a class. Access the members of the class using an object." }, { "code": null, "e": 1434, ...
Python MySQL - Select Data
You can retrieve/fetch data from a table in MySQL using the SELECT query. This query/statement returns contents of the specified table in tabular form and it is called as result-set. Following is the syntax of the SELECT query − SELECT column1, column2, columnN FROM table_name; Assume we have created a table in MySQL ...
[ { "code": null, "e": 2402, "s": 2219, "text": "You can retrieve/fetch data from a table in MySQL using the SELECT query. This query/statement returns contents of the specified table in tabular form and it is called as result-set." }, { "code": null, "e": 2448, "s": 2402, "text": ...
jQuery Set Content and Attributes
We will use the same three methods from the previous page to set content: text() - Sets or returns the text content of selected elements html() - Sets or returns the content of selected elements (including HTML markup) val() - Sets or returns the value of form fields The following example demonstrates how to set conten...
[ { "code": null, "e": 74, "s": 0, "text": "We will use the same three methods from the previous page to set content:" }, { "code": null, "e": 137, "s": 74, "text": "text() - Sets or returns the text content of selected elements" }, { "code": null, "e": 219, "s": 13...
IMS DB - Secondary Indexing
Secondary Indexing is used when we want to access a database without using the complete concatenated key or when we do not want to use the sequence primary fields. DL/I stores the pointer to segments of the indexed database in a separate database. Index pointer segment is the only type of secondary index. It consists o...
[ { "code": null, "e": 2110, "s": 1946, "text": "Secondary Indexing is used when we want to access a database without using the complete concatenated key or when we do not want to use the sequence primary fields." }, { "code": null, "e": 2280, "s": 2110, "text": "DL/I stores the po...
GATE | GATE CS 2012 | Question 33 - GeeksforGeeks
28 Jun, 2021 Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty ar...
[ { "code": null, "e": 24123, "s": 24095, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24719, "s": 24123, "text": "Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out ...
Whitespace in C++
Whitespace is a term that refers to characters that are used for formatting purposes. In C++, this refers primarily to spaces, tabs, and (sometimes) newlines. The C++ compiler generally ignores whitespace, with a few minor exceptions. For example, all the 4 lines below mean the same thing − cout<<"Hello"; cout << "Hell...
[ { "code": null, "e": 1354, "s": 1062, "text": "Whitespace is a term that refers to characters that are used for formatting purposes. In C++, this refers primarily to spaces, tabs, and (sometimes) newlines. The C++ compiler generally ignores whitespace, with a few minor exceptions. For example, all t...
Check the number is Armstrong or not using C
How to check whether the given number is an Armstrong number or not using C Programming language? Armstrong number is the number that is equal to the sum of cubes of its digits. pqrs.........=pow(p,n)+pow(q,n)+pow(r,n)+.......... For example, 153,371,1634, etc., are Armstrong numbers. 153=1*1*1 + 5*5*5 + 3*3*3 =1+12...
[ { "code": null, "e": 1160, "s": 1062, "text": "How to check whether the given number is an Armstrong number or not using C Programming language?" }, { "code": null, "e": 1240, "s": 1160, "text": "Armstrong number is the number that is equal to the sum of cubes of its digits." }...
C++ Program for Sieve of Eratosthenes - GeeksforGeeks
27 Feb, 2018 Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number.For example, if n is 10, the output should be “2, 3, 5, 7”. If n is 20, the output should be “2, 3, 5, 7, 11, 13, 17, 19”. // C++ program to print all primes smaller than or equal to// n using Sieve of ...
[ { "code": null, "e": 24552, "s": 24524, "text": "\n27 Feb, 2018" }, { "code": null, "e": 24780, "s": 24552, "text": "Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number.For example, if n is 10, the output should be “2, 3, 5, 7”...
Python - Cast datatype of only a single column in a Pandas DataFrame
To cast only a single column, use the astype() method. Let us first create a DataFrame with 2 columns. One of them is a “float64” type and another “int64” − dataFrame = pd.DataFrame( { "Reg_Price": [7000.5057, 1500, 5000, 8000, 9000.75768, 6000], "Units": [90, 120, 100, 150, 200, 130] } ) Check the ty...
[ { "code": null, "e": 1219, "s": 1062, "text": "To cast only a single column, use the astype() method. Let us first create a DataFrame with 2 columns. One of them is a “float64” type and another “int64” −" }, { "code": null, "e": 1370, "s": 1219, "text": "dataFrame = pd.DataFrame(...
What is the difference between setTimeout() and setInterval() in JavaScript?
setTimeout( function, duration) − This function calls function after duration milliseconds from now. This goes for one execution. Let’s see an example − It waits for 2000 milliseconds, and then runs the callback function alert(‘Hello’) − setTimeout(function() { alert('Hello');}, 2000); setInterval(function, duration) −...
[ { "code": null, "e": 1215, "s": 1062, "text": "setTimeout( function, duration) − This function calls function after duration milliseconds from now. This goes for one execution. Let’s see an example −" }, { "code": null, "e": 1300, "s": 1215, "text": "It waits for 2000 millisecond...
Apply Propensity Score Methods in Causal Inference — Part 1: Stratification | by Shuangyuan (Sharon) Wei | Towards Data Science
This article introduces and implements the framework of propensity score method from Dehejia and Wahba (1999) “Causal Effects in Non-Experimental Studies: Reevaluating the Evaluation of Training Programs,” Journal of the American Statistical Association, Vol. 94, No448 (December 1999), pp. 1053–1062. I will briefly go ...
[ { "code": null, "e": 527, "s": 47, "text": "This article introduces and implements the framework of propensity score method from Dehejia and Wahba (1999) “Causal Effects in Non-Experimental Studies: Reevaluating the Evaluation of Training Programs,” Journal of the American Statistical Association, V...
Unrestricted Grammar
Theory of Computation In automaton, Unrestricted Grammar or Phrase Structure Grammar is the most general in the Chomsky Hierarchy of classification. This is type0 grammar, generally used to generate Recursively Enumerable languages. It is called unrestricted because no other restriction is made on this except each of t...
[ { "code": null, "e": 112, "s": 90, "text": "Theory of Computation" }, { "code": null, "e": 584, "s": 112, "text": "In automaton, Unrestricted Grammar or Phrase Structure Grammar is the most general in the Chomsky Hierarchy of classification. This is type0 grammar, generally used ...
Cisco Switch Configuration basic commands - GeeksforGeeks
03 Jul, 2020 Prerequisite – Switch Functions A switch is a layer 2 device used to forward packet from one device to another within the network. It forwards the packet through one of its ports on the basis of destination MAC address and the entry in the MAC table. Following basic commands are used to configure a new swi...
[ { "code": null, "e": 24536, "s": 24508, "text": "\n03 Jul, 2020" }, { "code": null, "e": 24568, "s": 24536, "text": "Prerequisite – Switch Functions" }, { "code": null, "e": 24787, "s": 24568, "text": "A switch is a layer 2 device used to forward packet from o...
Symfony - Routing
Routing maps request URI to a specific controller's method. In general, any URI has the following three parts − Hostname segment Path segment Query segment For example, in URI / URL, http://www.tutorialspoint.com/index?q=data, www.tutorialspoint.com is the host name segment, index is the path segment and q=data is the ...
[ { "code": null, "e": 2315, "s": 2203, "text": "Routing maps request URI to a specific controller's method. In general, any URI has the following three parts −" }, { "code": null, "e": 2332, "s": 2315, "text": "Hostname segment" }, { "code": null, "e": 2345, "s": 2...
CSS3 - 2d Transforms
2D transforms are used to re-change the element structure as translate, rotate, scale, and skew. The following table has contained common values which are used in 2D transforms − matrix(n,n,n,n,n,n) Used to defines matrix transforms with six values translate(x,y) Used to transforms the element along with x-axis and y-a...
[ { "code": null, "e": 2723, "s": 2626, "text": "2D transforms are used to re-change the element structure as translate, rotate, scale, and skew." }, { "code": null, "e": 2805, "s": 2723, "text": "The following table has contained common values which are used in 2D transforms −" ...
C - Floating Point Data Types - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to learn about...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
C# | Nesting of try and catch blocks
01 Aug, 2019 In C#, the nesting of the try & catch block is allowed. The nesting of try block means one try block can be nested into another try block. The various programmer uses the outer try block to handling serious exceptions, whereas the inner block for handling normal exceptions. Note: If an exception raises in ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2019" }, { "code": null, "e": 303, "s": 28, "text": "In C#, the nesting of the try & catch block is allowed. The nesting of try block means one try block can be nested into another try block. The various programmer uses the oute...
Creating Responsive Grid Vanilla using HTML,CSS and Bootstrap
13 Aug, 2020 Many modern websites use a grid system to display chunks of data on their home-page as well as other pages. To much extent grid resembles a table, however, it is much more visually appealing and most often displays sibling elements. A grid must be responsive, i.e. it should adjust to the screen size of the...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2020" }, { "code": null, "e": 342, "s": 28, "text": "Many modern websites use a grid system to display chunks of data on their home-page as well as other pages. To much extent grid resembles a table, however, it is much more vis...
Multiples of 3 and 5 without using % operator
02 Dec, 2021 Write a short program that prints each number from 1 to n on a new line. For each multiple of 3, print “Multiple of 3” instead of the number.For each multiple of 5, print “Multiple of 5” instead of the number.For numbers which are multiples of both 3 and 5, print “Multiple of 3. Multiple of 5.” instead o...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Dec, 2021" }, { "code": null, "e": 127, "s": 52, "text": "Write a short program that prints each number from 1 to n on a new line. " }, { "code": null, "e": 373, "s": 127, "text": "For each multiple of 3, print ...
Convert multiple JSON files to CSV Python
29 Dec, 2020 In this article, we will learn how to convert multiple JSON files to CSV file in Python. Before that just recall some terms : JSON File: A JSON file may be a file that stores simple data structures and objects in JavaScript Object Notation (JSON) format, which may be a standard data interchange format. It...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Dec, 2020" }, { "code": null, "e": 178, "s": 52, "text": "In this article, we will learn how to convert multiple JSON files to CSV file in Python. Before that just recall some terms :" }, { "code": null, "e": 446, "s...
Jackson - Object Serialization
let's serialize a java object to a json file and then read that json file to get the object back. In this example, we've created Student class. We'll create a student.json file which will have a json representation of Student object. Create a java class file named JacksonTester in C:\>Jackson_WORKSPACE. File: JacksonTe...
[ { "code": null, "e": 2121, "s": 1887, "text": "let's serialize a java object to a json file and then read that json file to get the object back. In this example, we've created Student class. We'll create a student.json file which will have a json representation of Student object." }, { "code...
Possible to make a divisible by 3 number using all digits in an array
07 Jun, 2022 Given an array of integers, the task is to find whether it’s possible to construct an integer using all the digits of these numbers such that it would be divisible by 3. If it is possible then print “Yes” and if not print “No”. Examples: Input : arr[] = {40, 50, 90} Output : Yes We can construct a number...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jun, 2022" }, { "code": null, "e": 292, "s": 52, "text": "Given an array of integers, the task is to find whether it’s possible to construct an integer using all the digits of these numbers such that it would be divisible by 3. If i...
Java Signature getInstance() method with Examples
12 May, 2021 The getInstance() method of java.security.Provider class is used to return a Signature object that implements the specified signature algorithm. This method traverses the list of registered security Providers, starting with the most preferred Provider. A new Signature object encapsulating the SignatureSpi ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 May, 2021" }, { "code": null, "e": 173, "s": 28, "text": "The getInstance() method of java.security.Provider class is used to return a Signature object that implements the specified signature algorithm." }, { "code": null, ...
Python – Maximum and Minimum K elements in Tuple
16 Aug, 2021 Sometimes, while dealing with tuples, we can have problem in which we need to extract only extreme K elements, i.e maximum and minimum K elements in Tuple. This problem can have applications across domains such as web development and Data Science. Let’s discuss certain ways in which this problem can be sol...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Aug, 2021" }, { "code": null, "e": 365, "s": 52, "text": "Sometimes, while dealing with tuples, we can have problem in which we need to extract only extreme K elements, i.e maximum and minimum K elements in Tuple. This problem can h...
How to filter nested objects in JavaScript ?
05 Nov, 2020 The filter() method creates a new array with all elements that pass the test implemented by the provided function. Approach 1: This approach uses filter() method to filter the nested object in JavaScript. Example: HTML <!DOCTYPE html><html> <body> <h2>Output</h2> <p id="Output"></p> <script> ...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Nov, 2020" }, { "code": null, "e": 169, "s": 54, "text": "The filter() method creates a new array with all elements that pass the test implemented by the provided function." }, { "code": null, "e": 259, "s": 169, ...
Creating array of pointers in C++
23 Jun, 2022 An array of pointers is an array of pointer variables. It is also known as pointer arrays. We will discuss how to create a 1D and 2D array of pointers dynamically. The word dynamic signifies that the memory is allocated during the runtime, and it allocates memory in Heap Section. In a Stack, memory is limi...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 437, "s": 52, "text": "An array of pointers is an array of pointer variables. It is also known as pointer arrays. We will discuss how to create a 1D and 2D array of pointers dynamically. The word d...
How to get all alphabetic chars in an array in PHP ?
10 Oct, 2019 All alphabetic characters in an array can be achieved by using chr(), range() with for and foreach loop in PHP. To display the array elements as output we can use echo, print_r() and var_dump() function. Using range() function: This function is used to create an array of elements of any kind such as intege...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Oct, 2019" }, { "code": null, "e": 232, "s": 28, "text": "All alphabetic characters in an array can be achieved by using chr(), range() with for and foreach loop in PHP. To display the array elements as output we can use echo, print_...
Python | Pandas Series.subtract()
05 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.subtract() function basically perfor...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Feb, 2019" }, { "code": null, "e": 285, "s": 28, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index...
How to modify existing figure instance in Matplotlib?
13 Dec, 2021 In Python matplotlib.pyplot.figure() is used to modify existing Figure instance or make a new Figure instance. Generally, it is used to alter the basic properties of existing plots. It takes references to the concerned plots in case if it is used to alter the properties of the already formed plots. It retu...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Dec, 2021" }, { "code": null, "e": 497, "s": 28, "text": "In Python matplotlib.pyplot.figure() is used to modify existing Figure instance or make a new Figure instance. Generally, it is used to alter the basic properties of existing ...
Difference between 3-address instruction and 2-address instructions
20 Jun, 2020 Prerequisite – Instruction Formats1. Three-Address Instructions :Three-address instruction is a format of machine instruction. It has one opcode and three address fields. One address field is used for destination and two address fields for source. Example – X = (A + B) x (C + D) Solution: ADD R1, A, B ...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jun, 2020" }, { "code": null, "e": 302, "s": 54, "text": "Prerequisite – Instruction Formats1. Three-Address Instructions :Three-address instruction is a format of machine instruction. It has one opcode and three address fields. One...
PHP 7 - Return Type Declarations
In PHP 7, a new feature, Return type declarations has been introduced. Return type declaration specifies the type of value that a function should return. Following types for return types can be declared. int float bool string interfaces array callable <?php declare(strict_types = 1); function returnIntValue(int $...
[ { "code": null, "e": 2415, "s": 2211, "text": "In PHP 7, a new feature, Return type declarations has been introduced. Return type declaration specifies the type of value that a function should return. Following types for return types can be declared." }, { "code": null, "e": 2419, "s...
Iterative Postorder Traversal | Set 1 (Using Two Stacks)
21 Jun, 2022 We have discussed iterative inorder and iterative preorder traversals. In this post, iterative postorder traversal is discussed, which is more complex than the other two traversals (due to its nature of non-tail recursion, there is an extra statement after the final recursive call to itself). Postorder tra...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 1516, "s": 54, "text": "We have discussed iterative inorder and iterative preorder traversals. In this post, iterative postorder traversal is discussed, which is more complex than the other two tra...
Node JS | Password Hashing with Crypto module
06 Dec, 2019 In real life applications with User authentication functionality, it is not practical to store user password as the original string in the database but it is good practice to hash the password and then store them into the database. Crypto module for Node JS helps developers to hash user password. Examples:...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Dec, 2019" }, { "code": null, "e": 284, "s": 52, "text": "In real life applications with User authentication functionality, it is not practical to store user password as the original string in the database but it is good practice to...
Java Program to Remove Duplicate Elements From the Array
13 Jun, 2022 An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. For simplicity, we can think of an array as a fleet of stairs where on each step is placed a value Given an array, the task is to remove the duplicate elements from the ar...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jun, 2022" }, { "code": null, "e": 263, "s": 28, "text": "An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. For simplicity, we can think of an arra...
Rendering Data-Frame to html template in table view using Django Framework
05 Sep, 2020 In Django, It is easy to render the HTML templates by setting URLs of respective HTML pages. Here we will let to know about how we can work with DataFrame to modify them for table view in the HTML template or web-pages, and for that, we have to use ‘render’ and ‘HttpResponse’ functions to manipulate the da...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Sep, 2020" }, { "code": null, "e": 384, "s": 52, "text": "In Django, It is easy to render the HTML templates by setting URLs of respective HTML pages. Here we will let to know about how we can work with DataFrame to modify them for ...
Graph representations using set and hash
30 Jun, 2022 We have introduced Graph implementation using array of vectors in Graph implementation using STL for competitive programming | Set 1. In this post, a different implementation is used which can be used to implement graphs using sets. The implementation is for adjacency list representation of graph. A set is...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 351, "s": 52, "text": "We have introduced Graph implementation using array of vectors in Graph implementation using STL for competitive programming | Set 1. In this post, a different implementation...
\Bbbk - Tex Command
\Bbbk - Used to draw blackboard-bold lowercase k. { \Bbbk } \Bbbk command draws draw blackboard-bold lowercase k.
[ { "code": null, "e": 8170, "s": 8120, "text": "\\Bbbk - Used to draw blackboard-bold lowercase k." }, { "code": null, "e": 8180, "s": 8170, "text": "{ \\Bbbk }" } ]
C Program for Disjoint Set (Or Union-Find) | Set 1 (Detect Cycle in an Undirected Graph)
22 Dec, 2021 A disjoint-set data structure is a data structure that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. A union-find algorithm is an algorithm that performs two useful operations on such a data structure: Find: Determine which subset a particular element is ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Dec, 2021" }, { "code": null, "e": 282, "s": 28, "text": "A disjoint-set data structure is a data structure that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. A union-find algorithm...
Type Switches in GoLang
15 Oct, 2021 A switch is a multi-way branch statement used in place of multiple if-else statements but can also be used to find out the dynamic type of an interface variable. A type switch is a construct that performs multiple type assertions to determine the type of variable (rather than values) and runs the first mat...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2021" }, { "code": null, "e": 454, "s": 28, "text": "A switch is a multi-way branch statement used in place of multiple if-else statements but can also be used to find out the dynamic type of an interface variable. A type switch...
Count All Palindrome Sub-Strings in a String | Set 1 - GeeksforGeeks
13 May, 2022 Given a string, the task is to count all palindrome sub string in a given string. Length of palindrome sub string is greater than or equal to 2. Examples: Input : str = "abaab" Output: 3 Explanation : All palindrome substring are : "aba" , "aa" , "baab" Input : str = "abbaeae" Output: 4 Explanation :...
[ { "code": null, "e": 26119, "s": 26091, "text": "\n13 May, 2022" }, { "code": null, "e": 26265, "s": 26119, "text": "Given a string, the task is to count all palindrome sub string in a given string. Length of palindrome sub string is greater than or equal to 2. " }, { "co...
Divide a number into two unequal even parts - GeeksforGeeks
29 Dec, 2021 Given a positive integer N. The task is to decide whether the integer can be divided into two unequal positive even parts or not. Examples: Input: N = 8Output: YESExplanation: 8 can be divided into two different even parts i.e. 2 and 6. Input: N = 5Output: NOExplanation: 5 can not be divided into two even ...
[ { "code": null, "e": 26726, "s": 26698, "text": "\n29 Dec, 2021" }, { "code": null, "e": 26856, "s": 26726, "text": "Given a positive integer N. The task is to decide whether the integer can be divided into two unequal positive even parts or not." }, { "code": null, "...
Output of C programs | Set 33 (rand() and srand()) - GeeksforGeeks
22 Apr, 2021 You came across how to generate random numbers and use of two C function rand() and srand() from the article rand() and srand() in C\C++.Listed below are some output related multiple choice question on random numbers.1. Return type of rand() function is: a) short b) int c) char d) float Answer: b Explanat...
[ { "code": null, "e": 25573, "s": 25545, "text": "\n22 Apr, 2021" }, { "code": null, "e": 25870, "s": 25573, "text": "You came across how to generate random numbers and use of two C function rand() and srand() from the article rand() and srand() in C\\C++.Listed below are some out...
Java AWT | Canvas Class - GeeksforGeeks
02 Jul, 2021 Canvas class is a part of Java AWT. Canvas is a blank rectangular area where the user can draw or trap input from the user. Canvas class inherits the Component class.Constructor of the Canvas class are : Canvas(): Creates a new blank canvas.Canvas(GraphicsConfiguration c): Creates a new canvas with a spe...
[ { "code": null, "e": 25731, "s": 25703, "text": "\n02 Jul, 2021" }, { "code": null, "e": 25937, "s": 25731, "text": "Canvas class is a part of Java AWT. Canvas is a blank rectangular area where the user can draw or trap input from the user. Canvas class inherits the Component cla...
How to add filter to the background image using CSS ? - GeeksforGeeks
15 Oct, 2020 The purpose of this article is to learn how to add filters to an image using CSS. The CSS filter property is used to set the visual effect of an element. This property is mostly used in image content. Syntax: filter: none | blur() | brightness() | contrast() | drop-shadow() | grayscale() | hue-rotate() | i...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n15 Oct, 2020" }, { "code": null, "e": 26822, "s": 26621, "text": "The purpose of this article is to learn how to add filters to an image using CSS. The CSS filter property is used to set the visual effect of an element. This prop...
Closest leaf to a given node in Binary Tree - GeeksforGeeks
10 May, 2021 Given a Binary Tree and a node x in it, find distance of the closest leaf to x in Binary Tree. If given node itself is a leaf, then distance is 0.Examples: Input: Root of below tree And x = pointer to node 13 10 / \ 12 13 / 14 Outp...
[ { "code": null, "e": 26701, "s": 26673, "text": "\n10 May, 2021" }, { "code": null, "e": 26859, "s": 26701, "text": "Given a Binary Tree and a node x in it, find distance of the closest leaf to x in Binary Tree. If given node itself is a leaf, then distance is 0.Examples: " },...
Node.js assert.throws() Function - GeeksforGeeks
06 Oct, 2021 The assert module provides a set of assertion functions for verifying invariants. The assert.throws() is used when the code throws an exception based on a specific circumstances, to catch the error object for testing and comparison. Syntax: assert.throws(fn[, error][, message]) Parameters: This function a...
[ { "code": null, "e": 26293, "s": 26265, "text": "\n06 Oct, 2021" }, { "code": null, "e": 26526, "s": 26293, "text": "The assert module provides a set of assertion functions for verifying invariants. The assert.throws() is used when the code throws an exception based on a specific...
Number validation in JavaScript - GeeksforGeeks
14 Aug, 2020 Sometimes the data entered into a text field needs to be in the right format and must be of a particular type in order to effectively use the form. For instance, Phone number, Roll number, etc are some details that are must be in digits not in alphabets. Approach: We have used isNaN() function for validati...
[ { "code": null, "e": 26125, "s": 26097, "text": "\n14 Aug, 2020" }, { "code": null, "e": 26380, "s": 26125, "text": "Sometimes the data entered into a text field needs to be in the right format and must be of a particular type in order to effectively use the form. For instance, P...
Line chart in Matplotlib - Python - GeeksforGeeks
20 Oct, 2020 Matplotlib is a data visualization library in Python. The pyplot, a sublibrary of matplotlib, is a collection of functions that helps in creating a variety of charts. Line charts are used to represent the relation between two data X and Y on a different axis. Here we will see some of the examples of a lin...
[ { "code": null, "e": 31573, "s": 31545, "text": "\n20 Oct, 2020" }, { "code": null, "e": 31900, "s": 31573, "text": "Matplotlib is a data visualization library in Python. The pyplot, a sublibrary of matplotlib, is a collection of functions that helps in creating a variety of char...
LocalDate isEqual() method in Java with Examples - GeeksforGeeks
29 Nov, 2018 The isEqual() method of LocalDate class in Java checks if this date is equal to the specified date or not. Syntax: public boolean isEqual(ChronoLocalDate date2) Parameter: This method accept a single mandatory parameter date2 the other date to compare to and not null. Return Value: The function returns tr...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n29 Nov, 2018" }, { "code": null, "e": 25332, "s": 25225, "text": "The isEqual() method of LocalDate class in Java checks if this date is equal to the specified date or not." }, { "code": null, "e": 25340, "s": 253...
Predicting Stars, Galaxies & Quasars with Random Forest Classifiers in Python | by Theodore Yoong | Towards Data Science
Recently, in my quest to search for interesting (physics-related) datasets, I chanced upon the Sloan Digital Sky Survey (SDSS) dataset on Kaggle, as well as a brilliant Kaggle kernel by Faraz Rahman which predicted the different types of astronomical objects (stars, galaxies, and quasars) using Support Vector Machines ...
[ { "code": null, "e": 703, "s": 172, "text": "Recently, in my quest to search for interesting (physics-related) datasets, I chanced upon the Sloan Digital Sky Survey (SDSS) dataset on Kaggle, as well as a brilliant Kaggle kernel by Faraz Rahman which predicted the different types of astronomical obje...
How to convert NaN to 0 using JavaScript ? - GeeksforGeeks
15 Apr, 2020 NaN (Not a Number) is usually used to indicate an error condition for a function that should return a valid number but it can be converted to 0 using JavaScript. In this article, we will convert the NaN to 0. Using isNaN() method: The isNan() method is used to check the given number is NaN or not. If isNaN...
[ { "code": null, "e": 24954, "s": 24926, "text": "\n15 Apr, 2020" }, { "code": null, "e": 25163, "s": 24954, "text": "NaN (Not a Number) is usually used to indicate an error condition for a function that should return a valid number but it can be converted to 0 using JavaScript. I...
Medical X-ray ⚕️ Image Classification using Convolutional Neural Network | by Hardik Deshmukh | Towards Data Science
The web application has been deployed to streamlit share : https://share.streamlit.io/smarthardik10/xray-classifier/main/webapp.py The DatasetInitializePreparing the Data The Dataset Initialize Preparing the Data 3.1 Data Augmentation 3.2 Loading the images 4. Convolutional Neural Network 4.1 Necessary imports 4.2 CNN ...
[ { "code": null, "e": 302, "s": 171, "text": "The web application has been deployed to streamlit share : https://share.streamlit.io/smarthardik10/xray-classifier/main/webapp.py" }, { "code": null, "e": 342, "s": 302, "text": "The DatasetInitializePreparing the Data" }, { "...
Const member functions in C++
The const member functions are the functions which are declared as constant in the program. The object called by these functions cannot be modified. It is recommended to use const keyword so that accidental changes to object are avoided. A const member function can be called by any type of object. Non-const functions c...
[ { "code": null, "e": 1300, "s": 1062, "text": "The const member functions are the functions which are declared as constant in the program. The object called by these functions cannot be modified. It is recommended to use const keyword so that accidental changes to object are avoided." }, { "...
1's complement notation
This is one of the methods of representing signed integers in the computer. In this method, the most significant digit (MSD) takes on extra meaning. If the MSD is a 0, we can evaluate the number just as we would interpret any normal unsigned integer. If the MSD is a 1, this indicates that the number is negative. The ot...
[ { "code": null, "e": 1211, "s": 1062, "text": "This is one of the methods of representing signed integers in the computer. In this method, the most significant digit (MSD) takes on extra meaning." }, { "code": null, "e": 1313, "s": 1211, "text": "If the MSD is a 0, we can evaluat...
How to generate prime twins using Python?
Twin primes are pairs of primes which differ by two. The first twin primes are {3,5}, {5,7}, {11,13} and {17,19}. You can generate prime twins in python by running a for loop and checking for primality of the numbers as you do so. def is_prime(n): for i in range(2, n): if n % i == 0: return False ...
[ { "code": null, "e": 1294, "s": 1062, "text": "Twin primes are pairs of primes which differ by two. The first twin primes are {3,5}, {5,7}, {11,13} and {17,19}. You can generate prime twins in python by running a for loop and checking for primality of the numbers as you do so. " }, { "code":...
Breaking Down Geocoding in R: A Complete Guide | by Oleksandr Titorchuk | Towards Data Science
If you ever wondered how to build maps similar to the ones you constantly see in your apps, it’s probably a good place to start. In this tutorial we will cover how to find a place based on its description or coordinates and how to build a simple map based on that information. Please note that this article assumes some ...
[ { "code": null, "e": 449, "s": 172, "text": "If you ever wondered how to build maps similar to the ones you constantly see in your apps, it’s probably a good place to start. In this tutorial we will cover how to find a place based on its description or coordinates and how to build a simple map based...
Deploying a Machine Learning Model as a REST API | by Nguyen Ngo | Towards Data Science
As a Python developer and data scientist, I have a desire to build web apps to showcase my work. As much as I like to design the front-end, it becomes very overwhelming to take both machine learning and app development. So, I had to find a solution that could easily integrate my machine learning models with other devel...
[ { "code": null, "e": 550, "s": 172, "text": "As a Python developer and data scientist, I have a desire to build web apps to showcase my work. As much as I like to design the front-end, it becomes very overwhelming to take both machine learning and app development. So, I had to find a solution that c...
Python | Test if all elements are present in list - GeeksforGeeks
27 Sep, 2019 Sometimes, while working with Python list, we have a problem in which we need to check for a particular list of values and want to be sure if a target list contains all the given values. This has it’s application in web development domain when required some type of filtering. Let’s discuss a way in which t...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n27 Sep, 2019" }, { "code": null, "e": 24235, "s": 23901, "text": "Sometimes, while working with Python list, we have a problem in which we need to check for a particular list of values and want to be sure if a target list contain...
Make your Pandas apply functions faster using Parallel Processing | by Rahul Agarwal | Towards Data Science
Parallelization is awesome. We data scientists have got laptops with quad-core, octa-core, turbo-boost. We work with servers with even more cores and computing power. But do we really utilize the raw power we have at hand? Instead, we wait for time taking processes to finish. Sometimes for hours, when urgent deliverabl...
[ { "code": null, "e": 199, "s": 171, "text": "Parallelization is awesome." }, { "code": null, "e": 338, "s": 199, "text": "We data scientists have got laptops with quad-core, octa-core, turbo-boost. We work with servers with even more cores and computing power." }, { "code...
How to extract correlation coefficient value from correlation test in R?
To perform the correlation test in R, we need to use cor.test function with two variables and it returns so many values such as test statistic value, degrees of freedom, the p-value, the confidence interval, and the correlation coefficient value. If we want to extract the correlation coefficient value from the correlat...
[ { "code": null, "e": 1463, "s": 1062, "text": "To perform the correlation test in R, we need to use cor.test function with two variables and it returns so many values such as test statistic value, degrees of freedom, the p-value, the confidence interval, and the correlation coefficient value. If we ...
The 5 Packages You Should Know for Text Analysis with R | by Céline Van den Rul | Towards Data Science
install.packages("quanteda")library(quanteda) Quanteda is the go-to package for quantitative text analysis. Developed by Kenneth Benoit and other contributors, this package is a must for any data scientist doing text analysis. Why? Because this package allows you to do A LOT. This ranges from the basics in natural lang...
[ { "code": null, "e": 217, "s": 171, "text": "install.packages(\"quanteda\")library(quanteda)" }, { "code": null, "e": 398, "s": 217, "text": "Quanteda is the go-to package for quantitative text analysis. Developed by Kenneth Benoit and other contributors, this package is a must f...
C# ToTuple() Method
Let’s say you have a ValueTuple and would like to convert it to a tuple, then use the ToTuple() method. With C#, we can easily convert a ValueTuple to a Tuple using ToTuple() method. Note − Add System.ValueTuple package to run ValueTuple program. Let’s see how to add it − Go to your project Right click on the project i...
[ { "code": null, "e": 1166, "s": 1062, "text": "Let’s say you have a ValueTuple and would like to convert it to a tuple, then use the ToTuple() method." }, { "code": null, "e": 1245, "s": 1166, "text": "With C#, we can easily convert a ValueTuple to a Tuple using ToTuple() method....
C Program for Minimum number of jumps to reach the end
We are given, an array of non-negative integers denoting the maximum number of steps that can be made forward from that element. The pointer is initially positioned at the first index [0 index] of the array. Your goal is to reach the last index of the array in the minimum number of steps. If it is not possible to reach...
[ { "code": null, "e": 1436, "s": 1062, "text": "We are given, an array of non-negative integers denoting the maximum number of\nsteps that can be made forward from that element. The pointer is initially positioned at the first index [0 index] of the array. Your goal is to reach the last\nindex of the...
ASP.NET - File Uploading
ASP.NET has two controls that allow users to upload files to the web server. Once the server receives the posted file data, the application can save it, check it, or ignore it. The following controls allow the file uploading: HtmlInputFile - an HTML server control HtmlInputFile - an HTML server control FileUpload - and...
[ { "code": null, "e": 2573, "s": 2347, "text": "ASP.NET has two controls that allow users to upload files to the web server. Once the server receives the posted file data, the application can save it, check it, or ignore it. The following controls allow the file uploading:" }, { "code": null,...
MongoDB query to find documents whose array contains a string that is a substring of a specific word
For such evaluations, use aggregate() in MongoDB. Let us create a collection with documents − > db.demo90.insertOne( ... {"words": ["john", "jace"] ... } ... ); { "acknowledged" : true, "insertedId" : ObjectId("5e2c1ada79799acab037af56") } > db.demo90.insertOne( ... {"words": ["sam", "adam"] ... } ... ); { "ac...
[ { "code": null, "e": 1156, "s": 1062, "text": "For such evaluations, use aggregate() in MongoDB. Let us create a collection with documents −" }, { "code": null, "e": 1459, "s": 1156, "text": "> db.demo90.insertOne(\n... {\"words\": [\"john\", \"jace\"]\n... }\n... );\n{\n \"ack...
Appending data to a MySQL field that already has data in it?
You can append data to a MySQL database field with the help of in-built CONCAT() function. The syntax is as follows − update yourTableName set yourColumnName = CONCAT(yourColumnName,’AppendValue’); To understand the above concept, let us create a table. The query to create a table − mysql> create table AppendingDataDem...
[ { "code": null, "e": 1153, "s": 1062, "text": "You can append data to a MySQL database field with the help of in-built CONCAT() function." }, { "code": null, "e": 1180, "s": 1153, "text": "The syntax is as follows −" }, { "code": null, "e": 1260, "s": 1180, "t...
Program for Area Of Square in C++
We are given with a side of a rectangle and our task is to print the area of the square from that side. Square is 2-D plain figure which have 4 sides and forms 4 angles of 90degree each and all the sides are of equal shape. In other words we can say that the square is a form of rectangle with equal sides. Given below i...
[ { "code": null, "e": 1166, "s": 1062, "text": "We are given with a side of a rectangle and our task is to print the area of the square from that side." }, { "code": null, "e": 1369, "s": 1166, "text": "Square is 2-D plain figure which have 4 sides and forms 4 angles of 90degree e...
Python 3 - dictionary fromkeys() Method
The method fromkeys() creates a new dictionary with keys from seq and values set to value. Following is the syntax for fromkeys() method − dict.fromkeys(seq[, value])) seq − This is the list of values which would be used for dictionary keys preparation. seq − This is the list of values which would be used for dictiona...
[ { "code": null, "e": 2431, "s": 2340, "text": "The method fromkeys() creates a new dictionary with keys from seq and values set to value." }, { "code": null, "e": 2479, "s": 2431, "text": "Following is the syntax for fromkeys() method −" }, { "code": null, "e": 2509, ...
Java Examples - Find an object in Array
How to find an object or a string in an Array? Following example uses Contains method to search a String in the Array. import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList objArray = new ArrayList(); ArrayList objArray2 = new ArrayList(); objArray2.add...
[ { "code": null, "e": 2115, "s": 2068, "text": "How to find an object or a string in an Array?" }, { "code": null, "e": 2187, "s": 2115, "text": "Following example uses Contains method to search a String in the Array." }, { "code": null, "e": 2909, "s": 2187, "...
Example and usage of JOINS in DB2
Problem: How will you find the ORDER_ID, TRANSACTION_ID and TRANSACTION_STATUS from ORDERS and TRANSACTIONS DB2 table using joins? We can find ORDER_ID, TRANSACTION_ID and TRANSACTION_STATUS from ORDERS and TRANSACTIONS table using the INNER JOIN query. For example, if we have below 2 ORDERS table. We can use an inne...
[ { "code": null, "e": 1193, "s": 1062, "text": "Problem: How will you find the ORDER_ID, TRANSACTION_ID and TRANSACTION_STATUS from ORDERS and TRANSACTIONS DB2 table using joins?" }, { "code": null, "e": 1316, "s": 1193, "text": "We can find ORDER_ID, TRANSACTION_ID and TRANSACTIO...
gzip.decompress(s) in Python - GeeksforGeeks
26 Mar, 2020 With the help of gzip.decompress(s) method, we can decompress the compressed bytes of string into original string by using gzip.decompress(s) method. Syntax : gzip.decompress(string)Return : Return decompressed string. Example #1 :In this example we can see that by using gzip.decompress(s) method, we are a...
[ { "code": null, "e": 24386, "s": 24358, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24536, "s": 24386, "text": "With the help of gzip.decompress(s) method, we can decompress the compressed bytes of string into original string by using gzip.decompress(s) method." }, { ...
How to create a frequency table in data frame format in R?
To create a frequency table in R, we can simply use table function but the output of table function returns a horizontal table. If we want to read the table in data frame format then we would need to read the table as a data frame using as.data.frame function. For example, if we have a table called T then to convert it...
[ { "code": null, "e": 1449, "s": 1062, "text": "To create a frequency table in R, we can simply use table function but the output of table function returns a horizontal table. If we want to read the table in data frame format then we would need to read the table as a data frame using as.data.frame fu...
K-Means Clustering Explained: Algorithm And Sklearn Implementation | by Marius Borcan | Towards Data Science
K-Means clustering is one of the most powerful clustering algorithms in the Data Science and Machine Learning world. It is very simple, yet it delivers wonderful results. And because clustering is a very important step for understanding a dataset, in this article we are going to discuss what is clustering, why do we ne...
[ { "code": null, "e": 443, "s": 47, "text": "K-Means clustering is one of the most powerful clustering algorithms in the Data Science and Machine Learning world. It is very simple, yet it delivers wonderful results. And because clustering is a very important step for understanding a dataset, in this ...
React Native - Images
In this chapter, we will understand how to work with images in React Native. Let us create a new folder img inside the src folder. We will add our image (myImage.png) inside this folder. We will show images on the home screen. import React from 'react'; import ImagesExample from './ImagesExample.js' const App = () => ...
[ { "code": null, "e": 2421, "s": 2344, "text": "In this chapter, we will understand how to work with images in React Native." }, { "code": null, "e": 2531, "s": 2421, "text": "Let us create a new folder img inside the src folder. We will add our image (myImage.png) inside this fol...
Fine-tune GPT2 for Text Generation Using Pytorch | Towards Data Science
The past few years have been especially booming in the world of NLP. This is mainly due to one of the most important breakthroughs of NLP in the modern decade — Transformers. If you haven’t read my previous article on BERT for text classification, go ahead and take a look! Another popular transformer that we will talk ...
[ { "code": null, "e": 903, "s": 172, "text": "The past few years have been especially booming in the world of NLP. This is mainly due to one of the most important breakthroughs of NLP in the modern decade — Transformers. If you haven’t read my previous article on BERT for text classification, go ahea...
How can I check the version of MySQL Server?
With the help of ‘mysqladmin’ program we would be able to know about the version of our MySQL server. To get the version we should have to write the following command on command line − C:\mysql\bin>mysqladmin -u root version mysqladmin Ver 8.42 Distrib 5.7.20, for Win64 on x86_64 Copyright (c) 2000, 2017, Oracle and/or...
[ { "code": null, "e": 1247, "s": 1062, "text": "With the help of ‘mysqladmin’ program we would be able to know about the version of our MySQL server. To get the version we should have to write the following command on command line −" }, { "code": null, "e": 1825, "s": 1247, "text"...
Basic Calculator Program Using Java - GeeksforGeeks
17 Nov, 2020 Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication or division depending upon the user input. Example : Enter the numbers: 2 2 Enter the operator (+,-,*,/) + The final result: 2.0 + 2.0 = 4.0 Approach Used: Take two numbers using the Scanner...
[ { "code": null, "e": 23974, "s": 23946, "text": "\n17 Nov, 2020" }, { "code": null, "e": 24133, "s": 23974, "text": "Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication or division depending upon the user input." }...
Java - Loop Control
There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on. Programming languages provide various control structures that allow for more complicated ex...
[ { "code": null, "e": 2606, "s": 2377, "text": "There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on." }, { "code": nu...
AngularJS - Services
AngularJS supports the concept of Separation of Concerns using services architecture. Services are JavaScript functions, which are responsible to perform only specific tasks. This makes them individual entities which are maintainable and testable. The controllers and filters can call them on requirement basis. Services...
[ { "code": null, "e": 3097, "s": 2699, "text": "AngularJS supports the concept of Separation of Concerns using services architecture. Services are JavaScript functions, which are responsible to perform only specific tasks. This makes them individual entities which are maintainable and testable. The c...
10 Examples to Master Python Pathlib | by Soner Yıldırım | Towards Data Science
The pathlib module of Python makes it very easy and efficient to deal with file paths. The os.path module can also be used to handle path name operations. The difference is that path module creates strings that represent file paths whereas pathlib creates a path object. One important advantage of using path objects ins...
[ { "code": null, "e": 259, "s": 172, "text": "The pathlib module of Python makes it very easy and efficient to deal with file paths." }, { "code": null, "e": 443, "s": 259, "text": "The os.path module can also be used to handle path name operations. The difference is that path mod...
Nuts & Bolts Problem (Lock & Key problem) | Set 2 (Hashmap) - GeeksforGeeks
23 Jun, 2021 Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Match nuts and bolts efficiently. Constraint: Comparison of a nut to another nut or a bolt to another bolt is not allowed. It means nut can only be compared with bolt and bolt can onl...
[ { "code": null, "e": 24128, "s": 24100, "text": "\n23 Jun, 2021" }, { "code": null, "e": 24506, "s": 24128, "text": "Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Match nuts and bolts efficiently. Const...
Python - Tuples
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets. Creating a tuple is as simple as putting different comma-separated values. Opti...
[ { "code": null, "e": 2568, "s": 2327, "text": "A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets." }, { ...
Biopython - Overview of BLAST
BLAST stands for Basic Local Alignment Search Tool. It finds regions of similarity between biological sequences. Biopython provides Bio.Blast module to deal with NCBI BLAST operation. You can run BLAST in either local connection or over Internet connection. Let us understand these two connections in brief in the follow...
[ { "code": null, "e": 2364, "s": 2106, "text": "BLAST stands for Basic Local Alignment Search Tool. It finds regions of similarity between biological sequences. Biopython provides Bio.Blast module to deal with NCBI BLAST operation. You can run BLAST in either local connection or over Internet connect...
How to Retrieve Image from Firebase in Realtime in Android? - GeeksforGeeks
29 Dec, 2020 When we are creating an android app then instead of inserting an image manually we want to get that from the internet and using this process the app size will become less. So, using firebase we can do this. We can create our storage bucket and we can insert our image there and get directly into our app. Bu...
[ { "code": null, "e": 25565, "s": 25537, "text": "\n29 Dec, 2020" }, { "code": null, "e": 26325, "s": 25565, "text": "When we are creating an android app then instead of inserting an image manually we want to get that from the internet and using this process the app size will beco...
Geolocation watchPosition() API
The watchPosition method retrieves periodic updates about the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed. The location information is returned in a Position object. Each update returns a new Position object. H...
[ { "code": null, "e": 2825, "s": 2608, "text": "The watchPosition method retrieves periodic updates about the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed." }, { "code": null, "e":...