title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How do we add bold text in HTML? | To display bold text, use the <strong> tag. The HTML <strong> tag is used for emphasizing an important text.
You can try to run the following code to implement <strong> tag in HTML −
<!Doctype html>
<html>
<head>
<title>HTML strong Tag</title>
</head>
<body>
<p>This is an <strong>important</strong>... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To display bold text, use the <strong> tag. The HTML <strong> tag is used for emphasizing an important text."
},
{
"code": null,
"e": 1245,
"s": 1171,
"text": "You can try to run the following code to implement <strong> tag in HTML −... |
Python Pillow - Flip and Rotate Images | While working on images using python image processing library, there are instances where you need to flip an existing image to get some more insights out of it, to enhance its visibility or because of your requirement.
Image module of the pillow library allows us to flip an image very easily. We are going to use the tr... | [
{
"code": null,
"e": 2419,
"s": 2200,
"text": "While working on images using python image processing library, there are instances where you need to flip an existing image to get some more insights out of it, to enhance its visibility or because of your requirement."
},
{
"code": null,
"e... |
Convert string of time to time object in Java | Here is our string.
String strTime = "20:15:40";
Now, use the DateFormat to set the format for date.
DateFormat dateFormat = new SimpleDateFormat("hh:mm:ss");
Parse the string of time to time object.
Date d = dateFormat.parse(strTime);
The following is the complete example.
Live Demo
import java.text.DateFormat;
impor... | [
{
"code": null,
"e": 1082,
"s": 1062,
"text": "Here is our string."
},
{
"code": null,
"e": 1111,
"s": 1082,
"text": "String strTime = \"20:15:40\";"
},
{
"code": null,
"e": 1163,
"s": 1111,
"text": "Now, use the DateFormat to set the format for date."
},
... |
How to add HTTP headers 'X-Frame-Options' on iframe ? - GeeksforGeeks | 28 Feb, 2020
Inline frame tag in HTML: The iframe tag is used to displaying or embedding another document within an HTML document. One of its attributes ‘src’ is used to specify the URL of the document which is to be displayed. A site’s X-frame Options can prevent allowing the display of one HTML document within anothe... | [
{
"code": null,
"e": 24191,
"s": 24163,
"text": "\n28 Feb, 2020"
},
{
"code": null,
"e": 24501,
"s": 24191,
"text": "Inline frame tag in HTML: The iframe tag is used to displaying or embedding another document within an HTML document. One of its attributes ‘src’ is used to specif... |
Ridgeline Plots: The Perfect Way to Visualize Data Distributions with Python | by Dario Radečić | Towards Data Science | Aren’t you tired of drawing histograms or density plots for every variable segment? There’s an easier solution. Ridgeline plots are a go-to visualization for this type of problem. Yes, even for multiple variables at the same time.
Here’s what you’ll make today:
Reading feels like a nightmare? There’s an easy solution:
... | [
{
"code": null,
"e": 402,
"s": 171,
"text": "Aren’t you tired of drawing histograms or density plots for every variable segment? There’s an easier solution. Ridgeline plots are a go-to visualization for this type of problem. Yes, even for multiple variables at the same time."
},
{
"code": nu... |
How to write binary data to a file using Python? | "Binary" files are any files where the format isn't made up of readable characters. Binary files can range from image files like JPEGs or GIFs, audio files like MP3s or binary document formats like Word or PDF. In Python, files are opened in text mode by default. To open files in binary mode, when specifying a mode, ad... | [
{
"code": null,
"e": 1395,
"s": 1062,
"text": "\"Binary\" files are any files where the format isn't made up of readable characters. Binary files can range from image files like JPEGs or GIFs, audio files like MP3s or binary document formats like Word or PDF. In Python, files are opened in text mode... |
Display MongoDB with document and subdocument example and update | Following is the syntax showing document and subdocument −
db.yourCollectionName.insertOne(
{
yourFiledName:yourValue,
yourFieldName : [
{
yourFiledName1,
yourFiledName2,
.
.
.
N
}
]
}
);
Let us see an exam... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "Following is the syntax showing document and subdocument −"
},
{
"code": null,
"e": 1364,
"s": 1121,
"text": "db.yourCollectionName.insertOne(\n {\n yourFiledName:yourValue,\n yourFieldName : [\n {\n yo... |
AWK - Logical Operators | AWK supports the following logical operators −
It is represented by &&. Its syntax is as follows −
expr1 && expr2
It evaluates to true if both expr1 and expr2 evaluate to true; otherwise it returns false. expr2 is evaluated if and only if expr1 evaluates to true. For instance, the following example checks whether the ... | [
{
"code": null,
"e": 1904,
"s": 1857,
"text": "AWK supports the following logical operators −"
},
{
"code": null,
"e": 1956,
"s": 1904,
"text": "It is represented by &&. Its syntax is as follows −"
},
{
"code": null,
"e": 1972,
"s": 1956,
"text": "expr1 && exp... |
Enrich your Jupyter Notebook with these tips | by Zolzaya Luvsandorj | Towards Data Science | One beautiful feature of Jupyter Notebook (Notebook from here onwards) is the ability to use markdown cells alongside code cells. These markdown cells enable us to document more expressively and clearly so that it’s easier for future users to understand the workflow of the Notebook. In this post, I share a few of my ti... | [
{
"code": null,
"e": 583,
"s": 172,
"text": "One beautiful feature of Jupyter Notebook (Notebook from here onwards) is the ability to use markdown cells alongside code cells. These markdown cells enable us to document more expressively and clearly so that it’s easier for future users to understand t... |
Scala Collections - Flatten Method | flatten() method is a member GenericTraversableTemplate trait, it returns a single collection of elements by merging child collections.
The following is the syntax of flatten method.
def flatten[B]: Traversable[B]
Here, f: (A) ? GenTraversableOnce[B] is a predicate or condition to be applied on each element of the co... | [
{
"code": null,
"e": 3019,
"s": 2882,
"text": "flatten() method is a member GenericTraversableTemplate trait, it returns a single collection of elements by merging child collections."
},
{
"code": null,
"e": 3066,
"s": 3019,
"text": "The following is the syntax of flatten method... |
Lodash _.findIndex() Method - GeeksforGeeks | 14 Jul, 2020
Lodash is a module in Node.js that works on the top of Underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The Loadsh.findIndex() method is used to find the index of the first occurrence of the element. It is different from indexOf because it takes the predicate function that ... | [
{
"code": null,
"e": 37356,
"s": 37328,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 37707,
"s": 37356,
"text": "Lodash is a module in Node.js that works on the top of Underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The Loadsh.findIndex() met... |
Tryit Editor v3.7 | Tryit: HTML table rows | [] |
Program for Volume and Surface Area of Cuboid in C++ | Cuboid is a three-dimensional object with six faces of rectangle shape which means it has sides of different length and breadth. The difference between a cube and cuboid is that a cube has equal length, height and breadth whereas in cuboids these three are not same
Properties of cuboid are −
six faces
12 edges
8 vertic... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "Cuboid is a three-dimensional object with six faces of rectangle shape which means it has sides of different length and breadth. The difference between a cube and cuboid is that a cube has equal length, height and breadth whereas in cuboids these three ... |
Underscore.js - GeeksforGeeks | 17 Dec, 2021
Underscore.js is a lightweight JavaScript library and not a complete framework that was written by Jeremy Ashkenas. It provides utility functions for a variety of use cases in our day-to-day common programming tasks. Underscore.js provides a lot of features that make our task easy to work with objects. It ... | [
{
"code": null,
"e": 33520,
"s": 33492,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 33888,
"s": 33520,
"text": "Underscore.js is a lightweight JavaScript library and not a complete framework that was written by Jeremy Ashkenas. It provides utility functions for a variety of ... |
How to store array values in MongoDB? | Let us first create a collection with documents wherein we are storing array values −
>db.demo321.insertOne({"UserDetails":[{"UserId":101,"UserName":"Chris"},{"UserId":102,"UserName":"Mike"}]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e511248f8647eb59e56206a")
}
>db.demo321.insertOne({"UserDetails":[{"... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "Let us first create a collection with documents wherein we are storing array values −"
},
{
"code": null,
"e": 1533,
"s": 1148,
"text": ">db.demo321.insertOne({\"UserDetails\":[{\"UserId\":101,\"UserName\":\"Chris\"},{\"UserId\":102,... |
How to Set the Visibility of the GroupBox in C#? - GeeksforGeeks | 02 Aug, 2019
In Windows Forms, GroupBox is a container which contains multiple controls in it and the controls are related to each other. Or in other words, GroupBox is a frame display around a group of controls with a suitable optional title. Or a GroupBox is used to categorize the related controls in a group. In Grou... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 24586,
"s": 23911,
"text": "In Windows Forms, GroupBox is a container which contains multiple controls in it and the controls are related to each other. Or in other words, GroupBox is a frame... |
Program to calculate age - GeeksforGeeks | 29 Oct, 2021
Given current date and birth date, find the present age. Examples:
Input : Birth date = 07/09/1996
Present date = 07/12/2017
Output : Present Age = Years: 21 Months: 3 Days: 0
t Age = Years: 7 Months: 11 Days: 21
While calculating the difference in two dates we need to just keep track of t... | [
{
"code": null,
"e": 24413,
"s": 24385,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 24482,
"s": 24413,
"text": "Given current date and birth date, find the present age. Examples: "
},
{
"code": null,
"e": 24641,
"s": 24482,
"text": "Input : Birth date = ... |
C program to compare the structure variables | In C programming language, a structure is a collection of different datatype variables, which are grouped together under a single name.
Declaration and initialization of structures
The general form of a structure declaration is as follows −
datatype member1;
struct tagname{
datatype member2;
datatype member n;
};... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "In C programming language, a structure is a collection of different datatype variables, which are grouped together under a single name."
},
{
"code": null,
"e": 1243,
"s": 1198,
"text": "Declaration and initialization of structures"
... |
Delete duplicates in a Pandas Dataframe based on two columns - GeeksforGeeks | 11 Dec, 2020
A dataframe is a two-dimensional, size-mutable tabular data structure with labeled axes (rows and columns). It can contain duplicate entries and to delete them there are several ways.
Let us consider the following dataset.
The dataframe contains duplicate values in column order_id and customer_id. Below a... | [
{
"code": null,
"e": 26088,
"s": 26060,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 26273,
"s": 26088,
"text": "A dataframe is a two-dimensional, size-mutable tabular data structure with labeled axes (rows and columns). It can contain duplicate entries and to delete them the... |
Transforming XML file into fixed length flat file in SAP | This is an EDIfact invoice. Try using the script, and it can help −
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="ISO-8859-1"/>
<xsl:template match="/">
<!-- EDI_DC40 -->
<xsl:for-each select="IDataXMLCoder/record/idatacodable/array/idata... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "This is an EDIfact invoice. Try using the script, and it can help −"
},
{
"code": null,
"e": 5792,
"s": 1130,
"text": "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n <xsl:output method=\"text\... |
DAX Aggregation - TOPN function | Returns the top specified number of rows of the table.
TOPN (<n_value>, <table>, <orderBy_expression>, [<order>],
[<orderBy_expression>, [<order>]] ...)
n_value
The number of rows to return.
It is any DAX expression that returns a single scalar value, where the expression is to be evaluated multiple times (for eac... | [
{
"code": null,
"e": 2056,
"s": 2001,
"text": "Returns the top specified number of rows of the table."
},
{
"code": null,
"e": 2159,
"s": 2056,
"text": "TOPN (<n_value>, <table>, <orderBy_expression>, [<order>],\n [<orderBy_expression>, [<order>]] ...) \n"
},
{
"code": ... |
BareCode scanning in Android? | This example demonstrates how do I use barcode scanning in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xml... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "This example demonstrates how do I use barcode scanning in android."
},
{
"code": null,
"e": 1259,
"s": 1130,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create ... |
Max Chunks To Make Sorted II in C++ | Suppose we have an array arr of integers, we have to split the array into some number of partitions, and individually sort each partition. Now after concatenating them we will get one sorted array. We have to find the maximum number of partitions we could have made?
So, if the input is like [3,2,4,5,5], then the output... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "Suppose we have an array arr of integers, we have to split the array into some number of partitions, and individually sort each partition. Now after concatenating them we will get one sorted array. We have to find the maximum number of partitions we cou... |
Is Python object-oriented?. This tutorial answers the question of... | by Tanu N Prabhu | Towards Data Science | This tutorial answers the question of whether python is objected oriented or not?
Well Is Python an object oriented programming language? Yes, it is. With the exception of control flow, everything in Python is an object. By Max Fischer, who answers this question in Quora.
Yes, python is an objected oriented programming... | [
{
"code": null,
"e": 253,
"s": 171,
"text": "This tutorial answers the question of whether python is objected oriented or not?"
},
{
"code": null,
"e": 444,
"s": 253,
"text": "Well Is Python an object oriented programming language? Yes, it is. With the exception of control flow, ... |
Ensembling ConvNets using Keras. Use multiple neural nets to obtain... | by Maxim Mikhaylov | Towards Data Science | Edit: February 2019
Minor code changes. Improved experience of Jupyter notebook version of the article.
In statistics and machine learning, ensemble methods use multiple learning algorithms to obtain better predictive performance than could be obtained from any of the constituent learning algorithms alone. Unlike a sta... | [
{
"code": null,
"e": 192,
"s": 172,
"text": "Edit: February 2019"
},
{
"code": null,
"e": 276,
"s": 192,
"text": "Minor code changes. Improved experience of Jupyter notebook version of the article."
},
{
"code": null,
"e": 746,
"s": 276,
"text": "In statistics... |
Largest even number that can be formed by any number of swaps | 07 Jun, 2022
Given an integer N in the form of string, the task is to find the largest even number from the given number when you are allowed to do any number of swaps (swapping the digits of the number). If no even number can be formed then print -1.
Examples:
Input: N = 1324 Output: 4312
Input: N = 135 Output: -1 No... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 293,
"s": 54,
"text": "Given an integer N in the form of string, the task is to find the largest even number from the given number when you are allowed to do any number of swaps (swapping the digit... |
PyQtGraph – Plot Window | 06 Sep, 2021
In this article we will see how we can create plot window in the PyQtGraph module. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics for displaying da... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 856,
"s": 28,
"text": "In this article we will see how we can create plot window in the PyQtGraph module. PyQtGraph is a graphics and user interface library for Python that provides functionality co... |
Maskphish – Hide Phishing Link Behind Real Domain | 24 Jun, 2021
Maskphish tool is used to hide the phishing links or URL behind the original link. This tool is a free and open-source tool you can download this tool from Github. This tool can perform social engineering attacks on victims. This tool can hide all types of URL links such as ngrok links. Maskphish is a very... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 861,
"s": 28,
"text": "Maskphish tool is used to hide the phishing links or URL behind the original link. This tool is a free and open-source tool you can download this tool from Github. This tool c... |
Python | Group Anagrams from given list | 20 Jun, 2022
Anagrams are the words that are formed by similar elements but the orders in which these characters occur differ. Sometimes, we may encounter a problem in which we need to group the anagrams and hence solution to above problem always helps. Let’s discuss certain ways in which this can be done.Method #1 : U... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 622,
"s": 53,
"text": "Anagrams are the words that are formed by similar elements but the orders in which these characters occur differ. Sometimes, we may encounter a problem in which we need to gr... |
How to add a Snackbar in Android | 23 Feb, 2021
Snackbar provides lightweight feedback about an operation. The message appears at the bottom of the screen on mobile and lower left on larger devices. Snackbar appears above all the elements of the screen. But no component is affected by it. Having a CoordinatorLayout in your view hierarchy allows Snackbar... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 557,
"s": 54,
"text": "Snackbar provides lightweight feedback about an operation. The message appears at the bottom of the screen on mobile and lower left on larger devices. Snackbar appears above ... |
Main Thread in C# | 13 May, 2019
C# provides built-in support for multithreaded programming. A multi-threaded program contains two or more parts that can run concurrently. Each part of such a program is called an thread, and each thread defines a separate path of execution.
When a C# program starts up, one thread begins running immediatel... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 May, 2019"
},
{
"code": null,
"e": 294,
"s": 52,
"text": "C# provides built-in support for multithreaded programming. A multi-threaded program contains two or more parts that can run concurrently. Each part of such a program is call... |
numpy.nan_to_num() in Python | 28 Nov, 2018
numpy.nan_to_num() function is used when we want to replace nan(Not A Number) with zero and inf with finite numbers in an array. It returns (positive) infinity with a very large number and negative infinity with a very small (or negative) number.
Syntax : numpy.nan_to_num(arr, copy=True)
Parameters :arr : ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "numpy.nan_to_num() function is used when we want to replace nan(Not A Number) with zero and inf with finite numbers in an array. It returns (positive) infinity with a very lar... |
Select rows of a matrix in R that meet a condition | 26 Sep, 2021
A large dataset is often required to be filtered according to our requirements. In this article, we will be discussing how we can select a row from a matrix in R that meets the condition. For better understanding let’s understand the problem statement with the help of an example.
Example:
Data in use:
1
Ma... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "A large dataset is often required to be filtered according to our requirements. In this article, we will be discussing how we can select a row from a matrix in R that meets th... |
Google Colab - Graphical Outputs | Colab also supports rich outputs such as charts. Type in the following code in the Code cell.
import numpy as np
from matplotlib import pyplot as plt
y = np.random.randn(100)
x = [x for x in range(len(y))]
plt.plot(x, y, '-')
plt.fill_between(x, y, 200, where = (y > 195), facecolor='g', alpha=0.6)
plt.title("Sample ... | [
{
"code": null,
"e": 2269,
"s": 2175,
"text": "Colab also supports rich outputs such as charts. Type in the following code in the Code cell."
},
{
"code": null,
"e": 2514,
"s": 2269,
"text": "import numpy as np\nfrom matplotlib import pyplot as plt\n\ny = np.random.randn(100)\nx ... |
Java Program to Sort Vector Using Collections.sort() Method | 11 Dec, 2020
java.util.Collections.sort() method is present in java.util.Collections class. It is used to sort the elements present in the specified list of Collection in ascending order.
Syntax:
Public void sort(Vector object);
Parameters: Instance of the vector as an argument
Illustration: Collection.sort() method
Le... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "java.util.Collections.sort() method is present in java.util.Collections class. It is used to sort the elements present in the specified list of Collection in ascending order."... |
Loops in C# | 22 Apr, 2020
Looping in a programming language is a way to execute a statement or a set of statements multiple times depending on the result of the condition to be evaluated to execute statements. The result condition should be true to execute statements within loops.
Loops are mainly divided into two categories:Entry ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 310,
"s": 54,
"text": "Looping in a programming language is a way to execute a statement or a set of statements multiple times depending on the result of the condition to be evaluated to execute st... |
Java | Date format validation using Regex | 30 Oct, 2018
We use java.util.regex.Pattern.compile(String regex) method which compiles the given regular expression into a pattern. Here regex is the expression to be compiled.
// Java program to check if given date is// valid or not.import java.util.regex.Matcher;import java.util.regex.Pattern; public class Geeksfor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Oct, 2018"
},
{
"code": null,
"e": 193,
"s": 28,
"text": "We use java.util.regex.Pattern.compile(String regex) method which compiles the given regular expression into a pattern. Here regex is the expression to be compiled."
},
{
... |
Node.js http.globalAgent Property | 30 Sep, 2020
The http.globalAgent (Added in v0.5.9) property is an inbuilt property of the ‘http’ module which is used as the default for all HTTP client requests. It is the global instance of Agent.
An Agent maintains a queue of pending requests for a given host and port, reusing a single socket connection for each un... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Sep, 2020"
},
{
"code": null,
"e": 240,
"s": 53,
"text": "The http.globalAgent (Added in v0.5.9) property is an inbuilt property of the ‘http’ module which is used as the default for all HTTP client requests. It is the global instan... |
How to trim a string at beginning or ending in JavaScript ? | 13 Dec, 2021
This article demonstrates how to trim a string at the beginning, end, and also from both sides. For various sorts of string trimming, JavaScript provides three functions. TrimLeft(), used to remove characters from the beginning of a string. TrimRight(), used to remove characters from the string’s end. Trim... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 572,
"s": 28,
"text": "This article demonstrates how to trim a string at the beginning, end, and also from both sides. For various sorts of string trimming, JavaScript provides three functions. Trim... |
zip() in Python | 30 Sep, 2021
Python zip() method takes iterable or containers and returns a single iterator object, having mapped values from all the containers.
It is used to map the similar index of multiple containers so that they can be used just using a single entity.
Syntax : zip(*iterators)
Parameters : Python iterables or ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 187,
"s": 53,
"text": "Python zip() method takes iterable or containers and returns a single iterator object, having mapped values from all the containers. "
},
{
"code": null,
"e": 300... |
How to get nth occurrence of a string in JavaScript ? | 02 Jun, 2020
The task is to get the nth occurrence of a substring in a string with the help of JavaScript.
Approach 1:
First, split the string into sub-strings using split() method by passing index also.
Again join the substrings on passed substring using join() method.
Returns the index of nth occurrence of string.
Ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 122,
"s": 28,
"text": "The task is to get the nth occurrence of a substring in a string with the help of JavaScript."
},
{
"code": null,
"e": 134,
"s": 122,
"text": "Approach 1:"... |
Getting started with giotto-tda. A Python library for topological... | by Lewis Tunstall | Towards Data Science | Written by Lewis Tunstall, Colin Kälin, Francesco Palma, and Thomas Boys
At L2F, one of the most common questions we get around giotto-tda and topological machine learning is “Where do I start?”.
In this guide we present an overview of the basic concepts and workflow so that you can start using giotto-tda in your mach... | [
{
"code": null,
"e": 245,
"s": 171,
"text": "Written by Lewis Tunstall, Colin Kälin, Francesco Palma, and Thomas Boys"
},
{
"code": null,
"e": 368,
"s": 245,
"text": "At L2F, one of the most common questions we get around giotto-tda and topological machine learning is “Where do ... |
Node.js - RESTful API | REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol. It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods. REST was first introduced by Roy Fielding in 2000.
A REST Server... | [
{
"code": null,
"e": 2325,
"s": 2018,
"text": "REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol. It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard method... |
Express Cookie-Parser - Signed and Unsigned Cookies - GeeksforGeeks | 28 May, 2020
A cookie is a piece of data that is sent to the client-side with a request and is stored on the client-side itself by the Web Browser the user is currently using. With the help of cookies –
It is easy for websites to remember the user’s information
It is easy to capture the user’s browsing history
It is al... | [
{
"code": null,
"e": 24465,
"s": 24437,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 24655,
"s": 24465,
"text": "A cookie is a piece of data that is sent to the client-side with a request and is stored on the client-side itself by the Web Browser the user is currently using. ... |
ARIMA Model In Python | by Billy Bonaros | Towards Data Science | ARIMA is one of the most popular statistical models. It stands for AutoRegressive Integrated Moving Average and it’s fitted to time series data either for forecasting or to better understand the data. We will not cover the whole theory behind the ARIMA model but we will show you what’s the steps you need to follow to a... | [
{
"code": null,
"e": 511,
"s": 172,
"text": "ARIMA is one of the most popular statistical models. It stands for AutoRegressive Integrated Moving Average and it’s fitted to time series data either for forecasting or to better understand the data. We will not cover the whole theory behind the ARIMA mo... |
PySpark Analysis on Airport Data | by Ojaas Hampiholi | Towards Data Science | Big data is a collection of massive and complex data sets and data volume that include huge quantities of data, data management capabilities, social media analytics, and real-time data. Big Data means data that can not be processed by streamlined processing methods because of the sheer huge size of data to be processed... | [
{
"code": null,
"e": 872,
"s": 172,
"text": "Big data is a collection of massive and complex data sets and data volume that include huge quantities of data, data management capabilities, social media analytics, and real-time data. Big Data means data that can not be processed by streamlined processi... |
Stock Predictions — Intraday Trading | by Monik Raj | Towards Data Science | Now let's have a brief idea about the problem set we are going to deal with.
Intraday-trading is that trading norm of the stock market whose vesting period is, in layman’s words, 1 day. Buyers buy shares at the opening time of market at a specific time window and then sell the same at the closing window of the same day... | [
{
"code": null,
"e": 248,
"s": 171,
"text": "Now let's have a brief idea about the problem set we are going to deal with."
},
{
"code": null,
"e": 672,
"s": 248,
"text": "Intraday-trading is that trading norm of the stock market whose vesting period is, in layman’s words, 1 day. ... |
Using Deep Learning to train a Deep Search Chess Algorithm | by Victor Sim | Towards Data Science | In most chess engines, a searching algorithm along with a heuristic function gives the chess AI the main insight into the best moves to play. The bulk of the programming and most of the “brains” behind this is the heuristic function.
What do I mean by heuristic function? Heuristic function refers to a function that tak... | [
{
"code": null,
"e": 406,
"s": 172,
"text": "In most chess engines, a searching algorithm along with a heuristic function gives the chess AI the main insight into the best moves to play. The bulk of the programming and most of the “brains” behind this is the heuristic function."
},
{
"code":... |
Plotting a map of London Crime Data using R | by David Morison | Towards Data Science | I recently decided to play around and get familiar with the GIS (geographic information systems) packages available in R. I’ve always been interested in maps and I’m one of those who can spend as much time exploring Google maps as the average American spends on Facebook (maybe not quite as much).
This write up is aimed... | [
{
"code": null,
"e": 470,
"s": 172,
"text": "I recently decided to play around and get familiar with the GIS (geographic information systems) packages available in R. I’ve always been interested in maps and I’m one of those who can spend as much time exploring Google maps as the average American spe... |
Linear Regression: Moneyball — Part 1 | by Sayar Banerjee | Towards Data Science | One of the most compelling stories of sports analytics made popular by the 2011 movie Moneyball, the Oakland Athletics team of 2002 created history by winning 20 consecutive games between August 13 and September 2002.
Much of the Oakland Athletics (popularly referred to as the A’s) success in that season is attributed ... | [
{
"code": null,
"e": 390,
"s": 172,
"text": "One of the most compelling stories of sports analytics made popular by the 2011 movie Moneyball, the Oakland Athletics team of 2002 created history by winning 20 consecutive games between August 13 and September 2002."
},
{
"code": null,
"e": ... |
JSF - ui:remove Tag | ui:remove tag is used to prevent the JSF specific code to be rendered on the client side. It is used especially to prevent commented out code to be rendered on the client side.
<!-- JSF code commented out -->
<!--
<h:commandButton value = "Ok" />
-->
<!-- JSF code commented out -->
<!--
<h:commandButton value =... | [
{
"code": null,
"e": 2129,
"s": 1952,
"text": "ui:remove tag is used to prevent the JSF specific code to be rendered on the client side. It is used especially to prevent commented out code to be rendered on the client side."
},
{
"code": null,
"e": 2207,
"s": 2129,
"text": "<!-- ... |
SQLAlchemy ORM - Creating Session | In order to interact with the database, we need to obtain its handle. A session object is the handle to database. Session class is defined using sessionmaker() – a configurable session factory method which is bound to the engine object created earlier.
from sqlalchemy.orm import sessionmaker
Session = sessionmaker(bind... | [
{
"code": null,
"e": 2593,
"s": 2340,
"text": "In order to interact with the database, we need to obtain its handle. A session object is the handle to database. Session class is defined using sessionmaker() – a configurable session factory method which is bound to the engine object created earlier."... |
GridSearch VS RandomizedSearch VS BayesSearch | by Jay Hui | Towards Data Science | You may know optimization algorithms (GridSearch, RandomizedSearch or even BayesianSearch) for tuning hyper-parameters in the machine learning model. So which one should you use it? And how to use it? In this post, I am going to give a tutorial with real code demo and comparison:
www.kaggle.com
We set up our tutorial a... | [
{
"code": null,
"e": 453,
"s": 172,
"text": "You may know optimization algorithms (GridSearch, RandomizedSearch or even BayesianSearch) for tuning hyper-parameters in the machine learning model. So which one should you use it? And how to use it? In this post, I am going to give a tutorial with real ... |
How to get file link from google cloud storage using Node.js ? - GeeksforGeeks | 08 Jan, 2021
To get the signed public link of a file from the firebase storage, we need a reference to the file in Google cloud storage. As we just have a path to that file in storage we would first need to create a reference to that object and then get a signed link to that file.
Steps to generate a public link to a f... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n08 Jan, 2021"
},
{
"code": null,
"e": 25271,
"s": 25002,
"text": "To get the signed public link of a file from the firebase storage, we need a reference to the file in Google cloud storage. As we just have a path to that file in ... |
Python statistics for beginners. A beginners’ guide to Pearson... | by Maurice Henry Buettgenbach | Towards Data Science | All of us have heard the word “correlation” before. Although we might not be sure what it exactly means, we know that it is some kind of indicator of how strong two variables are related to each other. And you know what? That is pretty close to the truth.
Correlation itself is a mathematical technique to examine a rela... | [
{
"code": null,
"e": 428,
"s": 172,
"text": "All of us have heard the word “correlation” before. Although we might not be sure what it exactly means, we know that it is some kind of indicator of how strong two variables are related to each other. And you know what? That is pretty close to the truth.... |
Product of all leaf nodes of binary tree in C++ | Given with a binary tree containing nodes and the task is to find the product of all the leaf nodes of a given binary tree.
Leaf nodes are the end nodes which don’t have any children. In a tree, a node can act as a parent node or child node except the root node which can only be a parent node. So the nodes with right a... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "Given with a binary tree containing nodes and the task is to find the product of all the leaf nodes of a given binary tree."
},
{
"code": null,
"e": 1426,
"s": 1186,
"text": "Leaf nodes are the end nodes which don’t have any children... |
Link Prediction in Bipartite Graph | by Edward Elson Kosasih | Towards Data Science | Answer: They can all be mathematically formulated as a graph link prediction problem!
In short, given a graph G (V, E) with |V| vertices and |E| edges, our task is to predict the existence of a previously unknown edge e_12 ∉ E between vertices v_1, v_2 ∈ V. We can then use the link prediction model to, for instance, r... | [
{
"code": null,
"e": 258,
"s": 172,
"text": "Answer: They can all be mathematically formulated as a graph link prediction problem!"
},
{
"code": null,
"e": 959,
"s": 258,
"text": "In short, given a graph G (V, E) with |V| vertices and |E| edges, our task is to predict the existen... |
Can I get Age using BirthDate column in a MySQL query? | To get Age using BirthDate column in a MySQL query, you can use datediff(). Let us first create a table:
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
DateOfBirth date
);
Query OK, 0 rows affected (1.46 sec)
Following is the query to insert some records in the table using insert comm... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To get Age using BirthDate column in a MySQL query, you can use datediff(). Let us first create a table:"
},
{
"code": null,
"e": 1306,
"s": 1167,
"text": "mysql> create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY K... |
Handling Outliers in Clusters using Silhouette Analysis | by Satyam Kumar | Towards Data Science | The real-world data often has a lot of outlier values. The cause of outliers can be data corruption or failure to record data. The handling of outliers is very important during the data preprocessing pipeline as the presence of outliers can prevent the model to perform best.
There are various strategies to handle outli... | [
{
"code": null,
"e": 448,
"s": 172,
"text": "The real-world data often has a lot of outlier values. The cause of outliers can be data corruption or failure to record data. The handling of outliers is very important during the data preprocessing pipeline as the presence of outliers can prevent the mo... |
Explain the concept of an array within a structure in C programming | An array of structure in C programming is a collection of different datatype variables, grouped together under a single name.
General form of structure declaration
The structural declaration is as follows −
struct tagname{
datatype member1;
datatype member2;
datatype member n;
};
Here, struct is the keyword.
t... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "An array of structure in C programming is a collection of different datatype variables, grouped together under a single name."
},
{
"code": null,
"e": 1226,
"s": 1188,
"text": "General form of structure declaration"
},
{
"cod... |
JSF - f:validateDoubleRange | f:validateDoubleRange tag is used to validate a value to a range of float values.
<f:validateDoubleRange minimum = "1000.50" maximum = "10000.50" />
minimum
Minimum long value within an optional range
maximum
Maximum long value within an optional range
Let us create a test JSF application to test the above tag.
packag... | [
{
"code": null,
"e": 2034,
"s": 1952,
"text": "f:validateDoubleRange tag is used to validate a value to a range of float values."
},
{
"code": null,
"e": 2102,
"s": 2034,
"text": "<f:validateDoubleRange minimum = \"1000.50\" maximum = \"10000.50\" />\n"
},
{
"code": null,... |
Find a pair with given sum in a Balanced BST - GeeksforGeeks | 17 Apr, 2022
Given a Balanced Binary Search Tree and a target sum, write a function that returns true if there is a pair with sum equals to target sum, otherwise return false. Expected time complexity is O(n) and only O(Logn) extra space can be used. Any modification to Binary Search Tree is not allowed. Note that heig... | [
{
"code": null,
"e": 24409,
"s": 24381,
"text": "\n17 Apr, 2022"
},
{
"code": null,
"e": 24756,
"s": 24409,
"text": "Given a Balanced Binary Search Tree and a target sum, write a function that returns true if there is a pair with sum equals to target sum, otherwise return false. ... |
Link your Virtual Environment to Jupyter Using Kernels | by mlearnere | Towards Data Science | When I first started using Python, the concept of a virtual environment was extremely elusive to me. It often took me hours of searching and experimenting with creating one only to end up more confused than when I had started.
This article aims to be a one-stop-shop for understanding what virtual environments exactly d... | [
{
"code": null,
"e": 399,
"s": 172,
"text": "When I first started using Python, the concept of a virtual environment was extremely elusive to me. It often took me hours of searching and experimenting with creating one only to end up more confused than when I had started."
},
{
"code": null,
... |
Biopython - Entrez Database | Entrez is an online search system provided by NCBI. It provides access to nearly all known molecular biology databases with an integrated global query supporting Boolean operators and field search. It returns results from all the databases with information like the number of hits from each databases, records with links... | [
{
"code": null,
"e": 2461,
"s": 2106,
"text": "Entrez is an online search system provided by NCBI. It provides access to nearly all known molecular biology databases with an integrated global query supporting Boolean operators and field search. It returns results from all the databases with informat... |
Java Delete Files | To delete a file in Java, use the delete() method:
import java.io.File; // Import the File class
public class DeleteFile {
public static void main(String[] args) {
File myObj = new File("filename.txt");
if (myObj.delete()) {
System.out.println("Deleted the file: " + myObj.getName());
} else {
... | [
{
"code": null,
"e": 51,
"s": 0,
"text": "To delete a file in Java, use the delete() method:"
},
{
"code": null,
"e": 389,
"s": 51,
"text": "import java.io.File; // Import the File class\n\npublic class DeleteFile {\n public static void main(String[] args) { \n File myObj = ... |
Scala String endsWith() method with example - GeeksforGeeks | 03 Oct, 2019
The endsWith() method is utilized to check if the stated string ends with the suffix stated in the argument.
Method Definition: Boolean endsWith(String suffix)Return Type: It returns true if the string ends with the suffix stated else it returns false.
Example #1:
// Scala program of endsWith()// method /... | [
{
"code": null,
"e": 23623,
"s": 23595,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 23732,
"s": 23623,
"text": "The endsWith() method is utilized to check if the stated string ends with the suffix stated in the argument."
},
{
"code": null,
"e": 23876,
"s": 2... |
Select Top N Highest Values by Group in R - GeeksforGeeks | 26 Oct, 2021
In this article, we are going to see how to select the Top Nth highest value by the group in R language.
The dataframe can be ordered by group in descending order of their values by the order method. The corresponding dataframe is then accessed using the indexing method by taking the order function’s outpu... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 25267,
"s": 25162,
"text": "In this article, we are going to see how to select the Top Nth highest value by the group in R language."
},
{
"code": null,
"e": 25499,
"s": 25267... |
numpy.random.gamma() in Python - GeeksforGeeks | 15 Jul, 2020
With the help of numpy.random.gamma() method, we can get the random samples of gamma distribution and return the random samples of numpy array by using this method.
gamma distribution
Syntax : numpy.random.gamma(shape, scale=1.0, size=None)
Return : Return the random samples of numpy array.
Example #1 :
In... | [
{
"code": null,
"e": 23885,
"s": 23857,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 24050,
"s": 23885,
"text": "With the help of numpy.random.gamma() method, we can get the random samples of gamma distribution and return the random samples of numpy array by using this method... |
Using Time datatype in MySQL without seconds? | You need to use DATE_FORMAT() for this. The syntax is as follows −
SELECT DATE_FORMAT(yourColumnName,'%k:%i') as anyAliasName FROM yourTableName;
You can use ‘%H:%i’ for the same result. To understand the above syntax, let us create a table.
The query to create a table is as follows −
mysql> create table TimeDemo
->... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "You need to use DATE_FORMAT() for this. The syntax is as follows −"
},
{
"code": null,
"e": 1208,
"s": 1129,
"text": "SELECT DATE_FORMAT(yourColumnName,'%k:%i') as anyAliasName FROM yourTableName;"
},
{
"code": null,
"e":... |
How to set the local user account settings using PowerShell? | To set the local user account settings related to the account or the password expiration, we can use the Set-LocalUser command.
The below command will change the local user Testuser account and password set to never expire.
Set-LocalUser -Name Testuser -AccountNeverExpires -PasswordNeverExpires $true -Verbose
The below... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "To set the local user account settings related to the account or the password expiration, we can use the Set-LocalUser command."
},
{
"code": null,
"e": 1286,
"s": 1190,
"text": "The below command will change the local user Testuser ... |
fill() function in C++ STL with examples - GeeksforGeeks | 11 Oct, 2019
The fill() function in C++ STL is used to fill some default value in a container. The fill() function can also be used to fill values in a range in the container. It accepts two iterators begin and end and fills a value in the container starting from position pointed by begin and just before the position p... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 24340,
"s": 24018,
"text": "The fill() function in C++ STL is used to fill some default value in a container. The fill() function can also be used to fill values in a range in the container. ... |
Count occurrences of a character in string in Python | We are given a string and a character. We want to find out how many times the given character is repeated in a given string.
We design a for loop to match the character with every character present in the string which are accessed using index. The range and len function helps us determine how many times the matching ha... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "We are given a string and a character. We want to find out how many times the given character is repeated in a given string."
},
{
"code": null,
"e": 1441,
"s": 1187,
"text": "We design a for loop to match the character with every ch... |
Introduction of Lexical Analysis | 28 Jun, 2021
Lexical Analysis is the first phase of the compiler also known as a scanner. It converts the High level input program into a sequence of Tokens.
Lexical Analysis can be implemented with the Deterministic finite Automata.
The output is a sequence of tokens that is sent to the parser for syntax analysis
What... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Lexical Analysis is the first phase of the compiler also known as a scanner. It converts the High level input program into a sequence of Tokens."
},
{
"code": null,
... |
Java Program to Convert Long to String | 08 Dec, 2021
Conversion of long type to string type generally comes in need in the case when we have to display a long number in GUI application because everything is displayed as string form.
Given a Long number, the task is to convert it into String in Java.
Examples:
Input:Long = 20L
Output:"20"
Input:Long = 999999... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 234,
"s": 54,
"text": "Conversion of long type to string type generally comes in need in the case when we have to display a long number in GUI application because everything is displayed as string ... |
Spring Boot – How Thymeleaf Works? | 13 Jan, 2022
Thymeleaf is a Java library, template engine used to parse and render the data produced by the application to template files – thus providing transformation. It is just like HTML but is provided with more attributes for working with rendered data. It allows caching of the parsed data/file to increase effic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 441,
"s": 28,
"text": "Thymeleaf is a Java library, template engine used to parse and render the data produced by the application to template files – thus providing transformation. It is just like H... |
Program to calculate GST from original and net prices | 23 Jun, 2022
Given Original cost and Net price then calculate the percentage of GSTExamples:
Input : Netprice = 120, original_cost = 100
Output : GST = 20%
Input : Netprice = 105, original_cost = 100
Output : GST = 5%
How to calculate GST GST ( Goods and Services Tax ) which is included in netprice of product for ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 135,
"s": 53,
"text": "Given Original cost and Net price then calculate the percentage of GSTExamples: "
},
{
"code": null,
"e": 261,
"s": 135,
"text": "Input : Netprice = 120,... |
replace() Function Of Datetime.date Class In Python | 23 Aug, 2021
replace() function is used to manipulate the object of DateTime class of module of DateTime. Generally, it replaces the date( Year, Month, Day) and returns a new DateTime object.
Syntax: replace(year=self.year, month=self.month, day=self.day)
Parameters:
Year: New year value (range: 1 <= year <= 9999)
mont... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 207,
"s": 28,
"text": "replace() function is used to manipulate the object of DateTime class of module of DateTime. Generally, it replaces the date( Year, Month, Day) and returns a new DateTime obje... |
How to delete default values in text field using Selenium? | We can delete default values in the text field with Selenium webdriver. There are multiple ways to do this. We can use the clear() method which resets value present already in edit box or text area field.
We can use the Keys.chord() method along with sendKeys(). The Keys.chord() method helps to press multiple keys simu... | [
{
"code": null,
"e": 1392,
"s": 1187,
"text": "We can delete default values in the text field with Selenium webdriver. There are multiple ways to do this. We can use the clear() method which resets value present already in edit box or text area field."
},
{
"code": null,
"e": 1592,
"... |
C++ program to Implement Threaded Binary Tree | Threaded binary tree is a binary tree that provides the facility to traverse the tree in a particular order.
It makes inorder traversal faster and do it without stack and without recursion. There are two types of threaded binary trees.
Single Threaded Each node is threaded towards either left or right means in-order pr... | [
{
"code": null,
"e": 1296,
"s": 1187,
"text": "Threaded binary tree is a binary tree that provides the facility to traverse the tree in a particular order."
},
{
"code": null,
"e": 1423,
"s": 1296,
"text": "It makes inorder traversal faster and do it without stack and without rec... |
Program for Mobius Function | 23 Jun, 2022
Mobius Function is a multiplicative function that is used in combinatorics. It has one of three possible values -1, 0 and 1.Examples:
Input : 6
Output : 1
Solution: Prime Factors: 2 3.
Therefore p = 2, (-1)^p = 1
Input: 49
Output: 0
Solution: Prime Factors: 7 ( occurs twice).
Since the prime factor occ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 190,
"s": 54,
"text": "Mobius Function is a multiplicative function that is used in combinatorics. It has one of three possible values -1, 0 and 1.Examples: "
},
{
"code": null,
"e": 5... |
Minimum cost of reducing Array by merging any adjacent elements repetitively | 14 Jun, 2021
Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal to the sum of the two values. The task is to find the total minimum cost of merging all the numbers.Examples:
Input: arr[] = { 6, 4, 4, 6 } Output: 40 Explanation: Following is t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal to the sum of the two values. The task is to fi... |
How to add custom filter in search Box in ReactJS? | 09 Sep, 2021
The custom filter means adding our own business login to filter the options shown in searchbox or any dropdown menu. Material UI for React has this component available for us and it is very easy to integrate. We can create our own custom filter for options in ReactJS using the following approach.
Creating ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 350,
"s": 52,
"text": "The custom filter means adding our own business login to filter the options shown in searchbox or any dropdown menu. Material UI for React has this component available for us... |
Smallest subarray with sum greater than a given value | 23 Jun, 2022
Given an array of integers and a number x, find the smallest subarray with sum greater than the given value.
Examples:
arr[] = {1, 4, 45, 6, 0, 19}
x = 51
Output: 3
Minimum length subarray is {4, 45, 6}
arr[] = {1, 10, 5, 2, 7}
x = 9
Output: 1
Minimum length subarray is {10}
arr[] = {1, 11, 100... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 164,
"s": 54,
"text": "Given an array of integers and a number x, find the smallest subarray with sum greater than the given value. "
},
{
"code": null,
"e": 540,
"s": 164,
"tex... |
Python – Dynamic GUI Calculator using Tkinter module | 14 Aug, 2021
Python provides many options for developing GUI like Kivy, PyQT, WxPython, and several others. Tkinter is the one that is shipped inbuilt with python which makes it the most commonly used out of all. Tkinter is easy, fast, and powerful.
Beginners can easily learn to create a simple calculator using this a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 292,
"s": 54,
"text": "Python provides many options for developing GUI like Kivy, PyQT, WxPython, and several others. Tkinter is the one that is shipped inbuilt with python which makes it the most ... |
Java Program to Find Maximum Odd Number in Array Using Stream and Filter | 29 Oct, 2020
Java 8 introduced some great features like Stream and Filter which tremendously simplify tasks like reading data and performing operations like minimum, maximum, sum, and conditional check on them. In this program, we will get the maximum of all odd numbers from a list of integers with the help of the Java... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2020"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "Java 8 introduced some great features like Stream and Filter which tremendously simplify tasks like reading data and performing operations like minimum, maximum, sum, and cond... |
Python | Creating tensors using different functions in Tensorflow | 21 Nov, 2018
Tensorflow is an open-source machine learning framework that is used for complex numerical computation. It was developed by the Google Brain team in Google. Tensorflow can train and run deep neural networks that can be used to develop several AI applications.
What is a Tensor?A tensor can be described as a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2018"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "Tensorflow is an open-source machine learning framework that is used for complex numerical computation. It was developed by the Google Brain team in Google. Tensorflow can tra... |
Exponential Distribution in R Programming – dexp(), pexp(), qexp(), and rexp() Functions | 08 Jul, 2020
The exponential distribution in R Language is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average rate. It is a particular case of the gamma distribution.
In R, there are 4 built-in fu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "The exponential distribution in R Language is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continu... |
How to use Collapse Component in ReactJS ? | 22 Feb, 2021
Collapse Component adds a Collapse animation to a child element or component in which it vertically expands from the top of the child element. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Collapse Component in ReactJS using the following approa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Collapse Component adds a Collapse animation to a child element or component in which it vertically expands from the top of the child element. Material UI for React has this c... |
Print concentric rectangular pattern in a 2d matrix | 22 Nov, 2021
Given a positive integer n, print the matrix filled with rectangle pattern as shown below: a a a a a a b b b a a b c b a a b b b a a a a a a where a = n, b = n – 1,c = n – 2 and so on.
Examples:
Input : n = 4
Output :
4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4
4 3 3 3 3 3 4... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 239,
"s": 54,
"text": "Given a positive integer n, print the matrix filled with rectangle pattern as shown below: a a a a a a b b b a a b c b a a b b b a a a a a a where a = n, b = n – 1,c = n – 2 ... |
How to check multiple variables against a value in Python? | 19 May, 2021
Given some variables, the task is to write a Python program to check multiple variables against a value. There are three possible known ways to achieve this in Python:
Method #1: Using or operator
This is pretty simple and straightforward. The following code snippets illustrate this method.
Example 1:
Pyt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "Given some variables, the task is to write a Python program to check multiple variables against a value. There are three possible known ways to achieve this in Python:"
},
... |
Python | Find the list elements starting with specific letter | 25 Apr, 2019
Sometimes, we require to get the words that start with the specific letter. This kind of use case is quiet common in the places of common programming projects or competitive programming. Let’s discuss certain shorthands to deal with this problem in Python.
Method #1 : Using list comprehension + lower()
Thi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Apr, 2019"
},
{
"code": null,
"e": 311,
"s": 54,
"text": "Sometimes, we require to get the words that start with the specific letter. This kind of use case is quiet common in the places of common programming projects or competitive ... |
C++ program for hashing with chaining | 12 Jul, 2022
In hashing there is a hash function that maps keys to some values. But these hashing function may lead to collision that is two or more keys are mapped to same value. Chain hashing avoids collision. The idea is to make each cell of hash table point to a linked list of records that have same hash function v... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 987,
"s": 54,
"text": "In hashing there is a hash function that maps keys to some values. But these hashing function may lead to collision that is two or more keys are mapped to same value. Chain h... |
How to break an outer loop with PHP ? | 01 Oct, 2019
Using break keyword: The break keyword is used to immediately terminate the loop and the program control resumes at the next statement following the loop. To terminate the control from any loop we need to use break keyword. The break keyword is used to end the execution of current for, foreach, while, do-w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2019"
},
{
"code": null,
"e": 540,
"s": 28,
"text": "Using break keyword: The break keyword is used to immediately terminate the loop and the program control resumes at the next statement following the loop. To terminate the con... |
JavaScript promise reject() Method | 31 May, 2022
A promise is a JavaScript object which is responsible for handling callbacks and other asynchronous events or data with 2 different possible states, it either resolves or rejects.
The Promise.reject() method is used to return a rejected Promise object with a given reason for rejection. It is used for debug... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "A promise is a JavaScript object which is responsible for handling callbacks and other asynchronous events or data with 2 different possible states, it either resolves or reje... |
Saddle point in a matrix | 05 Jul, 2022
Given a matrix of n x n size, the task is to find the saddle point of the matrix. A saddle point is an element of the matrix such that it is the minimum element in its row and maximum in its column.
Examples :
Input: Mat[3][3] = { {1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
Outpu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 254,
"s": 54,
"text": "Given a matrix of n x n size, the task is to find the saddle point of the matrix. A saddle point is an element of the matrix such that it is the minimum element in its row an... |
HTML - URL Encoding | URL encoding is the practice of translating unprintable characters or characters with special meaning within URLs to a representation that is unambiguous and universally accepted by web browsers and servers. These characters include −
ASCII control characters − Unprintable characters typically used for output control. ... | [
{
"code": null,
"e": 2743,
"s": 2508,
"text": "URL encoding is the practice of translating unprintable characters or characters with special meaning within URLs to a representation that is unambiguous and universally accepted by web browsers and servers. These characters include −"
},
{
"cod... |
Text Decoration in CSS | For text decoration in CSS, use the text-decoration property as a shorthand property for the following properties −
text-decoration-line
text-decoration-color
text-decoration-style
Let us see an example for text decoration in CSS −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline un... | [
{
"code": null,
"e": 1303,
"s": 1187,
"text": "For text decoration in CSS, use the text-decoration property as a shorthand property for the following properties −"
},
{
"code": null,
"e": 1368,
"s": 1303,
"text": "text-decoration-line\ntext-decoration-color\ntext-decoration-style... |
Print even and odd numbers in a given range using recursion | 23 Apr, 2021
Given two integers L and R, the task is to print all the even and odd numbers from L to R using recursion.
Examples:
Input: L = 1, R = 10Output: Even numbers: 2 4 6 8 10Odd numbers: 1 3 5 7 9
Input: L = 10, R = 25 Output: Even numbers:10 12 14 16 18 20 22 24 Odd numbers:11 13 15 17 19 21 23 25
Approach: Fo... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 160,
"s": 53,
"text": "Given two integers L and R, the task is to print all the even and odd numbers from L to R using recursion."
},
{
"code": null,
"e": 170,
"s": 160,
"text":... |
Python – Check if string contains any number | 06 Jul, 2022
In this article, we will check How to check if a string contains a number in Python.
Input : test_str = ‘geeks4g2eeks’
Output : True
Explanation : Contains 4 and 2.
Input : test_str = ‘geeksforgeeks’
Output : False
Explanation : Contains no number.
The combination of the above functions can be used t... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 139,
"s": 53,
"text": "In this article, we will check How to check if a string contains a number in Python. "
},
{
"code": null,
"e": 174,
"s": 139,
"text": "Input : test_str = ... |
Get only the date in timestamp in MySQL? | In order to get the date from the timestamp, you can use DATE() function from MySQL.
The syntax is as follows −
SELECT DATE(yourTimestampColumnName) as anyVariableName from yourTableName;
To understand the above syntax, let us first create a table. The query to create a table is as follows −
mysql> create table DateFro... | [
{
"code": null,
"e": 1272,
"s": 1187,
"text": "In order to get the date from the timestamp, you can use DATE() function from MySQL."
},
{
"code": null,
"e": 1299,
"s": 1272,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1375,
"s": 1299,
"text": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.