title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to find the href and target attributes in a link in JavaScript? | Javascript has provided document.href and document.target to get the href and target attributes in a link. A link is usually placed in a <p> tag and inside it, an anchor tag is provided, which in turn contains href and target attributes. Let's discuss them individually.
To get the href attribute, document.href must be ... | [
{
"code": null,
"e": 1333,
"s": 1062,
"text": "Javascript has provided document.href and document.target to get the href and target attributes in a link. A link is usually placed in a <p> tag and inside it, an anchor tag is provided, which in turn contains href and target attributes. Let's discuss t... |
Call Stored Procedures within a Stored Procedure with IF Logic? | To call stored procedures within a stored procedure, the syntax is as follows −
If yourInputValue > 100 then
call yourProcedureName1();
else
call yourProcedureName2();
end If ;
END
Let us implement the above syntax. In order to implement the above concept, let us create a stored procedure −
mysql> del... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To call stored procedures within a stored procedure, the syntax is as follows −"
},
{
"code": null,
"e": 1261,
"s": 1142,
"text": "If yourInputValue > 100 then\n call yourProcedureName1();\n else\n call yourProcedureName2();\n... |
Drawing a cross on an image with OpenCV - GeeksforGeeks | 18 Apr, 2022
In this article, we are going to discuss how to draw a cross on an image using OpenCV-Python. We can draw an overlay of two lines one above another to make a cross on an image.
To draw a line on OpenCV, the below function is used.
Syntax: cv2.line(image, starting Point, ending Point, color, thickness)
Pa... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 24080,
"s": 23901,
"text": "In this article, we are going to discuss how to draw a cross on an image using OpenCV-Python. We can draw an overlay of two lines one above another to make a cross... |
java.time.Duration.ofSeconds() Method Example | The java.time.Duration.ofSeconds(long seconds) method obtains a Duration representing a number of standard seconds.
Following is the declaration for java.time.Duration.ofSeconds(long seconds) method.
public static Duration ofSeconds(long seconds)
seconds − the number of seconds, positive or negative.
a Duration, not n... | [
{
"code": null,
"e": 2031,
"s": 1915,
"text": "The java.time.Duration.ofSeconds(long seconds) method obtains a Duration representing a number of standard seconds."
},
{
"code": null,
"e": 2115,
"s": 2031,
"text": "Following is the declaration for java.time.Duration.ofSeconds(long... |
Removing redundant elements from array altogether - JavaScript | We are required to write a function that takes in an array and returns a new array that have all duplicate values removed from it. The values that appeared more than once in the original array should not even appear for once in the new array.
For example, if the input is −
const arr = [763,55,43,22,32,43,763,43];
The o... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "We are required to write a function that takes in an array and returns a new array that have all duplicate values removed from it. The values that appeared more than once in the original array should not even appear for once in the new array."
},
{
... |
How To Build A Real-time Data Pipeline For An Online Store Using Apache Beam, Pub/Sub, and SQL | by Aakash Rathor | Towards Data Science | It is fascinating to see how malleable our data is becoming. Nowadays we have tools to convert highly nested and complex log data to simple rows format, tools to store and process petabytes of transaction data, and tools to capture raw data as soon as it gets generated, to process and provide useful insights from it.
I... | [
{
"code": null,
"e": 490,
"s": 171,
"text": "It is fascinating to see how malleable our data is becoming. Nowadays we have tools to convert highly nested and complex log data to simple rows format, tools to store and process petabytes of transaction data, and tools to capture raw data as soon as it ... |
Deploy your Python app with AWS Fargate — A Tutorial | by Daniel Deutsch | Towards Data Science | About this article
What AWS infrastructure type should I use
AWS account
Set up AWS credentials
Set up credentials with users and roles in IAM
Create a Repository in Elastic Container Registry (ECR)
Configure a cluster
Create task to run Docker container in AWS
Execute Task
Expose defined port within webpage
Watch your... | [
{
"code": null,
"e": 191,
"s": 172,
"text": "About this article"
},
{
"code": null,
"e": 233,
"s": 191,
"text": "What AWS infrastructure type should I use"
},
{
"code": null,
"e": 245,
"s": 233,
"text": "AWS account"
},
{
"code": null,
"e": 268,
... |
Selenium - Webdriver | WebDriver is a tool for automating testing web applications. It is popularly known as Selenium 2.0. WebDriver uses a different underlying framework, while Selenium RC uses JavaScript Selenium-Core embedded within the browser which has got some limitations. WebDriver interacts directly with the browser without any inter... | [
{
"code": null,
"e": 2288,
"s": 1875,
"text": "WebDriver is a tool for automating testing web applications. It is popularly known as Selenium 2.0. WebDriver uses a different underlying framework, while Selenium RC uses JavaScript Selenium-Core embedded within the browser which has got some limitatio... |
JS++ | Virtual Methods - GeeksforGeeks | 30 Aug, 2018
As we mentioned in the previous section, if we want runtime polymorphism, using casts can lead to unclean code.
By way of example, let’s change our main.jspp code so that all our animals are inside an array. From there, we will loop over the array to render the animal. Open main.jspp and change the code to... | [
{
"code": null,
"e": 23601,
"s": 23573,
"text": "\n30 Aug, 2018"
},
{
"code": null,
"e": 23713,
"s": 23601,
"text": "As we mentioned in the previous section, if we want runtime polymorphism, using casts can lead to unclean code."
},
{
"code": null,
"e": 23910,
"s"... |
Instance variables in Java | Instance variables are declared in a class, but outside a method, constructor or any block.
When space is allocated for an object in the heap, a slot for each instance variable value is created.
When space is allocated for an object in the heap, a slot for each instance variable value is created.
Instance variables are... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "Instance variables are declared in a class, but outside a method, constructor or any block."
},
{
"code": null,
"e": 1257,
"s": 1154,
"text": "When space is allocated for an object in the heap, a slot for each instance variable value... |
Java program to store a Student Information in a File using AWT - GeeksforGeeks | 20 May, 2020
Swing is a part of the JFC (Java Foundation Classes). Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains a large set of components which allow a high level of customization and provide rich functionalities, and is used to create window-based applications. Java sw... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 24010,
"s": 23557,
"text": "Swing is a part of the JFC (Java Foundation Classes). Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains a large set of... |
Angular PrimeNG FloatLabel Component - GeeksforGeeks | 30 Jul, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the FloatLabel component in angular PrimeNG.
FloatLabel component ... | [
{
"code": null,
"e": 24718,
"s": 24690,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 25004,
"s": 24718,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
Codenation Interview Experience | On campus for Internship - GeeksforGeeks | 10 Aug, 2020
I applied for two month long summer(2021) internship at codenation. It was an On-campus internship recruitment (Tier – 2 college).
There were 4 rounds including the online coding round.
Coding round: The test was conducted on hacker rank. It consisted of 3 questions based on DSA. 2 were relatively easier w... | [
{
"code": null,
"e": 25155,
"s": 25127,
"text": "\n10 Aug, 2020"
},
{
"code": null,
"e": 25286,
"s": 25155,
"text": "I applied for two month long summer(2021) internship at codenation. It was an On-campus internship recruitment (Tier – 2 college)."
},
{
"code": null,
... |
GATE | GATE-CS-2004 | Question 53 - GeeksforGeeks | 28 Jun, 2021
The employee information in a company is stored in the relation
Employee (name, sex, salary, deptName)
Consider the following SQL query
select deptName
from Employee
where sex = 'M'
group by deptName
having avg (salary) > (select avg (salary) from Employee)
It returns the names... | [
{
"code": null,
"e": 25623,
"s": 25595,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25687,
"s": 25623,
"text": "The employee information in a company is stored in the relation"
},
{
"code": null,
"e": 25726,
"s": 25687,
"text": "Employee (name, sex, salar... |
Python | Convert Bytearray to Hexadecimal String - GeeksforGeeks | 27 Jun, 2019
Sometimes, we might be in a problem in which we need to handle the unusual datatype conversions. One such conversion can be converting the list of bytes(bytearray) to the Hexadecimal string format. Let’s discuss certain ways in which this can be done.
Method #1 : Using format() + join()The combination of a... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n27 Jun, 2019"
},
{
"code": null,
"e": 25789,
"s": 25537,
"text": "Sometimes, we might be in a problem in which we need to handle the unusual datatype conversions. One such conversion can be converting the list of bytes(bytearray)... |
Program to check the validity of password without using regex. - GeeksforGeeks | 04 Apr, 2022
Password checker program basically checks if a password is valid or not based on the password policies mention below:
Password should not contain any space.
Password should contain at least one digit(0-9).
Password length should be between 8 to 15 characters.
Password should contain at least one lo... | [
{
"code": null,
"e": 26477,
"s": 26449,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 26597,
"s": 26477,
"text": "Password checker program basically checks if a password is valid or not based on the password policies mention below: "
},
{
"code": null,
"e": 26638,... |
Python | os.truncate() method - GeeksforGeeks | 11 Oct, 2021
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.truncate() method in Python is used to truncate the file indicated by the specified p... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 25756,
"s": 25537,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable... |
Get the day from a date in Pandas - GeeksforGeeks | 09 Dec, 2021
Given a particular date, it is possible to obtain the day of the week on which the date falls. This is achieved with the help of Pandas library and the to_datetime() method present in pandas. In most of the datasets the Date column appears to be of the data type String, which definitely isn’t comfortable t... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26101,
"s": 25537,
"text": "Given a particular date, it is possible to obtain the day of the week on which the date falls. This is achieved with the help of Pandas library and the to_datetime... |
Python program for arranging the students according to their marks in descending order - GeeksforGeeks | 20 Aug, 2020
Consider a class of 20 students whose names and marks are given to you. The task is to arrange the students according to their marks in decreasing order. Write a python program to perform the task.
Examples:
Input:
Arun: 78%
Geeta: 86%
Shilpi: 65%
Output:
Geeta: 86%
Arun: 78%
Shilpi: 65%
Approach: Sin... | [
{
"code": null,
"e": 26078,
"s": 26050,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 26276,
"s": 26078,
"text": "Consider a class of 20 students whose names and marks are given to you. The task is to arrange the students according to their marks in decreasing order. Write a p... |
Convert given Binary Array to String in C++ with Examples - GeeksforGeeks | 08 Dec, 2021
Given a binary array arr[] containing N integer elements, the task is to create a string s which contains all N elements at the same indices as they were in array arr[].
Example:
Input: arr[] = {0, 1, 0, 1}Output: string = “0101“
Input: arr[] = { 1, 1, 0, 0, 1, 1}Output: string = “110011”
Different methods... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 25537,
"s": 25367,
"text": "Given a binary array arr[] containing N integer elements, the task is to create a string s which contains all N elements at the same indices as they were in array ... |
Java Program to Get the Attributes of a File - GeeksforGeeks | 04 Jan, 2021
In Java, there are several packages and API’s to perform a lot of different functions. One such package is java.nio.file. This package contains various methods which provide support for files. A package is java.nio.file.attribute, which can be used to access the attributes of the files specified in the pat... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 25542,
"s": 25225,
"text": "In Java, there are several packages and API’s to perform a lot of different functions. One such package is java.nio.file. This package contains various methods whi... |
Program to define various types of constants in C# - GeeksforGeeks | 22 Jun, 2020
As in other programming languages, various types of constants are defined the same as defined in C#, we can also define various types of constants and print their values. They are fixed in values in the program. There can be any types of constants like integer, character constants, float, double, string, o... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 25878,
"s": 25547,
"text": "As in other programming languages, various types of constants are defined the same as defined in C#, we can also define various types of constants and print their ... |
How to prevent XSS with HTML/PHP ? - GeeksforGeeks | 17 Dec, 2021
Cross-Site Scripting or XSS is a type of security vulnerability where an attacker gains access to a website and executes a potentially malicious script at the client’s side. This is one of the code injections attacks which can be caused by incorrectly validating user data, which usually gets inserted into ... | [
{
"code": null,
"e": 25901,
"s": 25873,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 26385,
"s": 25901,
"text": "Cross-Site Scripting or XSS is a type of security vulnerability where an attacker gains access to a website and executes a potentially malicious script at the clie... |
Difference between HLookup and VLookup - GeeksforGeeks | 09 Mar, 2021
HLookup :Horizontal Lookup function is called as HLookup function. This function used to find values horizontally across a set of rows in a table. It looks for a value horizontally across the lookup table. It returns an approximate or exact value based on the row number given in Excel. VLookup function pro... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 26468,
"s": 26103,
"text": "HLookup :Horizontal Lookup function is called as HLookup function. This function used to find values horizontally across a set of rows in a table. It looks for a v... |
How to open a link in new tab using Selenium WebDriver? | We can open a link in the new tab with Selenium. . The methods Keys.chord and sendKeys can be used for this. The Keys.chord method allows you to pass multiple keys simultaneously.
We shall send Keys.CONTROL and Keys.ENTER as arguments to the Keys.chord method. Then the complete string is then passed as an argument to t... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "We can open a link in the new tab with Selenium. . The methods Keys.chord and sendKeys can be used for this. The Keys.chord method allows you to pass multiple keys simultaneously."
},
{
"code": null,
"e": 1511,
"s": 1242,
"text": "We... |
How to convert NaN to NA in an R data frame? | To convert NaN to NA in an R data frame, we can set the NaN values to NA values by using single square brackets. Firstly, we would need to access the column that contains NaN values then NaN values will be accessed using is.nan then we can set those values to NA as shown in the below examples.
Consider the below data f... | [
{
"code": null,
"e": 1357,
"s": 1062,
"text": "To convert NaN to NA in an R data frame, we can set the NaN values to NA values by using single square brackets. Firstly, we would need to access the column that contains NaN values then NaN values will be accessed using is.nan then we can set those val... |
How to Build a Machine Learning App in Python | by Chanin Nantasenamat | Towards Data Science | Have you ever wished for a web app that would allow you to build a machine learning model automatically by simply uploading a CSV file? In this article, you will learn how to build your very own machine learning web app in Python in a little over 100 lines of code.
The contents of this article is based on a YouTube vid... | [
{
"code": null,
"e": 438,
"s": 172,
"text": "Have you ever wished for a web app that would allow you to build a machine learning model automatically by simply uploading a CSV file? In this article, you will learn how to build your very own machine learning web app in Python in a little over 100 line... |
Adding a Character as Thousands Separator to Given Number in Java - GeeksforGeeks | 04 Nov, 2020
Given an integer n and character ch, return a String using the character as thousands separator on the given number.
Examples:
Input: n=1234 , ch =’.’
Output: 1.234
In the above-given input, “.” character is used as the thousands separator and is placed between hundreds and thousands of places starting fr... | [
{
"code": null,
"e": 23974,
"s": 23946,
"text": "\n04 Nov, 2020"
},
{
"code": null,
"e": 24091,
"s": 23974,
"text": "Given an integer n and character ch, return a String using the character as thousands separator on the given number."
},
{
"code": null,
"e": 24101,
... |
How B+Tree Indexes Are Built In A Database? | by Christopher Tao | Towards Data Science | If you are not a DBA or a Database Developer, you may not know the mechanisms of the database index. But as long as you can write some SQL queries, you must have been heard of database indexes and know that indexes can improve the performance of the SQL queries.
In one of my previous articles, I have introduced the B+T... | [
{
"code": null,
"e": 435,
"s": 172,
"text": "If you are not a DBA or a Database Developer, you may not know the mechanisms of the database index. But as long as you can write some SQL queries, you must have been heard of database indexes and know that indexes can improve the performance of the SQL q... |
Kruskal's algorithm in Javascript | Kruskal's algorithm is a greedy algorithm that works as follows −
1. It Creates a set of all edges in the graph.
2. While the above set is not empty and not all vertices are covered,
It removes the minimum weight edge from this set
It checks if this edge is forming a cycle or just connecting 2 trees. If it forms a cycl... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Kruskal's algorithm is a greedy algorithm that works as follows −"
},
{
"code": null,
"e": 1175,
"s": 1128,
"text": "1. It Creates a set of all edges in the graph."
},
{
"code": null,
"e": 1245,
"s": 1175,
"text":... |
LinkedList in Arduino | The LinkedList library by Ivan Seidel helps implement this data structure in Arduino. A linked list contains a set of nodes wherein each node contains some data, and a link (reference) to the next node in the list.
To install this library, go to Library Manager, and search for LinkedList.
Once installed, go to: File→ E... | [
{
"code": null,
"e": 1277,
"s": 1062,
"text": "The LinkedList library by Ivan Seidel helps implement this data structure in Arduino. A linked list contains a set of nodes wherein each node contains some data, and a link (reference) to the next node in the list."
},
{
"code": null,
"e": 1... |
List vs tuple vs dictionary in Python | List and Tuple objects are sequences. A dictionary is a hash table of key-value pairs. List and tuple is an ordered collection of items. Dictionary is unordered collection.
List and dictionary objects are mutable i.e. it is possible to add new item or delete and item from it. Tuple is an immutable object. Addition or d... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "List and Tuple objects are sequences. A dictionary is a hash table of key-value pairs. List and tuple is an ordered collection of items. Dictionary is unordered collection."
},
{
"code": null,
"e": 1435,
"s": 1235,
"text": "List and ... |
Random Walks with Restart Explained | by Vatsal | Towards Data Science | The scope of this article is to explain and focus around the conceptual understanding behind the random walk with restart algorithm. A strong mathematical understanding will not be provided here, but I have left links to resources where for those interested can investigate further into the mathematics behind this algor... | [
{
"code": null,
"e": 622,
"s": 171,
"text": "The scope of this article is to explain and focus around the conceptual understanding behind the random walk with restart algorithm. A strong mathematical understanding will not be provided here, but I have left links to resources where for those interest... |
Sum of absolute differences of indices of occurrences of each array element - GeeksforGeeks | 20 May, 2021
Given an array arr[] consisting of N integers, the task for each array element arr[i] is to print the sum of |i – j| for all possible indices j such that arr[i] = arr[j].
Examples:
Input: arr[] = {1, 3, 1, 1, 2}Output: 5 0 3 4 0Explanation: For arr[0], sum = |0 – 0| + |0 – 2| + |0 – 3| = 5. For arr[1], sum... | [
{
"code": null,
"e": 25408,
"s": 25380,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 25579,
"s": 25408,
"text": "Given an array arr[] consisting of N integers, the task for each array element arr[i] is to print the sum of |i – j| for all possible indices j such that arr[i] = ... |
LISP - Tree | You can build tree data structures from cons cells, as lists of lists.
To implement tree structures, you will have to design functionalities that would traverse through the cons cells, in specific order, for example, pre-order, in-order, and post-order for binary trees.
Let us consider a tree structure made up of cons ... | [
{
"code": null,
"e": 2131,
"s": 2060,
"text": "You can build tree data structures from cons cells, as lists of lists."
},
{
"code": null,
"e": 2331,
"s": 2131,
"text": "To implement tree structures, you will have to design functionalities that would traverse through the cons cell... |
Improve Your Data Wrangling With Object Oriented Programming | by Callum Ballard | Towards Data Science | One of the dirty secrets of data science goes as follows:
“Far from spending hours discovering glorious new algorithms and developing cutting edge neural networks, you will in fact spend most of your time cleaning, munging, and manipulating data”
This is the result of a simple, inescapable truth — data in the real worl... | [
{
"code": null,
"e": 230,
"s": 172,
"text": "One of the dirty secrets of data science goes as follows:"
},
{
"code": null,
"e": 419,
"s": 230,
"text": "“Far from spending hours discovering glorious new algorithms and developing cutting edge neural networks, you will in fact spend... |
Collect.js | transform() Function - GeeksforGeeks | 04 Jun, 2020
The transform() function iterates over a collection and callback each item in the collection, the items inside the collection are replaced by the new callback values. It is similar to the JavaScript map() function but the values got replaced in transform() function.In JavaScript, the array is first convert... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n04 Jun, 2020"
},
{
"code": null,
"e": 25287,
"s": 24909,
"text": "The transform() function iterates over a collection and callback each item in the collection, the items inside the collection are replaced by the new callback valu... |
Replace repeating elements with greater that greatest values - GeeksforGeeks | 25 May, 2021
Given an integer array, if an integer is repeating then replace it with a number greater than that number that has not been inserted yet in the array.Examples:
Input : arr = {1, 3, 4, 5, 3}
Output : 1 3 4 5 6
Here 3 is repeating so it is replaced with 6
Input : arr = {1, 3, 4, 4, 5, 3}
Output : 1 3 4 6 ... | [
{
"code": null,
"e": 24719,
"s": 24691,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 24881,
"s": 24719,
"text": "Given an integer array, if an integer is repeating then replace it with a number greater than that number that has not been inserted yet in the array.Examples: "
... |
Create a legend with Pandas and Matplotlib.pyplot | To create a legend with Pandas and matplotib.pyplot(), we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Make a two-dimensional, size-mutable, potentially heterogeneous tabular data.
Plot the dataframe instance with bar class by name and legend is True.
To dis... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To create a legend with Pandas and matplotib.pyplot(), we can take the following steps −"
},
{
"code": null,
"e": 1227,
"s": 1151,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"co... |
Explain the concept of Uninitialized array accessing in C language | In C language, is the program executed, if we use an uninitialized array?
If we use any uninitialized array, compiler will not generate any compilation and an execution error.
If we use any uninitialized array, compiler will not generate any compilation and an execution error.
If an array is uninitialized, you may get ... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "In C language, is the program executed, if we use an uninitialized array?"
},
{
"code": null,
"e": 1238,
"s": 1136,
"text": "If we use any uninitialized array, compiler will not generate any compilation and an execution error."
},
... |
Program to find last digit of n’th Fibonnaci Number in C++ | In this problem, we are given a number N. Our task is to create a Program to find last digit of Nth Fibonacci number in C++.
We need to find the last digit (i.e. LSB ) of the Nth Fibonacci number.
Let’s take an example to understand the problem,
Input: N = 120 Output: 1
A simple solution will be using the direct Fibona... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "In this problem, we are given a number N. Our task is to create a Program to find last digit of Nth Fibonacci number in C++."
},
{
"code": null,
"e": 1259,
"s": 1187,
"text": "We need to find the last digit (i.e. LSB ) of the Nth Fib... |
TestNG - Parameterized Test | Another interesting feature available in TestNG is parametric testing. In most cases, you'll come across a scenario where the business logic requires a hugely varying number of tests. Parameterized tests allow developers to run the same test over and over again using different values.
TestNG lets you pass parameters di... | [
{
"code": null,
"e": 2346,
"s": 2060,
"text": "Another interesting feature available in TestNG is parametric testing. In most cases, you'll come across a scenario where the business logic requires a hugely varying number of tests. Parameterized tests allow developers to run the same test over and ov... |
How to select from table where conditions are set for id and name in MySQL? | Let us first create a table −
mysql> create table DemoTable819(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentName varchar(100)
);
Query OK, 0 rows affected (0.88 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable819(StudentName) values('Chris');
Query OK, 1 row ... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1248,
"s": 1092,
"text": "mysql> create table DemoTable819(\n StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n StudentName varchar(100)\n);\nQuery OK, 0 rows affected (0.... |
Cordova - Vibration | This plugin is used for connecting to device's vibration functionality.
We can install this plugin in command prompt window by running the following code −
C:\Users\username\Desktop\CordovaProject>cordova plugin add cordova-plugin-vibration
Once the plugin is installed we can add buttons in index.html that will be use... | [
{
"code": null,
"e": 2252,
"s": 2180,
"text": "This plugin is used for connecting to device's vibration functionality."
},
{
"code": null,
"e": 2336,
"s": 2252,
"text": "We can install this plugin in command prompt window by running the following code −"
},
{
"code": null... |
How to use Singleton with Global Context in android? | Before getting into example, we should know what singleton design patter is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency, and creating a central point of access for an application to access its data store.
This example de... | [
{
"code": null,
"e": 1367,
"s": 1062,
"text": "Before getting into example, we should know what singleton design patter is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency, and creating a central point of ... |
JavaScript - Array filter() Method | Javascript array filter() method creates a new array with all elements that pass the test implemented by the provided function.
Its syntax is as follows −
array.filter(callback[, thisObject]);
callback − Function to test each element of the array.
callback − Function to test each element of the array.
thisObject − Obj... | [
{
"code": null,
"e": 2594,
"s": 2466,
"text": "Javascript array filter() method creates a new array with all elements that pass the test implemented by the provided function."
},
{
"code": null,
"e": 2621,
"s": 2594,
"text": "Its syntax is as follows −"
},
{
"code": null,... |
Perl - Loops | There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.
Programming languages provide various control structures that allow for more complicated ex... | [
{
"code": null,
"e": 2449,
"s": 2220,
"text": "There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on."
},
{
"code": nu... |
numpy.random.dirichlet() in Python - GeeksforGeeks | 15 Jul, 2020
With the help of dirichlet() method, we can get the random samples from dirichlet distribution and return the numpy array of some random samples by using this method.
Syntax : numpy.random.dirichlet(alpha, size=None)
Parameters :
1) alpha – number of samples.
2) size – output shape of a numpy array.
Return... | [
{
"code": null,
"e": 24483,
"s": 24455,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 24650,
"s": 24483,
"text": "With the help of dirichlet() method, we can get the random samples from dirichlet distribution and return the numpy array of some random samples by using this meth... |
Federated Learning: A Simple Implementation of FedAvg (Federated Averaging) with PyTorch | by Ece Işık Polat | Towards Data Science | Mobile devices such as phones, tablets, and smartwatches are now primary computing devices and have become integral for many people. These devices host huge amounts of valuable and private data thanks to the combination of rich user interactions and powerful sensors. Models trained on such data could significantly impr... | [
{
"code": null,
"e": 718,
"s": 172,
"text": "Mobile devices such as phones, tablets, and smartwatches are now primary computing devices and have become integral for many people. These devices host huge amounts of valuable and private data thanks to the combination of rich user interactions and power... |
MS SQL Server - Quick Guide | This chapter introduces SQL Server, discusses its usage, advantages, versions, and components.
It is a software, developed by Microsoft, which is implemented from the specification of RDBMS.
It is a software, developed by Microsoft, which is implemented from the specification of RDBMS.
It is also an ORDBMS.
It is also ... | [
{
"code": null,
"e": 2330,
"s": 2235,
"text": "This chapter introduces SQL Server, discusses its usage, advantages, versions, and components."
},
{
"code": null,
"e": 2426,
"s": 2330,
"text": "It is a software, developed by Microsoft, which is implemented from the specification o... |
Using Recurrent Neural Networks for Track Detection In Noise | by Jüri Sildam | Towards Data Science | By observing sonar or radar screens, humans can easily detect tracks, formed by objects that typically are far away and are observed only as points. The respective point patterns can be visually detected even in noisy images. Moreover, in cases when tracks keep appearing and disappearing in noise, trained operators can... | [
{
"code": null,
"e": 613,
"s": 171,
"text": "By observing sonar or radar screens, humans can easily detect tracks, formed by objects that typically are far away and are observed only as points. The respective point patterns can be visually detected even in noisy images. Moreover, in cases when track... |
A Complete Guide to Plotting Categorical Variables with Seaborn | by Will Norris | Towards Data Science | · The Data· Categorical Distribution Plots ∘ Box Plots ∘ Violin Plots ∘ Boxen Plot· Categorical Estimate Plots ∘ Bar Plot ∘ Point Plot ∘ Count Plot· Categorical Scatter Plots ∘ Strip Plot ∘ Swarm Plot· Combining Plots· Faceting Data with Catplot· Documentation and Links
In this post we will use one of Seaborn’s conve... | [
{
"code": null,
"e": 445,
"s": 172,
"text": "· The Data· Categorical Distribution Plots ∘ Box Plots ∘ Violin Plots ∘ Boxen Plot· Categorical Estimate Plots ∘ Bar Plot ∘ Point Plot ∘ Count Plot· Categorical Scatter Plots ∘ Strip Plot ∘ Swarm Plot· Combining Plots· Faceting Data with Catplot· Docume... |
MongoDB | Create Database using MongoShell - GeeksforGeeks | 19 Sep, 2019
A MongoDB Database is the container for all the collections, where Collection is a bunch of MongoDB documents similar to tables in RDBMS and Document is made up of the fields similar to a tuple in RDBMS, but it has a dynamic schema here.
Example of a Document:
{
"Name" : "Aman",
Age : 24,
... | [
{
"code": null,
"e": 25638,
"s": 25610,
"text": "\n19 Sep, 2019"
},
{
"code": null,
"e": 25876,
"s": 25638,
"text": "A MongoDB Database is the container for all the collections, where Collection is a bunch of MongoDB documents similar to tables in RDBMS and Document is made up of... |
Find K Closest Points to the Origin - GeeksforGeeks | 25 Nov, 2021
Given a list of points on the 2-D plane and an integer K. The task is to find K closest points to the origin and print them.Note: The distance between two points on a plane is the Euclidean distance.
Examples:
Input : point = [[3, 3], [5, -1], [-2, 4]], K = 2
Output : [[3, 3], [-2, 4]]
Square of Distance ... | [
{
"code": null,
"e": 26615,
"s": 26587,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 26815,
"s": 26615,
"text": "Given a list of points on the 2-D plane and an integer K. The task is to find K closest points to the origin and print them.Note: The distance between two points o... |
LocalDate getDayOfYear() method in Java with Examples - GeeksforGeeks | 28 Nov, 2018
The getDayOfYear() method of LocalDate class in Java gets the day-of-year field.
Syntax:
public int getDayOfYear()
Parameter: This method does not accepts any parameter.
Return Value: The function returns the day of the year which is in range [1, 365/366] depending on leap year or not.
Below programs illu... | [
{
"code": null,
"e": 25499,
"s": 25471,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 25580,
"s": 25499,
"text": "The getDayOfYear() method of LocalDate class in Java gets the day-of-year field."
},
{
"code": null,
"e": 25588,
"s": 25580,
"text": "Syntax:"
... |
Scala Float round() method with example - GeeksforGeeks | 29 Oct, 2019
The round() method is utilized to return the rounded value of the specified float value. If the float value is 5.5 or greater than 5.5 till 5.9, then it will returns 6 otherwise 5 if the float value is 5.0 or till 5.4
Method Definition: (Float_Value).round
Return Type: It returns the rounded value of the s... | [
{
"code": null,
"e": 25195,
"s": 25167,
"text": "\n29 Oct, 2019"
},
{
"code": null,
"e": 25413,
"s": 25195,
"text": "The round() method is utilized to return the rounded value of the specified float value. If the float value is 5.5 or greater than 5.5 till 5.9, then it will retur... |
HTTP headers | Access-Control-Allow-Credentials - GeeksforGeeks | 07 Jan, 2022
The HTTP Access-Control-Allow-Credentials is a Response header. The Access-Control-Allow-Credentials header is used to tell the browsers to expose the response to front-end JavaScript code when the request’s credentials mode Request.credentials is “include”. Remember one thing when the Request.credentials ... | [
{
"code": null,
"e": 25717,
"s": 25689,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 26158,
"s": 25717,
"text": "The HTTP Access-Control-Allow-Credentials is a Response header. The Access-Control-Allow-Credentials header is used to tell the browsers to expose the response to ... |
Python | Decimal logical_xor() method - GeeksforGeeks | 05 Sep, 2019
Decimal#logical_xor() : logical_xor() is a Decimal class method which returns the digit-wise exclusive or of the two Decimal values.
Syntax: Decimal.logical_xor()
Parameter: Decimal values
Return: the digit-wise and of the two (logical) Decimal values.
Code #1 : Example for logical_xor() method
# Python Pr... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 25670,
"s": 25537,
"text": "Decimal#logical_xor() : logical_xor() is a Decimal class method which returns the digit-wise exclusive or of the two Decimal values."
},
{
"code": null,
... |
Axios in React: A Guide for Beginners - GeeksforGeeks | 29 Apr, 2022
In the tech industry, many frontend frameworks are popular, and React is one of them. With any backend language using this framework is not easy. To communicate with the database developers have to follow a specific rule, and they have to write a certain line of code.
In React communicating with the backe... | [
{
"code": null,
"e": 26287,
"s": 26259,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 26557,
"s": 26287,
"text": "In the tech industry, many frontend frameworks are popular, and React is one of them. With any backend language using this framework is not easy. To communicate wi... |
Engineering Mathematics - Well Formed Formulas (WFF) - GeeksforGeeks | 17 Dec, 2021
Well-Formed Formula(WFF) is an expression consisting of variables(capital letters), parentheses, and connective symbols. An expression is basically a combination of operands & operators and here operands and operators are the connective symbols.
Below are the possible Connective Symbols:
¬ (Negation)∧ (Con... | [
{
"code": null,
"e": 25911,
"s": 25883,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 26157,
"s": 25911,
"text": "Well-Formed Formula(WFF) is an expression consisting of variables(capital letters), parentheses, and connective symbols. An expression is basically a combination o... |
Static Single Assignment (with relevant examples) - GeeksforGeeks | 06 Oct, 2021
Static Single Assignment was presented in 1988 by Barry K. Rosen, Mark N, Wegman, and F. Kenneth Zadeck.
In compiler design, Static Single Assignment ( shortened SSA) is a means of structuring the IR (intermediate representation) such that every variable is allotted a value only once and every variable is... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 25771,
"s": 25665,
"text": "Static Single Assignment was presented in 1988 by Barry K. Rosen, Mark N, Wegman, and F. Kenneth Zadeck. "
},
{
"code": null,
"e": 26203,
"s": 2577... |
Check if a queue can be sorted into another queue using a stack - GeeksforGeeks | 13 Jan, 2022
Given a Queue consisting of first n natural numbers (in random order). The task is to check whether the given Queue elements can be arranged in increasing order in another Queue using a stack. The operation allowed are: 1. Push and pop elements from the stack 2. Pop (Or Dequeue) from the given Queue. 3. Pu... | [
{
"code": null,
"e": 25933,
"s": 25905,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 26278,
"s": 25933,
"text": "Given a Queue consisting of first n natural numbers (in random order). The task is to check whether the given Queue elements can be arranged in increasing order in... |
Rotate digits of a given number by K - GeeksforGeeks | 29 Apr, 2021
Given two integers N and K, the task is to rotate the digits of N by K. If K is a positive integer, left rotate its digits. Otherwise, right rotate its digits.
Examples:
Input: N = 12345, K = 2Output: 34512 Explanation: Left rotating N(= 12345) by K(= 2) modifies N to 34512. Therefore, the required output ... | [
{
"code": null,
"e": 26671,
"s": 26643,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 26831,
"s": 26671,
"text": "Given two integers N and K, the task is to rotate the digits of N by K. If K is a positive integer, left rotate its digits. Otherwise, right rotate its digits."
... |
Class getClassLoader() method in Java with Examples - GeeksforGeeks | 27 Jan, 2022
The getClassLoader() method of java.lang.Class class is used to get the classLoader of this entity. This entity can be a class, an array, an interface, etc. The method returns the classLoader of this entity.Syntax:
public ClassLoader getClassLoader()
Parameter: This method does not accept any parameter.R... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 25442,
"s": 25225,
"text": "The getClassLoader() method of java.lang.Class class is used to get the classLoader of this entity. This entity can be a class, an array, an interface, etc. The me... |
Convert numbers into binary representation and add them without carry - GeeksforGeeks | 29 Apr, 2021
Given two numbers N and M. The task to convert both the numbers in the binary form then add respective bits of both the binary converted numbers but with a given condition that there is not any carry system in this addition.
Input: N = 37, M = 12
Output: 41
Input: N = 456, M = 854
Output: 670
Approach... | [
{
"code": null,
"e": 25743,
"s": 25715,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25970,
"s": 25743,
"text": "Given two numbers N and M. The task to convert both the numbers in the binary form then add respective bits of both the binary converted numbers but with a given c... |
How to get form input value using AngularJS ? - GeeksforGeeks | 01 Oct, 2020
Given a form element and the task is to get the form values input by the user with the help of AngularJS.
Approach:
We are storing the data in the JSON object after the user enters it in the input element with the help of the Angular.copy(object) method.
After that, data from the JSON object can be acces... | [
{
"code": null,
"e": 26254,
"s": 26226,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 26360,
"s": 26254,
"text": "Given a form element and the task is to get the form values input by the user with the help of AngularJS."
},
{
"code": null,
"e": 26371,
"s": 2636... |
Python - Data visualization using Bokeh - GeeksforGeeks | 23 Jun, 2020
Bokeh is a data visualization library in Python that provides high-performance interactive charts and plots. Bokeh output can be obtained in various mediums like notebook, html and server. It is possible to embed bokeh plots in Django and flask apps.Bokeh provides two visualization interfaces to users:
bok... | [
{
"code": null,
"e": 26149,
"s": 26121,
"text": "\n23 Jun, 2020"
},
{
"code": null,
"e": 26453,
"s": 26149,
"text": "Bokeh is a data visualization library in Python that provides high-performance interactive charts and plots. Bokeh output can be obtained in various mediums like n... |
Add two bit strings - GeeksforGeeks | 23 Feb, 2022
Given two bit sequences as strings, write a function to return the addition of the two sequences. Bit strings can be of different lengths also. For example, if string 1 is “1100011” and second string 2 is “10”, then the function should return “1100101”.
Since the sizes of two strings may be different, we... | [
{
"code": null,
"e": 24934,
"s": 24906,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 25190,
"s": 24934,
"text": "Given two bit sequences as strings, write a function to return the addition of the two sequences. Bit strings can be of different lengths also. For example, if str... |
Add a Pandas series to another Pandas series - GeeksforGeeks | 30 Jul, 2020
Let us see how to add a Pandas series to another series in Python. This can be done using 2 ways :
append()
concat()
Method 1 : Using the append() function. It appends one series object at the end of another series object and returns an appended series.
# importing the moduleimport pandas as pd # create ... | [
{
"code": null,
"e": 24495,
"s": 24467,
"text": "\n30 Jul, 2020"
},
{
"code": null,
"e": 24594,
"s": 24495,
"text": "Let us see how to add a Pandas series to another series in Python. This can be done using 2 ways :"
},
{
"code": null,
"e": 24603,
"s": 24594,
... |
5 simples steps to build your time series forecasting model | by Mahbubul Alam | Towards Data Science | I am a strong believer in “learning by doing” philosophy.
Data science is an applied field, so you need to get your feet wet to learn something. One can read all the “how to” tutorials on swimming, but at some point, they do have to test the water.
Beginners in data science often get caught into the impression that the... | [
{
"code": null,
"e": 230,
"s": 172,
"text": "I am a strong believer in “learning by doing” philosophy."
},
{
"code": null,
"e": 421,
"s": 230,
"text": "Data science is an applied field, so you need to get your feet wet to learn something. One can read all the “how to” tutorials o... |
How to prepend a string in PHP ? | 31 May, 2020
We have given two strings and the task is to prepend a string str1 with another string str2 in PHP. There is no specific function to prepend a string in PHP. In order to do this task, we have the following operators in PHP:
Method 1: Using Concatenation Operator(“.”): The Concatenation operator is used to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 252,
"s": 28,
"text": "We have given two strings and the task is to prepend a string str1 with another string str2 in PHP. There is no specific function to prepend a string in PHP. In order to do th... |
Sched module in Python | 06 Feb, 2020
Sched module is the standard library, can be used in the creation of bots and other monitoring and automation applications. The sched module implements a generic event scheduler for running tasks at specific times. It provides similar tools like task scheduler in windows or Linux, but the main advantage is... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Feb, 2020"
},
{
"code": null,
"e": 404,
"s": 28,
"text": "Sched module is the standard library, can be used in the creation of bots and other monitoring and automation applications. The sched module implements a generic event schedul... |
How to Create Animated Typing Effect using typed.js ? | 21 Jul, 2020
Typed.js is a JavaScript library which is used to type a set of strings at the speed that you set, backspace what it’s typed and begin the typing with another string you have set.
Let us start by creating a project folder and name it as per your wish. Create two files and name them as “index.html” and “sty... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jul, 2020"
},
{
"code": null,
"e": 232,
"s": 52,
"text": "Typed.js is a JavaScript library which is used to type a set of strings at the speed that you set, backspace what it’s typed and begin the typing with another string you have... |
How to get key attribute of parent div when button is clicked in ReactJS ? | 07 Apr, 2021
In ReactJs we can pass properties in the child component from the parent component. So, we are going to do the same and pass the key of a parent as a property in the child component.
Creating React Application And Installing Module:
Step 1: Create a React application using the following command:npx create-... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "In ReactJs we can pass properties in the child component from the parent component. So, we are going to do the same and pass the key of a parent as a property in the child com... |
Version Control Systems | 29 Jun, 2022
What is a “version control system”?
Version control systems are a category of software tools that helps in recording changes made to files by keeping a track of modifications done in the code.
Why Version Control system is so Important?
As we know that a software product is developed in collaboration by ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 90,
"s": 53,
"text": "What is a “version control system”? "
},
{
"code": null,
"e": 248,
"s": 90,
"text": "Version control systems are a category of software tools that helps in... |
restrict keyword in C | 26 Jul, 2021
In the C programming language (after 99 standard), a new keyword is introduced known as restrict.
restrict keyword is mainly used in pointer declarations as a type qualifier for pointers.
It doesn’t add any new functionality. It is only a way for programmer to inform about an optimization that compiler c... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 154,
"s": 54,
"text": "In the C programming language (after 99 standard), a new keyword is introduced known as restrict. "
},
{
"code": null,
"e": 244,
"s": 154,
"text": "restr... |
minsize() method in Tkinter | Python | 29 Nov, 2021
In Tkinter, minsize() method is used to set the minimum size of the Tkinter window. Using this method user can set window’s initialized size to its minimum size, and still be able to maximize and scale the window larger.
Syntax:
master.minsize(height, width)
Here, height and width are in pixels.
Code #1: R... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 273,
"s": 52,
"text": "In Tkinter, minsize() method is used to set the minimum size of the Tkinter window. Using this method user can set window’s initialized size to its minimum size, and still be... |
Python – all() function | 15 Aug, 2021
The all() function is an inbuilt function in Python which returns true if all the elements of a given iterable( List, Dictionary, Tuple, set, etc) are True else it returns False. It also returns True if the iterable object is empty.
Syntax: all( iterable )
Parameters: Iterable: It is an iterable object su... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Aug, 2021"
},
{
"code": null,
"e": 286,
"s": 53,
"text": "The all() function is an inbuilt function in Python which returns true if all the elements of a given iterable( List, Dictionary, Tuple, set, etc) are True else it returns Fa... |
Minimum Cost Path | Practice | GeeksforGeeks | Given a square grid of size N, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find a path from top left cell to bottom right cell by which the total cost incurred is minimum.
From the cell (i,j) we can go (i,j-1), (i, j+1), (i-1, j), (i+1, j).
Note: It is ass... | [
{
"code": null,
"e": 543,
"s": 238,
"text": "Given a square grid of size N, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find a path from top left cell to bottom right cell by which the total cost incurred is minimum.\nFrom the cell (i,j)... |
Enum with Customized Value in Java | 17 Jul, 2018
Prerequisite : enum in Java
By default enums have their own string values, we can also assign some custom values to enums. Consider below example for that.
Examples:
enum Fruits
{
APPLE(“RED”), BANANA(“YELLOW”), GRAPES(“GREEN”);
}
In above example we can see that the Fruits enum have three members i.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jul, 2018"
},
{
"code": null,
"e": 82,
"s": 54,
"text": "Prerequisite : enum in Java"
},
{
"code": null,
"e": 210,
"s": 82,
"text": "By default enums have their own string values, we can also assign some custom v... |
How to replace a specified element in slice of bytes in Golang? | 26 Aug, 2019
In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which stores elements of a similar type, you are not allowed to store different type of elements in the same slice.In the Go slice of bytes, you are allowe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 968,
"s": 28,
"text": "In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which stores elements o... |
Julia Dictionary | 22 Apr, 2020
Dictionary in Julia is a collection of key-value pairs, where each value in the dictionary can be accessed with its key. These key-value pairs need not be of the same data type, which means a String typed key can hold a value of any type like Integer, String, float, etc. Keys of a dictionary can never be s... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 580,
"s": 53,
"text": "Dictionary in Julia is a collection of key-value pairs, where each value in the dictionary can be accessed with its key. These key-value pairs need not be of the same data ty... |
How to get Post Data in Node.js ? | 20 Nov, 2021
Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recollect that NodeJS isn’t a framework, and it’s not a programming language. In this article, we will discuss how to make post request usi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 346,
"s": 28,
"text": "Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recolle... |
Starting a New Thread in Python | To spawn another thread, you need to call following method available in thread module −
thread.start_new_thread ( function, args[, kwargs] )
This method call enables a fast and efficient way to create new threads in both Linux and Windows.
The method call returns immediately and the child thread starts and calls functi... | [
{
"code": null,
"e": 1275,
"s": 1187,
"text": "To spawn another thread, you need to call following method available in thread module −"
},
{
"code": null,
"e": 1328,
"s": 1275,
"text": "thread.start_new_thread ( function, args[, kwargs] )"
},
{
"code": null,
"e": 1427... |
How to reset/remove CSS styles for element ? | 22 Nov, 2021
The browser uses some pre-defined default values to most of the CSS properties. These default values may vary depending on the browser and also the version of the browser being used. These default values are given in order to ensure uniformity throughout web pages. But in some cases these defaults result i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 1367,
"s": 28,
"text": "The browser uses some pre-defined default values to most of the CSS properties. These default values may vary depending on the browser and also the version of the browser bei... |
How to rotate an Image in ImageView by an angle on Android? | This example demonstrates how do I rotate an image in ImageView by an angle on 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.
<RelativeLayout xmlns:android="http://... | [
{
"code": null,
"e": 1275,
"s": 1187,
"text": "This example demonstrates how do I rotate an image in ImageView by an angle on android."
},
{
"code": null,
"e": 1404,
"s": 1275,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require... |
REPLICATE() Function in SQL Server | 30 Dec, 2020
REPLICATE() function :This function in SQL Server is used to repeat the specified string for a given number of times.
Features :
This function is used to return the stated string for a given number of times.
This function accepts only strings and integers as parameter.
This function returns an error if the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "REPLICATE() function :This function in SQL Server is used to repeat the specified string for a given number of times."
},
{
"code": null,
"e": 157,
"s": 146,
... |
Minimum Cost Graph | 20 Dec, 2021
Given N nodes on a 2-D plane represented as (xi, yi). The nodes are said to be connected if the manhattan distance between them is 1. You can connect two nodes that are not connected at the cost of euclidean distance between them. The task is to connect the graph such that every node has a path from any no... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 383,
"s": 54,
"text": "Given N nodes on a 2-D plane represented as (xi, yi). The nodes are said to be connected if the manhattan distance between them is 1. You can connect two nodes that are not c... |
Sort linked list which is already sorted on absolute values | 30 Jun, 2022
Given a linked list that is sorted based on absolute values. Sort the list based on actual values.
Examples:
Input : 1 -> -10
output: -10 -> 1
Input : 1 -> -2 -> -3 -> 4 -> -5
output: -5 -> -3 -> -2 -> 1 -> 4
Input : -5 -> -10
Output: -10 -> -5
Input : 5 -> 10
output: 5 -> 10
Source : Amazon Int... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 153,
"s": 54,
"text": "Given a linked list that is sorted based on absolute values. Sort the list based on actual values."
},
{
"code": null,
"e": 165,
"s": 153,
"text": "Exampl... |
PDFBox - Reading Text | In the previous chapter, we have seen how to add text to an existing PDF document. In this chapter, we will discuss how to read text from an existing PDF document.
Extracting text is one of the main features of the PDF box library. You can extract text using the getText() method of the PDFTextStripper class. This class... | [
{
"code": null,
"e": 2191,
"s": 2027,
"text": "In the previous chapter, we have seen how to add text to an existing PDF document. In this chapter, we will discuss how to read text from an existing PDF document."
},
{
"code": null,
"e": 2399,
"s": 2191,
"text": "Extracting text is... |
Building a Book Recommender Engine from Scratch and Deploying it to a Web Application | by Zach Alexander | Towards Data Science | Recommendation systems, whether we like them or not, are infiltrating every aspect of our lives. From the queue of shows and movies underneath the “Because you watched” header on your Netflix profile, to the “Made for you” song lists on Spotify, we’ve entered an era where content, media, and information are tailored to... | [
{
"code": null,
"e": 515,
"s": 172,
"text": "Recommendation systems, whether we like them or not, are infiltrating every aspect of our lives. From the queue of shows and movies underneath the “Because you watched” header on your Netflix profile, to the “Made for you” song lists on Spotify, we’ve ent... |
How to flatten a given array up to the specified depth in JavaScript ? - GeeksforGeeks | 08 Apr, 2021
In this article, we will learn how to flatten a given array up to the specified depth in JavaScript.
The flat() method in JavaScript is used to flatten an array up to the required depth. It creates a new array and recursively concatenates the sub-arrays of the original array up to the given depth. The only... | [
{
"code": null,
"e": 37890,
"s": 37862,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 37991,
"s": 37890,
"text": "In this article, we will learn how to flatten a given array up to the specified depth in JavaScript."
},
{
"code": null,
"e": 38350,
"s": 37991,
... |
SQL Tryit Editor v1.6 | SELECT * FROM Customers
WHERE City LIKE '%es%';
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": 24,
"s": 0,
"text": "SELECT * FROM Customers"
},
{
"code": null,
"e": 48,
"s": 24,
"text": "WHERE City LIKE '%es%';"
},
{
"code": null,
"e": 50,
"s": 48,
"text": ""
},
{
"code": null,
"e": 113,
"s": 50,
"text": "Edit t... |
Cordova - Contacts | This plugin is used for accessing the contacts database of the device. In this tutorial we will show you how to create, query and delete contacts.
C:\Users\username\Desktop\CordovaProject>cordova plugin add cordova-plugincontacts
The button will be used for calling the createContact function. We will place it in the d... | [
{
"code": null,
"e": 2327,
"s": 2180,
"text": "This plugin is used for accessing the contacts database of the device. In this tutorial we will show you how to create, query and delete contacts."
},
{
"code": null,
"e": 2411,
"s": 2327,
"text": "C:\\Users\\username\\Desktop\\Cordo... |
Foundation - Centered Columns | Including the class small-centered to column, you can make the column at the center. The large-centered class is used to center the column in large devices. To uncenter the columns in large devices or screen then include large-uncenter class.
The following example demonstrates the use of Centered Columns in Foundation ... | [
{
"code": null,
"e": 2481,
"s": 2238,
"text": "Including the class small-centered to column, you can make the column at the center. The large-centered class is used to center the column in large devices. To uncenter the columns in large devices or screen then include large-uncenter class."
},
{
... |
Playit | This example demonstrates different vertical-aligns.
span#mySpan { background-color:yellow; vertical-align:baseline;} | [
{
"code": null,
"e": 59,
"s": 0,
"text": "\n This example demonstrates different vertical-aligns.\n "
}
] |
Powershell - Read CSV File | Get-Content cmdlet is used to read content of a csv file.
In this example, we're reading content of test.csv.
Get-Content D:\temp\test\test.csv
You can see following output in PowerShell console.
Mahesh,Suresh,Ramesh
15 Lectures
3.5 hours
Fabrice Chrzanowski
35 Lectures
2.5 hours
Vijay Sa... | [
{
"code": null,
"e": 2092,
"s": 2034,
"text": "Get-Content cmdlet is used to read content of a csv file."
},
{
"code": null,
"e": 2144,
"s": 2092,
"text": "In this example, we're reading content of test.csv."
},
{
"code": null,
"e": 2180,
"s": 2144,
"text": "G... |
FuncTools: An Underrated Python Package | by Emmett Boudreau | Towards Data Science | Last month, I wrote an article about some modules in the Python standard library that I have found to be incredibly useful in my programming and Data Science career. The article had such a great reception with quality feedback that I decided to double down on the idea and write another article discussing the same topic... | [
{
"code": null,
"e": 811,
"s": 171,
"text": "Last month, I wrote an article about some modules in the Python standard library that I have found to be incredibly useful in my programming and Data Science career. The article had such a great reception with quality feedback that I decided to double dow... |
Find the Platform at which the given Train arrives - GeeksforGeeks | 29 May, 2021
Given a 2D array arr[][3] consisting of information of N trains where arr[i][0] is the train number, arr[i][1] is the arrival time, and arr[i][2] is the duration of stoppage time. Given another integer F representing the train number, the task is to find the platform number on which the train with train nu... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 26043,
"s": 25687,
"text": "Given a 2D array arr[][3] consisting of information of N trains where arr[i][0] is the train number, arr[i][1] is the arrival time, and arr[i][2] is the duration o... |
Find all distinct palindromic sub-strings of a given String in Python | Suppose we have a string with lowercase ASCII characters, we have to find all distinct continuous palindromic substrings of it.
So, if the input is like "bddaaa", then the output will be [a, aa, aaa, b, d, dd]
To solve this, we will follow these steps −
m := a new map
n := size of s
matrix := make two rows of n number ... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "Suppose we have a string with lowercase ASCII characters, we have to find all distinct continuous palindromic substrings of it."
},
{
"code": null,
"e": 1272,
"s": 1190,
"text": "So, if the input is like \"bddaaa\", then the output w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.