title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Iterate through the values of HashMap in Java | Use Iterator to iterate through the values of HashMap −
HashMap hm = new HashMap();
// Put elements to the map
hm.put("Bag", new Integer(1100));
hm.put("Sunglasses", new Integer(2000));
hm.put("Frames", new Integer(800));
hm.put("Wallet", new Integer(700));
hm.put("Belt", new Integer(600));
Now, use Iterator to display... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "Use Iterator to iterate through the values of HashMap −"
},
{
"code": null,
"e": 1354,
"s": 1118,
"text": "HashMap hm = new HashMap();\n// Put elements to the map\nhm.put(\"Bag\", new Integer(1100));\nhm.put(\"Sunglasses\", new Integ... |
A Layman’s Guide to Fuzzy Document Deduplication | by Ryan Basques | Towards Data Science | In our era of exponentially growing data, complex projects, large teams, and a desire to move on to the next deadline, small things often fall through the cracks.
Our team of data analysts saw this at a large law firm, where important documents were often shared, edited, shared again, and stored away on a dedicated doc... | [
{
"code": null,
"e": 335,
"s": 172,
"text": "In our era of exponentially growing data, complex projects, large teams, and a desire to move on to the next deadline, small things often fall through the cracks."
},
{
"code": null,
"e": 643,
"s": 335,
"text": "Our team of data analys... |
C/C++ program to shutdown a system? | Here we will see how we can shut down the system by writing a simple C or C++ code. The shutdown process varies in different OS. If we are Linux user, we can use this terminal command to shut down.
shutdown –P now
If we are using Windows system, we can use this command −
c:\\windows\\system32\\shutdown /i
We will see t... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "Here we will see how we can shut down the system by writing a simple C or C++ code. The shutdown process varies in different OS. If we are Linux user, we can use this terminal command to shut down."
},
{
"code": null,
"e": 1276,
"s": 126... |
How do Python modules work? | Python has a way to put definitions in a file and use them in a script or in an interactive instance of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the collection of variables that you have access to in a script executed at the t... | [
{
"code": null,
"e": 1416,
"s": 1062,
"text": "Python has a way to put definitions in a file and use them in a script or in an interactive instance of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the collection... |
How to format JSON string in JavaScript? | To format HSON string in JavaScript, use JSON.stringify() with some parameters. Following is
the code −
var details = {
studentId: 101,
studentFirstName: 'David',
studentLastName: 'Miller',
studentAge:21,
subjectDetails: {
subjectId: 'JavaScript_101',
subjectName: 'Introduction to JavaScript'... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To format HSON string in JavaScript, use JSON.stringify() with some parameters. Following is\nthe code −"
},
{
"code": null,
"e": 1551,
"s": 1166,
"text": "var details = {\n studentId: 101,\n studentFirstName: 'David',\n studen... |
How to do Piping/Streaming of JavaScript objects in Node.js ? - GeeksforGeeks | 20 Nov, 2021
This article gives brief information about the piping/stream implementation in node.js and explains the working of various parts as buffers, streams and how to implement piping in node.js
Buffers: These are the temporary storage spot for a chunk of data that is being transferred from one place to another, ... | [
{
"code": null,
"e": 24557,
"s": 24529,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 24745,
"s": 24557,
"text": "This article gives brief information about the piping/stream implementation in node.js and explains the working of various parts as buffers, streams and how to imp... |
C library function - isdigit() | The C library function int isdigit(int c) checks if the passed character is a decimal digit character.
Decimal digits are (numbers) − 0 1 2 3 4 5 6 7 8 9.
Following is the declaration for isdigit() function.
int isdigit(int c);
c − This is the character to be checked.
c − This is the character to be checked.
This funct... | [
{
"code": null,
"e": 2110,
"s": 2007,
"text": "The C library function int isdigit(int c) checks if the passed character is a decimal digit character."
},
{
"code": null,
"e": 2162,
"s": 2110,
"text": "Decimal digits are (numbers) − 0 1 2 3 4 5 6 7 8 9."
},
{
"code": null,... |
Count the occurrence of digit K in a given number N using Recursion - GeeksforGeeks | 24 Nov, 2021
Given an integer N greater than 0, the task is to find the occurrence of digit K present in the given number N.Examples:
Input: N = 10000, K = 0 Output: 4 Explanation: Occurrence of ‘0’ digit in 10000 is 4.Input: N = 51435, K = 5 Output: 2 Explanation: Occurrence of ‘5’ digit in 51435 is 2
Approach: ... | [
{
"code": null,
"e": 24325,
"s": 24297,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 24448,
"s": 24325,
"text": "Given an integer N greater than 0, the task is to find the occurrence of digit K present in the given number N.Examples: "
},
{
"code": null,
"e": 246... |
Find start and ending index of an element in an unsorted array - GeeksforGeeks | 10 May, 2021
Given an array of integers, task is to find the starting and ending position of a given key.
Examples:
Input : arr[] = {1, 2, 3, 4, 5, 5}
Key = 5
Output : Start index: 4
Last index: 5
Explanation: Starting index where 5
is present is 4 and ending address is 5.
Input :arr[] = {1, 3, 7, 8, ... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 26269,
"s": 26175,
"text": "Given an array of integers, task is to find the starting and ending position of a given key. "
},
{
"code": null,
"e": 26281,
"s": 26269,
"text... |
Rabin-Karp Algorithm | Rabin-Karp is another pattern searching algorithm to find the pattern in a more efficient way. It also checks the pattern by moving window one by one, but without checking all characters for all cases, it finds the hash value. When the hash value is matched, then only it tries to check each character. This procedure ma... | [
{
"code": null,
"e": 1416,
"s": 1062,
"text": "Rabin-Karp is another pattern searching algorithm to find the pattern in a more efficient way. It also checks the pattern by moving window one by one, but without checking all characters for all cases, it finds the hash value. When the hash value is mat... |
Isomorphic Strings | Practice | GeeksforGeeks | Given two strings 'str1' and 'str2', check if these two strings are isomorphic to each other.
Two strings str1 and str2 are called isomorphic if there is a one to one mapping possible for every character of str1 to every character of str2 while preserving the order.
Note: All occurrences of every character in ‘str1’ sh... | [
{
"code": null,
"e": 599,
"s": 238,
"text": "Given two strings 'str1' and 'str2', check if these two strings are isomorphic to each other.\nTwo strings str1 and str2 are called isomorphic if there is a one to one mapping possible for every character of str1 to every character of str2 while preservin... |
Difference Between Execute(), query() and Update() Methods in Java - GeeksforGeeks | 05 Oct, 2021
Before getting started, let us have prior knowledge of parameters that makes use of the following three queries parameters, which are as follows:
boolean execute(String SQL): Returns a boolean value of true if a ResultSet object can be retrieved; otherwise, it returns false. Use this method to execute SQL ... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 26249,
"s": 26103,
"text": "Before getting started, let us have prior knowledge of parameters that makes use of the following three queries parameters, which are as follows:"
},
{
"co... |
Calculate Time Difference between Dates in R Programming - difftime() Function - GeeksforGeeks | 10 Jun, 2020
difftime() function in R Language is used to calculate time difference between dates in the required units like days, weeks, months, years, etc.
Syntax: difftime(date1, date2, units)
Parameters:date1, date2: Dates to calculate differenceunits: Days, weeks, months, etc.
Example 1:
# R program to find time d... | [
{
"code": null,
"e": 24924,
"s": 24896,
"text": "\n10 Jun, 2020"
},
{
"code": null,
"e": 25069,
"s": 24924,
"text": "difftime() function in R Language is used to calculate time difference between dates in the required units like days, weeks, months, years, etc."
},
{
"cod... |
Binary Tree to Binary Search Tree Conversion using STL set C++? | In case of a given Binary Tree, convert it to a Binary Search Tree in such a way that keeps the original structure of Binary Tree intact.
Sets of C++ STL will be used by this solution instead of array based solution.
Input
11
/ \
3 8
/ \
9 5
Output
9
/ \
5 11
/ \
3 8
I... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "In case of a given Binary Tree, convert it to a Binary Search Tree in such a way that keeps the original structure of Binary Tree intact."
},
{
"code": null,
"e": 1279,
"s": 1200,
"text": "Sets of C++ STL will be used by this solutio... |
Display today’s date in Java with SimpleDateFormat | To work with SimpleDateFormat class in Java, import the following package.
import java.text.SimpleDateFormat;
To get the date, use the format() method as shown below. Firstly, set the date format −
Calendar cal = Calendar.getInstance();
SimpleDateFormat simpleformat = new SimpleDateFormat("dd/MM/yyyy");
Now, we will ge... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To work with SimpleDateFormat class in Java, import the following package."
},
{
"code": null,
"e": 1172,
"s": 1137,
"text": "import java.text.SimpleDateFormat;"
},
{
"code": null,
"e": 1260,
"s": 1172,
"text": "T... |
Node.js Writable Stream pipe Event - GeeksforGeeks | 12 Oct, 2021
The pipe event in a Writable Stream is emitted when the stream.pipe() method is being called on a readable stream by attaching this writable to its set of destinations.
Syntax:
Event: 'pipe'
Return Value: If the pipe() method is being called then this event is emitted else it is not emitted.
Below examples... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 25171,
"s": 25002,
"text": "The pipe event in a Writable Stream is emitted when the stream.pipe() method is being called on a readable stream by attaching this writable to its set of destinat... |
Explain media object and their types in Bootstrap - GeeksforGeeks | 29 Oct, 2021
In this article, we will learn about the Bootstrap media object, which is helpful to place the media alongside the text. Also, we will understand the various ways to use the media with text & its implementation through the examples. Bootstrap media objects can be useful to place some content besides with s... | [
{
"code": null,
"e": 25620,
"s": 25592,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 26293,
"s": 25620,
"text": "In this article, we will learn about the Bootstrap media object, which is helpful to place the media alongside the text. Also, we will understand the various ways ... |
Implementation of Cluster Centroid based Majority Under-sampling Technique (CCMUT) in Python | by Navoneel Chakrabarty | Towards Data Science | In Machine Learning and Deep Learning, Data Imbalance is a major reason of performance degradation of many Classification Algorithms and Deep Neural Networks respectively. Imbalanced Data is referred to as the unequal number of instances or samples belonging to different classses or categories by a significant differen... | [
{
"code": null,
"e": 679,
"s": 172,
"text": "In Machine Learning and Deep Learning, Data Imbalance is a major reason of performance degradation of many Classification Algorithms and Deep Neural Networks respectively. Imbalanced Data is referred to as the unequal number of instances or samples belong... |
How to deal with CORS error in express Node.js Project ? - GeeksforGeeks | 25 Jul, 2021
CORS, also known as Cross-Origin Resource Sharing, should be enabled if you want to make a request between your client and server when they are on different URLs.
Let us consider client to be on http://localhost:5500 and the server on http://localhost:5000. Now if you try to make a request from your clien... | [
{
"code": null,
"e": 25102,
"s": 25071,
"text": " \n25 Jul, 2021\n"
},
{
"code": null,
"e": 25265,
"s": 25102,
"text": "CORS, also known as Cross-Origin Resource Sharing, should be enabled if you want to make a request between your client and server when they are on different URL... |
C/C++ #include directive with Examples - GeeksforGeeks | 27 Apr, 2022
#include is a way of including a standard or user-defined file in the program and is mostly written at the beginning of any C/C++ program. This directive is read by the preprocessor and orders it to insert the content of a user-defined or system header file into the following program. These files are mainl... | [
{
"code": null,
"e": 24538,
"s": 24510,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 25184,
"s": 24538,
"text": "#include is a way of including a standard or user-defined file in the program and is mostly written at the beginning of any C/C++ program. This directive is read b... |
Optimizing Model Training with TensorFlow Profiler | by Rohan Jagtap | Towards Data Science | We want our models to train real fast. We use GPUs to make operations execute faster. However, it is possible that even after speeding up the computations, the model may have inefficiencies in the pipeline itself, and thus, may train slower. In such cases, it becomes really difficult to debug the code, or as a matter o... | [
{
"code": null,
"e": 399,
"s": 47,
"text": "We want our models to train real fast. We use GPUs to make operations execute faster. However, it is possible that even after speeding up the computations, the model may have inefficiencies in the pipeline itself, and thus, may train slower. In such cases,... |
talk - Unix, Linux Command | Options available:
When first called,
talk
contacts the talk daemon on the other user’s machine, which sends the
message
Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine
to that user. At this point, he then replies by typi... | [
{
"code": null,
"e": 10598,
"s": 10577,
"text": "\nOptions available:\n"
},
{
"code": null,
"e": 10703,
"s": 10598,
"text": "\nWhen first called,\n talk\ncontacts the talk daemon on the other user’s machine, which sends the\nmessage\n"
},
{
"code": null,
"e": 10845,
... |
Ext.js - Style | Application Styling refers to user adjustment of the look and feel of the components. These adjustments may include: color, color gradients, font, margins/padding, etc. Ext JS 6 has a new way of styling the application.
It uses SCSS for styling. SCSS is a more dynamic way of writing the CSS code. We can write the varia... | [
{
"code": null,
"e": 2243,
"s": 2023,
"text": "Application Styling refers to user adjustment of the look and feel of the components. These adjustments may include: color, color gradients, font, margins/padding, etc. Ext JS 6 has a new way of styling the application."
},
{
"code": null,
"... |
SimpleDateFormat(“Z”) in Java | The Z means "zero hour offset", also known as "Zulu time" (UTC) in the ISO 8601 time representation. However, ACP 121 standard defines the list of military time zones and derives the "Zulu time" from the Greenwich Mean Time (GMT).
TimeZone can be formatted in z, Z or zzzz formats.
The following is an example that displ... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "The Z means \"zero hour offset\", also known as \"Zulu time\" (UTC) in the ISO 8601 time representation. However, ACP 121 standard defines the list of military time zones and derives the \"Zulu time\" from the Greenwich Mean Time (GMT)."
},
{
"c... |
HTTP headers | Sec-WebSocket-Accept - GeeksforGeeks | 22 Nov, 2019
The HTTP headers are used for passing additional information with an HTTP request or response between the client and the server. They are grouped as general-headers, request-headers, response-headers, entity-headers. The Sec-WebSocket-Accept header falls under the response-type headers category. It is used... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n22 Nov, 2019"
},
{
"code": null,
"e": 26578,
"s": 25941,
"text": "The HTTP headers are used for passing additional information with an HTTP request or response between the client and the server. They are grouped as general-header... |
C Program to count the number of zeros from 0 to N - GeeksforGeeks | 07 Aug, 2020
Given a number N, the task is to write C program to count the number of zeros from 0 to N.
Examples:
Input: N = 10Output: 2Explanation:The number with zeros are 0, 10 till 10. Hence the count of zeros is 2.
Input: N = 20Output: 3Explanation:The number with zeros are 0, 10, 20 till 20. Hence the count of ze... | [
{
"code": null,
"e": 24954,
"s": 24926,
"text": "\n07 Aug, 2020"
},
{
"code": null,
"e": 25045,
"s": 24954,
"text": "Given a number N, the task is to write C program to count the number of zeros from 0 to N."
},
{
"code": null,
"e": 25055,
"s": 25045,
"text": ... |
Python - Frequency Distribution | Counting the frequency of occurrence of a word in a body of text is often needed during text processing. This can be achieved by applying the word_tokenize() function and appending the result to a list to keep count of the words as shown in the below program.
from nltk.tokenize import word_tokenize
from nltk.corpus im... | [
{
"code": null,
"e": 2848,
"s": 2587,
"text": "Counting the frequency of occurrence of a word in a body of text is often needed during text processing. This can be achieved by applying the word_tokenize() function and appending the result to a list to keep count of the words as shown in the below pr... |
120+ Data Scientist Interview Questions and Answers You Should Know in 2021 | by Terence Shin | Towards Data Science | 2020 wasn’t the greatest year, so I thought why not get a head start for 2021!
This article has over 120 data science interview questions from some of the top tech companies in the world, like Facebook, Google, Yelp, Amazon, and more!
Be sure to subscribe to never miss another article on data science guides, tricks and... | [
{
"code": null,
"e": 251,
"s": 172,
"text": "2020 wasn’t the greatest year, so I thought why not get a head start for 2021!"
},
{
"code": null,
"e": 407,
"s": 251,
"text": "This article has over 120 data science interview questions from some of the top tech companies in the world... |
Forecasting Business KPIs With Python Using Prophet - Part 2 | by AnBento | Towards Data Science | Update: Many of you contacted me asking for valuable resources to learn more about time series forecasting with Python. Below I share 2 courses that I personally took and that would strongly recommend to expand your knowledge on the topic:
Python For Time Series Analysis (using ARIMA, SARIMAX, VARMA, PROPHET) 15+ hours... | [
{
"code": null,
"e": 412,
"s": 172,
"text": "Update: Many of you contacted me asking for valuable resources to learn more about time series forecasting with Python. Below I share 2 courses that I personally took and that would strongly recommend to expand your knowledge on the topic:"
},
{
"... |
Converting seconds into days, hours, minutes and seconds in C++ | In this tutorial, we will be discussing a program to convert seconds into days, hours, minutes and seconds.
For this we will be provided with a random number of seconds. Our task is to convert it into proper number of days, hours, minutes and seconds respectively.
Live Demo
#include <bits/stdc++.h>
using namespace std... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to convert seconds into days, hours, minutes and seconds."
},
{
"code": null,
"e": 1327,
"s": 1170,
"text": "For this we will be provided with a random number of seconds. Our task is ... |
C++ program for the Array Index with same count of even or odd numbers on both sides? | Finding the array index with the same count of even or odd number is a number that has equal number of either numbers or odd number on both sides of it i.e. no.s at left = no.s right.
Here, we need a few definitions that are related to the concept,
Array − A container of elements of same data type.
Array Index − The po... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "Finding the array index with the same count of even or odd number is a number that has equal number of either numbers or odd number on both sides of it i.e. no.s at left = no.s right."
},
{
"code": null,
"e": 1311,
"s": 1246,
"text":... |
Check if a given circle lies completely inside the ring formed by two concentric circles - GeeksforGeeks | 07 Apr, 2021
Given two circles of radius r and R, both have their centre at the origin. Now, given another circle of radius r1 and centre at (x1, y1). Check, if the third circle(circle of radius r1) lies completely inside the ring formed by two circles of radius r and R.Examples :
Input : r = 8 R = 4
r1 = 2 x1... | [
{
"code": null,
"e": 25142,
"s": 25114,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 25412,
"s": 25142,
"text": "Given two circles of radius r and R, both have their centre at the origin. Now, given another circle of radius r1 and centre at (x1, y1). Check, if the third circl... |
Bootstrap 4 - Clearfix Close Icon | Clearfix utility is used to clear the floated content in a container and close icon for dismissing the content such as alerts or modals.
For clearfix utility, use the .clearfix class to the parent element and close the content by adding close class on the element.
The following example shows the usage of clearfix and c... | [
{
"code": null,
"e": 1953,
"s": 1816,
"text": "Clearfix utility is used to clear the floated content in a container and close icon for dismissing the content such as alerts or modals."
},
{
"code": null,
"e": 2081,
"s": 1953,
"text": "For clearfix utility, use the .clearfix class... |
Bulma - Container and levels | Bulma uses containers to represent a basic layout element and wrap the site contents. The container class will have below values for width on different devices −
The desktop will have maximum width of 960px.
The desktop will have maximum width of 960px.
The widescreen will have maximum width of 1152px.
The widescreen w... | [
{
"code": null,
"e": 1860,
"s": 1698,
"text": "Bulma uses containers to represent a basic layout element and wrap the site contents. The container class will have below values for width on different devices −"
},
{
"code": null,
"e": 1906,
"s": 1860,
"text": "The desktop will hav... |
Converting From Keras To PyTorch Lightning | by William Falcon | Towards Data Science | In this tutorial, we’ll convert a Keras model into a PyTorch Lightning model to add another capability to your deep-learning ninja skills.
Keras provides a terrific high-level interface to Tensorflow. Now Keras users can try out PyTorch via a similar high-level interface called PyTorch Lightning.
However, Lightning dif... | [
{
"code": null,
"e": 310,
"s": 171,
"text": "In this tutorial, we’ll convert a Keras model into a PyTorch Lightning model to add another capability to your deep-learning ninja skills."
},
{
"code": null,
"e": 469,
"s": 310,
"text": "Keras provides a terrific high-level interface ... |
How to create a plot in base R with dates sequence on X-axis? | If we have a vector that contains dates as sequence that needs to be plotted on the X-axis and another vector for the response then the plot can be simply created by using the plot function. In the plot function, we would need to pass the dates as the first argument and the response vector as the second argument. Check... | [
{
"code": null,
"e": 1433,
"s": 1062,
"text": "If we have a vector that contains dates as sequence that needs to be plotted on the X-axis and another vector for the response then the plot can be simply created by using the plot function. In the plot function, we would need to pass the dates as the f... |
Python - Swap K suffix with prefix - GeeksforGeeks | 11 Oct, 2020
Given a List, perform a swap of K prefix and suffix.
Examples:
Input : test_list = [5, 6, 3, 1, 0, 1, 3, 5, 7, 9], K = 2Output : [7, 9, 3, 1, 0, 1, 3, 5, 5, 6]Explanation : Rear 2 and Front 2 elements swapped.
Input : test_list = [5, 6, 3, 1, 0, 1, 3, 5, 7, 9], K = 1Output : [9, 6, 3, 1, 0, 1, 3, 5, 7, 5]E... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n11 Oct, 2020"
},
{
"code": null,
"e": 23954,
"s": 23901,
"text": "Given a List, perform a swap of K prefix and suffix."
},
{
"code": null,
"e": 23964,
"s": 23954,
"text": "Examples:"
},
{
"code": null,... |
Build index in the background with MongoDB | To create index in the background, use createIndex() method and set “background: true” as in the below syntax −
db.yourCollectionName.createIndex({"yourFieldName1":1,"yourFieldName2":1},{background: true} );
Let us implement the above syntax in order to create index and set background −
> db.indexCreationDemo.createInd... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "To create index in the background, use createIndex() method and set “background: true” as in the below syntax −"
},
{
"code": null,
"e": 1270,
"s": 1174,
"text": "db.yourCollectionName.createIndex({\"yourFieldName1\":1,\"yourFieldNam... |
HTML | DOM timeStamp Event Property - GeeksforGeeks | 18 Jan, 2019
The timeStamp Event property is used to get the timestamp of when a particular event is created. It basically returns the difference in time (in milliseconds) between the time of event created by the browser and January 1, 1970.
It is a read-only property.
Syntax:
event.timeStamp
Return Value: : This event... | [
{
"code": null,
"e": 25289,
"s": 25261,
"text": "\n18 Jan, 2019"
},
{
"code": null,
"e": 25518,
"s": 25289,
"text": "The timeStamp Event property is used to get the timestamp of when a particular event is created. It basically returns the difference in time (in milliseconds) betw... |
C/C++ Program for Number of solutions to the Modular Equations? | In mathematics, a modular equation is an algebraic equation satisfied by moduli, in the sense of moduli problem. That is, given a number of functions on a moduli space, a modular equation is an equation holding between them, or in other words an identity for moduli.
The most frequent use of the term modular equation is... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "In mathematics, a modular equation is an algebraic equation satisfied by moduli, in the sense of moduli problem. That is, given a number of functions on a moduli space, a modular equation is an equation holding between them, or in other words an identit... |
Arduino - Keyboard Logout | This example uses the Keyboard library to log you out of your user session on your computer when pin 2 on the ARDUINO UNO is pulled to ground. The sketch simulates the keypress in sequence of two or three keys at the same time and after a short delay, it releases them.
Warning − When you use the Keyboard.print() comman... | [
{
"code": null,
"e": 3140,
"s": 2870,
"text": "This example uses the Keyboard library to log you out of your user session on your computer when pin 2 on the ARDUINO UNO is pulled to ground. The sketch simulates the keypress in sequence of two or three keys at the same time and after a short delay, i... |
Steps to basic modern NN model from scratch | by Rrohan.Arrora | Towards Data Science | Today, we will learn the first step to building the Neural network, and it is the primary matrix multiplication. There are many ways to do so, and we will see each one and will compare them to get the best results.
We require matrix multiplication in the linear layer of the Neural Networks. To do matrix multiplication,... | [
{
"code": null,
"e": 261,
"s": 46,
"text": "Today, we will learn the first step to building the Neural network, and it is the primary matrix multiplication. There are many ways to do so, and we will see each one and will compare them to get the best results."
},
{
"code": null,
"e": 482,... |
How to indent text in HTML by using CSS ? - GeeksforGeeks | 12 Aug, 2021
In this article, we will discuss various methods to indent text in an HTML document. Text indentation is used to set the length of empty white space before lines of text in a block. It generally marks the beginning of a paragraph.
There are two common approaches for text indentation:
Approach 1: Using the ... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 26962,
"s": 26731,
"text": "In this article, we will discuss various methods to indent text in an HTML document. Text indentation is used to set the length of empty white space before lines o... |
Calculate the width of the text in JavaScript - GeeksforGeeks | 31 Jul, 2019
Method 1: Creating a new DOM Element and measuring its width: A new “span” element is created with the createElement() method. Then added it to the body of the element using the appendChild() method. The style property of this element is used to set properties like the font, font-size, height, width, white... | [
{
"code": null,
"e": 26185,
"s": 26157,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 27005,
"s": 26185,
"text": "Method 1: Creating a new DOM Element and measuring its width: A new “span” element is created with the createElement() method. Then added it to the body of the ele... |
Contingency Table in Python | A contingency table is a table showing the distribution of one variable in rows and another variable in columns. It is used to study the correlation between the two variables. It is a multiway table which describes a dataset in which each observation belongs to one category for each of several variables. Also It is bas... | [
{
"code": null,
"e": 1601,
"s": 1062,
"text": "A contingency table is a table showing the distribution of one variable in rows and another variable in columns. It is used to study the correlation between the two variables. It is a multiway table which describes a dataset in which each observation be... |
Android - Sending SMS | In Android, you can use SmsManager API or devices Built-in SMS application to send SMS's. In this tutorial, we shows you two basic examples to send SMS message −
SmsManager API
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);
Built-in SMS applicat... | [
{
"code": null,
"e": 3769,
"s": 3607,
"text": "In Android, you can use SmsManager API or devices Built-in SMS application to send SMS's. In this tutorial, we shows you two basic examples to send SMS message −"
},
{
"code": null,
"e": 3784,
"s": 3769,
"text": "SmsManager API"
},... |
Tryit Editor v3.7 | HTML Input types
Tryit: input type = search | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Input types"
}
] |
Nvidia gave me a $15K Data Science Workstation — here’s what I did with it | by Kyle Gallatin | Towards Data Science | When NVIDIA asked if I wanted to try one of the latest data science workstations, I was stoked. However, a sobering thought followed the excitement: what in the world should I use this for?
As a machine learning engineer, I do a lot of deep learning, but I’m definitely no Google Brain researcher. I could run benchmarki... | [
{
"code": null,
"e": 362,
"s": 172,
"text": "When NVIDIA asked if I wanted to try one of the latest data science workstations, I was stoked. However, a sobering thought followed the excitement: what in the world should I use this for?"
},
{
"code": null,
"e": 584,
"s": 362,
"text... |
Program to find N-th term of series 1, 3, 12, 60, 360...in C++ | In this problem, we are given a number N. Our task is to create a Program to find N-th term of series 1, 3, 12, 60, 360...in C++.
Given Series
1, 3, 12, 60, 360, 2520 ... N Terms
Let’s take an example to understand the problem,
Input − N = 6
Output − 2520
The general term formula for this one is a bit tricky. So, the i... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "In this problem, we are given a number N. Our task is to create a Program to find N-th term of series 1, 3, 12, 60, 360...in C++."
},
{
"code": null,
"e": 1205,
"s": 1192,
"text": "Given Series"
},
{
"code": null,
"e": 12... |
Angular 2 - Services | A service is used when a common functionality needs to be provided to various modules. For example, we could have a database functionality that could be reused among various modules. And hence you could create a service that could have the database functionality.
The following key steps need to be carried out when crea... | [
{
"code": null,
"e": 2561,
"s": 2297,
"text": "A service is used when a common functionality needs to be provided to various modules. For example, we could have a database functionality that could be reused among various modules. And hence you could create a service that could have the database func... |
SQLite - INSERT Query | SQLite INSERT INTO Statement is used to add new rows of data into a table in the database.
Following are the two basic syntaxes of INSERT INTO statement.
INSERT INTO TABLE_NAME [(column1, column2, column3,...columnN)]
VALUES (value1, value2, value3,...valueN);
Here, column1, column2,...columnN are the names of the c... | [
{
"code": null,
"e": 2729,
"s": 2638,
"text": "SQLite INSERT INTO Statement is used to add new rows of data into a table in the database."
},
{
"code": null,
"e": 2792,
"s": 2729,
"text": "Following are the two basic syntaxes of INSERT INTO statement."
},
{
"code": null,
... |
LocalDate lengthOfMonth() method in Java | The length of the month in a particular LocalDate is obtained using the method lengthOfMonth() in the LocalDate class in Java. This method requires no parameters and it returns the length of the month in a particular LocalDate i.e. 28, 29, 30 or 31.
A program that demonstrates this is given as follows −
Live Demo
impo... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "The length of the month in a particular LocalDate is obtained using the method lengthOfMonth() in the LocalDate class in Java. This method requires no parameters and it returns the length of the month in a particular LocalDate i.e. 28, 29, 30 or 31."
... |
Foreach in C++ and C# | C++ 11 introduced foreach loop to traverse over each element. Here is an example −
Live Demo
#include <iostream>
using namespace std;
int main() {
int myArr[] = { 99, 15, 67 };
// foreach loop
for (int ele : myArr)
cout << ele << endl;
}
99
15
67
Let us see an example of foreach in C#. It traverses items... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "C++ 11 introduced foreach loop to traverse over each element. Here is an example −"
},
{
"code": null,
"e": 1156,
"s": 1145,
"text": " Live Demo"
},
{
"code": null,
"e": 1315,
"s": 1156,
"text": "#include <iostrea... |
Graph Theory | Depth First Search | by Kelvin Jose | Towards Data Science | This is the third post of my series, Graph Theory: Go Hero. I highly recommend checking out the index for previous posts.
In Graph Theory, Depth First Search (DFS) is an important algorithm which plays a vital role in several graph included applications.
DFS is the most fundamental kind of algorithm we can use to explo... | [
{
"code": null,
"e": 293,
"s": 171,
"text": "This is the third post of my series, Graph Theory: Go Hero. I highly recommend checking out the index for previous posts."
},
{
"code": null,
"e": 426,
"s": 293,
"text": "In Graph Theory, Depth First Search (DFS) is an important algori... |
DirectX - Stenciling | Applications which use gaming programming usually use the stencil buffer to mask the respective pixels. Some of the common effects of stenciling which are implemented in DirectX are mentioned below −
Compositing
Decaling
Dissolves, Fades, and Swipes
Outlines and Silhouettes
Two-Sided Stencil
The stencil buffer in Direc... | [
{
"code": null,
"e": 2498,
"s": 2298,
"text": "Applications which use gaming programming usually use the stencil buffer to mask the respective pixels. Some of the common effects of stenciling which are implemented in DirectX are mentioned below −"
},
{
"code": null,
"e": 2510,
"s": 2... |
ETL Testing â Interview Questions | ETL stands for Extract, Transform, and Load. It is an important concept in Data Warehousing systems. Extraction stands for extracting data from different data sources such as transactional systems or applications. Transformation stands for applying the conversion rules on data so that it becomes suitable for analytical... | [
{
"code": null,
"e": 2573,
"s": 2145,
"text": "ETL stands for Extract, Transform, and Load. It is an important concept in Data Warehousing systems. Extraction stands for extracting data from different data sources such as transactional systems or applications. Transformation stands for applying the ... |
Equation of parabola from its focus and directrix - GeeksforGeeks | 20 Sep, 2021
We are given focus(x, y) and directrix(ax + by + c) of a parabola and we have to find the equation of parabola using its focus and directrix.Examples :
Input: x1 = 0, y1 = 0, a = 2, b = 1, c = 2 Output: equation of parabola is 16.0 x^2 + 9.0 y^2 + -12.0 x + 16.0 y + 24.0 xy + -4.0 = 0.Input: x1 = -1, y1 ... | [
{
"code": null,
"e": 25276,
"s": 25248,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 25430,
"s": 25276,
"text": "We are given focus(x, y) and directrix(ax + by + c) of a parabola and we have to find the equation of parabola using its focus and directrix.Examples : "
},
{... |
Java Program for n-th Fibonacci number | There are multiple ways in which the ‘n’thFibonacci number can be found. Here, we will use dynamic programming technique as well as optimizing the space.
Let us see an example −
Live Demo
public class Demo{
static int fibo(int num){
int first = 0, second = 1, temp;
if (num == 0)
return first;
... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "There are multiple ways in which the ‘n’thFibonacci number can be found. Here, we will use dynamic programming technique as well as optimizing the space."
},
{
"code": null,
"e": 1240,
"s": 1216,
"text": "Let us see an example −"
}... |
Stopping stepwise: Why stepwise selection is bad and what you should use instead | by Peter Flom | Towards Data Science | This is crossposted from my statistics site: www.StatisticalAnalysisConsulting.com
In this paper, I discuss variable selection methods for multiple linear regression with a single dependent variable y and a set of independent variables
according to
In particular, I discuss various stepwise methods (defined below). I sh... | [
{
"code": null,
"e": 130,
"s": 47,
"text": "This is crossposted from my statistics site: www.StatisticalAnalysisConsulting.com"
},
{
"code": null,
"e": 283,
"s": 130,
"text": "In this paper, I discuss variable selection methods for multiple linear regression with a single depende... |
JavaScript - Switch Case | You can use multiple if...else...if statements, as in the previous chapter, to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable.
Starting with JavaScript 1.2, you can use a switch statement which handles exactly this s... | [
{
"code": null,
"e": 2697,
"s": 2466,
"text": "You can use multiple if...else...if statements, as in the previous chapter, to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable."
},
{
"code": ... |
What are Unbounded wildcard w.r.t Generics method in Java? | Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class accepts, dynamically. By defining a class as generic you are making i... | [
{
"code": null,
"e": 1430,
"s": 1062,
"text": "Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class ac... |
C library function - ungetc() | The C library function int ungetc(int char, FILE *stream) pushes the character char (an unsigned char) onto the specified stream so that the this is available for the next read operation.
Following is the declaration for ungetc() function.
int ungetc(int char, FILE *stream)
char − This is the character to be put back. ... | [
{
"code": null,
"e": 2195,
"s": 2007,
"text": "The C library function int ungetc(int char, FILE *stream) pushes the character char (an unsigned char) onto the specified stream so that the this is available for the next read operation."
},
{
"code": null,
"e": 2247,
"s": 2195,
"te... |
Count Number of animals in a zoo from given number of head and legs - GeeksforGeeks | 14 Apr, 2021
Given the total number of Legs and Head of Rabbits and Pigeons. The task is to calculate the number of Rabbits and Pigeons.Examples:
Input: Heads = 200, Legs = 540
Output: Rabbits = 70, Pigeons = 130
Input: Heads = 100, Legs = 300
Output: Rabbits = 50, Pigeons = 50
Let the total no. of Heads = 200 ... | [
{
"code": null,
"e": 24867,
"s": 24839,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 25002,
"s": 24867,
"text": "Given the total number of Legs and Head of Rabbits and Pigeons. The task is to calculate the number of Rabbits and Pigeons.Examples: "
},
{
"code": null,
... |
Classifying Handwritten Digits Using A Multilayer Perceptron Classifier (MLP) | by Serafeim Loukas | Towards Data Science | An MLP is a supervised machine learning (ML) algorithm that belongs in the class of feedforward artificial neural networks [1]. The algorithm essentially is trained on the data in order to learn a function. Given a set of features and a target variable (e.g. labels) it learns a non-linear function for either classifica... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "An MLP is a supervised machine learning (ML) algorithm that belongs in the class of feedforward artificial neural networks [1]. The algorithm essentially is trained on the data in order to learn a function. Given a set of features and a target variable (e... |
List remove(int index) method in Java with Examples - GeeksforGeeks | 11 Dec, 2018
The remove(int index) method of List interface in Java is used to remove an element from the specified index from a List container and returns the element after removing it. It also shifts the elements after the removed element by 1 position to the left in the List.
Syntax:
E remove(int index)
Where, E is... | [
{
"code": null,
"e": 23583,
"s": 23555,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 23850,
"s": 23583,
"text": "The remove(int index) method of List interface in Java is used to remove an element from the specified index from a List container and returns the element after re... |
ES6 | Variables - GeeksforGeeks | 23 Oct, 2019
The ES6 Variable names are called identifiers. The rules to keep in mind while naming an identifier. It can contain alphabets and numbers but cannot be the keyword names, cannot start with a number and cannot contain spaces and special characters, except the underscore (_) and the dollar ($) symbol.
Variab... | [
{
"code": null,
"e": 25298,
"s": 25270,
"text": "\n23 Oct, 2019"
},
{
"code": null,
"e": 25599,
"s": 25298,
"text": "The ES6 Variable names are called identifiers. The rules to keep in mind while naming an identifier. It can contain alphabets and numbers but cannot be the keyword... |
Connecting to a Jupyter Notebook on a remote Linux machine with an SSH tunnel | by Shah Newaz Khan | Towards Data Science | In this post I will go over how I connect to my work machine and run Jupyter Notebook workloads when I am working remotely.
Step 1 is to ssh into your remote machine and launch Jupyter Notebook to a local port with the --no-browser option.
user@local_machine$ ssh user@remote_machine user@remote_machine$ jupyter noteboo... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "In this post I will go over how I connect to my work machine and run Jupyter Notebook workloads when I am working remotely."
},
{
"code": null,
"e": 412,
"s": 296,
"text": "Step 1 is to ssh into your remote machine and launch Jupyter N... |
Python | Pandas dataframe.add_suffix() - GeeksforGeeks | 16 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Dataframe.add_suffix() function can be used with both series as well as dataframes. add_suffix... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 24661,
"s": 24292,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
numpy string operations | split() function | 25 Nov, 2019
numpy.core.defchararray.split(arr, sep=None, maxsplit=None) is another function for doing string operations in numpy.It returns a list of the words in the string, using sep as the delimiter string for each element in arr.
Parameters:arr : array_like of str or unicode.Input array.sep : [ str or unicode, opt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Nov, 2019"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "numpy.core.defchararray.split(arr, sep=None, maxsplit=None) is another function for doing string operations in numpy.It returns a list of the words in the string, using sep as... |
How to handle invalid arguments with argparse in Python? | 29 Aug, 2020
Argparse module provides facilities to improve the command-line interface. The methods associated with this module makes it easy to code for command-line interface programs as well as the interaction better. This module automatically generates help messages and raises an error when inappropriate arguments ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 423,
"s": 28,
"text": "Argparse module provides facilities to improve the command-line interface. The methods associated with this module makes it easy to code for command-line interface programs as... |
Digital Logic & Number representation - GeeksforGeeks | 27 Sep, 2021
= XY’+XY
= X(Y’+Y)
= X *1
= X
Column x = f(x,y)
So ,
f(x,y)=x
= PQ + QR’ + PR’
= PQ(R+R’) + (P+P’)QR’ + P(Q+Q’)R’
= PQR + PQR’ +PQR’ +P’QR’ + PQR’ + PQ’R’
= PQR(m7) + PQR'(m6)+P’QR'(m2) +PQ’R'(m4)
= m2 + m4 + m6 + m7
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and shar... | [
{
"code": null,
"e": 28777,
"s": 28749,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 28808,
"s": 28777,
"text": "= XY’+XY\n= X(Y’+Y)\n= X *1\n= X "
},
{
"code": null,
"e": 28844,
"s": 28808,
"text": "Column x = f(x,y) \nSo , \nf(x,y)=x \n"
},
{
"co... |
double Keyword in C# | 22 Jun, 2020
Keywords are the words in a language that are used for some internal process or represent some predefined actions. It is a keyword that is used to declare a variable that can store a floating-point value from the range of ±5.0 x 10-324 to ±1.7 x 10308. It is an alias of System.Double. Basically, it is a 64... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 414,
"s": 28,
"text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. It is a keyword that is used to declare a variable that can ... |
Implicit Waits in Selenium Python | 19 May, 2020
Selenium Python is one of the great tools for testing automation. These days most of the web apps are using AJAX techniques. When a page is loaded by the browser, the elements within that page may load at different time intervals. This makes locating elements difficult: if an element is not yet present in ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 735,
"s": 53,
"text": "Selenium Python is one of the great tools for testing automation. These days most of the web apps are using AJAX techniques. When a page is loaded by the browser, the element... |
Sum of all subarrays of size K | 08 Jun, 2022
Given an array arr[] and an integer K, the task is to calculate the sum of all subarrays of size K.
Examples:
Input: arr[] = {1, 2, 3, 4, 5, 6}, K = 3 Output: 6 9 12 15 Explanation: All subarrays of size k and their sum: Subarray 1: {1, 2, 3} = 1 + 2 + 3 = 6 Subarray 2: {2, 3, 4} = 2 + 3 + 4 = 9 Subarray ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 152,
"s": 52,
"text": "Given an array arr[] and an integer K, the task is to calculate the sum of all subarrays of size K."
},
{
"code": null,
"e": 163,
"s": 152,
"text": "Examp... |
Selecting Child Elements with CSS | The CSS child combinator is used to select all child elements of a parent element.
The syntax of the CSS child combinator is as follows −
Selector > Selector {
attribute: /*value*/
}
The CSS descendant combinator is used to select all descendants of a parent element
The syntax of the CSS descendant combinator is as ... | [
{
"code": null,
"e": 1270,
"s": 1187,
"text": "The CSS child combinator is used to select all child elements of a parent element."
},
{
"code": null,
"e": 1325,
"s": 1270,
"text": "The syntax of the CSS child combinator is as follows −"
},
{
"code": null,
"e": 1373,
... |
Delete View – Function based Views Django | 17 May, 2021
Delete View refers to a view (logic) to delete a particular instance of a table from the database. It is used to delete entries in the database for example, deleting an article at geeksforgeeks. So Delete view must show a confirmation message to the user and should delete the instance automatically. Django... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 585,
"s": 54,
"text": "Delete View refers to a view (logic) to delete a particular instance of a table from the database. It is used to delete entries in the database for example, deleting an artic... |
Merge DataFrames by Column Names in R | 14 Sep, 2021
In this article, we are going to see how to merge Dataframe by Column Names using merge in R Programming Language.
The merge() function in base R can be used to merge input dataframes by common columns or row names. The merge() function retains all the row names of the dataframes, behaving similarly to the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "In this article, we are going to see how to merge Dataframe by Column Names using merge in R Programming Language."
},
{
"code": null,
"e": 431,
"s": 143,
... |
To check whether a large number is divisible by 7 | 04 Jul, 2022
You are given an n-digit large number, you have to check whether it is divisible by 7. A (r+1)-digit integer n whose digital form is (ar ar-1 ar-2....a2 a1 a0) is divisible by 7 if and only if the alternate series of numbers (a2 a1 a0) – (a5 a4 a3) + (a8 a7 a6) – ... is divisible by 7.
The triplets of dig... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 342,
"s": 54,
"text": "You are given an n-digit large number, you have to check whether it is divisible by 7. A (r+1)-digit integer n whose digital form is (ar ar-1 ar-2....a2 a1 a0) is divisible b... |
Python – Swap elements in String list | 06 Mar, 2020
Sometimes, while working with data records we can have a problem in which we need to perform certain swap operation in which we need to change one element with other over entire string list. This has application in both day-day and data Science domain. Lets discuss certain ways in which this task can be pe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Mar, 2020"
},
{
"code": null,
"e": 368,
"s": 52,
"text": "Sometimes, while working with data records we can have a problem in which we need to perform certain swap operation in which we need to change one element with other over ent... |
Android List View | Android ListView is a view which groups several items and display them in vertical scrollable list. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database.
An adapter actually bridges between UI components and the data source that fill data... | [
{
"code": null,
"e": 3976,
"s": 3741,
"text": "Android ListView is a view which groups several items and display them in vertical scrollable list. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database."
},
{
"cod... |
Parallel Processing in Python | 27 Dec, 2019
Parallel processing can increase the number of tasks done by your program which reduces the overall processing time. These help to handle large scale problems.
In this section we will cover the following topics:
Introduction to parallel processing
Multi Processing Python library for parallel processing
IPy... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Dec, 2019"
},
{
"code": null,
"e": 214,
"s": 54,
"text": "Parallel processing can increase the number of tasks done by your program which reduces the overall processing time. These help to handle large scale problems."
},
{
... |
jQuery | Hide/Show, Toggle and Fading methods with Examples | 12 Feb, 2019
jQuery provides a trivially simple interface for doing various kind of amazing effects. jQuery methods allow us to quickly apply commonly used effects with a minimum configuration.
jQuery hide() and show()
jQuery hide() : Hides the Syntax or the element of html that you want to hide.$(selector).hide(speed,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Feb, 2019"
},
{
"code": null,
"e": 233,
"s": 52,
"text": "jQuery provides a trivially simple interface for doing various kind of amazing effects. jQuery methods allow us to quickly apply commonly used effects with a minimum configur... |
Get column names from PostgreSQL table using Psycopg2 | 14 Sep, 2021
This article is an illustration of how to extract column names from PostgreSQL table using psycopg2 and Python.
Used table for demonstration:
Example 1:
First, we connect the PostgreSQL database using psycopg2.connect() method, then we create a cursor using cursor() method, after that we use the cursor() ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 140,
"s": 28,
"text": "This article is an illustration of how to extract column names from PostgreSQL table using psycopg2 and Python."
},
{
"code": null,
"e": 170,
"s": 140,
"te... |
PyDictionary module in Python | 04 May, 2020
PyDictionary is a dictionary (as in the English language dictionary) module for Python2 and Python3. PyDictionary provides the following services for a word:
meanings
translations
To install PyDictionary run the following pip code on the terminal / command prompt:
pip install PyDictionary
Now let us see ho... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 211,
"s": 53,
"text": "PyDictionary is a dictionary (as in the English language dictionary) module for Python2 and Python3. PyDictionary provides the following services for a word:"
},
{
"c... |
R - Bar Charts | A bar chart represents data in rectangular bars with length of the bar proportional to the value of the variable. R uses the function barplot() to create bar charts.
R can draw both vertical and Horizontal bars in the bar chart.
In bar chart each of the bars can be given different colors.
The basic syntax to create a ... | [
{
"code": null,
"e": 2827,
"s": 2536,
"text": "A bar chart represents data in rectangular bars with length of the bar proportional to the value of the variable. R uses the function barplot() to create bar charts.\n R can draw both vertical and Horizontal bars in the bar chart.\nIn bar chart each of ... |
How to Sort Values Alphabetically in R? | 28 Nov, 2021
In this article, we will discuss how to sort values alphabetically in R Programming Language.
Here we are using sort() function to sort a vector alphabetically.
Syntax:
sort(vector)
where, vector is the input vector
Example:
R
# create a vectorvector1 = c('G', 'E', 'E', 'K', 'S') # sort the vectorprint(so... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 122,
"s": 28,
"text": "In this article, we will discuss how to sort values alphabetically in R Programming Language."
},
{
"code": null,
"e": 189,
"s": 122,
"text": "Here we are ... |
Sort an array of Roman Numerals in ascending order | 16 Nov, 2021
Given an array arr[] of N Roman Numerals, the task is to sort these Roman Numerals in ascending order.
Examples:
Input: arr[] = { “MCMIV”, “MIV”, “MCM”, “MMIV” } Output: MIV MCM MCMIV MMIV Explanation: The roman numerals in their corresponding decimal system are: MIV: 1004 MCM: 1900 MCMIV: 1904 MMIV: 2004... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 131,
"s": 28,
"text": "Given an array arr[] of N Roman Numerals, the task is to sort these Roman Numerals in ascending order."
},
{
"code": null,
"e": 142,
"s": 131,
"text": "Exa... |
How to specify the base URL for all relative URLs in a document using HTML5? | 26 Mar, 2021
It’s a lot of effort to change URLs on migration or maintain every URL on the page when you have hardcoded every href’s so it’s a better choice to have a root/base URI and using relative paths to all the resources.
Using <base> tag:
<base> tag must reside inside <head> and </head> tag. You should use the <... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 243,
"s": 28,
"text": "It’s a lot of effort to change URLs on migration or maintain every URL on the page when you have hardcoded every href’s so it’s a better choice to have a root/base URI and usi... |
Minimum removals from array to make max – min <= K | 30 Jun, 2022
Given N integers and K, find the minimum number of elements that should be removed, such that Amax-Amin<=K. After the removal of elements, Amax and Amin is considered among the remaining elements.
Examples:
Input : a[] = {1, 3, 4, 9, 10, 11, 12, 17, 20}
k = 4
Output : 5
Explanation: Remove 1,... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 251,
"s": 54,
"text": "Given N integers and K, find the minimum number of elements that should be removed, such that Amax-Amin<=K. After the removal of elements, Amax and Amin is considered among t... |
Java Program to Run Multiple Threads | 22 Dec, 2020
Thread is a lightweight process. A process in execution is called a program. A subpart of a program is called a thread. Threads allow a program to operate more efficiently by doing multiple things at the same time performing complicated tasks in the background without interrupting the main program executio... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2020"
},
{
"code": null,
"e": 338,
"s": 28,
"text": "Thread is a lightweight process. A process in execution is called a program. A subpart of a program is called a thread. Threads allow a program to operate more efficiently by ... |
Binary Search in PHP | 05 Apr, 2018
Binary Search is a searching technique used to search an element in a sorted array. In this article, we will learn about how to implement Binary Search in PHP using iterative and recursive way. Given a array of numbers, we need to search for the presence of element x in the array using Binary Search.
Examp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Apr, 2018"
},
{
"code": null,
"e": 354,
"s": 52,
"text": "Binary Search is a searching technique used to search an element in a sorted array. In this article, we will learn about how to implement Binary Search in PHP using iterative... |
Parsing Apache access log in Java | 03 Sep, 2018
Web server log which maintains a history of page requests, typically appended to the end of the file. Information about the request, including client IP address, request date/time, page requested, HTTP code, bytes served, user agent, and referrer are typically added.
Given a web server log records, find th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Sep, 2018"
},
{
"code": null,
"e": 320,
"s": 52,
"text": "Web server log which maintains a history of page requests, typically appended to the end of the file. Information about the request, including client IP address, request date... |
Game of replacing array elements | 02 Sep, 2021
There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number, let’s say a1 and a2 and then replace all a2 by a1 or a1 by a2. They stop playing game if any one of them is unable to pick two number and the player who is unable to pick two disti... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 483,
"s": 52,
"text": "There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number, let’s say a1 and a2 and then replace all a2 by ... |
Various Implicants in K-Map | 11 Mar, 2022
Prerequisite – K – Map (Karnaugh Map) Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm term in Product of Sums (POS) of a Boolean function. E.g., consider a boolean function, F = AB + ABC + BC. Implicants are AB, ABC and BC.
Prime Implicants – A group of square or rectangle ma... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 307,
"s": 54,
"text": "Prerequisite – K – Map (Karnaugh Map) Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm term in Product of Sums (POS) of a Boolean function. E.g., c... |
Difference between Direct-mapping, Associative Mapping & Set-Associative Mapping | 17 May, 2021
Prerequisite – Cache mapping Types – Direct-mapping, Associative Mapping & Set-Associative Mapping
Cache : The small section of SRAM memory, added between main memory and processor(CPU) to speed up the process of execution, is known as cache memory. It includes small amount of SRAM & more amount of DRAM.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 153,
"s": 52,
"text": "Prerequisite – Cache mapping Types – Direct-mapping, Associative Mapping & Set-Associative Mapping"
},
{
"code": null,
"e": 399,
"s": 153,
"text": "Cach... |
Sum of array elements excluding the elements which lie between a and b | 01 Feb, 2022
Given an array of N unique numbers. Also given two numbers a and b such that a will always be before b in the array. The task is to find the sum of the array elements excluding the elements which lie between a and b.
Examples:
Input : arr = [2, 1, 6, 9, 11], a = 6, b = 9 Output : 14
Input : arr = [1, 2, 4... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Feb, 2022"
},
{
"code": null,
"e": 270,
"s": 53,
"text": "Given an array of N unique numbers. Also given two numbers a and b such that a will always be before b in the array. The task is to find the sum of the array elements excludi... |
multimap insert() in C++ STL | 23 Jun, 2022
The multimap::insert is a built-in function in C++ STL that is used to insert elements in the multimap container.
Syntax:
Syntax:
iterator multimap_name.insert({key, element})
Parameters: The function accepts a pair that consists of a key and element which is to be inserted into the multimap container. R... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 166,
"s": 52,
"text": "The multimap::insert is a built-in function in C++ STL that is used to insert elements in the multimap container."
},
{
"code": null,
"e": 175,
"s": 166,
... |
Maximum neighbor element in a matrix within distance K | 02 May, 2022
Given a matrix mat[][] and an integer K, the task is to find the maximum neighbor within an absolute distance of K for each element of the matrix.In other words for each Matrix[i][j] find maximum Matrix[p][q] such that abs (i-p) + abs (j-q) ≤ K.Examples:
Input: mat[][] = {{1, 2}, {4, 5}}, K = 1 Output: {... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 309,
"s": 52,
"text": "Given a matrix mat[][] and an integer K, the task is to find the maximum neighbor within an absolute distance of K for each element of the matrix.In other words for each Matr... |
Deep Learning with Keras - Quick Guide | Deep Learning has become a buzzword in recent days in the field of Artificial Intelligence (AI). For many years, we used Machine Learning (ML) for imparting intelligence to machines. In recent days, deep learning has become more popular due to its supremacy in predictions as compared to traditional ML techniques.
Deep ... | [
{
"code": null,
"e": 2274,
"s": 1959,
"text": "Deep Learning has become a buzzword in recent days in the field of Artificial Intelligence (AI). For many years, we used Machine Learning (ML) for imparting intelligence to machines. In recent days, deep learning has become more popular due to its supre... |
Solving Combinatorial Problems with PySpark | by Salil Jain | Towards Data Science | Let us consider the problem statement. Given n real numbers x1, x2, xn, choose any set of distinct numbers such that function f on those chosen numbers gives maximum value. function f can take any number of inputs so one can choose any number of numbers.
Expected output: A set of numbers S = {xi, xj,..., xm} or the max... | [
{
"code": null,
"e": 426,
"s": 171,
"text": "Let us consider the problem statement. Given n real numbers x1, x2, xn, choose any set of distinct numbers such that function f on those chosen numbers gives maximum value. function f can take any number of inputs so one can choose any number of numbers."... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.