title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
std::mt19937 Class in C++ | 30 Mar, 2021
std::mt19937(since C++11) class is a very efficient pseudo-random number generator and is defined in a random header file. It produces 32-bit pseudo-random numbers using the well-known and popular algorithm named Mersenne twister algorithm. std::mt19937 class is basically a type of std::mersenne_twister_en... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Mar, 2021"
},
{
"code": null,
"e": 373,
"s": 53,
"text": "std::mt19937(since C++11) class is a very efficient pseudo-random number generator and is defined in a random header file. It produces 32-bit pseudo-random numbers using the ... |
Permutation and Combination in Python | 11 Apr, 2022
Python provides direct methods to find permutations and combinations of a sequence. These methods are present in itertools package.
First import itertools package to implement the permutations method in python. This method takes a list as an input and returns an object list of tuples that contain all permu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 184,
"s": 52,
"text": "Python provides direct methods to find permutations and combinations of a sequence. These methods are present in itertools package."
},
{
"code": null,
"e": 385,
... |
How to add a border to the top and bottom of an Android View? | This example demonstrates how to add a border to the top and bottom of an Android View .
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/drawable/border_top_bottom.xml
<?xml version="1.0" encoding="... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "This example demonstrates how to add a border to the top and bottom of an Android View ."
},
{
"code": null,
"e": 1281,
"s": 1151,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all requi... |
Create A Synthetic Image Dataset β The βWhatβ, The βWhyβ and The βHowβ | by Viraf | Towards Data Science | It is quite a known fact that the quality and quantity of dataset used to train your model will have a direct effect on the modelβs performance. Availability of an extensive, versatile dataset could seal the deal, and you could jump to the next step of your Machine Learning / Deep Learning pipeline. But often you might... | [
{
"code": null,
"e": 657,
"s": 172,
"text": "It is quite a known fact that the quality and quantity of dataset used to train your model will have a direct effect on the modelβs performance. Availability of an extensive, versatile dataset could seal the deal, and you could jump to the next step of yo... |
How to add a citation in a plot created by using ggplot2 in R? | A footnote is generally used to give references to a document, text or image and it is called citation. It helps the reader or viewer to check out the original source using the new text or image is generated. If we want to give citation to a plot in R using ggplot2 package then we can add labs that has caption option t... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "A footnote is generally used to give references to a document, text or image and it is called citation. It helps the reader or viewer to check out the original source using the new text or image is generated. If we want to give citation to a plot in R u... |
A Standalone Application to Scan Barcode using Webcam | by Gautam Kumar | Towards Data Science | When you visit any shopping mall or stores, you must have seen a barcode detector machine (see figure 1, image source flickr) which read barcode of the product you purchased and calculate the cost. Finally, you get a receipt of shopping having items you have purchased and cost of respective items. Use of barcode scanne... | [
{
"code": null,
"e": 612,
"s": 172,
"text": "When you visit any shopping mall or stores, you must have seen a barcode detector machine (see figure 1, image source flickr) which read barcode of the product you purchased and calculate the cost. Finally, you get a receipt of shopping having items you h... |
Global and Local Variables in Python? | There are two types of variables: global variables and local variables.
The scope of global variables is the entire program whereas the scope of local variable is limited to the function where it is defined.
def func():
x = "Python"
print(x)
print(s)
s = "Tutorialspoint"
print(s)
func()
print(x)
In above program- x is ... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "There are two types of variables: global variables and local variables."
},
{
"code": null,
"e": 1270,
"s": 1134,
"text": "The scope of global variables is the entire program whereas the scope of local variable is limited to the func... |
Image Thumbnail with Bootstrap | To add a thumbnail to the image, use the .img-thumbnail Bootstrap class.
You can try to run the following code to add a thumbnail to images
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Images</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scr... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To add a thumbnail to the image, use the .img-thumbnail Bootstrap class."
},
{
"code": null,
"e": 1202,
"s": 1135,
"text": "You can try to run the following code to add a thumbnail to images"
},
{
"code": null,
"e": 1212,... |
Java - String replace() Method | This method returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
Here is the syntax of this method β
public String replace(char oldChar, char newChar)
Here is the detail of parameters β
oldChar β the old character.
oldChar β the old character.
newChar β the new charact... | [
{
"code": null,
"e": 2491,
"s": 2377,
"text": "This method returns a new string resulting from replacing all occurrences of oldChar in this string with newChar."
},
{
"code": null,
"e": 2528,
"s": 2491,
"text": "Here is the syntax of this method β"
},
{
"code": null,
... |
C++ String Library - operator[] | It returns a reference to the character at position pos in the string.
Following is the declaration for std::string::operator[]
char& operator[] (size_t pos);
const char& operator[] (size_t pos) const;
pos β Value with the position of a character within the string.
It returns a reference to the character at position p... | [
{
"code": null,
"e": 2674,
"s": 2603,
"text": "It returns a reference to the character at position pos in the string."
},
{
"code": null,
"e": 2731,
"s": 2674,
"text": "Following is the declaration for std::string::operator[]"
},
{
"code": null,
"e": 2763,
"s": 27... |
Linux Admin - Remote Management | When talking about remote management in CentOS as an Administrator, we will explore two methods β
Console Management
GUI Management
Remote Console Management means performing administration tasks from the command line via a service such as ssh. To use CentOS Linux effectively, as an Administrator, you will need to be p... | [
{
"code": null,
"e": 2355,
"s": 2257,
"text": "When talking about remote management in CentOS as an Administrator, we will explore two methods β"
},
{
"code": null,
"e": 2374,
"s": 2355,
"text": "Console Management"
},
{
"code": null,
"e": 2389,
"s": 2374,
"te... |
How to Split large string in to n-size chunks in JavaScript? | There are two ways to split a large string in to n-sized sub strings.
This is a pure logic method in which only conventional methods are used such as for loop, concat, modulous etc. This method is not as sophisticated as regex method, because it's a predetermined method. The number of chunks that string to be divided s... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "There are two ways to split a large string in to n-sized sub strings."
},
{
"code": null,
"e": 1429,
"s": 1132,
"text": "This is a pure logic method in which only conventional methods are used such as for loop, concat, modulous etc. ... |
@Autowired,@Qualifier,@Value annotations in Spring - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
The Spring framework provides an autowiring f... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Difference between Python iterable and iterator | An iterable can be loosely defined as an object which would generate an iterator when passed to in-built method iter(). There are a couple of conditions, for an object to be iterable, the object of the class needs to define two instance mehtod: __len__ and __getitem__. An object which fulfills these conditions when pas... | [
{
"code": null,
"e": 1431,
"s": 1062,
"text": "An iterable can be loosely defined as an object which would generate an iterator when passed to in-built method iter(). There are a couple of conditions, for an object to be iterable, the object of the class needs to define two instance mehtod: __len__ ... |
How to store MongoDB result in an array? | To store MongoDB result in an array, use the toArray() method β
var anyVariableName=db.yourCollectionName.find().toArray();
Let us first create a collection with documents β
> db.mongoDbResultInArrayDemo.insertOne({"CustomerName":"David Miller","CustomerAge":24,"isMarried":false});
{
"acknowledged" : true,
"inser... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "To store MongoDB result in an array, use the toArray() method β"
},
{
"code": null,
"e": 1186,
"s": 1126,
"text": "var anyVariableName=db.yourCollectionName.find().toArray();"
},
{
"code": null,
"e": 1236,
"s": 1186,
... |
How can we use Python Ternary Operator Without else? | If you want to convert a statement like β
if <condition>:
<some-code>
to a single line, You can use the single line if syntax to do so β
if <condition>: <some-code>
Another way to do this is leveraging the short-circuiting and operator like β
<condition> and <some-code>
If <condition> is false, then short-circuiting... | [
{
"code": null,
"e": 1104,
"s": 1062,
"text": "If you want to convert a statement like β"
},
{
"code": null,
"e": 1135,
"s": 1104,
"text": "if <condition>:\n <some-code>"
},
{
"code": null,
"e": 1202,
"s": 1135,
"text": "to a single line, You can use the sin... |
Install Apache Solr on Windows 10 | Apache Solr 7.5.0 Installation | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Apache Solr is an opensource Java library bui... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Pushdown Automata Introduction | A pushdown automaton is a way to implement a context-free grammar in a similar way we design DFA for a regular grammar. A DFA can remember a finite amount of information, but a PDA can remember an infinite amount of information.
Basically a pushdown automaton is β
"Finite state machine" + "a stack"
A pushdown automaton... | [
{
"code": null,
"e": 2912,
"s": 2683,
"text": "A pushdown automaton is a way to implement a context-free grammar in a similar way we design DFA for a regular grammar. A DFA can remember a finite amount of information, but a PDA can remember an infinite amount of information."
},
{
"code": nu... |
Java program to transpose a matrix. | Following is the required program.
Live Demo
public class Tester {
public static void main(String args[]) {
int a[][] = { { 1, 3, 4 }, { 2, 4, 3 }, { 3, 4, 5 } };
int t[][] = new int[3][3];
// transpose the matrix
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Following is the required program."
},
{
"code": null,
"e": 1107,
"s": 1097,
"text": "Live Demo"
},
{
"code": null,
"e": 1863,
"s": 1107,
"text": "public class Tester {\n public static void main(String args[]) {... |
Replace Multiple of 3 and 5 With Fizz, Buzz in Python | Suppose we have a number n. We have to find a string that is representing all numbers from 1
to n, but we have to follow some rules.
When the number is divisible by 3, put Fizz instead of the number
When the number is divisible by 3, put Fizz instead of the number
When the number is divisible by 5, put Buzz instead of ... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "Suppose we have a number n. We have to find a string that is representing all numbers from 1\nto n, but we have to follow some rules."
},
{
"code": null,
"e": 1261,
"s": 1195,
"text": "When the number is divisible by 3, put Fizz inst... |
Apache Presto - Installation | This chapter will explain how to install Presto on your machine. Letβs go through the basic requirements of Presto,
Linux or Mac OS
Java version 8
Now, letβs continue the following steps to install Presto on your machine.
Hopefully, you have already installed Java version 8 on your machine right now, so you just verify... | [
{
"code": null,
"e": 2122,
"s": 2006,
"text": "This chapter will explain how to install Presto on your machine. Letβs go through the basic requirements of Presto,"
},
{
"code": null,
"e": 2138,
"s": 2122,
"text": "Linux or Mac OS"
},
{
"code": null,
"e": 2153,
"s"... |
Automate These 3 (Boring!!) Excel Tasks with Python! | by Nik Piepenbreier | Towards Data Science | Excel is everywhere. Itβs basically the default application for data analysis in the workplace, for better or for worse. There are many boring tasks that you may need to take on in your day to day, that leave you thinking, βthere must be a better wayβ. Python is that way!
All of these examples are possible in VBA, but ... | [
{
"code": null,
"e": 445,
"s": 172,
"text": "Excel is everywhere. Itβs basically the default application for data analysis in the workplace, for better or for worse. There are many boring tasks that you may need to take on in your day to day, that leave you thinking, βthere must be a better wayβ. Py... |
How to sort the letters in a string alphabetically in Python? | To sort letters in a string alphabetically, you need to use the sorted function that returns a sorted list of letters which you can then join to get a string. For example,
>>> s = "helloworld"
>>> ''.join(sorted(s))
'dehllloorw'
If you want only unique characters sorted, you can use sets to get the result. For example,... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "To sort letters in a string alphabetically, you need to use the sorted function that returns a sorted list of letters which you can then join to get a string. For example,"
},
{
"code": null,
"e": 1291,
"s": 1234,
"text": ">>> s = \"... |
How to use a switch case 'or' in PHP? - GeeksforGeeks | 11 Nov, 2018
Problem: How to use a switch case βorβ in PHP?Solution: This can be achieved in 2 ways. They are as follows:Method 1: Without using break keyword in one of the switch case.Example:
<?php$option = 1;switch ($option){ case 1: case 2: echo "The option is either 1 or 2."; break;}?>
Output:
The ... | [
{
"code": null,
"e": 24804,
"s": 24776,
"text": "\n11 Nov, 2018"
},
{
"code": null,
"e": 24985,
"s": 24804,
"text": "Problem: How to use a switch case βorβ in PHP?Solution: This can be achieved in 2 ways. They are as follows:Method 1: Without using break keyword in one of the swi... |
Compression using the LZMA algorithm using Python (lzma) | The LempelβZivβMarkov chain algorithm(LZMA) performs lossless data compression using a dictionary compression scheme featuring a higher compression ratio than other compression algorithms. Pythonβs lzma module consists of classes and convenience functions for compression and decompression of data with LZMA algorithm.
A... | [
{
"code": null,
"e": 1381,
"s": 1062,
"text": "The LempelβZivβMarkov chain algorithm(LZMA) performs lossless data compression using a dictionary compression scheme featuring a higher compression ratio than other compression algorithms. Pythonβs lzma module consists of classes and convenience functio... |
0-1 BFS (Shortest Path in a Binary Weight Graph) - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 407,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
How to Create Animated Visualizations with Plotly | by Soner YΔ±ldΔ±rΔ±m | Towards Data Science | We live in the era of big data. We can collect lots of data which allows to infer meaningful results and make informed business decisions. However, as the amount of data increases, it gets trickier to analyze and explore the data. There comes in the power of visualizations which are great tools in exploratory data anal... | [
{
"code": null,
"e": 969,
"s": 172,
"text": "We live in the era of big data. We can collect lots of data which allows to infer meaningful results and make informed business decisions. However, as the amount of data increases, it gets trickier to analyze and explore the data. There comes in the power... |
Top SQL Interview Test Questions & Techniques (Part 1) | by Ian Ho | Towards Data Science | Check out Part 2 Here!
If youβre applying for a role in Data Science, Business Analytics or really any field that deals with data, thereβs a very high chance youβll be asked to take a coding test with a SQL component in it. The test is usually conducted on a platform like Codility or HackerRank and typically serves as ... | [
{
"code": null,
"e": 195,
"s": 172,
"text": "Check out Part 2 Here!"
},
{
"code": null,
"e": 560,
"s": 195,
"text": "If youβre applying for a role in Data Science, Business Analytics or really any field that deals with data, thereβs a very high chance youβll be asked to take a co... |
Can Place Flowers in C++ | Suppose we have a long flowerbed in which some of the plots are planted and some are empty. Now there is a constraint, flowers cannot be planted in adjacent plots, they would compete for water and both would die. So if we have a flowerbed, represented by an array containing 0 and 1, 0 indicates empty and 1 indicates fi... | [
{
"code": null,
"e": 1531,
"s": 1062,
"text": "Suppose we have a long flowerbed in which some of the plots are planted and some are empty. Now there is a constraint, flowers cannot be planted in adjacent plots, they would compete for water and both would die. So if we have a flowerbed, represented b... |
Tweets, Emoji Sentiment Analysis using Q Blocks | by Michelangiolo Mazzeschi | Towards Data Science | In the following article, I will rent the Q Blocks GPU to run a computational demanding AI model. I will run a deep learning model called DeepMoji that, given a sentence, will estimate the top n emotions that can describe it (click not the link to have a try). The platform I will be renting the GPU from is still in ear... | [
{
"code": null,
"e": 666,
"s": 172,
"text": "In the following article, I will rent the Q Blocks GPU to run a computational demanding AI model. I will run a deep learning model called DeepMoji that, given a sentence, will estimate the top n emotions that can describe it (click not the link to have a ... |
Count the divisors or multiples present in the Array for each element - GeeksforGeeks | 15 Sep, 2021
Given an array A[] with N integers, for each integer A[i] in the array, the task is to find the number of integers A[j] (j != i) in the array such that A[i] % A[j] = 0 or A[j] % A[i] = 0.
Examples:
Input: A = {2, 3, 4, 5, 6}Output: 2 1 1 0 2Explanation: For i=0, the valid indices are 2 and 4 as 4%2 = 0 and... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 24984,
"s": 24796,
"text": "Given an array A[] with N integers, for each integer A[i] in the array, the task is to find the number of integers A[j] (j != i) in the array such that A[i] % A[j]... |
How to Build a Scalable Big Data Analytics Pipeline | by Nam Nguyen | Towards Data Science | Data is a vital element of todayβs innovative enterprise. Data-driven decision making allows corporations to adapt to an unpredictable world. The ability to report on the data is the spine of business analytics. With the unprecedented growth of data in the 21st century, big data is no longer a buzzword but a reality th... | [
{
"code": null,
"e": 519,
"s": 172,
"text": "Data is a vital element of todayβs innovative enterprise. Data-driven decision making allows corporations to adapt to an unpredictable world. The ability to report on the data is the spine of business analytics. With the unprecedented growth of data in th... |
How to create a high resolution timer with C++ and Linux? | To create high resolution timer we can use the chrono library. This library has high resolution clock. This can count in nanoseconds.
In this program we will see the execution time in nanoseconds. We will take the time value at first, then another time value at the last, then find the difference to get elapsed time. He... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "To create high resolution timer we can use the chrono library. This library has high resolution clock. This can count in nanoseconds."
},
{
"code": null,
"e": 1444,
"s": 1196,
"text": "In this program we will see the execution time i... |
p5.js | Mouse | mouseDragged() Function - GeeksforGeeks | 22 Apr, 2019
The mouseDragged() function in p5.js is used to check the mouse drags (mouse moves and mouse button pressed). It is invoked each time when the mouse drags. If mouseDragged() function is not defined, then touchMoved() function will be used instead of mouseDragged() function.
Syntax:
mouseDragged(Event)
Belo... | [
{
"code": null,
"e": 43301,
"s": 43273,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 43576,
"s": 43301,
"text": "The mouseDragged() function in p5.js is used to check the mouse drags (mouse moves and mouse button pressed). It is invoked each time when the mouse drags. If mous... |
GeoPandas: A Practical Guide. Mapping earthquakes from 1965 to 2016 | by Soner YΔ±ldΔ±rΔ±m | Towards Data Science | GeoPandas is a Python library designed to work with geospatial data. It makes it fairly easy to create visualizations based on geographical locations.
In this post, we will visualize the significant earthquakes that occurred between 1965 and 2016. The dataset is available on Kaggle.
GeoPandas has two main data structur... | [
{
"code": null,
"e": 322,
"s": 171,
"text": "GeoPandas is a Python library designed to work with geospatial data. It makes it fairly easy to create visualizations based on geographical locations."
},
{
"code": null,
"e": 455,
"s": 322,
"text": "In this post, we will visualize the... |
Static vs Dynamic Binding in Java | 07 Jan, 2022
There are certain key points that are needed to be remembered before adhering forward where we will be discussing and implementing static and dynamic bindings in Java later concluding out the differences.
private, final and static members (methods and variables) use static binding while for virtual metho... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 259,
"s": 52,
"text": "There are certain key points that are needed to be remembered before adhering forward where we will be discussing and implementing static and dynamic bindings in Java later c... |
C# Program to Implement Multiple Interfaces in the Same Class | 21 Oct, 2021
Like a class, Interface can have methods, properties, events, and indexers as its members. But interface will contain only the declaration of the members. The implementation of interfaceβs members will be given by the class that implements the interface implicitly or explicitly. C# allows that a single cla... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 440,
"s": 28,
"text": "Like a class, Interface can have methods, properties, events, and indexers as its members. But interface will contain only the declaration of the members. The implementation o... |
Correcting EOF error in python in Codechef | 24 Nov, 2020
EOF stands for End Of File. Well, technically it is not an error, rather an exception. This exception is raised when one of the built-in functions, most commonly input() returns End-Of-File (EOF) without reading any data.
EOF error is raised in Python in some specific scenarios:
Sometimes all program tries... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Nov, 2020"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "EOF stands for End Of File. Well, technically it is not an error, rather an exception. This exception is raised when one of the built-in functions, most commonly input() retur... |
Python | Count occurrences of an element in a list | 05 Jul, 2022
Given a list in Python and a number x, count the number of occurrences of x in the given list.
Examples:
Input : lst = [15, 6, 7, 10, 12, 20, 10, 28, 10]
x = 10
Output : 3
10 appears three times in given list.
Input : lst = [8, 6, 8, 10, 8, 20, 10, 8, 8]
x = 16
Output : 0
We keep a coun... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 147,
"s": 52,
"text": "Given a list in Python and a number x, count the number of occurrences of x in the given list."
},
{
"code": null,
"e": 158,
"s": 147,
"text": "Examples: ... |
Algorithms | Graph Traversals | Question 12 | 28 Jun, 2021
What are the appropriate data structures for following algorithms?
1) Breadth First Search
2) Depth First Search
3) Prim's Minimum Spanning Tree
4) Kruskal' Minimum Spanning Tree
(A)
1) Stack
2) Queue
3) Priority Queue... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 119,
"s": 52,
"text": "What are the appropriate data structures for following algorithms?"
},
{
"code": null,
"e": 320,
"s": 119,
"text": "1) Breadth First Search ... |
URL getHost() method in Java with Examples | 27 Dec, 2018
getHost() function is a part of URL class. The function getHost() returns the Host of a specified URL. The Host part of the URL is the host name of the URL. The format of the host conforms to RFC 2732.
Function Signature
public String getHost()
Syntax
url.getHost()
Parameter: This function does not requi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2018"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "getHost() function is a part of URL class. The function getHost() returns the Host of a specified URL. The Host part of the URL is the host name of the URL. The format of the ... |
Find the sum of elements of the Matrix generated by the given rules | 28 May, 2022
Given three integers A, B, and R, the task is to find the sum of all the elements of the matrix generated by the given rules:
The first row will contain a single element which is A and the rest of the elements will be 0.The next row will contain two elements all of which are (A + B) and the rest are 0s.Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2022"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Given three integers A, B, and R, the task is to find the sum of all the elements of the matrix generated by the given rules: "
},
{
"code": null,
"e": 447,
"s... |
N-th root of a number - GeeksforGeeks | 13 Jul, 2021
Given two numbers N and A, find N-th root of A. In mathematics, Nth root of a number A is a real number that gives A, when we raise it to integer power N. These roots are used in Number Theory and other advanced branches of mathematics. Refer Wiki page for more information. Examples:
Input : A = 81
... | [
{
"code": null,
"e": 24904,
"s": 24876,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 25191,
"s": 24904,
"text": "Given two numbers N and A, find N-th root of A. In mathematics, Nth root of a number A is a real number that gives A, when we raise it to integer power N. These ro... |
Why should we use <noscript> element in JavaScript? | To find whether the browser supports JavaScript or not, use the <noscript> tag. The HTML <noscript> tag is used to handle the browsers, which do recognize <script> tag but do not support scripting. This tag is used to display an alternate text message.
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML noscri... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "To find whether the browser supports JavaScript or not, use the <noscript> tag. The HTML <noscript> tag is used to handle the browsers, which do recognize <script> tag but do not support scripting. This tag is used to display an alternate text message."... |
BootStrap | Text Utilities (Alignment, Wrapping, Weight etc.) - GeeksforGeeks | 15 Jan, 2019
Bootstrap is one of the most popular, open-source front-end frame work which helps us in developing responsive, mobile-first websites and web applications. As a part of its offering, bootstrap provides us a collection of classes, called the Text Utilities classes, which controls various text properties, su... | [
{
"code": null,
"e": 24500,
"s": 24472,
"text": "\n15 Jan, 2019"
},
{
"code": null,
"e": 24966,
"s": 24500,
"text": "Bootstrap is one of the most popular, open-source front-end frame work which helps us in developing responsive, mobile-first websites and web applications. As a pa... |
How to check Aadhaar number is valid or not using Regular Expression - GeeksforGeeks | 31 Mar, 2022
Given string str, the task is to check whether the given string is a valid Aadhaar number or not by using Regular Expression. The valid Aadhaar number must satisfy the following conditions:
It should have 12 digits.It should not start with 0 and 1.It should not contain any alphabet and special characters.... | [
{
"code": null,
"e": 24970,
"s": 24942,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 25161,
"s": 24970,
"text": "Given string str, the task is to check whether the given string is a valid Aadhaar number or not by using Regular Expression. The valid Aadhaar number must satisfy... |
OffsetDateTime of(LocalDateTime) method in Java with Examples - GeeksforGeeks | 05 Jun, 2020
The of(LocalDateTime dateTime, ZoneOffset offset) method of the OffsetDateTime class in Java is used to create an instance of OffsetDateTime from given instances of date-time and offset. This method creates an OffsetDateTime with the specified local date-time and offset.
Syntax:
public static OffsetDateTim... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 24220,
"s": 23948,
"text": "The of(LocalDateTime dateTime, ZoneOffset offset) method of the OffsetDateTime class in Java is used to create an instance of OffsetDateTime from given instances o... |
C++ continue statement | The continue statement works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between.
For the for loop, continue causes the conditional test and increment portions of the loop to execute. For the while and do.... | [
{
"code": null,
"e": 2515,
"s": 2318,
"text": "The continue statement works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between."
},
{
"code": null,
"e": 2702,
"s": 2515... |
How to Build Your Own Dataset of YouTube Comments | by William Yang | Towards Data Science | This is the first of a series of articles that will cover textual data collection, data preprocessing, and sentiment analysis. In this article specifically, I will talk about why I wanted to collect comments from Blackpinkβs latest music video, How You Like That, and then walk you through how you can build your own dat... | [
{
"code": null,
"e": 541,
"s": 171,
"text": "This is the first of a series of articles that will cover textual data collection, data preprocessing, and sentiment analysis. In this article specifically, I will talk about why I wanted to collect comments from Blackpinkβs latest music video, How You Li... |
Imbalanced Data β Oversampling Using Gaussian Mixture Models | by Bassel Karami | Towards Data Science | TL;DR β Drawing samples from Gaussian Mixture Models (GMM), or other generative models, is another creative oversampling technique that can potentially outperform SMOTE variants.
Introduction
Dataset preparation
Intro to GMM
Using GMM as an oversampling technique
Evaluation of performance metrics
Conclustion
In a previ... | [
{
"code": null,
"e": 350,
"s": 171,
"text": "TL;DR β Drawing samples from Gaussian Mixture Models (GMM), or other generative models, is another creative oversampling technique that can potentially outperform SMOTE variants."
},
{
"code": null,
"e": 363,
"s": 350,
"text": "Introdu... |
Virtual Background in webcam with Body Segmentation technique | by Benson Ruan | Towards Data Science | Have you ever had a moment when browsing those pretty travel selfies on social media, you talk to yourself: βI wish I could be thereβ? Guess what, we are going to make it come true today. With the latest technology of Person Segmentation, we can separate the body section with the background on a pixel level.
Very simil... | [
{
"code": null,
"e": 482,
"s": 172,
"text": "Have you ever had a moment when browsing those pretty travel selfies on social media, you talk to yourself: βI wish I could be thereβ? Guess what, we are going to make it come true today. With the latest technology of Person Segmentation, we can separate ... |
Image Processing with Python β Working with Entropy | by Tonichi Edeza | Towards Data Science | Apart from segregating objects based on their colors, another way to segregate objects is via their textures. To do this we can make use of the entropy function in Skimage. In this article we shall learn how to use the function to effectively extract objects of interest in our image.
Letβs begin!
As always, start by im... | [
{
"code": null,
"e": 457,
"s": 172,
"text": "Apart from segregating objects based on their colors, another way to segregate objects is via their textures. To do this we can make use of the entropy function in Skimage. In this article we shall learn how to use the function to effectively extract obje... |
JavaScript DOM HTML | The HTML DOM allows JavaScript to change the content of HTML elements.
The easiest way to modify the content of an HTML element is by using the innerHTML property.
To change the content of an HTML element, use this syntax:
This example changes the content of a <p> element:
Example explained:
The HTML document above con... | [
{
"code": null,
"e": 71,
"s": 0,
"text": "The HTML DOM allows JavaScript to change the content of HTML elements."
},
{
"code": null,
"e": 164,
"s": 71,
"text": "The easiest way to modify the content of an HTML element is by using the innerHTML property."
},
{
"code": null... |
Matplotlib.axes.Axes.tick_params() in Python | 21 Apr, 2020
Matplotlib is a library in Python and it is numerical β mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical β mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
Comments in Julia | 11 Feb, 2022
Comments are the statements in a code that are ignored by the compiler at the time of execution. These statements are written to beautify the code, providing an explanation for the steps that are used in the code. During coding, proper use of comments makes maintenance easier and finding bugs easily. In ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 459,
"s": 28,
"text": "Comments are the statements in a code that are ignored by the compiler at the time of execution. These statements are written to beautify the code, providing an explanation fo... |
How to Set Tick Labels Font Size in Matplotlib? | 26 Nov, 2020
Prerequisite: Matplotlib
In this article, we will learn how to change (increase/decrease) the font size of tick label of a plot in matplotlib. For this understanding of following concepts is mandatory:
Matplotlib : Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 53,
"s": 28,
"text": "Prerequisite: Matplotlib"
},
{
"code": null,
"e": 230,
"s": 53,
"text": "In this article, we will learn how to change (increase/decrease) the font size of t... |
bool() in Python | 15 Sep, 2021
Python bool() function is used to return or convert a value to a Boolean value i.e., True or False, using the standard truth testing procedure.
Syntax: bool([x])
The bool() method in general takes only one parameter(here x), on which the standard truth testing procedure can be applied. If no parameter is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Python bool() function is used to return or convert a value to a Boolean value i.e., True or False, using the standard truth testing procedure. "
},
{
"code": null,
... |
Largest and Smallest N-digit Hexadecimal Numbers | 20 Jan, 2022
Given an integer N, the task is to find the smallest and largest N-digit numbers Hexa-Decimal Number System.
Examples:
Input: N = 4 Output: Largest: FFFF Smallest: 1000
Input: N = 2 Output: Largest: FF Smallest: 10
Approach: The following steps can be followed to complete the required answer:
Largest Nu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Given an integer N, the task is to find the smallest and largest N-digit numbers Hexa-Decimal Number System."
},
{
"code": null,
"e": 148,
"s": 137,
"text"... |
Multi-dimensional lists in Python | Lists are a very widely use data structure in python. They contain a list of elements separated by comma. But sometimes lists can also contain lists within them. These are called nested lists or multidimensional lists. In this article we will see how to create and access elements in a multidimensional list.
In the belo... | [
{
"code": null,
"e": 1496,
"s": 1187,
"text": "Lists are a very widely use data structure in python. They contain a list of elements separated by comma. But sometimes lists can also contain lists within them. These are called nested lists or multidimensional lists. In this article we will see how to... |
CSS3 Media query for all devices | 03 Nov, 2021
The media query in CSS is used to create a responsive web design to make a user-friendly website. It means that the view of web pages differs from system to system based on screen or media types. Media is allowing us to reshape and design the user view page of the website for specific devices like Tablets,... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 392,
"s": 54,
"text": "The media query in CSS is used to create a responsive web design to make a user-friendly website. It means that the view of web pages differs from system to system based on s... |
How to minify HTML code of PHP page ? | 03 Jun, 2020
HTML output minification is important to improve website performance by reducing the page load times and reduce the overall page size. Minifying HTML output also reduces the data usage of the user requesting the site.Minification can be done by removing unnecessary details and eliminating excessive whitesp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 754,
"s": 28,
"text": "HTML output minification is important to improve website performance by reducing the page load times and reduce the overall page size. Minifying HTML output also reduces the d... |
HeapSort - GeeksforGeeks | 28 Jun, 2021
Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and place the maximum element at the end. We repeat the same process for remaining element ... More on Heap Sort
(A)
(B)
(C)
(d)
Writing cod... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 29850,
"s": 29577,
"text": "Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and ... |
Python program to check the validity of a Password? | Here given a password, our task is to check that this Password is valid or not. Here we use re module that provide regular expression and re.search() is used for checking the validation of alphabets, digits or special characters.
Step 1: first we take an alphanumeric string as a password.
Step 2: first check that this ... | [
{
"code": null,
"e": 1417,
"s": 1187,
"text": "Here given a password, our task is to check that this Password is valid or not. Here we use re module that provide regular expression and re.search() is used for checking the validation of alphabets, digits or special characters."
},
{
"code": n... |
Display Only Integer Values on ggplot2 Axis in R | 23 May, 2021
A dataframe to be plotted can support multiple data types in it. Sometimes a float value isnβt appropriate since it hampers the clarity and readability of the plot. Thus, if these values were plotted as integers it would easier and clearer. In this article, we will be looking at the approach to display onl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 379,
"s": 28,
"text": "A dataframe to be plotted can support multiple data types in it. Sometimes a float value isnβt appropriate since it hampers the clarity and readability of the plot. Thus, if t... |
Variation in Nim Game | 15 Jun, 2022
Prerequisites: Sprague Gruncy theorem Grundy NumbersNim is a famous game in which two players take turns removing items from distinct piles. During each turn, a player must remove one or more items from a single, non-empty pile. The winner of the game is whichever player removes the last item from the last... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 379,
"s": 54,
"text": "Prerequisites: Sprague Gruncy theorem Grundy NumbersNim is a famous game in which two players take turns removing items from distinct piles. During each turn, a player must r... |
Java Examples - Display a colors in a frame | How to display colours in a frame?
Following example displays how to a display all the colors in a frame using setRGB method of image class.
import java.awt.Graphics;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import javax.swing.JComponent;
import javax.... | [
{
"code": null,
"e": 2237,
"s": 2202,
"text": "How to display colours in a frame?"
},
{
"code": null,
"e": 2343,
"s": 2237,
"text": "Following example displays how to a display all the colors in a frame using setRGB method of image class."
},
{
"code": null,
"e": 3693... |
QuickSort - GeeksforGeeks | 28 Jun, 2021
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways ... More on Quick Sort
2 5 1 7 9 12 11 10
Writing code in comment? Pl... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 29828,
"s": 29577,
"text": "Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many d... |
Replace Spaces in Column Names in R DataFrame | 23 Sep, 2021
In this article, we will replace spaces in column names of a dataframe in R Programming Language.
Letβs create a Dataframe with 4 columns with 3 rows:
R
# create a dataframe with 4 columns and 3 rowsdata = data.frame("web technologies" = c("php","html","js"), "backend tech" = c("sql","or... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "In this article, we will replace spaces in column names of a dataframe in R Programming Language."
},
{
"code": null,
"e": 179,
"s": 126,
"text": "Letβs cr... |
Lodash _.startCase() Method | 03 Sep, 2020
The _.startCase() method is used to convert the string to start the case.
Syntax:
_.startCase( [string=''] )
Parameters: This method accepts a single parameter as mentioned above and described below:
string: This parameter holds the string to convert.
Return Value: This method returns the start of the cas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Sep, 2020"
},
{
"code": null,
"e": 102,
"s": 28,
"text": "The _.startCase() method is used to convert the string to start the case."
},
{
"code": null,
"e": 110,
"s": 102,
"text": "Syntax:"
},
{
"code": nu... |
K-Means Clustering and PCA to categorize music by similar audio features | by Sejal Dua | Towards Data Science | A year ago, life was much simpler. It was a bustling Tuesday morning in early October, and I was riding the metro to my Artificial Neural Network class in downtown Copenhagen. I was browsing my Spotify library for a playlist to shuffle for the duration of my commute when I bumped into my friend Liddy. I asked for her i... | [
{
"code": null,
"e": 726,
"s": 172,
"text": "A year ago, life was much simpler. It was a bustling Tuesday morning in early October, and I was riding the metro to my Artificial Neural Network class in downtown Copenhagen. I was browsing my Spotify library for a playlist to shuffle for the duration of... |
Unexpected Size of Python Objects in Memory | by Naser Tamimi | Jan, 2021 | Towards Data Science | Towards Data Science | I was working on a large dictionary in Python for a data science project. The Resouce Monitor (a windows utility that displays information about the use of hardware) showed an enormous amount of memory usage in a short amount of time. I knew that my draft code was not optimal, but the rate of memory utilization was not... | [
{
"code": null,
"e": 1025,
"s": 171,
"text": "I was working on a large dictionary in Python for a data science project. The Resouce Monitor (a windows utility that displays information about the use of hardware) showed an enormous amount of memory usage in a short amount of time. I knew that my draf... |
Lookup and Reference - HLOOKUP Function | The HLOOKUP function searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array.
You can use HLOOKUP when your comparison values are located in a row across the top of a table of data, and you want to look down a specifi... | [
{
"code": null,
"e": 2035,
"s": 1854,
"text": "The HLOOKUP function searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array."
},
{
"code": null,
"e": 2193,
"s": 2035,
"text": "Y... |
How to set an Android notification to a specific date in the future? | This example demonstrate about How to set an Android notification to a specific date in the future.
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" enc... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "This example demonstrate about How to set an Android notification to a specific date in the future."
},
{
"code": null,
"e": 1291,
"s": 1162,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill... |
How Automated Data Validation using Pandera Made Me More Productive! | by Pratik Gandhi | Towards Data Science | Data is called as the new oil of 21st Century. It is very important to juggle with the data to extract and use the correct information to solve our problems. Working with data can be exciting and sometimes tedious for people. As it is rightly said, βData Scientists spend 80% of their time cleaning the dataβ. Being a pa... | [
{
"code": null,
"e": 1016,
"s": 172,
"text": "Data is called as the new oil of 21st Century. It is very important to juggle with the data to extract and use the correct information to solve our problems. Working with data can be exciting and sometimes tedious for people. As it is rightly said, βData... |
Differences between Bit Rate and Baud Rate | Both Bit rate and Baud rate are used in data communication. Bit rate and Baud rate are related using below formula.
Bit Rate = Baud rate x the number of bit per baud
Following are the important differences between Pure Aloha and Slotted Aloha. | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "Both Bit rate and Baud rate are used in data communication. Bit rate and Baud rate are related using below formula."
},
{
"code": null,
"e": 1228,
"s": 1178,
"text": "Bit Rate = Baud rate x the number of bit per baud"
},
{
"c... |
Kernel Regression β with example and code | by Niranjan Pramanik, Ph.D. | Towards Data Science | In this article, how kernel function is used as a weighing function to develop non-parametric regression model is discussed. In the beginning of the article, a brief discussion about properties of kernel functions and steps to build kernels around data points are presented.
In non-parametric statistics, a kernel is a w... | [
{
"code": null,
"e": 447,
"s": 172,
"text": "In this article, how kernel function is used as a weighing function to develop non-parametric regression model is discussed. In the beginning of the article, a brief discussion about properties of kernel functions and steps to build kernels around data po... |
Monads in Scala - GeeksforGeeks | 24 Aug, 2020
In Scala, Monads is a construction which performs successive calculations. It is an object which covers the other object. It is worth noting that here, the output of an operation at some step is an input to another computations, which is a parent to the recent step of the program stated. Monad is neither a... | [
{
"code": null,
"e": 23876,
"s": 23848,
"text": "\n24 Aug, 2020"
},
{
"code": null,
"e": 24516,
"s": 23876,
"text": "In Scala, Monads is a construction which performs successive calculations. It is an object which covers the other object. It is worth noting that here, the output ... |
MySQL statement to copy data from one table and insert into another table | For this, you can use INSERT INTO....SELECT statement. Let us first create a table β
mysql> create table DemoTabe1 (Marks int);
Query OK, 0 rows affected (0.66 sec)
Insert some records in the table using insert command β
mysql> insert into DemoTabe1 values(68);
Query OK, 1 row affected (0.18 sec)
mysql> insert into Dem... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "For this, you can use INSERT INTO....SELECT statement. Let us first create a table β"
},
{
"code": null,
"e": 1227,
"s": 1147,
"text": "mysql> create table DemoTabe1 (Marks int);\nQuery OK, 0 rows affected (0.66 sec)"
},
{
"c... |
Finding n most frequent words from a sentence in JavaScript | For the purpose of this question, we define a sentence as a string that contains English alphabets and punctuations and a word is a substring of that sentence joined together by whitespaces.
We are required to write a JavaScript function that takes in a sentence string, str, as the first argument and a number, num, as ... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "For the purpose of this question, we define a sentence as a string that contains English alphabets and punctuations and a word is a substring of that sentence joined together by whitespaces."
},
{
"code": null,
"e": 1596,
"s": 1253,
... |
Cascade notation in Dart Programming | Cascade notation is used when we want to operate a sequence of operations on the same object. The cascade notation is denoted by the (..) symbol.
It is similar to method chaining that we have in other programming languages and it does save us plenty of steps and need of temporary variable.
Consider the following exampl... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "Cascade notation is used when we want to operate a sequence of operations on the same object. The cascade notation is denoted by the (..) symbol."
},
{
"code": null,
"e": 1353,
"s": 1208,
"text": "It is similar to method chaining tha... |
BitArray.LeftShift() Method in C# with Examples - GeeksforGeeks | 27 Mar, 2019
BitArray class manages a array of bit values, which are represented as Booleans, where true indicates bit is 1 and false indicates bit is 0. This class is contained in namespace, System.Collections. BitArray.LeftShift(Int32) method is used to shift the bits of the bit array to the left by one position and ... | [
{
"code": null,
"e": 24003,
"s": 23975,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 24428,
"s": 24003,
"text": "BitArray class manages a array of bit values, which are represented as Booleans, where true indicates bit is 1 and false indicates bit is 0. This class is containe... |
Python Modules | Consider a module to be the same as a code library.
A file containing a set of functions you want to include in your application.
To create a module just save the code you want in a file with the file extension .py:
Save this code in a file named mymodule.py
Now we can use the module we just created, by using the impor... | [
{
"code": null,
"e": 52,
"s": 0,
"text": "Consider a module to be the same as a code library."
},
{
"code": null,
"e": 130,
"s": 52,
"text": "A file containing a set of functions you want to include in your application."
},
{
"code": null,
"e": 216,
"s": 130,
... |
flush - Unix, Linux Command | flush [generic Postfix daemon options]
The record is implemented as a per-destination logfile with
as contents the queue IDs of deferred mail. A logfile is
append-only, and is truncated when delivery is requested
for the corresponding destination. A destination is the
part on the right-hand side of the right-most @ i... | [
{
"code": null,
"e": 10617,
"s": 10577,
"text": "flush [generic Postfix daemon options]\n"
},
{
"code": null,
"e": 10918,
"s": 10617,
"text": "\nThe record is implemented as a per-destination logfile with\nas contents the queue IDs of deferred mail. A logfile is\nappend-only, and... |
How to set automatic delay for ToolTip in C#? - GeeksforGeeks | 19 Jul, 2019
In Windows Forms, the ToolTip represents a tiny pop-up box which appears when you place your pointer or cursor on the control and the purpose of this control is it provides a brief description about the control present in the windows form. In ToolTip, you can set the automatic delay for the ToolTip using A... | [
{
"code": null,
"e": 25567,
"s": 25539,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 26102,
"s": 25567,
"text": "In Windows Forms, the ToolTip represents a tiny pop-up box which appears when you place your pointer or cursor on the control and the purpose of this control is it... |
Parsing | Set 1 (Introduction, Ambiguity and Parsers) - GeeksforGeeks | 12 Nov, 2021
In this article, we will study various types of parses. It is one of the most important topics in Compiler from a GATE point of view. The working of various parsers will be explained from a GATE question-solving point of view. Prerequisite β basic knowledge of grammars, parse trees, ambiguity.
In the syn... | [
{
"code": null,
"e": 25342,
"s": 25314,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 25639,
"s": 25342,
"text": "In this article, we will study various types of parses. It is one of the most important topics in Compiler from a GATE point of view. The working of various parser... |
Check if two numbers have same number of digits - GeeksforGeeks | 10 May, 2021
Given two integers A and B, the task is to check whether both the numbers have an equal number of digits.Examples:
Input: A = 12, B = 1 Output: NoInput: A = 20, B = 99 Output: Yes
Approach: While both the numbers are > 0, keep dividing both the numbers by 10. Finally, check if both the numbers are 0. I... | [
{
"code": null,
"e": 26563,
"s": 26535,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 26680,
"s": 26563,
"text": "Given two integers A and B, the task is to check whether both the numbers have an equal number of digits.Examples: "
},
{
"code": null,
"e": 26747,
... |
HTTPS in Node.js - GeeksforGeeks | 14 Oct, 2021
HTTP: When the data transfer in HTTP protocol it just travels in the clear text format. HTTPS: It simply makes encryption when the request is traveling from the browser to the web server so it is tough to sniff that information. It basically works on two things:
SSL (Secure Socket Layer)
TLS (Transport l... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n14 Oct, 2021"
},
{
"code": null,
"e": 26532,
"s": 26267,
"text": "HTTP: When the data transfer in HTTP protocol it just travels in the clear text format. HTTPS: It simply makes encryption when the request is traveling from the br... |
COUNTIF Function in Excel with Examples - GeeksforGeeks | 09 May, 2021
COUNTIF function in excel is used to count the number of cells that match a single condition applied. It can include Dates, Numbers, and Texts. It uses various logical operators like <(Less Than), >(Greater Than), >=(Greater Than or Equal to), <=(Less Than or Equal to), =(Equals to), and <>(NOT) for matchi... | [
{
"code": null,
"e": 24884,
"s": 24856,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 25271,
"s": 24884,
"text": "COUNTIF function in excel is used to count the number of cells that match a single condition applied. It can include Dates, Numbers, and Texts. It uses various log... |
The Kalman Filter: An algorithm for making sense of fused sensor insight | by Sharath Srinivasan | Towards Data Science | Youβre driving your car through a tunnel. The GPS signal is gone. Nevertheless, you might want to get notified that you should take the exit in the tunnel. How should we navigate on a car inside a tunnel, which should know where it is right now given only the last position?
Global Positioning System receivers calculate... | [
{
"code": null,
"e": 447,
"s": 172,
"text": "Youβre driving your car through a tunnel. The GPS signal is gone. Nevertheless, you might want to get notified that you should take the exit in the tunnel. How should we navigate on a car inside a tunnel, which should know where it is right now given only... |
How to predict a variable sinusoid in Python | by Angelica Lo Duca | Towards Data Science | This tutorial describes how to predict a variable sinusoid in Python. Firstly, some sinusoidal data are loaded from a CSV file. Then, data are shaped through a sinusoid curve. After that, linear regression is used to model the minimum and maximum peaks. Finally, the modeled lines are used to calculate the next peaks.
T... | [
{
"code": null,
"e": 366,
"s": 47,
"text": "This tutorial describes how to predict a variable sinusoid in Python. Firstly, some sinusoidal data are loaded from a CSV file. Then, data are shaped through a sinusoid curve. After that, linear regression is used to model the minimum and maximum peaks. Fi... |
Expressing numbers in expanded form - JavaScript | Suppose we are given a number 124 and are required to write a function that takes this number as input and returns its expanded form as a string.
The expanded form of 124 is β
'100+20+4'
Following is the code β
const num = 125;
const expandedForm = num => {
const numStr = String(num);
let res = '';
for(let i =... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "Suppose we are given a number 124 and are required to write a function that takes this number as input and returns its expanded form as a string."
},
{
"code": null,
"e": 1238,
"s": 1208,
"text": "The expanded form of 124 is β"
},
... |
DAX Time Intelligence - DATESQTD function | Returns a table that contains a column of the dates for the quarter to date, in the current context.
DATESQTD (<dates>)
dates
A column that contains dates.
A table containing a single column of date values.
The dates parameter can be any of the following β
A reference to a date/time column.
A reference to a date/time... | [
{
"code": null,
"e": 2102,
"s": 2001,
"text": "Returns a table that contains a column of the dates for the quarter to date, in the current context."
},
{
"code": null,
"e": 2123,
"s": 2102,
"text": "DATESQTD (<dates>) \n"
},
{
"code": null,
"e": 2129,
"s": 2123,
... |
Scala Collections - Array with Range | Use of range() method to generate an array containing a sequence of increasing integers in a given range. You can use final argument as step to create the sequence; if you do not use final argument, then step would be assumed as 1.
Let us take an example of creating an array of range (10, 20, 2): It means creating an a... | [
{
"code": null,
"e": 3114,
"s": 2882,
"text": "Use of range() method to generate an array containing a sequence of increasing integers in a given range. You can use final argument as step to create the sequence; if you do not use final argument, then step would be assumed as 1."
},
{
"code":... |
HTML <noscript> Tag - GeeksforGeeks | 17 Mar, 2022
The <noscript> tag in HTML is used to display the text for those browsers which does not support script tag or the browsers disable the script by the user. This tag is used in both <head> and <body> tag.
Note: This tag is used in those browsers only which does not support scripts.
Syntax:
<noscript> Cont... | [
{
"code": null,
"e": 23149,
"s": 23121,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 23353,
"s": 23149,
"text": "The <noscript> tag in HTML is used to display the text for those browsers which does not support script tag or the browsers disable the script by the user. This ta... |
How to remove a directory recursively using Python? | If you want to delete a folder containing all files and folders you want to remove, you can remove the folder(or tree) as follows:
>>> import shutil
>>> shutil.rmtree('my_folder') | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "If you want to delete a folder containing all files and folders you want to remove, you can remove the folder(or tree) as follows:"
},
{
"code": null,
"e": 1242,
"s": 1193,
"text": ">>> import shutil\n>>> shutil.rmtree('my_folder')"
... |
M-Coloring Problem | Practice | GeeksforGeeks | Given an undirected graph and an integer M. The task is to determine if the graph can be colored with at most M colors such that no two adjacent vertices of the graph are colored with the same color. Here coloring of a graph means the assignment of colors to all vertices. Print 1 if it is possible to colour vertices an... | [
{
"code": null,
"e": 561,
"s": 226,
"text": "Given an undirected graph and an integer M. The task is to determine if the graph can be colored with at most M colors such that no two adjacent vertices of the graph are colored with the same color. Here coloring of a graph means the assignment of colors... |
10 tricks for a better Google Colab experience | by Cyprien NIELLY | Towards Data Science | Colab is a great tool for coding. I use it very often, for a large set of tasks, from traditional Machine Learning to Deep Learning applications using PyTorch, TensorFlow or OpenCV. With Google Colab, creating and sharing notebooks is intuitive and simple π
Here are 10 tips and tricks I gathered over time that will he... | [
{
"code": null,
"e": 429,
"s": 171,
"text": "Colab is a great tool for coding. I use it very often, for a large set of tasks, from traditional Machine Learning to Deep Learning applications using PyTorch, TensorFlow or OpenCV. With Google Colab, creating and sharing notebooks is intuitive and simple... |
Understanding time complexity with Python examples | by Kelvin Salton do Prado | Towards Data Science | Nowadays, with all these data we consume and generate every single day, algorithms must be good enough to handle operations in large volumes of data.
In this post, we will understand a little more about time complexity, Big-O notation and why we need to be concerned about it when developing algorithms.
The examples sho... | [
{
"code": null,
"e": 321,
"s": 171,
"text": "Nowadays, with all these data we consume and generate every single day, algorithms must be good enough to handle operations in large volumes of data."
},
{
"code": null,
"e": 475,
"s": 321,
"text": "In this post, we will understand a l... |
MySQL - SHOW EVENTS Statement | A MySQL Event is nothing but a task that execute at a particular schedule. An event can contain one or more MySQL statements these statements are stored in the databases and gets executed at the specified schedule.
The SHOW EVENTS statement lists (information about) the events in the specified schema.
Following is the ... | [
{
"code": null,
"e": 2548,
"s": 2333,
"text": "A MySQL Event is nothing but a task that execute at a particular schedule. An event can contain one or more MySQL statements these statements are stored in the databases and gets executed at the specified schedule."
},
{
"code": null,
"e": 2... |
Concatenate strings from two fields into a third field in MongoDB? | To concatenate strings from two fields into a third field, you can use the following syntax
db.yourCollectionName.aggregate(
[
{ $project: { "yourNewFieldName": { $concat: [ "$yourFieldName1", " yourDellimiterValue ", "$yourFieldName2" ] } } }
]
);
Let us first create a collection with documents
>db.concate... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "To concatenate strings from two fields into a third field, you can use the following syntax"
},
{
"code": null,
"e": 1323,
"s": 1154,
"text": "db.yourCollectionName.aggregate(\n [\n { $project: { \"yourNewFieldName\": { $conca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.