title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
An Interactive Web Dashboard with Plotly and Flask | by Alan Jones | Towards Data Science
It may seem as if I have something against Dash. Honestly, I haven’t; it’s a fine product, comes with a lot of support from Plotly and does what it is intended to do, well. But, as I attempted to demonstrate in a previous article, there is no need to write HTML in Python (as Dash requires you to do) when you can write ...
[ { "code": null, "e": 345, "s": 172, "text": "It may seem as if I have something against Dash. Honestly, I haven’t; it’s a fine product, comes with a lot of support from Plotly and does what it is intended to do, well." }, { "code": null, "e": 692, "s": 345, "text": "But, as I att...
Apache POI - Database
This chapter explains how the POI library interacts with a database. With the help of JDBC, you can retrieve data from a database and insert that data into a spreadsheet using the POI library. Let us consider MySQL database for SQL operations. Let us assume the following employee data table called emp_tbl is to be retr...
[ { "code": null, "e": 2148, "s": 1904, "text": "This chapter explains how the POI library interacts with a database. With the help of JDBC, you can retrieve data from a database and insert that data into a spreadsheet using the POI library. Let us consider MySQL database for SQL operations." }, {...
Cucumber - Debugging
It is very likely that your test may fail due to unknown reasons. Identifying the cause of failure and correcting it is very important. This process is known as debugging. Following are a few tips and tricks, which makes Cucumber debugging a bit easy. Debugging option is available with Eclipse. Place the break point. C...
[ { "code": null, "e": 2214, "s": 1962, "text": "It is very likely that your test may fail due to unknown reasons. Identifying the cause of failure and correcting it is very important. This process is known as debugging. Following are a few tips and tricks, which makes Cucumber debugging a bit easy." ...
How to remove special characters from a database field in MySQL?
You can remove special characters from a database field using REPLACE() function. The special characters are double quotes (“ “), Number sign (#), dollar sign($), percent (%) etc. The syntax is as follows to remove special characters from a database field. UPDATE yourTableName SET yourColumnName=REPLACE(yourColumnName,...
[ { "code": null, "e": 1242, "s": 1062, "text": "You can remove special characters from a database field using REPLACE() function. The special characters are double quotes (“ “), Number sign (#), dollar sign($), percent (%) etc." }, { "code": null, "e": 1319, "s": 1242, "text": "Th...
Bokeh - Layouts
Bokeh visualizations can be suitably arranged in different layout options. These layouts as well as sizing modes result in plots and widgets resizing automatically as per the size of browser window. For consistent appearance, all items in a layout must have same sizing mode. The widgets (buttons, menus, etc.) are kept ...
[ { "code": null, "e": 2639, "s": 2270, "text": "Bokeh visualizations can be suitably arranged in different layout options. These layouts as well as sizing modes result in plots and widgets resizing automatically as per the size of browser window. For consistent appearance, all items in a layout must ...
Calendar add() Method in Java with Examples - GeeksforGeeks
02 Nov, 2021 The add() method of Calendar class present inside is used to add or subtract from the given calendar field(int field), a specific amount of time(int amt), based on the calendar’s rules. Syntax: public abstract void add(int field, int amt) Parameters: The method takes two parameters: The field of the cale...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n02 Nov, 2021" }, { "code": null, "e": 24134, "s": 23948, "text": "The add() method of Calendar class present inside is used to add or subtract from the given calendar field(int field), a specific amount of time(int amt), based on...
How to Integrate Webcam using JavaScript on HTML5 ? - GeeksforGeeks
11 May, 2020 In this article, we will share a very simple JavaScript code snippet through which you can easily integrate your webcam into an HTML5 web page. Now, a day most of the website provides real-time webcam integration for profile picture upload or any account verification step. First, create an HTML DOM structu...
[ { "code": null, "e": 25577, "s": 25549, "text": "\n11 May, 2020" }, { "code": null, "e": 25851, "s": 25577, "text": "In this article, we will share a very simple JavaScript code snippet through which you can easily integrate your webcam into an HTML5 web page. Now, a day most of ...
Apache Oozie - Coordinator
Coordinator applications allow users to schedule complex workflows, including workflows that are scheduled regularly. Oozie Coordinator models the workflow execution triggers in the form of time, data or event predicates. The workflow job mentioned inside the Coordinator is started only after the given conditions are s...
[ { "code": null, "e": 2105, "s": 1775, "text": "Coordinator applications allow users to schedule complex workflows, including workflows that are scheduled regularly. Oozie Coordinator models the workflow execution triggers in the form of time, data or event predicates. The workflow job mentioned insi...
What To Do When Your Classification Data is Imbalanced | by Judy T Raj | Towards Data Science
The key to building a good machine learning model is the data it is trained on. Therefore it is imperative that the training data be clean and balanced. The more time you spend on perfecting your training data, the less efforts you’ll need to spend on your model. So lets look at how to go about getting ourselves a bala...
[ { "code": null, "e": 411, "s": 46, "text": "The key to building a good machine learning model is the data it is trained on. Therefore it is imperative that the training data be clean and balanced. The more time you spend on perfecting your training data, the less efforts you’ll need to spend on your...
Deploying a Python Web App on AWS | by Will Koehrsen | Towards Data Science
While I enjoy doing data science and programming projects for the personal thrill that comes with building something of my own, there is also a certain joy in sharing your project online with anyone in the world. Fortunately, thanks to Amazon Web Services (AWS), in a few minutes, we can deploy a Python web application ...
[ { "code": null, "e": 522, "s": 172, "text": "While I enjoy doing data science and programming projects for the personal thrill that comes with building something of my own, there is also a certain joy in sharing your project online with anyone in the world. Fortunately, thanks to Amazon Web Services...
How to Change the Font Size in Matplotlib Plots | Towards Data Science
Usually, you may have to tweak the default font size of figures created with matplotlib in order to ensure that all the elements are visualised properly and are easy to read. In today’s short guide we will discuss how to change the font size in plots generated using matplotlib library. Specifically, we will explore how...
[ { "code": null, "e": 495, "s": 171, "text": "Usually, you may have to tweak the default font size of figures created with matplotlib in order to ensure that all the elements are visualised properly and are easy to read. In today’s short guide we will discuss how to change the font size in plots gene...
gRPC - Timeouts & Cancellation
gRPC supports assigning timeouts to the requests. It is a way to perform cancellation of requests. It helps to avoid using the resources for both the client and the server for a request whose result would not be useful to the client. gRPC supports specifying a timeout for both client as well as the server. The Client c...
[ { "code": null, "e": 2071, "s": 1837, "text": "gRPC supports assigning timeouts to the requests. It is a way to perform cancellation of requests. It helps to avoid using the resources for both the client and the server for a request whose result would not be useful to the client." }, { "code...
How to create a Selenium web scraper in Azure Functions | by René Bremer | Towards Data Science
Selenium is the standard tool for automated web browser testing. On top of that, Selenium is a popular tool for web scraping. When creating a web scraper in Azure, Azure Functions is a logical candidate to run your code in. However, the default Azure Functions image does not contain the dependencies that Selenium requi...
[ { "code": null, "e": 567, "s": 172, "text": "Selenium is the standard tool for automated web browser testing. On top of that, Selenium is a popular tool for web scraping. When creating a web scraper in Azure, Azure Functions is a logical candidate to run your code in. However, the default Azure Func...
Socket.IO - Error Handling
We have worked on local servers until now, which will almost never give us errors related to connections, timeouts, etc. However, in real life production environments, handling such errors are of utmost importance. Therefore, we will now discuss how we can handle connection errors on the client side. The client API pro...
[ { "code": null, "e": 2167, "s": 1865, "text": "We have worked on local servers until now, which will almost never give us errors related to connections, timeouts, etc. However, in real life production environments, handling such errors are of utmost importance. Therefore, we will now discuss how we ...
MongoDB query to remove item from array?
To remove item from array, you can use $pull operator. Let us create a collection with documents − > db.removeItemFromArray.insertOne( { "_id":101, "StudentName":"Larry", "StudentSubjects":["C","MongoDB","Java","MySQL"] } ); { "acknowledged" : true, "insertedId" : 101 } Display all documents from a collection with t...
[ { "code": null, "e": 1161, "s": 1062, "text": "To remove item from array, you can use $pull operator. Let us create a collection with documents −" }, { "code": null, "e": 1336, "s": 1161, "text": "> db.removeItemFromArray.insertOne(\n { \"_id\":101, \"StudentName\":\"Larry\", \...
JUnit - Extensions
Following are the JUnit extensions − Cactus JWebUnit XMLUnit MockObject Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters). The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it. Cactus implements an in-con...
[ { "code": null, "e": 2009, "s": 1972, "text": "Following are the JUnit extensions −" }, { "code": null, "e": 2016, "s": 2009, "text": "Cactus" }, { "code": null, "e": 2025, "s": 2016, "text": "JWebUnit" }, { "code": null, "e": 2033, "s": 2025, ...
Cast to ObjectId failed for value in MongoDB?
To cast to ObjectId correctly, use aggregate() in MongoDB. Let us create a collection with documents − > db.demo460.insertOne({"_id":"5ab9cbfa31c2ab715d42129e"}); { "acknowledged" : true, "insertedId" : "5ab9cbfa31c2ab715d42129e" } Display all documents from a collection with the help of find() method − > db.demo460.fi...
[ { "code": null, "e": 1165, "s": 1062, "text": "To cast to ObjectId correctly, use aggregate() in MongoDB. Let us create a collection with documents −" }, { "code": null, "e": 1294, "s": 1165, "text": "> db.demo460.insertOne({\"_id\":\"5ab9cbfa31c2ab715d42129e\"});\n{ \"acknowledg...
JOGL - Quick Guide
This chapter introduces OpenGL, its functions, the OpenGL bindings in java (GL4java, LWJGL, JOGL), and the advantages of JOGL over other OpenGL bindings. Java binding for OpenGL (JOGL) is the recent binding for OpenGL graphics API in Java. It is a wrapper library, which can access OpenGL API, and it is designed to crea...
[ { "code": null, "e": 2173, "s": 2019, "text": "This chapter introduces OpenGL, its functions, the OpenGL bindings in java (GL4java, LWJGL, JOGL), and the advantages of JOGL over other OpenGL bindings." }, { "code": null, "e": 2740, "s": 2173, "text": "Java binding for OpenGL (JOG...
Many to One Mapping in Hibernate | many to one relationship
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 tutorial, we are going to implement m...
[ { "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, ...
Compute the Correlation Coefficient Value between Two Vectors in R Programming - cor() Function - GeeksforGeeks
10 Jun, 2020 cor() function in R Language is used to measure the correlation coefficient value between two vectors. Syntax: cor(x, y, method) Parameters:x, y: Data vectorsmethod: Type of method to be used Example 1: # Data vectors x <- c(1, 3, 5, 10) y <- c(2, 4, 6, 20) # Print covariance using Pearson methodpr...
[ { "code": null, "e": 24882, "s": 24854, "text": "\n10 Jun, 2020" }, { "code": null, "e": 24985, "s": 24882, "text": "cor() function in R Language is used to measure the correlation coefficient value between two vectors." }, { "code": null, "e": 25011, "s": 24985, ...
Java - The Hashtable Class
Hashtable was part of the original java.util and is a concrete implementation of a Dictionary. However, Java 2 re-engineered Hashtable so that it also implements the Map interface. Thus, Hashtable is now integrated into the collections framework. It is similar to HashMap, but is synchronized. Like HashMap, Hashtable st...
[ { "code": null, "e": 2472, "s": 2377, "text": "Hashtable was part of the original java.util and is a concrete implementation of a Dictionary." }, { "code": null, "e": 2671, "s": 2472, "text": "However, Java 2 re-engineered Hashtable so that it also implements the Map interface. T...
Basic Concepts of Object Oriented Programming using C++
Object oriented programming is a type of programming which uses objects and classes its functioning. The object oriented programming is based on real world entities like inheritance, polymorphism, data hiding, etc. It aims at binding together data and function work on these data sets into a single entity to restrict th...
[ { "code": null, "e": 1393, "s": 1062, "text": "Object oriented programming is a type of programming which uses objects and classes its functioning. The object oriented programming is based on real world entities like inheritance, polymorphism, data hiding, etc. It aims at binding together data and f...
CountDownLatch in Java
public class CountDownLatch extends Object CountDownLatch class is a synchronization aid which allows one or more thread to wait until the mandatory operations are performed by other threads. CountDownLatch is initialized with a given count of threads which are required to be completed before the main thread. CountD...
[ { "code": null, "e": 1108, "s": 1062, "text": "public class CountDownLatch\n extends Object" }, { "code": null, "e": 1257, "s": 1108, "text": "CountDownLatch class is a synchronization aid which allows one or more thread to wait until the mandatory operations are performed by o...
C# Queryable Take() Method
Get specified number of elements from the beginning using the Take() method. The following is our array. int[] marks = { 35, 72, 50, 90, 95, 85, 52, 67 }; Now, use OrderByDescending to order the elements in Descending order. Then use the Take() method to get the elements. marks.AsQueryable().OrderByDescending(s => s).T...
[ { "code": null, "e": 1139, "s": 1062, "text": "Get specified number of elements from the beginning using the Take() method." }, { "code": null, "e": 1167, "s": 1139, "text": "The following is our array." }, { "code": null, "e": 1217, "s": 1167, "text": "int[] ...
How can we ignore the fields during JSON serialization in Java?
If there are fields in Java objects that do not wish to be serialized, we can use the @JsonIgnore annotation in the Jackson library. The @JsonIgnore can be used at the field level, for ignoring fields during the serialization and deserialization. public @interface JsonIgnore import java.io.*; import java.util.*; import...
[ { "code": null, "e": 1309, "s": 1062, "text": "If there are fields in Java objects that do not wish to be serialized, we can use the @JsonIgnore annotation in the Jackson library. The @JsonIgnore can be used at the field level, for ignoring fields during the serialization and deserialization." }, ...
Monitors vs Semaphores
Monitors and semaphores are used for process synchronization and allow processes to access the shared resources using mutual exclusion. However, monitors and semaphores contain many differences. Details about both of these are given as follows − Monitors are a synchronization construct that were created to overcome the...
[ { "code": null, "e": 1308, "s": 1062, "text": "Monitors and semaphores are used for process synchronization and allow processes to access the shared resources using mutual exclusion. However, monitors and semaphores contain many differences. Details about both of these are given as follows −" }, ...
Ngx-Bootstrap - Tooltip
ngx-bootstrap tooltip component provides a easy to use and highly configurable Tooltip component. [tooltip], [tooltipHtml] [tooltip], [tooltipHtml] adaptivePosition − boolean, sets disable adaptive position. adaptivePosition − boolean, sets disable adaptive position. container − string, A selector specifying the elemen...
[ { "code": null, "e": 2198, "s": 2100, "text": "ngx-bootstrap tooltip component provides a easy to use and highly configurable Tooltip component." }, { "code": null, "e": 2223, "s": 2198, "text": "[tooltip], [tooltipHtml]" }, { "code": null, "e": 2248, "s": 2223, ...
Hashtable vs. Dictionary in C#
A hash table is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection. The members in a Hashtable are thread safe. It returns null if we try to find a key that does not exist. H...
[ { "code": null, "e": 1276, "s": 1062, "text": "A hash table is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection." }, { "code": null, "e": 14...
Perl local Function
This function sets the variables in LIST to be local to the current execution block. If more than one value is specified, you must use parentheses to define the list. Note that local creates a local copy of a variable, which then goes out of scope when the enclosing block terminates. The localized value is then used wh...
[ { "code": null, "e": 2387, "s": 2220, "text": "This function sets the variables in LIST to be local to the current execution block. If more than one value is specified, you must use parentheses to define the list." }, { "code": null, "e": 2625, "s": 2387, "text": "Note that local...
Sentiment Analysis in 10 Minutes with Rule-Based VADER and NLTK | by Orhan G. Yalçın | Towards Data Science
For a long time, I have been writing on statistical NLP topics and sharing tutorials. The sub-field of statistical NLP is responsible for several impressive advancements in the field of natural language processing, and it has the highest potential among competing approaches. However, in some cases, the contribution of ...
[ { "code": null, "e": 558, "s": 172, "text": "For a long time, I have been writing on statistical NLP topics and sharing tutorials. The sub-field of statistical NLP is responsible for several impressive advancements in the field of natural language processing, and it has the highest potential among c...
Python – Sort grouped Pandas dataframe by group size?
To group Pandas dataframe, we use groupby(). To sort grouped dataframe in ascending or descending order, use sort_values(). The size() method is used to get the dataframe size. For ascending order sort, use the following in sort_values() − ascending=True For descending order sort, use the following in sort_values() − a...
[ { "code": null, "e": 1239, "s": 1062, "text": "To group Pandas dataframe, we use groupby(). To sort grouped dataframe in ascending or descending order, use sort_values(). The size() method is used to get the dataframe size." }, { "code": null, "e": 1302, "s": 1239, "text": "For a...
Laravel - Insert Records
We can insert the record using the DB facade with insert method. The syntax of insert method is as shown in the following table. $query(string) − query to execute in database $bindings(array) − values to bind with queries Step 1 − Execute the below command to create a controller called StudInsertController php artisan ...
[ { "code": null, "e": 2601, "s": 2472, "text": "We can insert the record using the DB facade with insert method. The syntax of insert method is as shown in the following table." }, { "code": null, "e": 2647, "s": 2601, "text": "$query(string) − query to execute in database" }, ...
sched_setaffinity() - Unix, Linux System Call
Unix - Home Unix - Getting Started Unix - File Management Unix - Directories Unix - File Permission Unix - Environment Unix - Basic Utilities Unix - Pipes & Filters Unix - Processes Unix - Communication Unix - The vi Editor Unix - What is Shell? Unix - Using Variables Unix - Special Variables Unix - Using Arrays Unix -...
[ { "code": null, "e": 1466, "s": 1454, "text": "Unix - Home" }, { "code": null, "e": 1489, "s": 1466, "text": "Unix - Getting Started" }, { "code": null, "e": 1512, "s": 1489, "text": "Unix - File Management" }, { "code": null, "e": 1531, "s": 1...
Maximize sum of N X N upper left sub-matrix from given 2N X 2N matrix - GeeksforGeeks
22 Apr, 2021 Given a 2N x 2N matrix of integers. You are allowed to reverse any row or column any number of times and in any order. The task is to calculate the maximum sum of the upper-left N X N submatrix i.e the sum of elements of submatrix from (0, 0) to (N – 1, N – 1).Examples: Input : mat[][] = { ...
[ { "code": null, "e": 24920, "s": 24892, "text": "\n22 Apr, 2021" }, { "code": null, "e": 25193, "s": 24920, "text": "Given a 2N x 2N matrix of integers. You are allowed to reverse any row or column any number of times and in any order. The task is to calculate the maximum sum of ...
Table operations in MS SQL Server - GeeksforGeeks
17 Sep, 2020 In a relational database, the data is stored in the form of tables and each table is referred to as a relation. A table can store a maximum of 1000 rows. Tables are a preferred choice as: Tables are arranged in an organized manner. We can segregate the data according to our preferences in the form of rows...
[ { "code": null, "e": 25623, "s": 25595, "text": "\n17 Sep, 2020" }, { "code": null, "e": 25811, "s": 25623, "text": "In a relational database, the data is stored in the form of tables and each table is referred to as a relation. A table can store a maximum of 1000 rows. Tables ar...
How to get Stream count in Java 8 - 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 tutorial, we will see how to get Stre...
[ { "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, ...
Batch Script - Arithmetic operators
Batch Script language supports the normal Arithmetic operators as any language. Following are the Arithmetic operators available. The following code snippet shows how the various operators can be used. @echo off SET /A a = 5 SET /A b = 10 SET /A c = %a%+%b% echo %c% SET /A c = %a%-%b% echo %c% SET /A c = %b%*%a% echo %...
[ { "code": null, "e": 2299, "s": 2169, "text": "Batch Script language supports the normal Arithmetic operators as any language. Following are the Arithmetic operators available." }, { "code": null, "e": 2371, "s": 2299, "text": "The following code snippet shows how the various ope...
set clear() in python - GeeksforGeeks
31 Dec, 2017 The clear() method removes all elements from the set. Syntax: set.clear() parameters: The clear() method doesn't take any parameters. Return: The clear() method doesn't return any value. # set of lettersGEEK = {'g', 'e', 'e', 'k', 's'}print('GEEK before clear:', GEEK) # clearing vowelsGEEK.clear()print('...
[ { "code": null, "e": 22705, "s": 22677, "text": "\n31 Dec, 2017" }, { "code": null, "e": 22759, "s": 22705, "text": "The clear() method removes all elements from the set." }, { "code": null, "e": 22767, "s": 22759, "text": "Syntax:" }, { "code": null, ...
Templates and Static variables in C++ - GeeksforGeeks
29 May, 2017 Function templates and static variables:Each instantiation of function template has its own copy of local static variables. For example, in the following program there are two instances: void fun(int ) and void fun(double ). So two copies of static variable i exist. #include <iostream> using namespace std...
[ { "code": null, "e": 24041, "s": 24013, "text": "\n29 May, 2017" }, { "code": null, "e": 24308, "s": 24041, "text": "Function templates and static variables:Each instantiation of function template has its own copy of local static variables. For example, in the following program t...
What are executable statements in C language?
A ‘C’ program contains executable statements. A compiler helps to translate the executable statements into machine language. When a user runs the program, he/she machines the language statements which are executed by the compiler. The types of executable statements in C language are as follows − Input – output statemen...
[ { "code": null, "e": 1187, "s": 1062, "text": "A ‘C’ program contains executable statements. A compiler helps to translate the executable statements into machine language." }, { "code": null, "e": 1293, "s": 1187, "text": "When a user runs the program, he/she machines the languag...
How to Assign Colors to Categorical Variable in ggplot2 Plot in R ? - GeeksforGeeks
24 Jun, 2021 In this article, we will see how to assign colors to categorical Variables in the ggplot2 plot in R Programming language. Note: Here we are using a scatter plot, the same can be applied to any other graph. Dataset in use: To Create an R plot, we use ggplot() function and to make it scatter plot we add geo...
[ { "code": null, "e": 24185, "s": 24157, "text": "\n24 Jun, 2021" }, { "code": null, "e": 24308, "s": 24185, "text": "In this article, we will see how to assign colors to categorical Variables in the ggplot2 plot in R Programming language. " }, { "code": null, "e": 243...
How to create a table in Oracle using JDBC?
You can create a table in a database using the CREATE TABLE query. CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype, ..... columnN datatype, PRIMARY KEY( one or more columns ) ); To create a table in a database using JDBC API you need to − Register the Driver: Register the...
[ { "code": null, "e": 1129, "s": 1062, "text": "You can create a table in a database using the CREATE TABLE query." }, { "code": null, "e": 1288, "s": 1129, "text": "CREATE TABLE table_name(\n column1 datatype,\n column2 datatype,\n column3 datatype,\n .....\n columnN da...
Check whether given floating point number is even or odd - GeeksforGeeks
12 Apr, 2021 Given a floating-point number, check whether it is even or odd.We can check whether a integer is even or odd by dividing its last digit by 2. But in case of floating point number we can’t check a given number is even or odd by just dividing its last digit by 2. For example, 100.70 is an odd number but its ...
[ { "code": null, "e": 24636, "s": 24608, "text": "\n12 Apr, 2021" }, { "code": null, "e": 24984, "s": 24636, "text": "Given a floating-point number, check whether it is even or odd.We can check whether a integer is even or odd by dividing its last digit by 2. But in case of floati...
Python dictionary | values() - GeeksforGeeks
22 Nov, 2021 values() is an inbuilt method in Python programming language that returns a view object. The view object contains the values of the dictionary, as a list. If you use the type() method on the return value, you get “dict_values object”. It must be cast to obtain the actual list. Syntax: dictionary_name.value...
[ { "code": null, "e": 23167, "s": 23139, "text": "\n22 Nov, 2021" }, { "code": null, "e": 23445, "s": 23167, "text": "values() is an inbuilt method in Python programming language that returns a view object. The view object contains the values of the dictionary, as a list. If you u...
Java | How to start learning Java - GeeksforGeeks
04 Apr, 2022 Java is one of the most popular and widely used programming languages and platforms. A platform is an environment that helps to develop and run programs written in any programming language.Java is fast, reliable, and secure. From desktop to web applications, scientific supercomputers to gaming consoles, ce...
[ { "code": null, "e": 24486, "s": 24458, "text": "\n04 Apr, 2022" }, { "code": null, "e": 24859, "s": 24486, "text": "Java is one of the most popular and widely used programming languages and platforms. A platform is an environment that helps to develop and run programs written in...
C# | How to get a subset in a SortedSet - GeeksforGeeks
01 Feb, 2019 SortedSet class represents the collection of objects in sorted order. This class comes under the System.Collections.Generic namespace. SortedSet<T>.GetViewBetween(T, T) method is used to return a view of a subset in a SortedSet<T>. Properties: In C#, SortedSet class can be used to store, remove or view ele...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24534, "s": 24302, "text": "SortedSet class represents the collection of objects in sorted order. This class comes under the System.Collections.Generic namespace. SortedSet<T>.GetViewBetween(...
Ways To Tile A Floor | Practice | GeeksforGeeks
Given a floor of dimensions 2 x W and tiles of dimensions 2 x 1, the task is to find the number of ways the floor can be tiled. A tile can either be placed horizontally i.e as a 1 x 2 tile or vertically i.e as 2 x 1 tile. Print the answer modulo 109+7. Example 1: Input: W = 3 Output: 3 Explanation: We need 3 tiles to...
[ { "code": null, "e": 491, "s": 238, "text": "Given a floor of dimensions 2 x W and tiles of dimensions 2 x 1, the task is to find the number of ways the floor can be tiled. A tile can either be placed horizontally i.e as a 1 x 2 tile or vertically i.e as 2 x 1 tile. Print the answer modulo 109+7." ...
Quorum Blockchain - GeeksforGeeks
11 May, 2022 Quorum is an “Enterprise-focused” Ethereum blockchain that tries to improve blockchain technology. Although the first generation Blockchain provides scalability, peer-to-peer networks, interoperability, transparency, and other features, it is still not perfect. Researchers around the world are working har...
[ { "code": null, "e": 26043, "s": 26015, "text": "\n11 May, 2022" }, { "code": null, "e": 26507, "s": 26043, "text": "Quorum is an “Enterprise-focused” Ethereum blockchain that tries to improve blockchain technology. Although the first generation Blockchain provides scalability, ...
Duplicates in an array in O(n) and by using O(1) extra space | Set-2 - GeeksforGeeks
02 Sep, 2021 Given an array of n elements containing elements from 0 to n-1, with any of these numbers appearing any number of times, find these repeating numbers in O(n) and using only constant memory space. Example: Input: n = 7 , array = {1, 2, 3, 1, 3, 6, 6} Output: 1, 3 and 6. Explanation: Duplicate element in the...
[ { "code": null, "e": 26577, "s": 26549, "text": "\n02 Sep, 2021" }, { "code": null, "e": 26773, "s": 26577, "text": "Given an array of n elements containing elements from 0 to n-1, with any of these numbers appearing any number of times, find these repeating numbers in O(n) and u...
Tricks for Advanced SQL Querying. One of the most valuable technical... | by Dan Wilmott | Towards Data Science
One of the most valuable technical skills I use working on a data science team in the retail space is SQL. Users of legacy relational database systems and hybrid/cloud data management solutions alike can use SQL to flexibly access business data and transform or display it in creative and innovative ways; see Resources ...
[ { "code": null, "e": 825, "s": 171, "text": "One of the most valuable technical skills I use working on a data science team in the retail space is SQL. Users of legacy relational database systems and hybrid/cloud data management solutions alike can use SQL to flexibly access business data and transf...
How to define a caption for a fieldset element in HTML5 ? - GeeksforGeeks
02 Jun, 2020 In this article, we define a caption for a fieldset element by using the legend element. It is used to define the title for the child contents. The legend elements are the parent element. Syntax: <legend> Content... </legend> Example: <!DOCTYPE html><html> <head> <title>Legend Tag</title> <style> ...
[ { "code": null, "e": 25204, "s": 25176, "text": "\n02 Jun, 2020" }, { "code": null, "e": 25392, "s": 25204, "text": "In this article, we define a caption for a fieldset element by using the legend element. It is used to define the title for the child contents. The legend elements...
Difference between Object level lock and Class level lock in Java
In multithreading environment, two or more threads can access the shared resources simultaneously which can lead the inconsistent behavior of the system. Java uses concept of locks to restrict concurrent access of shared resources or objects. Locks can be applied at two levels − Object Level Locks − It can be used when...
[ { "code": null, "e": 1342, "s": 1062, "text": "In multithreading environment, two or more threads can access the shared resources simultaneously which can lead the inconsistent behavior of the system. Java uses concept of locks to restrict concurrent access of shared resources or objects. Locks can ...
Python program to find all the Combinations in the list with the given condition - GeeksforGeeks
05 Sep, 2020 Given a list with some elements being a list of optional elements. The task is to find all the possible combinations from all options. Examples: Input : test_list = [“geekforgeeks”, [5, 4, 3], “is”, [“best”, “good”, “better”]], K = 3 Output : [[‘geekforgeeks’, 5, ‘is’, ‘best’], [‘geekforgeeks’, 4, ‘is’, ‘g...
[ { "code": null, "e": 24946, "s": 24918, "text": "\n05 Sep, 2020" }, { "code": null, "e": 25081, "s": 24946, "text": "Given a list with some elements being a list of optional elements. The task is to find all the possible combinations from all options." }, { "code": null, ...
Accolite Interview Experience | Off-Campus Internship 2020 - GeeksforGeeks
30 Sep, 2020 I sent my resume to the HR team for an off-campus internship at Accolite, and after 1 week I got a call from HR that my resume has been shortlisted, and they are skipping the online coding round in my case because of good coding profile to direct Technical round. Round 1 (Technical Interview 1Hr): Firstly ...
[ { "code": null, "e": 25368, "s": 25340, "text": "\n30 Sep, 2020" }, { "code": null, "e": 25632, "s": 25368, "text": "I sent my resume to the HR team for an off-campus internship at Accolite, and after 1 week I got a call from HR that my resume has been shortlisted, and they are s...
Bootstrap navbar-default class
The navbar-default class in Bootstrap is used to create a navigation bar. You can try to run the following code to implement a navbar-default class Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script sr...
[ { "code": null, "e": 1136, "s": 1062, "text": "The navbar-default class in Bootstrap is used to create a navigation bar." }, { "code": null, "e": 1210, "s": 1136, "text": "You can try to run the following code to implement a navbar-default class" }, { "code": null, "e...
LocalDate minusDays() method in Java with Examples
31 Oct, 2020 The minusDays() method of LocalDate class in Java is used to subtract the number of specified day from this LocalDate and return a copy of LocalDate.For example, 2019-01-01 minus one day would result in 2018-12-31. This instance is immutable and unaffected by this method call. Syntax: public LocalDate minu...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2020" }, { "code": null, "e": 306, "s": 28, "text": "The minusDays() method of LocalDate class in Java is used to subtract the number of specified day from this LocalDate and return a copy of LocalDate.For example, 2019-01-01 mi...
PrintWriter setError() method in Java with Examples
31 Jan, 2019 The setError() method of PrintWriter Class in Java is used to set the error state of this PrintWriter instance. This method is used as an indicator to indicate that an error has occurred in the stream. It is protected and hence needs to be implemented by deriving the PrintWriter class to use it. Syntax: pr...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jan, 2019" }, { "code": null, "e": 325, "s": 28, "text": "The setError() method of PrintWriter Class in Java is used to set the error state of this PrintWriter instance. This method is used as an indicator to indicate that an error h...
Sum of GCD of all numbers upto N with N itself
21 Apr, 2021 Given an integer N, the task is to find the sum of Greatest Common Divisors of all numbers up to N with N itself.Examples: Input: N = 12 Output: 40 Explanation: GCD of [1, 12] = 1, [2, 12] = 2, [3, 12] = 3, [4, 12] = 4, [5, 12] = 1, [6, 12] = 6, [7, 12] = 1, [8, 12] = 4, [9, 12] = 3, [10, 12] = 2, [11, 12]...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Apr, 2021" }, { "code": null, "e": 175, "s": 52, "text": "Given an integer N, the task is to find the sum of Greatest Common Divisors of all numbers up to N with N itself.Examples:" }, { "code": null, "e": 531, "s": ...
Median of all non-empty subset sums
21 Dec, 2021 Given an array, arr[] of size N, the task is to find the median of sums of all possible subsets of the given array. Examples: Input: arr = {2, 3, 3}Output: 5Explanation: Non-Empty Subsets of the given array are: { {2}, {3}, {3}, {2, 3}, {2, 3}, {3, 3}, {2, 3, 3} }. Possible sum of each subset are: { {2}, {...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Dec, 2021" }, { "code": null, "e": 144, "s": 28, "text": "Given an array, arr[] of size N, the task is to find the median of sums of all possible subsets of the given array." }, { "code": null, "e": 154, "s": 144, ...
Join an array of strings into a single string in Julia – join() Method
23 Feb, 2021 The join() is an inbuilt function in julia that is used to join an array of strings into a single string. The specified delimiter is used to insert in between the returned strings. Syntax: join([io::IO, ] strings, delim, last) Parameters: [io::IO, ] strings: Specified string. delim: Specified delimiter...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2021" }, { "code": null, "e": 210, "s": 28, "text": "The join() is an inbuilt function in julia that is used to join an array of strings into a single string. The specified delimiter is used to insert in between the returned str...
Python – Convert Matrix to dictionary
30 Dec, 2020 Given a Matrix, convert it into dictionary with keys as row number and value as nested list. Input : test_list = [[5, 6, 7], [8, 3, 2]]Output : {1: [5, 6, 7], 2: [8, 3, 2]}Explanation : Matrix rows are paired with row number in order. Input : test_list = [[5, 6, 7]]Output : {1: [5, 6, 7]}Explanation : Matr...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Dec, 2020" }, { "code": null, "e": 121, "s": 28, "text": "Given a Matrix, convert it into dictionary with keys as row number and value as nested list." }, { "code": null, "e": 263, "s": 121, "text": "Input : test_...
Python | Flatten a 2d numpy array into 1d array
15 Mar, 2019 Given a 2d numpy array, the task is to flatten a 2d numpy array into a 1d array. Below are a few methods to solve the task. Method #1 : Using np.flatten() # Python code to demonstrate# flattening a 2d numpy array# into 1d array import numpy as np ini_array1 = np.array([[1, 2, 3], [2, 4, 5], [1, 2, 3]]) ...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Mar, 2019" }, { "code": null, "e": 177, "s": 53, "text": "Given a 2d numpy array, the task is to flatten a 2d numpy array into a 1d array. Below are a few methods to solve the task." }, { "code": null, "e": 208, "s":...
Maximum element in a sorted and rotated array
27 May, 2022 Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.Examples: Input: arr[] = {3, 4, 5, 1, 2} Output: 5Input: arr[] = {1, 2, 3} Output: 3 Approach: A simple solution is to traverse the complete array and find maximum. Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 May, 2022" }, { "code": null, "e": 198, "s": 52, "text": "Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.Examples: " }, { "code": null, ...
Minimum characters required to make a password strong
19 Oct, 2020 Given string str denoting a password, the task is to count the minimum characters that need to be added to make the password strong. A password is said to be strong if it satisfies the following criteria: It contains at least 8 characters. It contains at least one digit. It contains at least one lower cas...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Oct, 2020" }, { "code": null, "e": 260, "s": 54, "text": "Given string str denoting a password, the task is to count the minimum characters that need to be added to make the password strong. A password is said to be strong if it sat...
HTTP headers | If-Modified-Since
15 May, 2020 The If-Modified-Since header is a request-header that is sent to a server as a conditional request. If the contents have changed, the server responds with a 200 status code and the entire requested document is updated. The If-Modified-Since HTTP header indicates the time for which a browser first downloade...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2020" }, { "code": null, "e": 611, "s": 28, "text": "The If-Modified-Since header is a request-header that is sent to a server as a conditional request. If the contents have changed, the server responds with a 200 status code an...
Program to Convert BCD number into Decimal number
14 May, 2021 Given a BCD (Binary Coded Decimal) number, the task is to convert the BCD number into its equivalent Decimal number. Examples: Input: BCD = 100000101000 Output: 828 Explanation: Dividing the number into chunks of 4, it becomes 1000 0010 1000. Here, 1000 is equivalent to 8 and 0010 is equivalent to 2. So...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 May, 2021" }, { "code": null, "e": 146, "s": 28, "text": "Given a BCD (Binary Coded Decimal) number, the task is to convert the BCD number into its equivalent Decimal number. " }, { "code": null, "e": 158, "s": 146, ...
How to use Google Colaboratory for Video Processing
12 Mar, 2019 Did you know that a set of computer algorithms can process a video stream in a way that allows them to detect criminal activity, control traffic jams, and even automatically detect events in sports broadcasts? Thanks to the application of machine learning (ML), the idea of acquiring so much data from a sim...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Mar, 2019" }, { "code": null, "e": 526, "s": 28, "text": "Did you know that a set of computer algorithms can process a video stream in a way that allows them to detect criminal activity, control traffic jams, and even automatically d...
Bootstrap | Navigation Bar
28 Apr, 2022 In this article, we will learn to create a Navigation Bar. A navigation bar is used in every website to make it more user-friendly so that the navigation through the website becomes easy and the user can directly search for the topic of their interest. Navbar: Bootstrap provide various types of the navigat...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Apr, 2022" }, { "code": null, "e": 281, "s": 28, "text": "In this article, we will learn to create a Navigation Bar. A navigation bar is used in every website to make it more user-friendly so that the navigation through the website b...
Trie Data Structure using smart pointer and OOP in C++
25 Oct, 2021 We will implement trie using smart pointers in C++ and OOP. Here, We have already discussed the implementation of trie data using recursionIn our implementation node of a trie look like : CPP class TrieNode{ public: // Use of shared_ptr for storing Children // Pointers of TrieNode shared_pt...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Oct, 2021" }, { "code": null, "e": 242, "s": 52, "text": "We will implement trie using smart pointers in C++ and OOP. Here, We have already discussed the implementation of trie data using recursionIn our implementation node of a tri...
Most Frequently Used Linux IPTables Rules with Examples
This article will help you to create IPtables rules that you can directly use for your daily or routine needs, These examples will act as basic templates for you to work on iptables with these rules which suit your specific requirement. Before you start building new IPtables set of rules, you should clean up all the de...
[ { "code": null, "e": 1424, "s": 1187, "text": "This article will help you to create IPtables rules that you can directly use for your daily or routine needs, These examples will act as basic templates for you to work on iptables with these rules which suit your specific requirement." }, { "c...
location element method – Selenium Python
07 Jul, 2021 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jul, 2021" }, { "code": null, "e": 736, "s": 28, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ...
The extends Keyword in Java
An object can acquire the properties and behaviour of another object using Inheritance. In Java, the extends keyword is used to indicate that a new class is derived from the base class using inheritance. So basically, extends keyword is used to extend the functionality of the class. A program that demonstrates the exte...
[ { "code": null, "e": 1471, "s": 1187, "text": "An object can acquire the properties and behaviour of another object using Inheritance. In Java, the extends keyword is used to indicate that a new class is derived from the base class using inheritance. So basically, extends keyword is used to extend t...
PostgreSQL – ADD COLUMN
28 Aug, 2020 PostgreSQL has an ADD COLUMN statement to add one or more columns to an existing database table. To add a new column to an existing table, you use the ALTER TABLE ADD COLUMN statement. Syntax: ALTER TABLE table_name ADD COLUMN new_column_name data_type; Let’s analyze the above syntax: First, specify the ta...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 213, "s": 28, "text": "PostgreSQL has an ADD COLUMN statement to add one or more columns to an existing database table. To add a new column to an existing table, you use the ALTER TABLE ADD COLUMN s...
Vernam Cipher in Cryptography
17 Jun, 2022 Vernam Cipher is a method of encrypting alphabetic text. It is one of the Substitution techniques for converting a plain text into a cipher text. In this mechanism we assign a number to each character of the Plain-Text, like (a = 0, b = 1, c = 2, ... z = 25). Method to take key: In Vernam cipher algorithm...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2022" }, { "code": null, "e": 315, "s": 54, "text": "Vernam Cipher is a method of encrypting alphabetic text. It is one of the Substitution techniques for converting a plain text into a cipher text. In this mechanism we assign ...
Python – Common keys in list and dictionary
14 Oct, 2020 Given a dictionary and list, extract all the keys and list which are common. Input : test_dict = {“Gfg”: 3, “is” : 5, “best” : 9, “for” : 0, “geeks” : 3}, test_list = [“Gfg”, “best”, “CS”]Output : [‘Gfg’, ‘best’]Explanation : Gfg and best are present in both dictionary and List. Input : test_dict = {“Gfg”:...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Oct, 2020" }, { "code": null, "e": 105, "s": 28, "text": "Given a dictionary and list, extract all the keys and list which are common." }, { "code": null, "e": 308, "s": 105, "text": "Input : test_dict = {“Gfg”: 3...
Find the missing number in a string of numbers with no separator
08 Jul, 2022 Given a string consisting of some numbers, not separated by any separator. The numbers are positive integers and the sequence increases by one at each number except the missing number. The task is to find the missing number. The numbers will have no more than six digits. Print -1 if the input sequence is n...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 370, "s": 52, "text": "Given a string consisting of some numbers, not separated by any separator. The numbers are positive integers and the sequence increases by one at each number except the missi...
Maximum profit after buying and selling stocks with transaction fees
31 Mar, 2022 Given an array of positive integers containing the price of stocks and transaction fee, the task is to find the maximum profit and the difference of days on which you are getting the maximum profit. Examples: Input: arr[] = {6, 1, 7, 2, 8, 4} transactionFee = 2 Output: 8 1 Input: arr[] = {7, 1, 5,...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Mar, 2022" }, { "code": null, "e": 265, "s": 54, "text": "Given an array of positive integers containing the price of stocks and transaction fee, the task is to find the maximum profit and the difference of days on which you are get...
Minimum and Maximum values of an expression with * and +
21 Jun, 2022 Given an expression which contains numbers and two operators ‘+’ and ‘*’, we need to find maximum and minimum value which can be obtained by evaluating this expression by different parenthesization. Examples: Input : expr = “1+2*3+4*5” Output : Minimum Value = 27, Maximum Value = 105 Explanation: Mini...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 263, "s": 52, "text": "Given an expression which contains numbers and two operators ‘+’ and ‘*’, we need to find maximum and minimum value which can be obtained by evaluating this expression by dif...
How to Create a Splash Screen in Android using Kotlin?
23 Oct, 2020 Android Splash Screen is the first screen visible to the user when the application’s launched. Splash Screen is the user’s first experience with the application that’s why it is considered to be one of the most vital screens in the application. It is used to display some information about the company logo,...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Oct, 2020" }, { "code": null, "e": 532, "s": 52, "text": "Android Splash Screen is the first screen visible to the user when the application’s launched. Splash Screen is the user’s first experience with the application that’s why it...
Why array index starts from zero ?
06 Oct, 2020 Prerequisite : Pointers in C/C++ THERE CAN BE MANY REASONS, BUT HERE ARE TWO REASONS: Reason 1 :Consider int arr[100]. The answer lies in the fact how the compiler interprets arr[i] ( 0<=i<100). arr[i] is interpreted as *(arr + i). Now, arr is the address of the array or address of 0th index element of th...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Oct, 2020" }, { "code": null, "e": 87, "s": 53, "text": "Prerequisite : Pointers in C/C++ " }, { "code": null, "e": 140, "s": 87, "text": "THERE CAN BE MANY REASONS, BUT HERE ARE TWO REASONS:" }, { "code"...
Cyclically rotate an array by one | Practice | GeeksforGeeks
Given an array, rotate the array by one position in clock-wise direction. Example 1: Input: N = 5 A[] = {1, 2, 3, 4, 5} Output: 5 1 2 3 4 Example 2: Input: N = 8 A[] = {9, 8, 7, 6, 4, 2, 1, 3} Output: 3 9 8 7 6 4 2 1 Your Task: You don't need to read input or print anything. Your task is to complete the functio...
[ { "code": null, "e": 314, "s": 238, "text": "Given an array, rotate the array by one position in clock-wise direction.\n " }, { "code": null, "e": 325, "s": 314, "text": "Example 1:" }, { "code": null, "e": 378, "s": 325, "text": "Input:\nN = 5\nA[] = {1, 2, 3...
Switch Statement in C/C++
12 Jun, 2022 Switch case statement evaluates a given expression and based on the evaluated value(matching a certain condition), it executes the statements associated with it. Basically, it is used to perform different actions based on different conditions(cases). Switch case statements follow a selection-control mecha...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Jun, 2022" }, { "code": null, "e": 304, "s": 52, "text": "Switch case statement evaluates a given expression and based on the evaluated value(matching a certain condition), it executes the statements associated with it. Basically, i...
Ruby | String each_line Method
12 Dec, 2019 each_line is a String class method in Ruby which is used to split the given string sing the supplied parameter as the record separator ($/ by default), passing each substring in turn to the supplied block. The string is split into paragraphs delimited by multiple successive newlines if a zero-length record...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Dec, 2019" }, { "code": null, "e": 359, "s": 28, "text": "each_line is a String class method in Ruby which is used to split the given string sing the supplied parameter as the record separator ($/ by default), passing each substring ...
Tug of War
14 Feb, 2022 Given a set of n integers, divide the set in two subsets of n/2 sizes each such that the difference of the sum of two subsets is as minimum as possible. If n is even, then sizes of two subsets must be strictly n/2 and if n is odd, then size of one subset must be (n-1)/2 and size of other subset must be (n+...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Feb, 2022" }, { "code": null, "e": 1532, "s": 52, "text": "Given a set of n integers, divide the set in two subsets of n/2 sizes each such that the difference of the sum of two subsets is as minimum as possible. If n is even, then s...
Golang – GOPATH and GOROOT
30 May, 2022 There is a set of programs to build and process Go source code. Instead of being run directly, programs in that set are usually invoked by the go program. GOPATH and GOROOT are environment variables that define a certain arrangement and organization for the Go source code. The paths of gopath and goroot ca...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 May, 2022" }, { "code": null, "e": 374, "s": 28, "text": "There is a set of programs to build and process Go source code. Instead of being run directly, programs in that set are usually invoked by the go program. GOPATH and GOROOT ar...
Sum of Manhattan distances between all pairs of points
20 Jun, 2022 Given n integer coordinates. The task is to find sum of manhattan distance between all pairs of coordinates. Manhattan Distance between two points (x1, y1) and (x2, y2) is: |x1 – x2| + |y1 – y2|Examples : Input : n = 4 point1 = { -1, 5 } point2 = { 1, 6 } point3 = { 3, 5 } ...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jun, 2022" }, { "code": null, "e": 260, "s": 54, "text": "Given n integer coordinates. The task is to find sum of manhattan distance between all pairs of coordinates. Manhattan Distance between two points (x1, y1) and (x2, y2) is: |...
Difference Between Group By and Order By in SQL
In this post, we will understand the difference between group by and order by in SQL. It is used to group the rows which have the same value. It is used to group the rows which have the same value. It can be used in CREATE VIEW statement. It can be used in CREATE VIEW statement. In select statement, it has to be used b...
[ { "code": null, "e": 1273, "s": 1187, "text": "In this post, we will understand the difference between group by and order by in SQL." }, { "code": null, "e": 1329, "s": 1273, "text": "It is used to group the rows which have the same value." }, { "code": null, "e": 138...
std::is_sorted in C++
31 Aug, 2021 The C++ function std :: is_sorted checks if the elements in range [first, last] are sorted in ascending order. Elements are compared using < operator. There are two variants of std::is_sorted: Without using Binary predicate Without using Binary predicate bool is_sorted( ForwardIt first, ForwardIt las...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Aug, 2021" }, { "code": null, "e": 249, "s": 54, "text": "The C++ function std :: is_sorted checks if the elements in range [first, last] are sorted in ascending order. Elements are compared using < operator. There are two variants ...
PostgreSQL – INSERT
28 Aug, 2020 In PostgreSQL, the INSERT statement is used to add new rows to a database table. As one creates a new database, it has no data initially. PostgreSQL provides the INSERT statement to insert data into the database. Syntax: INSERT INTO table(column1, column2, ...) VALUES (value1, value2, ...); The below r...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 241, "s": 28, "text": "In PostgreSQL, the INSERT statement is used to add new rows to a database table. As one creates a new database, it has no data initially. PostgreSQL provides the INSERT statem...
Difference between Compile Time Errors and Runtime Errors
07 Sep, 2021 Compile-Time Errors: Errors that occur when you violate the rules of writing syntax are known as Compile-Time errors. This compiler error indicates something that must be fixed before the code can be compiled. All these errors are detected by the compiler and thus are known as compile-time errors. Most fre...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Sep, 2021" }, { "code": null, "e": 393, "s": 53, "text": "Compile-Time Errors: Errors that occur when you violate the rules of writing syntax are known as Compile-Time errors. This compiler error indicates something that must be fix...
Spring Dependency Injection with Example
21 Jun, 2021 What is Dependency Injection: Dependency Injection is the main functionality provided by Spring IOC(Inversion of Control). The Spring-Core module is responsible for injecting dependencies through either Constructor or Setter methods. The design principle of Inversion of Control emphasizes keeping the Java ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2021" }, { "code": null, "e": 1489, "s": 52, "text": "What is Dependency Injection: Dependency Injection is the main functionality provided by Spring IOC(Inversion of Control). The Spring-Core module is responsible for injectin...
Double-Tap on a Button in Android
23 Feb, 2021 Detecting a double tap on Button i.e. whenever the user double taps on any Button how it is detected and according to the Button a response can be added corresponding to it. Here an example is shown in which the double tap on the Button is detected and corresponding to it response is added in the form of t...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2021" }, { "code": null, "e": 341, "s": 28, "text": "Detecting a double tap on Button i.e. whenever the user double taps on any Button how it is detected and according to the Button a response can be added corresponding to it. H...
p5.js | angleMode() Function
31 May, 2020 The angleMode() function in p5.js is used to set the mode in which the angle is interpreted. It can be set to either degrees or radians. All the functions that use an angle as a parameter would follow the angle mode set by this function. Syntax: angleMode( mode ) Parameters: This function accept a single ...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 May, 2020" }, { "code": null, "e": 266, "s": 28, "text": "The angleMode() function in p5.js is used to set the mode in which the angle is interpreted. It can be set to either degrees or radians. All the functions that use an angle as...
Find the total Number of Digits in (N!)N
30 Apr, 2021 Given a number N. The task is to find the total Number of Digits in .Examples: Input: N = 3 Output: 3 If N=3, (3!)3=216, So the count of digits is 3 Input: N = 4 Output: 6 Approach: As we know, log(a*b) = log(a) + log(b) Consider, X = log(N!) = log(1*2*3....... * N) = log(1)+log(2)+.....
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2021" }, { "code": null, "e": 109, "s": 28, "text": "Given a number N. The task is to find the total Number of Digits in .Examples: " }, { "code": null, "e": 204, "s": 109, "text": "Input: N = 3\nOutput: 3\n...
Sorting an array according to another array using pair in STL
24 Apr, 2018 We are given two arrays. We need to sort one array according to another. Examples: Input : 2 1 5 4 9 3 6 7 10 8 A B C D E F G H I J Output : 1 2 3 4 5 6 7 8 9 10 B A F D C G H J E I Here we are sorting second array (a character array) according to the first array (an integer array). W...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Apr, 2018" }, { "code": null, "e": 125, "s": 52, "text": "We are given two arrays. We need to sort one array according to another." }, { "code": null, "e": 135, "s": 125, "text": "Examples:" }, { "code": ...
Update column value of CSV in Python
03 Jan, 2021 Prerequisites: Pandas In this article, we will discuss ways in which the value(s) of a column can be updated. The best and the optimal way to update any column value of a CSV is to use the Pandas Library and the DataFrame functions. Link for the CSV file in use – Click here Approach Import module Open CSV ...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jan, 2021" }, { "code": null, "e": 74, "s": 52, "text": "Prerequisites: Pandas" }, { "code": null, "e": 285, "s": 74, "text": "In this article, we will discuss ways in which the value(s) of a column can be update...
HTML - <link> Tag
The HTML <link> tag is used for defining a link to an external document. It is placed in the <head> section of the document. <!DOCTYPE html> <html> <head> <title>HTML link Tag</title> <link rel = "stylesheet" href = "stylenew.css"> </head> <body> <div id = "contentinfo"> <p>Welcome...
[ { "code": null, "e": 2633, "s": 2508, "text": "The HTML <link> tag is used for defining a link to an external document. It is placed in the <head> section of the document." }, { "code": null, "e": 2924, "s": 2633, "text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML l...
Get current Geolocation of user using React-Geolocated
15 Dec, 2021 In some situations, applications need to access the current location properties of the user. Location properties include latitude, longitude, and some more about the current location of the user. From the Location properties, the user can know the current geolocation of the user. The app can provide specif...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Dec, 2021" }, { "code": null, "e": 309, "s": 28, "text": "In some situations, applications need to access the current location properties of the user. Location properties include latitude, longitude, and some more about the current l...
How to find last index of a number in an Array in C++
07 Oct, 2021 Given an array arr[] of N integers and the number K, the task is to find the last occurrence of K in arr[]. If the element is not present then return -1.Examples: Input: arr[] = {1, 3, 4, 2, 1, 8}, K = 1 Output: 4 Explanation: There are two occurrence of 1 at index 0 and 4. But the last occurrence is at i...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Oct, 2021" }, { "code": null, "e": 217, "s": 53, "text": "Given an array arr[] of N integers and the number K, the task is to find the last occurrence of K in arr[]. If the element is not present then return -1.Examples: " }, { ...
HTML | Subscript and Superscript Tags
17 Mar, 2022 Subscript: The <sub> tag is used to add a subscript text to the HTML document. The <sub> tag defines the subscript text. Subscript text appears half a character below the normal line and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O to be written as H2O...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2022" }, { "code": null, "e": 651, "s": 52, "text": "Subscript: The <sub> tag is used to add a subscript text to the HTML document. The <sub> tag defines the subscript text. Subscript text appears half a character below the nor...