title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Algorithm to generate positive rational numbers in Java | Rational Numbers − A number that is expressed in the form of p/q. Given the condition that p and q both should be integers and q should not be equal to 0.
Positive rational numbers are those numbers whose final values are positive. For this, either p and q both should be positive or p and q both should be negative.
In ... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "Rational Numbers − A number that is expressed in the form of p/q. Given the condition that p and q both should be integers and q should not be equal to 0."
},
{
"code": null,
"e": 1379,
"s": 1217,
"text": "Positive rational numbers a... |
How to use NLP to Analyze WhatsApp Messages | by Maarten Grootendorst | Towards Data Science | On 17 August 2018, I married the woman of my dreams and wanted to surprise her with a gift the day before the wedding. Of course, as a Data Scientist, I had to communicate that through data!
Our WhatsApp messages seemed like a great source of information. I used NLP to analyze the messages and created a small python pa... | [
{
"code": null,
"e": 363,
"s": 172,
"text": "On 17 August 2018, I married the woman of my dreams and wanted to surprise her with a gift the day before the wedding. Of course, as a Data Scientist, I had to communicate that through data!"
},
{
"code": null,
"e": 538,
"s": 363,
"tex... |
Python Tweepy – Getting the source of a tweet - GeeksforGeeks | 18 Jun, 2020
In this article we will see how we can get the source of a status/tweet. The source of the tweet tells us how the tweet was posted. Some examples of sources are :
Twitter for Android
Twitter for iPhone
Twitter Web App
The source attribute of the Status object provides us with the source of the status.
Iden... | [
{
"code": null,
"e": 25701,
"s": 25673,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 25864,
"s": 25701,
"text": "In this article we will see how we can get the source of a status/tweet. The source of the tweet tells us how the tweet was posted. Some examples of sources are :"... |
LocalDateTime plusMinutes() method in Java with Examples - GeeksforGeeks | 30 Nov, 2018
The plusMinutes() method of LocalDateTime class is used to return a copy of this date-time with the specified minutes added.
Syntax:
public LocalDateTime plusMinutes(long minutes)
Parameter: It accepts a single parameter minutes which specifies the minutes to add which may be negative.
Return Value: This ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n30 Nov, 2018"
},
{
"code": null,
"e": 25350,
"s": 25225,
"text": "The plusMinutes() method of LocalDateTime class is used to return a copy of this date-time with the specified minutes added."
},
{
"code": null,
"e": 2... |
Minimum number of operations required to reduce N to 1 - GeeksforGeeks | 23 Dec, 2021
Given an integer element ‘N’, the task is to find the minimum number of operations that need to be performed to make ‘N’ equal to 1. The allowed operations to be performed are:
Decrement N by 1.Increment N by 1.If N is a multiple of 3, you can divide N by 3.
Decrement N by 1.
Increment N by 1.
If N is a m... | [
{
"code": null,
"e": 26677,
"s": 26649,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 26855,
"s": 26677,
"text": "Given an integer element ‘N’, the task is to find the minimum number of operations that need to be performed to make ‘N’ equal to 1. The allowed operations to be p... |
p5.js | cursor() Function - GeeksforGeeks | 30 Oct, 2019
The cursor() function in p5.js is used to set the cursor to a predefined symbol or an image or it makes visible if already hidden. To set an image as the cursor, the recommended size is 16×16 or 32×32 pixels. The values for parameters x and y must be less than the dimensions of the image.
Syntax:
cursor(ty... | [
{
"code": null,
"e": 44937,
"s": 44909,
"text": "\n30 Oct, 2019"
},
{
"code": null,
"e": 45227,
"s": 44937,
"text": "The cursor() function in p5.js is used to set the cursor to a predefined symbol or an image or it makes visible if already hidden. To set an image as the cursor, t... |
Perl matching operator - GeeksforGeeks | 07 May, 2019
m operator in Perl is used to match a pattern within the given text. The string passed to m operator can be enclosed within any character which will be used as a delimiter to regular expressions.To print this matched pattern and the remaining string, m operator provides various operators which include $, w... | [
{
"code": null,
"e": 25315,
"s": 25287,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 25816,
"s": 25315,
"text": "m operator in Perl is used to match a pattern within the given text. The string passed to m operator can be enclosed within any character which will be used as a d... |
puts() vs printf() for printing a string - GeeksforGeeks | 27 May, 2021
In C, given a string variable str, which of the following two should be preferred to print it to stdout?
1) puts(str);
2) printf(str);
puts() can be preferred for printing a string because it is generally less expensive (implementation of puts() is generally simpler than printf()), and if the string has f... | [
{
"code": null,
"e": 25759,
"s": 25731,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 25865,
"s": 25759,
"text": "In C, given a string variable str, which of the following two should be preferred to print it to stdout? "
},
{
"code": null,
"e": 25879,
"s": 2586... |
C# | How to change Title of the Console - GeeksforGeeks | 28 Jan, 2019
Given the normal Console in C#, the task is to find the default value of Title and change it to something else.
Approach: This can be done using the Title property in the Console class of the System package in C#. The title refers to the string to be displayed in the title bar of the console. The maximum l... | [
{
"code": null,
"e": 26802,
"s": 26774,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 26914,
"s": 26802,
"text": "Given the normal Console in C#, the task is to find the default value of Title and change it to something else."
},
{
"code": null,
"e": 27398,
"s"... |
Circular tour | Practice | GeeksforGeeks | Suppose there is a circle. There are N petrol pumps on that circle. You will be given two sets of data.
1. The amount of petrol that every petrol pump has.
2. Distance from that petrol pump to the next petrol pump.
Find a starting point where the truck can start to get through the complete circle without exhausting its... | [
{
"code": null,
"e": 650,
"s": 238,
"text": "Suppose there is a circle. There are N petrol pumps on that circle. You will be given two sets of data.\n1. The amount of petrol that every petrol pump has.\n2. Distance from that petrol pump to the next petrol pump.\nFind a starting point where the truck... |
Java Program to Use Exceptions with Thread - GeeksforGeeks | 01 Dec, 2020
Exceptions are the events that occur due to the programmer error or machine error which causes a disturbance in the normal flow of execution of the program. When a method encounters an abnormal condition that it can not handle, an exception is thrown as an exception statement. Exceptions are caught by hand... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n01 Dec, 2020"
},
{
"code": null,
"e": 26053,
"s": 25347,
"text": "Exceptions are the events that occur due to the programmer error or machine error which causes a disturbance in the normal flow of execution of the program. When a... |
What is the difference between a list and an array in C#? | An array stores a fixed-size sequential collection of elements of the same type, whereas list is a generic collection.
To define a List −
List<string7gt; myList = new List<string>();
To set elements in a list, you need to use the Add method −
myList.Add("Audi");
myList.Add("BMW");
myList.Add("Chevrolet");
myList.Add("H... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "An array stores a fixed-size sequential collection of elements of the same type, whereas list is a generic collection."
},
{
"code": null,
"e": 1200,
"s": 1181,
"text": "To define a List −"
},
{
"code": null,
"e": 1245,
... |
CSS - margin-top | The margin-top property sets the width of the margin on the top of an element.
length − Any length value.
length − Any length value.
percentage − The margin's width is calculated with respect to the width of the element's containing block.
percentage − The margin's width is calculated with respect to the width of the e... | [
{
"code": null,
"e": 2705,
"s": 2626,
"text": "The margin-top property sets the width of the margin on the top of an element."
},
{
"code": null,
"e": 2732,
"s": 2705,
"text": "length − Any length value."
},
{
"code": null,
"e": 2759,
"s": 2732,
"text": "lengt... |
Sorting string characters by frequency in JavaScript | We are required to write a JavaScript function that takes in the string of characters as the only argument.
Our function should prepare and a new string based on the original string in which the characters that appear for most number of times are placed first followed by number with decreasing frequencies.
For example,... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in the string of characters as the only argument."
},
{
"code": null,
"e": 1370,
"s": 1170,
"text": "Our function should prepare and a new string based on the original string ... |
How to Deploy a Telegram Bot using Heroku for FREE | by Haohui | Towards Data Science | Running your telegram bot locally suffices for simple applications. However, if you wanted to scale up your bot and enable others to use your bot even when you are not running the bot locally, you will need to go one step further to deploy the bot.
In this tutorial, I will be going through how to deploy a telegram bot ... | [
{
"code": null,
"e": 420,
"s": 171,
"text": "Running your telegram bot locally suffices for simple applications. However, if you wanted to scale up your bot and enable others to use your bot even when you are not running the bot locally, you will need to go one step further to deploy the bot."
},
... |
10 Of My Favorite Python Decorators | by Emmett Boudreau | Towards Data Science | If there is one thing that really fascinates me in computing, it is programming languages. Programming languages are interesting to me because of what they actually are, merely just an abstraction layer from the hardware. And the way that us humans have found to interact with the hardware from these abstraction layers ... | [
{
"code": null,
"e": 835,
"s": 47,
"text": "If there is one thing that really fascinates me in computing, it is programming languages. Programming languages are interesting to me because of what they actually are, merely just an abstraction layer from the hardware. And the way that us humans have fo... |
Ruby | Keywords - GeeksforGeeks | 26 Oct, 2018
Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects or as constants. Doing this may result in compile-time error.
Example:
# Ruby program to illustrate ... | [
{
"code": null,
"e": 23706,
"s": 23678,
"text": "\n26 Oct, 2018"
},
{
"code": null,
"e": 23975,
"s": 23706,
"text": "Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not ... |
Loop Optimization in Compiler Design - GeeksforGeeks | 21 Nov, 2019
Loop Optimization is the process of increasing execution speed and reducing the overheads associated with loops. It plays an important role in improving cache performance and making effective use of parallel processing capabilities. Most execution time of a scientific program is spent on loops.
Loop Optimi... | [
{
"code": null,
"e": 24096,
"s": 24068,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 24392,
"s": 24096,
"text": "Loop Optimization is the process of increasing execution speed and reducing the overheads associated with loops. It plays an important role in improving cache perf... |
C | Structure & Union | Question 4 - GeeksforGeeks | 28 Jun, 2021
Consider the following C declaration
struct { short s[5]; union { float y; long z; }u; } t;
Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is (GAT... | [
{
"code": null,
"e": 23934,
"s": 23906,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 23971,
"s": 23934,
"text": "Consider the following C declaration"
},
{
"code": "struct { short s[5]; union { float y; long z; }u; } t;",
"e": 24055,
... |
rmdir - Unix, Linux Command | rmdir - remove empty directories
rmdir [OPTION]... DIRECTORY...
Remove the DIRECTORY(ies), if they are empty.
Example-1:
rmdir command will delete the empty directories. i.e directory without any sub-directories or files:
$ rmdir test
Example-2:
To Delete Nested Empty Directories in Linux:
$ rmdir -p dir1/dir2/dir3
... | [
{
"code": null,
"e": 10610,
"s": 10577,
"text": "rmdir - remove empty directories"
},
{
"code": null,
"e": 10641,
"s": 10610,
"text": "rmdir [OPTION]... DIRECTORY..."
},
{
"code": null,
"e": 10688,
"s": 10641,
"text": "Remove the DIRECTORY(ies), if they are em... |
Kubernetes - Taint and Toleration - GeeksforGeeks | 18 Oct, 2021
A pod is a group of one or more containers and is the smallest deployable unit in Kubernetes. A node is a representation of a single machine in a cluster (we can simply view these machines as a set of CPU and RAM). A node can be a virtual machine, physical machine in a data center hosted on a cloud provid... | [
{
"code": null,
"e": 24571,
"s": 24543,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 24894,
"s": 24571,
"text": "A pod is a group of one or more containers and is the smallest deployable unit in Kubernetes. A node is a representation of a single machine in a cluster (we can ... |
D3.js | Path.moveTo() Function - GeeksforGeeks | 11 Apr, 2022
D3.js is mostly used for making of graph and visualizing data on the HTML svg elements. D3 somehow is related to Data Driven Documents. The Path.moveTo() function is used to move a point inside the svg element. This library is also capable enough to draw simulations, 2D graphs and 3D graphs and used for pr... | [
{
"code": null,
"e": 25535,
"s": 25507,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 25996,
"s": 25535,
"text": "D3.js is mostly used for making of graph and visualizing data on the HTML svg elements. D3 somehow is related to Data Driven Documents. The Path.moveTo() function ... |
Analysis of Different Methods to find Prime Number in Python - GeeksforGeeks | 30 Jun, 2021
If you participate in competitive programming, you might be familiar with the fact that questions related to Prime numbers are one of the choices of the problem setter. Here, we will discuss how to optimize your function which checks for the Prime number in the given set of ranges, and will also calculate ... | [
{
"code": null,
"e": 26403,
"s": 26375,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 26739,
"s": 26403,
"text": "If you participate in competitive programming, you might be familiar with the fact that questions related to Prime numbers are one of the choices of the problem se... |
AWT Button Class | Button is a control component that has a label and generates an event when pressed. When a button is pressed and released, AWT sends an instance of ActionEvent to the button, by calling processEvent on the button. The button's processEvent method receives all events for the button; it passes an action event along by ca... | [
{
"code": null,
"e": 2253,
"s": 1747,
"text": "Button is a control component that has a label and generates an event when pressed. When a button is pressed and released, AWT sends an instance of ActionEvent to the button, by calling processEvent on the button. The button's processEvent method receiv... |
Armstrong Numbers between two integers - GeeksforGeeks | 27 Apr, 2021
A positive integer with digits a, b, c, d... is called an Armstrong number of order n if following condition is satisfied.
abcd... = an + bn + cn + dn +...
153 = 1*1*1 + 5*5*5 + 3*3*3
= 1 + 125 + 27
= 153
Therefore, 153 is an Armstrong number.
Examples:
Input : 100 400
Output :153... | [
{
"code": null,
"e": 26680,
"s": 26652,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 26805,
"s": 26680,
"text": "A positive integer with digits a, b, c, d... is called an Armstrong number of order n if following condition is satisfied. "
},
{
"code": null,
"e": 2... |
Analysis of Algorithms | Big-O analysis - GeeksforGeeks | 06 Mar, 2021
In our previous articles on Analysis of Algorithms, we had discussed asymptotic notations, their worst and best case performance etc. in brief. In this article, we discuss the analysis of the algorithm using Big – O asymptotic notation in complete detail.
Big-O Analysis of Algorithms
We can express algor... | [
{
"code": null,
"e": 26031,
"s": 26003,
"text": "\n06 Mar, 2021"
},
{
"code": null,
"e": 26288,
"s": 26031,
"text": "In our previous articles on Analysis of Algorithms, we had discussed asymptotic notations, their worst and best case performance etc. in brief. In this article, we... |
Python - Place object in Tweepy - GeeksforGeeks | 03 Jul, 2020
Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte... | [
{
"code": null,
"e": 25791,
"s": 25763,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 26191,
"s": 25791,
"text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data ... |
What are the advantages of Lambda Expressions in Java?
| A lambda expression is an inline code that implements a functional interface without creating a concrete or anonymous class. A lambda expression is basically an anonymous method.
Fewer Lines of Code − One of the most benefits of a lambda expression is to reduce the amount of code. We know that lambda expressions can be... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "A lambda expression is an inline code that implements a functional interface without creating a concrete or anonymous class. A lambda expression is basically an anonymous method."
},
{
"code": null,
"e": 1515,
"s": 1241,
"text": "Few... |
Train a GAN and generate faces using AWS Sagemaker | PyTorch | by Shyam BV | Towards Data Science | I assume you have already heard or worked on GAN. If you have not heard before, then Generative Adversarial Networks(GAN) is one type of neural network architecture that allows us to create synthetic data, images or videos. It has become an interesting subfield in deep learning. Some of the different types of GAN’s are... | [
{
"code": null,
"e": 629,
"s": 171,
"text": "I assume you have already heard or worked on GAN. If you have not heard before, then Generative Adversarial Networks(GAN) is one type of neural network architecture that allows us to create synthetic data, images or videos. It has become an interesting su... |
C++ Program for Deadlock free condition in Operating Systems | Given with the P number of processes in the memory and N number of needed resources by them to complete their execution and the task is to find the minimum number of resources R which should be allotted to the processes such that deadlock will never occur.
Deadlock is situation in an operating system where multiple pro... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "Given with the P number of processes in the memory and N number of needed resources by them to complete their execution and the task is to find the minimum number of resources R which should be allotted to the processes such that deadlock will never occ... |
Using combination of “AND” and “OR” in SELECT in ABAP | You can use the following query:
SELECT * FROM my_table
WHERE condition 1
AND condition 2
AND ( id EQ '2' or id EQ ‘3’ ).
Note: There should be space after and before bracket.
Alternatively you can use IN statement as below:
SELECT * FROM my_table
WHERE condition 1
AND condition 2
AND EQ IN ('2', ‘3’ ). | [
{
"code": null,
"e": 1095,
"s": 1062,
"text": "You can use the following query:"
},
{
"code": null,
"e": 1184,
"s": 1095,
"text": "SELECT * FROM my_table\nWHERE condition 1\nAND condition 2\nAND ( id EQ '2' or id EQ ‘3’ )."
},
{
"code": null,
"e": 1238,
"s": 1184,... |
MySQL - DATE_FORMAT() Function | The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the specified time. MySQL provides a set of functions to manipulate the... | [
{
"code": null,
"e": 2664,
"s": 2333,
"text": "The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the ... |
How to extract email id from text using Python regular expression? | The following code using Python regex extracts the email id from given string/text
import re
s ='manogna@tutorialspoint.com56'
result =re.findall('[a-zA-Z0-9]\S*@\S*[a-zA-Z]', s)
print result
This gives the output
['manogna@tutorialspoint.com'] | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "The following code using Python regex extracts the email id from given string/text"
},
{
"code": null,
"e": 1254,
"s": 1145,
"text": "import re\ns ='manogna@tutorialspoint.com56'\nresult =re.findall('[a-zA-Z0-9]\\S*@\\S*[a-zA-Z]', s)... |
Numbers within a range that can be expressed as power of two numbers - GeeksforGeeks | 24 Apr, 2018
Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be perfect power if there exists some integers a > 0, p > 1 such that x = ap.
Examples :
Input : 1 4
Output : 2
Explanation :
Suitable numbers are 1 and 4 where 1
can be expressed as 1 = 12
and ... | [
{
"code": null,
"e": 24615,
"s": 24587,
"text": "\n24 Apr, 2018"
},
{
"code": null,
"e": 24804,
"s": 24615,
"text": "Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be perfect power if there exists some integers a > 0... |
Transform Perl Arrays to Strings | We can use the join() function in Perl to rejoin the array elements and form one long scalar string. This function has the following syntax −
join EXPR, LIST
This function joins the separate strings of LIST into a single string with fields separated by the value of EXPR and returns the string. Following is the example ... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "We can use the join() function in Perl to rejoin the array elements and form one long scalar string. This function has the following syntax −"
},
{
"code": null,
"e": 1220,
"s": 1204,
"text": "join EXPR, LIST"
},
{
"code": nu... |
Smallest missing non-negative integer upto every array index - GeeksforGeeks | 10 Nov, 2021
Given an array arr[] of size N, the task is for every array indices is to find the smallest missing non-negative integer upto that index of the given array.
Examples:
Input: arr[] = {1, 3, 0, 2}Output: 0 0 2 4Explanation:Smallest missing non-negative integer from index 0 to 0 is 0.Smallest missing non-nega... | [
{
"code": null,
"e": 24847,
"s": 24819,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 25004,
"s": 24847,
"text": "Given an array arr[] of size N, the task is for every array indices is to find the smallest missing non-negative integer upto that index of the given array."
},
... |
Default to and select the first item in Tkinter Listbox | Tkinter Listbox widgets are used to display a scrollable list of items with vertically stacked menus. Sometimes, we may need to set the list item selected, by default. We can use the select_set(list_item_index) method by specifying the index of the list items that need to be selected by default.
So, let us suppose that... | [
{
"code": null,
"e": 1359,
"s": 1062,
"text": "Tkinter Listbox widgets are used to display a scrollable list of items with vertically stacked menus. Sometimes, we may need to set the list item selected, by default. We can use the select_set(list_item_index) method by specifying the index of the list... |
What is the difference between All and Any in C# Linq? | Any(<predicate>) method returns true if at least one of the elements in the source sequence matches the provided predicate. Otherwise, it returns false. On the other hand, the All(<predicate>) method returns true if every element in the source sequence matches the provided predicate. Otherwise, it returns false
static ... | [
{
"code": null,
"e": 1375,
"s": 1062,
"text": "Any(<predicate>) method returns true if at least one of the elements in the source sequence matches the provided predicate. Otherwise, it returns false. On the other hand, the All(<predicate>) method returns true if every element in the source sequence ... |
ReactJS – shouldComponentUpdate() method | In this article, we are going to see how to increase the performance of React application by rerendering the component only when the props passed to it changes or on when certain conditions are met.
This method is majorly used to take an exit from the complex React lifecycle, but using it extensively may lead to bugs i... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "In this article, we are going to see how to increase the performance of React application by rerendering the component only when the props passed to it changes or on when certain conditions are met."
},
{
"code": null,
"e": 1401,
"s": 12... |
Using Bayesian Hierarchical Models in PyMC3 to Infer the Disease Parameters of COVID-19 | by Srijith Rajamohan, Ph.D. | Towards Data Science | In this post, we look at how to use PyMC3 to infer the disease parameters for COVID-19. PyMC3 is a popular probabilistic programming framework that is used for Bayesian modeling. Two popular methods to accomplish this are the Markov Chain Monte Carlo (MCMC) and Variational Inference methods. The work here looks at usin... | [
{
"code": null,
"e": 989,
"s": 171,
"text": "In this post, we look at how to use PyMC3 to infer the disease parameters for COVID-19. PyMC3 is a popular probabilistic programming framework that is used for Bayesian modeling. Two popular methods to accomplish this are the Markov Chain Monte Carlo (MCM... |
Difference between HashMap and ConcurrentHashMap in Java | Following are the notable differences between HashMap and ConcurrentHashMap classes in Java.
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Tester {
public static void main(String[] args) {
List<String> arrayList = ne... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Following are the notable differences between HashMap and ConcurrentHashMap classes in Java."
},
{
"code": null,
"e": 2402,
"s": 1155,
"text": "import java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport j... |
Constructors in C++ - GeeksQuiz | 02 Dec, 2021
Predict output of the following program
C
ew_c_questiongeeksforgeeks
new_c_quesgeeksforgeeks
geeksforgeeks
Depends on terminal configuration
See http://stackoverflow.com/questions/17236242/usage-of-b-and-r-in-c
Output of following program?
C++
Compiler Error
Constructor called
None of these
Runtime E... | [
{
"code": null,
"e": 27219,
"s": 27191,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 27260,
"s": 27219,
"text": "Predict output of the following program "
},
{
"code": null,
"e": 27262,
"s": 27260,
"text": "C"
},
{
"code": null,
"e": 27290,
... |
Can we synchronize abstract methods in Java? | An abstract method is the one that does not have a body. It contains only a method signature with a semi colon and, an abstract keyword before it.
public abstract myMethod();
To use an abstract method, you need to inherit it by extending its class and provide implementation (body) to it. If a class contains at least on... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "An abstract method is the one that does not have a body. It contains only a method signature with a semi colon and, an abstract keyword before it."
},
{
"code": null,
"e": 1237,
"s": 1209,
"text": "public abstract myMethod();"
},
... |
Deploying Keras models using TensorFlow Serving and Flask | by Himanshu Rawlani | Towards Data Science | Often there’s a need to abstract away your machine learning model details and just deploy or integrate it with easy to use API endpoints. For eg., We can provide a URL endpoint using which anyone can make a POST request and they would get a JSON response of what the model has inferred without having to worry about its ... | [
{
"code": null,
"e": 508,
"s": 172,
"text": "Often there’s a need to abstract away your machine learning model details and just deploy or integrate it with easy to use API endpoints. For eg., We can provide a URL endpoint using which anyone can make a POST request and they would get a JSON response ... |
How to start Service using Alarmmanager in Kotlin Android? | This example demonstrates how to start Service using Alarmmanager in Kotlin 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"?>
<L... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrates how to start Service using Alarmmanager in Kotlin Android."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required d... |
Efficient Use of TigerGraph and Docker | by David Baker Effendi | Towards Data Science | TigerGraph is my graph database and graph analytics platform of choice as it is fast, scalable, and has an active open-source community. I regularly make use of TigerGraph locally due to my location not having nearby TigerGraph Cloud servers.
At the time of writing, the TigerGraph software requirements specify support ... | [
{
"code": null,
"e": 415,
"s": 172,
"text": "TigerGraph is my graph database and graph analytics platform of choice as it is fast, scalable, and has an active open-source community. I regularly make use of TigerGraph locally due to my location not having nearby TigerGraph Cloud servers."
},
{
... |
Merge Pandas dataframe with a common column and set NaN for unmatched values | To merge two Pandas DataFrame with common column, use the merge() function and set the ON parameter as the column name. To set NaN for unmatched values, use the “how” parameter and set it left or right. That would mean, merging left or right.
At first, let us import the pandas library with an alias −
import pandas as p... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "To merge two Pandas DataFrame with common column, use the merge() function and set the ON parameter as the column name. To set NaN for unmatched values, use the “how” parameter and set it left or right. That would mean, merging left or right."
},
{
... |
Playlist Classification on Spotify using KNN and Naive Bayes Classifier | by Nev Acar | Towards Data Science | One day, I thought it would be cool if Spotify helped me pick a playlist when I like a song. The idea is to touch on the plus button when my phone is locked and Spotify add it into one of my playlists rather than library so that I don’t go into the app and try to pick a playlist that it suits well. This way, I wouldn’t... | [
{
"code": null,
"e": 827,
"s": 172,
"text": "One day, I thought it would be cool if Spotify helped me pick a playlist when I like a song. The idea is to touch on the plus button when my phone is locked and Spotify add it into one of my playlists rather than library so that I don’t go into the app an... |
Finding frequency in list of tuples in Python | Many different types of data container can get mixed up in python. A list can have elements each of which is a tuple. In this article we will take such a list and find the frequency of element in the tuples which are themselves elements of a list.
We apply a lambda function to count through each of the first element in... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "Many different types of data container can get mixed up in python. A list can have elements each of which is a tuple. In this article we will take such a list and find the frequency of element in the tuples which are themselves elements of a list."
},... |
Delimiters in MySQL? | Delimiters can be used when you need to define the stored procedures, function as well as to create triggers. The default delimiter is semicolon.
You can change the delimiters to create procedures and so on. However, but if you are considering multiple statements, then you need to use different delimiters like $$ or //... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "Delimiters can be used when you need to define the stored procedures, function as well as to create triggers. The default delimiter is semicolon."
},
{
"code": null,
"e": 1384,
"s": 1208,
"text": "You can change the delimiters to cre... |
LeafletJS - Getting Started | Leaflet.js is an open-source library using which we can deploy simple, interactive, lightweight web maps.
Leaflet JavaScript library allows you to use layers such as Tile layers, WMS, Markers, Popups, Vector layers (polylines, polygons, circles, etc.), Image overlays and GeoJSON.
Leaflet JavaScript library allows you t... | [
{
"code": null,
"e": 1904,
"s": 1798,
"text": "Leaflet.js is an open-source library using which we can deploy simple, interactive, lightweight web maps."
},
{
"code": null,
"e": 2079,
"s": 1904,
"text": "Leaflet JavaScript library allows you to use layers such as Tile layers, WMS... |
Query deeply nested Objects in MongoDB | To query deeply nested objects, use dot(.) notation in MongoDB. Let us create a collection with documents −
> db.demo350.insertOne(
... {
... id:101,
... Name: "Chris",
... details: [
... {
... _id: 1,
... ClientNumber: "10001",
... ClientDetails: [
.
... {
... ... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "To query deeply nested objects, use dot(.) notation in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 2187,
"s": 1170,
"text": "> db.demo350.insertOne(\n... {\n... id:101,\n... Name: \"Chris\",\n.... |
Combine date and time column into a timestamp in MySQL? | To combine date and time column into a timestamp, you can use cast() function with concat().
The syntax is as follows −
select cast(concat(yourDateColumnName, ' ', yourTimeColumnName) as datetime) as anyVariableName from yourTableName;
In the above concept, you will use cast() when your date and time is in string forma... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To combine date and time column into a timestamp, you can use cast() function with concat()."
},
{
"code": null,
"e": 1182,
"s": 1155,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1298,
"s": 1182,
... |
Assignment Operators in C | The following table lists the assignment operators supported by the C language −
Try the following example to understand all the assignment operators available in C −
#include <stdio.h>
main() {
int a = 21;
int c ;
c = a;
printf("Line 1 - = Operator Example, Value of c = %d\n", c );
c += a;
pri... | [
{
"code": null,
"e": 2165,
"s": 2084,
"text": "The following table lists the assignment operators supported by the C language −"
},
{
"code": null,
"e": 2251,
"s": 2165,
"text": "Try the following example to understand all the assignment operators available in C −"
},
{
"... |
Python Program to Count the Number of Occurrences of an Element in the Linked List without using Recursion | When it is required to count the number of occurrences of a specific element in a linked list without using recursion, a method to add elements to the linked list, a method to display the elements of the linked list, and a method to count the occurrences of a value are defined.
Below is a demonstration for the same −
... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "When it is required to count the number of occurrences of a specific element in a linked list without using recursion, a method to add elements to the linked list, a method to display the elements of the linked list, and a method to count the occurrence... |
C++ | Inheritance | Question 7 - GeeksforGeeks | 28 Jun, 2021
#include<iostream>using namespace std; class Base{public: void show() { cout<<" In Base "; }}; class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }}; int main(void){ Base *bp, b; Derived d; bp = &... | [
{
"code": null,
"e": 23851,
"s": 23823,
"text": "\n28 Jun, 2021"
},
{
"code": "#include<iostream>using namespace std; class Base{public: void show() { cout<<\" In Base \"; }}; class Derived: public Base{public: int x; void show() { cout<<\"In Derived \"; ... |
Materialize - Quick Guide | Materialize is a UI component library created with CSS, JavaScript, and HTML. Materialize reusable UI components help in constructing attractive, consistent, and functional web pages and web apps while adhering to modern web design principles such as browser portability, device independence, and graceful degradation.
S... | [
{
"code": null,
"e": 2506,
"s": 2187,
"text": "Materialize is a UI component library created with CSS, JavaScript, and HTML. Materialize reusable UI components help in constructing attractive, consistent, and functional web pages and web apps while adhering to modern web design principles such as br... |
Math.Atan2() Method in C# | The Math.Atan2() method in C# is used to return the angle whose tangent is the quotient of two specified numbers.
Following is the syntax −
public static double Atan2 (double val1, double val2);
Above, val1 is the y coordinate, whereas val2 is the x coordinate.
Let us now see an example to implement Math.Atan2() method... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "The Math.Atan2() method in C# is used to return the angle whose tangent is the quotient of two specified numbers."
},
{
"code": null,
"e": 1202,
"s": 1176,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1257,... |
How to convert an array to Set and vice versa in Java? | Array is a container which can hold a fix number of entities, which are of the same type. Each entity of an array is known as element and, the position of each element is indicated by an integer (starting from 0) value known as index.
import java.util.Arrays;
public class ArrayExample {
public static void main(Strin... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "Array is a container which can hold a fix number of entities, which are of the same type. Each entity of an array is known as element and, the position of each element is indicated by an integer (starting from 0) value known as index."
},
{
"cod... |
Types of Sorting Algorithm in R Programming - GeeksforGeeks | 17 Jun, 2021
There are multiple ways by which data can be sorted in the R language. It’s up to the data Analyst to consider the most suitable method based upon the structure of the data. There are multiple algorithms for performing sorting on the data in the R programming language. Below different types of sorting func... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 27057,
"s": 26597,
"text": "There are multiple ways by which data can be sorted in the R language. It’s up to the data Analyst to consider the most suitable method based upon the structure of... |
HTML | DOM Input Email Placeholder Property - GeeksforGeeks | 16 Apr, 2019
The DOM Input Email Placeholder Property is used to set or return the value of a placeholder attribute of an Email Field. The placeholder attribute specifies a short hint that describes the expected value of a input field / textarea. The short hint is displayed in the field before the user enters a value.
... | [
{
"code": null,
"e": 26544,
"s": 26516,
"text": "\n16 Apr, 2019"
},
{
"code": null,
"e": 26851,
"s": 26544,
"text": "The DOM Input Email Placeholder Property is used to set or return the value of a placeholder attribute of an Email Field. The placeholder attribute specifies a sho... |
First negative integer in every window of size k | Practice | GeeksforGeeks | Given an array A[] of size N and a positive integer K, find the first negative integer for each and every window(contiguous subarray) of size K.
Example 1:
Input :
N = 5
A[] = {-8, 2, 3, -6, 10}
K = 2
Output :
-8 0 -6 -6
Explanation :
First negative integer for each window of size k
{-8, 2} = -8
{2, 3} = 0 (does no... | [
{
"code": null,
"e": 383,
"s": 238,
"text": "Given an array A[] of size N and a positive integer K, find the first negative integer for each and every window(contiguous subarray) of size K."
},
{
"code": null,
"e": 396,
"s": 385,
"text": "Example 1:"
},
{
"code": null,
... |
Packaging in Python: Tools and Formats | by Martin Thoma | Towards Data Science | A virtual environment is an isolated Python environment. It has it’s own installed site-packages which can be different from the systems site-packages. Don’t worry, we will go into more detail later.
After reading this article, you will understand what the following tools are and which problems they solve: pip, pyenv, ... | [
{
"code": null,
"e": 371,
"s": 171,
"text": "A virtual environment is an isolated Python environment. It has it’s own installed site-packages which can be different from the systems site-packages. Don’t worry, we will go into more detail later."
},
{
"code": null,
"e": 636,
"s": 371,... |
TypeScript class - GeeksforGeeks | 14 Nov, 2019
In terms of OOPs(Object Oriented Programming), a class is a blueprint which is used for creating objects. A class is a collection of objects having common properties.It contains methods,constructors,blocks,nested classes,interfaces etc. Objects are basically the entities that have some properties like an o... | [
{
"code": null,
"e": 25829,
"s": 25801,
"text": "\n14 Nov, 2019"
},
{
"code": null,
"e": 26455,
"s": 25829,
"text": "In terms of OOPs(Object Oriented Programming), a class is a blueprint which is used for creating objects. A class is a collection of objects having common properti... |
Tryit Editor v3.7 | Tryit: Using the var() function | [] |
How To Collaborate On Your Locally Hosted Jupyter Notebook | by Kurtis Pykes | Towards Data Science | Some while back I received a call from a good friend that is learning about Data Science and wanted some help. As we are often taught about Jupyter Notebooks when learning Data Science, it was not surprise that he was using a Jupyter Notebook, but this instantly stomped me. How are we going to collaborate on a Notebook... | [
{
"code": null,
"e": 494,
"s": 172,
"text": "Some while back I received a call from a good friend that is learning about Data Science and wanted some help. As we are often taught about Jupyter Notebooks when learning Data Science, it was not surprise that he was using a Jupyter Notebook, but this in... |
Building an ETL pipeline with Airflow and ECS | by Daniel Da Costa | Towards Data Science | ETL is an automated process that takes raw data, extracts and transforms the information required for analysis, and loads it to a data warehouse. There are different ways to build your ETL pipeline, on this post we’ll be using three main tools:
Airflow: one of the most powerful platforms used by Data Engineers for orch... | [
{
"code": null,
"e": 417,
"s": 172,
"text": "ETL is an automated process that takes raw data, extracts and transforms the information required for analysis, and loads it to a data warehouse. There are different ways to build your ETL pipeline, on this post we’ll be using three main tools:"
},
{
... |
JavaScript | Text Formatting - GeeksforGeeks | 05 Jun, 2020
JavaScript has many inbuilt features to format the text. Texts are the strings in javascript. There are many formatting styles like making text uppercase, lowercase, bold, italic. Each formatting style is given below with the example.
Making text UpperCase: It is used to convert the string to uppercase.
Ja... | [
{
"code": null,
"e": 24488,
"s": 24460,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 24723,
"s": 24488,
"text": "JavaScript has many inbuilt features to format the text. Texts are the strings in javascript. There are many formatting styles like making text uppercase, lowercas... |
Cells with Odd Values in a Matrix in C++ | Suppose there are n and m which are the dimensions of a matrix. These are initialized by zeros. And indices are given where indices[i] = [ri, ci]. For each pair of [ri, ci] we have to increment all cells in row ri and column ci by 1. The output will be the number of cells with odd values in the matrix after applying th... | [
{
"code": null,
"e": 1410,
"s": 1062,
"text": "Suppose there are n and m which are the dimensions of a matrix. These are initialized by zeros. And indices are given where indices[i] = [ri, ci]. For each pair of [ri, ci] we have to increment all cells in row ri and column ci by 1. The output will be ... |
What is the difference between MySQL TINYINT(2) vs TINYINT(1)? | The number 2 and 1 in TINYINT(2) vs TINYINT(1) indicate the display width. There is no difference between tinyint(1) and tinyint(2) except the width.
If you use tinyint(2) or even tinyint(1), the difference is the same. You can understand the above concept using zerofill option.
tinyint(1) zerofill
tinyint(2) zerofill
... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "The number 2 and 1 in TINYINT(2) vs TINYINT(1) indicate the display width. There is no difference between tinyint(1) and tinyint(2) except the width."
},
{
"code": null,
"e": 1342,
"s": 1212,
"text": "If you use tinyint(2) or even ti... |
Default flow of traffic (ASA) - GeeksforGeeks | 22 Nov, 2021
Prerequisite – Adaptive security appliance (ASA) ASA is a Cisco security device that can perform a firewall capability with VPN capabilities, routing support, antivirus capability, and many other features.
Security levels – ASA uses a security level associated with a routable interface. Remember, the ASA ... | [
{
"code": null,
"e": 24461,
"s": 24433,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 24668,
"s": 24461,
"text": "Prerequisite – Adaptive security appliance (ASA) ASA is a Cisco security device that can perform a firewall capability with VPN capabilities, routing support, anti... |
A Gentle Implementation of Reinforcement Learning in Pairs Trading | by Wai | Towards Data Science | This covers topics from concepts to implementation of RL in cointegration pair trading based on 1-minute stock market data. For the Reinforcement Learning here we use the N-armed bandit approach. The code is expandable so you can plug any strategies, data API or machine learning algorithms into the tool if you follow t... | [
{
"code": null,
"e": 501,
"s": 171,
"text": "This covers topics from concepts to implementation of RL in cointegration pair trading based on 1-minute stock market data. For the Reinforcement Learning here we use the N-armed bandit approach. The code is expandable so you can plug any strategies, data... |
Tryit Editor v3.7 | Tryit: HTML table headers | [] |
C/C++ Program for Maximum height when coins are arranged in a triangle? | In this section, we will see one interesting problem. There are N coins. we have to find what is the max height we can make if we arrange the coins as pyramid. In this fashion, the first row will hold 1 coin, second will hold 2 coins and so on.
In the given diagram, we can see to make a pyramid of height three we need ... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "In this section, we will see one interesting problem. There are N coins. we have to find what is the max height we can make if we arrange the coins as pyramid. In this fashion, the first row will hold 1 coin, second will hold 2 coins and so on."
},
... |
Java Regex - Example - Character \\ Match | The character \\ matches the backslash character present in a text.
The following example shows the usage of character matching.
package com.tutorialspoint;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CharactersDemo {
private static final String REGEX = "\\";
private static fina... | [
{
"code": null,
"e": 2192,
"s": 2124,
"text": "The character \\\\ matches the backslash character present in a text."
},
{
"code": null,
"e": 2253,
"s": 2192,
"text": "The following example shows the usage of character matching."
},
{
"code": null,
"e": 2858,
"s":... |
Boolean Indexing in Pandas | Boolean indexing helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a boolean index to use the boolean indexing. Let's see how to achieve the boolean indexing.
Create a dictionary of data.
Convert it into a DataFrame object with a boolean index as a vector.
Now, access the ... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "Boolean indexing helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a boolean index to use the boolean indexing. Let's see how to achieve the boolean indexing."
},
{
"code": null,
"e": 1297,
... |
Maximum average subarray | Practice | GeeksforGeeks | Given an array Arr of size N and a positive integer K, find the sub-array of length K with the maximum average.
Example 1:
Input:
K = 4, N = 6
Arr[] = {1, 12, -5, -6, 50, 3}
Output: 12 -5 -6 50
Explanation: Maximum average is
(12 - 5 - 6 + 50)/4 = 51/4.
Example 2:
Input:
K = 3, N = 7
Arr[] = {3, -435, 335, 10, -50,... | [
{
"code": null,
"e": 351,
"s": 238,
"text": "Given an array Arr of size N and a positive integer K, find the sub-array of length K with the maximum average. "
},
{
"code": null,
"e": 363,
"s": 351,
"text": "\nExample 1:"
},
{
"code": null,
"e": 495,
"s": 363,
... |
Finding sum of digits of a number until sum becomes single digit in C++ | In this tutorial, we are going to write a program that sums digits of the given number until it becomes a single digit. Let's see an example.
Input −4543
Output −7
Let's see the steps to solve the problem.
Initialize a number.
Initialize a number.
Initialize the sum to 0.
Initialize the sum to 0.
Iterate until the sum ... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "In this tutorial, we are going to write a program that sums digits of the given number until it becomes a single digit. Let's see an example."
},
{
"code": null,
"e": 1216,
"s": 1204,
"text": "Input −4543"
},
{
"code": null,
... |
Java Program to create a new list with values from existing list with Lambda Expressions | To create a new list with values from existing list with Lambda Expressions, the following is an example.
Here, we are displaying the name of Employees. Therefore, we have created an Employee class as well −
List<Employee>emp = Arrays.asList(new Employee("Jack", 29, "South"), new Employee("Tom", 24, "North"), new Emplo... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To create a new list with values from existing list with Lambda Expressions, the following is an example."
},
{
"code": null,
"e": 1270,
"s": 1168,
"text": "Here, we are displaying the name of Employees. Therefore, we have created an... |
D3.js selection.filter() Function - GeeksforGeeks | 19 Aug, 2020
The d3.selection.filter() function in d3.js is used to filter the given selection and return a new selection for which the filter is true. The filter to be used may be a string or a function.
Syntax:
selection.filter(filter);
Parameters: This function accepts one parameter as mentioned above and described ... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 25101,
"s": 24909,
"text": "The d3.selection.filter() function in d3.js is used to filter the given selection and return a new selection for which the filter is true. The filter to be used ma... |
Print all possible N-nodes Full Binary Trees - GeeksforGeeks | 06 Oct, 2021
Given an integer N, the task is to print all possible Full Binary Trees with N nodes. The value at the nodes does not contribute to be a criteria for different Full Binary Tree, except for NULL.
Examples:
Input: N = 7Output: [[0, 0, 0, null, null, 0, 0, null, null, 0, 0, null, null, null, null], ... | [
{
"code": null,
"e": 24305,
"s": 24277,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 24500,
"s": 24305,
"text": "Given an integer N, the task is to print all possible Full Binary Trees with N nodes. The value at the nodes does not contribute to be a criteria for different Ful... |
How to build a Movie Recommender System in Python using LightFm | by Arun Mathew Kurian | Towards Data Science | In this blog post, we will be creating a movie recommender system in python, that suggest new movies to the user based on their viewing history. Before we start let's have a quick look at what a recommender system is.
You may not know the definition of a Recommender system yet, but you have definitely encountered one b... | [
{
"code": null,
"e": 390,
"s": 172,
"text": "In this blog post, we will be creating a movie recommender system in python, that suggest new movies to the user based on their viewing history. Before we start let's have a quick look at what a recommender system is."
},
{
"code": null,
"e": ... |
Tryit Editor v3.7 | Tryit: Using the animation-direction property | [] |
VBA - Time Serial Function | The TimeSerial function returns the time for the specified hour, minute, and second values.
TimeSerial(hour,minute,second)
Hour − A required parameter, which is an integer between 0 and 23 or any numeric expression.
Hour − A required parameter, which is an integer between 0 and 23 or any numeric expression.
Minute − ... | [
{
"code": null,
"e": 2027,
"s": 1935,
"text": "The TimeSerial function returns the time for the specified hour, minute, and second values."
},
{
"code": null,
"e": 2060,
"s": 2027,
"text": "TimeSerial(hour,minute,second) \n"
},
{
"code": null,
"e": 2153,
"s": 2060... |
Serializers - Django REST Framework - GeeksforGeeks | 10 Sep, 2021
Serializers in Django REST Framework are responsible for converting objects into data types understandable by javascript and front-end frameworks. Serializers also provide deserialization, allowing parsed data to be converted back into complex types, after first validating the incoming data. The serializer... | [
{
"code": null,
"e": 24332,
"s": 24304,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 25043,
"s": 24332,
"text": "Serializers in Django REST Framework are responsible for converting objects into data types understandable by javascript and front-end frameworks. Serializers also... |
Ext.js - Custom Events and listeners | Events are something which get fired when something happens to the class. For example, when a button is getting clicked or before/after the element is rendered.
Built-in events using listeners
Attaching events later
Custom events
Ext JS provides listener property for writing events and custom events in Ext JS files.
Wr... | [
{
"code": null,
"e": 2184,
"s": 2023,
"text": "Events are something which get fired when something happens to the class. For example, when a button is getting clicked or before/after the element is rendered."
},
{
"code": null,
"e": 2216,
"s": 2184,
"text": "Built-in events using... |
HTML | <frameset> rows Attribute - GeeksforGeeks | 28 May, 2019
The HTML <frameset> rows Attribute is used to specify the size and the number of rows in a frameset. The height of each frame is separated by a comma.
Syntax:
<frameset rows="pixels|%|*">
Attribute Values:
pixels: The height of row is set in terms of pixels. Example: “50px” or “50”.
%: The height of row is... | [
{
"code": null,
"e": 24814,
"s": 24786,
"text": "\n28 May, 2019"
},
{
"code": null,
"e": 24965,
"s": 24814,
"text": "The HTML <frameset> rows Attribute is used to specify the size and the number of rows in a frameset. The height of each frame is separated by a comma."
},
{
... |
Perl foreach Loop | The foreach loop iterates over a list value and sets the control variable (var) to be each element of the list in turn −
The syntax of a foreach loop in Perl programming language is −
foreach var (list) {
...
}
#!/usr/local/bin/perl
@list = (2, 20, 30, 40, 50);
# foreach loop execution
foreach $a (@list) {
print... | [
{
"code": null,
"e": 2341,
"s": 2220,
"text": "The foreach loop iterates over a list value and sets the control variable (var) to be each element of the list in turn −"
},
{
"code": null,
"e": 2404,
"s": 2341,
"text": "The syntax of a foreach loop in Perl programming language is ... |
Introducing Anomaly/Outlier Detection in Python with PyOD 🔥 | by Eirik Berge | Towards Data Science | Setting the StageWhat is Anomaly/Outlier Detection?Introducing PyODGetting Familiar with the DataAnomaly Detection for Data CleaningAnomaly Detection for PredictionWrapping Up
Setting the Stage
What is Anomaly/Outlier Detection?
Introducing PyOD
Getting Familiar with the Data
Anomaly Detection for Data Cleaning
Anomaly... | [
{
"code": null,
"e": 348,
"s": 172,
"text": "Setting the StageWhat is Anomaly/Outlier Detection?Introducing PyODGetting Familiar with the DataAnomaly Detection for Data CleaningAnomaly Detection for PredictionWrapping Up"
},
{
"code": null,
"e": 366,
"s": 348,
"text": "Setting th... |
SQLSERVER Tryit Editor v1.0 | SELECT CAST('2017-08-25' AS datetime);
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the... | [
{
"code": null,
"e": 39,
"s": 0,
"text": "SELECT CAST('2017-08-25' AS datetime);"
},
{
"code": null,
"e": 41,
"s": 39,
"text": ""
},
{
"code": null,
"e": 113,
"s": 50,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"co... |
7 Handy Use Cases Of Dictionary Comprehensions In Python | by Anupam Chugh | Towards Data Science | Comprehensions in Python are syntactic constructs that are used to build sequences from other sequences. Essentially, comprehensions are a fancy form of writing for loops that are more concise and readable.
All comprehensions can be rewritten using for loops but the vice-versa doesn’t hold true. At large, there are fou... | [
{
"code": null,
"e": 379,
"s": 172,
"text": "Comprehensions in Python are syntactic constructs that are used to build sequences from other sequences. Essentially, comprehensions are a fancy form of writing for loops that are more concise and readable."
},
{
"code": null,
"e": 539,
"s... |
How to make a text italic using JavaScript? | To make text italic using JavaScript, use the italics() method. This method causes a string to be italic as if it were in an <i> tag.
You can try to run the following code to make a text italic with JavaScript −
Live Demo
<html>
<head>
<title>JavaScript String italics() Method</title>
</head>
<body>
... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "To make text italic using JavaScript, use the italics() method. This method causes a string to be italic as if it were in an <i> tag."
},
{
"code": null,
"e": 1274,
"s": 1196,
"text": "You can try to run the following code to make a ... |
C++ Memory Library - auto_ptr | It an automatic Pointer and it provides a limited garbage collection facility for pointers, by allowing pointers to have the elements they point to automatically destroyed when the auto_ptr object is itself destroyed.
Following is the declaration for std::auto_ptr function.
template <class X> class auto_ptr;
template <... | [
{
"code": null,
"e": 2821,
"s": 2603,
"text": "It an automatic Pointer and it provides a limited garbage collection facility for pointers, by allowing pointers to have the elements they point to automatically destroyed when the auto_ptr object is itself destroyed."
},
{
"code": null,
"e"... |
How to add padding to a tkinter widget only on one side? | Let us suppose that we want to add padding on one side (either top/bottom or left/right) of a particular widget. We can achieve this in Tkinter by using its pack() and grid() methods.
In pack() method, we have to define the value for “padx” and “pady”. On the other
hand, the grid method requires only two tuples, i.e., ... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "Let us suppose that we want to add padding on one side (either top/bottom or left/right) of a particular widget. We can achieve this in Tkinter by using its pack() and grid() methods."
},
{
"code": null,
"e": 1444,
"s": 1246,
"text":... |
Python program to remove all duplicates word from a given sentence. | Given a sentence. Remove all duplicates words from a given sentence.
Input: I am a peaceful soul and blissful soul.
Output: I am a peaceful soul and blissful.
Step 1: Split input sentence separated by space into words.
Step 2: So to get all those strings together first we will join each string in a given list of string... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "Given a sentence. Remove all duplicates words from a given sentence."
},
{
"code": null,
"e": 1221,
"s": 1131,
"text": "Input: I am a peaceful soul and blissful soul.\nOutput: I am a peaceful soul and blissful."
},
{
"code": ... |
C++ Program to Generate Random Numbers Using Probability Distribution Function | Probability Density Function (pdf), is a function that describes the relative likelihood for this random variable to take on a given value. It is also called as density of a continuous random variable.
The probability of the random variable fall within a particular range of values is given by the integral of this varia... | [
{
"code": null,
"e": 1264,
"s": 1062,
"text": "Probability Density Function (pdf), is a function that describes the relative likelihood for this random variable to take on a given value. It is also called as density of a continuous random variable."
},
{
"code": null,
"e": 1629,
"s":... |
Groovy - Closures | A closure is a short anonymous block of code. It just normally spans a few lines of code. A method can even take the block of code as a parameter. They are anonymous in nature.
Following is an example of a simple closure and what it looks like.
class Example {
static void main(String[] args) {
def clos = {prin... | [
{
"code": null,
"e": 2415,
"s": 2238,
"text": "A closure is a short anonymous block of code. It just normally spans a few lines of code. A method can even take the block of code as a parameter. They are anonymous in nature."
},
{
"code": null,
"e": 2483,
"s": 2415,
"text": "Follo... |
Be Careful When Interpreting Predictive Models in Search of Causal Insights | by Scott Lundberg | Towards Data Science | A joint article about causality and interpretable machine learning with Eleanor Dillon, Jacob LaRiviere, Jonathan Roth, and Vasilis Syrgkanis from Microsoft.
Predictive machine learning models like XGBoost become even more powerful when paired with interpretability tools like SHAP. These tools identify the most informa... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "A joint article about causality and interpretable machine learning with Eleanor Dillon, Jacob LaRiviere, Jonathan Roth, and Vasilis Syrgkanis from Microsoft."
},
{
"code": null,
"e": 1014,
"s": 330,
"text": "Predictive machine learning... |
Kotlin Flow in Android with Example - GeeksforGeeks | 16 Aug, 2021
Kotlin Flow is one of the latest addition to the Kotlin Coroutines. With Kotlin Flow we can handle streams of data asynchronously which is being executed sequentially.
We will build a simple app that fetches some data from API and shows it on the screen. It’s a simple app demonstrating the Kotlin flow wor... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 24894,
"s": 24725,
"text": "Kotlin Flow is one of the latest addition to the Kotlin Coroutines. With Kotlin Flow we can handle streams of data asynchronously which is being executed sequentia... |
SQL Tryit Editor v1.6 | WHERE ProductID = ALL (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are ... | [
{
"code": null,
"e": 114,
"s": 34,
"text": "WHERE ProductID = ALL (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);"
},
{
"code": null,
"e": 116,
"s": 114,
"text": ""
},
{
"code": null,
"e": 179,
"s": 116,
"text": "Edit the SQL Statement, and click \"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.