title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C qsort() vs C++ sort() - GeeksforGeeks | 14 Aug, 2018
Standard C library provides qsort function that can be used for sorting an array. Following is the prototype of qsort() function.
// Sort an array of any type. The parameters are, base
// address of array, size of array and pointer to
// comparator function
void qsort (void* base, size_t num, size_t size, ... | [
{
"code": null,
"e": 25557,
"s": 25529,
"text": "\n14 Aug, 2018"
},
{
"code": null,
"e": 25687,
"s": 25557,
"text": "Standard C library provides qsort function that can be used for sorting an array. Following is the prototype of qsort() function."
},
{
"code": null,
"... |
Number of substrings with count of each character as k - GeeksforGeeks | 21 Feb, 2022
Given a string and an integer k, find the number of substrings in which all the different characters occur exactly k times.
Examples:
Input : s = "aabbcc"
k = 2
Output : 6
The substrings are aa, bb, cc,
aabb, bbcc and aabbcc.
Input : s = "aabccc"
k = 2
Output : 3
There are three substri... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 26856,
"s": 26731,
"text": "Given a string and an integer k, find the number of substrings in which all the different characters occur exactly k times. "
},
{
"code": null,
"e": 2... |
Python | Check if substring present in string - GeeksforGeeks | 24 Nov, 2018
Lets solve this general problem of finding if a particular piece of string is present in a larger string in different ways. This is a very common kind of problem every programmer comes across aleast once in his/her lifetime. This article gives various techniques to solve it.
Method 1 : Using in operatorThe... | [
{
"code": null,
"e": 26291,
"s": 26263,
"text": "\n24 Nov, 2018"
},
{
"code": null,
"e": 26567,
"s": 26291,
"text": "Lets solve this general problem of finding if a particular piece of string is present in a larger string in different ways. This is a very common kind of problem e... |
Minimum number of bottles required to fill K glasses - GeeksforGeeks | 30 Sep, 2021
Given N glasses having water, and a list A of each of their capacity. The task is to find the minimum number of bottles required to fill out exactly K glasses. The capacity of each bottle is 100 units.
Examples:
Input: N = 4, K = 3, arr[] = {200, 150, 140, 300} Output: 5 We have to fill out exactly 3 gl... | [
{
"code": null,
"e": 26561,
"s": 26533,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 26764,
"s": 26561,
"text": "Given N glasses having water, and a list A of each of their capacity. The task is to find the minimum number of bottles required to fill out exactly K glasses. The... |
Modify a string by circularly shifting each character to the right by respective frequencies - GeeksforGeeks | 28 May, 2021
Given a string S consisting of lowercase English alphabets, the task is to right shift each character of the given string S circularly by its frequency.
Circular shifting of characters refers to shifting character ‘z’ to ‘a’, as its next character.
Examples:
Input: S = “geeksforgeeks”Output: iiimugpsiiimu ... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 26090,
"s": 25937,
"text": "Given a string S consisting of lowercase English alphabets, the task is to right shift each character of the given string S circularly by its frequency."
},
{
... |
Disjoint set (Union-Find) | Practice | GeeksforGeeks | Given an array A[] that stores all number from 1 to N (both inclusive and sorted) and K queries.
The task is to do the following operations on array elements :
1. UNION X Z : Perform union of X and Z i.e. parent of Z will become the parent of X.
2. FIND X: Find the parent of X and print it.
Note: Initially all are the ... | [
{
"code": null,
"e": 335,
"s": 238,
"text": "Given an array A[] that stores all number from 1 to N (both inclusive and sorted) and K queries."
},
{
"code": null,
"e": 398,
"s": 335,
"text": "The task is to do the following operations on array elements :"
},
{
"code": null... |
How to create a custom AlertDialog in Android - GeeksforGeeks | 01 Jun, 2020
Sometimes in AlertDialog, there is need to get input from the user or customize according to our requirements. So we create custom AlertDialogs. This post will show how to customize the AlertDialogs and take the input from it.
Below is the step by step implementation of the above approach:
Step 1: Create a... | [
{
"code": null,
"e": 25958,
"s": 25930,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 26185,
"s": 25958,
"text": "Sometimes in AlertDialog, there is need to get input from the user or customize according to our requirements. So we create custom AlertDialogs. This post will sho... |
Finding the probability of a state at a given time in a Markov chain | Set 2 - GeeksforGeeks | 07 Jul, 2021
Given a Markov chain G, we have the find the probability of reaching the state F at time t = T if we start from state S at time t = 0.A Markov chain is a random process consisting of various states and the probabilities of moving from one state to another. We can represent it using a directed graph where t... | [
{
"code": null,
"e": 26713,
"s": 26685,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 27326,
"s": 26713,
"text": "Given a Markov chain G, we have the find the probability of reaching the state F at time t = T if we start from state S at time t = 0.A Markov chain is a random pr... |
Python program to check if a given string is Keyword or not - GeeksforGeeks | 07 Feb, 2019
Given a string, write a Python program that checks if the given string is keyword or not.
Keywords are reserved words which cannot be used as variable names.
There are 33 keywords in Python programming language.(in python 3.6.2 version)
Examples:
Input: str = "geeks"
Output: geeks is not a keyword
Input: ... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n07 Feb, 2019"
},
{
"code": null,
"e": 25651,
"s": 25561,
"text": "Given a string, write a Python program that checks if the given string is keyword or not."
},
{
"code": null,
"e": 25719,
"s": 25651,
"text": "... |
Least number to be added to or subtracted from N to make it a Perfect Cube - GeeksforGeeks | 30 Mar, 2020
Given a number N, Find the minimum number that needs to be added to or subtracted from N, to make it a perfect cube. If the number is to be added, print it with a + sign, else if the number is to be subtracted, print it with a – sign.
Examples:
Input: N = 25Output: 2Nearest perfect cube before 25 = 8Neares... | [
{
"code": null,
"e": 25805,
"s": 25777,
"text": "\n30 Mar, 2020"
},
{
"code": null,
"e": 26040,
"s": 25805,
"text": "Given a number N, Find the minimum number that needs to be added to or subtracted from N, to make it a perfect cube. If the number is to be added, print it with a ... |
Maths Commands in LaTeX - GeeksforGeeks | 20 Jun, 2020
LATEX is a document preparation system for producing professional-looking documents. LaTeX is widely used for the communication and publication of scientific documents in many fields, including mathematics, statistics, computer science, engineering, physics, etc. It also has a prominent role in the prepara... | [
{
"code": null,
"e": 25732,
"s": 25704,
"text": "\n20 Jun, 2020"
},
{
"code": null,
"e": 26155,
"s": 25732,
"text": "LATEX is a document preparation system for producing professional-looking documents. LaTeX is widely used for the communication and publication of scientific docum... |
Advantages and Disadvantages of Subnetting - GeeksforGeeks | 27 Sep, 2019
Subnetting: Dividing a network into many small Networks is known as Subnetting.Subnetting is useful in many ways like:
It provides security to one network from another network. eg) In an Organisation, code of the Developer department must not be accessed by another department.It may be possible that a part... | [
{
"code": null,
"e": 25689,
"s": 25661,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 25808,
"s": 25689,
"text": "Subnetting: Dividing a network into many small Networks is known as Subnetting.Subnetting is useful in many ways like:"
},
{
"code": null,
"e": 26185,
... |
SYSDATETIME() Function in SQL Server - GeeksforGeeks | 21 Jan, 2021
SYSDATETIME() :
This function in SQL Server is used to return the computer’s date and time in which the SQL Server is operating at present.
Features :
This function is used to find the computer’s date and time in which the SQL Server is operating.
This function comes under Date Functions.
This function doe... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 25529,
"s": 25513,
"text": "SYSDATETIME() :"
},
{
"code": null,
"e": 25653,
"s": 25529,
"text": "This function in SQL Server is used to return the computer’s date and time... |
Lex program to check whether the input is digit or not - GeeksforGeeks | 30 Apr, 2019
Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language.
Prerequisite: Flex (Fast lexical Analyzer Generator).
Given an input, the task is to check if the input is digi... | [
{
"code": null,
"e": 25915,
"s": 25887,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 26111,
"s": 25915,
"text": "Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexe... |
Quantile Regression. When performing regression analysis, It... | by Steven Dye | Towards Data Science | When performing regression analysis, It isn’t enough to come up with a numerical prediction to a problem, you also need to express how confident you are in that prediction. For example, if you’re looking at the price for a home in a particular market and your model predicts a house will sell for $262,458.45, how confid... | [
{
"code": null,
"e": 819,
"s": 172,
"text": "When performing regression analysis, It isn’t enough to come up with a numerical prediction to a problem, you also need to express how confident you are in that prediction. For example, if you’re looking at the price for a home in a particular market and ... |
HTML <input> disabled Attribute - GeeksforGeeks | 04 Jan, 2019
The disabled attribute for <input> element in HTML is used to specify that the input field is disabled. A disabled input is un-clickable and unusable. It is a boolean attribute. The disabled <input> elements are not submitted in the form.
Syntax:
<input disabled>
Example:
<!DOCTYPE html> <html> <head>... | [
{
"code": null,
"e": 23805,
"s": 23777,
"text": "\n04 Jan, 2019"
},
{
"code": null,
"e": 24044,
"s": 23805,
"text": "The disabled attribute for <input> element in HTML is used to specify that the input field is disabled. A disabled input is un-clickable and unusable. It is a bool... |
abstract keyword in C# | The abstract keyword in C# is used for abstract classes. An abstract class in C# includes abstract and nonabstract methods. You cannot instantiate an abstract class.
Example of an abstract class Vehicle and abstract method display() −
public abstract class Vehicle {
public abstract void display();
}
The abstract cla... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "The abstract keyword in C# is used for abstract classes. An abstract class in C# includes abstract and nonabstract methods. You cannot instantiate an abstract class."
},
{
"code": null,
"e": 1297,
"s": 1228,
"text": "Example of an ab... |
How to Build your own website using Django in Python | Django is a Python web framework that is both free and open source.
It’s very fast.
It’s very fast.
Comes with a lot of pre-existing features like user authentication, site maps, RSS feeds.
Comes with a lot of pre-existing features like user authentication, site maps, RSS feeds.
It is very secure and prevents a lot of ... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Django is a Python web framework that is both free and open source."
},
{
"code": null,
"e": 1146,
"s": 1130,
"text": "It’s very fast."
},
{
"code": null,
"e": 1162,
"s": 1146,
"text": "It’s very fast."
},
{
... |
Convert IP address to integer and vice versa - GeeksforGeeks | 01 Nov, 2020
We will use the ipaddress module for this purpose. ipaddress is a module that helps in the creation, manipulation and operation on IPv4 and IPv6 addresses and networks.
The motivation of converting IP Addresses to integers and vice versa is that other modules that use IP addresses (such as socket) usually ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 24461,
"s": 24292,
"text": "We will use the ipaddress module for this purpose. ipaddress is a module that helps in the creation, manipulation and operation on IPv4 and IPv6 addresses and netw... |
Object detection using Mask R-CNN on a custom dataset | by Renu Khandelwal | Towards Data Science | In this article we will implement Mask R-CNN for detecting objects from a custom dataset
Computer vision : A journey from CNN to Mask R-CC and YOLO Part 1
Computer vision : A journey from CNN to Mask R-CNN and YOLO Part 2
Instance segmentation using Mask R-CNN
Transfer Learning
Transfer Learning using ResNet50
Kangaroo... | [
{
"code": null,
"e": 261,
"s": 172,
"text": "In this article we will implement Mask R-CNN for detecting objects from a custom dataset"
},
{
"code": null,
"e": 327,
"s": 261,
"text": "Computer vision : A journey from CNN to Mask R-CC and YOLO Part 1"
},
{
"code": null,
... |
Predicting Horse Racing Results with Deep Learning | by Victor Sim | Towards Data Science | I am interested in the application of machine learning in different fields, where analysis of large amounts of data is necessary to come to accurate conclusions. One such field is sports analytics. Unlike other forms of gambling, the environment and the actors within it are sure to have an effect on the result, making ... | [
{
"code": null,
"e": 547,
"s": 172,
"text": "I am interested in the application of machine learning in different fields, where analysis of large amounts of data is necessary to come to accurate conclusions. One such field is sports analytics. Unlike other forms of gambling, the environment and the a... |
Android | Creating multiple Screen app - GeeksforGeeks | 06 Nov, 2021
This article shows how to create an android application to move from one activity to another.
Below are the steps for Creating a Simple Android Application to move from one activity to another activity.
STEP-1: Create new project and your project screen looks like given below.
STEP-2: You will have xml and... | [
{
"code": null,
"e": 24513,
"s": 24485,
"text": "\n06 Nov, 2021"
},
{
"code": null,
"e": 24607,
"s": 24513,
"text": "This article shows how to create an android application to move from one activity to another."
},
{
"code": null,
"e": 24716,
"s": 24607,
"text... |
Private and final methods in C# | To set private methods, use the private access specifier.
Private access specifier allows a class to hide its member variables and member functions from other functions and objects. Only functions of the same class can access its private members. Even an instance of a class cannot access its private members.
For final ... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "To set private methods, use the private access specifier."
},
{
"code": null,
"e": 1372,
"s": 1120,
"text": "Private access specifier allows a class to hide its member variables and member functions from other functions and objects. ... |
Python - RSS Feed | RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it. In python we take help of the below package to read and process these feeds.
pip install feedparser
In the below ex... | [
{
"code": null,
"e": 2608,
"s": 2326,
"text": "RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it. In python we take help of the below package to re... |
Normalization vs Standardization — Quantitative analysis | by Shay Geller | Towards Data Science | Every ML practitioner knows that feature scaling is an important issue (read more here).
The two most discussed scaling methods are Normalization and Standardization. Normalization typically means rescales the values into a range of [0,1]. Standardization typically means rescales data to have a mean of 0 and a standard... | [
{
"code": null,
"e": 135,
"s": 46,
"text": "Every ML practitioner knows that feature scaling is an important issue (read more here)."
},
{
"code": null,
"e": 399,
"s": 135,
"text": "The two most discussed scaling methods are Normalization and Standardization. Normalization typica... |
Represent Int32 as a Hexadecimal String in C# | To represent Int32 as a Hexadecimal string in C#, use the ToString() method and set the base as the ToString() method’s second parameter i.e. 16 for Hexadecimal.
Int32 represents a 32-bit signed integer.
Firstly, set an Int32 variable.
int val = 9898;
Now, convert it to a hexadecimal string by including 16 as the secon... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "To represent Int32 as a Hexadecimal string in C#, use the ToString() method and set the base as the ToString() method’s second parameter i.e. 16 for Hexadecimal."
},
{
"code": null,
"e": 1266,
"s": 1224,
"text": "Int32 represents a 3... |
Rexx - DataTypes | In any programming language, you need to use various variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory to store the value associated with that variable.
You may like to sto... | [
{
"code": null,
"e": 2640,
"s": 2339,
"text": "In any programming language, you need to use various variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory to... |
Elasticsearch - IngestNode | Sometimes we need to transform a document before we index it. For instance, we want to remove a field from the document or rename a field and then index it. This is handled by Ingest node.
Every node in the cluster has the ability to ingest but it can also be customized to be
processed only by specific nodes.
There are... | [
{
"code": null,
"e": 2770,
"s": 2581,
"text": "Sometimes we need to transform a document before we index it. For instance, we want to remove a field from the document or rename a field and then index it. This is handled by Ingest node."
},
{
"code": null,
"e": 2892,
"s": 2770,
"t... |
Python Risk Management: Monte Carlo Simulations | by Lester Leong | Towards Data Science | In this article, we’ll go over Monte Carlo simulations, which can be applied to offer insights on modeling future events. The whole idea of this article came from a combination of two factors. First was from an experiment I am running off of options trading, the journey can be found here. The second was the other Pytho... | [
{
"code": null,
"e": 733,
"s": 172,
"text": "In this article, we’ll go over Monte Carlo simulations, which can be applied to offer insights on modeling future events. The whole idea of this article came from a combination of two factors. First was from an experiment I am running off of options tradi... |
MySQL Tryit Editor v1.0 | SELECT CONCAT("SQL ", "Tutorial ", "is ", "fun!") AS ConcatenatedString;
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 ar... | [
{
"code": null,
"e": 73,
"s": 0,
"text": "SELECT CONCAT(\"SQL \", \"Tutorial \", \"is \", \"fun!\") AS ConcatenatedString;"
},
{
"code": null,
"e": 75,
"s": 73,
"text": ""
},
{
"code": null,
"e": 147,
"s": 84,
"text": "Edit the SQL Statement, and click \"Run ... |
What are Reserved Keywords in Python? | Reserved words (also called keywords) are defined with predefined meaning and syntax in the language. These keywords have to be used to develop programming instructions. Reserved words can’t be used as identifiers for other programming elements like name of variable, function etc.
Following is the list of reserved keyw... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Reserved words (also called keywords) are defined with predefined meaning and syntax in the language. These keywords have to be used to develop programming instructions. Reserved words can’t be used as identifiers for other programming elements like nam... |
How-to Fine-Tune a Q&A Transformer | by James Briggs | Towards Data Science | Transformer models are undoubtedly the leaders in NLP — outperforming almost every other model architecture in almost every other task.
One of the most fascinating language-based tasks that transformers have proven themselves more than capable of dealing with is question-and-answering.
In this article, we will learn ab... | [
{
"code": null,
"e": 308,
"s": 172,
"text": "Transformer models are undoubtedly the leaders in NLP — outperforming almost every other model architecture in almost every other task."
},
{
"code": null,
"e": 459,
"s": 308,
"text": "One of the most fascinating language-based tasks t... |
Program to find number of tasks can be finished with given conditions in Python | Suppose we have a list of tasks and another list of people. The tasks[i] determines the amount of strength required to perform the ith task. And the people[i] determines the amount of strength the ith person has. Finally, we have to find the number of tasks that can be finished if one person can perform at most one tas... | [
{
"code": null,
"e": 1385,
"s": 1062,
"text": "Suppose we have a list of tasks and another list of people. The tasks[i] determines the amount of strength required to perform the ith task. And the people[i] determines the amount of strength the ith person has. Finally, we have to find the number of t... |
Basics of Numbers in Dart - GeeksforGeeks | 14 Jul, 2020
Like other languages, Dart Programming also supports numerical values as Number objects. The number in Dart Programming is the data type that is used to hold the numeric value. Dart numbers can be classified as:
int: The int data type is used to represent whole numbers.
Syntax: int var_name;
double: The ... | [
{
"code": null,
"e": 23643,
"s": 23615,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 23857,
"s": 23643,
"text": "Like other languages, Dart Programming also supports numerical values as Number objects. The number in Dart Programming is the data type that is used to hold the n... |
Introduction to Java - GeeksforGeeks | 09 Apr, 2022
JAVA was developed by James Gosling at Sun Microsystems Inc in the year 1995, later acquired by Oracle Corporation. It is a simple programming language. Java makes writing, compiling, and debugging programming easy. It helps to create reusable code and modular programs.
Java is a class-based, object-orient... | [
{
"code": null,
"e": 28559,
"s": 28531,
"text": "\n09 Apr, 2022"
},
{
"code": null,
"e": 28830,
"s": 28559,
"text": "JAVA was developed by James Gosling at Sun Microsystems Inc in the year 1995, later acquired by Oracle Corporation. It is a simple programming language. Java makes... |
Combine values of two columns separated with hyphen in an R data frame. | To combine values of two columns separated with hyphen in an R data frame, we can
use apply function.
For Example, if we have a data frame called df that contains only two columns say X and
Y then we can combine the values in X and Y by using the below command given below −
df$X_Y<-apply(df,1,paste,collapse="-")
Consid... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "To combine values of two columns separated with hyphen in an R data frame, we can\nuse apply function."
},
{
"code": null,
"e": 1337,
"s": 1164,
"text": "For Example, if we have a data frame called df that contains only two columns s... |
Python Dictionaries. Use Python Dictionaries Like a Pro | by Erdem Isbilen | Towards Data Science | Python programming language is widely used by developers in data science projects. To complete such projects, understanding data structures plays an important role. Python has several built-in data structures such as lists, sets, tuples, and dictionaries, in order to support the developers with ready to use data struct... | [
{
"code": null,
"e": 498,
"s": 172,
"text": "Python programming language is widely used by developers in data science projects. To complete such projects, understanding data structures plays an important role. Python has several built-in data structures such as lists, sets, tuples, and dictionaries,... |
2's complement for a given string using XOR - GeeksforGeeks | 31 Dec, 2021
Given a binary string, task is to convert this string in to two’s complement with the help of XOR operator.
Examples:
Input : 00000101
Output :11111011
Input : 10010
Output : 01110
We have discussed an approach in previous post to find 2’s complement
For 2’s complement, we first find one’s complement. We... | [
{
"code": null,
"e": 24988,
"s": 24960,
"text": "\n31 Dec, 2021"
},
{
"code": null,
"e": 25096,
"s": 24988,
"text": "Given a binary string, task is to convert this string in to two’s complement with the help of XOR operator."
},
{
"code": null,
"e": 25107,
"s": 25... |
Kotlin - Comments | A comment is a programmer-readable explanation or annotation in the Kotlin source code. They are added with the purpose of making the source code easier for humans to understand, and are ignored by Kotlin compiler.
Just like most modern languages, Kotlin supports single-line (or end-of-line) and multi-line (block) comm... | [
{
"code": null,
"e": 2640,
"s": 2425,
"text": "A comment is a programmer-readable explanation or annotation in the Kotlin source code. They are added with the purpose of making the source code easier for humans to understand, and are ignored by Kotlin compiler."
},
{
"code": null,
"e": 2... |
JSON and APIs with Python. An Introduction to JSON and APIs using... | by Luay Matalka | Towards Data Science | In a different tutorial, we discussed how to web scrape with python. The goal of web scraping was to access data from a website or webpage. Well, sometimes a website can make it easier for a user to have direct access to their data with the use of an API (Application Programming Interface). This basically means that th... | [
{
"code": null,
"e": 762,
"s": 172,
"text": "In a different tutorial, we discussed how to web scrape with python. The goal of web scraping was to access data from a website or webpage. Well, sometimes a website can make it easier for a user to have direct access to their data with the use of an API ... |
Espresso Testing Framework - Overview of JUnit | In this chapter, let us understand the basics of JUnit, the popular unit-testing framework developed by the Java community upon which the espresso testing framework is build.
JUnit is the de facto standard for unit testing a Java application. Even though, it is popular for unit testing, it has complete support and prov... | [
{
"code": null,
"e": 2151,
"s": 1976,
"text": "In this chapter, let us understand the basics of JUnit, the popular unit-testing framework developed by the Java community upon which the espresso testing framework is build."
},
{
"code": null,
"e": 2454,
"s": 2151,
"text": "JUnit i... |
Pairwise Sequence Alignment using Biopython | by Vijini Mallawaarachchi | Towards Data Science | How similar are two sequences?
If you want to answer this question, you need to have a basic idea about sequence alignment. As described in my previous article, Sequence alignment is a method of arranging sequences of DNA, RNA, or protein to identify regions of similarity. The similarity being identified, may be a resu... | [
{
"code": null,
"e": 202,
"s": 171,
"text": "How similar are two sequences?"
},
{
"code": null,
"e": 574,
"s": 202,
"text": "If you want to answer this question, you need to have a basic idea about sequence alignment. As described in my previous article, Sequence alignment is a m... |
Full Stack Machine Learning on Azure | by Doug Foo | Towards Data Science | Guide to building a Full Stack Machine Learning site on Azure using MERN (Mongo, Express, React (Node.js))
Having gotten rusty on the latest tech, I took it upon myself to concurrently learn a whole bunch of things at once and build http://diamonds.foostack.ai which is now live. (Basic machine learning app to price dia... | [
{
"code": null,
"e": 279,
"s": 172,
"text": "Guide to building a Full Stack Machine Learning site on Azure using MERN (Mongo, Express, React (Node.js))"
},
{
"code": null,
"e": 500,
"s": 279,
"text": "Having gotten rusty on the latest tech, I took it upon myself to concurrently l... |
How to change the root directory of an Apache server on Linux? | Apache web server is one of the most used web servers across all the platforms even after including different Linux distributions and windows. Apache server is an open source HTTP server that is mainly used to deliver web content and can also be used to serve many queries at once.
In this article, I will try to explain... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Apache web server is one of the most used web servers across all the platforms even after including different Linux distributions and windows. Apache server is an open source HTTP server that is mainly used to deliver web content and can also be used to... |
Roll the characters of a String | Practice | GeeksforGeeks | Given a string S and an array roll where roll[i] represents rolling first roll[i] characters in the string, the task is to apply every roll[i] on the string and output the final string. Rolling means increasing the ASCII value of character, like rolling ‘z’ would result in ‘a’, rolling ‘b’ would result in ‘c’, etc.
E... | [
{
"code": null,
"e": 543,
"s": 226,
"text": "Given a string S and an array roll where roll[i] represents rolling first roll[i] characters in the string, the task is to apply every roll[i] on the string and output the final string. Rolling means increasing the ASCII value of character, like rolling ‘... |
Deterministic PDA | Theory of Computation
The Deterministic Pushdown Automata is a variation of pushdown automata that accepts the deterministic context-free languages.
A language L(A) is accepted by a deterministic pushdown automata if and only if there is a single computation from the initial configuration until an accepting one for all... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 239,
"s": 112,
"text": "The Deterministic Pushdown Automata is a variation of pushdown automata that accepts the deterministic context-free languages."
},
{
"code": null,
"e": 5... |
Array of ArrayList in Java - GeeksforGeeks | 11 Dec, 2018
We often come across 2D arrays where most of the part in the array is empty. Since space is a huge problem, we try different things to reduce the space. One such solution is to use jagged array when we know the length of each row in the array, but the problem arises when we do not specifically know the len... | [
{
"code": null,
"e": 26162,
"s": 26134,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 26606,
"s": 26162,
"text": "We often come across 2D arrays where most of the part in the array is empty. Since space is a huge problem, we try different things to reduce the space. One such s... |
Scala | Sealed Trait - GeeksforGeeks | 19 Oct, 2020
Sealed provides exhaustive checking for our application. Exhaustive checking allows to check that all members of a sealed trait must be declared in the same file as of the source file. That means that all the possible known members of a trait that must be included are known by the compiler in advance. So t... | [
{
"code": null,
"e": 26173,
"s": 26145,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 26537,
"s": 26173,
"text": "Sealed provides exhaustive checking for our application. Exhaustive checking allows to check that all members of a sealed trait must be declared in the same file a... |
8086 program to convert 8 bit ASCII to BCD number - GeeksforGeeks | 10 Sep, 2018
Problem – Write a program to convert ASCII to BCD 8-bit number where starting address is 2000 and the number is stored at 2050 memory address and store result into 3050 memory address.
Example-
Input : location: 2050
Data : 37
Output : location: 3050
Data : 07
Algorithm –... | [
{
"code": null,
"e": 24878,
"s": 24850,
"text": "\n10 Sep, 2018"
},
{
"code": null,
"e": 25063,
"s": 24878,
"text": "Problem – Write a program to convert ASCII to BCD 8-bit number where starting address is 2000 and the number is stored at 2050 memory address and store result into... |
Find the factorial of a number in pl/sql - GeeksforGeeks | 06 May, 2018
Given a number, your task to print the factorial of that number using pl/sql.
Examples:
Input : 5
Output : 120
Explanation:5! = 5 * 4 * 3 * 2 * 1 = 120
Input : 4
Output : 24
Basic structure of pl/sql block
declare
-- declare all the variables
begin -- for start block
-- make a program here
end -- for ... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n06 May, 2018"
},
{
"code": null,
"e": 25725,
"s": 25647,
"text": "Given a number, your task to print the factorial of that number using pl/sql."
},
{
"code": null,
"e": 25735,
"s": 25725,
"text": "Examples:"
... |
Convert a String into Date Format in R Programming - as.Date() Function - GeeksforGeeks | 30 Jun, 2020
as.Date() function in R Language is used to convert a string into date format.
Syntax: as.Date(x, format)
Parameters:x: string variableformat: Format in which string is declared(%m/%d/%y)
Example 1:
# R program to convert string into date # Creating a string vectordates <- c("27 / 02 / 92") # Conversi... | [
{
"code": null,
"e": 26249,
"s": 26221,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 26328,
"s": 26249,
"text": "as.Date() function in R Language is used to convert a string into date format."
},
{
"code": null,
"e": 26355,
"s": 26328,
"text": "Syntax: as.... |
How to check whether the enter key is pressed in a textbox or not using JavaScript / jQuery ? - GeeksforGeeks | 30 May, 2019
Given a textarea element and the task is to check the user presses enter key with the help of JQuery.
jQuery keyup() Method: This method triggers the keyup event or adds a function to run when a keyup event occurs. The keyup event occurs when a keyboard key is released.Syntax:Trigger the keyup event for th... | [
{
"code": null,
"e": 26415,
"s": 26387,
"text": "\n30 May, 2019"
},
{
"code": null,
"e": 26517,
"s": 26415,
"text": "Given a textarea element and the task is to check the user presses enter key with the help of JQuery."
},
{
"code": null,
"e": 26961,
"s": 26517,
... |
How to handle duplicates in Binary Search Tree? - GeeksforGeeks | 28 Feb, 2022
In a Binary Search Tree (BST), all keys in left subtree of a key must be smaller and all keys in right subtree must be greater. So a Binary Search Tree by definition has distinct keys. How to allow duplicates where every insertion inserts one more key with a value and every deletion deletes one occurrence?... | [
{
"code": null,
"e": 26081,
"s": 26053,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 26577,
"s": 26081,
"text": "In a Binary Search Tree (BST), all keys in left subtree of a key must be smaller and all keys in right subtree must be greater. So a Binary Search Tree by definiti... |
Nvidia Interview Experience for Compiler Engineer - GeeksforGeeks | 18 Oct, 2021
My Background: I worked in the compiler frontend (Clang) during my thesis developing a compiler-like tool for static analysis of C language. Basically a linter for C programming language. I am from Tier 1 college (IIT). I am 1+ years experienced.
Hiring Manager Round: He worked in the GPU compiler optimiza... | [
{
"code": null,
"e": 26025,
"s": 25997,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 26272,
"s": 26025,
"text": "My Background: I worked in the compiler frontend (Clang) during my thesis developing a compiler-like tool for static analysis of C language. Basically a linter for... |
How to Structure my Application in Express.js ? - GeeksforGeeks | 07 Dec, 2021
Express is a minimalistic framework that is used to create web servers. It is built upon the HTTP module of node.js and provides a much easier way to manage the code related to the server.
In this article, we are going to discuss how we can structure our express application.
Create Node Project:
Step 1: As... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 26456,
"s": 26267,
"text": "Express is a minimalistic framework that is used to create web servers. It is built upon the HTTP module of node.js and provides a much easier way to manage the co... |
Scroll to the top of the page using JavaScript/jQuery - GeeksforGeeks | 03 Aug, 2021
A scrollable page can be scrolled to the top using 2 approaches:
Method 1: Using window.scrollTo()The scrollTo() method of the window Interface can be used to scroll to a specified location on the page. It accepts 2 parameters the x and y coordinate of the page to scroll to. Passing both the parameters as ... | [
{
"code": null,
"e": 26363,
"s": 26335,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 26428,
"s": 26363,
"text": "A scrollable page can be scrolled to the top using 2 approaches:"
},
{
"code": null,
"e": 26728,
"s": 26428,
"text": "Method 1: Using window.sc... |
Thread get_id() function in C++ - GeeksforGeeks | 16 Jun, 2021
Thread::get_id() is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output. This function returns the value of std::thread::id thus identifying the thread associated with *this.Syntax:
thread_name.get_id();
Parameters:... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 25617,
"s": 25343,
"text": "Thread::get_id() is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output. ... |
How to make Tabs using Angular UI Bootstrap ? - GeeksforGeeks | 17 Jun, 2021
In this article we will see how to make Tabs using Angular UI bootstrap. Angular UI Bootstrap is an Angular JS framework created by Angular UI developers for providing better UI which can be used easily.
Download AngularUI from the link:
https://angular-ui.github.io/bootstrap
Approach:
First, add Angular ... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 26558,
"s": 26354,
"text": "In this article we will see how to make Tabs using Angular UI bootstrap. Angular UI Bootstrap is an Angular JS framework created by Angular UI developers for provi... |
How to get the first element of an array in PHP? - GeeksforGeeks | 02 Dec, 2021
In this article, we will see how to get access to the first element of an array in PHP, & also understand their implementation through the examples. There are mainly 3 types of arrays in PHP that can be used to fetch the elements from the array:
Indexed Array: It is an array with a numeric key. It is basic... | [
{
"code": null,
"e": 26839,
"s": 26811,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 27085,
"s": 26839,
"text": "In this article, we will see how to get access to the first element of an array in PHP, & also understand their implementation through the examples. There are main... |
Replace a DOM element with another DOM element in place - GeeksforGeeks | 16 Feb, 2021
The task is to replace an element by another element in place using JavaScript. Below are the few methods:
parentNode Property: This property returns the parent node of the defined node, as a Node object.Syntax:node.parentNode
Return value:It returns a node object, which represents the parent node of a nod... | [
{
"code": null,
"e": 39213,
"s": 39185,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 39320,
"s": 39213,
"text": "The task is to replace an element by another element in place using JavaScript. Below are the few methods:"
},
{
"code": null,
"e": 39554,
"s": 393... |
Some newly introduced array methods in JavaScript ES6 - GeeksforGeeks | 01 Oct, 2020
An array is used to store the elements of multiple data types in JavaScript altogether. Also, there are certain times when you have to manipulate the response received from the APIs as per the requirements on the webpages. Sometimes, the responses are objects and have to be converted to the arrays to perfo... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 26935,
"s": 26545,
"text": "An array is used to store the elements of multiple data types in JavaScript altogether. Also, there are certain times when you have to manipulate the response rece... |
How to Normalize Data in R? - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to normalize data in the R programming language.
Normalizing Data is the approach to scale the data into a fixed range usually 0 to 1 so that it reduces the scale of the variables.
In this approach to normalize the data with its log transformation, the user needs to cal... | [
{
"code": null,
"e": 26451,
"s": 26423,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 26537,
"s": 26451,
"text": "In this article, we will discuss how to normalize data in the R programming language."
},
{
"code": null,
"e": 26669,
"s": 26537,
"text": "Norm... |
Java - toDegrees() Method | The method converts the argument value to degrees.
double toDegrees(double d)
Here is the detail of parameters −
d − A double data type.
d − A double data type.
This method returns a double value.
public class Test {
public static void main(String args[]) {
double x = 45.0;
double y = 30.0;
Sys... | [
{
"code": null,
"e": 2428,
"s": 2377,
"text": "The method converts the argument value to degrees."
},
{
"code": null,
"e": 2456,
"s": 2428,
"text": "double toDegrees(double d)\n"
},
{
"code": null,
"e": 2491,
"s": 2456,
"text": "Here is the detail of parameter... |
Anagram of String | Practice | GeeksforGeeks | Given two strings S1 and S2 in lowercase, the task is to make them anagram. The only allowed operation is to remove a character from any string. Find the minimum number of characters to be deleted to make both the strings anagram. Two strings are called anagram of each other if one of them can be converted into another... | [
{
"code": null,
"e": 587,
"s": 238,
"text": "Given two strings S1 and S2 in lowercase, the task is to make them anagram. The only allowed operation is to remove a character from any string. Find the minimum number of characters to be deleted to make both the strings anagram. Two strings are called a... |
How to change the position of the legend in a PieChart in JavaFX? | In the pie chart, we represent the data values as slices of a circle. Each slice is differentiated from other (typically by color). In JavaFX, you can create a pie chart by instantiating the javafx.scene.chart.PieChart class.
By default, a JavaFX pie chart contains labels of the slices and a legend − a bar with colors ... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "In the pie chart, we represent the data values as slices of a circle. Each slice is differentiated from other (typically by color). In JavaFX, you can create a pie chart by instantiating the javafx.scene.chart.PieChart class."
},
{
"code": null,... |
PyQt5 – How to add padding to a Label ? - GeeksforGeeks | 26 Mar, 2020
In this article, we will see how to add padding to our Label. Padding is just the space between the border and the content. Below is image of label this will helps in better understanding of the padding.
In order to add padding to our label, we will use setStyleSheet() method, below is how without padding ... | [
{
"code": null,
"e": 24563,
"s": 24535,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 24767,
"s": 24563,
"text": "In this article, we will see how to add padding to our Label. Padding is just the space between the border and the content. Below is image of label this will helps... |
PHP - hash() Function | The hash() function returns a hash value for the given data based on the algorithm like (md5, sha256). The return value is a string with hexits (hexadecimal values).
hash ( string $algo , string $data [, bool $raw_output = FALSE ] ) : string
algo
Name of the hashing algorithm. There is a big list of algorithm availabl... | [
{
"code": null,
"e": 2923,
"s": 2757,
"text": "The hash() function returns a hash value for the given data based on the algorithm like (md5, sha256). The return value is a string with hexits (hexadecimal values)."
},
{
"code": null,
"e": 3000,
"s": 2923,
"text": "hash ( string $a... |
HTML | <th> width Attribute - GeeksforGeeks | 26 Jun, 2019
The HTML <th> width Attribute is used to specify the width of a table header cell. If width attribute is not set then it takes default width according to content. It is not supported by HTML 5.
Syntax:
<th width="pixels | %">
Attribute Values:
pixels: It sets the width of table header cell in terms of pixe... | [
{
"code": null,
"e": 25889,
"s": 25861,
"text": "\n26 Jun, 2019"
},
{
"code": null,
"e": 26083,
"s": 25889,
"text": "The HTML <th> width Attribute is used to specify the width of a table header cell. If width attribute is not set then it takes default width according to content. ... |
Image Matching with OpenCV’s Template Matching | by Aviad Atlas | Towards Data Science | As a data scientist at VATBox, I’ve mainly worked on projects which at their core involve building Machine Learning models. What’s nice about this project is that it purely includes building an algorithm to solve the given task. A real-world problem with a custom-made solution.
The problem in hand is essentially matchi... | [
{
"code": null,
"e": 451,
"s": 172,
"text": "As a data scientist at VATBox, I’ve mainly worked on projects which at their core involve building Machine Learning models. What’s nice about this project is that it purely includes building an algorithm to solve the given task. A real-world problem with ... |
JavaScript Error Handling: Unexpected Token - GeeksforGeeks | 20 Jul, 2021
Like other programming languages, JavaScript has define some proper programming rules. Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + – var if-else var etc}. Unexpected token is similar to syntax error but more specific.Semicolon(;... | [
{
"code": null,
"e": 24318,
"s": 24290,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 25046,
"s": 24318,
"text": "Like other programming languages, JavaScript has define some proper programming rules. Not follow them throws an error.An unexpected token occurs if JavaScript cod... |
LASTNONBLANK function | Returns the last value in the column filtered by the current context, where the expression is not blank.
LASTNONBLANK (<column>, <expression>)
column
A column expression.
expression
An expression evaluated for blanks for each value of column.
A table containing a single column and single row with the computed last no... | [
{
"code": null,
"e": 2106,
"s": 2001,
"text": "Returns the last value in the column filtered by the current context, where the expression is not blank."
},
{
"code": null,
"e": 2146,
"s": 2106,
"text": "LASTNONBLANK (<column>, <expression>) \n"
},
{
"code": null,
"e":... |
Production-Grade R Shiny with Golem: Prototyping | by Liz Nelson | Towards Data Science | It’s an exciting time to be an R Shiny developer — R Shiny is being increasingly adopted to let data scientists make fast, beautiful web applications to share data and even provide public-facing access to data products and dashboards. R Shiny lets non-web developers get applications up and running quickly, but also put... | [
{
"code": null,
"e": 1149,
"s": 172,
"text": "It’s an exciting time to be an R Shiny developer — R Shiny is being increasingly adopted to let data scientists make fast, beautiful web applications to share data and even provide public-facing access to data products and dashboards. R Shiny lets non-we... |
Entity Framework - Asynchronous Query | Asynchronous programming involves executing operations in the background so that the main thread can continue its own operations. This way the main thread can keep the user interface responsive while the background thread is processing the task at hand.
Entity Framework 6.0 supports asynchronous operations for querying... | [
{
"code": null,
"e": 3286,
"s": 3032,
"text": "Asynchronous programming involves executing operations in the background so that the main thread can continue its own operations. This way the main thread can keep the user interface responsive while the background thread is processing the task at hand.... |
MariaDB - Select Database | After connecting to MariaDB, you must select a database to work with because many databases may exist. There are two ways to perform this task: from the command prompt or through a PHP script.
In choosing a database at the command prompt, simply utilize the SQL command ‘use’ −
[root@host]# mysql -u root -p
Enter passw... | [
{
"code": null,
"e": 2555,
"s": 2362,
"text": "After connecting to MariaDB, you must select a database to work with because many databases may exist. There are two ways to perform this task: from the command prompt or through a PHP script."
},
{
"code": null,
"e": 2640,
"s": 2555,
... |
Nth Digit in C++ | Suppose we have one infinite integer sequence, we have to find the nth digit of this sequence. So if the input is 11, then the output will be 0 as if we place the numbers like 123456789101112, so the 11th digit is 0.
To solve this, we will follow these steps −
len := 0 and cnt := 9 and start := 1
len := 0 and cnt := 9 ... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "Suppose we have one infinite integer sequence, we have to find the nth digit of this sequence. So if the input is 11, then the output will be 0 as if we place the numbers like 123456789101112, so the 11th digit is 0."
},
{
"code": null,
"e":... |
Notebook widget in Tkinter | Notebook widget is an inbuilt widget of ttk library in tkinter. It enables the user to create Tabs in the window application. Tabs are generally used to separate the workspace and specialize the group of operations in applications at the same time.
In this example, we will create two tabs using Notebook widget and then... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "Notebook widget is an inbuilt widget of ttk library in tkinter. It enables the user to create Tabs in the window application. Tabs are generally used to separate the workspace and specialize the group of operations in applications at the same time."
}... |
String compareTo() Method | Returns a new string by removing all leading and trailing spaces. However, this method doesn’t discard spaces between two strings.
compareTo(String other)
Returns an integer representing the relationship between two strings.
0 − when the strings are equal.
0 − when the strings are equal.
1 − when the first string is g... | [
{
"code": null,
"e": 2656,
"s": 2525,
"text": "Returns a new string by removing all leading and trailing spaces. However, this method doesn’t discard spaces between two strings."
},
{
"code": null,
"e": 2681,
"s": 2656,
"text": "compareTo(String other)\n"
},
{
"code": nul... |
C - if statement | An if statement consists of a Boolean expression followed by one or more statements.
The syntax of an 'if' statement in C programming language is −
if(boolean_expression) {
/* statement(s) will execute if the boolean expression is true */
}
If the Boolean expression evaluates to true, then the block of code inside ... | [
{
"code": null,
"e": 2169,
"s": 2084,
"text": "An if statement consists of a Boolean expression followed by one or more statements."
},
{
"code": null,
"e": 2232,
"s": 2169,
"text": "The syntax of an 'if' statement in C programming language is −"
},
{
"code": null,
"e... |
Like Operator in SAS Programming - GeeksforGeeks | 23 Jul, 2019
LIKE Operator: Pattern Matching
The LIKE operator used to select data by comparing the values of a character variable to a specified pattern. It is case sensitive.
Task 1: To select all students with a name that starts with the letter S.
There are two special characters patterns available for specifying a ... | [
{
"code": null,
"e": 23717,
"s": 23689,
"text": "\n23 Jul, 2019"
},
{
"code": null,
"e": 23749,
"s": 23717,
"text": "LIKE Operator: Pattern Matching"
},
{
"code": null,
"e": 23881,
"s": 23749,
"text": "The LIKE operator used to select data by comparing the val... |
Check if left and right shift of any string results into given string - GeeksforGeeks | 01 Sep, 2021
Given string S consisting of only lowercase English letters. The task is to find if there exists any string which has left shift and right shift both equal to string S. If there exists any string then print Yes, otherwise print No.
Examples:
Input: S = “abcd” Output: No Explanation: There is no string whi... | [
{
"code": null,
"e": 25438,
"s": 25410,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 25670,
"s": 25438,
"text": "Given string S consisting of only lowercase English letters. The task is to find if there exists any string which has left shift and right shift both equal to stri... |
Machine Learning with R: Churn Prediction | by Soner Yıldırım | Towards Data Science | R is one of the predominant languages in data science ecosystem. It is primarily designed for statistical computing and graphics. R makes it simple to efficiently implement statistical techniques and thus it is excellent choice for machine learning tasks.
In this article, we will create a random forest model to solve a... | [
{
"code": null,
"e": 302,
"s": 46,
"text": "R is one of the predominant languages in data science ecosystem. It is primarily designed for statistical computing and graphics. R makes it simple to efficiently implement statistical techniques and thus it is excellent choice for machine learning tasks."... |
Check for subsequence | Practice | GeeksforGeeks | Given two strings A and B, find if A is a subsequence of B.
Example 1:
Input:
A = AXY
B = YADXCP
Output: 0
Explanation: A is not a subsequence of B
as 'Y' appears before 'A'.
Example 2:
Input:
A = gksrek
B = geeksforgeeks
Output: 1
Explanation: A is a subsequence of B.
Your Task:
You dont need to read input or... | [
{
"code": null,
"e": 298,
"s": 238,
"text": "Given two strings A and B, find if A is a subsequence of B."
},
{
"code": null,
"e": 309,
"s": 298,
"text": "Example 1:"
},
{
"code": null,
"e": 416,
"s": 309,
"text": "Input:\nA = AXY \nB = YADXCP\nOutput: 0 \nExpl... |
Group by in Pandas, SQL, and NoSQL | by Soner Yıldırım | Towards Data Science | The group by operations are commonly used in exploratory data analysis. Almost every data analysis tool and framework provides an implementation of group by operation.
The group by operation involves grouping numerical values based on the values of a discrete or categorical variable and then apply some form of transfor... | [
{
"code": null,
"e": 340,
"s": 172,
"text": "The group by operations are commonly used in exploratory data analysis. Almost every data analysis tool and framework provides an implementation of group by operation."
},
{
"code": null,
"e": 515,
"s": 340,
"text": "The group by opera... |
How to Observe Event Only Once Using SingleLiveEvent in Android? - GeeksforGeeks | 08 Sep, 2021
Have you ever had to deal with a Dialog or a SnackBar that, after being triggered/shown or dismissed, gets triggered/shown again after a device rotation? This is most likely connected to the use of LiveData observables to communicate between the ViewModel and the Activity/Fragment.
Using LiveData objects f... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25008,
"s": 24725,
"text": "Have you ever had to deal with a Dialog or a SnackBar that, after being triggered/shown or dismissed, gets triggered/shown again after a device rotation? This is m... |
Aria2 - Multi-Protocol Command-Line Download Tool for Linux - GeeksforGeeks | 30 May, 2021
Aria2 is an open-source lightweight multi-protocol, multi-server & multi-source command-line utility that is used for downloading files in Windows, Linux, and Mac.
Aria2 is used to download a file at a good speed by utilizing your maximum download bandwidth from multiple sources/protocols such as HTTP(S), ... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 24570,
"s": 24406,
"text": "Aria2 is an open-source lightweight multi-protocol, multi-server & multi-source command-line utility that is used for downloading files in Windows, Linux, and Mac.... |
Minimize count of divisions by D to obtain at least K equal array elements - GeeksforGeeks | 17 Jul, 2021
Given an array A[ ] of size N and two integers K and D, the task is to calculate the minimum possible number of operations required to obtain at least K equal array elements. Each operation involves replacing an element A[i] by A[i] / D. This operation can be performed any number of times.
Examples:
Input... | [
{
"code": null,
"e": 24611,
"s": 24583,
"text": "\n17 Jul, 2021"
},
{
"code": null,
"e": 24902,
"s": 24611,
"text": "Given an array A[ ] of size N and two integers K and D, the task is to calculate the minimum possible number of operations required to obtain at least K equal arra... |
How to Install JUnit Libraries on Linux? - GeeksforGeeks | 22 Sep, 2021
JUnit is basically a unit testing framework for Java. JAVA provides a JUnit framework for unit testing, unit testing is simply a process by which we ensure that the code works the way it was intended to, i.e. we check individual units of source code, such as functions, methods, and class. And normally we ... | [
{
"code": null,
"e": 24812,
"s": 24784,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 25272,
"s": 24812,
"text": "JUnit is basically a unit testing framework for Java. JAVA provides a JUnit framework for unit testing, unit testing is simply a process by which we ensure that th... |
Build predictive Business Intelligence with Google Colab, Google Data Studio and Google Sheets | by Rostyslav Neskorozhenyi | Towards Data Science | Many of us are used to thinking that Business Intelligence is something that large companies use and that is created with tools that are expensive and often difficult to learn (although there are pleasant exceptions, such as Metabase and Superset). In my article, I want to show that practically everyone can use the pow... | [
{
"code": null,
"e": 768,
"s": 172,
"text": "Many of us are used to thinking that Business Intelligence is something that large companies use and that is created with tools that are expensive and often difficult to learn (although there are pleasant exceptions, such as Metabase and Superset). In my ... |
Android | Display multiplication table of a number - GeeksforGeeks | 07 Dec, 2021
Given a number, the task is to display the multiplication table of this number using the Android App.
Steps to build app:
STEP-1: Open activity_main.xml file and add TextView, EditText, and a Button
STEP-2: Assign ID to each component
STEP-3: Now, open up the MainActivity file and declare the variables.
ST... | [
{
"code": null,
"e": 24527,
"s": 24499,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 24629,
"s": 24527,
"text": "Given a number, the task is to display the multiplication table of this number using the Android App."
},
{
"code": null,
"e": 24649,
"s": 24629,
... |
EJB - Access Database | In EJB 3.0, persistence mechanism is used to access the database in which the container manages the database related operations. Developers can access database using JDBC API call directly in EJB business methods.
To demonstrate database access in EJB, we need to perform the following tasks −
Step 1 − Create a table in... | [
{
"code": null,
"e": 2261,
"s": 2047,
"text": "In EJB 3.0, persistence mechanism is used to access the database in which the container manages the database related operations. Developers can access database using JDBC API call directly in EJB business methods."
},
{
"code": null,
"e": 23... |
Introduction to Best Parallel Plot Python Library: “HiPlot” | by Moto DEI | Towards Data Science | HiPlot is Facebook’s Python library to support visualization of high-dimensional data table, released this January. It is particularly well known for its sophisticated interactive parallel plot.
Before anything, take a look at their compelling demo video. This explains how high its interactivity is, which we would appr... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "HiPlot is Facebook’s Python library to support visualization of high-dimensional data table, released this January. It is particularly well known for its sophisticated interactive parallel plot."
},
{
"code": null,
"e": 515,
"s": 367,
... |
Create charts from Google Sheets using Google Apps Script - GeeksforGeeks | 29 Sep, 2021
Google Apps Script is a cloud-based tool used for automating basic tasks. You can write your code in modern JavaScript. Using Apps Script you can add custom menus, write custom functions and macros for Google sheets, and can publish your web Apps. You can automate tasks in Google Sheets, Google Docs, gmail... | [
{
"code": null,
"e": 24894,
"s": 24866,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 25348,
"s": 24894,
"text": "Google Apps Script is a cloud-based tool used for automating basic tasks. You can write your code in modern JavaScript. Using Apps Script you can add custom menus,... |
Sort an array of dates in PHP | To sort an array of dates in PHP, the code is as follows−
Live Demo
<?php
function compareDates($date1, $date2){
return strtotime($date1) - strtotime($date2);
}
$dateArr = array("2019-11-11", "2019-10-10","2019-08-10", "2019-09-08");
usort($dateArr, "compareDates");
print_r($dateArr);
?>
This will... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "To sort an array of dates in PHP, the code is as follows−"
},
{
"code": null,
"e": 1131,
"s": 1120,
"text": " Live Demo"
},
{
"code": null,
"e": 1373,
"s": 1131,
"text": "<?php\n function compareDates($date1, $d... |
Music Genre Classification: Transformers vs Recurrent Neural Networks | by Youness Mansar | Towards Data Science | The objective of this post is to implement a music genre classification model by comparing two popular architectures for sequence modeling: Recurrent Neural networks and Transformers.
RNNs are popular for all sorts of 1D sequence processing tasks, they re-use the same weights at each time step and pass information from... | [
{
"code": null,
"e": 356,
"s": 172,
"text": "The objective of this post is to implement a music genre classification model by comparing two popular architectures for sequence modeling: Recurrent Neural networks and Transformers."
},
{
"code": null,
"e": 745,
"s": 356,
"text": "RN... |
Recursive program to find an element in an array linearly. | Following is a Java program to find an element in an array linearly.
Live Demo
import java.util.Scanner;
public class SearchingRecursively {
public static boolean searchArray(int[] myArray, int element, int size){
if (size == 0){
return false;
}
if (myArray[size-1] == element){
r... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "Following is a Java program to find an element in an array linearly."
},
{
"code": null,
"e": 1142,
"s": 1131,
"text": " Live Demo"
},
{
"code": null,
"e": 2122,
"s": 1142,
"text": "import java.util.Scanner;\npubl... |
MongoDB - Insert Multiple Document Using MongoShell - GeeksforGeeks | 27 Feb, 2020
In MongoDB, insert operations are used to add new documents in the collection. If the collection does not exist, then the insert operations create the collection by inserting documents. Or if the collection exists, then insert operations add new documents in the existing collection. You are allowed to inse... | [
{
"code": null,
"e": 23837,
"s": 23809,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 24228,
"s": 23837,
"text": "In MongoDB, insert operations are used to add new documents in the collection. If the collection does not exist, then the insert operations create the collection b... |
Break a list into chunks of size N in Python - GeeksforGeeks | 24 Apr, 2020
Method 1: Using yieldThe yield keyword enables a function to comeback where it left off when it is called again. This is the critical difference from a regular function. A regular function cannot comes back where it left off. The yield keyword helps a function to remember its state. The yield enables a fun... | [
{
"code": null,
"e": 25008,
"s": 24980,
"text": "\n24 Apr, 2020"
},
{
"code": null,
"e": 25417,
"s": 25008,
"text": "Method 1: Using yieldThe yield keyword enables a function to comeback where it left off when it is called again. This is the critical difference from a regular fun... |
How to create Python dictionary from the value of another dictionary? | You can do this by merging the other dictionary to the first dictionary. In Python 3.5+, you can use the ** operator to unpack a dictionary and combine multiple dictionaries using the following syntax −
a = {'foo': 125}
b = {'bar': "hello"}
c = {**a, **b}
print(c)
This will give the output −
{'foo': 125, 'bar': 'hello'... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "You can do this by merging the other dictionary to the first dictionary. In Python 3.5+, you can use the ** operator to unpack a dictionary and combine multiple dictionaries using the following syntax −"
},
{
"code": null,
"e": 1327,
"s"... |
How to change the color and font of Android ListView using Kotlin? | This example demonstrates how to change the color and font of Android ListView using 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-... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrates how to change the color and font of Android ListView using Kotlin."
},
{
"code": null,
"e": 1283,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all req... |
Multimodal deep learning to predict movie genres | by Dhruv Verma | Towards Data Science | “Batman raises the stakes in his war on crime. With the help of Lt. Jim Gordon and District Attorney Harvey Dent, Batman sets out to dismantle the remaining criminal organizations that plague the streets. The partnership proves to be effective, but they soon find themselves prey to a reign of chaos unleashed by a risin... | [
{
"code": null,
"e": 577,
"s": 172,
"text": "“Batman raises the stakes in his war on crime. With the help of Lt. Jim Gordon and District Attorney Harvey Dent, Batman sets out to dismantle the remaining criminal organizations that plague the streets. The partnership proves to be effective, but they s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.