title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Anagram Substring Search (Or Search for all permutations) - GeeksforGeeks | 07 Jul, 2021
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m. Expected time complexity is O(n)Examples:
1) Input: txt[] = "BACDGABCDA" pat[] = "ABCD"
Outp... | [
{
"code": null,
"e": 34596,
"s": 34568,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 34848,
"s": 34596,
"text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or a... |
Sum of all subsequences of a number - GeeksforGeeks | 06 May, 2021
Given a number as string s, find the sum of all the elements present in all possible subsequences of s.Examples :
Input : s = "123"
Output : 24
Explanation : all possible sub-sequences are
1, 2, 3, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}
which add up to 24
Input : s = "453"
Output : 48
Approach : Usi... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 26323,
"s": 26207,
"text": "Given a number as string s, find the sum of all the elements present in all possible subsequences of s.Examples : "
},
{
"code": null,
"e": 26498,
... |
Three Methods for Comparing Text Data to Instantly Boost the Impact of Your Analysis | by Andrew Hong | Towards Data Science | (The data and full Jupyter notebook walk-through can be found here.)
If you’re looking for a job as a data analyst or scientist, as well as trying to learn NLP — get ready to knock out two birds with one stone! For this article, I’ll be using 1000 job postings for “Data Analyst” on Indeed.com as my set of documents (co... | [
{
"code": null,
"e": 241,
"s": 172,
"text": "(The data and full Jupyter notebook walk-through can be found here.)"
},
{
"code": null,
"e": 656,
"s": 241,
"text": "If you’re looking for a job as a data analyst or scientist, as well as trying to learn NLP — get ready to knock out t... |
Advanced Spark Programming | Spark contains two different types of shared variables − one is broadcast variables and second is accumulators.
Broadcast variables − used to efficiently, distribute large values.
Broadcast variables − used to efficiently, distribute large values.
Accumulators − used to aggregate the information of particular collectio... | [
{
"code": null,
"e": 1883,
"s": 1771,
"text": "Spark contains two different types of shared variables − one is broadcast variables and second is accumulators."
},
{
"code": null,
"e": 1951,
"s": 1883,
"text": "Broadcast variables − used to efficiently, distribute large values."
... |
How can I get the current week using Python? | YOu can use the isocalender function from the datetime module to get the current week. Create the object of the date first, then call isocalender() on this object. This returns a 3-tuple of Year, Week number and Day of Week.
import datetime
my_date = datetime.date.today() # if date is 01/01/2018
year, week_num, day_of... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "YOu can use the isocalender function from the datetime module to get the current week. Create the object of the date first, then call isocalender() on this object. This returns a 3-tuple of Year, Week number and Day of Week. "
},
{
"code": null,... |
Josephus problem | Practice | GeeksforGeeks | Given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle in a fixed direction.
The task is to choose the safe place in the circle so that when you perform these operations starting from 1st place in the circle, you are the last one remaining and ... | [
{
"code": null,
"e": 391,
"s": 238,
"text": "Given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle in a fixed direction."
},
{
"code": null,
"e": 568,
"s": 391,
"text": "The task is to choose the safe pl... |
Encode and decode MIME quoted-printable data using Python | Many times we need to deal with data which not always has the regular ASCII characters. For example, an email in a different language other than English. Python has mechanism to deal with such characters by using MIME (Multipurpose Internet Mail Extensions) based module. In this article we will see how we can decode su... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "Many times we need to deal with data which not always has the regular ASCII characters. For example, an email in a different language other than English. Python has mechanism to deal with such characters by using MIME (Multipurpose Internet Mail Extensi... |
Sentiment analysis with a simple naive Bayes classifier in Go | by Sau Sheong | Towards Data Science | I was reading the Master Algorithm by Pedro Domingos recently. It’s a fascinating read, with some interesting ideas. In the book, Domingos proposed that machine learning algorithms can be placed into one of 5 tribes — symbolists, connectionists, evolutionaries, Bayesians and analogizers. Each one of these tribes has a ... | [
{
"code": null,
"e": 794,
"s": 172,
"text": "I was reading the Master Algorithm by Pedro Domingos recently. It’s a fascinating read, with some interesting ideas. In the book, Domingos proposed that machine learning algorithms can be placed into one of 5 tribes — symbolists, connectionists, evolution... |
The easiest way to concatenate two arrays in PHP? | Simply use, array_merge() to concatenate two arrays in PHP. Let’s say the following are out arrays −
$nameArray1 = array('John','David');
$nameArray2 = array('Mike','Sam');
Now, set both the above arrays in array_merge() to concatenate them.
The syntax is as follows −
array_merge($yourFirstArrayName, $yourSecondArrayNa... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "Simply use, array_merge() to concatenate two arrays in PHP. Let’s say the following are out arrays −"
},
{
"code": null,
"e": 1235,
"s": 1163,
"text": "$nameArray1 = array('John','David');\n$nameArray2 = array('Mike','Sam');"
},
... |
What is the usage of an abort event in JavaScript? | Use the on abort event to abort the loading of an image. You can try to run the following code to learn how to implement an abort event in JavaScript.
<!DOCTYPE html>
<html>
<body>
<script>
function abortFunc() {
alert('Error- Loading of the image aborted');
}
</script>
... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Use the on abort event to abort the loading of an image. You can try to run the following code to learn how to implement an abort event in JavaScript."
},
{
"code": null,
"e": 1485,
"s": 1213,
"text": "<!DOCTYPE html>\n<html>\n <bo... |
Automate Your Linux Deployment Using Azure DevOps | by Agustinus Theodorus | Towards Data Science | Feel like you have been logging into your Linux servers too much lately? Good, this might be the right article for you. In teams, either large or small manual deployments can be tedious. But they are also predictable. Deployment steps don’t really change that often unless you have a breaking change or you are implement... | [
{
"code": null,
"e": 513,
"s": 172,
"text": "Feel like you have been logging into your Linux servers too much lately? Good, this might be the right article for you. In teams, either large or small manual deployments can be tedious. But they are also predictable. Deployment steps don’t really change ... |
InfoEdge Interview Experience for Software Engineer | On-Campus - GeeksforGeeks | 07 Sep, 2021
Round 1:
One easy to medium ques based on filling buckets according to queries made by the user (approx. 25 mins) (I was able to pass 7 / 9 test cases)
One hard question based on a greedy algorithm for the max sweetness of sweets. Given 3 vectors, A that has the time taken to make the ith sweet, B that con... | [
{
"code": null,
"e": 25422,
"s": 25394,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 25431,
"s": 25422,
"text": "Round 1:"
},
{
"code": null,
"e": 25574,
"s": 25431,
"text": "One easy to medium ques based on filling buckets according to queries made by the... |
Difference between two selects in MySQL? | You can use subqueries for difference between two selects in MySQL. The syntax is as follows:
SELECT *FROM yourTableName where yourColumnName NOT IN(SELECT yourColumnName FROM youTableName WHERE yourCondition;
To understand the above syntax, let us create a table. The query to create a table is as follows:
mysql> creat... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "You can use subqueries for difference between two selects in MySQL. The syntax is as follows:"
},
{
"code": null,
"e": 1272,
"s": 1156,
"text": "SELECT *FROM yourTableName where yourColumnName NOT IN(SELECT yourColumnName FROM youTab... |
Python3 Program to Move all zeroes to end of array - GeeksforGeeks | 23 Dec, 2021
Given an array of random numbers, Push all the zero’s of a given array to the end of the array. For example, if the given arrays is {1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0}, it should be changed to {1, 9, 8, 4, 2, 7, 6, 0, 0, 0, 0}. The order of all other elements should be same. Expected time complexity is O(n) ... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 26493,
"s": 26151,
"text": "Given an array of random numbers, Push all the zero’s of a given array to the end of the array. For example, if the given arrays is {1, 9, 8, 4, 0, 0, 2, 7, 0, 6, ... |
Amazon Interview Experience for SDE-1 (Off-Campus) - GeeksforGeeks | 29 Sep, 2021
In the month of April – May Hackathon named HackOn was held on the HackerEarth platform by Amazon.
Round 1: Coding Round
Time: 3 questions in 2 hours
Given a string of 0’s and 1’s. You are allowed to do 2 operations on this string.
Exor of any 2 consecutive elements and replace them with the result.
And of... | [
{
"code": null,
"e": 26287,
"s": 26259,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 26386,
"s": 26287,
"text": "In the month of April – May Hackathon named HackOn was held on the HackerEarth platform by Amazon."
},
{
"code": null,
"e": 26408,
"s": 26386,
... |
Flutter - Expansion Card - GeeksforGeeks | 15 Feb, 2021
The expansion_card package is used to easily implement Expandable cards in Flutter. Images and GIFs can also be used as a background to enhance the beauty of the card, which would expand when the card is expanded. The Expansion card has a wide range of properties that can be manipulated to changes the eff... | [
{
"code": null,
"e": 25371,
"s": 25343,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 25798,
"s": 25371,
"text": "The expansion_card package is used to easily implement Expandable cards in Flutter. Images and GIFs can also be used as a background to enhance the beauty of the ... |
The ultimate guide to writing better Python code | by Ari Joury | Towards Data Science | Despite its downsides, Python remains the king of today’s programming world. Its versatility, beginner-friendliness, and huge community are just a few factors that have contributed to its tremendous growth over the last few years. And even though newer languages like Rust, Go, and Julia are gaining traction, Python’s r... | [
{
"code": null,
"e": 543,
"s": 172,
"text": "Despite its downsides, Python remains the king of today’s programming world. Its versatility, beginner-friendliness, and huge community are just a few factors that have contributed to its tremendous growth over the last few years. And even though newer la... |
What is the difference between a language construct and a “built-in” function in PHP ? - GeeksforGeeks | 26 Feb, 2019
In programming, language constructs and built-in functions are often misinterpreted with one another due to the fact that both have more or less alike behavior. But they differ from each other in the way the PHP interpreter interprets them. Every programming language consists of tokens and structures which... | [
{
"code": null,
"e": 26423,
"s": 26395,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 27166,
"s": 26423,
"text": "In programming, language constructs and built-in functions are often misinterpreted with one another due to the fact that both have more or less alike behavior. Bu... |
current_url driver method – Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 767,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
Interpolated Verbatim Strings in C# 8.0 | 29 Dec, 2019
Before C# 8.0 you are allowed to use string interpolation($) and verbatim identifier(@) together but in a specific sequence. It means when you use $ token and @ token together, it is necessary that $ token must appear before the @ token. If you use the @ token before $ token, then the compiler will give yo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "Before C# 8.0 you are allowed to use string interpolation($) and verbatim identifier(@) together but in a specific sequence. It means when you use $ token and @ token together... |
PostgreSQL – CREATE SCHEMA | 28 Aug, 2020
PostgreSQL has a CREATE SCHEMA statement that is used to create a new schema in a database.
Syntax:
CREATE SCHEMA [IF NOT EXISTS] schema_name;
Let’s analyze the above syntax:
First, specify the name of the schema after the CREATE SCHEMA keywords. The schema name must be unique within the current database.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 120,
"s": 28,
"text": "PostgreSQL has a CREATE SCHEMA statement that is used to create a new schema in a database."
},
{
"code": null,
"e": 171,
"s": 120,
"text": "Syntax:\nCREAT... |
How to Import JSON Data into SQL Server? | 23 Sep, 2021
JSON refers to Javascript Object Notation. It is a popular text data format used to exchange data on modern web and mobile applications. It is based on a subset of the Javascript programming language. It is used to store random data in log files or NoSQL.
It also enables us to integrate NoSQL and related c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 284,
"s": 28,
"text": "JSON refers to Javascript Object Notation. It is a popular text data format used to exchange data on modern web and mobile applications. It is based on a subset of the Javascr... |
Python Dictionary Comprehension | 07 Nov, 2017
Like List Comprehension, Python allows dictionary comprehensions. We can create dictionaries using simple expressions.A dictionary comprehension takes the form {key: value for (key, value) in iterable}
Let’s see a example,lets assume we have two lists named keys and value now,
# Python code to demonstrate ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Nov, 2017"
},
{
"code": null,
"e": 254,
"s": 52,
"text": "Like List Comprehension, Python allows dictionary comprehensions. We can create dictionaries using simple expressions.A dictionary comprehension takes the form {key: value fo... |
Method Class | equals() Method in Java | 26 May, 2022
The java.lang.reflect.Method.equals(Object obj) method of Method class compares this Method Object against the specified object as parameter to equal(object obj) method. This method returns true if Method object is same as passed object. Two Methods are the same if they were declared by the same class and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 406,
"s": 28,
"text": "The java.lang.reflect.Method.equals(Object obj) method of Method class compares this Method Object against the specified object as parameter to equal(object obj) method. This ... |
return 0 vs return 1 in C++ | 20 Jun, 2022
The Return statement in C/C++:
C and C++ support return statements, which are also called jump statements.
It is used to return a value from the function or stop the execution of the function. For more information on return statements, please refer to article return statement in C/C++ with examples.
There ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 84,
"s": 53,
"text": "The Return statement in C/C++:"
},
{
"code": null,
"e": 160,
"s": 84,
"text": "C and C++ support return statements, which are also called jump statements."... |
Python | Find the tuples containing the given element from a list of tuples | 26 Jul, 2021
Given a list of tuples, the task is to find all those tuples containing the given element, say n.Examples:
Input: n = 11, list = [(11, 22), (33, 55), (55, 77), (11, 44)] Output: [(11, 22), (11, 44)]Input: n = 3, list = [(14, 3),(23, 41),(33, 62),(1, 3),(3, 3)] Output: [(14, 3), (1, 3), (3, 3)]
There are ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 162,
"s": 53,
"text": "Given a list of tuples, the task is to find all those tuples containing the given element, say n.Examples: "
},
{
"code": null,
"e": 350,
"s": 162,
"text... |
Selenium Python Basics | 27 Feb, 2020
Selenium is a portable framework for testing web applications. Selenium provides a playback tool for authoring functional tests without the need to learn a test scripting language. Before Going Ahead Please refer to this page if you had not installed Selenium. This article revolves around Locators in Selen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 363,
"s": 28,
"text": "Selenium is a portable framework for testing web applications. Selenium provides a playback tool for authoring functional tests without the need to learn a test scripting lang... |
How to perform form validation for a required field in HTML ? | 20 Aug, 2021
The form data is very important for a website and it is necessary that the correct form data or valid form data is submitted to the form. In order to make sure that the form data is valid or to make an input field mandatory, various attributes can be used. We shall discuss the following attributes in this ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 389,
"s": 28,
"text": "The form data is very important for a website and it is necessary that the correct form data or valid form data is submitted to the form. In order to make sure that the form d... |
Anonymise Sensitive Data in a Pandas DataFrame Column with hashlib | by Rhys Kilian | Towards Data Science | A common scenario encountered by Data Scientists is sharing data with others. But what should you do if that data contains personally identifiable information (PII) such as email addresses, customer IDs or phone numbers?
A simple solution is to remove these fields before sharing the data. However, your analysis may rel... | [
{
"code": null,
"e": 393,
"s": 172,
"text": "A common scenario encountered by Data Scientists is sharing data with others. But what should you do if that data contains personally identifiable information (PII) such as email addresses, customer IDs or phone numbers?"
},
{
"code": null,
"e... |
Haskell - Nested if-else statement | In the above example, we have seen the use of if-else statement in Haskell. Here, we will learn how to use multiple if-else statements in one Haskell program.
In Haskell, multiple lines of if will be used by separating each of the if statement with its corresponding else statement.
The following code shows how you can ... | [
{
"code": null,
"e": 2074,
"s": 1915,
"text": "In the above example, we have seen the use of if-else statement in Haskell. Here, we will learn how to use multiple if-else statements in one Haskell program."
},
{
"code": null,
"e": 2198,
"s": 2074,
"text": "In Haskell, multiple li... |
CodeIgniter - Application Profiling | When building a web application, we are very much concerned about the performance of the website in terms of how much time the controller took to execute and how much memory is used. Not only the performance, but we also need to see the insights of data like POST data, data of database queries, session data etc. for de... | [
{
"code": null,
"e": 2763,
"s": 2319,
"text": "When building a web application, we are very much concerned about the performance of the website in terms of how much time the controller took to execute and how much memory is used. Not only the performance, but we also need to see the insights of data... |
Python 3 - String join() Method | The join() method returns a string in which the string elements of sequence have been joined by str separator.
Following is the syntax for join() method −
str.join(sequence)
sequence − This is a sequence of the elements to be joined.
This method returns a string, which is the concatenation of the strings in the sequen... | [
{
"code": null,
"e": 2451,
"s": 2340,
"text": "The join() method returns a string in which the string elements of sequence have been joined by str separator."
},
{
"code": null,
"e": 2495,
"s": 2451,
"text": "Following is the syntax for join() method −"
},
{
"code": null,... |
Change the position of MessageBox - Tkinter - GeeksforGeeks | 01 Oct, 2020
Prerequisite:
Python tkinter
Python tkinter message box widget
Python tkinter toplevel widget
Python offers many Libraries and Framework for Creating and developing GUI (Graphical User Interface). Out of all GUI libraries or frameworks, Tkinter is the most commonly used method because it is comparatively... | [
{
"code": null,
"e": 24238,
"s": 24210,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24253,
"s": 24238,
"text": "Prerequisite: "
},
{
"code": null,
"e": 24268,
"s": 24253,
"text": "Python tkinter"
},
{
"code": null,
"e": 24302,
"s": 24268,
... |
Create a procedure in MySQL with parameters? | You can create a parameter using IN and OUT. IN is used to take input parameter and OUT can be used for output.
The syntax is as follows
DELIMITER //
CREATE PROCEDURE yourProcedureName(IN yourParameterName dataType,OUT
yourParameterName dataType
)
BEGIN
yourStatement1;
yourStatement2;
.
.
N
END;
//
DELIMITER ;
First... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "You can create a parameter using IN and OUT. IN is used to take input parameter and OUT can be used for output."
},
{
"code": null,
"e": 1199,
"s": 1174,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1377,
... |
SIP - Mobility | Personal mobility is the ability to have a constant identifier across a number of devices. SIP supports basic personal mobility using the REGISTER method, which allows a mobile device to change its IP address and point of connection to the Internet and still be able to receive incoming calls.
SIP can also support servi... | [
{
"code": null,
"e": 2144,
"s": 1850,
"text": "Personal mobility is the ability to have a constant identifier across a number of devices. SIP supports basic personal mobility using the REGISTER method, which allows a mobile device to change its IP address and point of connection to the Internet and ... |
Connect to external server by using phpMyAdmin | The below lines of code can be added to the /etc/phpmyadmin/config.inc.php file at the bottom −
$i++;
$cfg['Servers'][$i]['host'] = 'HostName:port';
// hostname and port are provided if they are not default values
$cfg['Servers'][$i]['user'] = 'userName';
//user name for the remote server
$cfg['Servers'][$i]['passwor... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "The below lines of code can be added to the /etc/phpmyadmin/config.inc.php file at the bottom −"
},
{
"code": null,
"e": 1461,
"s": 1158,
"text": "$i++;\n$cfg['Servers'][$i]['host'] = 'HostName:port'; \n// hostname and port are provi... |
Mapping Geograph Data in Python. One great help when working in Data... | by Marcelo Rovai | Towards Data Science | One great help when working in Data Science, is to visualize your data on a geo map and for that, several packages can take care of it, as GeoPandas for example.
You can learn how to use GeoPandas, reading my article: How Safe are the Streets of Santiago.
Sometimes install Geopandas packages can be complicated, dependi... | [
{
"code": null,
"e": 334,
"s": 172,
"text": "One great help when working in Data Science, is to visualize your data on a geo map and for that, several packages can take care of it, as GeoPandas for example."
},
{
"code": null,
"e": 428,
"s": 334,
"text": "You can learn how to use... |
How to create a list of files, folders, and subfolders in Excel using Python ? - GeeksforGeeks | 07 Mar, 2022
In this article, we will learn How to create a list of Files, Folders, and Sub Folders and then export them to Excel using Python. We will create a list of names and paths using a few folder traversing methods explained below and store them in an Excel sheet by either using openpyxl or pandas module.
Input... | [
{
"code": null,
"e": 24236,
"s": 24208,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 24538,
"s": 24236,
"text": "In this article, we will learn How to create a list of Files, Folders, and Sub Folders and then export them to Excel using Python. We will create a list of names a... |
How to set focus on Entry widget in Tkinter? | Let us suppose that there are some widgets present in an application such that we have to focus on a particular widget. By using the focus_set() method, we can activate the focus on any widget and give them priority while executing the application.
#Import tkinter library
from tkinter import *
#Create an instance of t... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "Let us suppose that there are some widgets present in an application such that we have to focus on a particular widget. By using the focus_set() method, we can activate the focus on any widget and give them priority while executing the application."
}... |
How to convert a Bitmap to Drawable in Kotlin? | This example demonstrates how to convert a Bitmap to Drawable in Kotlin.
Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "This example demonstrates how to convert a Bitmap to Drawable in Kotlin."
},
{
"code": null,
"e": 1263,
"s": 1135,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to cre... |
How to handle a Button click event in tkinter? | Sometimes, handling events in a Tkinter application can become a daunting task for us. We have to manage the action and events which need to be executed at the time of running the application. The Button widget is useful for handling such events. We can use Button widget to perform a certain task or event by passing th... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "Sometimes, handling events in a Tkinter application can become a daunting task for us. We have to manage the action and events which need to be executed at the time of running the application. The Button widget is useful for handling such events. We can... |
The Most Complete Guide to pySpark DataFrames | by Rahul Agarwal | Towards Data Science | Big Data has become synonymous with Data engineering. But the line between Data Engineering and Data scientists is blurring day by day. At this point in time, I think that Big Data must be in the repertoire of all data scientists.
Reason: Too much data is getting generated day by day
And that brings us to Spark which i... | [
{
"code": null,
"e": 403,
"s": 172,
"text": "Big Data has become synonymous with Data engineering. But the line between Data Engineering and Data scientists is blurring day by day. At this point in time, I think that Big Data must be in the repertoire of all data scientists."
},
{
"code": nu... |
BigInteger mod() Method in Java - GeeksforGeeks | 04 Dec, 2018
The java.math.BigInteger.mod(BigInteger big) method returns a BigInteger whose value is equal to (this BigInteger modfunction big(BigInteger passed as parameter)).In other words we can say that this method returns the value after performing (this % big) step.The mod operation finds the remainder after divi... | [
{
"code": null,
"e": 25762,
"s": 25734,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 26136,
"s": 25762,
"text": "The java.math.BigInteger.mod(BigInteger big) method returns a BigInteger whose value is equal to (this BigInteger modfunction big(BigInteger passed as parameter)).... |
World2 model, from DYNAMO to R. The first doomsday computer model... | by Arnaud M. | Towards Data Science | “In 1972 a small paperbound book called ‘The Limits to Growth’ was published with much fanfare [...] the book warned that the world was steering a course for disaster. Without a drastic change in direction, the human population would run out of food and natural resources, or else would choke on its own pollution, withi... | [
{
"code": null,
"e": 526,
"s": 172,
"text": "“In 1972 a small paperbound book called ‘The Limits to Growth’ was published with much fanfare [...] the book warned that the world was steering a course for disaster. Without a drastic change in direction, the human population would run out of food and n... |
How to Create a Covariance Matrix in R? - GeeksforGeeks | 04 Jan, 2022
In this article, we will discuss how to create a Covariance Matrix in the R Programming Language.
Covariance is the statistical measure that depicts the relationship between a pair of random variables that shows how the change in one variable causes changes in another variable. It is a measure of the degre... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 26695,
"s": 26597,
"text": "In this article, we will discuss how to create a Covariance Matrix in the R Programming Language."
},
{
"code": null,
"e": 26955,
"s": 26695,
"... |
Rotate matrix elements clockwise | Practice | GeeksforGeeks | Given two integers M, N, and a 2D matrix Mat of dimensions MxN, clockwise rotate the elements in it.
Example 1:
Input:
M=3,N=3
Mat=[[1,2,3],[4,5,6],[7,8,9]]
Output:
4 1 2
7 5 3
8 9 6
Explanation:
Rotating the matrix clockwise gives this result.
Example 2:
Input:
M=2,N=3
Mat=[[1,2,3],[2,3,3]]
Output:
2 1 2
3 3 3
Explana... | [
{
"code": null,
"e": 339,
"s": 238,
"text": "Given two integers M, N, and a 2D matrix Mat of dimensions MxN, clockwise rotate the elements in it."
},
{
"code": null,
"e": 350,
"s": 339,
"text": "Example 1:"
},
{
"code": null,
"e": 483,
"s": 350,
"text": "Input... |
Python – Replace String by Kth Dictionary value | 01 Aug, 2020
Given list of Strings, replace the value mapped by Kth value of mapped list.
Input : test_list = [“Gfg”, “is”, “Best”], subs_dict = {“Gfg” : [5, 6, 7], “is” : [7, 4, 2]}, K = 0Output : [5, 7, “Best”]Explanation : “Gfg” and “is” is replaced by 5, 7 as 0th index in dictionary value list.
Input : test_list = ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 105,
"s": 28,
"text": "Given list of Strings, replace the value mapped by Kth value of mapped list."
},
{
"code": null,
"e": 315,
"s": 105,
"text": "Input : test_list = [“Gfg”, “... |
QTP - Child Objects | The objects (text box, combo box, links) contained in the frame or window is known as child objects. Sometimes, we would be in a situation to get the properties of all the links in a webpage or to get the values of all radio buttons in a window.
In these circumstances, if we want to work on the child objects, we need t... | [
{
"code": null,
"e": 2502,
"s": 2256,
"text": "The objects (text box, combo box, links) contained in the frame or window is known as child objects. Sometimes, we would be in a situation to get the properties of all the links in a webpage or to get the values of all radio buttons in a window."
},
... |
How to Change the Oracle Database Password? | 14 Sep, 2021
Select a secure password and implementing complex password policies are by far the most important defense for protecting against password-based security threats in any database. Here are several methods for changing or resetting the password for an Oracle database. We can change the Oracle database passwor... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 392,
"s": 53,
"text": "Select a secure password and implementing complex password policies are by far the most important defense for protecting against password-based security threats in any databa... |
Python – Convert Tick-by-Tick data into OHLC (Open-High-Low-Close) Data | 17 Jul, 2020
In this post, we’ll explore a Python pandas package feature. We frequently find queries about converting tick-by-tick data to OHLC (Open, High, Low and Close). Using pandas kit this can be done with minimum effort. The OHLC data is used over a unit of time (1 day, 1 hour etc.) to perform a technical analys... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 357,
"s": 28,
"text": "In this post, we’ll explore a Python pandas package feature. We frequently find queries about converting tick-by-tick data to OHLC (Open, High, Low and Close). Using pandas ki... |
K-th digit from the end of a number | 28 Jan, 2022
Given an integer N, the task is to find the Kth digit from the end of an integer N. If the Kth digit is not present, then print -1.
Examples:
Input: N = 2354, K = 2Output: 5
Input: N = 1234, K = 1Output: 4
Naive Approach: This simplest approach to solve this problem is converting the integer N to string. F... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "Given an integer N, the task is to find the Kth digit from the end of an integer N. If the Kth digit is not present, then print -1."
},
{
"code": null,
"e": 170,
... |
Software Framework vs Library | 11 Jul, 2022
Many of us will be unaware of this difference which is really important to understand during development. The possible answer to this question, if asked, will be “Framework is a collection of various libraries”. However, this definition is not entirely true. “Who calls whom” i.e. the caller/callee relation... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 537,
"s": 53,
"text": "Many of us will be unaware of this difference which is really important to understand during development. The possible answer to this question, if asked, will be “Framework i... |
Topological Sorting using graphlib Python module | 17 Dec, 2020
Topological Sorting is a linear ordering for vertices of Directed Acyclic Graph. For every directed edge u v, vertex u comes before v in the topological sorting.
Python’s module graphlib introduced in Python 3.9.0, gives the topological sorting of a graph, where the graph is represented in a dictionary. As... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "Topological Sorting is a linear ordering for vertices of Directed Acyclic Graph. For every directed edge u v, vertex u comes before v in the topological sorting."
},
{
... |
echo command in Linux with Examples | 01 Jul, 2022
echo command in linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.
Syntax :
echo [option] [string]
Displaying a text/string : Syntax :
echo [string]
Exa... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 276,
"s": 54,
"text": "echo command in linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files ... |
How to get the source code of a web page using PHP ? | 08 Feb, 2021
Given a webpage, for which we need to find its source code using PHP. For this, we are going to use the PHP htmlspecialchars() function which converts any predefined characters to their subsequent HTML entities.
Example 1: Suppose we take a sample website that looks like the below image, let us see what ou... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Given a webpage, for which we need to find its source code using PHP. For this, we are going to use the PHP htmlspecialchars() function which converts any predefined character... |
Java Program to Demonstrate the Lazy Initialization Thread-Safe | 14 Feb, 2022
Java is a popular object-oriented programming language used by developers and coders for website/app development. The creation of a class object using a new keyword is referred to as object instantiation. Java by default allows users to define two ways of object instantiation which are Eager and Lazy. Java... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 897,
"s": 28,
"text": "Java is a popular object-oriented programming language used by developers and coders for website/app development. The creation of a class object using a new keyword is referre... |
Infix to Postfix | Practice | GeeksforGeeks | Given an infix expression in the form of string str. Convert this infix expression to postfix expression.
Infix expression: The expression of the form a op b. When an operator is in-between every pair of operands.
Postfix expression: The expression of the form a b op. When an operator is followed for every pair of oper... | [
{
"code": null,
"e": 344,
"s": 238,
"text": "Given an infix expression in the form of string str. Convert this infix expression to postfix expression."
},
{
"code": null,
"e": 452,
"s": 344,
"text": "Infix expression: The expression of the form a op b. When an operator is in-betw... |
Difference between Implicit and Explicit Cursors - GeeksforGeeks | 08 Feb, 2022
Databases such as ORACLE have a memory area, where processing of instructions and fetched data takes place.A cursor is a pointer which is pointing to this area.The data contained in this memory area is also known as Active Set. Cursors can be broadly classified into Implicit Cursors and Explicit Cursors.
... | [
{
"code": null,
"e": 25684,
"s": 25656,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 25991,
"s": 25684,
"text": "Databases such as ORACLE have a memory area, where processing of instructions and fetched data takes place.A cursor is a pointer which is pointing to this area.The... |
How to Access All Users in Linux Using Different Commands? - GeeksforGeeks | 22 Jun, 2020
Linux allows multiple users with their own custom setting and configuration to work together on the same system, even at the same time. It can even allow a particular user to access several sessions from different locations in order to work on the system. Below is a list of different commands to access the... | [
{
"code": null,
"e": 25761,
"s": 25733,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 26093,
"s": 25761,
"text": "Linux allows multiple users with their own custom setting and configuration to work together on the same system, even at the same time. It can even allow a particu... |
How to recognize and fix broken lines in table recognition | by Hucker Marius | Towards Data Science | When documents are digitalized via scanning or via photo, the image quality can suffer from wrong settings or bad conditions. In the case of table recognition, this can lead to a broken table structure. Consequently, some lines might have light flaws or even holes and the table as a whole is not recognized as a coheren... | [
{
"code": null,
"e": 840,
"s": 172,
"text": "When documents are digitalized via scanning or via photo, the image quality can suffer from wrong settings or bad conditions. In the case of table recognition, this can lead to a broken table structure. Consequently, some lines might have light flaws or e... |
Explain the purpose of the Startup class in ASP.NET Core | The Startup class configures your application's services and defines the middleware pipeline.
Generally speaking, the Program class is where you configure your application's infrastructure, such as the HTTP server, integration with IIS, and configuration sources. In contrast, the Startup class defines which components ... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "The Startup class configures your application's services and defines the middleware pipeline."
},
{
"code": null,
"e": 1459,
"s": 1156,
"text": "Generally speaking, the Program class is where you configure your application's infrastr... |
Clear browser Cookies with Selenium WebDriver Java bindings. | We can clear browser cookies in Selenium. The method deleteCookieNamed shall delete a cookie with a specific name. The cookie named is passed as an argument to the method. First, we will add a cookie, then get it and finally delete it.
driver.manage().deleteCookieNamed("foo");
Another method called the deleteAllCookies... | [
{
"code": null,
"e": 1298,
"s": 1062,
"text": "We can clear browser cookies in Selenium. The method deleteCookieNamed shall delete a cookie with a specific name. The cookie named is passed as an argument to the method. First, we will add a cookie, then get it and finally delete it."
},
{
"co... |
SQL vs. Pandas — Which one to choose in 2020? | by Dario Radečić | Towards Data Science | SQL has been around for decades now and is a quite popular option because almost everybody knows it, and it’s easy to learn and understand. A lot of the time later came Pandas — and most of us fall in love ever since. Today we’ll start comparing these two, from basics to more advanced stuff — analytics-wise.
SQL and Py... | [
{
"code": null,
"e": 482,
"s": 172,
"text": "SQL has been around for decades now and is a quite popular option because almost everybody knows it, and it’s easy to learn and understand. A lot of the time later came Pandas — and most of us fall in love ever since. Today we’ll start comparing these two... |
Aptitude - Squares & Cubes Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to Squares & Cubes. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in t... | [
{
"code": null,
"e": 4221,
"s": 3892,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to Squares & Cubes. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer butt... |
Set max_size() function in C++ STL | In this article we are going to discuss the set::max_size() in C++ STL, their syntax, working and their return values.
Sets in C++ STL are the containers which must have unique elements in a general order. Sets must have unique elements because the value of the element identifies the element. Once added a value in set ... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "In this article we are going to discuss the set::max_size() in C++ STL, their syntax, working and their return values."
},
{
"code": null,
"e": 1514,
"s": 1181,
"text": "Sets in C++ STL are the containers which must have unique eleme... |
How to Prepare Data for Credit Risk Modeling | by Claire Zhang | Towards Data Science | Credit risk measures the probabilities of borrowers fail to pay back the debt and thus default on their obligations. Credit risk modeling is widely adopted in banking industry for multiple applications: from underwriting, account management (e.g. extending line of credits), credit allowance (CECL under GAAP and IFRS-9)... | [
{
"code": null,
"e": 562,
"s": 171,
"text": "Credit risk measures the probabilities of borrowers fail to pay back the debt and thus default on their obligations. Credit risk modeling is widely adopted in banking industry for multiple applications: from underwriting, account management (e.g. extendin... |
Rust – Match Operator | 15 Nov, 2021
Match Operator is a powerful operator which lets you match a particular value with a range of values and execute some operations or code for it. It is similar to switch() in Java.
For checking for a group of values, where the value to be checked is “cp”.
Syntax :
let gfg = String::from("cp");
// mat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "Match Operator is a powerful operator which lets you match a particular value with a range of values and execute some operations or code for it. It is similar to switch() in J... |
Metadata in DBMS and it’s types | 10 May, 2020
Metadata is simply defined as data about data. It means it is a description and context of the data. It helps to organize, find and understand data. Let me explain to you by giving a real-world example of metadata:
Every time you take a photo with today’s cameras a bunch of metadata is gathered and saved w... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 268,
"s": 53,
"text": "Metadata is simply defined as data about data. It means it is a description and context of the data. It helps to organize, find and understand data. Let me explain to you by ... |
Pandas GroupBy | 29 Dec, 2021
Groupby is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept but it’s an extremely valuable technique that’s widely used in data science. In real data science projects, you’ll be dealing with large amounts of data and trying things... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 655,
"s": 53,
"text": "Groupby is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept but it’s an extremely valuable techni... |
Program to find Circumference of a Circle | 11 Jul, 2022
Given radius of a circle, write a program to find its circumference.Examples :
Input : 2
Output : Circumference = 12.566
Input : 8
Output : Circumference = 50.264
In a circle, points lie in the boundary of a circle are at same distance from its center. This distance is called radius. Circumference of ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 135,
"s": 54,
"text": "Given radius of a circle, write a program to find its circumference.Examples : "
},
{
"code": null,
"e": 220,
"s": 135,
"text": "Input : 2\nOutput : Circ... |
Python | Line (Canvas) in kivy | 24 Sep, 2021
Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
Kivy Tutorial – Learn Kivy with Examples.
Line is a vertex canvas ins... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 291,
"s": 53,
"text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it ... |
CSS Fonts | 06 Oct, 2021
Example: In this example we will use few CSS Font’s properties.
HTML
<!DOCTYPE html><html> <head> <title>CSS Font</title> <style> .gfg { font-family: "Arial, Helvetica, sans-serif"; font-size: 60px; color: #090; text-align: center; } .... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 117,
"s": 53,
"text": "Example: In this example we will use few CSS Font’s properties."
},
{
"code": null,
"e": 122,
"s": 117,
"text": "HTML"
},
{
"code": "<!DOCTYPE htm... |
Hadoop – Daemons and Their Features | 06 Oct, 2021
Daemons mean Process. Hadoop Daemons are a set of processes that run on Hadoop. Hadoop is a framework written in Java, so all these processes are Java Processes.
Apache Hadoop 2 consists of the following Daemons:
NameNode
DataNode
Secondary Name Node
Resource Manager
Node Manager
Namenode, Secondary Name... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 216,
"s": 53,
"text": "Daemons mean Process. Hadoop Daemons are a set of processes that run on Hadoop. Hadoop is a framework written in Java, so all these processes are Java Processes. "
},
{
... |
TypeScript | String Length Property | 18 Jun, 2020
The Length Property() in TypeScript which is used to get the length of the string Syntax:
string.length
Return Value: This method returns the length to the String function that created the object. Below examples illustrate the String Length Property in TypeScript
Example 1:
JavaScript
<script> // Orig... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "The Length Property() in TypeScript which is used to get the length of the string Syntax:"
},
{
"code": null,
"e": 133,
"s": 118,
"text": "string.length "
... |
BufferedInputStream mark() method in Java with Examples | 21 May, 2020
The mark() method of BufferedInputStream class in Java is used to mark the current position in the input stream. Reset() method of the same class BufferedInputStream is called after the mark() method. Reset() fixes the position at the last marked position so that same byte can be read again.
General Contra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 May, 2020"
},
{
"code": null,
"e": 321,
"s": 28,
"text": "The mark() method of BufferedInputStream class in Java is used to mark the current position in the input stream. Reset() method of the same class BufferedInputStream is called... |
How to get the length of a string in JavaScript? | To get the length of a string in JavaScript, use the length property. The length property returns the number of characters in a string.
You can try to run the following code to learn how to get the length of a string
Live Demo
<html>
<head>
<title>JavaScript String length Property</title>
</head>
<body... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "To get the length of a string in JavaScript, use the length property. The length property returns the number of characters in a string."
},
{
"code": null,
"e": 1279,
"s": 1198,
"text": "You can try to run the following code to learn... |
How to copy a file to a remote server in Python using SCP or SSH? | The easiest way to copy files from one server to another over ssh is to use the scp command. For calling scp you'd need the subprocess module.
import subprocess
p = subprocess.Popen(["scp", "my_file.txt", "username@server:path"])
sts = os.waitpid(p.pid, 0)
You need the waitpid call to wait for the copying to complete.... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "The easiest way to copy files from one server to another over ssh is to use the scp command. For calling scp you'd need the subprocess module. "
},
{
"code": null,
"e": 1320,
"s": 1206,
"text": "import subprocess\np = subprocess.Pope... |
Python time strptime() function - GeeksforGeeks | 13 Sep, 2021
The strptime() function in Python is used to format and return a string representation of date and time. It takes in the date, time, or both as an input, and parses it according to the directives given to it. It raises ValueError if the string cannot be formatted according to the provided directives.
Synta... | [
{
"code": null,
"e": 24421,
"s": 24393,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 24723,
"s": 24421,
"text": "The strptime() function in Python is used to format and return a string representation of date and time. It takes in the date, time, or both as an input, and parse... |
Count substrings of a given string whose anagram is a palindrome - GeeksforGeeks | 02 Feb, 2022
Given a string S of length N containing only lowercase alphabets, the task is to print the count of substrings of the given string whose anagram is palindromic.
Examples:
Input: S = “aaaa”Output: 10Explanation:Possible substrings are {“a”, “a”, “a”, “a”, “aa”, “aa”, “aa”, “aaa”, “aaa”, “aaaa”}. Since all s... | [
{
"code": null,
"e": 25148,
"s": 25120,
"text": "\n02 Feb, 2022"
},
{
"code": null,
"e": 25309,
"s": 25148,
"text": "Given a string S of length N containing only lowercase alphabets, the task is to print the count of substrings of the given string whose anagram is palindromic."
... |
Redis - Keys | Redis keys commands are used for managing keys in Redis. Following is the syntax for using redis keys commands.
redis 127.0.0.1:6379> COMMAND KEY_NAME
redis 127.0.0.1:6379> SET tutorialspoint redis
OK
redis 127.0.0.1:6379> DEL tutorialspoint
(integer) 1
In the above example, DEL is the command, while tutorialspoin... | [
{
"code": null,
"e": 2157,
"s": 2045,
"text": "Redis keys commands are used for managing keys in Redis. Following is the syntax for using redis keys commands."
},
{
"code": null,
"e": 2197,
"s": 2157,
"text": "redis 127.0.0.1:6379> COMMAND KEY_NAME\n"
},
{
"code": null,
... |
Password Hashing with MD5 module in Node.js - GeeksforGeeks | 27 Apr, 2020
MD5 module in node.js uses a message-digest algorithm and it is a widely used hash function producing a 128-bit hash value. Password hashing is an important concept because, in the database, the actual password should not be stored as its a bad practice and also make the system less secure, so the password... | [
{
"code": null,
"e": 26209,
"s": 26181,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 26597,
"s": 26209,
"text": "MD5 module in node.js uses a message-digest algorithm and it is a widely used hash function producing a 128-bit hash value. Password hashing is an important concep... |
PyQtGraph – Auto Range of Image View - GeeksforGeeks | 18 Nov, 2021
In this article, we will see how we can set an automatic range of image view in PyQTGaph. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics for displa... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 26468,
"s": 25537,
"text": "In this article, we will see how we can set an automatic range of image view in PyQTGaph. PyQtGraph is a graphics and user interface library for Python that provid... |
Even Fibonacci Numbers Sum - GeeksforGeeks | 26 Mar, 2021
Given a limit, find the sum of all the even-valued terms in the Fibonacci sequence below given limit.The first few terms of Fibonacci Numbers are, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ,... (Even numbers are highlighted).Examples :
Input : limit = 8
Output : 10
Explanation : 2 + 8 = 10
Input : ... | [
{
"code": null,
"e": 25865,
"s": 25837,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 26108,
"s": 25865,
"text": "Given a limit, find the sum of all the even-valued terms in the Fibonacci sequence below given limit.The first few terms of Fibonacci Numbers are, 1, 1, 2, 3, 5, 8... |
Maximum length prefix of one string that occurs as subsequence in another - GeeksforGeeks | 14 Jun, 2021
Given two strings s and t. The task is to find maximum length of some prefix of the string S which occur in string t as subsequence.Examples :
Input : s = "digger"
t = "biggerdiagram"
Output : 3
digger
biggerdiagram
Prefix "dig" of s is longest subsequence in t.
Input : s = "geeksforgeeks"
... | [
{
"code": null,
"e": 26083,
"s": 26055,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 26228,
"s": 26083,
"text": "Given two strings s and t. The task is to find maximum length of some prefix of the string S which occur in string t as subsequence.Examples : "
},
{
"cod... |
How to simulate a click with JavaScript ? - GeeksforGeeks | 31 Jul, 2019
Method 1: Using the click() method: The click() method is used to simulate a mouse click on an element. It fires the click event of the element on which it is called. The event bubbles up to elements higher in the document tree and fires their click events also. The element to be clicked first selected and... | [
{
"code": null,
"e": 26129,
"s": 26101,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 26504,
"s": 26129,
"text": "Method 1: Using the click() method: The click() method is used to simulate a mouse click on an element. It fires the click event of the element on which it is call... |
Data Structures | Stack | Question 6 - GeeksforGeeks | 28 Jun, 2021
The following postfix expression with single digit operands is evaluated using a stack:
8 2 3 ^ / 2 3 * + 5 1 * -
Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:(A) 6, 1(B) 5, 7(C) 3, 2(D) 1, 5Answer: (A)Explanation: The algor... | [
{
"code": null,
"e": 25979,
"s": 25951,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26067,
"s": 25979,
"text": "The following postfix expression with single digit operands is evaluated using a stack:"
},
{
"code": null,
"e": 26108,
"s": 26067,
"text": " ... |
rint() in Java (Rounding to int) - GeeksforGeeks | 18 Mar, 2019
rint() is an inbuilt method in Java which is used to round of the floating-point argument to an integer value (in floating-point format).
Syntax:
Math.rint(double n)
Parameters:The rint() function takes a mandatory single argument value to round.
Returns:A double value is returned. This method returns the ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n18 Mar, 2019"
},
{
"code": null,
"e": 25363,
"s": 25225,
"text": "rint() is an inbuilt method in Java which is used to round of the floating-point argument to an integer value (in floating-point format)."
},
{
"code": nul... |
JavaScript parseInt() Function - GeeksforGeeks | 22 Nov, 2021
Below is the example of the parseInt() function.
Example: <script> var v1 = parseInt("3.14"); document.write('Using parseInt("3.14") = ' + v1 + "<br>"); </script>
<script> var v1 = parseInt("3.14"); document.write('Using parseInt("3.14") = ' + v1 + "<br>");... | [
{
"code": null,
"e": 26129,
"s": 26101,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 26178,
"s": 26129,
"text": "Below is the example of the parseInt() function."
},
{
"code": null,
"e": 26326,
"s": 26178,
"text": "Example: <script> var v1 = parseInt... |
Buffer flip() methods in Java with Examples - GeeksforGeeks | 18 Jul, 2019
The flip() method of java.nio.ByteBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded. After a sequence of channel-read or put operations, invoke this method to prepare for a sequence of channel... | [
{
"code": null,
"e": 25799,
"s": 25771,
"text": "\n18 Jul, 2019"
},
{
"code": null,
"e": 26141,
"s": 25799,
"text": "The flip() method of java.nio.ByteBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is set to zero. If the m... |
Linear Discriminant Analysis in R Programming - GeeksforGeeks | 10 Jul, 2020
One of the most popular or well established Machine Learning technique is Linear Discriminant Analysis (LDA ). It is mainly used to solve classification problems rather than supervised classification problems. It is basically a dimensionality reduction technique. Using the Linear combinations of predictors... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 27103,
"s": 26487,
"text": "One of the most popular or well established Machine Learning technique is Linear Discriminant Analysis (LDA ). It is mainly used to solve classification problems r... |
Java - Exception Handling With Constructors in Inheritance - GeeksforGeeks | 15 Nov, 2021
Java provides a mechanism to handle exceptions. To learn about exception handling, you can refer to exceptions in java. In this article, we discuss exception handling with constructors when inheritance is involved. In Java, if the constructor of the parent class throws any checked exception, then the child... | [
{
"code": null,
"e": 26225,
"s": 26197,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 26813,
"s": 26225,
"text": "Java provides a mechanism to handle exceptions. To learn about exception handling, you can refer to exceptions in java. In this article, we discuss exception handl... |
Count of ways to split an Array into three contiguous Subarrays having increasing Sum - GeeksforGeeks | 08 Sep, 2021
Given an array arr[] consisting of non-negative integers, the task is to find the number of ways to split the array into three non-empty contiguous subarrays such that their respective sum of elements are in increasing order.
Examples:
Input: arr[] = {2, 3, 1, 7} Output: 2 Explanation: {{2}, {3, 1}, {7}}, ... | [
{
"code": null,
"e": 26293,
"s": 26265,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 26519,
"s": 26293,
"text": "Given an array arr[] consisting of non-negative integers, the task is to find the number of ways to split the array into three non-empty contiguous subarrays such ... |
Designing the Landscape and Portrait Mode of Application in Android - GeeksforGeeks | 22 Sep, 2020
Whenever the user switch to landscape mode an issue is encountered in which some of the widgets becomes invisible (as you can see the below image) and so in this scenario there is a need to design the separate layout for the landscape mode. At the end of this article you will be able to do that.
Step 1 : C... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n22 Sep, 2020"
},
{
"code": null,
"e": 26678,
"s": 26381,
"text": "Whenever the user switch to landscape mode an issue is encountered in which some of the widgets becomes invisible (as you can see the below image) and so in this s... |
Generating Random id’s using UUID in Python | 27 Jan, 2018
We had discussed the ways to generate unique id’s in Python without using any python inbuilt library in Generating random Id’s in Python
In this article we would be using inbuilt functions to generate them.
UUID, Universal Unique Identifier, is a python library which helps in generating random objects of 1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jan, 2018"
},
{
"code": null,
"e": 189,
"s": 52,
"text": "We had discussed the ways to generate unique id’s in Python without using any python inbuilt library in Generating random Id’s in Python"
},
{
"code": null,
"e": ... |
JavaScript Bitwise Operators | 09 Sep, 2020
Below is the example of the JavaScript Bitwise Operators.Example:
<script> var a = 4; var b = 1; document.write("A & B = " + (a & b) + '<br>'); document.write("A | B = " + (a | b) + '<br>'); document.write("~A = " + (~a) + '<br>'); </script>
Output:
A & B = 0
A | B = 5
~A = -5
Like C, C++, Java, Pyth... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 118,
"s": 52,
"text": "Below is the example of the JavaScript Bitwise Operators.Example:"
},
{
"code": "<script> var a = 4; var b = 1; document.write(\"A & B = \" + (a & b) + '<br>'); d... |
How to use Button Component in ReactJS? | 22 Jan, 2021
Buttons allow users to take actions, and make choices, with a single tap. Material UI for React has this component available for us and it is very easy to integrate. We can use the Button component in ReactJS using the following approach.
Creating React Application And Installing Module:
Step 1: Create a R... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 267,
"s": 28,
"text": "Buttons allow users to take actions, and make choices, with a single tap. Material UI for React has this component available for us and it is very easy to integrate. We can us... |
GATE | GATE-CS-2015 (Set 2) | Question 45 | 11 Oct, 2021
Consider alphabet ∑ = {0, 1}, the null/empty string λ and the sets of strings X0, X1 and X2 generated by the corresponding non-terminals of a regular grammar. X0, X1 and X2 are related as follows:
X0 = 1 X1
X1 = 0 X1 + 1 X2
X2 = 0 X1 + {λ}
Which one of the following choices precisely represents the string... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "Consider alphabet ∑ = {0, 1}, the null/empty string λ and the sets of strings X0, X1 and X2 generated by the corresponding non-terminals of a regular grammar. X0, X1 and X2 ar... |
Compare SQL Server Results of Two Queries | 19 Jul, 2021
SQL Server is a versatile database, and it is the most used Relational Database that is used across many software industries. In this article, let us see the comparison of SQL Server Results of Two Queries briefly. By using Azure Data Studio, let us see the concepts by starting with creating the database, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 463,
"s": 28,
"text": "SQL Server is a versatile database, and it is the most used Relational Database that is used across many software industries. In this article, let us see the comparison of SQL... |
How to add a README to your GitHub profile? | 28 Jul, 2020
Github has recently added a really cool feature that allows you to add a README to your GitHub profile.It’s just like an “About Me” or “Bio” section for your GitHub. It can be used to showcase your skills, your hobbies, or anything that you want the world to know about you.
User can customize the Info on t... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 328,
"s": 53,
"text": "Github has recently added a really cool feature that allows you to add a README to your GitHub profile.It’s just like an “About Me” or “Bio” section for your GitHub. It can b... |
numpy.ppmt() in Python | 29 Nov, 2018
numpy.ppmt(rate, nper, pv, fv, when = ‘end’) : This financial function helps user to compute payment value as per the principal value only.
Parameters :rate : [scalar or (M, )array] Rate of interest as decimal (not per cent) per periodnper : [scalar or (M, )array] total compounding periodsfv : [scalar or (... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "numpy.ppmt(rate, nper, pv, fv, when = ‘end’) : This financial function helps user to compute payment value as per the principal value only."
},
{
"code": null,
"e"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.