title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Show android notification every five minutes? | This example demonstrate about How to Show android notification every five minutes
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" ?... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrate about How to Show android notification every five minutes"
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
Get the List of Arguments of a Function in R Programming – args() Function | 12 Jun, 2020
args() function in R Language is used to get the required arguments by a function. It takes function name as arguments and returns the arguments that are required by that function.
Syntax: args(name)
Parameters:name: Function name
Returns:
For a closure: Formal Argument list but with NULL body
For a Primit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "args() function in R Language is used to get the required arguments by a function. It takes function name as arguments and returns the arguments that are required by that func... |
Tensorflow.js tf.train.sgd() Function | 14 Aug, 2021
Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .train.sgd() function is used to build a tf.SGDOptimizer which utilizes stochastic gradient descent.
Syntax:
tf.train.sgd(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environ... |
Difference between node.js require and ES6 import and export | 09 Mar, 2022
Node.js follows the commonJS module system, and it require to include modules that exist in separate files and for that purpose it has methods like “require” and “ES6 import and export” are available in node.js.
Require: It is the builtin function and it is the easiest way to include modules that exist in ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 264,
"s": 52,
"text": "Node.js follows the commonJS module system, and it require to include modules that exist in separate files and for that purpose it has methods like “require” and “ES6 import ... |
How to Install PSAD on Ubuntu Linux? | 07 Jun, 2022
PSAD(Port Scan Attack Detection) is used to block post scanning on the server. psad tool keeps on monitoring firewall(iptables)logs to determine port scan or any other attack occurred. If some successful attack on the server happens psad also takes action to detect the threat. This is a collection of light... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 385,
"s": 28,
"text": "PSAD(Port Scan Attack Detection) is used to block post scanning on the server. psad tool keeps on monitoring firewall(iptables)logs to determine port scan or any other attack ... |
Create a customized data structure which evaluates functions in O(1) | 02 Sep, 2021
Create a customized data structure such that it has functions :- GetLastElement(); RemoveLastElement(); AddElement() GetMin()
All the functions should be of O(1)Question Source : amazon interview questions
Approach : 1) create a custom stack of type structure with two elements, (element, min_till_now) 2) i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 178,
"s": 52,
"text": "Create a customized data structure such that it has functions :- GetLastElement(); RemoveLastElement(); AddElement() GetMin()"
},
{
"code": null,
"e": 258,
"s... |
Working with Docker Swarm | If you are working on a microservice architecture, where you need to work on different project components on different machines and create a master slave architecture where the master nodes control the slave nodes, deploying your project through Docker Swarm might save you a lot of time, effort and resources.
Docker Sw... | [
{
"code": null,
"e": 1498,
"s": 1187,
"text": "If you are working on a microservice architecture, where you need to work on different project components on different machines and create a master slave architecture where the master nodes control the slave nodes, deploying your project through Docker ... |
Python | sympy.apart() method | 25 Jun, 2019
With the help of sympy.apart() method, we are able to do a partial fraction decomposition of a rational function and put it into a standard canonical form i.e p/q.
Syntax : sympy.apart()Return : Return the partial fraction decomposition of rational function.
Example #1 :In the given example, we can see tha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "With the help of sympy.apart() method, we are able to do a partial fraction decomposition of a rational function and put it into a standard canonical form i.e p/q."
},
{
... |
How to get coordinates from the contour in matplotlib? | To get coordinates from the contour in matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create lists of x, y and m with data points.
Use plt.contour(x, y, m) to create a contour plot with x, y and m data points.
Get the contour collections instanc... | [
{
"code": null,
"e": 1272,
"s": 1187,
"text": "To get coordinates from the contour in matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1348,
"s": 1272,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code":... |
Replace every element of the array by its next element | 11 May, 2022
Given an array arr, the task is to replace each element of the array with the element that appears after it and replace the last element with -1.Examples:
Input: arr[] = {5, 1, 3, 2, 4} Output: 1 3 2 4 -1Input: arr[] = {6, 8, 32, 12, 14, 10, 25 } Output: 8 32 12 14 10 25 -1
Approach: Traverse the arr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "Given an array arr, the task is to replace each element of the array with the element that appears after it and replace the last element with -1.Examples: "
},
{
"cod... |
sympy.integrals.transforms.inverse_fourier_transform() in python | 10 Jul, 2020
With the help of inverse_fourier_transform() method, we can compute the inverse fourier transformation and return the unevaluated function.
Inverse Fourier Transformation
Syntax : inverse_fourier_transform(F, k, x, **hints)
Return : Return the unevaluated function.
Example #1 :
In this example we can see ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "With the help of inverse_fourier_transform() method, we can compute the inverse fourier transformation and return the unevaluated function."
},
{
"code": null,
"e"... |
How to Create an Onboarding Screen in Android? | 11 Jul, 2021
Hello geeks, today we are going to learn that how we can add Onboarding Screen to our android application in the android studio so that we can provide a better user experience to the user of the application.
The onboarding screen can be understood as a virtual unboxing of an application. Users go through a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jul, 2021"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "Hello geeks, today we are going to learn that how we can add Onboarding Screen to our android application in the android studio so that we can provide a better user experience... |
Find the maximum and minimum element in a NumPy array | 13 Aug, 2021
An array can be considered as a container with the same types of elements. Python has its array module named array. We can simply import the module and create our array. But this module has some of its drawbacks. The main disadvantage is we can’t create a multidimensional array. And the data type must be t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 344,
"s": 28,
"text": "An array can be considered as a container with the same types of elements. Python has its array module named array. We can simply import the module and create our array. But t... |
The Knight’s tour problem | Backtracking-1 | 21 Oct, 2021
Backtracking is an algorithmic paradigm that tries different solutions until finds a solution that “works”. Problems that are typically solved using the backtracking technique have the following property in common. These problems can only be solved by trying every possible configuration and each configurat... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 713,
"s": 52,
"text": "Backtracking is an algorithmic paradigm that tries different solutions until finds a solution that “works”. Problems that are typically solved using the backtracking techniqu... |
Python program to verify that a string only contains letters, numbers, underscores and dashes | 19 Aug, 2020
Prerequisite: Regular Expression in Python
Given a string, we have to find whether the string contains any letters, numbers, underscores, and dashes or not. It is usually used for verifying username and password validity. For example, the user has a string for the username of a person and the user doesn’t ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 71,
"s": 28,
"text": "Prerequisite: Regular Expression in Python"
},
{
"code": null,
"e": 404,
"s": 71,
"text": "Given a string, we have to find whether the string contains any l... |
Python String | max() | 08 Dec, 2021
max() is an inbuilt function in Python programming language that returns the highest alphabetical character in a string.
Syntax:
max(string)
Parameter:max() method takes a string as a parameter
Return value:
Returns a character which is alphabetically the highest character in the string.
Below is the Pytho... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 174,
"s": 53,
"text": "max() is an inbuilt function in Python programming language that returns the highest alphabetical character in a string."
},
{
"code": null,
"e": 182,
"s": 17... |
Convert String to Double in Python3 | 08 Oct, 2021
Given a string and our task is to convert it in double. Since double datatype allows a number to have non -integer values. So conversion of string to double is the same as the conversion of string to float
This can be implemented in these two ways
1) Using float() method
Python3
str1 = "9.02"print("This ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "Given a string and our task is to convert it in double. Since double datatype allows a number to have non -integer values. So conversion of string to double is the same as th... |
Overriding toString() Method in Java | 25 Feb, 2022
Java being object-oriented only deals with classes and objects so do if we do require any computation we use the help of object/s corresponding to the class. It is the most frequent method of Java been used to get a string representation of an object. Now you must be wondering that till now they were not u... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 679,
"s": 52,
"text": "Java being object-oriented only deals with classes and objects so do if we do require any computation we use the help of object/s corresponding to the class. It is the most f... |
Python Program for Merge Sort | 17 Jan, 2022
Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and m... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 405,
"s": 54,
"text": "Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves. The merge() functio... |
Populate null columns in a MySQL table and set values | For this, you can use IS NULL property. Let us first create a table −
mysql> create table DemoTable
(
ProductPrice int,
ProductQuantity int,
TotalAmount int
);
Query OK, 0 rows affected (1.22 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable(ProductPrice,ProductQuantity)... | [
{
"code": null,
"e": 1257,
"s": 1187,
"text": "For this, you can use IS NULL property. Let us first create a table −"
},
{
"code": null,
"e": 1393,
"s": 1257,
"text": "mysql> create table DemoTable\n(\n ProductPrice int,\n ProductQuantity int,\n TotalAmount int\n);\nQuery O... |
Python | Ways to check if given string contains only letter | 21 Jul, 2021
Given a string, write a Python program to find whether a string contains only letters and no other keywords. Let’s discuss a few methods to complete the task.
Method #1: Using isalpha() method
Python3
# Python code to demonstrate# to find whether string contains# only letters # Initialising stringini_str ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "Given a string, write a Python program to find whether a string contains only letters and no other keywords. Let’s discuss a few methods to complete the task."
},
{
"c... |
How to find If a given String contains only letters in Java? | To verify whether a given String contains only characters −
Read the String.
Convert all the characters in the given String to lower case using the toLower() method.
Convert it into a character array using the toCharArray() method of the String class.
Find whether every character in the array is in between a and z, if ... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To verify whether a given String contains only characters −"
},
{
"code": null,
"e": 1139,
"s": 1122,
"text": "Read the String."
},
{
"code": null,
"e": 1228,
"s": 1139,
"text": "Convert all the characters in the ... |
Number of unique triplets whose XOR is zero - GeeksforGeeks | 21 May, 2021
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said to be unique if all of the three numbers in the triplet are unique.
Examples:
Input : a[] = {1, 3, 5, 10, 14, 15};
Output : 2
Explanation : {1, 14, 15} and {5, 10, 15} are the... | [
{
"code": null,
"e": 24773,
"s": 24745,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 24971,
"s": 24773,
"text": "Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said to be unique if all of the three n... |
Efficiency Of Token Ring - GeeksforGeeks | 11 Aug, 2021
Token Ring protocol is a communication protocol used in Local Area Network (LAN). In a token ring protocol, the topology of the network is used to define the order in which stations send. The stations are connected to one another in a single ring. It uses a special three-byte frame called a “token” that tr... | [
{
"code": null,
"e": 36594,
"s": 36566,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 37134,
"s": 36594,
"text": "Token Ring protocol is a communication protocol used in Local Area Network (LAN). In a token ring protocol, the topology of the network is used to define the order... |
Next.js - Routing | Next.js uses file system based router. Whenever we add any page to pages directory, it is automatically available via url. Following are the rules of this router.
Index Routes − An index.js file present in a folder maps to root of directory. For example −
pages/index.js maps to '/'.
pages/posts/index.js maps to '/post... | [
{
"code": null,
"e": 2270,
"s": 2107,
"text": "Next.js uses file system based router. Whenever we add any page to pages directory, it is automatically available via url. Following are the rules of this router."
},
{
"code": null,
"e": 2433,
"s": 2270,
"text": "Index Routes − An i... |
Check if a circle lies inside another circle or not in C++ | Suppose we have two circles (center points, and the radius values), we have to check one circle is fit inside another circle or not. There are three possible causes.
The smaller circle lies completely inside the bigger one, without touching each other. In this case, the sum of the distance between the centers, and the ... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Suppose we have two circles (center points, and the radius values), we have to check one circle is fit inside another circle or not. There are three possible causes."
},
{
"code": null,
"e": 1480,
"s": 1228,
"text": "The smaller circ... |
Using Cosine Similarity to Build a Movie Recommendation System | by Mahnoor Javed | Towards Data Science | Have you ever imagined that a simple formula that you have studied in high school would play a part in recommending you a movie on the basis of the one you already like?
Well, here we are, using the Cosine Similarity (the dot product for normalized vectors) to build a Movie Recommender System!
Recommender systems are a... | [
{
"code": null,
"e": 216,
"s": 46,
"text": "Have you ever imagined that a simple formula that you have studied in high school would play a part in recommending you a movie on the basis of the one you already like?"
},
{
"code": null,
"e": 341,
"s": 216,
"text": "Well, here we are... |
How to dynamically build MongoDB query? | To build query dynamically, you need to write some script. Let us first create a collection with documents −
> db.dynamicQueryDemo.insertOne({"Name":"John","Subject":["MongoDB","MySQL"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cef5c5def71edecf6a1f69a")
}
> db.dynamicQueryDemo.insertOne({"Name":"Joh... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To build query dynamically, you need to write some script. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1663,
"s": 1171,
"text": "> db.dynamicQueryDemo.insertOne({\"Name\":\"John\",\"Subject\":[\"MongoDB... |
Create a wave array from the given Binary Search Tree - GeeksforGeeks | 25 Feb, 2022
Given a Binary Search Tree, the task is to create a wave array from the given Binary Search Tree. An array arr[0..n-1] is called a wave array if arr[0] >= arr[1] <= arr[2] >= arr[3] <= arr[4] >= ...
Examples:
Input:
Output: 4 2 8 6 12 10 14Explanation: The above mentioned array {4, 2, 8, 6, 12, 10, 14} is ... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 25019,
"s": 24820,
"text": "Given a Binary Search Tree, the task is to create a wave array from the given Binary Search Tree. An array arr[0..n-1] is called a wave array if arr[0] >= arr[1] <... |
Java enum Keyword | ❮ Java Keywords
Create an enum with constants (unchangeable variables):
enum Level {
LOW,
MEDIUM,
HIGH
}
You can access enum constants with the dot syntax:
The enum keyword declares an enumerated (unchangeable) type.
An enum is a special "class" that represents a group of constants (unchangeable variables, like... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "\n❮ Java Keywords\n"
},
{
"code": null,
"e": 74,
"s": 18,
"text": "Create an enum with constants (unchangeable variables):"
},
{
"code": null,
"e": 114,
"s": 74,
"text": "enum Level {\n LOW,\n MEDIUM,\n HIGH\n}\n"
... |
How to Insert Form Data into Database using PHP ? - GeeksforGeeks | 31 Jul, 2021
In this article, we are going to store data in database which is submitted through HTML form.
Requirements:
XAMPP Server (Web Server)
HTML
PHP
MySQL
HTML form: First we create an HTML form that need to take user input from keyboard. HTML form is a document which stores information of a user on a web serve... | [
{
"code": null,
"e": 24946,
"s": 24918,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 25041,
"s": 24946,
"text": "In this article, we are going to store data in database which is submitted through HTML form. "
},
{
"code": null,
"e": 25055,
"s": 25041,
"tex... |
lftp - Unix, Linux Command | lftp can handle several file access methods - ftp, ftps, http, https,
hftp, fish, sftp and file (https and ftps are only available when lftp is
compiled with GNU TLS or OpenSSL library). You can specify the method to use in ‘open
URL’ command, e.g. ‘open http://www.us.kernel.org/pub/linux’. hftp is
ftp-over-http-proxy ... | [
{
"code": null,
"e": 11130,
"s": 10581,
"text": "\nlftp can handle several file access methods - ftp, ftps, http, https,\nhftp, fish, sftp and file (https and ftps are only available when lftp is\ncompiled with GNU TLS or OpenSSL library). You can specify the method to use in ‘open\nURL’ command, e.... |
Python | Box-Cox Transformation - GeeksforGeeks | 20 Jul, 2021
Imagine you are watching a horse race and like any other race, there are fast runners and slow runners. So, logically speaking, the horse which came first and the fast horses along with it will have the same difference of completion time whereas the slowest ones will have a larger difference in their compl... | [
{
"code": null,
"e": 24986,
"s": 24958,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 25305,
"s": 24986,
"text": "Imagine you are watching a horse race and like any other race, there are fast runners and slow runners. So, logically speaking, the horse which came first and the ... |
Find HCF of two numbers without using recursion or Euclidean algorithm - GeeksforGeeks | 07 Apr, 2021
Given two integer x and y, the task is to find the HCF of the numbers without using recursion or Euclidean method.
Examples:
Input: x = 16, y = 32 Output: 16
Input: x = 12, y = 15 Output: 3
Approach: HCF of two numbers is the greatest number which can divide both the numbers. If the smaller of the two n... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24831,
"s": 24716,
"text": "Given two integer x and y, the task is to find the HCF of the numbers without using recursion or Euclidean method."
},
{
"code": null,
"e": 24842,
... |
AWT Panel Class | The class Panel is the simplest container class. It provides space in which an application can attach any other component, including other panels. It uses FlowLayout as default layout manager.
Following is the declaration for java.awt.Panel class:
public class Panel
extends Container
implements Accessible
Pane... | [
{
"code": null,
"e": 1940,
"s": 1747,
"text": "The class Panel is the simplest container class. It provides space in which an application can attach any other component, including other panels. It uses FlowLayout as default layout manager."
},
{
"code": null,
"e": 1995,
"s": 1940,
... |
Arduino - Keyboard Serial | This example listens for a byte coming from the serial port. When received, the board sends a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you will receive a "b" from the board connected to the computer. A "1" will return a "2" an... | [
{
"code": null,
"e": 3199,
"s": 2870,
"text": "This example listens for a byte coming from the serial port. When received, the board sends a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an \"a\" from the serial monitor, you will receive a \"b... |
GATE | GATE-CS-2004 | Question 7 - GeeksforGeeks | 28 Jun, 2021
Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?
1. 9679, 1989, 4199 hash to the same value
2. 1471, 6171 hash to the same value
3. All elements hash to the same value
4. Each element hashes t... | [
{
"code": null,
"e": 24075,
"s": 24047,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24226,
"s": 24075,
"text": "Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?"
},
{
... |
How can we implement a scrollable JPanel in Java? | A JPanel is a subclass of JComponent (a subclass of a Container class). Therefore, JPanel is also a Container.
A JPanel is an empty area that can be used either to layout other components including other panels.
In a JPanel, we can add fields, labels, buttons, checkboxes, and images also.
The Layout Managers such as Fl... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "A JPanel is a subclass of JComponent (a subclass of a Container class). Therefore, JPanel is also a Container."
},
{
"code": null,
"e": 1274,
"s": 1173,
"text": "A JPanel is an empty area that can be used either to layout other compo... |
Lag Plots | 22 Jan, 2021
A lag plot is a special type of scatter plot in which the X-axis represents the dataset with some time units behind or ahead as compared to the Y-axis. The difference between these time units is called lag or lagged and it is represented by k.
The lag plot contains the following axes:
Vertical axis: Yi fo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 273,
"s": 28,
"text": " A lag plot is a special type of scatter plot in which the X-axis represents the dataset with some time units behind or ahead as compared to the Y-axis. The difference between... |
Name Mangling and extern “C” in C++ | 14 Mar, 2022
C++ supports function overloading, i.e., there can be more than one function with the same name but, different parameters. How does the C++ compiler distinguish between different functions when it generates object code – it changes names by adding information about arguments. This technique of adding addit... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 571,
"s": 54,
"text": "C++ supports function overloading, i.e., there can be more than one function with the same name but, different parameters. How does the C++ compiler distinguish between diffe... |
Matplotlib.pyplot.violinplot() in Python | 21 Apr, 2020
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.pyplot.violinplot() is as the name explains is used for making violin plots. Thr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Job Sequencing Problem | Set 3 (Using TreeSet in JAVA) | 11 Dec, 2018
Given an array of jobs where every job has a deadline and associated profit (if the job is finished before the deadline). It is also given that every job takes a single unit of time, so the minimum possible deadline for any job is 1. How to maximize total profit if only one job can be scheduled at a time.
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 359,
"s": 52,
"text": "Given an array of jobs where every job has a deadline and associated profit (if the job is finished before the deadline). It is also given that every job takes a single unit ... |
How to Make a Chatbot in Python using Chatterbot Module? | 14 Dec, 2020
A ChatBot is basically a computer program that conducts conversation between a user and a computer through auditory or textual methods. It works as a real-world conversational partner.
ChatterBot is a library in python which generates a response to user input. It used a number of machine learning algorithm... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 213,
"s": 28,
"text": "A ChatBot is basically a computer program that conducts conversation between a user and a computer through auditory or textual methods. It works as a real-world conversational... |
JavaScript String - concat() Method | This method adds two or more strings and returns a new single string.
Its syntax is as follows −
string.concat(string2, string3[, ..., stringN]);
string2...stringN − These are the strings to be concatenated.
Returns a single concatenated string.
Try the following example.
<html>
<head>
<title>JavaScript Strin... | [
{
"code": null,
"e": 2670,
"s": 2600,
"text": "This method adds two or more strings and returns a new single string."
},
{
"code": null,
"e": 2697,
"s": 2670,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": 2747,
"s": 2697,
"text": "string.concat(... |
jQuery Jcrop Plugin | 31 Jul, 2020
In this article, we will learn how to crop an image using PHP and jQuery Jcrop plugin.
Note: Please download the jQuery Jcrop plugin and include the required files in the head section of your HTML code.
<link href=”jquery.Jcrop.min.css” rel=”stylesheet” type=”text/css”/><script src=”jquery.min.js”></script... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2020"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "In this article, we will learn how to crop an image using PHP and jQuery Jcrop plugin."
},
{
"code": null,
"e": 231,
"s": 115,
"text": "Note: Please downlo... |
How to add a row to R dataframe ? | 21 Apr, 2021
In this article, we will see how to add rows to a DataFrame in R Programing Language. To do this we will use rbind() function. This function in R Language is used to combine specified Vector, Matrix or Data Frame by rows.
Syntax:
rbind(dataframe 1, dataframe 2)
Example 1 :
R
# creating a data frame with so... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "In this article, we will see how to add rows to a DataFrame in R Programing Language. To do this we will use rbind() function. This function in R Language is used to combine s... |
script command in Linux with Examples | 17 Apr, 2019
script command in Linux is used to make typescript or record all the terminal activities. After executing the script command it starts recording everything printed on the screen including the inputs and outputs until exit. By default, all the terminal information is saved in the file typescript , if no arg... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Apr, 2019"
},
{
"code": null,
"e": 675,
"s": 54,
"text": "script command in Linux is used to make typescript or record all the terminal activities. After executing the script command it starts recording everything printed on the scr... |
How to traverse a STL map in reverse direction? | 01 Dec, 2018
Map stores the elements in sorted order of keys. Now if we want to traverse it in reverse order we will use reverse_iterator of map.
Syntax:
map::reverse_iterator iterator_name;
Reverse Iterator of map moves in backward direction on increment. So, we will point the reverse_iterator to the last element of ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Dec, 2018"
},
{
"code": null,
"e": 187,
"s": 54,
"text": "Map stores the elements in sorted order of keys. Now if we want to traverse it in reverse order we will use reverse_iterator of map."
},
{
"code": null,
"e": 195,... |
TreeSet ceiling() method in Java with Examples | 04 Apr, 2019
The ceiling() method of java.util.TreeSet<E> class is used to return the least element in this set greater than or equal to the given element, or null if there is no such element.
Syntax:
public E ceiling(E e)
Parameters: This method takes the value e as a parameter which is to be matched.
Return Value: Th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 233,
"s": 53,
"text": "The ceiling() method of java.util.TreeSet<E> class is used to return the least element in this set greater than or equal to the given element, or null if there is no such ele... |
Python – Import CSV into PostgreSQL | 23 Sep, 2021
In this article, we will see how to import CSV files into PostgreSQL using the Python package psycopg2.
First, we import the psycopg2 package and establish a connection to a PostgreSQL database using the pyscopg2.connect() method. before importing a CSV file we need to create a table. In the example below,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "In this article, we will see how to import CSV files into PostgreSQL using the Python package psycopg2."
},
{
"code": null,
"e": 434,
"s": 132,
"text": "Fi... |
Jump statements in C++ | 13 Jan, 2021
Jump statements are used to manipulate the flow of the program if some conditions are met. It is used to terminating or continues the loop inside a program or to stop the execution of a function. In C++ there is four jump statement: continue, break, return, and goto.
Continue: It is used to execute other... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 322,
"s": 52,
"text": "Jump statements are used to manipulate the flow of the program if some conditions are met. It is used to terminating or continues the loop inside a program or to stop the exe... |
Node.js Buffer.toString() Method | 13 Oct, 2021
The Buffer.toString() method is used to decode a buffer data to string according to the specified encoding type. The start and end offset is used to decode only particular subset of a buffer. If the byte sequence in the buffer data is not valid according to the provided encoding, then it is replaced by the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 379,
"s": 28,
"text": "The Buffer.toString() method is used to decode a buffer data to string according to the specified encoding type. The start and end offset is used to decode only particular sub... |
Python – Find Words with both alphabets and numbers | 22 Apr, 2020
Sometimes, while working with Python strings, we can have problem in which we need to extract certain words with contain both numbers and alphabets. This kind of problem can occur in many domains like school programming and web-development. Lets discuss certain ways in which this task can be performed.
Met... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "Sometimes, while working with Python strings, we can have problem in which we need to extract certain words with contain both numbers and alphabets. This kind of problem can o... |
Find the Product of first N Prime Numbers in C++ | Suppose we have a number n. We have to find the product of prime numbers between 1 to n. So if n = 7, then output will be 210, as 2 * 3 * 5 * 7 = 210.
We will use the Sieve of Eratosthenes method to find all primes. Then calculate the product of them.
Live Demo
#include<iostream>
using namespace std;
long PrimeProds(i... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Suppose we have a number n. We have to find the product of prime numbers between 1 to n. So if n = 7, then output will be 210, as 2 * 3 * 5 * 7 = 210."
},
{
"code": null,
"e": 1314,
"s": 1213,
"text": "We will use the Sieve of Eratos... |
Command Line Interface Programming in Python? | In this section we are going to develop a command line interface using python. But before we deep dive into program, lets first understand command line.
Command line are in use since the existence of computer programs and are built on commands. A command line program is a program that runs from a shell or from a comman... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "In this section we are going to develop a command line interface using python. But before we deep dive into program, lets first understand command line."
},
{
"code": null,
"e": 1389,
"s": 1215,
"text": "Command line are in use since... |
How to display count of notifications in toolbar icon in Android? | This example demonstrate about How to display count of notifications in toolbar icon in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<? xml version = "1.0" encodi... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "This example demonstrate about How to display count of notifications in toolbar icon in Android."
},
{
"code": null,
"e": 1288,
"s": 1159,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill al... |
Count of distinct substrings of a string using Suffix Array - GeeksforGeeks | 06 Jun, 2021
Given a string of length n of lowercase alphabet characters, we need to count total number of distinct substrings of this string. Examples:
Input : str = “ababa”
Output : 10
Total number of distinct substring are 10, which are,
"", "a", "b", "ab", "ba", "aba", "bab", "abab", "baba"
and "ababa"
We have... | [
{
"code": null,
"e": 24489,
"s": 24461,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 24631,
"s": 24489,
"text": "Given a string of length n of lowercase alphabet characters, we need to count total number of distinct substrings of this string. Examples: "
},
{
"code":... |
Java Examples - Detect Face in an Image | How to detect a face in an image using java.
Following is the program to detect a face in an image using java.
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.im... | [
{
"code": null,
"e": 2113,
"s": 2068,
"text": "How to detect a face in an image using java."
},
{
"code": null,
"e": 2179,
"s": 2113,
"text": "Following is the program to detect a face in an image using java."
},
{
"code": null,
"e": 3844,
"s": 2179,
"text": "... |
How to switch between hide and view password in Android | There are so many cases, it required to show password while entering password or after entered password. This example demonstrate about How to switch between hide and view password.
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 − ... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "There are so many cases, it required to show password while entering password or after entered password. This example demonstrate about How to switch between hide and view password."
},
{
"code": null,
"e": 1373,
"s": 1244,
"text": "... |
Check if a given string can be formed using characters of adjacent cells of a Matrix - GeeksforGeeks | 03 Jun, 2021
Given a matrix board of characters and a string Word, the task is to check if Word exists on the board constructed from a sequence of horizontally and vertically adjacent characters only. Each character can be used only once.
Examples:
Input: board = { {‘A’, ‘B’, ‘C’, ‘E’}, {‘S’, ‘F’, ‘C’, ‘S’}, {‘A’, ‘D’... | [
{
"code": null,
"e": 25128,
"s": 25100,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 25354,
"s": 25128,
"text": "Given a matrix board of characters and a string Word, the task is to check if Word exists on the board constructed from a sequence of horizontally and vertically a... |
EasyGUI – Code Box - GeeksforGeeks | 14 Mar, 2022
Code Box : It is used to show and get the text to/from the user which is in form of code i.e not in word-wrap form, text can be edited using any keyboard input, it takes input in form of string. It displays the title, message to be displayed, place to alter the given text and a pair of “Ok”, “Cancel” butto... | [
{
"code": null,
"e": 24834,
"s": 24806,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 25269,
"s": 24834,
"text": "Code Box : It is used to show and get the text to/from the user which is in form of code i.e not in word-wrap form, text can be edited using any keyboard input, it... |
Stratified K Fold Cross Validation - GeeksforGeeks | 27 Apr, 2022
In machine learning, When we want to train our ML model we split our entire dataset into training_set and test_set using train_test_split() class present in sklearn. Then we train our model on training_set and test our model on test_set. The problems that we are going to face in this method are:
Whenever w... | [
{
"code": null,
"e": 24368,
"s": 24340,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 24665,
"s": 24368,
"text": "In machine learning, When we want to train our ML model we split our entire dataset into training_set and test_set using train_test_split() class present in sklear... |
What is the difference between Trim() and TrimStart() methods in C#? | A string method that removes all the leading and trailing whitespaces in a string.
For example, the string “jack sparrow“ would be returned as the following without leading and whitespaces using trim().
jack sparrow
The following is an example −
Live Demo
using System;
namespace Demo {
class Program {
static ... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "A string method that removes all the leading and trailing whitespaces in a string."
},
{
"code": null,
"e": 1265,
"s": 1145,
"text": "For example, the string “jack sparrow“ would be returned as the following without leading and white... |
Calculating Wind Chill Factor(WCF) or Wind Chill Index(WCI) in Python - GeeksforGeeks | 07 Feb, 2018
Wind-chill or Windchill is the perceived decrease in air temperature felt by the body on exposed skin due to the flow of air. The effect of wind chill is to increase the rate of heat loss and reduce any warmer objects to the ambient temperature more quickly.Here is the standard formula that was adopted in ... | [
{
"code": null,
"e": 24317,
"s": 24289,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 24700,
"s": 24317,
"text": "Wind-chill or Windchill is the perceived decrease in air temperature felt by the body on exposed skin due to the flow of air. The effect of wind chill is to increa... |
Difference Between getPath() and getAbsolutePath() in Java - GeeksforGeeks | 04 Jan, 2021
getPath(): The getPath() method is a part of File class. This function returns the path of the given file object. The function returns a string object which contains the path of the given file object.
Return Type:
The string form of an abstract pathname
getAbsolutePath(): The getAbsolutePath() returns a pa... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 25059,
"s": 24858,
"text": "getPath(): The getPath() method is a part of File class. This function returns the path of the given file object. The function returns a string object which contai... |
Are Stock Returns Normally Distributed? | by Tony Yiu | Towards Data Science | While painful, the chaos in financial markets recently provides a good opportunity for us to question our assumptions. It’s very common in the investments industry to model the potential range of an investment’s future returns with a normal distribution. Any time we can model something with normal distributions, it mak... | [
{
"code": null,
"e": 925,
"s": 172,
"text": "While painful, the chaos in financial markets recently provides a good opportunity for us to question our assumptions. It’s very common in the investments industry to model the potential range of an investment’s future returns with a normal distribution. ... |
5 Tips to Customize the Display of Your Pandas Data Frame | by Satyam Kumar | Towards Data Science | Pandas is one of the most popular Python libraries in the data science community, as it offers flexible data structures and a vast API for data explorations and visualization. A data scientist spends most of the time exploring the data and performing exploratory data analysis. Jupyter Notebook provides an interactive p... | [
{
"code": null,
"e": 596,
"s": 171,
"text": "Pandas is one of the most popular Python libraries in the data science community, as it offers flexible data structures and a vast API for data explorations and visualization. A data scientist spends most of the time exploring the data and performing expl... |
Tensorflow multi-worker training on Google Cloud AI Platform | by Szilárd Kálosi | Towards Data Science | In nearly every deep learning project, there is a decisive moment when immense volumes of training data or lack of processing power become the limiting factor of completing training in proper time. Therefore, applying appropriate scaling is inevitable. Although scaling up, i.e. upgrading to more powerful hardware, migh... | [
{
"code": null,
"e": 790,
"s": 172,
"text": "In nearly every deep learning project, there is a decisive moment when immense volumes of training data or lack of processing power become the limiting factor of completing training in proper time. Therefore, applying appropriate scaling is inevitable. Al... |
RSpec - Basic Syntax | Let’s take a closer look at the code of our HelloWorld example. First of all, in case it isn’t clear, we are testing the functionality of the HelloWorld class. This of course, is a very simple class that contains only one method say_hello().
Here is the RSpec code again −
describe HelloWorld do
context “When testin... | [
{
"code": null,
"e": 2036,
"s": 1794,
"text": "Let’s take a closer look at the code of our HelloWorld example. First of all, in case it isn’t clear, we are testing the functionality of the HelloWorld class. This of course, is a very simple class that contains only one method say_hello()."
},
{
... |
Count number of trailing zeros in Binary representation of a number using Bitset in C++ | Given an integer num as input. The goal is to find the number of trailing zeroes in the binary representation of num using bitset.
A bitset stores the bits 0s and 1s in it. It is an array of bits.
For Example
num = 10
Count of number of trailing zeros in Binary representation of a number using
Bitset are: 1
The number ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "Given an integer num as input. The goal is to find the number of trailing zeroes in the binary representation of num using bitset."
},
{
"code": null,
"e": 1259,
"s": 1193,
"text": "A bitset stores the bits 0s and 1s in it. It is an ... |
Scala | Closures - GeeksforGeeks | 05 Nov, 2019
Scala Closures are functions which uses one or more free variables and the return value of this function is dependent of these variable. The free variables are defined outside of the Closure Function and is not included as a parameter of this function. So the difference between a closure function and a nor... | [
{
"code": null,
"e": 26088,
"s": 26060,
"text": "\n05 Nov, 2019"
},
{
"code": null,
"e": 26734,
"s": 26088,
"text": "Scala Closures are functions which uses one or more free variables and the return value of this function is dependent of these variable. The free variables are def... |
How to Create Added Variable Plots in R? - GeeksforGeeks | 16 Dec, 2021
In this article, we will discuss how to create an added variable plot in the R Programming Language.
The Added variable plot is an individual plot that displays the relationship between a response variable and one predictor variable in a multiple linear regression model while controlling for the presence o... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26588,
"s": 26487,
"text": "In this article, we will discuss how to create an added variable plot in the R Programming Language."
},
{
"code": null,
"e": 27066,
"s": 26588,
... |
Pattern quote(String) method in Java with Examples - GeeksforGeeks | 21 Feb, 2019
quote(String) method of a Pattern class used to returns a literal pattern String for the specified String passed as parameter to method.This method produces a String equivalent to s that can be used to create a Pattern. Metacharacters or escape sequences in the input sequence will be given no special meani... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 25781,
"s": 25249,
"text": "quote(String) method of a Pattern class used to returns a literal pattern String for the specified String passed as parameter to method.This method produces a Stri... |
Assigning function to a variable in C++ - GeeksforGeeks | 19 Apr, 2022
In C++, assigning a function to a variable and using that variable for calling the function as many times as the user wants, increases the code reusability. Below is the syntax for the same:
Syntax:
C++
// Syntax: // Below function is assigned to// the variable funauto fun = [&]() { cout << "inside func... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 25534,
"s": 25343,
"text": "In C++, assigning a function to a variable and using that variable for calling the function as many times as the user wants, increases the code reusability. Below ... |
Sequence of Alphabetical Character Letters from A-Z in R - GeeksforGeeks | 23 Sep, 2021
In this article, we are going to discuss how to get a sequence of character letters from A-Z in R programming language.
We will get all letters in lowercase sequence by using the letters function
Syntax:
letters
Example: Return all lowercase letters using letters function
R
# return all lower case letters ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26607,
"s": 26487,
"text": "In this article, we are going to discuss how to get a sequence of character letters from A-Z in R programming language."
},
{
"code": null,
"e": 26683,... |
How to Run R scripts in Jupyter. A short tutorial on how to install the... | by Angelica Lo Duca | Towards Data Science | The Jupyter Notebook is a Web application which permits to create live code in different languages. Usually, developers exploit the Jupyter Notebook to write code in Python. However, Jupyter also supports other programming languages, including Java, R, Julia, Matlab, Octave, Scheme, Processing, Scala and many others.
J... | [
{
"code": null,
"e": 491,
"s": 172,
"text": "The Jupyter Notebook is a Web application which permits to create live code in different languages. Usually, developers exploit the Jupyter Notebook to write code in Python. However, Jupyter also supports other programming languages, including Java, R, Ju... |
Passing Arrays as Function Arguments in C | If you want to pass a single-dimension array as an argument in a function, you would have to declare a formal parameter in one of following three ways and all three declaration methods produce similar results because each tells the compiler that an integer pointer is going to be received. Similarly, you can pass multi-... | [
{
"code": null,
"e": 2445,
"s": 2084,
"text": "If you want to pass a single-dimension array as an argument in a function, you would have to declare a formal parameter in one of following three ways and all three declaration methods produce similar results because each tells the compiler that an inte... |
Using a free API to get geolocation information from a public IP address | by Abid Ebna Saif Utsha | Towards Data Science | This article is a demonstration of a project I have created using a free API. Initially, the purpose was to understand and learn more about API calls. I am working as an intern in a company which works with geospatial information. I got the inspiration to work on this from working there. I will try to explain the code ... | [
{
"code": null,
"e": 645,
"s": 172,
"text": "This article is a demonstration of a project I have created using a free API. Initially, the purpose was to understand and learn more about API calls. I am working as an intern in a company which works with geospatial information. I got the inspiration to... |
Implementing Flutter Gauge - GeeksforGeeks | 15 Feb, 2021
Flutter gauge is an information perception widget written in dart language to make a modern, interactive, and animated gauge check and is utilized to make excellent portable application user interfaces utilizing Flutter. There is an alternate style of gauge in flutter.
Following are the steps to follow in ... | [
{
"code": null,
"e": 26517,
"s": 26489,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 26787,
"s": 26517,
"text": "Flutter gauge is an information perception widget written in dart language to make a modern, interactive, and animated gauge check and is utilized to make excellen... |
How to have logarithmic bins in a Python histogram? | We can set the logarithmic bins while plotting histogram using plt.hist(bin="").
Create an array x, where range is 100.
Create an array x, where range is 100.
Plot a histogram using plt.hist() method. We can pass logarithmic bins using logarithmic bins that returns numbers spaced evenly on a log scale.
Plot a histogram... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "We can set the logarithmic bins while plotting histogram using plt.hist(bin=\"\")."
},
{
"code": null,
"e": 1182,
"s": 1143,
"text": "Create an array x, where range is 100."
},
{
"code": null,
"e": 1221,
"s": 1182,
... |
How to invert the elements of a boolean array in Python? - GeeksforGeeks | 17 Dec, 2020
Given a boolean array the task here is to invert its elements. A boolean array is an array which contains only boolean values like True or False, 1 or 0.
Input : A=[true , true , false]
Output: A= [false , false , true]
Input: A=[0,1,0,1]
Output: A=[1,0,1,0]
Method 1:
You can use simple if else method t... | [
{
"code": null,
"e": 24364,
"s": 24333,
"text": " \n17 Dec, 2020\n"
},
{
"code": null,
"e": 24519,
"s": 24364,
"text": "Given a boolean array the task here is to invert its elements. A boolean array is an array which contains only boolean values like True or False, 1 or 0. "
},... |
Callbacks in C - GeeksforGeeks | 05 Mar, 2019
A callback is any executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at a given time [Source : Wiki]. In simple language, If a reference of a function is passed to another function as an argument to call it, then it will be called as a Callbac... | [
{
"code": null,
"e": 25837,
"s": 25809,
"text": "\n05 Mar, 2019"
},
{
"code": null,
"e": 26156,
"s": 25837,
"text": "A callback is any executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at a given time [Source : Wiki... |
Illustrated: Efficient Neural Architecture Search | by Raimi Karim | Towards Data Science | (TL;DR the only two animations you need to know are here)
Updated:23 Mar 2020: Erratum — Previously it was mentioned that all convolution cells in micro search are different from one another. This is wrong; the convolution cell is repeated multiple times in the final child models. This information is verified by the au... | [
{
"code": null,
"e": 230,
"s": 172,
"text": "(TL;DR the only two animations you need to know are here)"
},
{
"code": null,
"e": 543,
"s": 230,
"text": "Updated:23 Mar 2020: Erratum — Previously it was mentioned that all convolution cells in micro search are different from one ano... |
Scraping the web with Selenium on Google Cloud Composer (Airflow) | by Julian Smidek | Towards Data Science | There are already a lot of different resources available on creating web-scrapers using Python which are usually based on either a combination of the well known Python packages urllib+beautifulsoup4 or Selenium. When you are faced with the challenge to scrape a javascript-heavy web page or a level of interaction with t... | [
{
"code": null,
"e": 853,
"s": 171,
"text": "There are already a lot of different resources available on creating web-scrapers using Python which are usually based on either a combination of the well known Python packages urllib+beautifulsoup4 or Selenium. When you are faced with the challenge to sc... |
Use Flask and SQLalchemy, not Flask-SQLAlchemy! | by Edward Krueger | Towards Data Science | By: Edward Krueger Data Scientist and Instructor and Douglas Franklin Teaching Assistant and Technical Writer.
In this article, we will cover using Flask with SQLAlchemy and some reasons to avoid Flask-SQLAlchemy. Additionally, we’ll demonstrate the benefits of having SQLAlchemy models and database connections that exi... | [
{
"code": null,
"e": 282,
"s": 171,
"text": "By: Edward Krueger Data Scientist and Instructor and Douglas Franklin Teaching Assistant and Technical Writer."
},
{
"code": null,
"e": 519,
"s": 282,
"text": "In this article, we will cover using Flask with SQLAlchemy and some reasons... |
Assembly - MOVS Instruction | The MOVS instruction is used to copy a data item (byte, word or doubleword) from the source string to the destination string. The source string is pointed by DS:SI and the destination string is pointed by ES:DI.
The following example explains the concept −
section .text
global _start ;must be declared for usi... | [
{
"code": null,
"e": 2297,
"s": 2085,
"text": "The MOVS instruction is used to copy a data item (byte, word or doubleword) from the source string to the destination string. The source string is pointed by DS:SI and the destination string is pointed by ES:DI."
},
{
"code": null,
"e": 2342... |
How to set the number of ticks in plt.colorbar in Matplotlib? | To set the number of ticks in a colorbar, we can take the following steps−
Create random data using numpy
Display the data as an image, i.e., on a 2D regular raster.
Make a colorbar using colorbar() method with an image scalar mappable object.
Set the ticks and tick labels of the colorbar using set_ticks() and set_tick... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To set the number of ticks in a colorbar, we can take the following steps−"
},
{
"code": null,
"e": 1168,
"s": 1137,
"text": "Create random data using numpy"
},
{
"code": null,
"e": 1228,
"s": 1168,
"text": "Displ... |
How to download NGS data from the NCBI database | Towards Data Science | The Sequence Read Archive, or SRA, is NCBI’s database of storing Next Generation Sequence DNA data from sequencing experiments on any species, including humans. For those new to bioinformatics, it can be unclear how to access the data from this massive resource. It’s most likely you will be trying to access data from a... | [
{
"code": null,
"e": 1396,
"s": 172,
"text": "The Sequence Read Archive, or SRA, is NCBI’s database of storing Next Generation Sequence DNA data from sequencing experiments on any species, including humans. For those new to bioinformatics, it can be unclear how to access the data from this massive r... |
Triangular Numbers | 26 Mar, 2021
A number is termed as triangular number if we can represent it in the form of triangular grid of points such that the points form an equilateral triangle and each row contains as many points as the row number, i.e., the first row has one point, second row has two points, third row has three points and so o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 436,
"s": 52,
"text": "A number is termed as triangular number if we can represent it in the form of triangular grid of points such that the points form an equilateral triangle and each row contain... |
Increment a given date in JavaScript | 17 May, 2019
Given a date, the task is to increment it. To increment a date in javascript, we’re going to discuss few techniques. First few methods to know:
JavaScript getDate() methodThis method returns the day of the month (from 1 to 31) for the defined date.Syntax:Date.getDate()
Return value:It returns a number, fro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2019"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "Given a date, the task is to increment it. To increment a date in javascript, we’re going to discuss few techniques. First few methods to know:"
},
{
"code": null,
... |
Liang-Barsky Algorithm | 18 Mar, 2019
The Liang-Barsky algorithm is a line clipping algorithm. This algorithm is more efficient than Cohen–Sutherland line clipping algorithm and can be extended to 3-Dimensional clipping. This algorithm is considered to be the faster parametric line-clipping algorithm. The following concepts are used in this cl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Mar, 2019"
},
{
"code": null,
"e": 367,
"s": 52,
"text": "The Liang-Barsky algorithm is a line clipping algorithm. This algorithm is more efficient than Cohen–Sutherland line clipping algorithm and can be extended to 3-Dimensional c... |
Are static local variables allowed in Java? | 11 May, 2020
Unlike C/C++, static local variables are not allowed in Java. For example, following Java program fails in compilation with error “Static local variables are not allowed”
class Test { public static void main(String args[]) { System.out.println(fun()); } static int fun() { static int x= 1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 223,
"s": 52,
"text": "Unlike C/C++, static local variables are not allowed in Java. For example, following Java program fails in compilation with error “Static local variables are not allowed”"
... |
How to bind the Escape key to close a window in Tkinter? | Tkinter Events are very useful for making an application interactive and functional. It provides a way to interact with the internal functionality of the application and helps them to rise whenever we perform a Click or Keypress event.
In order to schedule the events in tkinter, we generally use the bind('Button', call... | [
{
"code": null,
"e": 1423,
"s": 1187,
"text": "Tkinter Events are very useful for making an application interactive and functional. It provides a way to interact with the internal functionality of the application and helps them to rise whenever we perform a Click or Keypress event."
},
{
"co... |
Python Program to Concatenate Two Dictionaries Into One | When it is required to concatenate two dictionaries into a single entity, the ‘update’ method can be used.
A dictionary is a ‘key-value’ pair.
Below is a demonstration for the same −
Live Demo
my_dict_1 = {'J':12,'W':22}
my_dict_2 = {'M':67}
print("The first dictionary is :")
print(my_dict_1)
print("The second diction... | [
{
"code": null,
"e": 1294,
"s": 1187,
"text": "When it is required to concatenate two dictionaries into a single entity, the ‘update’ method can be used."
},
{
"code": null,
"e": 1330,
"s": 1294,
"text": "A dictionary is a ‘key-value’ pair."
},
{
"code": null,
"e": 13... |
throw and throws in Java | 26 Jan, 2021
throw
The throw keyword in Java is used to explicitly throw an exception from a method or any block of code. We can throw either checked or unchecked exception. The throw keyword is mainly used to throw custom exceptions.
Syntax:
throw Instance
Example:
throw new ArithmeticException("/ by zero");
But thi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Jan, 2021"
},
{
"code": null,
"e": 58,
"s": 52,
"text": "throw"
},
{
"code": null,
"e": 275,
"s": 58,
"text": "The throw keyword in Java is used to explicitly throw an exception from a method or any block of code... |
Overview of Benchmark Testing in Golang | 25 Aug, 2020
In automation testing, most of the frameworks support only one among functionality testing and benchmark testing. But the Golang testing package provides many functionalities for a different type of testing including benchmark testing.
B is a type(struct) passed to Benchmark functions to manage benchmark t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2020"
},
{
"code": null,
"e": 264,
"s": 28,
"text": "In automation testing, most of the frameworks support only one among functionality testing and benchmark testing. But the Golang testing package provides many functionalities ... |
HTML | DOM Input Radio checked Property | 17 Oct, 2019
The DOM Input Radio checked Property in HTML DOM is used to set or return the checked state of an Input Radio Button. This Property is used to reflect the HTML checked attribute.
Syntax:
It returns the checked property.radioObject.checked
radioObject.checked
It is used to set the checked property:radioObje... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Oct, 2019"
},
{
"code": null,
"e": 232,
"s": 53,
"text": "The DOM Input Radio checked Property in HTML DOM is used to set or return the checked state of an Input Radio Button. This Property is used to reflect the HTML checked attrib... |
Tournament Tree (Winner Tree) and Binary Heap | 17 Jun, 2022
Given a team of N players. How many minimum games are required to find the second-best player?
We can use adversary arguments based on the tournament tree (Binary Heap). A Tournament tree is a form of min (max) heap which is a complete binary tree. Every external node represents a player and the internal... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 149,
"s": 52,
"text": "Given a team of N players. How many minimum games are required to find the second-best player? "
},
{
"code": null,
"e": 389,
"s": 149,
"text": "We can u... |
Postman - Authorization | In Postman, authorization is done to verify the eligibility of a user to access a resource in the server. There could be multiple APIs in a project, but their access can be restricted only for certain authorized users.
The process of authorization is applied for the APIs which are required to be secured. This authoriza... | [
{
"code": null,
"e": 2461,
"s": 2242,
"text": "In Postman, authorization is done to verify the eligibility of a user to access a resource in the server. There could be multiple APIs in a project, but their access can be restricted only for certain authorized users."
},
{
"code": null,
"e... |
STD::array in C++ | 09 Jun, 2022
The array is a collection of homogeneous objects and this array container is defined for constant size arrays or (static size). This container wraps around fixed-size arrays and the information of its size are not lost when declared to a pointer. In order to utilize arrays, we need to include the array hea... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 366,
"s": 52,
"text": "The array is a collection of homogeneous objects and this array container is defined for constant size arrays or (static size). This container wraps around fixed-size arrays ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.