title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Speed of boat upstream and downstream - GeeksforGeeks | 15 Apr, 2021
Write a program to find the speed of boat upstream and downstream. In order to calculate the speed of the boat upstream and downstream, we should know the speed of the boat in still water(B) and speed of the stream (S)
Examples:
Input : B = 10, S = 4
Output : Speed Downstream = 14 km/hr
Speed Up... | [
{
"code": null,
"e": 23815,
"s": 23787,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 24034,
"s": 23815,
"text": "Write a program to find the speed of boat upstream and downstream. In order to calculate the speed of the boat upstream and downstream, we should know the speed of... |
Python | os.unlink() method - GeeksforGeeks | 18 Jun, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
All functions in os module raise OSError in the case of invalid or inaccessible file nam... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n18 Jun, 2019"
},
{
"code": null,
"e": 24120,
"s": 23901,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable... |
A hands-on guide to ‘sorting’ dataframes in Pandas | by Parul Pandey | Towards Data Science | My tryst with the pandas' library continues. Of late, I have been trying to look deeper into this library and consolidating some of the pandas’ features in byte-sized articles. I have written articles on reducing memory usage while working with pandas, converting XML files into a pandas dataframe easily, getting starte... | [
{
"code": null,
"e": 745,
"s": 172,
"text": "My tryst with the pandas' library continues. Of late, I have been trying to look deeper into this library and consolidating some of the pandas’ features in byte-sized articles. I have written articles on reducing memory usage while working with pandas, co... |
Encoding string to reduce its size in JavaScript | We are required to write a JavaScript function that takes in a string of characters, str, as the only argument. Our function should encode the input string and compare its size with the original string and return the string which is smaller in size.
The rule to encode a particular string is −
n[s], where the s inside t... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string of characters, str, as the only argument. Our function should encode the input string and compare its size with the original string and return the string which is smaller in size."
... |
C Program Coin Change - GeeksforGeeks | 14 May, 2021
Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The order of coins doesn\’t matter.For example, for N = 4 and S = {1,2,3}, there are four solutions: {1,1,1,1},{1,1,2},{2,2},{1,3}. So ou... | [
{
"code": null,
"e": 24764,
"s": 24736,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 25229,
"s": 24764,
"text": "Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the c... |
React Native - HTTP | In this chapter, we will show you how to use fetch for handling network requests.
import React from 'react';
import HttpExample from './http_example.js'
const App = () => {
return (
<HttpExample />
)
}
export default App
We will use the componentDidMount lifecycle method to load the data from server as soo... | [
{
"code": null,
"e": 2426,
"s": 2344,
"text": "In this chapter, we will show you how to use fetch for handling network requests."
},
{
"code": null,
"e": 2578,
"s": 2426,
"text": "import React from 'react';\nimport HttpExample from './http_example.js'\n\nconst App = () => {\n r... |
What You Need to Know About Netflix’s ‘Jupyter Killer’: Polynote 📖 | by Michael Li | Towards Data Science | Today, Netflix open-sourced Polynote, the internal notebook they developed, to the public. It’s not rare these days that big tech companies open sources their internal tools or services, then got popular and adopted by the industry. Amazon AWS, Facebook’s React.js, etc. are two of them. It makes sense. These big tech c... | [
{
"code": null,
"e": 1106,
"s": 172,
"text": "Today, Netflix open-sourced Polynote, the internal notebook they developed, to the public. It’s not rare these days that big tech companies open sources their internal tools or services, then got popular and adopted by the industry. Amazon AWS, Facebook’... |
Difference between type() and isinstance() in Python | by Eden Au | Towards Data Science | Last time we talked about 4 introspection tools in Python that every beginner should use. Check out the article below if you have not read it. The first two functions introduced were type() and isinstance().
towardsdatascience.com
A bit of recap here.
Every object in Python has a data type, a built-in one or a customis... | [
{
"code": null,
"e": 379,
"s": 171,
"text": "Last time we talked about 4 introspection tools in Python that every beginner should use. Check out the article below if you have not read it. The first two functions introduced were type() and isinstance()."
},
{
"code": null,
"e": 402,
"... |
Angular 4 - Forms | In this chapter, we will see how forms are used in Angular 4. We will discuss two ways of working with forms - template driven form and model driven forms.
With a template driven form, most of the work is done in the template; and with the model driven form, most of the work is done in the component class.
Let us now c... | [
{
"code": null,
"e": 2148,
"s": 1992,
"text": "In this chapter, we will see how forms are used in Angular 4. We will discuss two ways of working with forms - template driven form and model driven forms."
},
{
"code": null,
"e": 2300,
"s": 2148,
"text": "With a template driven for... |
Group values in array by two properties JavaScript | We have an array of objects like this −
const arr = [
{ value: 12, gap: 1 },
{ value: 13, gap: 1 },
{ value: 14, gap: 1 },
{ value: 15, gap: 1 },
{ value: 19, gap: 2 },
{ value: 21, gap: 1 },
{ value: 22, gap: 1 },
{ value: 23, gap: 1 },
{ value: 27, gap: 1 },
{ value: 31, gap: 4 },
{ v... | [
{
"code": null,
"e": 1102,
"s": 1062,
"text": "We have an array of objects like this −"
},
{
"code": null,
"e": 1587,
"s": 1102,
"text": "const arr = [\n { value: 12, gap: 1 },\n { value: 13, gap: 1 },\n { value: 14, gap: 1 },\n { value: 15, gap: 1 },\n { value: 19, gap... |
How to disable/enable an input box with jQuery? | We can easily disable input box(textbox,textarea) using disable attribute to “disabled”.
$(‘elementname’).attr(‘disabled’,’disabled’);
To enable disabled element we need to remove “disabled” attribute from this element.
$(‘elementname’).removeAttr(‘disabled’);
<html >
<head>
<title>ed</title>
<script src="../.... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "We can easily disable input box(textbox,textarea) using disable attribute to “disabled”."
},
{
"code": null,
"e": 1197,
"s": 1151,
"text": "$(‘elementname’).attr(‘disabled’,’disabled’);"
},
{
"code": null,
"e": 1282,
... |
How to schedule tasks in Java to run for repeated fixed-rate execution, beginning at the specified time | One of the methods the Timer class is void scheduleAtFixedRate(TimerTask task, Date firstTime, long period). This method schedules the specified task for repeated fixed-rate execution, beginning at the specified time.
In fixed-rate execution, each execution is scheduled with respect to the scheduled run time of the ini... | [
{
"code": null,
"e": 1280,
"s": 1062,
"text": "One of the methods the Timer class is void scheduleAtFixedRate(TimerTask task, Date firstTime, long period). This method schedules the specified task for repeated fixed-rate execution, beginning at the specified time."
},
{
"code": null,
"e"... |
How to display an element on hover with CSS? | To display an element on hover with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
body{
margin:20px;
padding:20px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.hiddenText {
display: none;
}
.hoverDiv:hover + .hiddenText {
... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "To display an element on hover with CSS, the code is as follows −"
},
{
"code": null,
"e": 1139,
"s": 1128,
"text": " Live Demo"
},
{
"code": null,
"e": 1711,
"s": 1139,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<... |
How to Create or Modify a Variable in SAS Programming? - GeeksforGeeks | 23 Jul, 2019
This will help you to create or modify a variable. It is common to define a new variable based on the existing variable.
Let’s create a datasetIn the code below, we are creating a dataset named as Example1 which is going to store on WORK(temporary) library. In this dataset, there would be a variable called... | [
{
"code": null,
"e": 24477,
"s": 24449,
"text": "\n23 Jul, 2019"
},
{
"code": null,
"e": 24598,
"s": 24477,
"text": "This will help you to create or modify a variable. It is common to define a new variable based on the existing variable."
},
{
"code": null,
"e": 24884... |
How to set the Android permission on a folder/file on SD Card to be able to write to it? | This example demonstrates how do I set the Android permission on a folder/file on SD Card to be able to write to it.
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 ver... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "This example demonstrates how do I set the Android permission on a folder/file on SD Card to be able to write to it."
},
{
"code": null,
"e": 1308,
"s": 1179,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New... |
Program to construct DFA accepting odd number of 0s and odd number of 1s - GeeksforGeeks | 07 Jun, 2021
Given a binary string S, the task is to write a program for DFA Machine that accepts a string with odd numbers of 0s and 1s.
Examples:
Input: S = “010011”Output: AcceptedExplanation:The given string S contains odd number of zeros and ones.
Input: S = “00000”Output: Not AcceptedExplanation:The given string ... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n07 Jun, 2021"
},
{
"code": null,
"e": 25110,
"s": 24985,
"text": "Given a binary string S, the task is to write a program for DFA Machine that accepts a string with odd numbers of 0s and 1s."
},
{
"code": null,
"e": 2... |
Calculating average of an array in JavaScript | Following is the code for calculating average of an array in JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana,... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "Following is the code for calculating average of an array in JavaScript −"
},
{
"code": null,
"e": 1147,
"s": 1136,
"text": " Live Demo"
},
{
"code": null,
"e": 2205,
"s": 1147,
"text": "<!DOCTYPE html>\n<html lan... |
Difference Between Hive Internal and External Tables - GeeksforGeeks | 03 Jan, 2021
Hive can be used to manage structured data on the top of Hadoop. The data is stored in the form of a table inside a database. In Hive, the user is allowed to create Internal as well as External tables to manage and store data in a database. In this article, we will be discussing the difference between Hive... | [
{
"code": null,
"e": 24491,
"s": 24463,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 25107,
"s": 24491,
"text": "Hive can be used to manage structured data on the top of Hadoop. The data is stored in the form of a table inside a database. In Hive, the user is allowed to creat... |
How to Enable and Install Third Party Packages Using EPEL Repository on CentOS/RHEL | In this article we shall try to learn, how to add EPEL Repository for Linux. EPEL (Extra Package for Enterprise Linux) is an open source and free community based repository from the Fedora community team which provides high quality and good add-on software’s for Linux distributions. It has Red Hat Enter Linux, CentOS, ... | [
{
"code": null,
"e": 1474,
"s": 1062,
"text": "In this article we shall try to learn, how to add EPEL Repository for Linux. EPEL (Extra Package for Enterprise Linux) is an open source and free community based repository from the Fedora community team which provides high quality and good add-on softw... |
MomentJS - Using Duration with Diff | This method is used to get the duration difference between two moments.
var duration = moment.duration(x.diff(y))
var d = moment.duration(moment(["2017,07,04"]).diff(moment(["2015,08,20"])));
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2032,
"s": 1960,
"text": "This method is used to get the duration difference between two moments."
},
{
"code": null,
"e": 2075,
"s": 2032,
"text": "var duration = moment.duration(x.diff(y))\n"
},
{
"code": null,
"e": 2153,
"s": 2075,
"tex... |
BabylonJS - Animations | Animation makes a scene more interactive and also makes it impressive giving realistic look to it. Let us now understand animation in detail. We will apply animation on shapes to move it from one position to another. To use animation, you need to create an object on animation with the required parameters.
Let us now se... | [
{
"code": null,
"e": 2490,
"s": 2183,
"text": "Animation makes a scene more interactive and also makes it impressive giving realistic look to it. Let us now understand animation in detail. We will apply animation on shapes to move it from one position to another. To use animation, you need to create... |
Bokeh - Rectangle, Oval and Polygon | It is possible to render rectangle, ellipse and polygons in a Bokeh figure. The rect() method of Figure class adds a rectangle glyph based on x and y coordinates of center, width and height. The square() method on the other hand has size parameter to decide dimensions.
The ellipse() and oval() methods adds an ellipse a... | [
{
"code": null,
"e": 2540,
"s": 2270,
"text": "It is possible to render rectangle, ellipse and polygons in a Bokeh figure. The rect() method of Figure class adds a rectangle glyph based on x and y coordinates of center, width and height. The square() method on the other hand has size parameter to de... |
JavaScript - length of array objects | The length property in JavaScript returns the size of the object. Following is the code for the length of string and array objects −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
bod... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "The length property in JavaScript returns the size of the object. Following is the code for the length of string and array objects −"
},
{
"code": null,
"e": 1206,
"s": 1195,
"text": " Live Demo"
},
{
"code": null,
"e": 2... |
Tidy Anomaly Detection using R. Imagine, You run an online business... | by AbdulMajedRaja RS | Towards Data Science | Imagine, You run an online business like Amazon.com and you want to plan Server Resources for the next year — It is imperative that you need to know when your load is going to spike (or at least when did it spike in retrospective to believe it’ll repeat again) and that is where Time Series Anomaly Detection is what you... | [
{
"code": null,
"e": 761,
"s": 171,
"text": "Imagine, You run an online business like Amazon.com and you want to plan Server Resources for the next year — It is imperative that you need to know when your load is going to spike (or at least when did it spike in retrospective to believe it’ll repeat a... |
Flutter - Introduction to Dart Programming | Dart is an open-source general-purpose programming language. It is originally developed by Google. Dart is an object-oriented language with C-style syntax. It supports programming concepts like interfaces, classes, unlike other programming languages Dart doesn’t support arrays. Dart collections can be used to replicate... | [
{
"code": null,
"e": 2736,
"s": 2352,
"text": "Dart is an open-source general-purpose programming language. It is originally developed by Google. Dart is an object-oriented language with C-style syntax. It supports programming concepts like interfaces, classes, unlike other programming languages Dar... |
How to implement Min Heap using STL? | 06 Jul, 2022
In C++ STL, there is priority_queue that can directly be used to implement Max Heap. In order to fully understand the code, make sure you are familiar with following concepts in C++
Container Adaptors in STL
Functors
See below example:
C++
// C++ program to show that priority_queue is by// default a Max H... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 237,
"s": 54,
"text": "In C++ STL, there is priority_queue that can directly be used to implement Max Heap. In order to fully understand the code, make sure you are familiar with following concepts... |
How to use indexOf () in Android textview? | This example demonstrate about How to use indexOf () in Android textview.
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"?>
<LinearLayout... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "This example demonstrate about How to use indexOf () in Android textview."
},
{
"code": null,
"e": 1265,
"s": 1136,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to c... |
NumPy Tutorial | NumPy is a Python library.
NumPy is used for working with arrays.
NumPy is short for "Numerical Python".
We have created 43 tutorial pages for you to learn more about NumPy.
Starting with a basic introduction and ends up with creating and plotting random data sets, and working with NumPy functions:
Test your NumPy skil... | [
{
"code": null,
"e": 27,
"s": 0,
"text": "NumPy is a Python library."
},
{
"code": null,
"e": 66,
"s": 27,
"text": "NumPy is used for working with arrays."
},
{
"code": null,
"e": 105,
"s": 66,
"text": "NumPy is short for \"Numerical Python\"."
},
{
"c... |
Scala Map foreach() method with example - GeeksforGeeks | 13 Aug, 2019
The foreach() method is utilized to apply the given function to all the elements of the map.
Method Definition: def foreach(f: ((A, B)) => Unit): Unit
Return Type: It returns all the elements of the map after applying the given function to each of them.
Example #1:
// Scala program of foreach()// method /... | [
{
"code": null,
"e": 25233,
"s": 25205,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 25326,
"s": 25233,
"text": "The foreach() method is utilized to apply the given function to all the elements of the map."
},
{
"code": null,
"e": 25384,
"s": 25326,
"text"... |
BigDecimal negate() Function in Java - GeeksforGeeks | 04 Dec, 2018
The java.math.BigDecimal.negate() method returns a BigDecimal whose value is the negated value of the BigDecimal with which it is used.Syntax:public BigDecimal negate()Parameters: The method does not take any parameters .Return Value: This method returns the negative value of the BigDecimal object and whos... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 28937,
"s": 25687,
"text": "The java.math.BigDecimal.negate() method returns a BigDecimal whose value is the negated value of the BigDecimal with which it is used.Syntax:public BigDecimal neg... |
Node.js MySQL Delete Query - GeeksforGeeks | 07 Oct, 2021
We use SQL DELETE Query to delete data with some condition from MySQL Table.
Syntax:
This will delete all rows of customers’ tables but everything else will remain as it is (indexing, etc).DELETE FROM users
DELETE FROM users
This will delete all rows of users table where userId is 2.DELETE FROM users WHERE... | [
{
"code": null,
"e": 26293,
"s": 26265,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 26370,
"s": 26293,
"text": "We use SQL DELETE Query to delete data with some condition from MySQL Table."
},
{
"code": null,
"e": 26378,
"s": 26370,
"text": "Syntax:"
},... |
Print 1 to 100 in C++ Without Loops and Recursion - GeeksforGeeks | 22 Dec, 2021
We can print 1 to 100 without using loops and recursion using three approaches discussed below:
1) Template Metaprogramming: Templates in C++ allow non-datatypes also as parameters. Non-datatype means a value, not a datatype.
Example:
CPP
// CPP Program to print 1 to 100// without loops and recursion#incl... | [
{
"code": null,
"e": 26501,
"s": 26473,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 26597,
"s": 26501,
"text": "We can print 1 to 100 without using loops and recursion using three approaches discussed below:"
},
{
"code": null,
"e": 26728,
"s": 26597,
"te... |
Angular ngx Bootstrap Tabs Component - GeeksforGeeks | 02 Sep, 2021
Angular ngx bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites.In this article, we will know how to use Tabs in angular ngx bootstrap.
Installation syntax:
npm install ngx-bootstrap --sa... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 26610,
"s": 26354,
"text": "Angular ngx bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make... |
LINQ | Projection Operator | Select - GeeksforGeeks | 21 May, 2019
In LINQ, projection is an operation which converts an object into the new form which holds only those properties that will be subsequently used. By using projection, a developer can create a new type which is built from each object. You are allowed to project property and conduct mathematical function on i... | [
{
"code": null,
"e": 25663,
"s": 25635,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 26043,
"s": 25663,
"text": "In LINQ, projection is an operation which converts an object into the new form which holds only those properties that will be subsequently used. By using projectio... |
Longest path to the bottom of a Binary Tree forming an Arithmetic Progression - GeeksforGeeks | 20 Aug, 2021
Given a Binary Tree consisting of N nodes, the task is to find the length of the longest path from any node to the bottom of the tree such that all the node values form an Arithmetic Progression.
Examples:
Input:
Output: 4Explanation:From the above given tree, the longest path with node values forming an A... | [
{
"code": null,
"e": 26325,
"s": 26297,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 26521,
"s": 26325,
"text": "Given a Binary Tree consisting of N nodes, the task is to find the length of the longest path from any node to the bottom of the tree such that all the node values... |
Extract IP address from file using Python - GeeksforGeeks | 10 Feb, 2022
Let us see how to extract IP addresses from a file using Python.
Algorithm :
Import the re module for regular expression.
Open the file using the open() function.
Read all the lines in the file and store them in a list.
Declare the pattern for IP addresses. The regex pattern is :
r'(\d{1,3}\.\d{1,3}\.... | [
{
"code": null,
"e": 26075,
"s": 26047,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 26141,
"s": 26075,
"text": "Let us see how to extract IP addresses from a file using Python. "
},
{
"code": null,
"e": 26155,
"s": 26141,
"text": "Algorithm : "
},
{
... |
p5.js | Bubble Sort - GeeksforGeeks | 09 Jul, 2019
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order.
In order to know more about it. Please refer Bubble Sort
Approach:
Create an array of random values and render a bar corresponding to that value in terms of height.
Create a... | [
{
"code": null,
"e": 26015,
"s": 25987,
"text": "\n09 Jul, 2019"
},
{
"code": null,
"e": 26149,
"s": 26015,
"text": "Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order."
},
{
"code": null,
... |
How to set the width and height of an image using HTML ? - GeeksforGeeks | 14 Sep, 2020
The height and width of an image can be set using height and width attribute. The height and width can be set in terms of pixels.
The <img> height attribute is used to set the height of the image in pixels. The <img> width attribute is used to set the width of the image in pixels.
Example 1: In this exampl... | [
{
"code": null,
"e": 26165,
"s": 26137,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 26295,
"s": 26165,
"text": "The height and width of an image can be set using height and width attribute. The height and width can be set in terms of pixels."
},
{
"code": null,
"... |
Python code to convert SOP to POS - GeeksforGeeks | 19 Nov, 2020
Write a program in python to convert standard SOP(sum of products) form to standard POS(product of sums) form.
Assumptions:The input SOP expression is standard. The variables in SOP expression are continuous i.e. if expression contains variable A then it will have variables B, C respectively and each Produ... | [
{
"code": null,
"e": 25483,
"s": 25455,
"text": "\n19 Nov, 2020"
},
{
"code": null,
"e": 25594,
"s": 25483,
"text": "Write a program in python to convert standard SOP(sum of products) form to standard POS(product of sums) form."
},
{
"code": null,
"e": 25862,
"s":... |
What is the difference between display: inline and display: inline-block in CSS? - GeeksforGeeks | 04 Dec, 2018
The display property in CSS is very useful and commonly used property which contains many values. This article contains display:inline and display:inline-block property.
“display: inline” Property: This property is used to display an element as an inline element (like <span>). The height and width properti... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 26111,
"s": 25941,
"text": "The display property in CSS is very useful and commonly used property which contains many values. This article contains display:inline and display:inline-block pro... |
map vs unordered_map in C++ - GeeksforGeeks | 11 May, 2022
Pre-requisite : std::map, std::unordered_mapWhen it comes to efficiency, there is a huge difference between maps and unordered maps. We must know the internal working of both to decide which one is to be used.
Difference :
| map | unordered_map
-------------------------------... | [
{
"code": null,
"e": 25775,
"s": 25747,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 25985,
"s": 25775,
"text": "Pre-requisite : std::map, std::unordered_mapWhen it comes to efficiency, there is a huge difference between maps and unordered maps. We must know the internal work... |
PyQt5 Label - Setting color to shadow - GeeksforGeeks | 10 May, 2020
In this article we will see how we can set shadow color to the label, when we create a shadow to the label it is by default of black color although we can its color.
In order to set color to the shadow of label with the help of setColor method
Syntax : shadow.setColor(color_object)Here shadow is the QGraph... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25703,
"s": 25537,
"text": "In this article we will see how we can set shadow color to the label, when we create a shadow to the label it is by default of black color although we can its colo... |
Python - Wildcard Substring search - GeeksforGeeks | 22 Apr, 2020
Sometimes, while working with Python Strings, we have problem in which, we need to search for substring, but have some of characters missing and we need to find the match. This can have application in many domains. Lets discuss certain ways in which this task can be performed.
Method #1 : Using re.search()... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25815,
"s": 25537,
"text": "Sometimes, while working with Python Strings, we have problem in which, we need to search for substring, but have some of characters missing and we need to find th... |
How to Create Breadcrumbs using HTML and CSS ? - GeeksforGeeks | 25 Mar, 2020
Create an attractive Breadcrumbs navigation is quite difficult for NON-CSS experts. Without using CSS, the Breadcrumbs navigation will steal your website’s gorgeousness. By using only HTML and CSS we can create an attractive Breadcrumbs navigation. In this article, the main focus will be CSS. We will creat... | [
{
"code": null,
"e": 31599,
"s": 31571,
"text": "\n25 Mar, 2020"
},
{
"code": null,
"e": 32000,
"s": 31599,
"text": "Create an attractive Breadcrumbs navigation is quite difficult for NON-CSS experts. Without using CSS, the Breadcrumbs navigation will steal your website’s gorgeou... |
How to set Text in the RadioButton in C#? - GeeksforGeeks | 30 Jun, 2019
In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose only one option among three options like Male or Female or Transgender. In Windows Forms, you are allowed to add text in the RadioB... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 24748,
"s": 24302,
"text": "In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you... |
RadioButton in C# - GeeksforGeeks | 02 Dec, 2021
In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose only one option among three options like Male or Female or Transgender. In C#, RadioButton is a class and it is defined under Syste... | [
{
"code": null,
"e": 24152,
"s": 24124,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 24792,
"s": 24152,
"text": "In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you... |
Mean and Median of a matrix in C++ | In this problem, we are given a 2D array of size n*n. Our task is to create a program that will print the mean and median of the matrix in C++.
Mean is the average of the date set. In a matrix mean is the average of all elements of the matrix.
Mean = (sum of all elements of the matrix)/(number of elements of the matrix... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "In this problem, we are given a 2D array of size n*n. Our task is to create a program that will print the mean and median of the matrix in C++."
},
{
"code": null,
"e": 1306,
"s": 1206,
"text": "Mean is the average of the date set. I... |
Go - Loops | 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 e... | [
{
"code": null,
"e": 2167,
"s": 1937,
"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": n... |
How to add the JDBC MySQL driver to an Eclipse project? | To add the JDBC MySQL driver to an Eclipse project, you need to follow the below steps.
The first step is as follows:
Step1: Create a dynamic web project with some name in Eclipse.
Step2: After pressing the Dynamic Web Project, a new window will open. Now give the project name. The screenshot is as follows:
After click... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To add the JDBC MySQL driver to an Eclipse project, you need to follow the below steps."
},
{
"code": null,
"e": 1180,
"s": 1150,
"text": "The first step is as follows:"
},
{
"code": null,
"e": 1243,
"s": 1180,
"t... |
8051 Program to Add two 8 Bit numbers | Intel 8051 is an 8-bit microcontroller. It has many powerful instructions and IO accessing techniques. In this section, we will see one of the simplest program using 8051.
Here we will add two8-bit numbers using this microcontroller. The register A(Accumulator) is used as one operand in the operations. There are seven ... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "Intel 8051 is an 8-bit microcontroller. It has many powerful instructions and IO accessing techniques. In this section, we will see one of the simplest program using 8051."
},
{
"code": null,
"e": 1475,
"s": 1234,
"text": "Here we wi... |
VB.Net - File Handling | A file is a collection of data stored in a disk with a specific name and a directory path. When a file is opened for reading or writing, it becomes a stream.
The stream is basically the sequence of bytes passing through the communication path. There are two main streams: the input stream and the output stream. The inpu... | [
{
"code": null,
"e": 2458,
"s": 2300,
"text": "A file is a collection of data stored in a disk with a specific name and a directory path. When a file is opened for reading or writing, it becomes a stream."
},
{
"code": null,
"e": 2756,
"s": 2458,
"text": "The stream is basically ... |
H2 Database - Show | SHOW is a command used to display the list of Schemas, Tables, or Columns of the table.
Following is the generic syntax of the SHOW command.
SHOW { SCHEMAS | TABLES [ FROM schemaName ] |
COLUMNS FROM tableName [ FROM schemaName ] }
The following command can be used to get the list of tables in the current database.
... | [
{
"code": null,
"e": 2195,
"s": 2107,
"text": "SHOW is a command used to display the list of Schemas, Tables, or Columns of the table."
},
{
"code": null,
"e": 2248,
"s": 2195,
"text": "Following is the generic syntax of the SHOW command."
},
{
"code": null,
"e": 2342... |
How to trigger Form Validators in Angular2 ? - GeeksforGeeks | 28 Jul, 2020
In Angular 2, the best way to deal with complex forms is by using Reactive forms. Below we are going to elaborate on how to trigger form validators for login page.
In reactive forms, we use FormControl and by using this, we get access to sub-fields of form and their properties. Some of their properties are... | [
{
"code": null,
"e": 24718,
"s": 24690,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24882,
"s": 24718,
"text": "In Angular 2, the best way to deal with complex forms is by using Reactive forms. Below we are going to elaborate on how to trigger form validators for login page.... |
Dart Programming - Switch Case Statement | The switch statement evaluates an expression, matches the expression’s value to a case clause and executes the statements associated with that case.
Following is the syntax.
switch(variable_expression) {
case constant_expr1: {
// statements;
}
break;
case constant_expr2: {
//statements;... | [
{
"code": null,
"e": 2674,
"s": 2525,
"text": "The switch statement evaluates an expression, matches the expression’s value to a case clause and executes the statements associated with that case."
},
{
"code": null,
"e": 2699,
"s": 2674,
"text": "Following is the syntax."
},
... |
Implementing MACD in Python. MACD is a popularly used technical... | by Posey | Towards Data Science | MACD is used and discussed in many different trading circles. Moving Average Convergence Divergence (MACD) is a trend following indicator. MACD can be calculated very simply by subtracting the 26 period EMA from the 12 period EMA. We previously discussed EMAs in our article here. MACD can be used and interpreted in a h... | [
{
"code": null,
"e": 594,
"s": 172,
"text": "MACD is used and discussed in many different trading circles. Moving Average Convergence Divergence (MACD) is a trend following indicator. MACD can be calculated very simply by subtracting the 26 period EMA from the 12 period EMA. We previously discussed ... |
Predicting Gold Prices Using Machine Learning | by Mohammad Riazuddin CFA, MMA | Towards Data Science | I have been a student of financial markets for over a decade and have been studying different asset classes and their behavior in different economic conditions. It is difficult to find an asset class which has greater polarization than Gold. There are people who love it and people who hate it, and more often than not, ... | [
{
"code": null,
"e": 786,
"s": 172,
"text": "I have been a student of financial markets for over a decade and have been studying different asset classes and their behavior in different economic conditions. It is difficult to find an asset class which has greater polarization than Gold. There are peo... |
How to force Input field to enter numbers only using JavaScript ? - GeeksforGeeks | 20 Jul, 2021
By default, HTML 5 input field has attribute type=”number” that is used to get input in numeric format. Now forcing input field type=”text” to accept numeric values only by using Javascript or jQuery. You can also set type=”tel” attribute in the input field that will popup numeric keyboard on mobile device... | [
{
"code": null,
"e": 24465,
"s": 24437,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 24857,
"s": 24465,
"text": "By default, HTML 5 input field has attribute type=”number” that is used to get input in numeric format. Now forcing input field type=”text” to accept numeric value... |
How to move from tf.contrib.learn Estimator to core Tensorflow tf.Estimator | by Lak Lakshmanan | Towards Data Science | I have a bunch of machine learning models built using the “original” Estimator API, the one in tf.contrib.learn. In Tensorflow 1.2, parts of it moved to core and in Tensorflow 1.4, the remaining pieces I need finally arrived in core Tensorflow. So, time for me to begin the process of moving to the core Estimator API.
W... | [
{
"code": null,
"e": 490,
"s": 171,
"text": "I have a bunch of machine learning models built using the “original” Estimator API, the one in tf.contrib.learn. In Tensorflow 1.2, parts of it moved to core and in Tensorflow 1.4, the remaining pieces I need finally arrived in core Tensorflow. So, time f... |
Get index of given element in array field in MongoDB? | You can use $indexOfArray operator for this. Let us create a collection with documents −
>db.getIndexDemo.insertOne({"InstructorName":"Chris","InstructorSubject":["MongoDB","MySQL","Java","C++"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cbd5251de8cc557214c0df8")
}
Display all documents from a collecti... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "You can use $indexOfArray operator for this. Let us create a collection with documents −"
},
{
"code": null,
"e": 1345,
"s": 1151,
"text": ">db.getIndexDemo.insertOne({\"InstructorName\":\"Chris\",\"InstructorSubject\":[\"MongoDB\",\... |
How to control recursion in Get-ChildItem in PowerShell? | When –Depth parameter is used along with Get-ChildItem, it controls the recursion of displaying the subfolders and their contents. For example, if –Depth parameter is set to 1 then it will display only the content of the parent folder and immediate subfolders but not the subfolders of the subfolders.
When you specify –... | [
{
"code": null,
"e": 1364,
"s": 1062,
"text": "When –Depth parameter is used along with Get-ChildItem, it controls the recursion of displaying the subfolders and their contents. For example, if –Depth parameter is set to 1 then it will display only the content of the parent folder and immediate subf... |
Matplotlib.pyplot.tripcolor() in Python - GeeksforGeeks | 11 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface.
Sample Code
# sample codeimport matplotlib.pyplot as plt plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) plt.show()
O... | [
{
"code": null,
"e": 24141,
"s": 24113,
"text": "\n11 Apr, 2020"
},
{
"code": null,
"e": 24336,
"s": 24141,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which pr... |
How to enable and disable submit button using jQuery? | To enable and disable submit button, use the jQuery prop() method. You can try to run the following code to enable and disable submit button using jQuery −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "To enable and disable submit button, use the jQuery prop() method. You can try to run the following code to enable and disable submit button using jQuery −"
},
{
"code": null,
"e": 1228,
"s": 1218,
"text": "Live Demo"
},
{
"c... |
Data Analysis Of Your AppleWatch Workouts | by flo.tausend | Towards Data Science | Are you a sports and data geek tracking your workouts with the Apple Watch? Then it is probably time to learn more about your performance development over the last years. After reading this article you will know how to get deep insights about your workouts and sport patterns. And if this is not enough, it may be a nice... | [
{
"code": null,
"e": 736,
"s": 171,
"text": "Are you a sports and data geek tracking your workouts with the Apple Watch? Then it is probably time to learn more about your performance development over the last years. After reading this article you will know how to get deep insights about your workout... |
Comparing Strings Is Easy With FuzzyWuzzy Library | Towards Data Science | About a year ago, I saw a colleague of mine working on a large data set, aiming to measure the similarity level between each pair of strings. My colleague started to develop a method that calculated the “distance” between the strings, with a set of rules he came up with.
Since I was familiar with the FuzzyWuzzy python ... | [
{
"code": null,
"e": 444,
"s": 172,
"text": "About a year ago, I saw a colleague of mine working on a large data set, aiming to measure the similarity level between each pair of strings. My colleague started to develop a method that calculated the “distance” between the strings, with a set of rules ... |
Fix ERROR 1064 (42000) while creating a database in MySQL? | The ERROR 1064 (42000) mainly occurs when the syntax isn’t set correctly i.e. error in applying the backtick symbol or while creating a database without them can also create an error, if you will use hyphen in the name, for example, Demo-Table will result in ERROR 1064 (42000).
To remove the error, you need to use back... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "The ERROR 1064 (42000) mainly occurs when the syntax isn’t set correctly i.e. error in applying the backtick symbol or while creating a database without them can also create an error, if you will use hyphen in the name, for example, Demo-Table will resu... |
AI with Python â Quick Guide | Since the invention of computers or machines, their capability to perform various tasks has experienced an exponential growth. Humans have developed the power of computer systems in terms of their diverse working domains, their increasing speed, and reducing size with respect to time.
A branch of Computer Science named... | [
{
"code": null,
"e": 2491,
"s": 2205,
"text": "Since the invention of computers or machines, their capability to perform various tasks has experienced an exponential growth. Humans have developed the power of computer systems in terms of their diverse working domains, their increasing speed, and red... |
C program to find square root of a given number - GeeksforGeeks | 13 Apr, 2021
Given a number N, the task is to write a C program to find the square root of the given number N.
Examples:
Input: N = 12 Output: 3.464102
Input: N = 16 Output: 4
Method 1: Using inbuilt sqrt() function: The sqrt() function returns the sqrt of any number N.
Below is the implementation of the above approa... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 24330,
"s": 24232,
"text": "Given a number N, the task is to write a C program to find the square root of the given number N."
},
{
"code": null,
"e": 24341,
"s": 24330,
"... |
C# Methods | A method is a block of code which only runs when it is called.
You can pass data, known as parameters, into a method.
Methods are used to perform certain actions, and they are also known as functions.
Why use methods? To reuse code: define the code once, and use
it many times.
A method is defined
with the name of the... | [
{
"code": null,
"e": 63,
"s": 0,
"text": "A method is a block of code which only runs when it is called."
},
{
"code": null,
"e": 118,
"s": 63,
"text": "You can pass data, known as parameters, into a method."
},
{
"code": null,
"e": 201,
"s": 118,
"text": "Met... |
How To run SQL queries from a Jupyter Notebook | by Roman Orac | Towards Data Science | If you are working in the field of Data Science chances are you are using SQL to extract and preprocess the data. I’ve been using JetBrains DataGrip as my main SQL editor for a while now. While DataGrip does a decent job, it doesn't offer a way to visualize the data. Is there a better way?
- Complete your Python analys... | [
{
"code": null,
"e": 463,
"s": 172,
"text": "If you are working in the field of Data Science chances are you are using SQL to extract and preprocess the data. I’ve been using JetBrains DataGrip as my main SQL editor for a while now. While DataGrip does a decent job, it doesn't offer a way to visuali... |
Java Examples - Print Collection | How to print a collection ?
Following example how to print a collection by using tMap.keySet(), tMap.values() and tMap.firstKey() methods of Java Util class.
import java.util.*;
public class TreeExample{
public static void main(String[] args) {
System.out.println("Tree Map Example!\n");
TreeMap <Integer... | [
{
"code": null,
"e": 2096,
"s": 2068,
"text": "How to print a collection ?"
},
{
"code": null,
"e": 2226,
"s": 2096,
"text": "Following example how to print a collection by using tMap.keySet(), tMap.values() and tMap.firstKey() methods of Java Util class."
},
{
"code": nu... |
PyQt5 QSpinBox – Setting value | 03 May, 2020
In this article we will see how we can set value to the spin box. By default its value is 0 although user can change it any time. In order to change its value programmatically we will use setValue method
Syntax : spin.setValue(n)
Argument : It takes integer as argument
Return : None
Below is the implementa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "In this article we will see how we can set value to the spin box. By default its value is 0 although user can change it any time. In order to change its value programmatically... |
Java Connection setTransactionIsolation() method with example | In a database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.
JDBC provi... | [
{
"code": null,
"e": 1497,
"s": 1187,
"text": "In a database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transac... |
Python | Pandas Series.str.strip(), lstrip() and rstrip() | 25 Nov, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages that makes importing and analyzing data much easier.
Pandas provide 3 methods to handle white spaces(including New line) in any text data. As it ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Nov, 2019"
},
{
"code": null,
"e": 269,
"s": 54,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages that makes i... |
PROJECT Operation in Relational Algebra | 22 May, 2020
Prerequisite – Relational AlgebraProject operation selects (or chooses) certain attributes discarding other attributes. The Project operation is also known as vertical partitioning since it partitions the relation or table vertically discarding other columns or attributes.
Notation:
πA(R)
where ‘A’ is the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 May, 2020"
},
{
"code": null,
"e": 326,
"s": 52,
"text": "Prerequisite – Relational AlgebraProject operation selects (or chooses) certain attributes discarding other attributes. The Project operation is also known as vertical partit... |
Union and Intersection of two sorted arrays | 24 Jun, 2022
Given two sorted arrays, find their union and intersection.
Example:
Input : arr1[] = {1, 3, 4, 5, 7}
arr2[] = {2, 3, 5, 6}
Output : Union : {1, 2, 3, 4, 5, 6, 7}
Intersection : {3, 5}
Input : arr1[] = {2, 5, 6}
arr2[] = {4, 6, 8, 10}
Output : Union : {2, 4, 5, 6, 8, 10}
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 112,
"s": 52,
"text": "Given two sorted arrays, find their union and intersection."
},
{
"code": null,
"e": 121,
"s": 112,
"text": "Example:"
},
{
"code": null,
"e":... |
Python – Inner Nested Value List Mean in Dictionary | 14 May, 2020
Sometimes, while working with Python Dictionaries, we can have a problem in which we need to extract the mean of nested value lists in dictionary. This problem can have application in many domains including web development and competitive programming. Lets discuss certain ways in which this task can be per... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 343,
"s": 28,
"text": "Sometimes, while working with Python Dictionaries, we can have a problem in which we need to extract the mean of nested value lists in dictionary. This problem can have applic... |
Printing the Triangle Pattern using last term N | 19 Mar, 2022
Given a number N which represents the last term of the Triangle Pattern. The task is to print the Triangle Pattern from 1 to N, such that each row is complete.Triangle Pattern is given as:
1
2 3
4 5 6
7 8 9 10
.
.
Examples:
Input: N = 3
Output:
1
2 3
Input: N = 7
Output:
1
2 3
4 5 6
7 wi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Mar, 2022"
},
{
"code": null,
"e": 219,
"s": 28,
"text": "Given a number N which represents the last term of the Triangle Pattern. The task is to print the Triangle Pattern from 1 to N, such that each row is complete.Triangle Pattern... |
For loop in R | 18 Oct, 2021
For loop in R Programming Language is useful to iterate over the elements of a list, dataframe, vector, matrix, or any other object. It means, the for loop can be used to execute a group of statements repeatedly depending upon the number of elements in the object. It is an entry controlled loop, in this lo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 505,
"s": 52,
"text": "For loop in R Programming Language is useful to iterate over the elements of a list, dataframe, vector, matrix, or any other object. It means, the for loop can be used to exe... |
Python | Repeat String till K | 29 Jan, 2022
Sometimes, while working with strings, we might encounter a use case in which we need to repeat our string to the size of K, even though the last string might not be complete, but has to stop as the size of string becomes K. The problem of repeating string K times, is comparatively simpler than this proble... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2022"
},
{
"code": null,
"e": 652,
"s": 28,
"text": "Sometimes, while working with strings, we might encounter a use case in which we need to repeat our string to the size of K, even though the last string might not be complete,... |
D3.js csv() Function | 18 Aug, 2020
The d3.csv() function in D3.js is a part of the request API that returns a request for the file of type CSV at the specified URL. The mime type is text/CSV.
Syntax:
d3.csv(url[[, row], callback])
Parameters:
url: It is the URL of the file that is to be fetched.
callback: It is the function that is to be pe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "The d3.csv() function in D3.js is a part of the request API that returns a request for the file of type CSV at the specified URL. The mime type is text/CSV."
},
{
"cod... |
PySpark Join Types – Join Two DataFrames | 19 Dec, 2021
In this article, we are going to see how to join two dataframes in Pyspark using Python. Join is used to combine two or more dataframes based on columns in the dataframe.
Syntax: dataframe1.join(dataframe2,dataframe1.column_name == dataframe2.column_name,”type”)
where,
dataframe1 is the first dataframeda... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 199,
"s": 28,
"text": "In this article, we are going to see how to join two dataframes in Pyspark using Python. Join is used to combine two or more dataframes based on columns in the dataframe."
}... |
JavaScript - Objects Overview | JavaScript is an Object Oriented Programming (OOP) language. A programming language can be called object-oriented if it provides four basic capabilities to developers −
Encapsulation − the capability to store related information, whether data or methods, together in an object.
Encapsulation − the capability to store re... | [
{
"code": null,
"e": 2769,
"s": 2600,
"text": "JavaScript is an Object Oriented Programming (OOP) language. A programming language can be called object-oriented if it provides four basic capabilities to developers −"
},
{
"code": null,
"e": 2878,
"s": 2769,
"text": "Encapsulation... |
Setting Precision in Python Using Decimal Module | 01 Oct, 2020
The decimal module in Python can be used to set the precise value of a number. The default value of the Decimal module is up to 28 significant figures. However, it can be changed using getcontext().prec method.
The below program demonstrates the use of decimal module by computing the square root of 2 numbe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 239,
"s": 28,
"text": "The decimal module in Python can be used to set the precise value of a number. The default value of the Decimal module is up to 28 significant figures. However, it can be chan... |
Spring - Annotation Based Configuration | Starting from Spring 2.5 it became possible to configure the dependency injection using annotations. So instead of using XML to describe a bean wiring, you can move the bean configuration into the component class itself by using annotations on the relevant class, method, or field declaration.
Annotation injection is pe... | [
{
"code": null,
"e": 2720,
"s": 2426,
"text": "Starting from Spring 2.5 it became possible to configure the dependency injection using annotations. So instead of using XML to describe a bean wiring, you can move the bean configuration into the component class itself by using annotations on the relev... |
JavaScript Class Level Fields | 06 Dec, 2021
In any object-oriented programming language, classes can have private and public fields. Fields are nothing but variables that hold the information. There are two types of fields in an object-oriented programming language i.e, instance fields and static fields. An instance member belongs to a specific inst... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 342,
"s": 28,
"text": "In any object-oriented programming language, classes can have private and public fields. Fields are nothing but variables that hold the information. There are two types of fie... |
var keyword in Go | 20 Nov, 2019
var keyword in Golang is used to create the variables of a particular type having a proper name and initial value. Initialization is optional at the time of declaration of variables using var keyword that we will discuss later in this article.
Syntax:
var identifier type = expression
Example:
// here geek1... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 298,
"s": 54,
"text": "var keyword in Golang is used to create the variables of a particular type having a proper name and initial value. Initialization is optional at the time of declaration of va... |
HTML | <tr> valign Attribute | 25 Feb, 2022
The HTML <tr> valign Attribute is used to specify the vertical alignment of text content in a table row. It is not supported by HTML 5.
Syntax:
<tr valign= "top | middle | bottom | baseline">
Attribute Values:
top: It sets the content to top-align.
middle: It sets the content to middle-align.
bottom: It se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 164,
"s": 28,
"text": "The HTML <tr> valign Attribute is used to specify the vertical alignment of text content in a table row. It is not supported by HTML 5."
},
{
"code": null,
"e": 17... |
Tree Entropy in R Programming | 25 Aug, 2020
Entropy in R Programming is said to be a measure of the contaminant or ambiguity existing in the data. It is a deciding constituent while splitting the data through a decision tree. An unsplit sample has an entropy equal to zero while a sample with equally split parts has entropy equal to one. Two major fa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2020"
},
{
"code": null,
"e": 436,
"s": 28,
"text": "Entropy in R Programming is said to be a measure of the contaminant or ambiguity existing in the data. It is a deciding constituent while splitting the data through a decision... |
GATE | GATE CS 2012 | Question 30 | 06 Dec, 2018
Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 474,
"s": 54,
"text": "Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is u... |
Python tell() function | 28 Sep, 2021
Python too supports file handling and provides inbuilt functions for creating, writing and reading files. There are two types of files that can be handled in python, normal text files and binary files (written in binary language,0s and 1s).
Text files: In this type of file, Each line of text is terminated... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Sep, 2021"
},
{
"code": null,
"e": 270,
"s": 28,
"text": "Python too supports file handling and provides inbuilt functions for creating, writing and reading files. There are two types of files that can be handled in python, normal te... |
How to Read Data from SQLite Database in Android? | 25 Feb, 2021
In the 1st part of our SQLite database, we have seen How to Create and Add Data to SQLite Database in Android. In that article, we have added data to our SQLite Database. In this article, we will read all this data from the SQLite database and display this data in RecyclerView.
We will be working on the e... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 332,
"s": 52,
"text": "In the 1st part of our SQLite database, we have seen How to Create and Add Data to SQLite Database in Android. In that article, we have added data to our SQLite Database. In ... |
Average of even numbers till a given even number - GeeksforGeeks | 16 Dec, 2021
Given an even number n, find the average of even numbers from 1 to n.Examples :
Input : 10
Output : 6
Explanation:
(2 + 4 + 6 + 8 + 10 )/5
= 30/5
= 6
Input : 100
Output : 51
Method 1 We can calculate average by adding each even numbers till n and then dividing sum by count.
C++
Java
Python3
C#
PHP
Jav... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26018,
"s": 25937,
"text": "Given an even number n, find the average of even numbers from 1 to n.Examples : "
},
{
"code": null,
"e": 26115,
"s": 26018,
"text": "Input : 1... |
How to Install Matplotlib on MacOS? - GeeksforGeeks | 30 Sep, 2021
In this article, we will learn how to install Matplotlib in Python on MacOS. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
Follow the below steps to install the Matplotlib package on macOS using pip:
Step 1: Install the latest Python3 in MacO... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 26385,
"s": 26197,
"text": "In this article, we will learn how to install Matplotlib in Python on MacOS. Matplotlib is a comprehensive library for creating static, animated, and interactive v... |
Node.js path.relative() Method - GeeksforGeeks | 13 Oct, 2021
The path.relative() method is used to find the relative path from a given path to another path based on the current working directory. If both the given paths are the same, it would resolve to a zero-length string.
Syntax:
path.relative( from, to )
Parameters: This method accept two parameters as mentioned... | [
{
"code": null,
"e": 25773,
"s": 25745,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 25988,
"s": 25773,
"text": "The path.relative() method is used to find the relative path from a given path to another path based on the current working directory. If both the given paths are ... |
Python Bokeh - Plotting Horizontal Bar Graphs - GeeksforGeeks | 03 Jul, 2020
Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.
Bokeh can be used to plot horizontal bar graphs. Plotting horizont... | [
{
"code": null,
"e": 25565,
"s": 25537,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25806,
"s": 25565,
"text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant... |
PHP | mysqli_error() Function - GeeksforGeeks | 23 Apr, 2020
The mysqli_error() function is used to return the error in the most recent MySQL function call that failed. If there are multiple MySQL function calls, the error in the last statement is the one that is pointed out by the function.
Syntax:
mysqli_error("database_name")
Parameters: This function accepts si... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n23 Apr, 2020"
},
{
"code": null,
"e": 26449,
"s": 26217,
"text": "The mysqli_error() function is used to return the error in the most recent MySQL function call that failed. If there are multiple MySQL function calls, the error i... |
Python | Pandas DataFrame.to_sparse - GeeksforGeeks | 21 Feb, 2019
Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 26001,
"s": 25687,
"text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations al... |
BlockingQueue drainTo() method in Java with examples - GeeksforGeeks | 01 Nov, 2019
The drainTo(Collection col) method of BlockingQueue removes all available elements from this LinkedBlocking Queue and adds them to the given collection passed as a parameter.
Note: The drainTo() method of BlockingQueue has been inherited from the Queue class in Java.
The drainTo(Collection<? super E> col) ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n01 Nov, 2019"
},
{
"code": null,
"e": 25400,
"s": 25225,
"text": "The drainTo(Collection col) method of BlockingQueue removes all available elements from this LinkedBlocking Queue and adds them to the given collection passed as a... |
Create a Brush Bar Chart using Recharts in ReactJS - GeeksforGeeks | 19 Aug, 2021
Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, with the help of React and D3 (Data-Driven Documents).
Brush Bar charts are those bar charts that have a large number of data points. So to view... | [
{
"code": null,
"e": 26583,
"s": 26555,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 26801,
"s": 26583,
"text": "Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, wi... |
C++ Program To Check Whether Two Strings Are Anagram Of Each Other - GeeksforGeeks | 20 Dec, 2021
Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “abcd” and “dabc” are an anagram of each other.
Method 1 (Use Sorting):
Sort both s... | [
{
"code": null,
"e": 25773,
"s": 25745,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26043,
"s": 25773,
"text": "Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.