title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Developing Trust in Machine Learning Models Predictions | by Renu Khandelwal | Towards Data Science | What if I tell you to invest $100,000 in a particular stock today as my machine learning model is predicting a high return. The question you will ask me will be to explain the basis of my prediction, as this is a big decision for you. You do not want to gamble but would like to make informed decisions based on data.
To... | [
{
"code": null,
"e": 490,
"s": 172,
"text": "What if I tell you to invest $100,000 in a particular stock today as my machine learning model is predicting a high return. The question you will ask me will be to explain the basis of my prediction, as this is a big decision for you. You do not want to g... |
H2O - AutoML | To use AutoML, start a new Jupyter notebook and follow the steps shown below.
First import H2O and AutoML package into the project using the following two statements −
import h2o
from h2o.automl import H2OAutoML
Initialize h2o using the following statement −
h2o.init()
You should see the cluster information on the sc... | [
{
"code": null,
"e": 1730,
"s": 1652,
"text": "To use AutoML, start a new Jupyter notebook and follow the steps shown below."
},
{
"code": null,
"e": 1820,
"s": 1730,
"text": "First import H2O and AutoML package into the project using the following two statements −"
},
{
... |
How to convert JSON data into a Python tuple? | You can first convert the json to a dict using json.loads and then convert it to a python tuple using dict.items(). You can parse JSON files using the json module in Python. This module parses the json and puts it in a dict. You can then get the values from this like a normal dict. For example, if you have a json with ... | [
{
"code": null,
"e": 1406,
"s": 1062,
"text": "You can first convert the json to a dict using json.loads and then convert it to a python tuple using dict.items(). You can parse JSON files using the json module in Python. This module parses the json and puts it in a dict. You can then get the values ... |
Array Index Out Of Bounds Exception in Java - GeeksforGeeks | 27 Sep, 2021
Java supports the creation and manipulation of arrays as a data structure. The index of an array is an integer value that has value in the interval [0, n-1], where n is the size of the array. If a request for a negative or an index greater than or equal to the size of the array is made, then the JAVA throw... | [
{
"code": null,
"e": 24082,
"s": 24054,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 24492,
"s": 24082,
"text": "Java supports the creation and manipulation of arrays as a data structure. The index of an array is an integer value that has value in the interval [0, n-1], where... |
Pattern Jumping | Practice | GeeksforGeeks | A frog starts at the point 0. In his first turn, he can make a jump of 1 unit. Now for all consequent turns, if the frog is currently at a distance x (from the start), his jump will take him x units forward. Given a leaf at a distance N, you have to find if the frog can reach that leaf or not.
Example 1:
Input:
N = 3... | [
{
"code": null,
"e": 521,
"s": 226,
"text": "A frog starts at the point 0. In his first turn, he can make a jump of 1 unit. Now for all consequent turns, if the frog is currently at a distance x (from the start), his jump will take him x units forward. Given a leaf at a distance N, you have to find ... |
Iterate Over Vector Elements in Java | 26 May, 2021
Vector is like the dynamic array which can grow or shrink its size. Unlike array, we can store n-number of elements in it as there is no size limit.
We can iterate over vector by the following ways:
Simple for-loop
Enhanced for-loop
Iterators
Enumeration interface
Method 1: Simple for-loop
The idea is to r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "Vector is like the dynamic array which can grow or shrink its size. Unlike array, we can store n-number of elements in it as there is no size limit."
},
{
"code": null... |
readlink command in Linux with Examples | 10 Apr, 2019
readlink command in Linux is used to print resolved symbolic links or canonical file names. In simple words whenever we have a symbolic link and we want to know what path it represents. Then, in that case, the readlink command comes into play to show the actual path of the symbolic link.
Syntax:
readlink [... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2019"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "readlink command in Linux is used to print resolved symbolic links or canonical file names. In simple words whenever we have a symbolic link and we want to know what path it r... |
Python | Pandas dataframe.keys() | 19 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.keys() function returns the ‘info axis’ for the pandas object. If the pandas... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 267,
"s": 53,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
How to create RGB color generator using HTML CSS and JavaScript ? | 29 Jan, 2021
In this article, we will create a RGB color generator using HTML, CSS, and JavaScript. Using RGB color generator, we can construct all the colors from the combination of Red, Green, Blue colors. Each color is represented by the range of decimal numbers from 0 to 255 (256 levels for each color). So, the tot... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2021"
},
{
"code": null,
"e": 416,
"s": 28,
"text": "In this article, we will create a RGB color generator using HTML, CSS, and JavaScript. Using RGB color generator, we can construct all the colors from the combination of Red, ... |
Python Program for Find the perimeter of a cylinder | 06 Feb, 2018
Given diameter and height, find the perimeter of a cylinder.
Perimeter is the length of the outline of a two – dimensional shape. A cylinder is a three – dimensional shape. So, technically we cannot find the perimeter of a cylinder but we can find the perimeter of the cross-section of the cylinder. This ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Feb, 2018"
},
{
"code": null,
"e": 89,
"s": 28,
"text": "Given diameter and height, find the perimeter of a cylinder."
},
{
"code": null,
"e": 476,
"s": 89,
"text": "Perimeter is the length of the outline of a two... |
PHPUnit | assertArrayHasKey() function | 19 Jul, 2019
The assertArrayHasKey() function is a builtin function in PHPUnit and is used to assert an array having a particular key or not.This assertion will return true in the case if the array has the provided key else return false and in case of true the asserted test case got passed else test case got failed.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "The assertArrayHasKey() function is a builtin function in PHPUnit and is used to assert an array having a particular key or not.This assertion will return true in the case if ... |
How to use PostgreSQL Database in Django? | 15 Jul, 2021
This article revolves around how can you change your default Django SQLite-server to postgresSQL. PostgreSQL and SQLite are the most widely used RDBMS relational database management systems. They are both open-source and free. There are some major differences that you should be consider when you are choos... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 397,
"s": 52,
"text": "This article revolves around how can you change your default Django SQLite-server to postgresSQL. PostgreSQL and SQLite are the most widely used RDBMS relational database man... |
Connect your android phone camera to OpenCV – Python | 17 Feb, 2021
Prerequisites: OpenCV
OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human.
Many... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 74,
"s": 52,
"text": "Prerequisites: OpenCV"
},
{
"code": null,
"e": 355,
"s": 74,
"text": "OpenCV is a huge open-source library for computer vision, machine learning, and image... |
Find Excel column name from a given column number | 23 Jun, 2022
MS Excel columns have a pattern like A, B, C, ..., Z, AA, AB, AC, ...., AZ, BA, BB, ... ZZ, AAA, AAB ..... etc. In other words, column 1 is named “A”, column 2 as “B”, and column 27 as “AA”.Given a column number, find its corresponding Excel column name. The following are more examples.
Input Outp... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 342,
"s": 54,
"text": "MS Excel columns have a pattern like A, B, C, ..., Z, AA, AB, AC, ...., AZ, BA, BB, ... ZZ, AAA, AAB ..... etc. In other words, column 1 is named “A”, column 2 as “B”, and co... |
Python – Lambda Function to Check if value is in a List | 04 Jan, 2022
Given a list, the task is to write a Python program to check if the value exists in the list or not using the lambda function.
Example:
Input : L = [1, 2, 3, 4, 5]
element = 4
Output : Element is Present in the list
Input : L = [1, 2, 3, 4, 5]
element = 8
Output : Element is NOT ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Given a list, the task is to write a Python program to check if the value exists in the list or not using the lambda function."
},
{
"code": null,
"e": 164,
"s... |
Tarjan’s Algorithm to find Strongly Connected Components | 23 Jun, 2022
A directed graph is strongly connected if there is a path between all pairs of vertices. A strongly connected component (SCC) of a directed graph is a maximal strongly connected subgraph. For example, there are 3 SCCs in the following graph.
We have discussed Kosaraju’s algorithm for strongly connected com... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 294,
"s": 52,
"text": "A directed graph is strongly connected if there is a path between all pairs of vertices. A strongly connected component (SCC) of a directed graph is a maximal strongly connec... |
Foreground-Background Scheduling | 01 Apr, 2021
The scheduling is basically divided into 2 categories First is Clock-Driven Scheduling and one is Event-driven scheduling. The Clock-Driven scheduling algorithms are those algorithms in which interrupts that are received by a clock helps to determine the scheduling point and these are FCFS, Round Robin, et... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 588,
"s": 28,
"text": "The scheduling is basically divided into 2 categories First is Clock-Driven Scheduling and one is Event-driven scheduling. The Clock-Driven scheduling algorithms are those alg... |
Sort an array of objects by multiple properties in JavaScript | Suppose, we have an array of objects like this −
const arr = [
{ id: 1, score: 1, isCut: false, dnf: false },
{ id: 2, score: 2, isCut: false, dnf: false },
{ id: 3, score: 3, isCut: false, dnf: false },
{ id: 4, score: 4, isCut: false, dnf: false },
{ id: 5, score: 5, isCut: true, dnf: true },
{ id: ... | [
{
"code": null,
"e": 1236,
"s": 1187,
"text": "Suppose, we have an array of objects like this −"
},
{
"code": null,
"e": 2057,
"s": 1236,
"text": "const arr = [\n { id: 1, score: 1, isCut: false, dnf: false },\n { id: 2, score: 2, isCut: false, dnf: false },\n { id: 3, scor... |
How to make image maps in HTML5 ? | 26 Sep, 2021
The HTML <map> tag is used to define image maps in HTML. The areas inside the image which are clickable are defined by using the <area> tag.
Syntax:
<map name="map-name">
Attribute value:
name: It is used to associate the map with the image in which it is used.
Note: The name attribute in the map must have... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 169,
"s": 28,
"text": "The HTML <map> tag is used to define image maps in HTML. The areas inside the image which are clickable are defined by using the <area> tag."
},
{
"code": null,
"e... |
K'th Smallest/Largest Element in Unsorted Array | Set 1 - GeeksforGeeks | 08 Apr, 2022
Given an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest element in the given array. It is given that all array elements are distinct.
Examples:
Input: arr[] = {7, 10, 4, 3, 20, 15} k = 3 Output: 7
Input: arr[] = {7, 10, 4, 3, 20, 15} k = 4 Output: 1... | [
{
"code": null,
"e": 24561,
"s": 24530,
"text": " \n08 Apr, 2022\n"
},
{
"code": null,
"e": 24750,
"s": 24561,
"text": "Given an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest element in the given array. It is given that all ... |
Correlation Chart in Excel - GeeksforGeeks | 23 Jun, 2021
Correlation basically means a mutual connection between two or more sets of data. In statistics bivariate data or two random variables are used to find the correlation between them. Correlation coefficient is generally the measurement of correlation between the bivariate data which basically denotes how mu... | [
{
"code": null,
"e": 24990,
"s": 24962,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 25353,
"s": 24990,
"text": "Correlation basically means a mutual connection between two or more sets of data. In statistics bivariate data or two random variables are used to find the correla... |
Alternate Odd and Even Nodes in a Singly Linked List in C++ | A single linked list is a linear data structure that contains two parts − one data and other pointers to the next element in the list.
An alternate odd and even singly linked list is a linked list that has one node with even data and the other node with odd data members.
In this problem, we have to rearrange the elemen... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "A single linked list is a linear data structure that contains two parts − one data and other pointers to the next element in the list."
},
{
"code": null,
"e": 1334,
"s": 1197,
"text": "An alternate odd and even singly linked list is... |
Introduction to Basic Excel R Toolkit (BERT) | by Abhinav Malasi | Towards Data Science | Excel has been the go-to data analytics tool for businesses for the last three decades. Excel provides built-in tools to conduct statistical analysis, creating budgets, forecasting, dashboards, data plotting, etc. And then there are add-ins to fill in the analytical gap or improve performance.
For me, Excel had been a ... | [
{
"code": null,
"e": 467,
"s": 172,
"text": "Excel has been the go-to data analytics tool for businesses for the last three decades. Excel provides built-in tools to conduct statistical analysis, creating budgets, forecasting, dashboards, data plotting, etc. And then there are add-ins to fill in the... |
Stop Using Mean to Fill Missing Data | by Dario Radečić | Towards Data Science | Mean imputation was the first ‘advanced’ (sighs) method of dealing with missing data I’ve used. In a way, it is a huge step from filling missing values with 0 or a constant, -999 for example (please don’t do that).
However, it still isn’t an optimal method, and today's post will show you why.
For this article, I’ve cho... | [
{
"code": null,
"e": 387,
"s": 172,
"text": "Mean imputation was the first ‘advanced’ (sighs) method of dealing with missing data I’ve used. In a way, it is a huge step from filling missing values with 0 or a constant, -999 for example (please don’t do that)."
},
{
"code": null,
"e": 466... |
How to return none from Python function? | Functions without a return statement known as void functions return None from the function. To return a value other than None, you need to use a return statement in the functions; and such functions are called fruitful functions.
Values like None, True and False are not strings: they are special values and keywords in ... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "Functions without a return statement known as void functions return None from the function. To return a value other than None, you need to use a return statement in the functions; and such functions are called fruitful functions."
},
{
"code": n... |
Deep Learning Frameworks for Parallel and Distributed Infrastructures | by Jordi TORRES.AI | Towards Data Science | [This post will be used in the master course Supercomputers Architecture at UPC Barcelona Tech with the support of the BSC]
“Methods that scale with computation are the future of Artificial Intelligence” — Rich Sutton, father of reinforcement learning (video 4:49)
This third post of this series will explore some fundam... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "[This post will be used in the master course Supercomputers Architecture at UPC Barcelona Tech with the support of the BSC]"
},
{
"code": null,
"e": 437,
"s": 296,
"text": "“Methods that scale with computation are the future of Artific... |
Trying to round a calculation to two decimal places in a new column with MySQL? | To round, use MySQL ROUND() function. Let us first create a table −
mysql> create table DemoTable1865
(
Value1 int,
Value2 int
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1865 values(40,60);
Query OK, 1 row affected (0.0... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To round, use MySQL ROUND() function. Let us first create a table −"
},
{
"code": null,
"e": 1249,
"s": 1130,
"text": "mysql> create table DemoTable1865\n (\n Value1 int,\n Value2 int\n );\nQuery OK, 0 rows affected (... |
Checking schema creation in SAP HANA database | To check this detail, you should have access on “SYS” schema. Run the following SQL query and it will fetch the following columns −
SELECT * FROM "SYS"."SCHEMAS";
Schema_Name
Schema_Owner
HAS_PRIVILEGES
Create_Time | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "To check this detail, you should have access on “SYS” schema. Run the following SQL query and it will fetch the following columns −"
},
{
"code": null,
"e": 1225,
"s": 1194,
"text": "SELECT * FROM \"SYS\".\"SCHEMAS\";"
},
{
"... |
C library function - fflush() | The C library function int fflush(FILE *stream) flushes the output buffer of a stream.
Following is the declaration for fflush() function.
int fflush(FILE *stream)
stream − This is the pointer to a FILE object that specifies a buffered stream.
stream − This is the pointer to a FILE object that specifies a buffered stre... | [
{
"code": null,
"e": 2094,
"s": 2007,
"text": "The C library function int fflush(FILE *stream) flushes the output buffer of a stream."
},
{
"code": null,
"e": 2146,
"s": 2094,
"text": "Following is the declaration for fflush() function."
},
{
"code": null,
"e": 2171,
... |
How to append a list as a row to a Pandas DataFrame in Python? | 05 Oct, 2021
Prerequisite: Pandas DataFrame
In this article, We are going to see how to append a list as a row to a pandas dataframe in Python. It can be done in three ways:
Using loc[]
Using iloc[]
Using append()
Pandas DataFrame.loc attribute access a group of rows and columns by label(s) or a boolean array in the gi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 59,
"s": 28,
"text": "Prerequisite: Pandas DataFrame"
},
{
"code": null,
"e": 189,
"s": 59,
"text": "In this article, We are going to see how to append a list as a row to a panda... |
Python program maximum of three | 01 Aug, 2020
Given three number a b and c, the task is that we have to find the greatest element in among in given numberExamples:
Input : a = 2, b = 4, c = 3
Output : 4
Input : a = 4, b = 2, c = 6
Output : 6
Method 1 (Simple)
# Python program to find the largest# number among the three numbers def maximum(a, b, c... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 171,
"s": 53,
"text": "Given three number a b and c, the task is that we have to find the greatest element in among in given numberExamples:"
},
{
"code": null,
"e": 253,
"s": 171,
... |
Input Output Redirection in Linux | 06 Jan, 2022
The work of any command is either taking input or gives an output or both. So, Linux has some command or special character to redirect these input and output functionalities. For example: suppose we want to run a command called “date” if we run it will print the output to the current terminal screen. But o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 606,
"s": 52,
"text": "The work of any command is either taking input or gives an output or both. So, Linux has some command or special character to redirect these input and output functionalities.... |
Python | Split nested list into two lists | 10 Apr, 2019
Given a nested 2D list, the task is to split the nested list into two lists such that first list contains first elements of each sublists and second list contains second element of each sublists.
Method #1: Using map, zip()
# Python code to demonstrate# splitting nested list# into 2 lists # initialising n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2019"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Given a nested 2D list, the task is to split the nested list into two lists such that first list contains first elements of each sublists and second list contains second eleme... |
How to Create a Dockerfile in Node.js ? | 01 Dec, 2021
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. It is something like a shellscript that gathers multiple commands into a single document to fulfill a single task.
Prerequisite: Before you can Dockerize any application, you need to i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 266,
"s": 28,
"text": "A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. It is something like a shellscript that gathers mult... |
jQuery | val() with Examples | 07 Jan, 2022
The val() method is an inbuilt method in jQuery which is used to returns or set the value of attribute for the selected elements. This method apply on the HTML form elements.Syntax: There are three ways to use this method which are given below:
$(selector).val()
Parameters: This method does not accepts a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "The val() method is an inbuilt method in jQuery which is used to returns or set the value of attribute for the selected elements. This method apply on the HTML form elements.S... |
Flask â Redirect & Errors | Flask class has a redirect() function. When called, it returns a response object and redirects the user to another target location with specified status code.
Prototype of redirect() function is as below −
Flask.redirect(location, statuscode, response)
In the above function −
location parameter is the URL where respon... | [
{
"code": null,
"e": 2326,
"s": 2167,
"text": "Flask class has a redirect() function. When called, it returns a response object and redirects the user to another target location with specified status code."
},
{
"code": null,
"e": 2373,
"s": 2326,
"text": "Prototype of redirect()... |
Filter Pandas DataFrame by Time | 24 Feb, 2021
In this article let’s see how to filter pandas data frame by date. So we can filter python pandas data frame by date using the logical operator and loc() method. In the below examples we have a data frame that contains two columns the first column is Name and another one is DOB.
Example 1: filter data that... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 308,
"s": 28,
"text": "In this article let’s see how to filter pandas data frame by date. So we can filter python pandas data frame by date using the logical operator and loc() method. In the below ... |
numpy.maximum() in Python | 28 Nov, 2018
numpy.maximum() function is used to find the element-wise maximum of array elements.
It compares two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned.
Syntax... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 113,
"s": 28,
"text": "numpy.maximum() function is used to find the element-wise maximum of array elements."
},
{
"code": null,
"e": 329,
"s": 113,
"text": "It compares two array... |
MS SQL Server - Select Database | Select your database based on your action before going ahead with any of the following methods.
To run a query to select backup history on database called ‘msdb’, select the msdb database as shown in the following snapshot.
Use <your database name>
To run your query to select backup history on database called ‘msdb’, ... | [
{
"code": null,
"e": 2331,
"s": 2235,
"text": "Select your database based on your action before going ahead with any of the following methods."
},
{
"code": null,
"e": 2459,
"s": 2331,
"text": "To run a query to select backup history on database called ‘msdb’, select the msdb dat... |
Flutter - Working with Charts - GeeksforGeeks | 15 Feb, 2021
The syncfusion_flutter_charts library in Flutter is used to handle charts. Charts can be very useful while depicting data in visual form. These packages come with a wide range of beautiful and high-performance charts. It comes with various Cartesian or circular charts with smooth interaction and beautiful ... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 24378,
"s": 24010,
"text": "The syncfusion_flutter_charts library in Flutter is used to handle charts. Charts can be very useful while depicting data in visual form. These packages come with ... |
C++ nested switch statements | It is possible to have a switch as part of the statement sequence of an outer switch. Even if the case constants of the inner and outer switch contain common values, no conflicts will arise.
C++ specifies that at least 256 levels of nesting be allowed for switch statements.
The syntax for a nested switch statement is ... | [
{
"code": null,
"e": 2509,
"s": 2318,
"text": "It is possible to have a switch as part of the statement sequence of an outer switch. Even if the case constants of the inner and outer switch contain common values, no conflicts will arise."
},
{
"code": null,
"e": 2593,
"s": 2509,
... |
Python | Pandas Series.rename() - GeeksforGeeks | 14 Oct, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.rename() function is used to alter S... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n14 Oct, 2019"
},
{
"code": null,
"e": 25904,
"s": 25647,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label... |
JSP - XML Data | When you send the XML data via HTTP, it makes sense to use JSP to handle incoming and outgoing XML documents; for example, RSS documents. As an XML document is merely a bunch of text, creating one through a JSP is much easier than creating an HTML document.
You can send the XML content using JSPs the same way you send ... | [
{
"code": null,
"e": 2497,
"s": 2239,
"text": "When you send the XML data via HTTP, it makes sense to use JSP to handle incoming and outgoing XML documents; for example, RSS documents. As an XML document is merely a bunch of text, creating one through a JSP is much easier than creating an HTML docum... |
Decision Boundary Visualization(A-Z) | by Navoneel Chakrabarty | Towards Data Science | Classification problems have been very common and essential in the field of Data Science. For example: Diabetic Retinopathy, Mood or Sentiment Analysis, Digit Recognition, Cancer-Type prediction (Malignant or Benign) etc. These problems are often solved by Machine Learning or Deep Learning. Also in Computer Vision, pro... | [
{
"code": null,
"e": 784,
"s": 172,
"text": "Classification problems have been very common and essential in the field of Data Science. For example: Diabetic Retinopathy, Mood or Sentiment Analysis, Digit Recognition, Cancer-Type prediction (Malignant or Benign) etc. These problems are often solved b... |
Count of elements matching particular condition in Python | In this article we will see how to get some selected elements out of a Python list. So we need to design some condition and only the elements satisfying that condition should be picked and their count to be printed.
In this approach we use in condition to pick the elements and use some to get their count. 1 is used if ... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "In this article we will see how to get some selected elements out of a Python list. So we need to design some condition and only the elements satisfying that condition should be picked and their count to be printed."
},
{
"code": null,
"e": ... |
HTML DOM appendChild() Method - GeeksforGeeks | 15 Nov, 2021
In this article, we will learn about the appendChild() method in HTML DOM in Javascript, along with will understand its implementation through the examples.
The appendChild() method of the node interface, is used to create a text node as the last child of the node. This method is also used to move an eleme... | [
{
"code": null,
"e": 23847,
"s": 23819,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 24004,
"s": 23847,
"text": "In this article, we will learn about the appendChild() method in HTML DOM in Javascript, along with will understand its implementation through the examples."
},
... |
How to convert NaN values to NA in an R data frame? | To convert NaN values to NA, we would need to detect the NaN values in the data frame and the set them to NA. For example, if we have a data frame called df that contains a column x which has some NaN values then we can convert those NaN to NA by using the command dfx[is.nan(dfx)]<-NA
Consider the below data frame −
Li... | [
{
"code": null,
"e": 1348,
"s": 1062,
"text": "To convert NaN values to NA, we would need to detect the NaN values in the data frame and the set them to NA. For example, if we have a data frame called df that contains a column x which has some NaN values then we can convert those NaN to NA by using ... |
Computer Organization | Booth's Algorithm - GeeksforGeeks | 01 Sep, 2020
Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation in efficient way, i.e., less number of additions/subtractions required. It operates on the fact that strings of 0’s in the multiplier require no addition but just shifting and a string of 1’s in the mu... | [
{
"code": null,
"e": 26912,
"s": 26884,
"text": "\n01 Sep, 2020"
},
{
"code": null,
"e": 27297,
"s": 26912,
"text": "Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation in efficient way, i.e., less number of additions/subtract... |
What is the Lexical Analysis? | Lexical Analysis is the first step of the compiler which reads the source code one character at a time and transforms it into an array of tokens.
Token − The token is a meaningful collection of characters in a program. These tokens can be keywords including do, if, while etc. and identifiers including x, num, count, et... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "Lexical Analysis is the first step of the compiler which reads the source code one character at a time and transforms it into an array of tokens."
},
{
"code": null,
"e": 1588,
"s": 1208,
"text": "Token − The token is a meaningful co... |
How to get all table names from a database using JDBC? | You can get the list of tables in the current database in MySQL using the SHOW TABLES query.
Show tables;
Following JDBC program retrieves the list of tables in the database by executing the show tables query.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statemen... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "You can get the list of tables in the current database in MySQL using the SHOW TABLES query."
},
{
"code": null,
"e": 1168,
"s": 1155,
"text": "Show tables;"
},
{
"code": null,
"e": 1272,
"s": 1168,
"text": "Follo... |
Angular Material 7 - Environment Setup | This tutorial will guide you on how to prepare a development environment to start your work with Angular Framework and Angular Material. In this chapter, we will discuss the Environment Setup required for Angular 6. To install Angular 6, we require the following −
Nodejs
Npm
Angular CLI
IDE for writing your code
Nodejs... | [
{
"code": null,
"e": 3020,
"s": 2755,
"text": "This tutorial will guide you on how to prepare a development environment to start your work with Angular Framework and Angular Material. In this chapter, we will discuss the Environment Setup required for Angular 6. To install Angular 6, we require the ... |
Awesome R Markdown Word report with programmatically inserted headings, outputs and cross-references | Towards Data Science | By Thomas de Marchin (Senior Manager Statistics and Data Sciences at Pharmalex) and Milana Filatenkova (Manager Statistics and Data Sciences at Pharmalex)
What is R: R language is widely used among statisticians and data miners for developing data analysis software.
What is R Markdown : R Markdown is a tool designed to... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "By Thomas de Marchin (Senior Manager Statistics and Data Sciences at Pharmalex) and Milana Filatenkova (Manager Statistics and Data Sciences at Pharmalex)"
},
{
"code": null,
"e": 439,
"s": 327,
"text": "What is R: R language is widely... |
Reverse a Number in PL/SQL | PL/SQL is a block-structured language that combines SQL's functionality with procedural commands. In this article, we will discuss a program in PL/SQL to reverse a given number for example −
Input : 98765
Output : 56789
Explanation : reverse number of 98765 is 56789.
Input : 56784
Output : 48765
Explanation Reverse nu... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "PL/SQL is a block-structured language that combines SQL's functionality with procedural commands. In this article, we will discuss a program in PL/SQL to reverse a given number for example −"
},
{
"code": null,
"e": 1410,
"s": 1253,
... |
List.replaceAll(UnaryOperator<E> operator) method in Java | The replaceAll() method of the List interface accept an object of the UnaryOperator representing a particular operation, performs the specified operation on all the elements of the current list and replaces the existing values in the list with their respective results.
Live Demo
import java.util.ArrayList;
import java... | [
{
"code": null,
"e": 1332,
"s": 1062,
"text": "The replaceAll() method of the List interface accept an object of the UnaryOperator representing a particular operation, performs the specified operation on all the elements of the current list and replaces the existing values in the list with their res... |
Array of functions in JavaScript - GeeksforGeeks | 20 Jun, 2019
Given an array containing functions and the task is to access its element in different ways using JavaScript.
Approach:
Declare an array of functions.
The array of function works with indexes like an array function.
Example 1: In this example, the function call is initiated from the element of array but th... | [
{
"code": null,
"e": 24821,
"s": 24793,
"text": "\n20 Jun, 2019"
},
{
"code": null,
"e": 24931,
"s": 24821,
"text": "Given an array containing functions and the task is to access its element in different ways using JavaScript."
},
{
"code": null,
"e": 24941,
"s": ... |
Difference Between Array and Structure | In this post, we will understand the difference between array and structure.
It refers to a collection that consists of elements of homogenous/same data type.
It refers to a collection that consists of elements of homogenous/same data type.
It uses subscripts/ ‘[ ]’ (square brackets) to access the elements.
It uses sub... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "In this post, we will understand the difference between array and structure."
},
{
"code": null,
"e": 1221,
"s": 1139,
"text": "It refers to a collection that consists of elements of homogenous/same data type."
},
{
"code": n... |
Virtual environments for absolute beginners — what is it and how to create one (+ examples) | by Mike Huls | Towards Data Science | If you work on a lot of different projects then you’ll recognize the dependency-hell of multiple projects requiring multiple versions, of multiple packages. You can’t just install all packages globally, how do you keep track? Also what happens when projectA needs PackageX_version1 and ProjectB needs PackageX_version2? ... | [
{
"code": null,
"e": 588,
"s": 172,
"text": "If you work on a lot of different projects then you’ll recognize the dependency-hell of multiple projects requiring multiple versions, of multiple packages. You can’t just install all packages globally, how do you keep track? Also what happens when projec... |
How to take input in Node.js ? - GeeksforGeeks | 07 Oct, 2021
Nowadays the extension of JavaScript i.e Node.js is quite popular among programmers in the field of competitive programming. In this article, we will discuss how to take input from the user.
readline-sync: This is the third party module that is used for taking the input from the user synchronously. So, the... | [
{
"code": null,
"e": 24309,
"s": 24281,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 24500,
"s": 24309,
"text": "Nowadays the extension of JavaScript i.e Node.js is quite popular among programmers in the field of competitive programming. In this article, we will discuss how t... |
Exporting Pandas Data to Elasticsearch | by John A. Dungan | Towards Data Science | How to send your dataframe rows to an elasticsearch database.
So you’re done downloading and analyzing your data and ready to move it to an Elasticsearch database. This article covers preparing your data and sending it to an elasticsearch endpoint.
Python 3.6.5numpy==1.15.0pandas==0.23.4elasticsearch==6.3.1import numpy... | [
{
"code": null,
"e": 234,
"s": 172,
"text": "How to send your dataframe rows to an elasticsearch database."
},
{
"code": null,
"e": 421,
"s": 234,
"text": "So you’re done downloading and analyzing your data and ready to move it to an Elasticsearch database. This article covers pr... |
Pandas - Analyzing DataFrames | One of the most used method for getting a quick overview of the DataFrame, is the head() method.
The head() method returns the headers and
a specified number of rows, starting from the top.
Get a quick overview by printing the first 10 rows of the DataFrame:
In our examples we will be using a CSV file called 'data.csv... | [
{
"code": null,
"e": 97,
"s": 0,
"text": "One of the most used method for getting a quick overview of the DataFrame, is the head() method."
},
{
"code": null,
"e": 191,
"s": 97,
"text": "The head() method returns the headers and \na specified number of rows, starting from the top... |
What is the difference between replace() and replaceAll() in Java? | The replace method of the String class accepts two characters and it replaces all the occurrences of oldChar in this string with newChar.
import java.io.*;
public class Test {
public static void main(String args[]) {
String Str = new String("Welcome to Tutorialspoint.com");
System.out.print("Return Value... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "The replace method of the String class accepts two characters and it replaces all the occurrences of oldChar in this string with newChar."
},
{
"code": null,
"e": 1537,
"s": 1200,
"text": "import java.io.*;\npublic class Test {\n p... |
Angular Material - SideNav | The md-sidenav, an Angular directive is used to show a container component which can be shown or hide programmatically. It slides out over the top of the main content region by default.
The following table lists out the parameters and description of the different attributes of md-sidenav
md-is-open
A model bound to whe... | [
{
"code": null,
"e": 2376,
"s": 2190,
"text": "The md-sidenav, an Angular directive is used to show a container component which can be shown or hide programmatically. It slides out over the top of the main content region by default."
},
{
"code": null,
"e": 2479,
"s": 2376,
"text... |
Flood fill Algorithm | One matrix is given; the matrix is representing the one screen. Each element (i, j) of the screen is denoted as a pixel, the color of that pixel is marked with different numbers. In this algorithm, the pixels will be filled with new color when it is already in selected previous color. If the previous color is not the p... | [
{
"code": null,
"e": 1521,
"s": 1062,
"text": "One matrix is given; the matrix is representing the one screen. Each element (i, j) of the screen is denoted as a pixel, the color of that pixel is marked with different numbers. In this algorithm, the pixels will be filled with new color when it is alr... |
NHibernate - Data Types Mapping | In this chapter, we will be covering mapping data types. Mapping entities is straightforward, entity classes are always mapped to database tables using <class>, <subclass>, and <joined-subclass> mapping elements. Value types need something more, which is where mapping types are required.
NHibernate is able to map a wid... | [
{
"code": null,
"e": 2622,
"s": 2333,
"text": "In this chapter, we will be covering mapping data types. Mapping entities is straightforward, entity classes are always mapped to database tables using <class>, <subclass>, and <joined-subclass> mapping elements. Value types need something more, which i... |
Building a Deep Learning Person Classifier | by Lindo St. Angel | Towards Data Science | In machine learning and statistics, classification is the problem of identifying to which of a set of categories (sub-populations) a new observation belongs, on the basis of a training set of data containing observations (or instances) whose category membership is known [1].
“Shallow” learning techniques such as Suppor... | [
{
"code": null,
"e": 448,
"s": 172,
"text": "In machine learning and statistics, classification is the problem of identifying to which of a set of categories (sub-populations) a new observation belongs, on the basis of a training set of data containing observations (or instances) whose category memb... |
How to Build a Spam Classifier in 10 Steps | Towards Data Science | If you’re just starting out in Machine Learning, chances are you’ll be undertaking a classification project. As a beginner, I built an SMS spam classifier but did a ton of research to know where to start. In this article, I’ll walk you through my project in 10 steps to make it easier for you to build your first spam cl... | [
{
"code": null,
"e": 554,
"s": 172,
"text": "If you’re just starting out in Machine Learning, chances are you’ll be undertaking a classification project. As a beginner, I built an SMS spam classifier but did a ton of research to know where to start. In this article, I’ll walk you through my project ... |
Iterate through KeyValue Tuple in Java | To iterate through the KeyValue tuple in Java, use the Iterable and loop it through using the for loop. Let us first see what we need to work with JavaTuples. To work with KeyValue class in JavaTuples, you need to import the following package:
import org.javatuples.KeyValue;
Note: Download JavaTuples Jar library to run... | [
{
"code": null,
"e": 1306,
"s": 1062,
"text": "To iterate through the KeyValue tuple in Java, use the Iterable and loop it through using the for loop. Let us first see what we need to work with JavaTuples. To work with KeyValue class in JavaTuples, you need to import the following package:"
},
{... |
Deep Learning based Super Resolution with OpenCV | by Xavier Weber | Towards Data Science | Table of Content
Super Resolution
Steps to upscale images in OpenCV
Different pre-trained models
Samples of results
Notes and references
OpenCV is an open-source computer vision library that has an extensive collection of great algorithms. Since one of the latest mergers, OpenCV contains an easy-to-use interface for im... | [
{
"code": null,
"e": 189,
"s": 172,
"text": "Table of Content"
},
{
"code": null,
"e": 206,
"s": 189,
"text": "Super Resolution"
},
{
"code": null,
"e": 240,
"s": 206,
"text": "Steps to upscale images in OpenCV"
},
{
"code": null,
"e": 269,
"s"... |
C# Object.GetHashCode() Method with Examples | The Object.GetHashCode() method in C# is used to serve as the default hash function.
public virtual int GetHashCode ();
Let us now see an example -
Live Demo
using System;
public class Demo {
public static void Main() {
Object ob = new Object();
String str = "Jim";
Type type1 = ob.GetType();
... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "The Object.GetHashCode() method in C# is used to serve as the default hash function."
},
{
"code": null,
"e": 1182,
"s": 1147,
"text": "public virtual int GetHashCode ();"
},
{
"code": null,
"e": 1210,
"s": 1182,
... |
Check if values in a vector are True or not in R Programming – all() and any() Function | 23 Dec, 2021
In this article, we are going to check if the values in a vector are true or not in R Programming Language.
all() function in R Language will check in a vector whether all the values are true or not.
Syntax: all(x, na.rm)
Parameters:
x: vector
na.rm: logical, if NA value to removed before result
Example ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "In this article, we are going to check if the values in a vector are true or not in R Programming Language."
},
{
"code": null,
"e": 228,
"s": 136,
"text":... |
Replication strategy in Cassandra | 27 Dec, 2019
In this article, we will discuss Different strategy class options supported by Cassandra such that SimpleStrategy, LocalStrategy, NetworkTopologyStrategy are three Replication strategy in which we generally used Simple and NetworkTopology Strategy in which LocalStrategy is used for system only. let’s discu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2019"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "In this article, we will discuss Different strategy class options supported by Cassandra such that SimpleStrategy, LocalStrategy, NetworkTopologyStrategy are three Replication... |
A Classical Least Squares Method for Quantitative Spectral Analysis with Python | by Nicolas Coca, PhD | Towards Data Science | Abstract. In this short tutorial, the Classical Least Squares method to calculate the similarity between spectra will be explained. This method, also known as Beer’s method, can be used to estimate the concentration of different components in an unknown spectrum. First, the physical context and Lambert-Beer’s law will ... | [
{
"code": null,
"e": 775,
"s": 172,
"text": "Abstract. In this short tutorial, the Classical Least Squares method to calculate the similarity between spectra will be explained. This method, also known as Beer’s method, can be used to estimate the concentration of different components in an unknown s... |
Ruby - Classes and Objects | Ruby is a perfect Object Oriented Programming Language. The features of the object-oriented programming language include −
Data Encapsulation
Data Abstraction
Polymorphism
Inheritance
These features have been discussed in the chapter Object Oriented Ruby.
An object-oriented program involves classes and objects. A class... | [
{
"code": null,
"e": 2417,
"s": 2294,
"text": "Ruby is a perfect Object Oriented Programming Language. The features of the object-oriented programming language include −"
},
{
"code": null,
"e": 2436,
"s": 2417,
"text": "Data Encapsulation"
},
{
"code": null,
"e": 245... |
Creating a Private Repository and Push an Image to That Private Repository - GeeksforGeeks | 16 Oct, 2020
In this article, we show how to create a docker hub account and pull the image from the docker hub repository and pushing our image to the docker hub repository. As docker hub is a public repository that can be accessed by anyone so one can create their own private repository to which they can push and pul... | [
{
"code": null,
"e": 23837,
"s": 23809,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 24223,
"s": 23837,
"text": "In this article, we show how to create a docker hub account and pull the image from the docker hub repository and pushing our image to the docker hub repository. A... |
How to Use Light Dependent Resistor (LDR) with Arduino? | The resistance of a Light Dependent Resistor (LDR) changes depending on the intensity of the light falling on it. Interfacing an LDR with Arduino is quite straightforward. You just create a voltage divider as shown below −
One end of the LDR is connected to 5V, the other end to a resistor (whose resistance should be ap... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "The resistance of a Light Dependent Resistor (LDR) changes depending on the intensity of the light falling on it. Interfacing an LDR with Arduino is quite straightforward. You just create a voltage divider as shown below −"
},
{
"code": null,
... |
Single and Double Quotes in Perl | You can use double quotes or single quotes around literal strings as follows −
Live Demo
#!/usr/bin/perl
print "Hello, world\n";
print 'Hello, world\n';
This will produce the following result −
Hello, world
Hello, world\n$
There is an important difference between single and double-quotes. Only double quotes interpolat... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "You can use double quotes or single quotes around literal strings as follows −"
},
{
"code": null,
"e": 1152,
"s": 1141,
"text": " Live Demo"
},
{
"code": null,
"e": 1216,
"s": 1152,
"text": "#!/usr/bin/perl\nprin... |
Getting to a Hyperparameter-Tuned XGBoost Model in No Time | by Jonathan Ratschat | Towards Data Science | Let’s face it. You’re an aspiring Data Scientist. You need to desperately solve a classification task either to impress your professor or to finally become one of these mysterious Kaggle winners. The problem is that you’ve got no time. The presentation or the Kaggle competition is due in 24 hours. Of course, you could ... | [
{
"code": null,
"e": 651,
"s": 172,
"text": "Let’s face it. You’re an aspiring Data Scientist. You need to desperately solve a classification task either to impress your professor or to finally become one of these mysterious Kaggle winners. The problem is that you’ve got no time. The presentation or... |
Node.js zlib flush() Method - GeeksforGeeks | 11 Oct, 2021
The flush() method is called on a compression stream so that it can compel zlib to return as much output as achievable at present. This output may be returned at the cost of corrupt compression quality but it can be useful when data is required to be accessible as early as possible.
Syntax:
zlib.flush()
Pa... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24815,
"s": 24531,
"text": "The flush() method is called on a compression stream so that it can compel zlib to return as much output as achievable at present. This output may be returned at t... |
3 Low-Code Python Libraries That You Should Know About | by Ismael Araujo | Towards Data Science | Some of my most popular blogs on Medium are about libraries that I believe you should try. In this blog, I will focus on low-code machine learning libraries. The truth is that many data scientists believe that low-code libraries are shortcuts and should be avoided. I’m afraid I have to disagree! I think that low-code l... | [
{
"code": null,
"e": 594,
"s": 172,
"text": "Some of my most popular blogs on Medium are about libraries that I believe you should try. In this blog, I will focus on low-code machine learning libraries. The truth is that many data scientists believe that low-code libraries are shortcuts and should b... |
Introducing Distance Correlation, a Superior Correlation Metric. | by Terence Shin | Towards Data Science | IntroductionWhat is Distance Correlation?Mathematics behind Distance CorrelationImplementing Distance Correlation in Python
Introduction
What is Distance Correlation?
Mathematics behind Distance Correlation
Implementing Distance Correlation in Python
I think we can agree that one of the most commonly used measures in b... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "IntroductionWhat is Distance Correlation?Mathematics behind Distance CorrelationImplementing Distance Correlation in Python"
},
{
"code": null,
"e": 309,
"s": 296,
"text": "Introduction"
},
{
"code": null,
"e": 339,
"s"... |
PHP Array Operators | PHP defines following set of symbols to be used as operators on array data types
The Union operator appends the right-hand array appended to left-hand array. ; If a key exists in both arrays, the elements from the left-hand array will be used, and the matching elements from the right-hand array will be ignored.
Followi... | [
{
"code": null,
"e": 1268,
"s": 1187,
"text": "PHP defines following set of symbols to be used as operators on array data types"
},
{
"code": null,
"e": 1500,
"s": 1268,
"text": "The Union operator appends the right-hand array appended to left-hand array. ; If a key exists in bot... |
How to Fix java.io.StreamCorruptedException: invalid type code in Java? | 08 Feb, 2022
There are several problems been faced which are as follows:
When you write an object in a file using serialization in java for the first time, no problem arises in reading the file afterward, even when you write multiple objects in one go.Now, when next time you try to append new objects (of the same type)... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 88,
"s": 28,
"text": "There are several problems been faced which are as follows:"
},
{
"code": null,
"e": 542,
"s": 88,
"text": "When you write an object in a file using seriali... |
Minimize the sum of product of two arrays with permutations allowed | 06 Jul, 2022
Given two arrays, A and B, of equal size n, the task is to find the minimum value of A[0] * B[0] + A[1] * B[1] +...+ A[n-1] * B[n-1]. Shuffling of elements of arrays A and B is allowed.
Examples :
Input : A[] = {3, 1, 1} and B[] = {6, 5, 4}.
Output : 23
Minimum value of S = 1*6 + 1*5 + 3*4 = 23.
Input : ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 238,
"s": 52,
"text": "Given two arrays, A and B, of equal size n, the task is to find the minimum value of A[0] * B[0] + A[1] * B[1] +...+ A[n-1] * B[n-1]. Shuffling of elements of arrays A and B ... |
Split() String method in Java with examples | 11 Jul, 2022
The string split() method breaks a given string around matches of the given regular expression. After splitting against the given regular expression, this method returns a string array.
Input String: 016-78967
Regular Expression: -
Output : {"016", "78967"}
Following are the two variants of the split() me... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 238,
"s": 52,
"text": "The string split() method breaks a given string around matches of the given regular expression. After splitting against the given regular expression, this method returns a st... |
Inheritance and Composition in Python | 01 Oct, 2020
Prerequisite – Classes and Objects in Python
This article will compare and highlight the features of is-a relation and has-a relation in Python.
It is a concept of Object-Oriented Programming. Inheritance is a mechanism that allows us to inherit all the properties from another class. The class from which t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 97,
"s": 52,
"text": "Prerequisite – Classes and Objects in Python"
},
{
"code": null,
"e": 197,
"s": 97,
"text": "This article will compare and highlight the features of is-a r... |
Output of Java program | Set 25 (Polymorphism) | 08 Jul, 2017
Pre-requisite: Polymorphism in java
1) What is the output of the following program?
class GFG{ protected void getData() { System.out.println("Inside GFG"); }}class GeeksforGeeks extends GFG{ protected void getData() { System.out.println("Inside GeeksforGeeks"); }} public cl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2017"
},
{
"code": null,
"e": 88,
"s": 52,
"text": "Pre-requisite: Polymorphism in java"
},
{
"code": null,
"e": 136,
"s": 88,
"text": "1) What is the output of the following program?"
},
{
"code": "... |
\frac - Tex Command | \frac - Used to draw fractions.
{ \frac #1 #2 }
\frac command is used to draw fractions.
\frac a b
ab
\frac{a-1}b-1
a−1b−1
\frac{a-1}{b-1}
a−1b−1
\frac a b
ab
\frac a b | [
{
"code": null,
"e": 8152,
"s": 8120,
"text": "\\frac - Used to draw fractions."
},
{
"code": null,
"e": 8168,
"s": 8152,
"text": "{ \\frac #1 #2 }"
},
{
"code": null,
"e": 8209,
"s": 8168,
"text": "\\frac command is used to draw fractions."
},
{
"code... |
Trigraphs in C++ with Examples | 17 Jul, 2020
In C++, a trigraph is a three-character sequence that represents a single character. It means that trigraph sequences are the set of three characters starting from double question marks (??). These characters are constructed using a sequence of 3 characters called trigraphs and these set of the characters ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "In C++, a trigraph is a three-character sequence that represents a single character. It means that trigraph sequences are the set of three characters starting from double ques... |
How to create a matrix of random integers in Python ? | 11 Dec, 2020
Prerequisites: numpy
To create a matrix of random integers in Python, randint() function of the numpy module is used. This function is used for random sampling i.e. all the numbers generated will be at random and cannot be predicted at hand.
Syntax : numpy.random.randint(low, high=None, size=None, dtype=’... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 49,
"s": 28,
"text": "Prerequisites: numpy"
},
{
"code": null,
"e": 270,
"s": 49,
"text": "To create a matrix of random integers in Python, randint() function of the numpy module... |
Batch Script – Local VS Global Variables | 04 Jan, 2022
In this article, we will see the differences between local and global variables in bash scripting.
Variable: The name given to a memory location that is used to store values in a program is called variables. It stores information that can be called and manipulated wherever needed in the program.
Scope: The... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "In this article, we will see the differences between local and global variables in bash scripting."
},
{
"code": null,
"e": 325,
"s": 127,
"text": "Variabl... |
Java program to count the characters in each word in a given sentence | To count the characters in each word in a given sentence, the Java code is as follows −
Live Demo
import java.util.*;
public class Demo{
static final int max_chars = 256;
static void char_occurence(String my_str){
int count[] = new int[max_chars];
int str_len = my_str.length();
for (int i = 0; ... | [
{
"code": null,
"e": 1275,
"s": 1187,
"text": "To count the characters in each word in a given sentence, the Java code is as follows −"
},
{
"code": null,
"e": 1286,
"s": 1275,
"text": " Live Demo"
},
{
"code": null,
"e": 2159,
"s": 1286,
"text": "import java.... |
GATE | GATE-CS-2006 | Question 57 | 28 Jun, 2021
Consider this C code to swap two integers and these five statements after it:
void swap(int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; }
S1: will generate a compilation errorS2: may generate a segmentation fault at runtime depending on the arguments passedS3: correctly impl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 106,
"s": 28,
"text": "Consider this C code to swap two integers and these five statements after it:"
},
{
"code": "void swap(int *px, int *py) { *px = *px - *py; *py = *px + *py; *... |
Find first and last element of ArrayList in java | 11 Dec, 2018
Prerequisite: ArrayList in Java
Given an ArrayList, the task is to get the first and last element of the ArrayList in Java,
Examples:
Input: ArrayList = [1, 2, 3, 4]
Output: First = 1, Last = 4
Input: ArrayList = [12, 23, 34, 45, 57, 67, 89]
Output: First = 12, Last = 89
Approach:
Get the ArrayList wit... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 86,
"s": 54,
"text": "Prerequisite: ArrayList in Java"
},
{
"code": null,
"e": 178,
"s": 86,
"text": "Given an ArrayList, the task is to get the first and last element of the Ar... |
Java Program to Create a New File | 09 Feb, 2022
A File is an abstract path, it has no physical existence. It is only when “using” that File that the underlying physical storage is hit. When the file is getting created indirectly the abstract path is getting created. The file is one way, in which data will be stored as per requirement.
1. Primary, in ord... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 341,
"s": 52,
"text": "A File is an abstract path, it has no physical existence. It is only when “using” that File that the underlying physical storage is hit. When the file is getting created indi... |
JavaScript Number.isNaN() Method | 24 Dec, 2021
Below is the example of the Number.isNaN() Method.
Example:<script>function GFGFun() { var res = ""; res = res + Number.isNaN(123);document.write(res); }GFGFun();</script>
<script>function GFGFun() { var res = ""; res = res + Number.isNaN(123);document.write(res); }GFGFun();</script>
Output:false... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 79,
"s": 28,
"text": "Below is the example of the Number.isNaN() Method."
},
{
"code": null,
"e": 205,
"s": 79,
"text": "Example:<script>function GFGFun() { var res = \"\"; res... |
Print hexadecimal values in Arduino | In order to print hexadecimal equivalents of numbers or characters, adding 'HEX' as the second argument of Serial.print() will be sufficient.
The following code demonstrates this −
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println();
Serial.println(75);
Serial.pr... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "In order to print hexadecimal equivalents of numbers or characters, adding 'HEX' as the second argument of Serial.print() will be sufficient."
},
{
"code": null,
"e": 1243,
"s": 1204,
"text": "The following code demonstrates this −"
... |
Introduction to Python3 - GeeksforGeeks | 12 Jan, 2021
Python is a high-level general-purpose programming language. Python programs generally are smaller than other programming languages like Java. Programmers have to type relatively less and indentation requirements of the language make them readable all the time.
Note: For more information, refer to Python P... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n12 Jan, 2021"
},
{
"code": null,
"e": 24163,
"s": 23901,
"text": "Python is a high-level general-purpose programming language. Python programs generally are smaller than other programming languages like Java. Programmers have to ... |
Program to find the Centroid of the Triangle in C++ | In this problem, we are given a 2D array that denotes coordinates of three
vertices of the triangle. Our task is to create a program to find the Centroid
of the Triangle in C++.
Centroid of a triangle is the point at which the three medians of the triangles intersect.
Median of a triangle is the line that connects the ... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "In this problem, we are given a 2D array that denotes coordinates of three\nvertices of the triangle. Our task is to create a program to find the Centroid\nof the Triangle in C++."
},
{
"code": null,
"e": 1331,
"s": 1240,
"text": "Ce... |
Angular Material - Quick Guide | Angular Material is a UI component library for Angular JS developers. Angular Material's reusable UI components help in constructing attractive, consistent, and functional web pages and web applications while adhering to modern web design principles like browser portability, device independence, and graceful degradatio... | [
{
"code": null,
"e": 2513,
"s": 2190,
"text": "Angular Material is a UI component library for Angular JS developers. Angular Material's reusable UI components help in constructing attractive, consistent, and functional web pages and web applications while adhering to modern web design principles lik... |
Parallel Computing On Raspberry Pi 4B+ IoT Boards Made Easier | by Arthur V. Ratz | Towards Data Science | This project provides useful guidelines, tips, and tutorials for building a modern parallel code in C++17/2x0, implemented using CL/SYCL programming model, and running it on the next generation of Raspberry Pi 4B IoT boards, based on the innovative ARM Cortex-A72, Quad-core, 64-bit RISC-V CPUs.
An audience of readers w... | [
{
"code": null,
"e": 468,
"s": 172,
"text": "This project provides useful guidelines, tips, and tutorials for building a modern parallel code in C++17/2x0, implemented using CL/SYCL programming model, and running it on the next generation of Raspberry Pi 4B IoT boards, based on the innovative ARM Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.