title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
SciPy – Constants
13 Jan, 2022 Scipy stands for Scientific Python and in any Scientific/Mathematical calculation, we often need universal constants to carry out tasks, one famous example is calculating the Area of a circle = ‘pi*r*r’ where PI = 3.14... or a more complicated one like finding forcegravity = G*M*m ⁄ (distance)2 where G = g...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jan, 2022" }, { "code": null, "e": 514, "s": 28, "text": "Scipy stands for Scientific Python and in any Scientific/Mathematical calculation, we often need universal constants to carry out tasks, one famous example is calculating the ...
Difference between Shallow and Deep copy of a class
16 Nov, 2020 Shallow Copy: Shallow repetition is quicker. However, it’s “lazy” it handles pointers and references. Rather than creating a contemporary copy of the particular knowledge the pointer points to, it simply copies over the pointer price. So, each the first and therefore the copy can have pointers that referen...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Nov, 2020" }, { "code": null, "e": 395, "s": 54, "text": "Shallow Copy: Shallow repetition is quicker. However, it’s “lazy” it handles pointers and references. Rather than creating a contemporary copy of the particular knowledge the...
Java.util.Collections.rotate() Method in Java with Examples
07 Dec, 2018 java.util.Collections.rotate() method is present in java.util.Collections class. It is used to rotate the elements present in the specified list of Collection by a given distance. Syntax: public static void rotate(List< type > list, int distance) Parameters : list - the list to be rotated. distance - the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Dec, 2018" }, { "code": null, "e": 232, "s": 52, "text": "java.util.Collections.rotate() method is present in java.util.Collections class. It is used to rotate the elements present in the specified list of Collection by a given dist...
Capped Collections in MongoDB
17 Feb, 2021 Capped collections are fixed-size collections means when we create the collection, we must fix the maximum size of the collection(in bytes) and the maximum number of documents that it can store. After creation, if we try to add more than documents to their capacity, it overwrites the existing documents. It...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2021" }, { "code": null, "e": 789, "s": 28, "text": "Capped collections are fixed-size collections means when we create the collection, we must fix the maximum size of the collection(in bytes) and the maximum number of documents...
Groupon Archives - GeeksforGeeks
Longest Palindromic Substring | Set 1 Longest Palindromic Substring | Set 2 Search in a row wise and column wise sorted matrix Groupon Interview Experience | Set 4 (SDE2 for Experienced) Groupon Interview | Set 1 (SDE Profile - Fresher) Git - Difference Between Git Fetch and Git Pull Unit Testing in Spring Boot Project...
[ { "code": null, "e": 24168, "s": 24130, "text": "Longest Palindromic Substring | Set 1" }, { "code": null, "e": 24206, "s": 24168, "text": "Longest Palindromic Substring | Set 2" }, { "code": null, "e": 24257, "s": 24206, "text": "Search in a row wise and colu...
Pizza Shop Billing System using Java Swing
19 Apr, 2021 Java is a fascinating programming language that provides its users with a plethora of features like OOP, platform independence, simplicity, GUI based programming, etc. One such feature is creating robust applications using the Swing toolkit provided by Java Foundation Classes. This can be used to create li...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Apr, 2021" }, { "code": null, "e": 612, "s": 54, "text": "Java is a fascinating programming language that provides its users with a plethora of features like OOP, platform independence, simplicity, GUI based programming, etc. One su...
How to ping a server using JavaScript ?
29 Nov, 2021 Pinging a server is used to determine whether it is online or not. The idea is to send an echo message to the server (called ping) and the server is expected to reply back with a similar message (called pong). Ping messages are sent and received by using ICMP (Internet Control Messaging Protocol). The lowe...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2021" }, { "code": null, "e": 418, "s": 28, "text": "Pinging a server is used to determine whether it is online or not. The idea is to send an echo message to the server (called ping) and the server is expected to reply back wit...
Create a Date object using the Calendar class in Java
For using Calendar class, import the following package. import java.util.Calendar; Now, let us create an object of Calendar class. Calendar calendar = Calendar.getInstance(); Set the date, month and year. calendar.set(Calendar.YEAR, 2018); calendar.set(Calendar.MONTH, 11); calendar.set(Calendar.DATE, 18); Create a Date...
[ { "code": null, "e": 1118, "s": 1062, "text": "For using Calendar class, import the following package." }, { "code": null, "e": 1145, "s": 1118, "text": "import java.util.Calendar;" }, { "code": null, "e": 1193, "s": 1145, "text": "Now, let us create an object...
PHP - Function MySQLi Fetch Array
mysqli_fetch_array(result,resulttype); It is used to fetchs a result row as an associative array It returns an array of strings that corresponds to the fetched row. result It specifies the result set identifier resulttype It specifies what type of array that should be produced Try out the following example <?php $c...
[ { "code": null, "e": 2797, "s": 2757, "text": "mysqli_fetch_array(result,resulttype);\n" }, { "code": null, "e": 2855, "s": 2797, "text": "It is used to fetchs a result row as an associative array" }, { "code": null, "e": 2923, "s": 2855, "text": "It returns a...
Adding a scatter of points to a boxplot using Matplotlib
To add a scatter of points to a boxplot using matplotlib, we can use boxplot() method and enumerate the Pandas dataframe to get the x and y data points to plot the scatter points. Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around th...
[ { "code": null, "e": 1242, "s": 1062, "text": "To add a scatter of points to a boxplot using matplotlib, we can use boxplot() method and enumerate the Pandas dataframe to get the x and y data points to plot the scatter points." }, { "code": null, "e": 1318, "s": 1242, "text": "Se...
DAX Information - ISNUMBER function
Checks whether a value is a number, and returns TRUE or FALSE. ISNUMBER (<value>) value The value you want to test. TRUE or FALSE. = ISNUMBER (5.0): The DAX formula returns TRUE. = ISNUMBER("AB"): This DAX formula returns FALSE. 53 Lectures 5.5 hours Abhay Gadiya 24 Lectures 2 hours Rand...
[ { "code": null, "e": 2064, "s": 2001, "text": "Checks whether a value is a number, and returns TRUE or FALSE." }, { "code": null, "e": 2085, "s": 2064, "text": "ISNUMBER (<value>) \n" }, { "code": null, "e": 2091, "s": 2085, "text": "value" }, { "code"...
How to write :hover condition for a:before and a:after in CSS?
18 May, 2022 The :before and :after selectors in CSS is used to add content before and after an element. The :hover is pseudo-class and :before & :after are pseudo-elements. In CSS, pseudo-elements are written after pseudo-class. Syntax: a:hover::before { // CSS Property } a:hover::after { // CSS Property } I...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 May, 2022" }, { "code": null, "e": 270, "s": 52, "text": "The :before and :after selectors in CSS is used to add content before and after an element. The :hover is pseudo-class and :before & :after are pseudo-elements. In CSS, pseud...
How to count the number of occurrences of a specific value in a column with a single MySQL query?
For this, you can use GROUP BY clause along with IN(). Let us first create a table − mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(100) -> ); Query OK, 0 rows affected (0.87 sec) Insert some records in the table using insert command − mysql> insert into De...
[ { "code": null, "e": 1272, "s": 1187, "text": "For this, you can use GROUP BY clause along with IN(). Let us first create a table −" }, { "code": null, "e": 1430, "s": 1272, "text": "mysql> create table DemoTable\n -> (\n -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> ...
Snowfall display using Pygame in Python
11 Sep, 2021 Not everybody must have witnessed Snowfall personally but wait a minute, What if you can see the snowfall right on your screen by just a few lines of creativity and Programming. Before starting the topic, it is highly recommended revising the basics of Pygame. 1. Importing modules First, we need to impor...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Sep, 2021" }, { "code": null, "e": 230, "s": 52, "text": "Not everybody must have witnessed Snowfall personally but wait a minute, What if you can see the snowfall right on your screen by just a few lines of creativity and Programmi...
Fork() – Practice questions
17 Feb, 2020 Prerequisite: basics of fork, fork and binary tree, Example1:What is the output of the following code? #include <stdio.h>#include <unistd.h>int main(){ if (fork() || fork()) fork(); printf("1 "); return 0;} Output: 1 1 1 1 1 Explanation:1. It will create two process one parent P (has proc...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Feb, 2020" }, { "code": null, "e": 106, "s": 54, "text": "Prerequisite: basics of fork, fork and binary tree," }, { "code": null, "e": 157, "s": 106, "text": "Example1:What is the output of the following code?" ...
HTML | DOM onblur Event
28 Jun, 2019 The HTML DOM onblur event occurs when an object loses focus. The onblur event is the opposite of the onfocus event.The onblur event is mostly used with form validation code (e.g. when the user leaves a form field). Syntax: In HTML: <element onblur="myScript"> In JavaScript: object.onblur = function(){myScr...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2019" }, { "code": null, "e": 243, "s": 28, "text": "The HTML DOM onblur event occurs when an object loses focus. The onblur event is the opposite of the onfocus event.The onblur event is mostly used with form validation code (e...
Python | Button Action in Kivy
29 Jun, 2021 Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications. ???????? Kivy Tutorial – Learn Kivy with Examples. Now in this article...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Jun, 2021" }, { "code": null, "e": 290, "s": 53, "text": "Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it d...
ML | Label Encoding of datasets in Python
18 May, 2022 In machine learning, we usually deal with datasets that contain multiple labels in one or more than one columns. These labels can be in the form of words or numbers. To make the data understandable or in human-readable form, the training data is often labelled in words. Label Encoding refers to converting...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 May, 2022" }, { "code": null, "e": 324, "s": 52, "text": "In machine learning, we usually deal with datasets that contain multiple labels in one or more than one columns. These labels can be in the form of words or numbers. To make ...
Find the nearest smaller numbers on left side in an array
31 May, 2022 Given an array of integers, find the nearest smaller number for every element such that the smaller element is on the left side. Examples: Input: arr[] = {1, 6, 4, 10, 2, 5} Output: {_, 1, 1, 4, 1, 2} First element ('1') has no element on left side. For 6, there is only one smaller element on l...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 May, 2022" }, { "code": null, "e": 183, "s": 54, "text": "Given an array of integers, find the nearest smaller number for every element such that the smaller element is on the left side." }, { "code": null, "e": 194, ...
Scatter plot in Plotly using graph_objects class
30 Aug, 2021 Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library. Scatt...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2021" }, { "code": null, "e": 330, "s": 28, "text": "Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot an...
Memory Management in Operating System
22 Nov, 2021 The term Memory can be defined as a collection of data in a specific format. It is used to store instructions and processed data. The memory comprises a large array or group of words or bytes, each with its own location. The primary motive of a computer system is to execute programs. These programs, along ...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Nov, 2021" }, { "code": null, "e": 531, "s": 54, "text": "The term Memory can be defined as a collection of data in a specific format. It is used to store instructions and processed data. The memory comprises a large array or group ...
Why does empty Structure has size 1 byte in C++ but 0 byte in C
04 Aug, 2021 A structure is a user-defined data type in C/C++. A structure creates a data type that can be used to group items of possibly different types into a single type. The ‘struct’ keyword is used to create a structure. The general syntax for creating a structure is as shown below: Syntax- struct structureName{ ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Aug, 2021" }, { "code": null, "e": 305, "s": 28, "text": "A structure is a user-defined data type in C/C++. A structure creates a data type that can be used to group items of possibly different types into a single type. The ‘struct’ ...
Given a binary tree, print all root-to-leaf paths
16 Jun, 2022 For the below example tree, all root-to-leaf paths are: 10 –> 8 –> 3 10 –> 8 –> 5 10 –> 2 –> 2 Algorithm: Use a path array path[] to store current root to leaf path. Traverse from root to all leaves in top-down fashion. While traversing, store data of all nodes in current path in array path[]. When we r...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 150, "s": 52, "text": "For the below example tree, all root-to-leaf paths are: \n10 –> 8 –> 3 \n10 –> 8 –> 5 \n10 –> 2 –> 2" }, { "code": null, "e": 400, "s": 150, "text": "Algo...
Checking if structure is empty or not in Golang - GeeksforGeeks
04 May, 2020 If the structure is empty means that there is no field present inside that particular structure. In Golang, the size of an empty structure is zero. Whenever the user wants to know if the created structure is empty or not, he can access the structure in the main function through a variable. If there doesn’t...
[ { "code": null, "e": 24420, "s": 24392, "text": "\n04 May, 2020" }, { "code": null, "e": 24817, "s": 24420, "text": "If the structure is empty means that there is no field present inside that particular structure. In Golang, the size of an empty structure is zero. Whenever the us...
How to restrict argument values using choice options in Python?
Assume you are asked to code a program to accept the number of tennis grandslam titles from the user and process them. We already know, Federer and Nadal share the maximum grandslam titles in Tennis which is 20 (As of 2020) while the minimum is 0, lot of players are still fighting to get their first grandslam title. Le...
[ { "code": null, "e": 1380, "s": 1062, "text": "Assume you are asked to code a program to accept the number of tennis grandslam titles from the user and process them. We already know, Federer and Nadal share the maximum grandslam titles in Tennis which is 20 (As of 2020) while the minimum is 0, lot o...
What is ISOMAP? How to use ISOMAP? When to use ISOMAP? What is geodesic distance? Geodesic distance vs Euclidean distance | Towards Data Science
Dimensionality reduction methods visualize the dataset and reduce its size, as well as reveal different features in the dataset. For non-linear datasets, dimensionality reduction can be examined under various sub-titles such as distance preservation (Isomap), topology preservation (Locally Linear Embedding). This artic...
[ { "code": null, "e": 786, "s": 172, "text": "Dimensionality reduction methods visualize the dataset and reduce its size, as well as reveal different features in the dataset. For non-linear datasets, dimensionality reduction can be examined under various sub-titles such as distance preservation (Isom...
Augmenting Neural Networks with Constrained Optimization | by Deepanshu Jindal | Towards Data Science
Adding constraints which incorporate domain knowledge is an interesting way to augment neural networks with world knowledge and improve their performance, especially in low data settings. Use of constraint optimization and/or logic modules on top of neural networks has become a fairly common practice for many structure...
[ { "code": null, "e": 360, "s": 172, "text": "Adding constraints which incorporate domain knowledge is an interesting way to augment neural networks with world knowledge and improve their performance, especially in low data settings." }, { "code": null, "e": 702, "s": 360, "text":...
Next-Generation Sequencing Data Analysis With PySpark | by Aneesh Panoli | Towards Data Science
With DNA, you have to be able to tell which genes are turned on or off. Current DNA sequencing cannot do that. The next generation of DNA sequencing needs to be able to do this. If somebody invents this, then we can start to very precisely identify cures for diseases. — Elon Musk The rapid growth of Next Generation Seq...
[ { "code": null, "e": 453, "s": 172, "text": "With DNA, you have to be able to tell which genes are turned on or off. Current DNA sequencing cannot do that. The next generation of DNA sequencing needs to be able to do this. If somebody invents this, then we can start to very precisely identify cures ...
Cumulative product of digits of all numbers in the given range - GeeksforGeeks
20 Apr, 2021 Given two integers L and R, the task is to find the cumulative product of digits (i.e. product of the product of digits) of all Natural numbers in the range L to R. Examples: Input: L = 2, R = 5 Output: 14 Explanation: 2 * 3 * 4 * 5 = 120Input: L = 11, R = 15 Output: 120 Explanation: (1*1) * (1*2) * (1*3...
[ { "code": null, "e": 25028, "s": 25000, "text": "\n20 Apr, 2021" }, { "code": null, "e": 25205, "s": 25028, "text": "Given two integers L and R, the task is to find the cumulative product of digits (i.e. product of the product of digits) of all Natural numbers in the range L to R...
Count Set-bits of number using Recursion - GeeksforGeeks
17 Nov, 2021 Given a number N. The task is to find the number of set bits in its binary representation using recursion. Examples: Input : 21 Output : 3 21 represented as 10101 in binary representation Input : 16 Output : 1 16 represented as 10000 in binary representation Approach: First, check the LSB of the number...
[ { "code": null, "e": 24988, "s": 24960, "text": "\n17 Nov, 2021" }, { "code": null, "e": 25095, "s": 24988, "text": "Given a number N. The task is to find the number of set bits in its binary representation using recursion." }, { "code": null, "e": 25106, "s": 250...
Java Program to Implement the Schonhage-Strassen Algorithm for Multiplication of Two Numbers - GeeksforGeeks
09 Jun, 2021 Schonhage-Strassen algorithm is one of the fastest ways of multiplying very large integer values (30000 to 150000 decimal digits). This algorithm was developed by Arnold Schönhage and Volker Strassen. Though the Furer’s algorithm is faster than that of Schonhage-Strassen’s algorithm, there are no practica...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n09 Jun, 2021" }, { "code": null, "e": 24456, "s": 23948, "text": "Schonhage-Strassen algorithm is one of the fastest ways of multiplying very large integer values (30000 to 150000 decimal digits). This algorithm was developed by ...
Apache Flume - Fetching Twitter Data
Using Flume, we can fetch data from various services and transport it to centralized stores (HDFS and HBase). This chapter explains how to fetch data from Twitter service and store it in HDFS using Apache Flume. As discussed in Flume Architecture, a webserver generates log data and this data is collected by an agent in...
[ { "code": null, "e": 2069, "s": 1857, "text": "Using Flume, we can fetch data from various services and transport it to centralized stores (HDFS and HBase). This chapter explains how to fetch data from Twitter service and store it in HDFS using Apache Flume." }, { "code": null, "e": 2273...
net - Unix, Linux Command
This tool is part of the samba(7) suite. The Samba net utility is meant to work just like the net utility available for windows and DOS. The first argument should be used to specify the protocol to use when executing a certain command. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC ...
[ { "code": null, "e": 10620, "s": 10577, "text": "\nThis tool is part of the\nsamba(7)\nsuite.\n" }, { "code": null, "e": 11059, "s": 10620, "text": "\nThe Samba net utility is meant to work just like the net utility available for windows and DOS. The first argument should be used...
Difference between 1's Complement representation and 2's Complement representation Technique - GeeksforGeeks
26 Apr, 2021 Prerequisite – Representation of Negative Binary Numbers 1’s complement of a binary number is another binary number obtained by toggling all bits in it, i.e., transforming the 0 bit to 1 and the 1 bit to 0. Examples: Let numbers be stored using 4 bits 1's complement of 7 (0111) is 8 (1000) 1's complement ...
[ { "code": null, "e": 26443, "s": 26415, "text": "\n26 Apr, 2021" }, { "code": null, "e": 26500, "s": 26443, "text": "Prerequisite – Representation of Negative Binary Numbers" }, { "code": null, "e": 26650, "s": 26500, "text": "1’s complement of a binary number...
SAP ABAP - Object Events
An event is a set of outcomes that are defined in a class to trigger the event handlers in other classes. When an event is triggered, we can call any number of event handler methods. The link between a trigger and its handler method is actually decided dynamically at run-time. In a normal method call, a calling program...
[ { "code": null, "e": 3176, "s": 2898, "text": "An event is a set of outcomes that are defined in a class to trigger the event handlers in other classes. When an event is triggered, we can call any number of event handler methods. The link between a trigger and its handler method is actually decided ...
Plot a quadrilateral mesh in Python using Matplotlib - GeeksforGeeks
03 Jun, 2020 Matplotlib a multiplatform data visualization library built on NumPy arrays, and designed to work with the broader SciPy stack. Matplotlib has the ability to play well with many operating systems and graphics backends as well. matplotlib.pyplot can also be used for MATLAB-like plotting framework. pcolormes...
[ { "code": null, "e": 23899, "s": 23871, "text": "\n03 Jun, 2020" }, { "code": null, "e": 24197, "s": 23899, "text": "Matplotlib a multiplatform data visualization library built on NumPy arrays, and designed to work with the broader SciPy stack. Matplotlib has the ability to play ...
Dynamic axis in Power BI — DAXis. Have you ever tried to dynamically... | by Nikola Ilic | Towards Data Science
A few months ago, I wrote a blog post about dynamic filtering in Power BI — and how to display different measures within one visual, depending on the user’s selection — without using bookmarks! Last week, I’ve got a similar request from my client. In fact, this time the request was the other way around — they want to s...
[ { "code": null, "e": 366, "s": 172, "text": "A few months ago, I wrote a blog post about dynamic filtering in Power BI — and how to display different measures within one visual, depending on the user’s selection — without using bookmarks!" }, { "code": null, "e": 644, "s": 366, "...
Clone a stack without using extra space | Set 2 - GeeksforGeeks
25 Aug, 2021 Given a stack S, the task is to copy the content of the given stack S to another stack T maintaining the same order. Examples: Input: Source:- |5| |4| |3| |2| |1|Output: Destination:- |5| ...
[ { "code": null, "e": 25054, "s": 25026, "text": "\n25 Aug, 2021" }, { "code": null, "e": 25171, "s": 25054, "text": "Given a stack S, the task is to copy the content of the given stack S to another stack T maintaining the same order." }, { "code": null, "e": 25181, ...
ASP.NET - Data Caching
Caching is a technique of storing frequently used data/information in memory, so that, when the same data/information is needed next time, it could be directly retrieved from the memory instead of being generated by the application. Caching is extremely important for performance boosting in ASP.NET, as the pages and co...
[ { "code": null, "e": 2580, "s": 2347, "text": "Caching is a technique of storing frequently used data/information in memory, so that, when the same data/information is needed next time, it could be directly retrieved from the memory instead of being generated by the application." }, { "code"...
How to get the selected index of a RadioGroup in Android using Kotlin?
This example demonstrates how to get the selected index of a RadioGroup in Android using Kotlin. Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding=...
[ { "code": null, "e": 1159, "s": 1062, "text": "This example demonstrates how to get the selected index of a RadioGroup in Android using Kotlin." }, { "code": null, "e": 1246, "s": 1159, "text": "Step 1 − Create a new project in Android Studio, go to File ? New Project and fill al...
A Complete Beginners Guide to Document Similarity Algorithms | by GreekDataGuy | Towards Data Science
I’ve deployed a few recommender systems into production. Not surprisingly, the simplest turned out to be the most effective. At the core of most recommender systems lies collaborative filtering. And at the core of collaborative filtering is document similarity. We’ll walk through 3 algorithms for calculating document s...
[ { "code": null, "e": 297, "s": 172, "text": "I’ve deployed a few recommender systems into production. Not surprisingly, the simplest turned out to be the most effective." }, { "code": null, "e": 434, "s": 297, "text": "At the core of most recommender systems lies collaborative fi...
How to deal with security certificates using Selenium?
We can deal with security certificates using Selenium webdriver. We can have certificates like the SSL certificate and insecure certificate. All these can be handled with the help of the DesiredCapabilities and ChromeOptions class. We shall create an object of the DesiredCapabilities class and apply setCapability metho...
[ { "code": null, "e": 1294, "s": 1062, "text": "We can deal with security certificates using Selenium webdriver. We can have certificates like the SSL certificate and insecure certificate. All these can be handled with the help of the DesiredCapabilities and ChromeOptions class." }, { "code":...
Beautiful decision tree visualizations with dtreeviz | by Eryk Lewinson | Towards Data Science
Decision trees are a very important class of machine learning models and they are also building blocks of many more advanced algorithms, such as Random Forest or the famous XGBoost. The trees are also a good starting point for a baseline model, which we subsequently try to improve upon with more complex algorithms. One...
[ { "code": null, "e": 489, "s": 172, "text": "Decision trees are a very important class of machine learning models and they are also building blocks of many more advanced algorithms, such as Random Forest or the famous XGBoost. The trees are also a good starting point for a baseline model, which we s...
Java Examples - Find min & max from a List
How to find min & max of a List ? Following example uses min & max Methods to find minimum & maximum of the List. import java.util.*; public class Main { public static void main(String[] args) { List list = Arrays.asList("one Two three Four five six one three Four".split(" ")); System.out.println(list);...
[ { "code": null, "e": 2102, "s": 2068, "text": "How to find min & max of a List ?" }, { "code": null, "e": 2182, "s": 2102, "text": "Following example uses min & max Methods to find minimum & maximum of the List." }, { "code": null, "e": 2514, "s": 2182, "text"...
Hashtable get() Method in Java - GeeksforGeeks
28 Jun, 2018 The java.util.Hashtable.get() method of Hashtable class is used to retrieve or fetch the value mapped by a particular key mentioned in the parameter. It returns NULL when the table contains no such mapping for the key. Syntax: Hash_Table.get(Object key_element) Parameter: The method takes one parameter key...
[ { "code": null, "e": 23544, "s": 23516, "text": "\n28 Jun, 2018" }, { "code": null, "e": 23763, "s": 23544, "text": "The java.util.Hashtable.get() method of Hashtable class is used to retrieve or fetch the value mapped by a particular key mentioned in the parameter. It returns NU...
How to build a music recommender system. | Towards Data Science
Have you ever wondered how Spotify recommends songs and playlists based on your listening history? Do you wonder how Spotify manages to find songs that sound similar to the ones you’ve already listened to? Interestingly, Spotify has a web API that developers can use to retrieve audio features and metadata about songs s...
[ { "code": null, "e": 378, "s": 172, "text": "Have you ever wondered how Spotify recommends songs and playlists based on your listening history? Do you wonder how Spotify manages to find songs that sound similar to the ones you’ve already listened to?" }, { "code": null, "e": 763, "s"...
Typecasting in C
20 Jan, 2021 Typecasting: It is a data type is converted into another data type by the programmer using the casting operator during the program design. In typecasting, the destination data type may be smaller than the source data type when converting the data type to another data type, that’s why it is also called narr...
[ { "code": null, "e": 53, "s": 25, "text": "\n20 Jan, 2021" }, { "code": null, "e": 378, "s": 53, "text": "Typecasting: It is a data type is converted into another data type by the programmer using the casting operator during the program design. In typecasting, the destination dat...
Finding Position | Practice | GeeksforGeeks
Some people(n) are standing in a queue. A selection process follows a rule where people standing on even positions are selected. Of the selected people a queue is formed and again out of these only people on even position are selected. This continues until we are left with one person. Find out the position of that pers...
[ { "code": null, "e": 596, "s": 238, "text": "Some people(n) are standing in a queue. A selection process follows a rule where people standing on even positions are selected. Of the selected people a queue is formed and again out of these only people on even position are selected. This continues unti...
How to Sort the Elements of the ComboBox in C#?
27 Jun, 2019 In Windows forms, ComboBox provides two different features in a single control, it means ComboBox works as both TextBox and ListBox. In ComboBox, only one item is displayed at a time and the rest of the items are present in the drop-down menu. You are allowed to sort the elements present in the ComboBox by...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jun, 2019" }, { "code": null, "e": 654, "s": 28, "text": "In Windows forms, ComboBox provides two different features in a single control, it means ComboBox works as both TextBox and ListBox. In ComboBox, only one item is displayed at...
PHP | is_numeric() Function
05 Feb, 2021 The is_numeric() function is an inbuilt function in PHP which is used to check whether a variable passed in function as a parameter is a number or a numeric string or not. The function returns a boolean value. Syntax: bool is_numeric ( $var ) Parameters: The function accepts a single parameter which is ma...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Feb, 2021" }, { "code": null, "e": 238, "s": 28, "text": "The is_numeric() function is an inbuilt function in PHP which is used to check whether a variable passed in function as a parameter is a number or a numeric string or not. The...
Lodash _.assignIn() Method
09 Sep, 2020 The Lodash _.assignIn() Method is like the _.assign() method except that it iterates over its own and inherited source properties. Subsequent source objects overwrite property assignments of previous sources. This method mutates the object. Syntax: _.assignIn( dest_object, [src_obj]) Parameters: This meth...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2020" }, { "code": null, "e": 269, "s": 28, "text": "The Lodash _.assignIn() Method is like the _.assign() method except that it iterates over its own and inherited source properties. Subsequent source objects overwrite property...
How to connect to SQLite database that resides in the memory using Python ?
12 Oct, 2021 In this article, we will learn how to Connect an SQLite database connection to a database that resides in the memory using Python. But first let brief about what is sqlite. SQLite is a lightweight database software library that provides a relational database management system. Generally, it is a server-les...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Oct, 2021" }, { "code": null, "e": 201, "s": 28, "text": "In this article, we will learn how to Connect an SQLite database connection to a database that resides in the memory using Python. But first let brief about what is sqlite." ...
Docker – COPY Instruction
29 Oct, 2020 In Docker, there are two ways to copy a file, namely, ADD and COPY. Though there is a slight difference between them in regard to the scope of the functions, they more or less perform the same task. In this article, we will primarily focus on the COPY instruction of Docker. If you want to copy files and di...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Oct, 2020" }, { "code": null, "e": 496, "s": 28, "text": "In Docker, there are two ways to copy a file, namely, ADD and COPY. Though there is a slight difference between them in regard to the scope of the functions, they more or less...
Sort function in Lua programming
One of the most used functions in Lua is the sort function which is provided by the Lua library which tables a table as an argument and sorts the values that are present inside the table. The sort function also takes one more argument with the table and that argument is a function which is known as the order function. ...
[ { "code": null, "e": 1375, "s": 1187, "text": "One of the most used functions in Lua is the sort function which is provided by the Lua library which tables a table as an argument and sorts the values that are present inside the table." }, { "code": null, "e": 1621, "s": 1375, "te...
File.Open(String, FileMode, FileAccess, FileShare) Method in C# with Examples
13 Apr, 2021 File.Open(String, FileMode, FileAccess, FileShare) is an inbuilt File class method that is used to open a FileStream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.Syntax: public static System.IO.FileStream Open (string path, System...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Apr, 2021" }, { "code": null, "e": 275, "s": 28, "text": "File.Open(String, FileMode, FileAccess, FileShare) is an inbuilt File class method that is used to open a FileStream on the specified path, having the specified mode with read...
Django form field custom widgets
29 Dec, 2019 A widget is Django’s representation of an HTML input element. The widget handles the rendering of the HTML, and the extraction of data from a GET/POST dictionary that corresponds to the widget. Whenever you specify a field on a form, Django will use a default widget that is appropriate to the type of data ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Dec, 2019" }, { "code": null, "e": 581, "s": 54, "text": "A widget is Django’s representation of an HTML input element. The widget handles the rendering of the HTML, and the extraction of data from a GET/POST dictionary that corresp...
Write a C macro PRINT(x) which prints x
13 May, 2022 At the first look, it seems that writing a C macro which prints its argument is child’s play. Following program should work i.e. it should print x c #define PRINT(x) (x)int main(){ printf("%s", PRINT(x)); return 0;} But it would issue compile error because the data type of x, which is taken as vari...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 May, 2022" }, { "code": null, "e": 201, "s": 52, "text": "At the first look, it seems that writing a C macro which prints its argument is child’s play. Following program should work i.e. it should print x " }, { "code": nul...
Finding Network ID of a Subnet (using Subnet Mask)
08 Aug, 2019 In order to find network id (NID) of a Subnet, one must be fully acquainted with the Subnet mask. Subnet Mask:It is used to find which IP address belongs to which Subnet. It is a 32 bit number, containing 0’s and 1’s. Here network id part and Subnet ID part is represented by all 1’s and host ID part is rep...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Aug, 2019" }, { "code": null, "e": 151, "s": 53, "text": "In order to find network id (NID) of a Subnet, one must be fully acquainted with the Subnet mask." }, { "code": null, "e": 381, "s": 151, "text": "Subnet ...
Global Variable in Ruby
25 Sep, 2019 Global Variable has global scope and accessible from anywhere in the program. Assigning to global variables from any point in the program has global implications. Global variable are always prefixed with a dollar sign ($). If we want to have a single variable, which is available across classes, we need to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Sep, 2019" }, { "code": null, "e": 543, "s": 28, "text": "Global Variable has global scope and accessible from anywhere in the program. Assigning to global variables from any point in the program has global implications. Global varia...
outtext() function in C
06 Dec, 2019 The header file graphics.h contains outtext() function which displays text at current position. Syntax : void outtext(char *string); Examples : Input : string = "Hello Geek, Have a good day !" Output : Input : string = "GeeksforGeeks is the best !" Output : Note : Do not use text mode functions like ...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Dec, 2019" }, { "code": null, "e": 150, "s": 54, "text": "The header file graphics.h contains outtext() function which displays text at current position." }, { "code": null, "e": 159, "s": 150, "text": "Syntax :"...
MYBATIS - Update Operation
We discussed, in the last chapter, how to perform READ operation on a table using MyBatis. This chapter explains how you can update records in a table using it. We have the following STUDENT table in MySQL − CREATE TABLE details.student( ID int(10) NOT NULL AUTO_INCREMENT, NAME varchar(100) NOT NULL, BRANCH va...
[ { "code": null, "e": 2166, "s": 2005, "text": "We discussed, in the last chapter, how to perform READ operation on a table using MyBatis. This chapter explains how you can update records in a table using it." }, { "code": null, "e": 2213, "s": 2166, "text": "We have the following...
Reverse Cuthill Mckee Algorithm
09 Apr, 2022 The Cuthill-Mckee algorithm is used for reordering of a symmetric square matrix. It is based on Breadth First Search algorithm of a graph, whose adjacency matrix is the sparsified version of the input square matrix.The ordering is frequently used when a matrix is to be generated whose rows and columns are ...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Apr, 2022" }, { "code": null, "e": 528, "s": 54, "text": "The Cuthill-Mckee algorithm is used for reordering of a symmetric square matrix. It is based on Breadth First Search algorithm of a graph, whose adjacency matrix is the spars...
Method Overloading and Ambiguity in Varargs in Java
03 Sep, 2018 Prerequisite – Varargs , Method Overloading Method Overloading in Varargs Overloading allows different methods to have same name, but different signatures where signature can differ by number of input parameters or type of input parameters or both. We can overload a method that takes a variable-length argu...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Sep, 2018" }, { "code": null, "e": 96, "s": 52, "text": "Prerequisite – Varargs , Method Overloading" }, { "code": null, "e": 126, "s": 96, "text": "Method Overloading in Varargs" }, { "code": null, "...
Python Program for Maximum size square sub-matrix with all 1s
19 Apr, 2020 Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Python3 def print_max_sub_matrix(grid): row_len = len(grid) col_len = len(grid[0]) cache = [[0 for k in range(col_len)] for l in range(row_len)] for ...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 108, "s": 28, "text": "Given a binary matrix, find out the maximum size square sub-matrix with all 1s." }, { "code": null, "e": 155, "s": 108, "text": "For example, consider the ...
PHP program to find the Standard Deviation of an array
05 Apr, 2018 Given an array of elements. We need to find the Standard Deviation of the elements of the array in PHP. Examples: Input : array(2, 3, 5, 6, 7) Output : 1.5620499351813 Input : array(1, 2, 3, 4, 5) Output : 1 The following problem can be solved using the PHP inbuilt functions. The inbuilt functions used t...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Apr, 2018" }, { "code": null, "e": 132, "s": 28, "text": "Given an array of elements. We need to find the Standard Deviation of the elements of the array in PHP." }, { "code": null, "e": 142, "s": 132, "text": "Ex...
Sort the PySpark DataFrame columns by Ascending or Descending order
06 Jun, 2021 In this article, we are going to sort the dataframe columns in the pyspark. For this, we are using sort() and orderBy() functions in ascending order and descending order sorting. Let’s create a sample dataframe. Python3 # importing moduleimport pyspark # importing sparksession from # pyspark.sql modulefro...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2021" }, { "code": null, "e": 207, "s": 28, "text": "In this article, we are going to sort the dataframe columns in the pyspark. For this, we are using sort() and orderBy() functions in ascending order and descending order sorti...
Sort an Array of Strings according to the number of Vowels in them
11 Jun, 2021 Given an array arr[] of N strings, the task is to sort these strings according to the numbers of vowels in them. Examples: Input: arr[] = { “geeks”, “for”, “coding” } Output: for, coding, geeks for -> o = 1 vowel coding -> o, i = 2 vowels geeks -> e, e = 2 vowels Input: arr[] = { “lmno”, “pqrst”, “aeiou”,...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jun, 2021" }, { "code": null, "e": 141, "s": 28, "text": "Given an array arr[] of N strings, the task is to sort these strings according to the numbers of vowels in them." }, { "code": null, "e": 152, "s": 141, "t...
C# – Break statement
10 Feb, 2022 In C#, the break statement is used to terminate a loop(for, if, while, etc.) or a switch statement on a certain condition. And after terminating the controls will pass to the statements that present after the break statement, if available. If the break statement exists in the nested loop, then it will term...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2022" }, { "code": null, "e": 395, "s": 28, "text": "In C#, the break statement is used to terminate a loop(for, if, while, etc.) or a switch statement on a certain condition. And after terminating the controls will pass to the ...
Zero value in Golang
09 Aug, 2019 In Go language, whenever we allocate memory for a variable with the help of declaration or by using new and if the variable is not initialized explicitly, then the value of such types of variables are automatically initialized with their zero value. The initialization of the zero value is done recursively....
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2019" }, { "code": null, "e": 508, "s": 28, "text": "In Go language, whenever we allocate memory for a variable with the help of declaration or by using new and if the variable is not initialized explicitly, then the value of su...
How to remove array rows that contain only 0 using NumPy?
20 Aug, 2021 Numpy library provides a function called numpy.all() that returns True when all elements of n-d array passed to the first parameter are True else it returns False. Thus, to determine the entire row containing 0’s can be removed by specifying axis=1. It will traverse each row and will check for the conditio...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Aug, 2021" }, { "code": null, "e": 364, "s": 28, "text": "Numpy library provides a function called numpy.all() that returns True when all elements of n-d array passed to the first parameter are True else it returns False. Thus, to de...
Sliding Window Maximum : Set 2
08 Apr, 2022 Set 1: Sliding Window Maximum (Maximum of all subarrays of size k).Given an array arr of size N and an integer K, the task is to find the maximum for each and every contiguous subarray of size K. Examples: Input: arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}, K = 3 Output: 3 3 4 5 5 5 6 All contiguous subarrays of ...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Apr, 2022" }, { "code": null, "e": 250, "s": 54, "text": "Set 1: Sliding Window Maximum (Maximum of all subarrays of size k).Given an array arr of size N and an integer K, the task is to find the maximum for each and every contiguou...
Remove unique key from MySQL table?
To remove the unique key from MySQL, use the DROP command. The syntax is as follows − ALTER TABLE yourTableName DROP INDEX yourKeyName; To understand the above syntax, let us create a table with the unique key. The query to create a table is as follows − mysql> create table DropIndexDemo −> ( −> BookId int unique...
[ { "code": null, "e": 1273, "s": 1187, "text": "To remove the unique key from MySQL, use the DROP command. The syntax is as follows −" }, { "code": null, "e": 1323, "s": 1273, "text": "ALTER TABLE yourTableName DROP INDEX yourKeyName;" }, { "code": null, "e": 1442, ...
numpy.squeeze() in Python
28 Nov, 2018 numpy.squeeze() function is used when we want to remove single-dimensional entries from the shape of an array. Syntax : numpy.squeeze(arr, axis=None ) Parameters :arr : [array_like] Input array.axis : [None or int or tuple of ints, optional] Selects a subset of the single-dimensional entries in the shape. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2018" }, { "code": null, "e": 139, "s": 28, "text": "numpy.squeeze() function is used when we want to remove single-dimensional entries from the shape of an array." }, { "code": null, "e": 179, "s": 139, "tex...
Efficient Program to Compute Sum of Series 1/1! + 1/2! + 1/3! + 1/4! + .. + 1/n!
15 Jun, 2022 Given a positive integer n, write a function to compute the sum of the series 1/1! + 1/2! + .. + 1/n!A Simple Solution is to initialize the sum as 0, then run a loop and call the factorial function inside the loop. Following is the implementation of a simple solution. C++ Java Python3 C# PHP Javascript /...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2022" }, { "code": null, "e": 323, "s": 52, "text": "Given a positive integer n, write a function to compute the sum of the series 1/1! + 1/2! + .. + 1/n!A Simple Solution is to initialize the sum as 0, then run a loop and call...
Python Program to Count trailing zeroes in factorial of a number
14 Jun, 2022 Given an integer n, write a function that returns count of trailing zeroes in n!. Examples : Input: n = 5 Output: 1 Factorial of 5 is 120 which has one trailing 0. Input: n = 20 Output: 4 Factorial of 20 is 2432902008176640000 which has 4 trailing zeroes. Input: n = 100 Output: 24 Trailing 0s in n! = C...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Jun, 2022" }, { "code": null, "e": 148, "s": 54, "text": "Given an integer n, write a function that returns count of trailing zeroes in n!. Examples :" }, { "code": null, "e": 340, "s": 148, "text": "Input: n = ...
How to Install and Configure Apache Subversion(SVN) In Linux?
06 Oct, 2021 Apache Subversion (SVN), is a version control system like Git. it is distributed under an open-source license. SVN was created by CollabNet Inc. but now it is developed as a project of the Apache Software Foundation. Apache Subversion(SVN) can be easily downloaded and installed with the use of the command-...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 245, "s": 28, "text": "Apache Subversion (SVN), is a version control system like Git. it is distributed under an open-source license. SVN was created by CollabNet Inc. but now it is developed as a p...
Laravel - Routing
In Laravel, all requests are mapped with the help of routes. Basic routing routes the request to the associated controllers. This chapter discusses routing in Laravel. Routing in Laravel includes the following categories − Basic Routing Route parameters Named Routes All the application routes are registered within the ...
[ { "code": null, "e": 2774, "s": 2606, "text": "In Laravel, all requests are mapped with the help of routes. Basic routing routes the request to the associated controllers. This chapter discusses routing in Laravel." }, { "code": null, "e": 2829, "s": 2774, "text": "Routing in Lar...
Java Program to Traverse Through ArrayList in Reverse Direction
22 Dec, 2020 ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java just as Vector in C++. Though, it may be slower than standard arrays but can be helpful in programs where lots of manipulation in the array is needed. The task is to insert an element...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Dec, 2020" }, { "code": null, "e": 399, "s": 28, "text": "ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java just as Vector in C++. Though, it may be slower tha...
HTML Calculator
06 Jul, 2022 HTML calculator is used to perform the basic mathematical operations like Addition, subtraction, multiplication, and division. To design the basic calculator, we will use HTML, CSS, and JavaScript. HTML is used to design the basic structure of th...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 179, "s": 52, "text": "HTML calculator is used to perform the basic mathematical operations like Addition, subtraction, multiplication, and division." }, { "code": null, "e": 488, "...
How to trim a file extension from string using JavaScript ?
29 May, 2019 Given a fileName in string format and the task is to trim the file extension from the string using JavaScript. replace() method: This method searches a string for a defined value or a regular expression, and returns a new string with the replaced defined value.Syntax:string.replace(searchVal, newvalue)Para...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2019" }, { "code": null, "e": 139, "s": 28, "text": "Given a fileName in string format and the task is to trim the file extension from the string using JavaScript." }, { "code": null, "e": 664, "s": 139, "tex...
Encoder in Digital Logic
25 Nov, 2019 An Encoder is a combinational circuit that performs the reverse operation of Decoder.It has maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information from 2^n inputs into an n-bit code. It will produce a binary code equivalent to the input, which is active High. Therefore, the encod...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Nov, 2019" }, { "code": null, "e": 403, "s": 54, "text": "An Encoder is a combinational circuit that performs the reverse operation of Decoder.It has maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information ...
Electron - Debugging
We have two processes that run our application – the main process and the renderer process. Since the renderer process is the one being executed in our browser window, we can use the Chrome Devtools to debug it. To open DevTools, use the shortcut "Ctrl+Shift+I" or the <F12> key. You can check out how to use devtools he...
[ { "code": null, "e": 2157, "s": 2065, "text": "We have two processes that run our application – the main process and the renderer process." }, { "code": null, "e": 2389, "s": 2157, "text": "Since the renderer process is the one being executed in our browser window, we can use the...
What is an anonymous function in JavaScript?
A function expression is similar to and has the same syntax as a function declaration One can define "named" function expressions (where the name of the expression might be used in the call stack for example) or "anonymous" function expressions. An example of an anonymous function expression (the name is not used) − va...
[ { "code": null, "e": 1308, "s": 1062, "text": "A function expression is similar to and has the same syntax as a function\ndeclaration One can define \"named\" function expressions (where the name of the expression might be used in the call stack for example) or \"anonymous\" function expressions." ...
Sort the Matrix Diagonally in C++
Suppose we have N x M matrix, we have to sort this diagonally in increasing order from top-left to the bottom right. So if the matrix is like − The output matrix will be − To solve this, we will follow these steps − Define a method called solve(), this will take si, sj and matrix mat Define a method called solve(), thi...
[ { "code": null, "e": 1206, "s": 1062, "text": "Suppose we have N x M matrix, we have to sort this diagonally in increasing order from top-left to the bottom right. So if the matrix is like −" }, { "code": null, "e": 1234, "s": 1206, "text": "The output matrix will be −" }, { ...
Electron - Quick Guide
Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs. This does not mean Electron is a JavaScript binding to graphical user interface (GUI) libraries. Instead, Electron uses web pages as its GUI, so you can also see it as a minimal Chro...
[ { "code": null, "e": 2203, "s": 2065, "text": "Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs." }, { "code": null, "e": 2529, "s": 2203, "text": "This does not mean Electron is a JavaScript ...
How to insert an item in a list at a given position in C#?
To insert an item in an already created List, use the Insert() method. Firstly, set elements − List <int> list = new List<int>(); list.Add(989); list.Add(345); list.Add(654); list.Add(876); list.Add(234); list.Add(909); Now, let’s say you need to insert an item at 4th position. For that, use the Insert() method − // in...
[ { "code": null, "e": 1133, "s": 1062, "text": "To insert an item in an already created List, use the Insert() method." }, { "code": null, "e": 1157, "s": 1133, "text": "Firstly, set elements −" }, { "code": null, "e": 1282, "s": 1157, "text": "List <int> list ...
Python program to calculate Date, Month and Year from Seconds - GeeksforGeeks
15 Mar, 2021 Given the number of seconds, the task is to write a Python program to calculate the date, month, and year in the format MM-DD-YYYY that have been passed from 1 January 1947. Examples: Input: 0 Output: 01-01-1947 Input: 123456789 Output: 11-29-1950 Input: 9876543210 Output: 12-22-2259 Step-by-step Approac...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n15 Mar, 2021" }, { "code": null, "e": 24075, "s": 23901, "text": "Given the number of seconds, the task is to write a Python program to calculate the date, month, and year in the format MM-DD-YYYY that have been passed from 1 Jan...
Python 3 - continue statement
The continue statement in Python returns the control to the beginning of the current loop. When encountered, the loop starts next iteration without executing the remaining statements in the current iteration. The continue statement can be used in both while and for loops. continue #!/usr/bin/python3 for letter in 'Py...
[ { "code": null, "e": 2549, "s": 2340, "text": "The continue statement in Python returns the control to the beginning of the current loop. When encountered, the loop starts next iteration without executing the remaining statements in the current iteration." }, { "code": null, "e": 2613, ...
Python - Call function from another file - GeeksforGeeks
21 May, 2021 Given a Python file, we need to call a function in it defined in any other Python file. Example: Suppose there is a file test.py which contains the definition of the function displayText(). #test.py>def displayText(): print( “Geeks 4 Geeks!”)We need to call the function displayText() in any other Pyt...
[ { "code": null, "e": 23935, "s": 23907, "text": "\n21 May, 2021" }, { "code": null, "e": 24034, "s": 23935, "text": "Given a Python file, we need to call a function in it defined in any other Python file. Example: " }, { "code": null, "e": 24371, "s": 24034, ...
C# - Unsafe Codes
C# allows using pointer variables in a function of code block when it is marked by the unsafe modifier. The unsafe code or the unmanaged code is a code block that uses a pointer variable. Note − To execute the programs mentioned in this chapter at codingground, please set compilation option in Project >> Compile Option...
[ { "code": null, "e": 2458, "s": 2270, "text": "C# allows using pointer variables in a function of code block when it is marked by the unsafe modifier. The unsafe code or the unmanaged code is a code block that uses a pointer variable." }, { "code": null, "e": 2619, "s": 2458, "te...
Solidity - if...else if... statement.
The if...else if... statement is an advanced form of if...else that allows Solidity to make a correct decision out of several conditions. The syntax of an if-else-if statement is as follows − if (expression 1) { Statement(s) to be executed if expression 1 is true } else if (expression 2) { Statement(s) to be exec...
[ { "code": null, "e": 2693, "s": 2555, "text": "The if...else if... statement is an advanced form of if...else that allows Solidity to make a correct decision out of several conditions." }, { "code": null, "e": 2747, "s": 2693, "text": "The syntax of an if-else-if statement is as ...
Building a Bayesian Logistic Regression with Python and PyMC3 | by Susan Li | Towards Data Science
In this post, we will explore using Bayesian Logistic Regression in order to predict whether or not a customer will subscribe a term deposit after the marketing campaign the bank performed. We want to be able to accomplish: How likely a customer to subscribe a term deposit? Experimenting of variables selection techniqu...
[ { "code": null, "e": 362, "s": 172, "text": "In this post, we will explore using Bayesian Logistic Regression in order to predict whether or not a customer will subscribe a term deposit after the marketing campaign the bank performed." }, { "code": null, "e": 396, "s": 362, "text...
How to prevent loops going into infinite mode in Python?
Loops formed with for statement in Python traverse one item at a time in a collection. Hence there is less likelihood of for loop becoming infinite. The while loop however needs to be controlled by making some provision inside the body of the loop to drive the condition mentioned in the beginning to false.This is usual...
[ { "code": null, "e": 1211, "s": 1062, "text": "Loops formed with for statement in Python traverse one item at a time in a collection. Hence there is less likelihood of for loop becoming infinite." }, { "code": null, "e": 1421, "s": 1211, "text": "The while loop however needs to b...
Remove spaces from column names in Pandas - GeeksforGeeks
29 Aug, 2020 Removing spaces from column names in pandas is not very hard we easily remove spaces from column names in pandas using replace() function. We can also replace space with another character. Let’s see the example of both one by one. Example 1: remove the space from column name Python # import pandasimport pa...
[ { "code": null, "e": 24229, "s": 24201, "text": "\n29 Aug, 2020" }, { "code": null, "e": 24460, "s": 24229, "text": "Removing spaces from column names in pandas is not very hard we easily remove spaces from column names in pandas using replace() function. We can also replace spac...
Julia Programming - Basic Syntax
The simplest first Julia program (and of many other programming languages too) is to print hello world. The script is as follows − If you have added Julia to your path, the same script can be saved in a file say hello.jl and can be run by typing Julia hello.jl at command prompt. Alternatively the same can also be run f...
[ { "code": null, "e": 2209, "s": 2078, "text": "The simplest first Julia program (and of many other programming languages too) is to print hello world. The script is as follows −" }, { "code": null, "e": 2521, "s": 2209, "text": "If you have added Julia to your path, the same scri...
Kruskal’s Minimum Spanning Tree Implementation | by Karan Kharecha | Towards Data Science
Graph is a non linear data structure that has nodes and edges. Minimum Spanning Tree is a set of edges in an undirected weighted graph that connects all the vertices with no cycles and minimum total edge weight. For finding the spanning tree, Kruskal’s algorithm is the simplest one. This content is about implementing t...
[ { "code": null, "e": 536, "s": 172, "text": "Graph is a non linear data structure that has nodes and edges. Minimum Spanning Tree is a set of edges in an undirected weighted graph that connects all the vertices with no cycles and minimum total edge weight. For finding the spanning tree, Kruskal’s al...
Data Exploration on Airbnb Singapore: 01 | by Agratama Arfiano | Towards Data Science
Hi! My name is Agra, I am an architect who is interested in the integration of architecture, urban design, real estate, and technology knowledge. This article is a write-up of my personal data science project while I am learning data science using python programming language for a few weeks. Nowadays, we live in an era...
[ { "code": null, "e": 465, "s": 172, "text": "Hi! My name is Agra, I am an architect who is interested in the integration of architecture, urban design, real estate, and technology knowledge. This article is a write-up of my personal data science project while I am learning data science using python ...
Minimum sum | Practice | GeeksforGeeks
Given an array Arr of size N such that each element is from the range 0 to 9. Find the minimum possible sum of two numbers formed using the elements of the array. All digits in the given array must be used to form the two numbers. Example 1: Input: N = 6 Arr[] = {6, 8, 4, 5, 2, 3} Output: 604 Explanation: The minimum ...
[ { "code": null, "e": 469, "s": 238, "text": "Given an array Arr of size N such that each element is from the range 0 to 9. Find the minimum possible sum of two numbers formed using the elements of the array. All digits in the given array must be used to form the two numbers." }, { "code": nu...
Draw a triangle in C++ graphics - GeeksforGeeks
02 Sep, 2020 Prerequisite: graphics.h, How to include graphics.h in CodeBlocks? The task is to write a C program to make a triangle with the line function of graphics. To run the program we have to include the below header file: #include <graphic.h> Approach: The idea is to create a triangle with the help of several l...
[ { "code": null, "e": 24018, "s": 23990, "text": "\n02 Sep, 2020" }, { "code": null, "e": 24085, "s": 24018, "text": "Prerequisite: graphics.h, How to include graphics.h in CodeBlocks?" }, { "code": null, "e": 24173, "s": 24085, "text": "The task is to write a ...
How to Access Twitter’s API using Tweepy | by Paulynn Yu | Towards Data Science
Tweet datasets are an extremely desirable corpus for aspiring (and practicing) data scientists to analyze and perform models on. Tweets are by nature short-form and contain diverse and relevant topics, making it an excellent dataset for sentiment analysis. It is also a great dataset to analyze user engagement since twe...
[ { "code": null, "e": 520, "s": 171, "text": "Tweet datasets are an extremely desirable corpus for aspiring (and practicing) data scientists to analyze and perform models on. Tweets are by nature short-form and contain diverse and relevant topics, making it an excellent dataset for sentiment analysis...