title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
newSingleThreadExecutor Method
A single thread pool can be obtainted by calling the static newSingleThreadExecutor() method of Executors class. ExecutorService executor = Executors.newSingleThreadExecutor(); Where newSingleThreadExecutor method creates an executor that executes a single task at a time. The following TestThread program shows usage o...
[ { "code": null, "e": 2770, "s": 2657, "text": "A single thread pool can be obtainted by calling the static newSingleThreadExecutor() method of Executors class." }, { "code": null, "e": 2835, "s": 2770, "text": "ExecutorService executor = Executors.newSingleThreadExecutor();\n" ...
Rotation of a point about another point in C++
Rotation of a point X about origin is by an angle θ in anti-clockwise direction is done by − X by θ about origin anti-clRotateockwise: X*polar( 1.0,θ ). Here, the function polar for complex numbers is defined under <complex> header file and is used to find a complex number using phase angle and magnitude. polar(mag,an...
[ { "code": null, "e": 1155, "s": 1062, "text": "Rotation of a point X about origin is by an angle θ in anti-clockwise direction is done by −" }, { "code": null, "e": 1216, "s": 1155, "text": " X by θ about origin anti-clRotateockwise: X*polar( 1.0,θ )." }, { "code": null, ...
How to import classes from within another directory/package in Java?
In Java classes and interfaces related to each other are grouped under a package. The package is nothing but a directory storing classes and interfaces of a particular concept. For example, all the classes and interfaces related to input and output operations are stored in the java.io package. There are two types of pa...
[ { "code": null, "e": 1357, "s": 1062, "text": "In Java classes and interfaces related to each other are grouped under a package. The package is nothing but a directory storing classes and interfaces of a particular concept. For example, all the classes and interfaces related to input and output oper...
Python - Corpora Access
Corpora is a group presenting multiple collections of text documents. A single collection is called corpus. One such famous corpus is the Gutenberg Corpus which contains some 25,000 free electronic books, hosted at http://www.gutenberg.org/. In the below example we access the names of only those files from the corpus w...
[ { "code": null, "e": 2959, "s": 2587, "text": "Corpora is a group presenting multiple collections of text documents. A single collection is called corpus. One such famous corpus is the Gutenberg Corpus which contains some 25,000 free electronic books, hosted at http://www.gutenberg.org/. In the belo...
Accenture Interview Experience for Data Engineer Analyst | On-Campus 2021 - GeeksforGeeks
26 Apr, 2021 I had applied for Accenture On-Campus on 24/3/2021 through my campus link. I had my mock test on1st of April, please make sure u attend this test. Round 1: On April 2nd This round is the Cognitive and Technical assessment round. Those who pass move to the coding round. So the first assessment consists of 6...
[ { "code": null, "e": 25252, "s": 25224, "text": "\n26 Apr, 2021" }, { "code": null, "e": 25399, "s": 25252, "text": "I had applied for Accenture On-Campus on 24/3/2021 through my campus link. I had my mock test on1st of April, please make sure u attend this test." }, { "c...
Check if a number has prime count of divisors - GeeksforGeeks
30 Apr, 2021 Given an integer N, the task is to check if the count of divisors of N is prime or not. Examples: Input: N = 13 Output: Yes The divisor count is 2 (1 and 13) which is prime. Input: N = 8 Output: No The divisors are 1, 2, 4 and 8. Approach: Please read this article to find the count of divisors of a numb...
[ { "code": null, "e": 25024, "s": 24996, "text": "\n30 Apr, 2021" }, { "code": null, "e": 25112, "s": 25024, "text": "Given an integer N, the task is to check if the count of divisors of N is prime or not." }, { "code": null, "e": 25123, "s": 25112, "text": "Ex...
How to use nested while loop in JavaScript?
The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true. Once the expression becomes false, the loop terminates. You can try to run the following code to learn how to use nested while loop Live Demo <html> <body> <script> var height = 2; ...
[ { "code": null, "e": 1231, "s": 1062, "text": "The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true. Once the expression becomes false, the loop terminates." }, { "code": null, "e": 1307, "s": 1231, "text": "You can try t...
How to do Deep Learning on Graphs with Graph Convolutional Networks | by Tobias Skovgaard Jepsen | Towards Data Science
Machine learning on graphs is a difficult task due to the highly complex, but also informative graph structure. This post is the first in a series on how to do deep learning on graphs with Graph Convolutional Networks (GCNs), a powerful type of neural network designed to work directly on graphs and leverage their struc...
[ { "code": null, "e": 540, "s": 172, "text": "Machine learning on graphs is a difficult task due to the highly complex, but also informative graph structure. This post is the first in a series on how to do deep learning on graphs with Graph Convolutional Networks (GCNs), a powerful type of neural net...
Sorted() function in Python
In this tutorial, we are going to learn about the sorted() function in Python. The function sorted() is used to sort an iterable in ascending or descending order. We can even sort the list of dictionaries based on different keys and values. Let's get most out of the sorted() function. The sorted() function is not an in...
[ { "code": null, "e": 1141, "s": 1062, "text": "In this tutorial, we are going to learn about the sorted() function in Python." }, { "code": null, "e": 1348, "s": 1141, "text": "The function sorted() is used to sort an iterable in ascending or descending order. We can even sort th...
Fetch Unseen Emails From Gmail Inbox - GeeksforGeeks
28 Jul, 2020 Python is a widely used high-level, general-purpose, interpreted, multi-utility, dynamic programming language. It can be used to do a wide range of tasks like machine learning, web application development, cross-platform GUI development, and much more. Fetching Gmail is another of a task that could be achi...
[ { "code": null, "e": 24754, "s": 24726, "text": "\n28 Jul, 2020" }, { "code": null, "e": 25422, "s": 24754, "text": "Python is a widely used high-level, general-purpose, interpreted, multi-utility, dynamic programming language. It can be used to do a wide range of tasks like mach...
c# Put spaces between words starting with capital letters
To place spaces in between words starting with capital letters, try the following example − Firstly, set the string. var str = "WelcomeToMyWebsite"; As you can see above, our string isn’t having spaces before capital letter. To add it, use LINQ as we have done below − str = string.Concat(str.Select(x => Char.IsUpper(x)...
[ { "code": null, "e": 1154, "s": 1062, "text": "To place spaces in between words starting with capital letters, try the following example −" }, { "code": null, "e": 1179, "s": 1154, "text": "Firstly, set the string." }, { "code": null, "e": 1211, "s": 1179, "te...
HTML <select> size Attribute
The size attribute of the <select> element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1. Following is the syntax− <select size="num"> Above, num is the count of the visible list items in the drop-down list. Let us now see an example to...
[ { "code": null, "e": 1236, "s": 1062, "text": "The size attribute of the <select> element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1." }, { "code": null, "e": 1261, "s": 1236, "text": "Followin...
How to touch all the files recursively using Python?
To touch all the files recursively, you need to walk the directory tree using os.walk and add touch all the files in it using os.utime(path_to_file). import os # Recursively walk the tree for root, dirs, files in os.walk(path): for file in files: # Set utime to current time os.utime(os.path.join(r...
[ { "code": null, "e": 1214, "s": 1062, "text": "To touch all the files recursively, you need to walk the directory tree using os.walk and add touch all the files in it using os.utime(path_to_file). " }, { "code": null, "e": 1394, "s": 1214, "text": "import os\n# Recursively walk ...
Maximum Likelihood Estimation and Poisson Regression | by Philip Wilkinson | Towards Data Science
In my previous article I introduced the basic concepts of probability and how this relates to maximum likelihood estimation and ordinary least squares regression. In this article, I will continue to build on this foundation but in the case of Poisson regression through its application to the gravity model. In contrast ...
[ { "code": null, "e": 480, "s": 172, "text": "In my previous article I introduced the basic concepts of probability and how this relates to maximum likelihood estimation and ordinary least squares regression. In this article, I will continue to build on this foundation but in the case of Poisson regr...
How to get free size of internal/external memory in Android App?
This example demonstrates how do I get the free size of internal/external memory in android app. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding=...
[ { "code": null, "e": 1159, "s": 1062, "text": "This example demonstrates how do I get the free size of internal/external memory in android app." }, { "code": null, "e": 1288, "s": 1159, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill al...
Java Examples - Deleting a character
How to remove a particular character from a string ? Following example shows how to remove a character from a particular position from a string with the help of removeCharAt(string,position) method. public class Main { public static void main(String args[]) { String str = "this is Java"; System.out.print...
[ { "code": null, "e": 2121, "s": 2068, "text": "How to remove a particular character from a string ?" }, { "code": null, "e": 2267, "s": 2121, "text": "Following example shows how to remove a character from a particular position from a string with the help of removeCharAt(string,p...
fmt.Sprint() Function in Golang With Examples
05 May, 2020 In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Sprint() function in Go language formats using the default formats for its operands and returns the resulting string. Here spaces are added between operands when any string is not use...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 May, 2020" }, { "code": null, "e": 495, "s": 28, "text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Sprint() function in Go language formats using the ...
Creating a Data Frame from Vectors in R Programming
22 Jun, 2020 A vector can be defined as the sequence of data with the same datatype. In R, a vector can be created using c() function.R vectors are used to hold multiple data values of the same datatype and are similar to arrays in C language. Data frame is a 2 dimensional table structure which is used to hold the valu...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2020" }, { "code": null, "e": 285, "s": 54, "text": "A vector can be defined as the sequence of data with the same datatype. In R, a vector can be created using c() function.R vectors are used to hold multiple data values of th...
Python | Initialize dictionary with multiple keys
02 Aug, 2019 Sometimes, while working with dictionaries, we might have a problem in which we need to initialize the dictionary with more than one keys with same value. This application requirement can be in domains of web development in which we might want to declare and initialize at the same time. Let’s discuss certa...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Aug, 2019" }, { "code": null, "e": 380, "s": 28, "text": "Sometimes, while working with dictionaries, we might have a problem in which we need to initialize the dictionary with more than one keys with same value. This application req...
Snake Game in Python – Using Pygame module
04 Jan, 2022 Snake game is one of the most popular arcade games of all time. In this game, the main objective of the player is to catch the maximum number of fruits without hitting the wall or itself. Creating a snake game can be taken as a challenge while learning Python or Pygame. It is one of the best beginner-frien...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jan, 2022" }, { "code": null, "e": 502, "s": 54, "text": "Snake game is one of the most popular arcade games of all time. In this game, the main objective of the player is to catch the maximum number of fruits without hitting the wa...
Heteroscedasticity in Regression Analysis
07 Jun, 2019 Prerequisite: Linear Regression In Simple Linear Regression or Multiple Linear Regression we make some basic assumptions on the error term . Simple Linear Regression: (1) Multiple Linear Regression: (2) Assumptions: 1. Error has zero mean 2. Error has constant variance 3. Errors are uncorrelated 4. E...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jun, 2019" }, { "code": null, "e": 86, "s": 54, "text": "Prerequisite: Linear Regression" }, { "code": null, "e": 195, "s": 86, "text": "In Simple Linear Regression or Multiple Linear Regression we make some basi...
Matplotlib.pyplot.plot() function in Python
05 Jun, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jun, 2020" }, { "code": null, "e": 357, "s": 52, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MA...
Goldman Sachs Interview Experience for Java Backend Engineer
27 Sep, 2021 Interview is given on 14th September 2021 for Hyderabad location Goldman Sachs. Round 1(Initial Screening): The manager did call and did some initial screening and set the expectation from the candidate and the job profile. Round 2(Continues 2 hours is blocked): One panelist for one hour and another paneli...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Sep, 2021" }, { "code": null, "e": 134, "s": 54, "text": "Interview is given on 14th September 2021 for Hyderabad location Goldman Sachs." }, { "code": null, "e": 278, "s": 134, "text": "Round 1(Initial Screening...
Maximum product of an Array after subtracting 1 from any element N times
06 Dec, 2021 Given an array arr[] of positive integers of size M and an integer N, the task is to maximize the product of array after subtracting 1 from any element N number of times Examples: Input: M = 5, arr[] = {5, 1, 7, 8, 3}, N = 2Output: 630Explanation: After subtracting 1 from arr[3] 2 times, array becomes {5,...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2021" }, { "code": null, "e": 198, "s": 28, "text": "Given an array arr[] of positive integers of size M and an integer N, the task is to maximize the product of array after subtracting 1 from any element N number of times" },...
Capturing INSERT Timestamp in Table SQL Server
17 Feb, 2021 While inserting data in tables, sometimes we need to capture insert timestamp in the table. There is a very simple way that we could use to capture the timestamp of the inserted rows in the table. Capture the timestamp of the inserted rows in the table with DEFAULT constraint in SQL Server. Use DEFAULT con...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2021" }, { "code": null, "e": 225, "s": 28, "text": "While inserting data in tables, sometimes we need to capture insert timestamp in the table. There is a very simple way that we could use to capture the timestamp of the insert...
How to change the color of active links with CSS
Use the :active class to change the color of active links. Possible values could be any color name in any valid format. You can try to run the following code to implement the color of an active link − <html> <head> <style> a:active { color: #FF00CC } </style> </head> ...
[ { "code": null, "e": 1183, "s": 1062, "text": "Use the :active class to change the color of active links. Possible values could be any color name in any valid format. " }, { "code": null, "e": 1264, "s": 1183, "text": "You can try to run the following code to implement the color ...
Analyzing and Visualizing Sentiments from Unstructured data | by Jayant Kumar Kodwani | Towards Data Science
Microsoft Azure Cognitive services and Power BI Integration The total amount of data created, captured, copied, and consumed in the world is forecasted to increase rapidly, reaching 74 zettabytes in 2021 (Source: Statista). Imagine how much of this 74 zettabytes data will be unstructured and untamed, leaving a huge voi...
[ { "code": null, "e": 232, "s": 172, "text": "Microsoft Azure Cognitive services and Power BI Integration" }, { "code": null, "e": 725, "s": 232, "text": "The total amount of data created, captured, copied, and consumed in the world is forecasted to increase rapidly, reaching 74 z...
Cumulative sum of a column in Pandas - Python - GeeksforGeeks
26 Jul, 2020 Cumulative sum of a column in Pandas can be easily calculated with the use of a pre-defined function cumsum(). Syntax: cumsum(axis=None, skipna=True, *args, **kwargs)Parameters: axis: {index (0), columns (1)} skipna: Exclude NA/null values. If an entire row/column is NA, the result will be NAReturns: Cu...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n26 Jul, 2020" }, { "code": null, "e": 24325, "s": 24212, "text": "Cumulative sum of a column in Pandas can be easily calculated with the use of a pre-defined function cumsum(). " }, { "code": null, "e": 24546, "s...
How to get selected option using Selenium WebDriver with Java?
We can get a selected option in a dropdown in Selenium webdriver. The method getFirstSelectedOption() returns the selected option in the dropdown. Once the option is fetched we can apply getText() method to fetch the text. Let us consider the below dropdown Continents get its selected item− import org.openqa.selenium.B...
[ { "code": null, "e": 1285, "s": 1062, "text": "We can get a selected option in a dropdown in Selenium webdriver. The method getFirstSelectedOption() returns the selected option in the dropdown. Once the option is fetched we can apply getText() method to fetch the text." }, { "code": null, ...
7 Different Ways to Filter Pandas Dataframes | by Soner Yıldırım | Towards Data Science
Pandas is a very powerful and versatile Python data analysis library that expedites the data analysis and exploration process. One of the advantages of Pandas is that it usually provides multiple ways to accomplish a task. During the data analysis process, we almost always need to do some filtering either based on a co...
[ { "code": null, "e": 395, "s": 172, "text": "Pandas is a very powerful and versatile Python data analysis library that expedites the data analysis and exploration process. One of the advantages of Pandas is that it usually provides multiple ways to accomplish a task." }, { "code": null, ...
C program to find the maximum and minimum element of the array - GeeksforGeeks
07 May, 2020 Given an array arr[] of N integers, the task is to write the C program to find the maximum and minimum element of the given array iteratively and recursively. Examples: Input: arr[] = {1, 2, 4, -1}Output:The minimum element is -1The maximum element is 4 Input: arr[] = {-1, -1, -1, -1}Output:The minimum ele...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n07 May, 2020" }, { "code": null, "e": 26224, "s": 26065, "text": "Given an array arr[] of N integers, the task is to write the C program to find the maximum and minimum element of the given array iteratively and recursively." }...
Bootstrap Badges and Labels
Badges are numerical indicators of how many items are associated with a link: The numbers (5, 10, and 2) are the badges. Use the .badge class within <span> elements to create badges: Badges can also be used inside other elements, such as buttons: The following example shows how to add badges to buttons: Labels are used...
[ { "code": null, "e": 78, "s": 0, "text": "Badges are numerical indicators of how many items are associated with a link:" }, { "code": null, "e": 121, "s": 78, "text": "The numbers (5, 10, and 2) are the badges." }, { "code": null, "e": 183, "s": 121, "text": "...
jsoup - Loading from URL
Following example will showcase fetching an HTML from the web using a url and then find its data. String url = "http://www.google.com"; Document document = Jsoup.connect(url).get(); Where document − document object represents the HTML DOM. document − document object represents the HTML DOM. Jsoup − main class to conne...
[ { "code": null, "e": 2128, "s": 2030, "text": "Following example will showcase fetching an HTML from the web using a url and then find its data." }, { "code": null, "e": 2213, "s": 2128, "text": "String url = \"http://www.google.com\";\nDocument document = Jsoup.connect(url).get(...
How to access HTTP Cookie in Node.js ? - GeeksforGeeks
17 Feb, 2021 Cookies are small data that are stored on a client-side and sent to the client along with server requests. With the help of the cookie-parser module, we can do set the cookies as well as get the cookies. Create a project folder and run the following command from the root directory of the project: npm init...
[ { "code": null, "e": 26402, "s": 26374, "text": "\n17 Feb, 2021" }, { "code": null, "e": 26607, "s": 26402, "text": "Cookies are small data that are stored on a client-side and sent to the client along with server requests. With the help of the cookie-parser module, we can do set...
Clustering Using Convex Hulls. How to use convex hulls in data... | by Vijini Mallawaarachchi | Towards Data Science
I recently came across the article titled High-dimensional data clustering by using local affine/convex hulls by Hakan Cevikalp in Pattern Recognition Letters. It proposes a novel algorithm to cluster high-dimensional data using local affine/convex hulls. I was inspired by their method of using convex hulls for cluster...
[ { "code": null, "e": 759, "s": 172, "text": "I recently came across the article titled High-dimensional data clustering by using local affine/convex hulls by Hakan Cevikalp in Pattern Recognition Letters. It proposes a novel algorithm to cluster high-dimensional data using local affine/convex hulls....
How to swap or exchange objects in Java?
Java uses call by value while passing parameters to a function. To swap objects, we need to use their wrappers. See the example below − Live Demo public class Tester{ public static void main(String[] args) { A a = new A(); A b = new A(); a.value = 1; b.value = 2; //swap using objects...
[ { "code": null, "e": 1198, "s": 1062, "text": "Java uses call by value while passing parameters to a function. To swap objects, we need to use their wrappers. See the example below −" }, { "code": null, "e": 1209, "s": 1198, "text": " Live Demo" }, { "code": null, "e"...
Powerful Feature Selection with Recursive Feature Elimination (RFE) of Sklearn | Towards Data Science
The basic feature selection methods are mostly about individual properties of features and how they interact with each other. Variance thresholding and pairwise feature selection are a few examples that remove unnecessary features based on variance and the correlation between them. However, a more pragmatic approach wo...
[ { "code": null, "e": 755, "s": 172, "text": "The basic feature selection methods are mostly about individual properties of features and how they interact with each other. Variance thresholding and pairwise feature selection are a few examples that remove unnecessary features based on variance and th...
TCS Placement Paper | Email Writing Question 9 - GeeksforGeeks
21 May, 2019 Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to the question. Directions: Use all the phrases given.Minimum words should be 70 otherwise your email cannot be validated.Addressing and signing s...
[ { "code": null, "e": 24281, "s": 24253, "text": "\n21 May, 2019" }, { "code": null, "e": 24458, "s": 24281, "text": "Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to ...
How to update the windows host file entry using PowerShell?
Let say you want to update the host file particular entry, we have the below host file in our local computer. Get-Content $env:windir\system32\drivers\etc\hosts # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost n...
[ { "code": null, "e": 1172, "s": 1062, "text": "Let say you want to update the host file particular entry, we have the below host file in our local computer." }, { "code": null, "e": 1223, "s": 1172, "text": "Get-Content $env:windir\\system32\\drivers\\etc\\hosts" }, { "co...
How to change auto increment number in MySQL?
The auto_increment is a default property that automatically increments the newly added record by 1. The starting number can be changed with the help of the alter command. First, a table is created with the help of the insert command. This is given as follows − mysql> CREATE table AutoIncrementTable -> ( -> id int auto_...
[ { "code": null, "e": 1233, "s": 1062, "text": "The auto_increment is a default property that automatically increments the newly added record\nby 1. The starting number can be changed with the help of the alter command." }, { "code": null, "e": 1323, "s": 1233, "text": "First, a t...
Stop Permuting Features. Permutation importance may give you... | by Denis Vorotyntsev | Towards Data Science
Data scientists need features importances calculations for a variety of tasks. Importances could help us to understand if we have biases in our data or bugs in models. Also, importance is frequently using for understanding the underlying process and making business decisions. Indeed, the model’s top important features ...
[ { "code": null, "e": 590, "s": 172, "text": "Data scientists need features importances calculations for a variety of tasks. Importances could help us to understand if we have biases in our data or bugs in models. Also, importance is frequently using for understanding the underlying process and makin...
How to set fullscreen iframe?
29 Jul, 2021 The iframe in HTML stands for Inline Frame. The ” iframe ” tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders. An inline frame is used to embed another document within the current HTML document. For the fullscreen Ifra...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2021" }, { "code": null, "e": 378, "s": 28, "text": "The iframe in HTML stands for Inline Frame. The ” iframe ” tag defines a rectangular region within the document in which the browser can display a separate document, including...
Devploit – Information Gathering Tool in Kali Linux
29 Jun, 2021 Devploit is a free and open-source tool available on GitHub. Devploit is used as an information-gathering tool. Devploit is used to scan websites for information gathering and finding vulnerabilities in websites and web apps. This tool can be used to get information about our target(domain). We can target ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2021" }, { "code": null, "e": 1541, "s": 28, "text": "Devploit is a free and open-source tool available on GitHub. Devploit is used as an information-gathering tool. Devploit is used to scan websites for information gathering an...
Find all strings that match specific pattern in a dictionary
04 Jul, 2022 Given a dictionary of words, find all strings that match the given pattern where every character in the pattern is uniquely mapped to a character in the dictionary. Examples: Input: dict = ["abb", "abc", "xyz", "xyy"]; pattern = "foo" Output: [xyy abb] xyy and abb have same character at index 1 and 2 li...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 219, "s": 54, "text": "Given a dictionary of words, find all strings that match the given pattern where every character in the pattern is uniquely mapped to a character in the dictionary." }, {...
How to find the rank of an array in C#
23 Jan, 2019 Array.Rank Property is used to get the rank of the Array. Rank is the number of dimensions of an array. For example, 1-D array returns 1, a 2-D array returns 2, and so on. Syntax: public int Rank { get; } Property Value: It returns the rank (number of dimensions) of the Array of type System.Int32. Below pr...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jan, 2019" }, { "code": null, "e": 226, "s": 54, "text": "Array.Rank Property is used to get the rank of the Array. Rank is the number of dimensions of an array. For example, 1-D array returns 1, a 2-D array returns 2, and so on." ...
Python Pandas - Sorting
There are two kinds of sorting available in Pandas. They are − By label By Actual Value Let us consider an example with an output. import pandas as pd import numpy as np unsorted_df=pd.DataFrame(np.random.randn(10,2),index=[1,4,6,2,3,5,9,8,0,7],colu mns=['col2','col1']) print unsorted_df Its output is as follows − ...
[ { "code": null, "e": 2640, "s": 2577, "text": "There are two kinds of sorting available in Pandas. They are −" }, { "code": null, "e": 2649, "s": 2640, "text": "By label" }, { "code": null, "e": 2665, "s": 2649, "text": "By Actual Value" }, { "code": n...
Format a number with leading zeros in PHP
04 Jul, 2022 Often times, while writing a code we face situations where we need to pad a numbers/strings and make them of a default length. In this article, we will learn how to pad a number with leading zeros in PHP. Here are few examples for the better understanding of the task.Examples: Input :1234567 Output :0123...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jul, 2022" }, { "code": null, "e": 308, "s": 28, "text": "Often times, while writing a code we face situations where we need to pad a numbers/strings and make them of a default length. In this article, we will learn how to pad a numb...
Count all possible groups of size 2 or 3 that have sum as multiple of 3
23 Jun, 2022 Given an unsorted integer (positive values only) array of size ‘n’, we can form a group of two or three, the group should be such that the sum of all elements in that group is a multiple of 3. Count all possible number of groups that can be generated in this way. Examples: Input: arr[] = {3, 6, 7, 2, 9} O...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 329, "s": 54, "text": "Given an unsorted integer (positive values only) array of size ‘n’, we can form a group of two or three, the group should be such that the sum of all elements in that group i...
Integer sum() Method in Java
05 Dec, 2018 The java.lang.Integer.sum() is a built-in method in java which returns the sum of its arguments. The method adds two integers together as per the + operator. Syntax : public static int sum(int a, int b) Parameter: The method accepts two parameters which are to be added with each other:a : the first integer...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Dec, 2018" }, { "code": null, "e": 186, "s": 28, "text": "The java.lang.Integer.sum() is a built-in method in java which returns the sum of its arguments. The method adds two integers together as per the + operator." }, { "co...
Python – Row-wise element Addition in Tuple Matrix
30 Dec, 2020 Sometimes, while working with Python tuples, we can have a problem in which we need to perform Row-wise custom elements addition in Tuple matrix. This kind of problem can have application in data domains. Let’s discuss certain ways in which this task can be performed. Input :test_list = [[(‘Gfg’, 3)], [(‘b...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Dec, 2020" }, { "code": null, "e": 323, "s": 54, "text": "Sometimes, while working with Python tuples, we can have a problem in which we need to perform Row-wise custom elements addition in Tuple matrix. This kind of problem can hav...
Word Dictionary using Tkinter
24 Jan, 2021 Prerequisite: Tkinter Pydictionary Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. In this article, we will learn how to make Word...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 42, "s": 28, "text": "Prerequisite:" }, { "code": null, "e": 50, "s": 42, "text": "Tkinter" }, { "code": null, "e": 63, "s": 50, "text": "Pydictionary" }, ...
Sublime Text - Installation
Sublime Text editor is supported by the following major operating systems − Windows Linux and its distributions OS X You can download Sublime Text from its official website − www.sublimetext.com In this chapter, you will learn about the installation of Sublime Text on various operating systems. You will have to go foll...
[ { "code": null, "e": 2667, "s": 2591, "text": "Sublime Text editor is supported by the following major operating systems −" }, { "code": null, "e": 2675, "s": 2667, "text": "Windows" }, { "code": null, "e": 2703, "s": 2675, "text": "Linux and its distributions...
How to get value of a string after last slash in JavaScript?
06 Sep, 2019 The task is to get the string after a specific character(‘/’). Here are few of the mostly used techniques discussed. We are going to use JavaScript.Approach 1: Split the string by .split() method and put it in a variable(array). Use the .length property to get the length of the array. From the array return...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Sep, 2019" }, { "code": null, "e": 188, "s": 28, "text": "The task is to get the string after a specific character(‘/’). Here are few of the mostly used techniques discussed. We are going to use JavaScript.Approach 1:" }, { "...
Dart Programming – Map
08 Mar, 2022 In Dart programming, Maps are dictionary-like data types that exist in key-value form (known as lock-key). There is no restriction on the type of data that goes in a map data type. Maps are very flexible and can mutate their size based on the requirements. However, it is important to note that all locks (k...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Mar, 2022" }, { "code": null, "e": 407, "s": 53, "text": "In Dart programming, Maps are dictionary-like data types that exist in key-value form (known as lock-key). There is no restriction on the type of data that goes in a map data...
Python PIL | Image.quantize() method
17 Jul, 2019 PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jul, 2019" }, { "code": null, "e": 355, "s": 28, "text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to ...
Java | Functions | Question 10
28 Jun, 2021 Predict the output of the following program. class Test implements Cloneable{ int a; Test cloning() { try { return (Test) super.clone(); } catch(CloneNotSupportedException e) { System.out.println("CloneNotSupportedException is caught"); ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 73, "s": 28, "text": "Predict the output of the following program." }, { "code": "class Test implements Cloneable{ int a; Test cloning() { try { return (T...
How to Execute many SQLite Statements in Python?
30 Jun, 2021 In SQLite using the executescript() method, we can execute multiple SQL statements/queries at once. The basic execute() method allows us to only accept one query at a time, so when you need to execute several queries we need to arrange them like a script and pass that script to the executescript() method. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 335, "s": 28, "text": "In SQLite using the executescript() method, we can execute multiple SQL statements/queries at once. The basic execute() method allows us to only accept one query at a time, so...
Python SQLite - Establishing Connection
To establish connection with SQLite Open command prompt, browse through the location of where you have installed SQLite and just execute the command sqlite3 as shown below − You can communicate with SQLite2 database using the SQLite3 python module. To do so, first of all you need to establish a connection (create a con...
[ { "code": null, "e": 3513, "s": 3339, "text": "To establish connection with SQLite Open command prompt, browse through the location of where you have installed SQLite and just execute the command sqlite3 as shown below −" }, { "code": null, "e": 3676, "s": 3513, "text": "You can ...
Lower and Upper Bound Theory
08 Jun, 2022 The Lower and Upper Bound Theory provides a way to find the lowest complexity algorithm to solve a problem. Before understanding the theory, first, let’s have a brief look at what Lower and Upper bounds are. Lower Bound – Let L(n) be the running time of an algorithm A(say), then g(n) is the Lower Bound of...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jun, 2022" }, { "code": null, "e": 261, "s": 52, "text": "The Lower and Upper Bound Theory provides a way to find the lowest complexity algorithm to solve a problem. Before understanding the theory, first, let’s have a brief look at...
What is Nginx (Web Server) and how to install it ?
09 Sep, 2021 Whenever you open your browser, type a URL and then click enter. Basically, you are requesting the contents of that URL. Ever wondered where the content are? Yes, you’re right those are contents placed on remote computers which, after accepting your request, send the contents of that URL back as a response...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Sep, 2021" }, { "code": null, "e": 361, "s": 52, "text": "Whenever you open your browser, type a URL and then click enter. Basically, you are requesting the contents of that URL. Ever wondered where the content are? Yes, you’re righ...
Find zeroes to be flipped so that number of consecutive 1’s is maximized
29 Jun, 2022 Given a binary array and an integer m, find the position of zeroes flipping which creates maximum number of consecutive 1’s in array. Examples : Input: arr[] = {1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1} m = 2 Output: 5 7 We are allowed to flip maximum 2 zeroes. If we flip arr[5] and arr[7], we get 8 co...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Jun, 2022" }, { "code": null, "e": 186, "s": 52, "text": "Given a binary array and an integer m, find the position of zeroes flipping which creates maximum number of consecutive 1’s in array." }, { "code": null, "e": 198...
Filtering MongoDB items by fields and subfields?
To filter items by fields and subfields, use dot notation. Let us create a collection with documents − > db.demo638.insert({Name:"Chris"}); WriteResult({ "nInserted" : 1 }) > db.demo638.insert({Name:"David",details:{Subject:"MongoDB"}}); WriteResult({ "nInserted" : 1 }) Display all documents from a collection with the ...
[ { "code": null, "e": 1165, "s": 1062, "text": "To filter items by fields and subfields, use dot notation. Let us create a collection with documents −" }, { "code": null, "e": 1333, "s": 1165, "text": "> db.demo638.insert({Name:\"Chris\"});\nWriteResult({ \"nInserted\" : 1 })\n> d...
Matching Nonprintable Characters using Java regex
There are 7 common non printable characters used in general and each character has its own hexadecimal representation. Live Demo Following Java program accepts an input text and counts the number of tab spaces in it − import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public clas...
[ { "code": null, "e": 1181, "s": 1062, "text": "There are 7 common non printable characters used in general and each character has its own hexadecimal representation." }, { "code": null, "e": 1192, "s": 1181, "text": " Live Demo" }, { "code": null, "e": 1281, "s": ...
Visualize GitHub Social Network with PyGraphistry | by Khuyen Tran | Towards Data Science
Have you ever wondered how GitHub developers with different roles are connected? For example, if a person is a machine learning developer, what percentage of people he/she follows are web developers? If a person is a web developer, what percentage of people he/she follows are machine learning developers? In this articl...
[ { "code": null, "e": 478, "s": 172, "text": "Have you ever wondered how GitHub developers with different roles are connected? For example, if a person is a machine learning developer, what percentage of people he/she follows are web developers? If a person is a web developer, what percentage of peop...
Building a Python Code Generator. Using Transformers to convert English... | by Divyam Malay Shah | Towards Data Science
Can NLP techniques be used to generate actual code? How far are we from a world where AI is used to write software? In this blog, I make an attempt to build a python code generator that can convert simple English problem statements into their corresponding python code. We tackle this problem by treating it as a Sequenc...
[ { "code": null, "e": 288, "s": 172, "text": "Can NLP techniques be used to generate actual code? How far are we from a world where AI is used to write software?" }, { "code": null, "e": 442, "s": 288, "text": "In this blog, I make an attempt to build a python code generator that ...
Maximum contiguous sum of subarray in JavaScript
We are required to write a JavaScript function that takes in an array of array of positive and negative integers. Since the array also contains negative elements, the sum of contiguous elements can possibly be negative or positive. Our function should pick an array of contiguous elements from the array that sums the gr...
[ { "code": null, "e": 1294, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of array of positive and negative integers. Since the array also contains negative elements, the sum of contiguous elements can possibly be negative or positive." }, { "code":...
Sending an Attachment with email using Perl
If you want to send an attachment in your email using Perl, then following script serves the purpose − #!/usr/bin/perl use MIME::Lite; $to = 'abcd@gmail.com'; $cc = 'efgh@mail.com'; $from = 'webmaster@yourdomain.com'; $subject = 'Test Email'; $message = 'This is test email sent by Perl Script'; $msg = MIME::Lite-=>new(...
[ { "code": null, "e": 1165, "s": 1062, "text": "If you want to send an attachment in your email using Perl, then following script serves the purpose −" }, { "code": null, "e": 1772, "s": 1165, "text": "#!/usr/bin/perl\nuse MIME::Lite;\n$to = 'abcd@gmail.com';\n$cc = 'efgh@mail.com...
How to show current location using HTML5 Geolocation with Google Maps?
HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your location on a map. The geolocation coordinates specify the geographi...
[ { "code": null, "e": 1408, "s": 1062, "text": "HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your l...
How to find the index of given element of a Java List?
The indexOf(Object) method of the java.util.ArrayList class returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. Using this method, you can find the index of a given element. Live Demo import java.util.ArrayList; public class ArrayListDemo {...
[ { "code": null, "e": 1314, "s": 1062, "text": "The indexOf(Object) method of the java.util.ArrayList class returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. Using this method, you can find the index of a given element." ...
Does STL priority queue allow duplicate values? - GeeksforGeeks
15 Jul, 2018 Yes, in C++ priority_queue, we may have duplicate values. // C++ program to demonstrate that duplicate// values are allowed in a priority queue// (with maximum value at the top)#include <bits/stdc++.h>using namespace std; int main(){ priority_queue<int> pq; pq.push(30); pq.push(5); pq.push(30)...
[ { "code": null, "e": 23731, "s": 23703, "text": "\n15 Jul, 2018" }, { "code": null, "e": 23789, "s": 23731, "text": "Yes, in C++ priority_queue, we may have duplicate values." }, { "code": "// C++ program to demonstrate that duplicate// values are allowed in a priority qu...
Elasticsearch - Frozen Indices
The indices that are searched frequently are held in memory because it takes time to rebuild them and help in an efficient search. On the other hand, there may be indices which we rarely access. Those indices need not occupy the memory and can be re-build when they are needed. Such indices are known as frozen indices. ...
[ { "code": null, "e": 2901, "s": 2581, "text": "The indices that are searched frequently are held in memory because it takes time to rebuild them and help in an efficient search. On the other hand, there may be indices which we rarely access. Those indices need not occupy the memory and can be re-bui...
How to get the available azure VM size using Azure CLI in PowerShell?
To get all the available Azure VM sizes using Azure CLI from the specific location, we can use the az vm list-sizes command. PS C:\> az vm list-sizes -l eastus The default output is in the JSON format, as shown below. To get the output in the table format, use the below command. PS C:\> az vm list-sizes -l eastus -otab...
[ { "code": null, "e": 1187, "s": 1062, "text": "To get all the available Azure VM sizes using Azure CLI from the specific location, we can use the az vm list-sizes command." }, { "code": null, "e": 1222, "s": 1187, "text": "PS C:\\> az vm list-sizes -l eastus" }, { "code":...
Primes sum | Practice | GeeksforGeeks
Given a number N. Find if it can be expressed as sum of two prime numbers. Example 1: Input: N = 34 Output: "Yes" Explanation: 34 can be expressed as sum of two prime numbers. Example 2: Input: N = 23 Output: "No" Explanation: 23 cannnot be expressed as sum of two prime numbers. Your Task: You dont need to rea...
[ { "code": null, "e": 325, "s": 238, "text": "Given a number N. Find if it can be expressed as sum of two prime numbers.\n\nExample 1:" }, { "code": null, "e": 418, "s": 325, "text": "Input: N = 34\nOutput: \"Yes\" \nExplanation: 34 can be expressed as \nsum of two prime numbers.\...
Count pairs of characters in a string whose ASCII value difference is K - GeeksforGeeks
17 May, 2021 Given string str of lower case alphabets and a non-negative integer K. The task is to find the number of pairs of characters in the given string whose ASCII value difference is exactly K. Examples: Input: str = “abcdab”, K = 0 Output: 2 (a, a) and (b, b) are the only valid pairs.Input: str = “geeksforgee...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n17 May, 2021" }, { "code": null, "e": 24996, "s": 24796, "text": "Given string str of lower case alphabets and a non-negative integer K. The task is to find the number of pairs of characters in the given string whose ASCII value ...
Binary to original string conversion in JavaScript
We are required to write a JavaScript function that takes in a string that represents a binary code. The function should return the alphabetical representation of the string. For example − If the binary input string is − const str = '1001000 1100101 1101100 1101100 1101111 100000 1010111 1101111 1110010 1101100 1100100...
[ { "code": null, "e": 1237, "s": 1062, "text": "We are required to write a JavaScript function that takes in a string that represents a binary code. The function should return the alphabetical representation of the string." }, { "code": null, "e": 1251, "s": 1237, "text": "For exa...
PHP | filemtime( ) Function - GeeksforGeeks
03 May, 2018 The filemtime() function in PHP is an inbuilt function which is used to return the last time of a specified file when its content was modified. The filemtime() function returns the last time the file was changed as a Unix Timestamp on success and False on failure. The filename is passed as a parameter to t...
[ { "code": null, "e": 26210, "s": 26182, "text": "\n03 May, 2018" }, { "code": null, "e": 26475, "s": 26210, "text": "The filemtime() function in PHP is an inbuilt function which is used to return the last time of a specified file when its content was modified. The filemtime() fun...
Vector get() Method in Java - GeeksforGeeks
17 Aug, 2018 The java.util.vector.get() method is used to fetch or retrieve an element at a specific index from a Vector. Syntax: Vector.get(int index) Parameters: This method accepts a mandatory parameter index which is of integer data type. It specifies the position or index of the element to be fetched from the Vect...
[ { "code": null, "e": 23825, "s": 23797, "text": "\n17 Aug, 2018" }, { "code": null, "e": 23934, "s": 23825, "text": "The java.util.vector.get() method is used to fetch or retrieve an element at a specific index from a Vector." }, { "code": null, "e": 23942, "s": 2...
Python MongoDB - Sort
While retrieving the contents of a collection, you can sort and arrange them in ascending or descending orders using the sort() method. To this method, you can pass the field(s) and the sorting order which is 1 or -1. Where, 1 is for ascending order and -1 is descending order. Following is the syntax of the sort() meth...
[ { "code": null, "e": 3341, "s": 3205, "text": "While retrieving the contents of a collection, you can sort and arrange them in ascending or descending orders using the sort() method." }, { "code": null, "e": 3483, "s": 3341, "text": "To this method, you can pass the field(s) and ...
A Sum Array Puzzle - GeeksforGeeks
03 Jun, 2021 Given an array arr[] of n integers, construct a Sum Array sum[] (of same size) such that sum[i] is equal to the sum of all the elements of arr[] except arr[i]. Solve it without subtraction operator and in O(n). Examples: Input : arr[] = {3, 6, 4, 8, 9} Output : sum[] = {27, 24, 26, 22, 21} Input : arr[] = ...
[ { "code": null, "e": 24430, "s": 24402, "text": "\n03 Jun, 2021" }, { "code": null, "e": 24641, "s": 24430, "text": "Given an array arr[] of n integers, construct a Sum Array sum[] (of same size) such that sum[i] is equal to the sum of all the elements of arr[] except arr[i]. Sol...
Querying an array of arrays in MongoDB?
Use $in operator to query an array of arrays in MongoDB. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows − > db.arrayOfArraysDemo.insertOne({"EmployeeName":"Larry","EmployeeSkills":[["Java","MongoDB","MySQL","SQL Server"]]}); { "...
[ { "code": null, "e": 1257, "s": 1062, "text": "Use $in operator to query an array of arrays in MongoDB. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −" }, { "code": null, "e": 1636, "s": 1257, ...
How to push docker image to docker hub ? - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorials, I am going to show how to ...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
3 Features of Python Matplotlib That Make Data Visualizations More Appealing and Informative | by Soner Yıldırım | Towards Data Science
Data visualization is an essential part of data science. From exploratory data analysis to delivering results, it is imperative to make use of data visualizations. It would be very tough to convince stakeholders just by showing them plain numbers. They are usually more interested in the big picture which can be shown c...
[ { "code": null, "e": 335, "s": 171, "text": "Data visualization is an essential part of data science. From exploratory data analysis to delivering results, it is imperative to make use of data visualizations." }, { "code": null, "e": 535, "s": 335, "text": "It would be very tough...
Is Your Classifier Any Good?. Don’t fall for the wrong evaluation... | by Frank Zickert | Quantum Machine Learning | Towards Data Science
This post is part of the book: Hands-On Quantum Machine Learning With Python In this post, we aim to predict whether a passenger survived the Titanic shipwreck. But rather than training a sophisticated model, we don’t even look at the data. This way, we discover how easy it is to produce seemingly good results that are...
[ { "code": null, "e": 249, "s": 172, "text": "This post is part of the book: Hands-On Quantum Machine Learning With Python" }, { "code": null, "e": 514, "s": 249, "text": "In this post, we aim to predict whether a passenger survived the Titanic shipwreck. But rather than training ...
Rotting Oranges in C++
Suppose we have a grid, here in each cell can have one of three values − value 0 for an empty cell; value 0 for an empty cell; value 1 for a fresh orange; value 1 for a fresh orange; value 2 for a rotten orange. value 2 for a rotten orange. In every minute, any fresh orange that is adjacent to a rotten orange becomes r...
[ { "code": null, "e": 1135, "s": 1062, "text": "Suppose we have a grid, here in each cell can have one of three values −" }, { "code": null, "e": 1162, "s": 1135, "text": "value 0 for an empty cell;" }, { "code": null, "e": 1189, "s": 1162, "text": "value 0 for...
Serverless - Deploying Function
Navigate to a new folder wherein you want to create your first project to be deployed to serverless. Within that folder, run the following command − sls create --template aws-python3 This command will create the boilerplate code for deploying lambda functions using serverless and python runtime. Note that you can use ...
[ { "code": null, "e": 2152, "s": 2003, "text": "Navigate to a new folder wherein you want to create your first project to be deployed to serverless. Within that folder, run the following command −" }, { "code": null, "e": 2187, "s": 2152, "text": "sls create --template aws-python3...
How to use a simple SQLite database in Kotlin android?
This example demonstrates how to use a simple SQLite database in Kotlin 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 version="1.0" encoding="utf-8"?> <Linea...
[ { "code": null, "e": 1143, "s": 1062, "text": "This example demonstrates how to use a simple SQLite database in Kotlin android." }, { "code": null, "e": 1272, "s": 1143, "text": "Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required detai...
Array Declarations in Java
Here is the syntax for declaring an array variable − dataType[] arrayRefVar; // preferred way. or dataType arrayRefVar[]; // works but not preferred way. Note − The style dataType[] arrayRefVar is preferred. The style dataType arrayRefVar[] comes from the C/C++ language and was adopted in Java to accommodate C/C++ p...
[ { "code": null, "e": 1115, "s": 1062, "text": "Here is the syntax for declaring an array variable −" }, { "code": null, "e": 1219, "s": 1115, "text": "dataType[] arrayRefVar; // preferred way.\nor\ndataType arrayRefVar[]; // works but not preferred way." }, { "code": n...
Polymer - Quick Guide
Polymer.js is a JavaScript library created by Google that allows reusing the HTML elements for building applications with components. Polymer is an open-source JavaScript library developed by Google developers and was initially released on May 27, 2015. The stable release is 1.7.0 and it was released on September 29, 2...
[ { "code": null, "e": 1874, "s": 1740, "text": "Polymer.js is a JavaScript library created by Google that allows reusing the HTML elements for building applications with components." }, { "code": null, "e": 2065, "s": 1874, "text": "Polymer is an open-source JavaScript library dev...
How to convert a string to int in Lua programming?
Lua does the implicit conversion or also known as coercion when it notices that you are trying to use a number but wrote a string, then it automatically converts the string into an int, and it is quite useful. Let’s consider a simple example where I will declare a string variable, and then I will try to do an arithmeti...
[ { "code": null, "e": 1272, "s": 1062, "text": "Lua does the implicit conversion or also known as coercion when it notices that you are trying to use a number but wrote a string, then it automatically converts the string into an int, and it is quite useful." }, { "code": null, "e": 1529, ...
How to randomly select elements of an array with NumPy in Python ? - GeeksforGeeks
02 Dec, 2021 Prerequisites: Numpy The random values are useful in data-related fields like machine learning, statistics and probability. The numpy.random.choice() function is used to get random elements from a NumPy array. It is a built-in function in the NumPy package of python. Syntax: numpy.random.choice( a , size =...
[ { "code": null, "e": 24723, "s": 24695, "text": "\n02 Dec, 2021" }, { "code": null, "e": 24744, "s": 24723, "text": "Prerequisites: Numpy" }, { "code": null, "e": 24991, "s": 24744, "text": "The random values are useful in data-related fields like machine lear...
BigInteger sqrt() Method in Java - GeeksforGeeks
03 Mar, 2022 java.math.BigInteger.sqrt() is an inbuilt function added in Java SE 9 & JDK 9 which returns BigInteger value of square root of a BigInteger on which sqrt() method is applied. It is the same as the floor(sqrt(n)) where n is a number. This Square root is less than the real square root if the real square root...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n03 Mar, 2022" }, { "code": null, "e": 23909, "s": 23557, "text": "java.math.BigInteger.sqrt() is an inbuilt function added in Java SE 9 & JDK 9 which returns BigInteger value of square root of a BigInteger on which sqrt() method ...
Prolog - Basic Programs
In the following chapter, we are going to discuss basic prolog examples to − Find minimum maximum of two numbers Find minimum maximum of two numbers Find the equivalent resistance of a resistive circuit Find the equivalent resistance of a resistive circuit Verify whether a line segment is horizontal, vertical or obliqu...
[ { "code": null, "e": 2169, "s": 2092, "text": "In the following chapter, we are going to discuss basic prolog examples to −" }, { "code": null, "e": 2205, "s": 2169, "text": "Find minimum maximum of two numbers" }, { "code": null, "e": 2241, "s": 2205, "text":...
Node.js Jimp - GeeksforGeeks
14 Oct, 2021 Introduction Jimp is a node module used to do image processing which is provided by the npm installer. The Jimp – Javascript Image Manipulation Program is a library written entirely in JavaScript for Node, without any external or native dependencies. Various Image manipulations options available in this li...
[ { "code": null, "e": 24059, "s": 24031, "text": "\n14 Oct, 2021" }, { "code": null, "e": 24450, "s": 24059, "text": "Introduction Jimp is a node module used to do image processing which is provided by the npm installer. The Jimp – Javascript Image Manipulation Program is a librar...
Bootstrap 4 .flex-wrap class
Use the flex-wrap class in Bootstrap 4 to wrap flex items. The following is the code snippet to wrap the flex items − <div class="d-flex flex-wrap bg-primary"> . . <!-- flex items - - > . . </div> Let us set some flex items in the flex-wrap class − <div class="d-flex flex-wrap bg-primary"> <div class="p-2 ...
[ { "code": null, "e": 1180, "s": 1062, "text": "Use the flex-wrap class in Bootstrap 4 to wrap flex items. The following is the code snippet to wrap the flex items −" }, { "code": null, "e": 1270, "s": 1180, "text": "<div class=\"d-flex flex-wrap bg-primary\">\n .\n .\n <!-- f...
Multi-label Land Cover Classification with Deep Learning | by Abdishakur | Towards Data Science
Multi-label land cover classification is less explored compared to single-label classifications. In contrast, multi-label classifications are more realistic as we always find out multiple land cover in each image. However, with the Deep learning applications and Convolutional Neural Networks, we can tackle the challeng...
[ { "code": null, "e": 525, "s": 172, "text": "Multi-label land cover classification is less explored compared to single-label classifications. In contrast, multi-label classifications are more realistic as we always find out multiple land cover in each image. However, with the Deep learning applicati...
How to use the Split-Apply-Combine strategy in Pandas groupby | by Filip Ciesielski | Towards Data Science
Pandas groupby-apply is an invaluable tool in a Python data scientist’s toolkit. You can go pretty far with it without fully understanding all of its internal intricacies. However, sometimes that can manifest itself in unexpected behavior and errors. Ever had one of those? Or maybe you’re struggling to figure out how t...
[ { "code": null, "e": 654, "s": 172, "text": "Pandas groupby-apply is an invaluable tool in a Python data scientist’s toolkit. You can go pretty far with it without fully understanding all of its internal intricacies. However, sometimes that can manifest itself in unexpected behavior and errors. Ever...
How to Use Regular Expression as a Substitute of endsWith() Method in Java?
17 Dec, 2021 So primarily discuss what is endsWith() method is, so it is a method of String class that checks whether the string ends with a specified suffix. This method returns a boolean value true or false. Syntax: public boolean endsWith(String suff) Parameter: specified suffix part Return: Boolean value, h...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2021" }, { "code": null, "e": 225, "s": 28, "text": "So primarily discuss what is endsWith() method is, so it is a method of String class that checks whether the string ends with a specified suffix. This method returns a boolean...
What is Type safe in C#?
Type safe in C# wouldn’t allow an object to sneak into other object’s memory. Let us see an example to understand the concept of − public class One { public int Prop{ get; set;} } public class Two { public int Prop{get;set;} public int Prop1{get;set;} } Let’s say I have an object Class One − One ob = new One(...
[ { "code": null, "e": 1318, "s": 1187, "text": "Type safe in C# wouldn’t allow an object to sneak into other object’s memory. Let us see an example to understand the concept of −" }, { "code": null, "e": 1451, "s": 1318, "text": "public class One {\n public int Prop{ get; set;}\...
time.Milliseconds() Function in Golang With Examples
21 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Milliseconds() function in Go language is used to find the duration of time in form of an integer millisecond count. Moreover, this function is defined under the time package. Here, you need to import the “tim...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2020" }, { "code": null, "e": 379, "s": 28, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Milliseconds() function in Go language is used to find the duration of time i...
Python | Consecutive elements grouping in list
09 Sep, 2019 Sometimes, while working with Python lists, we can have a problem in which we might need to group the list elements on basis of their respective consecutiveness. This kind of problem can occur while data handling. Let’s discuss certain way in which this task can be performed. Method : Using enumerate() + g...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2019" }, { "code": null, "e": 305, "s": 28, "text": "Sometimes, while working with Python lists, we can have a problem in which we might need to group the list elements on basis of their respective consecutiveness. This kind of ...