title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array - GeeksforGeeks | 17 Jun, 2021
Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by (A[i] + B[i]) % N after re-ordering is the smallest lexicographically. The task is to print the lexicographically smallest sequence possible. Note: The array elements are in range [0, n).Ex... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 26358,
"s": 26041,
"text": "Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by (A[i] + B[i]) % N after re-ordering is the sm... |
ReactJS Evergreen Combobox Component - GeeksforGeeks | 05 Jun, 2021
React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly. Combobox Component allows the user to select an option from a predefined list of options. We can use the following approach in Rea... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n05 Jun, 2021"
},
{
"code": null,
"e": 26421,
"s": 26071,
"text": "React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and U... |
Convert integer to string in Python - GeeksforGeeks | 12 May, 2022
In Python an integer can be converted into a string using the built-in str() function. The str() function takes in any python data type and converts it into a string. But use of the str() is not the only way to do so. This type of conversion can also be done using the “%s” keyword, the .format function or ... | [
{
"code": null,
"e": 25914,
"s": 25886,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 26246,
"s": 25914,
"text": "In Python an integer can be converted into a string using the built-in str() function. The str() function takes in any python data type and converts it into a stri... |
Python - Change type of key in Dictionary list - GeeksforGeeks | 10 May, 2020
Sometimes, while working with data, we can have a problem in which we require to change the type of particular keys’ value in list of dictionary. This kind of problem can have application in data domains. Lets discuss certain ways in which this task can be performed.
Input : test_list = [{‘gfg’: 9, ‘best’:... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25805,
"s": 25537,
"text": "Sometimes, while working with data, we can have a problem in which we require to change the type of particular keys’ value in list of dictionary. This kind of prob... |
Shortest distance between a Line and a Point in a 3-D plane - GeeksforGeeks | 08 Feb, 2021
Given a line passing through two points A and B and an arbitrary point C in a 3-D plane, the task is to find the shortest distance between the point C and the line passing through the points A and B.Examples:
Input: A = (5, 2, 1), B = (3, 1, -1), C = (0, 2, 3)
Output: Shortest Distance is 5
Input: A = (4... | [
{
"code": null,
"e": 26433,
"s": 26405,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 26643,
"s": 26433,
"text": "Given a line passing through two points A and B and an arbitrary point C in a 3-D plane, the task is to find the shortest distance between the point C and the line... |
Find closest number in array - GeeksforGeeks | 10 Sep, 2021
Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers.
Examples:
Input : arr[] = {1, 2, 4, 5, 6, 6, 8, 9}
Target number = 11
Output : 9
9 is closest to 11 in given array
Input :arr[] = {2, 5, 6, 7, ... | [
{
"code": null,
"e": 25503,
"s": 25475,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 25651,
"s": 25503,
"text": "Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers. "
},
{
"... |
Python Program to check if given array is Monotonic - GeeksforGeeks | 05 Nov, 2018
Given an array A containing n integers. The task is to check whether the array is Monotonic or not. An array is monotonic if it is either monotone increasing or monotone decreasing.An array A is monotone increasing if for all i <= j, A[i] <= A[j]. An array A is monotone decreasing if for all i <= j, A[i] >... | [
{
"code": null,
"e": 26497,
"s": 26469,
"text": "\n05 Nov, 2018"
},
{
"code": null,
"e": 26897,
"s": 26497,
"text": "Given an array A containing n integers. The task is to check whether the array is Monotonic or not. An array is monotonic if it is either monotone increasing or mo... |
Difference between Normal Processor and AI Processor - GeeksforGeeks | 17 Jul, 2020
Normal Processor :The processors mainly used in several personal computers are normal processors. Basically the central processing unit is described as a processor of the system. It uses integrated chips to organize all the components at a single place. Different brands provide different load based process... | [
{
"code": null,
"e": 26101,
"s": 26073,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 26531,
"s": 26101,
"text": "Normal Processor :The processors mainly used in several personal computers are normal processors. Basically the central processing unit is described as a processor... |
CONCAT_WS() Function in MySQL - GeeksforGeeks | 03 Dec, 2020
CONCAT_WS() :This function in MySQL helps in joining two or more strings along with a separator. The separator must be specified by the user and it can also be a string. If the separator is NULL, then the result will also be NULL.
Syntax :
CONCAT_WS(separator, string1, string2, ...)
Parameters :
separator ... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 24499,
"s": 24268,
"text": "CONCAT_WS() :This function in MySQL helps in joining two or more strings along with a separator. The separator must be specified by the user and it can also be a s... |
Creating custom plotting functions with matplotlib | by Matias Calderini | Towards Data Science | TLDR: Define your own functions that involve plotting onto a specific axes with the following syntax:
def custom_plot(x, y, ax=None, **plt_kwargs): if ax is None: ax = plt.gca() ax.plot(x, y, **plt_kwargs) ## example plot here return(ax)def multiple_custom_plots(x, y, ax=None, plt_kwargs={}, sct_kwargs=... | [
{
"code": null,
"e": 274,
"s": 172,
"text": "TLDR: Define your own functions that involve plotting onto a specific axes with the following syntax:"
},
{
"code": null,
"e": 646,
"s": 274,
"text": "def custom_plot(x, y, ax=None, **plt_kwargs): if ax is None: ax = plt.gca(... |
Traffic Intersection Simulation using Pygame, Part 1 | by Mihir Gandhi | Towards Data Science | We are developing a simulation from scratch using Pygame to simulate the movement of vehicles across a traffic intersection having traffic lights with a timer. It contains a 4-way traffic intersection with traffic signals controlling the flow of traffic in each direction. Each signal has a timer on top of it which show... | [
{
"code": null,
"e": 914,
"s": 172,
"text": "We are developing a simulation from scratch using Pygame to simulate the movement of vehicles across a traffic intersection having traffic lights with a timer. It contains a 4-way traffic intersection with traffic signals controlling the flow of traffic i... |
Apply function to every row in a Pandas DataFrame - GeeksforGeeks | 17 May, 2021
Python is a great language for performing data analysis tasks. It provides with a huge amount of Classes and function which help in analyzing and manipulating data in an easier way. One can use apply() function in order to apply function to every row in given dataframe. Let’s see the ways we can do this ta... | [
{
"code": null,
"e": 25114,
"s": 25086,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 25438,
"s": 25114,
"text": "Python is a great language for performing data analysis tasks. It provides with a huge amount of Classes and function which help in analyzing and manipulating data... |
How to create JavaFX slider with two thumbs? | In general, a slider is a component that displays a continuous range of values. This contains a track on which the numerical values are displayed. Along the track, there is a thumb pointing to the numbers. You can provide the maximum, minimum and initial values of the slider.
The slider JavaFX provides contains only on... | [
{
"code": null,
"e": 1339,
"s": 1062,
"text": "In general, a slider is a component that displays a continuous range of values. This contains a track on which the numerical values are displayed. Along the track, there is a thumb pointing to the numbers. You can provide the maximum, minimum and initia... |
Contingency Table in Python - GeeksforGeeks | 21 Jan, 2019
Estimations like mean, median, standard deviation, and variance are very much useful in case of the univariate data analysis. But in the case of bivariate analysis(comparing two variables) correlation comes into play.
Contingency Table is one of the techniques for exploring two or even more variables. It i... | [
{
"code": null,
"e": 24758,
"s": 24730,
"text": "\n21 Jan, 2019"
},
{
"code": null,
"e": 24976,
"s": 24758,
"text": "Estimations like mean, median, standard deviation, and variance are very much useful in case of the univariate data analysis. But in the case of bivariate analysis... |
How to load html content in android webview? | This example demonstrate about How to load html content in android webview.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<Linear... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "This example demonstrate about How to load html content in android webview."
},
{
"code": null,
"e": 1267,
"s": 1138,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to... |
Deque iterator() method in Java - GeeksforGeeks | 20 Jun, 2020
The iterator() method of Deque Interface returns an iterator over the elements in this deque in a proper sequence. The elements will be returned in order from first (head) to last (tail). The returned iterator is a “weakly consistent” iterator.
Syntax:
Iterator iterator()
Parameters: This method does not a... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n20 Jun, 2020"
},
{
"code": null,
"e": 24193,
"s": 23948,
"text": "The iterator() method of Deque Interface returns an iterator over the elements in this deque in a proper sequence. The elements will be returned in order from firs... |
What are different types of constants in C language? | Constant is a value that cannot be changed during program execution; it is fixed.
In C language, a number or character or string of characters is called a constant. And it can be any data type. Constants are also called as literals.
There are two types of constants −
Primary constants − Integer, float, and character ar... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Constant is a value that cannot be changed during program execution; it is fixed."
},
{
"code": null,
"e": 1295,
"s": 1144,
"text": "In C language, a number or character or string of characters is called a constant. And it can be any... |
Landcover Analysis using Python and ArcGIS | by Ben Chamblee | Towards Data Science | ArcGIS is one of the top platforms for geostatistical analysis. Using ArcGIS libraries with python gives you the ability to analyze shapefiles, display Landsat satellite imagery, create data maps, and much more all within a Jupyter notebook! There are a limitless amount of data science projects you can create using thi... | [
{
"code": null,
"e": 603,
"s": 172,
"text": "ArcGIS is one of the top platforms for geostatistical analysis. Using ArcGIS libraries with python gives you the ability to analyze shapefiles, display Landsat satellite imagery, create data maps, and much more all within a Jupyter notebook! There are a l... |
Flutter - Introduction to Gestures | Gestures are primarily a way for a user to interact with a mobile (or any touch based device) application. Gestures are generally defined as any physical action / movement of a user in the intention of activating a specific control of the mobile device. Gestures are as simple as tapping the screen of the mobile device ... | [
{
"code": null,
"e": 2591,
"s": 2218,
"text": "Gestures are primarily a way for a user to interact with a mobile (or any touch based device) application. Gestures are generally defined as any physical action / movement of a user in the intention of activating a specific control of the mobile device.... |
Bootcamp Website Template using HTML and CSS - GeeksforGeeks | 08 Nov, 2021
In this article, we will see how to design a simple Bootcamp Website Template using HTML and CSS.
Creating an attractive template will be difficult for those who are not experts in CSS. Without using CSS, you will not be able to make the web page more attractive. So in order to make a web page, we need to... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 25475,
"s": 25376,
"text": "In this article, we will see how to design a simple Bootcamp Website Template using HTML and CSS. "
},
{
"code": null,
"e": 25868,
"s": 25475,
... |
Software Development Life Cycle (SDLC) | 05 Jul, 2021
Software Development is the development of software for distinct purposes. For software development, there is a specific programming language like Java, Python, C/C++, etc. The entire process of software development isn’t as simple as its definition, it’s a complicated process. Accordingly, it requires an ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 457,
"s": 52,
"text": "Software Development is the development of software for distinct purposes. For software development, there is a specific programming language like Java, Python, C/C++, etc. T... |
JavaScript Quiz | Set-1 | 02 Jun, 2020
Prerequisite: Basic understanding of JavaScript concepts
1. What is the HTML tag under which one can write the JavaScript code?A) <javascript>B) <scripted>C) <script>D) <js>
Ans: Option CExplanation: If we want to write a JavaScript code under HTML tag, you will have to use the “script” tag.
2. Choose the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 109,
"s": 52,
"text": "Prerequisite: Basic understanding of JavaScript concepts"
},
{
"code": null,
"e": 226,
"s": 109,
"text": "1. What is the HTML tag under which one can writ... |
Dart Programming - Map.forEach() Function | Applies the specified function on every Map entry. In other words, forEach enables iterating through the Map’s entries.
Map.forEach(void f(K key, V value));
f(K key, V value) − Applies f to each key-value pair of the map.
Calling f must not add or remove keys from the map
f(K key, V value) − Applies f to each key-val... | [
{
"code": null,
"e": 2779,
"s": 2659,
"text": "Applies the specified function on every Map entry. In other words, forEach enables iterating through the Map’s entries."
},
{
"code": null,
"e": 2817,
"s": 2779,
"text": "Map.forEach(void f(K key, V value));\n"
},
{
"code": n... |
Python program to find the string weight | 05 Jul, 2021
Given a String, each character mapped with a weight( number), compute the total weight of the string.
Input : test_str = ‘GeeksforGeeks’, {“G” : 1, “e” : 2, “k” : 5, “f” : 3, “s” : 15, “o” : 4, “r” : 6} Output : 63 Explanation : 2 (G*2) + 8(e*4) + 30(s*2) + 10(k*2) + 4(o) + 6(r) +3(f) = 63.
Input : test_st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "Given a String, each character mapped with a weight( number), compute the total weight of the string."
},
{
"code": null,
"e": 320,
"s": 130,
"text": "Inpu... |
Minimum amount of lamps needed to be installed | 31 May, 2022
Given string str containing only dots and asterisk. A dot represents free spaces and represents lamps. A lamp at position can spread its light at locations i-1, i, and i+1. Determine the minimum number of lamps needed to illuminate the whole string.
Examples:
Input: str = “......” Output: 2 There are init... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 304,
"s": 54,
"text": "Given string str containing only dots and asterisk. A dot represents free spaces and represents lamps. A lamp at position can spread its light at locations i-1, i, and i+1. D... |
Python 3 - Tkinter Button | The Button widget is used to add buttons in a Python application. These buttons can display text or images that convey the purpose of the buttons. You can attach a function or a method to a button which is called automatically when you click the button.
Here is the simple syntax to create this widget −
w = Button ( mas... | [
{
"code": null,
"e": 2728,
"s": 2474,
"text": "The Button widget is used to add buttons in a Python application. These buttons can display text or images that convey the purpose of the buttons. You can attach a function or a method to a button which is called automatically when you click the button.... |
Pulsing Heart Animation Effect Using HTML & CSS | 10 Mar, 2021
This article will teach you about widely fascinated and used HTML & CSS animation i.e. Pulsating Heart Animation. In this article, basically we will learn two methods to implement the animation. This animation is beneficial while making footer of the most website with some common text like Made with Love. ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Mar, 2021"
},
{
"code": null,
"e": 409,
"s": 54,
"text": "This article will teach you about widely fascinated and used HTML & CSS animation i.e. Pulsating Heart Animation. In this article, basically we will learn two methods to impl... |
PostgreSQL – CASE | 28 Aug, 2020
PostgreSQL has a conditional expression called CASE to form conditional queries. The PostgreSQL CASE expression is the same as IF/ELSE statement in other programming languages. PostgreSQL provides two forms of the CASE expressions.
Syntax:
CASE
WHEN condition_1 THEN result_1
WHEN condition_2 ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 260,
"s": 28,
"text": "PostgreSQL has a conditional expression called CASE to form conditional queries. The PostgreSQL CASE expression is the same as IF/ELSE statement in other programming languages... |
How to count the number of values that satisfy a condition in an R vector? | Sometimes we want to find the frequency of values that satisfy a certain condition. For example, if we have a vector say x that contains randomly selected integers starting from 1 and ends at 100, in this case we might want to find how many values are exactly equal to 10. This can be done by using which and length func... | [
{
"code": null,
"e": 1513,
"s": 1187,
"text": "Sometimes we want to find the frequency of values that satisfy a certain condition. For example, if we have a vector say x that contains randomly selected integers starting from 1 and ends at 100, in this case we might want to find how many values are e... |
Java program to check if a number is prime or not | 18 Oct, 2018
Given a positive integer, check if the number is prime or not. A prime is a natural number greater than 1 that has no positive divisors other than 1 and itself. Examples of first few prime numbers are {2, 3, 5,Examples :
Input: n = 11
Output: true
Input: n = 15
Output: false
Input: n = 1
Output: false... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Oct, 2018"
},
{
"code": null,
"e": 273,
"s": 52,
"text": "Given a positive integer, check if the number is prime or not. A prime is a natural number greater than 1 that has no positive divisors other than 1 and itself. Examples of f... |
How to Get the Input From Tkinter Text Box? | 11 Dec, 2020
Tkinter Text box widget is used to insert multi-line text. This widget can be used for messaging, displaying information, and many other tasks. The important task is to get the inserted text for further processing. For this, we have to use the get() method for the textbox widget.
Syntax: get(start, [end])
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 335,
"s": 54,
"text": "Tkinter Text box widget is used to insert multi-line text. This widget can be used for messaging, displaying information, and many other tasks. The important task is to get t... |
How to Show Percentages in Stacked Column Chart in Excel? | 17 Dec, 2021
In this article, you will learn how to create a stacked column chart in excel. Show percentages instead of actual data values on chart data labels.
By default, the data labels are shown in the form of chart data Value (Image 1). But very often user needs to plot charts with actual data and show percentag... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "In this article, you will learn how to create a stacked column chart in excel. Show percentages instead of actual data values on chart data labels."
},
{
"code": null... |
DataTables initComplete Option | 11 Sep, 2021
DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched, sorted, and filtered according to the needs of the user. The DataTable also exposes a powerful API that can be further used to mod... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 366,
"s": 28,
"text": "DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched... |
Python Pandas - Panel | A panel is a 3D container of data. The term Panel data is derived from econometrics and is partially responsible for the name pandas − pan(el)-da(ta)-s.
The names for the 3 axes are intended to give some semantic meaning to describing operations involving panel data. They are −
items − axis 0, each item corresponds to ... | [
{
"code": null,
"e": 2730,
"s": 2577,
"text": "A panel is a 3D container of data. The term Panel data is derived from econometrics and is partially responsible for the name pandas − pan(el)-da(ta)-s."
},
{
"code": null,
"e": 2856,
"s": 2730,
"text": "The names for the 3 axes are ... |
HTTP GET and POST Methods in PHP - GeeksforGeeks | 06 Dec, 2021
In this article, we will know what HTTP GET and POST methods are in PHP, how to implement these HTTP methods & their usage, by understanding them through the examples.
HTTP: The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-resp... | [
{
"code": null,
"e": 24674,
"s": 24646,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 24842,
"s": 24674,
"text": "In this article, we will know what HTTP GET and POST methods are in PHP, how to implement these HTTP methods & their usage, by understanding them through the examp... |
Feature Engineering of DateTime Variables for Data Science, Machine Learning, Python | Samarth Agrawal | Fast_ml | Towards Data Science | DateTime fields require Feature Engineering to turn them from data to insightful information that can be used by our Machine Learning Models. This post is divided into 3 parts and a Bonus section towards the end, we will use a combination of inbuilt pandas and NumPy functions as well as our functions to extract useful ... | [
{
"code": null,
"e": 502,
"s": 172,
"text": "DateTime fields require Feature Engineering to turn them from data to insightful information that can be used by our Machine Learning Models. This post is divided into 3 parts and a Bonus section towards the end, we will use a combination of inbuilt panda... |
JDBC - LIKE Clause Example | This chapter provides an example on how to select records from a table using JDBC application. This would add additional conditions using LIKE clause while selecting records from the table. Before executing the following example, make sure you have the following in place −
To execute the following example you can repla... | [
{
"code": null,
"e": 2436,
"s": 2162,
"text": "This chapter provides an example on how to select records from a table using JDBC application. This would add additional conditions using LIKE clause while selecting records from the table. Before executing the following example, make sure you have the ... |
How can we add multiple columns, with single command, to an existing MySQL table? | We can also add multiple columns to an existing table with the help of ALTER command. The syntax for it would be as follows −
Alter table table-name ADD (column-name1 datatype, column-name2 datatype,... column-nameN datatype);
In the example below, with the help of ALTER Command, columns ‘Address’, ‘Phone’ and ‘Email’ ... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "We can also add multiple columns to an existing table with the help of ALTER command. The syntax for it would be as follows −"
},
{
"code": null,
"e": 1289,
"s": 1188,
"text": "Alter table table-name ADD (column-name1 datatype, colum... |
Python program to count upper and lower case characters without using inbuilt functions | In this article, we will learn about the solution and approach to solve the given problem statement.
Given a string input, we need to find the number of uppercase & lowercase characters in the given strings.
Here we will we checking ASCII value of each character by the help of built-in ord() function.
Here we have assi... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "In this article, we will learn about the solution and approach to solve the given problem statement."
},
{
"code": null,
"e": 1270,
"s": 1163,
"text": "Given a string input, we need to find the number of uppercase & lowercase charact... |
Number of Segments in a String in C++ | Suppose we have a string s. We have to count the number of segments in a string, where a segment is defined to be a contiguous sequence of characters (no whitespace).
So, if the input is like "Hello, I love programming", then the output will be 4, as there are 4 segments.
To solve this, we will follow these steps −
n :... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Suppose we have a string s. We have to count the number of segments in a string, where a segment is defined to be a contiguous sequence of characters (no whitespace)."
},
{
"code": null,
"e": 1335,
"s": 1229,
"text": "So, if the inpu... |
Great Expectations. “Validate what you expect from your... | by Andreas Hopfgartner | Towards Data Science | More and more decisions of relevance to business are made on the basis of automatically generated data. Testing only the correctness of the source code of transformations is no longer sufficient. The correctness of the data, which is typically compiled from different, rapidly changing sources, must also be checked... I... | [
{
"code": null,
"e": 708,
"s": 47,
"text": "More and more decisions of relevance to business are made on the basis of automatically generated data. Testing only the correctness of the source code of transformations is no longer sufficient. The correctness of the data, which is typically compiled fro... |
Can we define an interface inside a Java class? | Yes, you can define an interface inside a class and it is known as a nested interface. You can’t access a nested interface directly; you need to access (implement) the nested interface using the inner class or by using the name of the class holding this nested interface.
Live Demo
public class Sample {
interface myI... | [
{
"code": null,
"e": 1334,
"s": 1062,
"text": "Yes, you can define an interface inside a class and it is known as a nested interface. You can’t access a nested interface directly; you need to access (implement) the nested interface using the inner class or by using the name of the class holding this... |
What is the difference between 'isset()' and '!empty()' in PHP? | ISSET checks the variable to see if it has been set. In other words, it checks to see if the variable is any value except NULL or not assigned a value. ISSET returns TRUE if the variable exists and has a value other than NULL. That means variables assigned a "", 0, "0", or FALSE are set, and therefore are TRUE for ISSE... | [
{
"code": null,
"e": 1385,
"s": 1062,
"text": "ISSET checks the variable to see if it has been set. In other words, it checks to see if the variable is any value except NULL or not assigned a value. ISSET returns TRUE if the variable exists and has a value other than NULL. That means variables assig... |
Creating a Graph in Javascript | We'll be creating a graph class that supports weights and both directed and undirected types. This will be implemented using an adjacency list. As we move to more advanced concepts, both weights and directed nature of the graphs will come in handy.
An adjacency list is an array A of separate lists. Each element of the ... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "We'll be creating a graph class that supports weights and both directed and undirected types. This will be implemented using an adjacency list. As we move to more advanced concepts, both weights and directed nature of the graphs will come in handy."
}... |
Incremental join using AWS Glue Bookmarks | by Hamish Lamotte | Towards Data Science | I was recently presented the challenge to join two timeseries datasets together on their timestamps without requiring the corresponding data from either dataset to arrive at the same time as the other. For example, data from one day last month from one dataset may have landed on S3 a week ago, and the corresponding dat... | [
{
"code": null,
"e": 605,
"s": 172,
"text": "I was recently presented the challenge to join two timeseries datasets together on their timestamps without requiring the corresponding data from either dataset to arrive at the same time as the other. For example, data from one day last month from one da... |
Python Program for nth Catalan Number | In this article, we will learn about calculating the nth Catalan number.
Catalan numbers are a sequence of natural numbers that are defined by the recursive formula −
C0=1andCn+1=∑i=0nCiCn−iforn≥0;
The first few Catalan numbers for n = 0, 1, 2, 3, ... are 1, 1, 2, 5, 14, 42, 132,429,...................
Catalan numbers ... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "In this article, we will learn about calculating the nth Catalan number."
},
{
"code": null,
"e": 1229,
"s": 1135,
"text": "Catalan numbers are a sequence of natural numbers that are defined by the recursive formula −"
},
{
"... |
Distributed DBMS - Database Control | Database control refers to the task of enforcing regulations so as to provide correct data to authentic users and applications of a database. In order that correct data is available to users, all data should conform to the integrity constraints defined in the database. Besides, data should be screened away from unautho... | [
{
"code": null,
"e": 2693,
"s": 2223,
"text": "Database control refers to the task of enforcing regulations so as to provide correct data to authentic users and applications of a database. In order that correct data is available to users, all data should conform to the integrity constraints defined ... |
Count The Repetitions in C++ | Suppose we have two non-empty strings s1 and s2 (maximum 100 characters) and two numbers n1 and n2 both are in range 0 to 106. Now suppose the strings S1 and S2, where S1=[s1,n1] and S2=[s2,n2].
S = [s,n] defines the string S which consists of n connected strings s. As an exdample, ["ab", 4] ="abababab".
On the other h... | [
{
"code": null,
"e": 1257,
"s": 1062,
"text": "Suppose we have two non-empty strings s1 and s2 (maximum 100 characters) and two numbers n1 and n2 both are in range 0 to 106. Now suppose the strings S1 and S2, where S1=[s1,n1] and S2=[s2,n2]."
},
{
"code": null,
"e": 1368,
"s": 1257,
... |
Makefile - Example | This is an example of the Makefile for compiling the hello program. This program consists of three files main.cpp, factorial.cpp and hello.cpp.
# Define required macros here
SHELL = /bin/sh
OBJS = main.o factorial.o hello.o
CFLAG = -Wall -g
CC = gcc
INCLUDE =
LIBS = -lm
hello:${OBJ}
${CC} ${CFLAGS} ${INCLUDES} -... | [
{
"code": null,
"e": 1929,
"s": 1784,
"text": "This is an example of the Makefile for compiling the hello program. This program consists of three files main.cpp, factorial.cpp and hello.cpp."
},
{
"code": null,
"e": 2205,
"s": 1929,
"text": "# Define required macros here\nSHELL ... |
How to write "Hello World" Program in C++? | To run the hello world program, you'll have to follow the following steps −
Now that you have a compiler installed, its time to write a C++ program. Let's start with the epitome of programming example's, it, the Hello world program. We'll print hello world to the screen using C++ in this example. Create a new file call... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To run the hello world program, you'll have to follow the following steps −"
},
{
"code": null,
"e": 1432,
"s": 1138,
"text": "Now that you have a compiler installed, its time to write a C++ program. Let's start with the epitome of p... |
Ext.js - Ext.tab.Panel Container | Ext.tab.Panel − Tab panel is like a normal panel but has support for card tab panel layout.
Following is a simple syntax to create Ext.tab.Panel container.
Ext.create('Ext.tab.Panel', {
items: [child1, child2]
// this way we can add different child elements to the container as container items.
});
Following is... | [
{
"code": null,
"e": 2115,
"s": 2023,
"text": "Ext.tab.Panel − Tab panel is like a normal panel but has support for card tab panel layout."
},
{
"code": null,
"e": 2179,
"s": 2115,
"text": "Following is a simple syntax to create Ext.tab.Panel container."
},
{
"code": null... |
How to replace a word inside a string in PHP ? - GeeksforGeeks | 31 May, 2020
Given a string containing some words and the task is to replace all the occurrences of a word within the given string str in PHP. In order to do this task, we have the following methods in PHP:
Method 1: Using str_replace() Method: The str_replace() method is used to replace all the occurrences of the word... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 24775,
"s": 24581,
"text": "Given a string containing some words and the task is to replace all the occurrences of a word within the given string str in PHP. In order to do this task, we have... |
Java Math random() method with Examples | 08 Jun, 2022
The java.lang.Math.random() method returns a pseudorandom double type number greater than or equal to 0.0 and less than 1.0. . When this method is first called, it creates a single new pseudorandom-number generator, exactly as if by the expression new java.util.Random.
Syntax:
public static double random(... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 323,
"s": 52,
"text": "The java.lang.Math.random() method returns a pseudorandom double type number greater than or equal to 0.0 and less than 1.0. . When this method is first called, it creates a ... |
CSS | linear-gradient() Function | 01 Jul, 2022
The linear-gradient() function is an inbuilt function in CSS which is used to set the linear gradient as the background image.Syntax:
background-image: linear-gradient( direction, color1, color2, ... )
Parameters: This function accepts one direction parameter and many color parameters which are listed be... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 164,
"s": 28,
"text": "The linear-gradient() function is an inbuilt function in CSS which is used to set the linear gradient as the background image.Syntax: "
},
{
"code": null,
"e": 23... |
Find value of (1^n + 2^n + 3^n + 4^n ) mod 5 | 07 Apr, 2021
You are given an positive integer n. You have to find the value of (1n +2n + 3n + 4n ) mod 5. Note : Value of n may be very large of order 1015. Examples:
Input : n = 4
Output : 4
Explanation : (14 + 24 + 34 + 44)mod 5 = (1+16+81+256)mod 5 = 354 mod 5 = 4
Input : n = 2
Output : 0
Explanation : (12 + 22 ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "You are given an positive integer n. You have to find the value of (1n +2n + 3n + 4n ) mod 5. Note : Value of n may be very large of order 1015. Examples: "
},
{
"cod... |
Constructor Overloading in C++ | 28 Jun, 2021
Prerequisites: Constructors in C++ In C++, We can have more than one constructor in a class with same name, as long as each has a different list of arguments.This concept is known as Constructor Overloading and is quite similar to function overloading.
Overloaded constructors essentially have the same na... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 308,
"s": 53,
"text": "Prerequisites: Constructors in C++ In C++, We can have more than one constructor in a class with same name, as long as each has a different list of arguments.This concept is ... |
EditText in Android using Jetpack Compose | 25 Feb, 2021
EditText is one of the most important widget which is seen in most of the apps. This widget is generally use to get the data from users. Users can directly communicate with the app using this widget. This widget is used to get the data from user in the form of numbers, text or any other text. In this artic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "EditText is one of the most important widget which is seen in most of the apps. This widget is generally use to get the data from users. Users can directly communicate with th... |
C++ Program to Check the Connectivity of Directed Graph Using DFS | To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then the graph is not connected.
For the directed graph, we will start traversing from all nodes to check connectivity. Sometimes one edge can ha... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then the graph is not connected."
},
{
"code": null,
"e": 1484,
... |
jQuery - contents( ) Method | The contents( ) method finds all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe.
Here is the simple syntax to use this method −
selector.contents( )
Here is the description of all the parameters used by this method −
NA
NA
Consider you have an h... | [
{
"code": null,
"e": 2477,
"s": 2322,
"text": "The contents( ) method finds all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe."
},
{
"code": null,
"e": 2524,
"s": 2477,
"text": "Here is the simple syntax t... |
How to use ArrayAdapter in android to create a simple listview in Kotlin? | This example demonstrates how to use ArrayAdapter in android to create a simple listview in Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encodin... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "This example demonstrates how to use ArrayAdapter in android to create a simple listview in Kotlin."
},
{
"code": null,
"e": 1290,
"s": 1162,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill ... |
A short introduction to NLP in Python with spaCy | by Conor Mc. | Towards Data Science | Natural Language Processing (NLP) is one of the most interesting sub-fields of data science, and data scientists are increasingly expected to be able to whip up solutions that involve the exploitation of unstructured text data. Despite this, many applied data scientists (both from STEM and social science backgrounds) l... | [
{
"code": null,
"e": 512,
"s": 172,
"text": "Natural Language Processing (NLP) is one of the most interesting sub-fields of data science, and data scientists are increasingly expected to be able to whip up solutions that involve the exploitation of unstructured text data. Despite this, many applied ... |
Implementing K-means clustering of Diabetes dataset with SciPy library | The Pima Indian Diabetes dataset, which we will be using here, is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. Based on the following diagnostic factors, this dataset can be used to place a patient in ether diabetic cluster or non-diabetic cluster −
Pregnancies
Pregnancies
Gluco... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "The Pima Indian Diabetes dataset, which we will be using here, is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. Based on the following diagnostic factors, this dataset can be used to place a patient in ether diabe... |
Find the XOR of first N Prime Numbers - GeeksforGeeks | 18 Mar, 2022
Given a positive integer N, the task is to find the XOR of the first N prime numbers.Examples:
Input: N = 3 Output: 4 First 3 prime numbers are 2, 3 and 5. And 2 ^ 3 ^ 5 = 4Input: N = 5 Output: 8
Approach:
Create Sieve of Eratosthenes to identify if a number is prime or not in O(1) time.Run a loop st... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n18 Mar, 2022"
},
{
"code": null,
"e": 24813,
"s": 24716,
"text": "Given a positive integer N, the task is to find the XOR of the first N prime numbers.Examples: "
},
{
"code": null,
"e": 24916,
"s": 24813,
"t... |
Collaborative Filtering and Embeddings — Part 2 | by Shikhar Gupta | Towards Data Science | In Part 1, I’ve covered the basic idea behind collaborative filtering and the concept of embeddings and bias. It is recommended that you go through that post before going ahead.
Collaborative Filtering and Embeddings — Part 1
In this part I’ll talk about how we can implement collaborative filtering using a library call... | [
{
"code": null,
"e": 350,
"s": 172,
"text": "In Part 1, I’ve covered the basic idea behind collaborative filtering and the concept of embeddings and bias. It is recommended that you go through that post before going ahead."
},
{
"code": null,
"e": 398,
"s": 350,
"text": "Collabor... |
How to Transpose a DataFrame in R? - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to transpose dataframe in R Programming Language. Transposing means converting rows to columns and columns to rows
R
# create a dataframedata = data.frame(col1=c(1:5), col2=c(6:10), col3=c(11:15), col4=c(16:20)) # assi... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 26749,
"s": 26597,
"text": "In this article, we will discuss how to transpose dataframe in R Programming Language. Transposing means converting rows to columns and columns to rows"
},
{
... |
HTML - Phrase Elements | Phrase elements add structural information to text fragments. The usual meanings of phrase elements are following −
NONE
<abbr>pvt. or inc.</abbr><br />
<acronym>HTML</acronym><br />
<cite>Citation</cite><br />
<em>Emphasized text</em><br />
<strong>Strong text</strong><br />
<dfn>Definition term</dfn><br />
<code>Comp... | [
{
"code": null,
"e": 2490,
"s": 2374,
"text": "Phrase elements add structural information to text fragments. The usual meanings of phrase elements are following −"
},
{
"code": null,
"e": 2495,
"s": 2490,
"text": "NONE"
},
{
"code": null,
"e": 2824,
"s": 2495,
... |
Check if a number is Palindrome - GeeksforGeeks | 27 Apr, 2022
Given an integer, write a function that returns true if the given number is palindrome, else false. For example, 12321 is palindrome, but 1451 is not palindrome.
Let the given number be num. A simple method for this problem is to first reverse digits of num, then compare the reverse of num with num. If bo... | [
{
"code": null,
"e": 26668,
"s": 26640,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 26831,
"s": 26668,
"text": "Given an integer, write a function that returns true if the given number is palindrome, else false. For example, 12321 is palindrome, but 1451 is not palindrome. "... |
Difference Between ConcurrentHashMap and SynchronizedHashMap - GeeksforGeeks | 14 Aug, 2021
The ConcurrentHashMap and SynchronizedHashMap both are the Collection classes which are thread-safe and can be used in multithreaded and concurrent java application. But there are few differences that exists between them. In this article, we have tried to cover all these differences between them.
1. Concur... | [
{
"code": null,
"e": 24093,
"s": 24065,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 24391,
"s": 24093,
"text": "The ConcurrentHashMap and SynchronizedHashMap both are the Collection classes which are thread-safe and can be used in multithreaded and concurrent java applicatio... |
How to change background color of TableView items on iOS? | Changing the background color of table view items is different from changing the background color of the table view. New programmers may often confuse between these two things, In this post, we will be seeing how to change the background color of TableView items i.e. cells.
So let’s get started.
For changing the backgr... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "Changing the background color of table view items is different from changing the background color of the table view. New programmers may often confuse between these two things, In this post, we will be seeing how to change the background color of TableV... |
What is NaN in JavaScript? | NaN is a JavaScript property, which is "Not-a-Number" value. This shows it is not a legal number.
Here’s the syntax −
Number.NaN
To find out whether value is NaN, use the Number.isNaN() or isNan() method. Here’s an example to check −
Live Demo
<!DOCTYPE html>
<html>
<body>
<button onclick="display()">Check</bu... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "NaN is a JavaScript property, which is \"Not-a-Number\" value. This shows it is not a legal number."
},
{
"code": null,
"e": 1180,
"s": 1160,
"text": "Here’s the syntax −"
},
{
"code": null,
"e": 1191,
"s": 1180,
... |
Python 3 - Date & Time | A Python program can handle date and time in several ways. Converting between date formats is a common chore for computers. Python's time and calendar modules help track dates and times.
Time intervals are floating-point numbers in units of seconds. Particular instants in time are expressed in seconds since 12:00am, Ja... | [
{
"code": null,
"e": 2527,
"s": 2340,
"text": "A Python program can handle date and time in several ways. Converting between date formats is a common chore for computers. Python's time and calendar modules help track dates and times."
},
{
"code": null,
"e": 2682,
"s": 2527,
"tex... |
Python os.fstat() Method | Python method fstat() returns information about a file associated with the fd. Here is the structure returned by fstat method −
st_dev − ID of device containing file
st_dev − ID of device containing file
st_ino − inode number
st_ino − inode number
st_mode − protection
st_mode − protection
st_nlink − number of hard link... | [
{
"code": null,
"e": 2372,
"s": 2244,
"text": "Python method fstat() returns information about a file associated with the fd. Here is the structure returned by fstat method −"
},
{
"code": null,
"e": 2410,
"s": 2372,
"text": "st_dev − ID of device containing file"
},
{
"c... |
Database operations in Java | This article provides an example of how to create a simple JDBC application. This will show you how to open a database connection, execute a SQL query, and display the results.
There are following six steps involved in building a JDBC application −
Import the packages: Requires that you include the packages containing ... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "This article provides an example of how to create a simple JDBC application. This will show you how to open a database connection, execute a SQL query, and display the results."
},
{
"code": null,
"e": 1311,
"s": 1239,
"text": "There... |
InterpretML: Another Way to Explain Your Model | by Noga Gershon Barak | Towards Data Science | Interpretability can be crucial when implementing ML models. By interpreting models , customers can gain trust in the model and facilitate adoption. It may also be helpful in debugging your model, and in some situations, you will be required to provide explanations for predictions generated by the model. In my previous... | [
{
"code": null,
"e": 588,
"s": 172,
"text": "Interpretability can be crucial when implementing ML models. By interpreting models , customers can gain trust in the model and facilitate adoption. It may also be helpful in debugging your model, and in some situations, you will be required to provide ex... |
How to pass Text Area Data to Python CGI script? | TEXTAREA element is used when multiline text has to be passed to the CGI Program.
Here is example HTML code for a form with a TEXTAREA box −
<form action = "/cgi-bin/textarea.py" method = "post" target = "_blank">
<textarea name = "textcontent" cols = "40" rows = "4">
Type your text here...
</textarea>
<input type = "s... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "TEXTAREA element is used when multiline text has to be passed to the CGI Program."
},
{
"code": null,
"e": 1203,
"s": 1144,
"text": "Here is example HTML code for a form with a TEXTAREA box −"
},
{
"code": null,
"e": 1417... |
Python Program to Find Element Occurring Odd Number of Times in a List | When it is required to find an element that occurs odd number of times in a list, a method can be defined. This method iterates through the list and checks to see if the elements in the nested loops match. If they do, the counter is incremented. If that count is not divisible by 2, the specific element of the list is r... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "When it is required to find an element that occurs odd number of times in a list, a method can be defined. This method iterates through the list and checks to see if the elements in the nested loops match. If they do, the counter is incremented. If that... |
C++ Library - <wostringstream> | It is an output stream class to operate on strings of wide characters.
Below is definition of std::wostringstream.
typedef basic_ostringstream<wchar_t> wostringstream;
charT − Character type.
charT − Character type.
traits − Character traits class that defines essential properties of the characters used by stream objec... | [
{
"code": null,
"e": 2674,
"s": 2603,
"text": "It is an output stream class to operate on strings of wide characters."
},
{
"code": null,
"e": 2718,
"s": 2674,
"text": "Below is definition of std::wostringstream."
},
{
"code": null,
"e": 2771,
"s": 2718,
"text... |
House Robber II in C++ | Consider, you are a professional robber. And you are planning to rob houses along a street. Each house has a certain amount of money stored. All houses are arranged in a circle. That means the first house is the neighbor of the last house. We have to keep in mind that the adjacent houses have security system connected ... | [
{
"code": null,
"e": 1716,
"s": 1062,
"text": "Consider, you are a professional robber. And you are planning to rob houses along a street. Each house has a certain amount of money stored. All houses are arranged in a circle. That means the first house is the neighbor of the last house. We have to ke... |
How to add a Submit button after the end of the tableview using Swift? | To add a submit button at the end of a table view, we can make use of table view footers. Let’s see this with help of an example where we’ll add a footer view to our table, and inside the table, we will add code for adding button at the bottom of the table view.
Create a new project first, then inside the view controll... | [
{
"code": null,
"e": 1325,
"s": 1062,
"text": "To add a submit button at the end of a table view, we can make use of table view footers. Let’s see this with help of an example where we’ll add a footer view to our table, and inside the table, we will add code for adding button at the bottom of the ta... |
WebSockets - JavaScript Application | The following program code describes the working of a chat application using JavaScript and Web Socket protocol.
<!DOCTYPE html>
<html lang = "en">
<head>
<meta charset = utf-8>
<title>HTML5 Chat</title>
<body>
<section id = "wrapper">
<header>
<h1>HTM... | [
{
"code": null,
"e": 2232,
"s": 2119,
"text": "The following program code describes the working of a chat application using JavaScript and Web Socket protocol."
},
{
"code": null,
"e": 7924,
"s": 2232,
"text": "<!DOCTYPE html>\n<html lang = \"en\">\n\n <head>\n <meta chars... |
Java Program for Longest Common Subsequence | Following is the Java program for Longest Common Subsequence −
Live Demo
public class Demo{
int subseq(char[] a, char[] b, int a_len, int b_len){
int my_arr[][] = new int[a_len + 1][b_len + 1];
for (int i = 0; i <= a_len; i++){
for (int j = 0; j <= b_len; j++){
if (i == 0 || j == 0)... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Following is the Java program for Longest Common Subsequence −"
},
{
"code": null,
"e": 1136,
"s": 1125,
"text": " Live Demo"
},
{
"code": null,
"e": 2157,
"s": 1136,
"text": "public class Demo{\n int subseq(cha... |
Python dictionary copy() Method | Python dictionary method copy() returns a shallow copy of the dictionary.
Following is the syntax for copy() method −
dict.copy()
NA
NA
This method returns a shallow copy of the dictionary.
The following example shows the usage of copy() method.
#!/usr/bin/python
dict1 = {'Name': 'Zara', 'Age': 7};
dict2 = dict1.cop... | [
{
"code": null,
"e": 2319,
"s": 2244,
"text": "Python dictionary method copy() returns a shallow copy of the dictionary."
},
{
"code": null,
"e": 2363,
"s": 2319,
"text": "Following is the syntax for copy() method −"
},
{
"code": null,
"e": 2376,
"s": 2363,
"... |
OBIEE - Quick Guide | In today’s competitive market, most successful companies respond quickly to market changes and opportunities. The requirement to respond quickly is by effective and efficient use of data and information. “Data Warehouse” is a central repository of data that is organized by category to support the organization’s decisio... | [
{
"code": null,
"e": 2480,
"s": 2076,
"text": "In today’s competitive market, most successful companies respond quickly to market changes and opportunities. The requirement to respond quickly is by effective and efficient use of data and information. “Data Warehouse” is a central repository of data ... |
C++ Program to Check Whether a Given Tree is Binary Search Tree | Binary Search Tree is a binary tree data structure in which we have 3 properties
The left subtree of a binary search tree of a node contains only nodes with keys lesser than the node’s key.
The left subtree of a binary search tree of a node contains only nodes with keys lesser than the node’s key.
The right subtree of ... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "Binary Search Tree is a binary tree data structure in which we have 3 properties"
},
{
"code": null,
"e": 1252,
"s": 1143,
"text": "The left subtree of a binary search tree of a node contains only nodes with keys lesser than the node... |
jQuery - ajaxError( callback ) Method | The ajaxError( callback ) method attaches a function to be executed whenever an AJAX request fails. This is an Ajax Event.
Here is the simple syntax to use this method −
$(document).ajaxError( callback )
Here is the description of all the parameters used by this method −
callback − The function to execute. The XMLHttp... | [
{
"code": null,
"e": 2445,
"s": 2322,
"text": "The ajaxError( callback ) method attaches a function to be executed whenever an AJAX request fails. This is an Ajax Event."
},
{
"code": null,
"e": 2492,
"s": 2445,
"text": "Here is the simple syntax to use this method −"
},
{
... |
Character streams in Java | Character Streams − These handle data in 16 bit Unicode. Using these you can read and write text data only.
The Reader and Writer classes (abstract) are the super classes of all the character stream classes: classes that are used to read/write character streams. Following are the character array stream classes provided... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "Character Streams − These handle data in 16 bit Unicode. Using these you can read and write text data only."
},
{
"code": null,
"e": 1393,
"s": 1170,
"text": "The Reader and Writer classes (abstract) are the super classes of all the ... |
How to get the next auto-increment id in MySQL? | MySQL has the AUTO_INCREMENT keyword to perform auto-increment. The starting value for AUTO_INCREMENT is 1, which is the default. It will get increment by 1 for each new record.
To get the next auto increment id in MySQL, we can use the function last_insert_id() from MySQL or auto_increment with SELECT.
Creating a tabl... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "MySQL has the AUTO_INCREMENT keyword to perform auto-increment. The starting value for AUTO_INCREMENT is 1, which is the default. It will get increment by 1 for each new record."
},
{
"code": null,
"e": 1367,
"s": 1240,
"text": "To g... |
Create Matrix from Vectors in R - GeeksforGeeks | 22 Apr, 2020
In R programming language, vector is a basic object which consists of homogeneous elements. The data type of vector can be integer, double, character, logical, complex or raw. A vector can be created by using c() function.Syntax:
x <- c(val1, val2, .....)
Vectors in R are the same as the arrays in C langu... | [
{
"code": null,
"e": 24305,
"s": 24277,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24535,
"s": 24305,
"text": "In R programming language, vector is a basic object which consists of homogeneous elements. The data type of vector can be integer, double, character, logical, com... |
Ruby - Exceptions | The execution and the exception always go together. If you are opening a file, which does not exist, then if you did not handle this situation properly, then your program is considered to be of bad quality.
The program stops if an exception occurs. So exceptions are used to handle various type of errors, which may occu... | [
{
"code": null,
"e": 2501,
"s": 2294,
"text": "The execution and the exception always go together. If you are opening a file, which does not exist, then if you did not handle this situation properly, then your program is considered to be of bad quality."
},
{
"code": null,
"e": 2710,
... |
C++ STL List | Practice | GeeksforGeeks | Implement different operation on List A i.e. adding an element in front and end, removing an element from the front and end, sorting elements, reversing the list and printing the list.
Input:
The first line of input contains an integer T denoting the no of test cases.For each test case, the first line of input contains... | [
{
"code": null,
"e": 423,
"s": 238,
"text": "Implement different operation on List A i.e. adding an element in front and end, removing an element from the front and end, sorting elements, reversing the list and printing the list."
},
{
"code": null,
"e": 1119,
"s": 423,
"text": "... |
Spring Boot Actuator Example | Spring Boot 2.x Actuator 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 tutorials, we are going to see what i... | [
{
"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,
... |
Change data type of given numpy array in Python | We have a method called astype(data_type) to change the data type of a numpy array. If we have a numpy array of type float64, then we can change it to int32 by giving the data type to the astype() method of numpy array.
We can check the type of numpy array using the dtype class. Let's check the data type of sample nump... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "We have a method called astype(data_type) to change the data type of a numpy array. If we have a numpy array of type float64, then we can change it to int32 by giving the data type to the astype() method of numpy array."
},
{
"code": null,
"... |
Sliding Puzzle in C++ | Suppose we have one 2x3 board, there are 5 tiles those are represented by the numbers 1 through 5, and one empty square is there, that is represented by 0.
Here a move means 0 and one adjacent number (top, bottom, left or right) and swapping it. This will be solved when the elements are arranged in this manner: [[1,2,3... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "Suppose we have one 2x3 board, there are 5 tiles those are represented by the numbers 1 through 5, and one empty square is there, that is represented by 0."
},
{
"code": null,
"e": 1394,
"s": 1218,
"text": "Here a move means 0 and on... |
Python Blockchain - Developing Client | A client is somebody who holds TPCoins and transacts those for goods/services from other vendors on the network including his own. We should define a Client class for this purpose. To create a globally unique identification for the client, we use PKI (Public Key Infrastructure). In this chapter, let us talk about this ... | [
{
"code": null,
"e": 2326,
"s": 1995,
"text": "A client is somebody who holds TPCoins and transacts those for goods/services from other vendors on the network including his own. We should define a Client class for this purpose. To create a globally unique identification for the client, we use PKI (P... |
iText - Overview | The Portable Document Format (PDF) is a file format that helps to present data in a manner that is independent of application software, hardware, and operating systems. Each PDF file holds description of a fixed-layout flat document, including text, fonts, graphics, and other information needed to display it.
There are... | [
{
"code": null,
"e": 2679,
"s": 2368,
"text": "The Portable Document Format (PDF) is a file format that helps to present data in a manner that is independent of application software, hardware, and operating systems. Each PDF file holds description of a fixed-layout flat document, including text, fon... |
C++ string class and its applications - GeeksforGeeks | 13 Sep, 2021
In C++ we can store string by one of the two ways –
C style stringsstring class (discussed in this post)
C style strings
string class (discussed in this post)
In this post, the second method is discussed. string class is part of C++ library that supports a lot much functionality over C style strings.C++ st... | [
{
"code": null,
"e": 24220,
"s": 24192,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 24272,
"s": 24220,
"text": "In C++ we can store string by one of the two ways –"
},
{
"code": null,
"e": 24325,
"s": 24272,
"text": "C style stringsstring class (discussed... |
How to make colorbar orientation horizontal in Python using Matplotlib? | To make colorbar orientation horizontal in Python, we can use orientation="horizontal" in the argument.
Set the figure size and adjust the padding between and around the subplots.
Create random x, y and z data points using numpy.
Create a figure and a set of subplots.
Use scatter() method to plot x, y and z data points... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To make colorbar orientation horizontal in Python, we can use orientation=\"horizontal\" in the argument."
},
{
"code": null,
"e": 1242,
"s": 1166,
"text": "Set the figure size and adjust the padding between and around the subplots."... |
How to fire an event on file select using jQuery ? - GeeksforGeeks | 17 Sep, 2019
Given an HTML document and the task to fire an event when a file is selected using jQuery. The JQuery change() method is used to fire an event when file is selected.
Using change() method: It is used to change the value of the input fields. This method works with “input, textarea and select” elements.
Synt... | [
{
"code": null,
"e": 26044,
"s": 26016,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 26210,
"s": 26044,
"text": "Given an HTML document and the task to fire an event when a file is selected using jQuery. The JQuery change() method is used to fire an event when file is selecte... |
How to add a border around a NumPy array? - GeeksforGeeks | 01 Oct, 2020
Sometimes we need to add a border around a NumPy matrix. Numpy provides a function known as ‘numpy.pad()’ to construct the border. The below examples show how to construct a border of ‘0’ around the identity matrix.
Syntax :
numpy.pad(array, pad_width, mode='constant', **kwargs)
Example 1: Construct a b... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 25771,
"s": 25555,
"text": "Sometimes we need to add a border around a NumPy matrix. Numpy provides a function known as ‘numpy.pad()’ to construct the border. The below examples show how to c... |
How to implement an Interface using an Enum in Java | 21 Jun, 2020
Enumerations serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck of playing cards may be 4 enumerators named Club, Diamond, Heart, and Spade, belonging to an enumerated type named Suit. We have already discussed the basics of enum, how ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 446,
"s": 28,
"text": "Enumerations serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck of playing cards may be 4 enumerators n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.