title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to validate and sanitize user input with PHP? | 11 Oct, 2019
Data validation is an integral part of web development, especially while working with forms where the user first enters their personal data and then sends that to the database. Data sent in an invalid format can cause DBMS security problems. Hackers often use SQL injections to insert malicious SQL commands... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 562,
"s": 28,
"text": "Data validation is an integral part of web development, especially while working with forms where the user first enters their personal data and then sends that to the database... |
Python – Read file from sibling directory | 06 Jun, 2021
In this article, we will discuss the method to read files from the sibling directory in Python. First, create two folders in a root folder, and one folder will contain the python file and the other will contain the file which is to be read. Below is the dictionary tree:
Directory Tree:
root :
|
|__Sibling_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 299,
"s": 28,
"text": "In this article, we will discuss the method to read files from the sibling directory in Python. First, create two folders in a root folder, and one folder will contain the pyt... |
C Programming Language Standard | 06 May, 2021
The idea of this article is to introduce C standard.
What to do when a C program produces different results in two different compilers? For example, consider the following simple C program.
C
void main() { }
The above program fails in gcc as the return type of main is void, but it compiles in Turbo C. H... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 106,
"s": 52,
"text": "The idea of this article is to introduce C standard. "
},
{
"code": null,
"e": 244,
"s": 106,
"text": "What to do when a C program produces different resu... |
Implementing Atbash Cipher | 08 Feb, 2018
Definition: Atbash cipher is a substitution cipher with just one specific key where all the letters are reversed that is A to Z and Z to A. It was originally used to encode the Hebrew alphabets but it can be modified to encode any alphabet.
Relationship to Affine: Atbash cipher can be thought of as a speci... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Feb, 2018"
},
{
"code": null,
"e": 293,
"s": 52,
"text": "Definition: Atbash cipher is a substitution cipher with just one specific key where all the letters are reversed that is A to Z and Z to A. It was originally used to encode t... |
Python MySQL – Insert record if not exists in table | 26 Nov, 2020
Prerequisite: Connect MySQL Database to Python
In this article, we will try to insert records and check if it EXISTS or not. The EXISTS condition in SQL is used to check if the result of a correlated nested query is empty (contains no tuples) or not. It can be used to INSERT, SELECT, UPDATE, or DELETE stat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 75,
"s": 28,
"text": "Prerequisite: Connect MySQL Database to Python"
},
{
"code": null,
"e": 343,
"s": 75,
"text": "In this article, we will try to insert records and check if i... |
0 - 1 Knapsack Problem | Practice | GeeksforGeeks | You are given weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Note that we have only one quantity of each item.
In other words, given two integer arrays val[0..N-1] and wt[0..N-1] which represent values and weights associated with N items respec... | [
{
"code": null,
"e": 832,
"s": 238,
"text": "You are given weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Note that we have only one quantity of each item.\nIn other words, given two integer arrays val[0..N-1] and wt[0..N-1]... |
Operators Precedence in C++ | Try the following example to understand operators precedence concept available in C++. Copy and paste the following C++ program in test.cpp file and compile and run this program.
Check the simple difference with and without parenthesis. This will produce different results because (), /, * and + have different precedenc... | [
{
"code": null,
"e": 2497,
"s": 2318,
"text": "Try the following example to understand operators precedence concept available in C++. Copy and paste the following C++ program in test.cpp file and compile and run this program."
},
{
"code": null,
"e": 2695,
"s": 2497,
"text": "Che... |
C# - Loops | There may be a situation, when you need to execute a block of code several number of times. In general, the statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.
Programming languages provide various control structures that allow for more complicat... | [
{
"code": null,
"e": 2504,
"s": 2270,
"text": "There may be a situation, when you need to execute a block of code several number of times. In general, the statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on."
},
{
"code... |
A Quicker Way to Build Datasets through Web Scraping | by William Yang | Towards Data Science | If you want to skip the HTML tag digging and get straight to scraping, here’s the gist. Note that the scraper tries to do an exact match with each item in your wanted list. Otherwise, read on for a short background on webscraping, when it’s useful to scrape websites, and some challenges you may experience while scrapin... | [
{
"code": null,
"e": 495,
"s": 172,
"text": "If you want to skip the HTML tag digging and get straight to scraping, here’s the gist. Note that the scraper tries to do an exact match with each item in your wanted list. Otherwise, read on for a short background on webscraping, when it’s useful to scra... |
Hyperparameter Tuning: A Practical Guide and Template | by Jiahao Weng | Towards Data Science | You have painstakingly performed your exploratory data analysis, data processing and finally 😎, it’s time for modeling! But you soon realized that you have quite a few hyperparameters to tune and it may take you a thousand years to brute-force search that large hyperparameter space for the optimal settings.
Life is sh... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "You have painstakingly performed your exploratory data analysis, data processing and finally 😎, it’s time for modeling! But you soon realized that you have quite a few hyperparameters to tune and it may take you a thousand years to brute-force search tha... |
How to reshape data and do regression for time series using LSTM | by Timur Bikmukhametov | Towards Data Science | Over the last years, recurrent neural networks in general and LSTM in particular, have become very popular among many data science practitioners. Despite the fact that the major application of LSTMs is Natural Language Processing (NLP), for computing scientists and engineers LSTMs offer possibilities for creating power... | [
{
"code": null,
"e": 573,
"s": 172,
"text": "Over the last years, recurrent neural networks in general and LSTM in particular, have become very popular among many data science practitioners. Despite the fact that the major application of LSTMs is Natural Language Processing (NLP), for computing scie... |
Recommender Systems from Learned Embeddings | by Nahid Alam | Towards Data Science | Recommender systems are fundamental building blocks of modern consumer web applications that seek to predict user preferences. There are different approaches to build a Recommender system. We are particularly interested in the Nearest Neighbor based approach. We look into the similarity between pairs of an item and rec... | [
{
"code": null,
"e": 512,
"s": 172,
"text": "Recommender systems are fundamental building blocks of modern consumer web applications that seek to predict user preferences. There are different approaches to build a Recommender system. We are particularly interested in the Nearest Neighbor based appro... |
Recurrent Neural Networks by Example in Python | by Will Koehrsen | Towards Data Science | The first time I attempted to study recurrent neural networks, I made the mistake of trying to learn the theory behind things like LSTMs and GRUs first. After several frustrating days looking at linear algebra equations, I happened on the following passage in Deep Learning with Python:
In summary, you don’t need to und... | [
{
"code": null,
"e": 458,
"s": 171,
"text": "The first time I attempted to study recurrent neural networks, I made the mistake of trying to learn the theory behind things like LSTMs and GRUs first. After several frustrating days looking at linear algebra equations, I happened on the following passag... |
Python - Plotting charts in excel sheet using openpyxl module | Openpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing, arithmatic operations and plotting graphs.
# import openpyxl module
import openpyxl
#import BubbleChart,Reference,Series class from openpyxl.chart #sub_module
from openpyxl.chart import BubbleChart, Refere... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "Openpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing, arithmatic operations and plotting graphs."
},
{
"code": null,
"e": 2651,
"s": 1220,
"text": "# import openpyxl module... |
Check if substring S1 appear after any occurrence of substring S2 in given sentence - GeeksforGeeks | 18 Jan, 2022
Given strings S1, S2 and S, the task is to check if every substring of S which is same as S1 has another substring of S same as S2 before it. It is given that S1 is always present as a substring in the string S.
Examples:
Input: S1 = “code”, S2 = “geek”, S = “sxygeeksgcodetecode”Output: TrueExplanation: Su... | [
{
"code": null,
"e": 26170,
"s": 26142,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 26382,
"s": 26170,
"text": "Given strings S1, S2 and S, the task is to check if every substring of S which is same as S1 has another substring of S same as S2 before it. It is given that S1 i... |
Java Assignment Operators with Examples - GeeksforGeeks | 09 Dec, 2021
Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions, be it logical, arithmetic, relational, etc. They are classified based on the functionality they provide... | [
{
"code": null,
"e": 28871,
"s": 28843,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 29180,
"s": 28871,
"text": "Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to per... |
Check if a string is palindrome in C using pointers | Suppose we have a string s. We have to check whether the given string is a palindrome or not. We have to solve this problem using pointers in C.
So, if the input is like s = "racecar", then the output will be True.
To solve this, we will follow these steps −
length := size of string
forward := pointing to the first cha... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "Suppose we have a string s. We have to check whether the given string is a palindrome or not. We have to solve this problem using pointers in C."
},
{
"code": null,
"e": 1277,
"s": 1207,
"text": "So, if the input is like s = \"raceca... |
Machine Learning In Healthcare: Detecting Melanoma | by Sakshi Butala | Towards Data Science | Skin cancer is the most common type of cancer. It occurs due to the abnormal growth of skin cells, usually on the areas exposed to sunlight. There are three major types of skin cancer — basal cell carcinoma, squamous cell carcinoma, and melanoma. Melanoma, specifically, is responsible for 75% of skin cancer deaths, des... | [
{
"code": null,
"e": 533,
"s": 172,
"text": "Skin cancer is the most common type of cancer. It occurs due to the abnormal growth of skin cells, usually on the areas exposed to sunlight. There are three major types of skin cancer — basal cell carcinoma, squamous cell carcinoma, and melanoma. Melanoma... |
Difference between Instance Variable and Local Variable - GeeksforGeeks | 31 May, 2021
A variable is a name given to a memory location. It is the basic unit of storage in a program.
The value stored in a variable can be changed during program execution.
A variable is only a name given to a memory location. All the operations are done on the variable effects of a memory location.
In Java, all... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 25762,
"s": 25667,
"text": "A variable is a name given to a memory location. It is the basic unit of storage in a program."
},
{
"code": null,
"e": 25834,
"s": 25762,
"tex... |
ArrayList to Array Conversion in Java : toArray() Methods - GeeksforGeeks | 02 Nov, 2020
Following methods can be used for converting ArrayList to Array:
Method 1: Using Object[] toArray() method
Syntax:
public Object[] toArray()
It is specified by toArray in interface Collection and interface List
It overrides toArray in class AbstractCollection
It returns an array containing all of... | [
{
"code": null,
"e": 24699,
"s": 24671,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 24765,
"s": 24699,
"text": "Following methods can be used for converting ArrayList to Array: "
},
{
"code": null,
"e": 24809,
"s": 24767,
"text": "Method 1: Using Object[]... |
Go Tutorial | Go is a popular programming language.
Go is used to create computer programs.
Our "Try it Yourself" editor makes it easy to learn Go. You can edit Go code and view the result in your browser.
Click on the "Try it Yourself" button to see how it works.
Insert the missing part of the code below to output "Hello World".
pa... | [
{
"code": null,
"e": 38,
"s": 0,
"text": "Go is a popular programming language."
},
{
"code": null,
"e": 78,
"s": 38,
"text": "Go is used to create computer programs."
},
{
"code": null,
"e": 192,
"s": 78,
"text": "Our \"Try it Yourself\" editor makes it easy ... |
Exploratory Analysis of FIFA 18 dataset using R | by Akshaj Verma | Towards Data Science | With FIFA World Cup 2018 around the corner, I combined my love for football and data science to whip up a short exploratory analysis of the FIFA 18 dataset using R. I used the non-physical player attributes such as Name, Age, Nationality, Overall, Club, Value, Wage, Preferred.Positions.
I used the the dataset available... | [
{
"code": null,
"e": 460,
"s": 172,
"text": "With FIFA World Cup 2018 around the corner, I combined my love for football and data science to whip up a short exploratory analysis of the FIFA 18 dataset using R. I used the non-physical player attributes such as Name, Age, Nationality, Overall, Club, V... |
How to skip rows in MySQL? | To skip rows, use LIMIT OFFSET. Let us first create a table −
mysql> create table DemoTable860(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name varchar(100)
);
Query OK, 0 rows affected (0.73 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable860(Name) values('Chris');
Query... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "To skip rows, use LIMIT OFFSET. Let us first create a table −"
},
{
"code": null,
"e": 1266,
"s": 1124,
"text": "mysql> create table DemoTable860(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n Name varchar(100)\n);\nQuery OK, 0... |
Ext.js - Containers and Layout | Container in Ext JS is the component where we can add other container or child components.
These containers can have multiple layout to arrange the components in the containers.
We can add or remove components from container and from its child elements.
Ext.container.Container is the base class for all the containers i... | [
{
"code": null,
"e": 2424,
"s": 2023,
"text": "Container in Ext JS is the component where we can add other container or child components.\nThese containers can have multiple layout to arrange the components in the containers.\nWe can add or remove components from container and from its child element... |
How to change Screen Orientation programmatically using a Button in Android? | This example demonstrates about how do I change the Screen Orientation programmatically using a Button in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml versio... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "This example demonstrates about how do I change the Screen Orientation programmatically using a Button in Android."
},
{
"code": null,
"e": 1305,
"s": 1177,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New P... |
How to read test data from an excel sheet and use it to test facebook login in Selenium Webdriver? | We can read test data from an excel sheet and use it to test Facebook login with Selenium webdriver in Python. We can access excel with Python with the help of the OpenPyXL library.
To install this library, we have to run the command - pip install openpyxl. Besides, we have to add the statement import openpyxl in our c... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "We can read test data from an excel sheet and use it to test Facebook login with Selenium webdriver in Python. We can access excel with Python with the help of the OpenPyXL library."
},
{
"code": null,
"e": 1480,
"s": 1244,
"text": "... |
How to disable delete permission of File and Directory in Linux? | Many times there can be un-intentional delete of files or directories. That can lead to loss of important data or some misconfiguration of the system so we need a way to stop the accidental deletion of files and directories it may not be applicable to all the files and directories but we can have a design where at leas... | [
{
"code": null,
"e": 1445,
"s": 1062,
"text": "Many times there can be un-intentional delete of files or directories. That can lead to loss of important data or some misconfiguration of the system so we need a way to stop the accidental deletion of files and directories it may not be applicable to a... |
How to make HTTP requests in Node.js ? - GeeksforGeeks | 29 Sep, 2021
In the world of REST API, making a HTTP request is the core functionality of modern technology. Many developer learn it when they land to a new environment. Various open-source library including NodeJS built in HTTP and HTTPS modules can be used to make network request from NodeJS.
There are many approach... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 25286,
"s": 25002,
"text": "In the world of REST API, making a HTTP request is the core functionality of modern technology. Many developer learn it when they land to a new environment. Vario... |
Predicting Win Probability. Using machine learning on sales... | by Vikram Devatha | Towards Data Science | Have you ever had to determine the probability of winning opportunities in the pipeline? The Marketing team generates leads which are followed up by the Sales team, and in the process each opportunity goes through a lifecycle, from the RFP stage till final closure. As the opportunity transitions from one stage to the n... | [
{
"code": null,
"e": 612,
"s": 171,
"text": "Have you ever had to determine the probability of winning opportunities in the pipeline? The Marketing team generates leads which are followed up by the Sales team, and in the process each opportunity goes through a lifecycle, from the RFP stage till fina... |
How to make an HTML link to open a folder? - GeeksforGeeks | 14 Apr, 2020
HTML can be used to open a folder from our local storage. In order to open a folder from our local storage, use ‘HREF’ attribute of HTML. In the HREF attribute, we specify the path of our folder.
Syntax:
<a href="Path"></a>
Example 1:
<!DOCTYPE html><html><head> <title>Sample Code</title></head> <body> ... | [
{
"code": null,
"e": 24920,
"s": 24892,
"text": "\n14 Apr, 2020"
},
{
"code": null,
"e": 25116,
"s": 24920,
"text": "HTML can be used to open a folder from our local storage. In order to open a folder from our local storage, use ‘HREF’ attribute of HTML. In the HREF attribute, we... |
Time Series Machine Learning Regression Framework | by Pourya | Towards Data Science | Time! One of the most challenging concepts in the Universe. I have studied Physics for many years and seen how most brilliant scientists have been struggling to deal with the concept of the time. In machine learning, even we are far from those complicated Physics theories, in which the common understanding of the conce... | [
{
"code": null,
"e": 507,
"s": 46,
"text": "Time! One of the most challenging concepts in the Universe. I have studied Physics for many years and seen how most brilliant scientists have been struggling to deal with the concept of the time. In machine learning, even we are far from those complicated ... |
Intersection point of two Linked Lists | Set 3 - GeeksforGeeks | 05 Jul, 2021
Given two linked lists of size N and M consisting of positive value nodes, having a common intersection point, the task is to find the intersection point of the two linked lists where they merge.
Examples:
Input: L1: 3 → 6 → 9 → 15 → 30, L2: 10 → 15 → 30Output: 15Explanation:
From the above image, the inte... | [
{
"code": null,
"e": 24637,
"s": 24609,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 24833,
"s": 24637,
"text": "Given two linked lists of size N and M consisting of positive value nodes, having a common intersection point, the task is to find the intersection point of the tw... |
Spring Boot CLI - Testing Application | In this chapter, we will test the sample project created in Hello World Example Chapter to demonstrate the testing capabilities of Spring CLI. Follow the steps listed in the table below to test the sample project −
@RestController
class FirstApplication {
@RequestMapping("/")
String welcome() {
"Welcome... | [
{
"code": null,
"e": 2224,
"s": 2009,
"text": "In this chapter, we will test the sample project created in Hello World Example Chapter to demonstrate the testing capabilities of Spring CLI. Follow the steps listed in the table below to test the sample project −"
},
{
"code": null,
"e": 2... |
Fabric.js | Rect skewX Property - GeeksforGeeks | 29 May, 2020
In this article, we are going to see how to set horizontal skew of a canvas rectangle using FabricJS. The canvas rectangle means rectangle is movable and can be stretched according to requirement. Further, the rectangle can be customized when it comes to initial stroke color, height, width, fill color, or ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n29 May, 2020"
},
{
"code": null,
"e": 25621,
"s": 25300,
"text": "In this article, we are going to see how to set horizontal skew of a canvas rectangle using FabricJS. The canvas rectangle means rectangle is movable and can be st... |
A Beginners Guide to Create a Choropleth Map in Python using GeoPandas and Matplotlib | by M. Rake Linggar A. | Towards Data Science | Data visualization is an important skill when searching and presenting important insights. There are many visuals that can be used to present your data. One of the most interesting data visuals is the choropleth map.
What’s a choropleth map?
A choropleth map (from Greek χῶρος “area/region” and πλῆθος “multitude”) is ... | [
{
"code": null,
"e": 389,
"s": 172,
"text": "Data visualization is an important skill when searching and presenting important insights. There are many visuals that can be used to present your data. One of the most interesting data visuals is the choropleth map."
},
{
"code": null,
"e": 4... |
Topic Modeling Articles with NMF. Extracting topics is a good... | by Rob Salgado | Towards Data Science | Extracting topics is a good unsupervised data-mining technique to discover the underlying relationships between texts. There are many different approaches with the most popular probably being LDA but I’m going to focus on NMF. I’ve had better success with it and it’s also generally more scalable than LDA.
This article ... | [
{
"code": null,
"e": 354,
"s": 47,
"text": "Extracting topics is a good unsupervised data-mining technique to discover the underlying relationships between texts. There are many different approaches with the most popular probably being LDA but I’m going to focus on NMF. I’ve had better success with ... |
jQuery css() Method | The css() method sets or returns one or more style properties for the selected elements.
To return the value of a specified CSS property, use the following syntax:
The following example will return the background-color value of the FIRST matched element:
To set a specified CSS property, use the following syntax:
The fo... | [
{
"code": null,
"e": 89,
"s": 0,
"text": "The css() method sets or returns one or more style properties for the selected elements."
},
{
"code": null,
"e": 164,
"s": 89,
"text": "To return the value of a specified CSS property, use the following syntax:"
},
{
"code": null... |
Groovy - max() | The method gives the maximum of the two arguments. The argument can be int, float, long, double.
double max(double arg1, double arg2)
float max(float arg1, float arg2)
int max(int arg1, int arg2)
long max(long arg1, long arg2)
Parameters − This method accepts any primitive data type as parameter.
Return Value − Th... | [
{
"code": null,
"e": 2335,
"s": 2238,
"text": "The method gives the maximum of the two arguments. The argument can be int, float, long, double."
},
{
"code": null,
"e": 2470,
"s": 2335,
"text": "double max(double arg1, double arg2) \nfloat max(float arg1, float arg2) \nint max(in... |
Python – scipy.linalg.norm | The norm() function of the scipy.linalg package is used to return one of eight different matrix norms or one of an infinite number of vector norms.
scipy.linalg.norm(x)
Where x is an input array or a square matrix.
Let us consider the following example −
# Importing the required libraries from scipy
from scipy import l... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "The norm() function of the scipy.linalg package is used to return one of eight different matrix norms or one of an infinite number of vector norms."
},
{
"code": null,
"e": 1231,
"s": 1210,
"text": "scipy.linalg.norm(x)"
},
{
... |
Using Weighted K-Means Clustering to Determine Distribution Centres Locations | by Pararawendy Indarjo | Towards Data Science | Background
All of us must be familiar with fast-food chain companies such as KFC or McDonalds, due to their massive number of outlets surrounding us. Such names are well known for offering ready-to-eat meals speedily, thanks to advance-bulk cooking and sometimes also pre-packaging. As an implication of their business m... | [
{
"code": null,
"e": 183,
"s": 172,
"text": "Background"
},
{
"code": null,
"e": 657,
"s": 183,
"text": "All of us must be familiar with fast-food chain companies such as KFC or McDonalds, due to their massive number of outlets surrounding us. Such names are well known for offeri... |
Optimal Binary Search Tree | A set of integers are given in the sorted order and another array freq to frequency count. Our task is to create a binary search tree with those data to find the minimum cost for all searches.
An auxiliary array cost[n, n] is created to solve and store the solution of subproblems. Cost matrix will hold the data to solv... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "A set of integers are given in the sorted order and another array freq to frequency count. Our task is to create a binary search tree with those data to find the minimum cost for all searches."
},
{
"code": null,
"e": 1419,
"s": 1255,
... |
F# - Enumerations | An enumeration is a set of named integer constants.
In F#, enumerations, also known as enums, are integral types where labels are assigned to a subset of the values. You can use them in place of literals to make code more readable and maintainable.
The general syntax for declaring an enumeration is −
type enum-name =
... | [
{
"code": null,
"e": 2213,
"s": 2161,
"text": "An enumeration is a set of named integer constants."
},
{
"code": null,
"e": 2410,
"s": 2213,
"text": "In F#, enumerations, also known as enums, are integral types where labels are assigned to a subset of the values. You can use them... |
Spark Streaming for Beginners. Spark is deemed to be a highly fast... | by Priyanka Gupta | Towards Data Science | Spark is deemed to be a highly fast engine to process high volumes of data and is found to be 100 times faster than MapReduce. It is so as it uses distributed data processing through which it breaks the data into smaller pieces so that the chunks of data can be computed in parallel across the machines which saves time.... | [
{
"code": null,
"e": 605,
"s": 172,
"text": "Spark is deemed to be a highly fast engine to process high volumes of data and is found to be 100 times faster than MapReduce. It is so as it uses distributed data processing through which it breaks the data into smaller pieces so that the chunks of data ... |
Android | res/values folder - GeeksforGeeks | 05 Mar, 2021
The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.
Below explained are few basic files, contained in the res/values folder:
colors.xml: The colors.xml is an XML file which is used to store the colo... | [
{
"code": null,
"e": 24664,
"s": 24636,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 24825,
"s": 24664,
"text": "The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc."
... |
AdapterViewFlipper in Android with Example - GeeksforGeeks | 14 Sep, 2020
The AdapterViewFlipper class is a subclass of the ViewAnimator class and is used to flip between 2 or more views, such that only one view is displayed at a time. It is commonly used in slides. It is an element of the transition widget which helps to add transitions on the views. It is mainly useful to anim... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 25696,
"s": 25116,
"text": "The AdapterViewFlipper class is a subclass of the ViewAnimator class and is used to flip between 2 or more views, such that only one view is displayed at a time. I... |
How to create a responsive header with CSS? | Following is the code to create a responsive header with CSS −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box;}
nav {
overflow: hidden;
background-color: #330b7c;
padding: 10px;
}
.links {
font-family: 'Segoe UI... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Following is the code to create a responsive header with CSS −"
},
{
"code": null,
"e": 1136,
"s": 1125,
"text": " Live Demo"
},
{
"code": null,
"e": 2364,
"s": 1136,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<met... |
JavaScript Custom Events - GeeksforGeeks | 03 Sep, 2021
Events are used in almost every web application, such as the onclick event being used to execute some code when the user clicks on something. There are already numerous built-in events available to be used, but what if we want our own custom event? Let us suppose we are creating a chat application, and we ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 25781,
"s": 25300,
"text": "Events are used in almost every web application, such as the onclick event being used to execute some code when the user clicks on something. There are already num... |
Check if string is rotated by two places | Practice | GeeksforGeeks | Given two strings a and b. The task is to find if the string 'b' can be obtained by rotating another string 'a' by exactly 2 places.
Example 1:
Input:
a = amazon
b = azonam
Output: 1
Explanation: amazon can be rotated anti
clockwise by two places, which will make
it as azonam.
Example 2:
Input:
a = geeksforgeeks
b = g... | [
{
"code": null,
"e": 371,
"s": 238,
"text": "Given two strings a and b. The task is to find if the string 'b' can be obtained by rotating another string 'a' by exactly 2 places."
},
{
"code": null,
"e": 382,
"s": 371,
"text": "Example 1:"
},
{
"code": null,
"e": 517,
... |
Dealing With Dates in Pandas — 6 Common Operations You Should Know | by Yong Cui | Towards Data Science | Besides texts and numbers, dates are a very common data type in our datasets. When we use Pandas to process dates, it’s definitely not the most straightforward task for most data scientists. When I began to use Pandas, I wasn’t familiar with date-related features, so every time when I dealt with dates, I had to search ... | [
{
"code": null,
"e": 604,
"s": 171,
"text": "Besides texts and numbers, dates are a very common data type in our datasets. When we use Pandas to process dates, it’s definitely not the most straightforward task for most data scientists. When I began to use Pandas, I wasn’t familiar with date-related ... |
How to get the file extension using PowerShell? | We can retrieve the file extension using multiple ways. First, using the [System.IO.Path] class.
PS C:\> [System.IO.Path]::GetExtension("C:\temp\25Aug2020.txt")
.txt
PS C:\> [System.IO.Path]::GetExtension("C:\temp\azcopy.zip")
.zip
This is the easiest way to get the file extension. Otherways,
Using programmatically,
PS... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "We can retrieve the file extension using multiple ways. First, using the [System.IO.Path] class."
},
{
"code": null,
"e": 1294,
"s": 1159,
"text": "PS C:\\> [System.IO.Path]::GetExtension(\"C:\\temp\\25Aug2020.txt\")\n.txt\nPS C:\\> ... |
HashMap computeIfPresent(key, BiFunction) method in Java with Examples - GeeksforGeeks | 15 Oct, 2019
The computeIfPresent(Key, BiFunction) method of HashMap class which allows you to compute value of a mapping for specified key if key is already associated with a value (or is mapped to null).
If mapping function of this method returns null, the mapping is removed.
If the remapping function throws an excep... | [
{
"code": null,
"e": 25831,
"s": 25803,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 26024,
"s": 25831,
"text": "The computeIfPresent(Key, BiFunction) method of HashMap class which allows you to compute value of a mapping for specified key if key is already associated with a ... |
button tag vs input type="button" attribute - GeeksforGeeks | 22 Apr, 2019
The <input type=”button”> and <button> tag are two different approach to use Button in HTML document. The difference between them is that the buttons created with the <button> tag offer many contributing possibilities than <input type=”button”> attribute. The <button> can have content inside it. The <butto... | [
{
"code": null,
"e": 26005,
"s": 25977,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 26725,
"s": 26005,
"text": "The <input type=”button”> and <button> tag are two different approach to use Button in HTML document. The difference between them is that the buttons created with ... |
Compare Println vs Printf in Golang with Examples - GeeksforGeeks | 10 May, 2020
Println and Printf are the functions to print the output in Golang. Both are present inside the package “fmt“. However, both these functions provide output differently as follows:
Means “Print Line”. It helps us to print integers, strings, etc but inserts a new line at the end i.e. a line break is inserted... | [
{
"code": null,
"e": 25683,
"s": 25655,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25863,
"s": 25683,
"text": "Println and Printf are the functions to print the output in Golang. Both are present inside the package “fmt“. However, both these functions provide output differe... |
Beeply module in Python - GeeksforGeeks | 03 Jun, 2021
The beeply module in python will helps you produce musical notes using your computer’s characteristic beep sounds. It’s completely written in python ( using winsound and time module to be precise )
As this module is written using winsound, it will work only on Windows. This module contains only one class a... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 25735,
"s": 25537,
"text": "The beeply module in python will helps you produce musical notes using your computer’s characteristic beep sounds. It’s completely written in python ( using winsou... |
LocalDate isLeapYear() method in Java with Examples - GeeksforGeeks | 29 Nov, 2018
The isLeapYear() method of LocalDate class in Java checks if the year is leap year or not.
Syntax:
public boolean isLeapYear()
Parameter: This method does not accept parameters.
Return Value: The function returns true if the year is leap, false otherwise.
Below programs illustrate the isLeapYear() method ... | [
{
"code": null,
"e": 26240,
"s": 26212,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 26331,
"s": 26240,
"text": "The isLeapYear() method of LocalDate class in Java checks if the year is leap year or not."
},
{
"code": null,
"e": 26339,
"s": 26331,
"text": ... |
Python | Pandas Series.mean() - GeeksforGeeks | 11 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.mean() function return the mean of t... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 25794,
"s": 25537,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label... |
Different Method Calls in Java - GeeksforGeeks | 02 Aug, 2021
Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether for security purposes or building large distribution projects. One of the advantages of using JAVA is that Java tries to connect every concept in ... | [
{
"code": null,
"e": 25443,
"s": 25415,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 26055,
"s": 25443,
"text": "Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether fo... |
Convert the undirected graph into directed graph such that there is no path of length greater than 1 - GeeksforGeeks | 09 May, 2022
Given an undirected graph with N vertices and M edges and no self loops or multiple edges. The task is to convert the given undirected graph into a directed graph such that there is no path of length greater than 1. If it is possible to make such a graph then print two space-separated integers u and v in M... | [
{
"code": null,
"e": 26357,
"s": 26329,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 26777,
"s": 26357,
"text": "Given an undirected graph with N vertices and M edges and no self loops or multiple edges. The task is to convert the given undirected graph into a directed graph ... |
HashSet hashCode() method in Java with Example - GeeksforGeeks | 24 Dec, 2018
The hashCode() method of HashSet in Java is used to get the hashCode value for this instance of the HashSet. It returns an integer value which is the hashCode value for this instance of the HashSet.
Syntax:
public int hashCode()
Parameters: This function has no parameters.
Returns: The method returns an in... | [
{
"code": null,
"e": 25510,
"s": 25482,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 25709,
"s": 25510,
"text": "The hashCode() method of HashSet in Java is used to get the hashCode value for this instance of the HashSet. It returns an integer value which is the hashCode valu... |
Apache Hive Installation and Configuring MySql Metastore for Hive - GeeksforGeeks | 10 Jul, 2020
Apache Hive was initially developed by Facebook in 2010. It is a Data Warehousing package, used for Data Analysis. Hive is used for Managing and querying structured data with its query language known as HQL or HIVEQL, which is quite similar to SQL query language. Hadoop provides MapReduce as a programming ... | [
{
"code": null,
"e": 25591,
"s": 25563,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 26073,
"s": 25591,
"text": "Apache Hive was initially developed by Facebook in 2010. It is a Data Warehousing package, used for Data Analysis. Hive is used for Managing and querying structure... |
How to convert datetime to date in Python - GeeksforGeeks | 23 Aug, 2021
In this article, we are going to see how to convert DateTime to date in Python. For this, we will use the strptime() method. This method is used to create a DateTime object from a string. Then we will extract the date from the DateTime object using the date() function.
Syntax: datetime.strptime()
Parameter... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 24482,
"s": 24212,
"text": "In this article, we are going to see how to convert DateTime to date in Python. For this, we will use the strptime() method. This method is used to create a DateTi... |
Scala Collections - Partition Method | partition() method is a member of TraversableLike trait, it is used to run a predicate method on each elements of a collection. It returns two collections, one collection is of elements which satisfiles a given predicate function and another collection is of elements which do not satisfy the given predicate function.
T... | [
{
"code": null,
"e": 3201,
"s": 2882,
"text": "partition() method is a member of TraversableLike trait, it is used to run a predicate method on each elements of a collection. It returns two collections, one collection is of elements which satisfiles a given predicate function and another collection ... |
random.getrandbits() in Python - GeeksforGeeks | 17 May, 2020
random module is used to generate random numbers in Python. Not actually random, rather this is used to generate pseudo-random numbers. That implies that these randomly generated numbers can be determined.
The getrandbits() method of the random module is used to return an integer with a specified number of... | [
{
"code": null,
"e": 23436,
"s": 23408,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 23642,
"s": 23436,
"text": "random module is used to generate random numbers in Python. Not actually random, rather this is used to generate pseudo-random numbers. That implies that these ran... |
How to use a return statement in lambda expression in Java? | A return statement is not an expression in a lambda expression. We must enclose statements in braces ({}). However, we do not have to enclose a void method invocation in braces. The return type of a method in which lambda expression used in a return statement must be a functional interface.
public class LambdaReturnTes... | [
{
"code": null,
"e": 1354,
"s": 1062,
"text": "A return statement is not an expression in a lambda expression. We must enclose statements in braces ({}). However, we do not have to enclose a void method invocation in braces. The return type of a method in which lambda expression used in a return sta... |
Installing Linux Packages Inside a Docker Container | After you have installed docker on your linux machine, the next step is to create an image and run a container. You need to create a base image of an OS distribution and after that you can add and modify the base image by installing packages and dependencies and committing the changes to it.
In this article, we will sh... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "After you have installed docker on your linux machine, the next step is to create an image and run a container. You need to create a base image of an OS distribution and after that you can add and modify the base image by installing packages and depende... |
Time Series Data Analysis — Resample | by James Ho | Towards Data Science | When it comes to time series analysis, resampling is a critical technique that allows you to flexibly define the resolution of the data you want. You can either increase the frequency like converting 5-minute data into 1-minute data (upsample, increase in data points), or you can do the other way around (downsample, de... | [
{
"code": null,
"e": 516,
"s": 172,
"text": "When it comes to time series analysis, resampling is a critical technique that allows you to flexibly define the resolution of the data you want. You can either increase the frequency like converting 5-minute data into 1-minute data (upsample, increase in... |
Alter login in SQL Server - GeeksforGeeks | 19 Aug, 2020
Alter login statements can be used to changes the properties of a SQL Server login account.
Syntax:
ALTER LOGIN loginname;
GO
Enable a disabled login –
Syntax :
ALTER LOGIN loginname ENABLE;
Example –
ALTER LOGIN geeks ENABLE;
Change password of a loginSyntax :
ALTER LOGIN geeks WITH PASSWORD = 'newpassw... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 24360,
"s": 24268,
"text": "Alter login statements can be used to changes the properties of a SQL Server login account."
},
{
"code": null,
"e": 24368,
"s": 24360,
"text":... |
Logistic Regression in Python - Splitting Data | We have about forty-one thousand and odd records. If we use the entire data for model building, we will not be left with any data for testing. So generally, we split the entire data set into two parts, say 70/30 percentage. We use 70% of the data for model building and the rest for testing the accuracy in prediction of... | [
{
"code": null,
"e": 2138,
"s": 1733,
"text": "We have about forty-one thousand and odd records. If we use the entire data for model building, we will not be left with any data for testing. So generally, we split the entire data set into two parts, say 70/30 percentage. We use 70% of the data for mo... |
Find the area of rhombus from given Angle and Side length - GeeksforGeeks | 07 Apr, 2021
Given two integers A and X, denoting the length of a side of a rhombus and an angle respectively, the task is to find the area of the rhombus.
A rhombus is a quadrilateral having 4 sides of equal length, in which both the opposite sides are parallel, and opposite angles are equal.
Examples:
Input: A = 4, X... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24411,
"s": 24268,
"text": "Given two integers A and X, denoting the length of a side of a rhombus and an angle respectively, the task is to find the area of the rhombus."
},
{
"code"... |
Changing the Default Font for all the widgets in Tkinter | Let us consider a case where we want to change the default font of a Tkinter application. To apply the font and setting it as the default font for a particular application, we have to use option_add(**options) method where we specify a property such as background color, font, etc. The changes made after defining the me... | [
{
"code": null,
"e": 1444,
"s": 1062,
"text": "Let us consider a case where we want to change the default font of a Tkinter application. To apply the font and setting it as the default font for a particular application, we have to use option_add(**options) method where we specify a property such as ... |
Find the number of solutions to the given equation | 22 Jun, 2022
Given three integers A, B and C, the task is to find the count of values of X such that the following condition is satisfied, X = B * Sm(X)A + C where Sm(X) denotes the sum of digits of X and 1 < X < 109.Examples:
Input: A = 3, B = 2, C = 8 Output: 3 For X = 10, 2 * (1)3 + 8 = 10 For X = 2008, 2 * (10)3 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 270,
"s": 54,
"text": "Given three integers A, B and C, the task is to find the count of values of X such that the following condition is satisfied, X = B * Sm(X)A + C where Sm(X) denotes the sum o... |
Maximum count of pairwise co-prime and common divisors of two given numbers | 11 May, 2021
Given an array of pairs arr[] of two numbers {N, M}, the task is to find the maximum count of common divisors for each pair N and M such that every pair between the common divisor are co-prime.
A number x is a common divisor of N and M if, N%x = 0 and M%x = 0. Two numbers are co-prime if their Greatest Com... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 222,
"s": 28,
"text": "Given an array of pairs arr[] of two numbers {N, M}, the task is to find the maximum count of common divisors for each pair N and M such that every pair between the common div... |
Python | Arithmetic operations in excel file using openpyxl | 19 May, 2021
Prerequisite: Reading & Writing to excel sheet using openpyxlOpenpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing, arithmetic operations and plotting graphs. Let’s see how to perform different arithmetic operations using openpyxl.
=SUM(cell1:ce... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 346,
"s": 52,
"text": "Prerequisite: Reading & Writing to excel sheet using openpyxlOpenpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing... |
Python Multiple Choice Questions - GeeksforGeeks | 28 Jun, 2021
Mcq / Quizzes
Outputs
Mcq / Quizzes :
FunctionsOperatorsMiscellaneousData TypeOutput
Functions
Operators
Miscellaneous
Data Type
Output
Outputs :
Output of Python Program | Set 1Output of python program | Set 2Output of python program | Set 3Output of python program | Set 4Output of python program | Set 5O... | [
{
"code": null,
"e": 43382,
"s": 43354,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 43396,
"s": 43382,
"text": "Mcq / Quizzes"
},
{
"code": null,
"e": 43404,
"s": 43396,
"text": "Outputs"
},
{
"code": null,
"e": 43420,
"s": 43404,
"tex... |
DB2 - Instance | An Instance is a logical environment for DB2 Database Manager. Using instance, you can manage databases. Depending on our requirements, you can create multiple instances on one physical machine. The contents of Instance directory are:
Database Manager Configuration file
System Database Directory
Node Directory
Node Co... | [
{
"code": null,
"e": 2164,
"s": 1928,
"text": "An Instance is a logical environment for DB2 Database Manager. Using instance, you can manage databases. Depending on our requirements, you can create multiple instances on one physical machine. The contents of Instance directory are:"
},
{
"co... |
How to collect data from Statistics Canada using Python | by Rui Zhang | Towards Data Science | Statistics Canada provides a wide range of data for public use, including data for Canada’s economy, society and environment. In addition to manually browsing the webpage to access the data, Statistics Canada also provides Web Data Service, i.e. API access to their database. What’s even better, there is a python librar... | [
{
"code": null,
"e": 676,
"s": 172,
"text": "Statistics Canada provides a wide range of data for public use, including data for Canada’s economy, society and environment. In addition to manually browsing the webpage to access the data, Statistics Canada also provides Web Data Service, i.e. API acces... |
AdapterHub: A Framework for Adapting Transformers | by Nicole Nair | Towards Data Science | This blog post is an introduction to AdapterHub, a new framework released by Pfeiffer et al (2020b), that enables you to perform transfer learning of generalized pre-trained transformers such as BERT, RoBERTa, and XLM-R to downstream tasks such as question-answering, classification, etc. using adapters instead of fine-... | [
{
"code": null,
"e": 500,
"s": 172,
"text": "This blog post is an introduction to AdapterHub, a new framework released by Pfeiffer et al (2020b), that enables you to perform transfer learning of generalized pre-trained transformers such as BERT, RoBERTa, and XLM-R to downstream tasks such as questio... |
XSD - Attribute | Attribute represents the attribute of an XML element. XSD defines it as a simple type.
<xs:attribute name = "attribute-name" type = "attribute-type"/>
<xs:attribute name = "rollno" type = "xs:integer"/>
defines following rollno attribute which can be used in an XML element. For example
<student rollno = "393" />
<x... | [
{
"code": null,
"e": 1791,
"s": 1704,
"text": "Attribute represents the attribute of an XML element. XSD defines it as a simple type."
},
{
"code": null,
"e": 1856,
"s": 1791,
"text": "<xs:attribute name = \"attribute-name\" type = \"attribute-type\"/>\n"
},
{
"code": nul... |
Insertion and Deletion in STL Set C++ | Insertion in STL set can be done by insert() and emplace() operation.
Insert(): Insert() is used to insert elements to the set. Insert operation takes a reference to an object.
st.size() = Returns the size of set.
st.insert() = It is used to insert elements to the set.
#include <iostream>
#include <set>
#include <stri... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "Insertion in STL set can be done by insert() and emplace() operation."
},
{
"code": null,
"e": 1239,
"s": 1132,
"text": "Insert(): Insert() is used to insert elements to the set. Insert operation takes a reference to an object."
},... |
GATE | GATE-CS-2003 | Question 90 - GeeksforGeeks | 28 Jun, 2021
Consider the following recurrence relationThe value of T(m2) for m ≥ 1 is(A) (m/6) (21m – 39) + 4(B) (m/6) (4m2 – 3m + 5)(C) (m/2) (m2.5 – 11m + 20) – 5(D) (m/6) (5m3 – 34m2 + 137m – 104) + (5/6)Answer: (B)Explanation:
One easy way to solve this is to try putting different
values of m.
For example, we kn... | [
{
"code": null,
"e": 24466,
"s": 24438,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24685,
"s": 24466,
"text": "Consider the following recurrence relationThe value of T(m2) for m ≥ 1 is(A) (m/6) (21m – 39) + 4(B) (m/6) (4m2 – 3m + 5)(C) (m/2) (m2.5 – 11m + 20) – 5(D) (m/6) (... |
Objective-C Categories | Sometimes, you may find that you wish to extend an existing class by adding behavior that is useful only in certain situations. In order add such extension to existing classes, Objective-C provides categories and extensions.
If you need to add a method to an existing class, perhaps, to add functionality to make it easi... | [
{
"code": null,
"e": 2785,
"s": 2560,
"text": "Sometimes, you may find that you wish to extend an existing class by adding behavior that is useful only in certain situations. In order add such extension to existing classes, Objective-C provides categories and extensions."
},
{
"code": null,
... |
C Program to convert first character uppercase in a sentence | Given a string and with mixed case, i.e with both uppercase and lower case, the task is to covert the first character to uppercase rest in lowercase if it’s in upper case.
Let’s understand it in depth with the help of a simple example.
Like we are given a string “hElLo world”, we have to convert the first character ‘h’... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "Given a string and with mixed case, i.e with both uppercase and lower case, the task is to covert the first character to uppercase rest in lowercase if it’s in upper case."
},
{
"code": null,
"e": 1298,
"s": 1234,
"text": "Let’s unde... |
Find the number of boxes to be removed - GeeksforGeeks | 11 Aug, 2021
Given an array arr[] representing a sequence of piles of boxes where each and every box has the same height of 1 unit. Given that you are on the top of the first pile and need to reach the ground by moving from each pile starting from leftmost to rightmost.Constraints:
One can move from the current pile ... | [
{
"code": null,
"e": 25291,
"s": 25263,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25563,
"s": 25291,
"text": "Given an array arr[] representing a sequence of piles of boxes where each and every box has the same height of 1 unit. Given that you are on the top of the first p... |
Sum of even numbers from n to m regardless if n<m or n>m JavaScript | We are required to write a function that takes two numbers as arguments m and n, and it returns
the sum of all even numbers that falls between m and n (both inclusive)
For example −
If m = 10 and n = -4
The output should be 10+8+6+4+2+0+(-2)+(-4) = 24
We will first calculate the sum of all even numbers up to n and the ... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "We are required to write a function that takes two numbers as arguments m and n, and it returns\nthe sum of all even numbers that falls between m and n (both inclusive)"
},
{
"code": null,
"e": 1244,
"s": 1230,
"text": "For example −... |
Finding the Minimum or Maximum Value in Java ArrayList - GeeksforGeeks | 15 Dec, 2020
The minimum value is the one with the smallest value and the maximum value is the one with the largest value. The main task here is to find the minimum and maximum value from the ArrayList. Consider an example of an ArrayList, and we need to find the largest and the smallest element.
Example:
Input List: ... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 24234,
"s": 23948,
"text": "The minimum value is the one with the smallest value and the maximum value is the one with the largest value. The main task here is to find the minimum and maximum... |
String Template Class in Python? | Python string template class is used to create a simple template string. Python template strings were first introduced in python 2.4. Python string template is created by passing template strings as argument to its constructor. Where string formatting operators used for the percentage sign for substitutions and the tem... | [
{
"code": null,
"e": 1414,
"s": 1062,
"text": "Python string template class is used to create a simple template string. Python template strings were first introduced in python 2.4. Python string template is created by passing template strings as argument to its constructor. Where string formatting o... |
Deque offerLast() method in Java - GeeksforGeeks | 21 Sep, 2018
The offerLast(E e) method of Deque Interface inserts the specified element into the end of the Deque if it is possible to do so immediately without violating capacity restrictions. This method is preferable to add() method since this method does not throws an exception when the capacity of the container is... | [
{
"code": null,
"e": 24290,
"s": 24262,
"text": "\n21 Sep, 2018"
},
{
"code": null,
"e": 24627,
"s": 24290,
"text": "The offerLast(E e) method of Deque Interface inserts the specified element into the end of the Deque if it is possible to do so immediately without violating capac... |
Docker - Compose | Docker Compose is used to run multiple containers as a single service. For example, suppose you had an application which required NGNIX and MySQL, you could create one file which would start both the containers as a service without the need to start each one separately.
In this chapter, we will see how to get started w... | [
{
"code": null,
"e": 2611,
"s": 2340,
"text": "Docker Compose is used to run multiple containers as a single service. For example, suppose you had an application which required NGNIX and MySQL, you could create one file which would start both the containers as a service without the need to start eac... |
Matplotlib.animation.FuncAnimation class in Python | 07 Oct, 2021
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.animation.FuncAnimation class is used to make animation by repeatedly calling t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 241,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Design an About us Page using HTML and CSS | 12 Jan, 2021
To create an attractive page may seem to be difficult for, who don’t know HTML and CSS. If someone does not know using CSS, then they will not be able to make the page look better or attractive. So the main focus of this article will be on the implementation of CSS.
Creating structure: In this section, we ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jan, 2021"
},
{
"code": null,
"e": 319,
"s": 52,
"text": "To create an attractive page may seem to be difficult for, who don’t know HTML and CSS. If someone does not know using CSS, then they will not be able to make the page look b... |
PHP Form Processing | 15 Apr, 2020
In this article, we will discuss how to process form in PHP. HTML forms are used to send the user information to the server and returns the result back to the browser. For example, if you want to get the details of visitors to your website, and send them good thoughts, you can collect the user information ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Apr, 2020"
},
{
"code": null,
"e": 601,
"s": 54,
"text": "In this article, we will discuss how to process form in PHP. HTML forms are used to send the user information to the server and returns the result back to the browser. For ex... |
Multiple Goroutines | 05 Jun, 2022
Prerequisite: Multiple Goroutines A Goroutine is a function or method which executes independently and simultaneously in connection with any other Goroutines present in your program. Or in other words, every concurrently executing activity in Go language is known as a Goroutines. In Go language, you are al... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2022"
},
{
"code": null,
"e": 522,
"s": 28,
"text": "Prerequisite: Multiple Goroutines A Goroutine is a function or method which executes independently and simultaneously in connection with any other Goroutines present in your p... |
SQL Server Mathematical functions (SQRT, PI, SQUARE, ROUND, CEILING & FLOOR) | 21 Mar, 2018
Mathematical functions are present in SQL server which can be used to perform mathematical calculations. Some commonly used mathematical functions are given below:1. SQRT():SQRT() function is the most commonly used function. It takes any numeric values and returns the square root value of that number.
Synt... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 356,
"s": 53,
"text": "Mathematical functions are present in SQL server which can be used to perform mathematical calculations. Some commonly used mathematical functions are given below:1. SQRT():S... |
What is Force? | 21 Jul, 2021
Force, we all are using this word in our daily life, but we might not know that we are using it. So, what is a force? Let me give some examples, Force is pulling or pushing the door, force is kicking a ball, force is pushing a heavy force. Now, these examples are giving us an idea of what a force looks lik... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 482,
"s": 54,
"text": "Force, we all are using this word in our daily life, but we might not know that we are using it. So, what is a force? Let me give some examples, Force is pulling or pushing t... |
ReactJS componentDidUpdate() Method | 31 Dec, 2020
The componentDidUpdate() method allows us to execute the React code when the component is updated. All the network requests that are to be made when the props passed to the component changes are coded here.
The componentDidUpdate()is called after componentDidMount() and can be useful to perform some action... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2020"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "The componentDidUpdate() method allows us to execute the React code when the component is updated. All the network requests that are to be made when the props passed to the co... |
Matplotlib.figure.Figure.set_dpi() in Python | 03 May, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains a... |
turtle.Screen().bgcolor() function in Python | 17 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This method is used to set or return background color of the Turtle Screen.
Syntax:
turtle... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 270,
"s": 53,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ve... |
How to add Pagination in Django Project? | 02 Feb, 2021
Pagination system is one of the most common features in blogs, search engine , list of result etc. Seeing the popularity of pagination system django developers have build a Paginator class so that web developers do not have to think of the logic to make paginators.
Paginator Class live in django/core/pag... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 296,
"s": 28,
"text": "Pagination system is one of the most common features in blogs, search engine , list of result etc. Seeing the popularity of pagination system django developers have build a P... |
Python – Extract dictionary items with List elements | 31 Jan, 2022
Sometimes, while working with Python dictionaries, we can have a problem in which we need to extract all the items from dictionary that constitute all the elements from a list. This kind of problem can occur in domains such as competitive programming and web development. Let’s discuss certain ways in which... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 365,
"s": 28,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to extract all the items from dictionary that constitute all the elements from a list... |
Optional orElse() method in Java with examples | 30 Jul, 2019
The orElse() method of java.util.Optional class in Java is used to get the value of this Optional instance, if present. If there is no value present in this Optional instance, then this method returns the specified value.
Syntax:
public T orElse(T value)
Parameters: This method accepts value as a paramete... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "The orElse() method of java.util.Optional class in Java is used to get the value of this Optional instance, if present. If there is no value present in this Optional instance,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.