title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to form a MySQL Conditional Insert? | For this, you can insert using MySQL dual table. Let us create a table to understand the concept conditional insert. The query to create a table is as follows β
mysql> create table ConditionalInsertDemo
-> (
-> UserId int,
-> TotalUser int,
-> NumberOfItems int
-> );
Query OK, 0 rows affected (0.58 sec)
... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "For this, you can insert using MySQL dual table. Let us create a table to understand the concept conditional insert. The query to create a table is as follows β"
},
{
"code": null,
"e": 1382,
"s": 1223,
"text": "mysql> create table C... |
CSS - Pseudo Classes | CSS pseudo-classes are used to add special effects to some selectors. You do not need to use JavaScript or any other script to use those effects. A simple syntax of pseudo-classes is as follows β
selector:pseudo-class {property: value}
CSS classes can also be used with pseudo-classes β
selector.class:pseudo-class {pro... | [
{
"code": null,
"e": 2822,
"s": 2626,
"text": "CSS pseudo-classes are used to add special effects to some selectors. You do not need to use JavaScript or any other script to use those effects. A simple syntax of pseudo-classes is as follows β"
},
{
"code": null,
"e": 2863,
"s": 2822,... |
Delete Middle of Linked List | Practice | GeeksforGeeks | Given a singly linked list, delete middle of the linked list. For example, if given linked list is 1->2->3->4->5 then linked list should be modified to 1->2->4->5.
If there are even nodes, then there would be two middle nodes, we need to delete the second middle element. For example, if given linked list is 1->2->3->4-... | [
{
"code": null,
"e": 684,
"s": 238,
"text": "Given a singly linked list, delete middle of the linked list. For example, if given linked list is 1->2->3->4->5 then linked list should be modified to 1->2->4->5.\nIf there are even nodes, then there would be two middle nodes, we need to delete the secon... |
A Utopian Simplex Protocol | The Simplex protocol is data link layer protocol for transmission of frames over computer network. It is hypothetical protocol designed for unidirectional data transmission over an ideal channel, i.e. a channel through which transmission can never go wrong.
It is assumed that both the sender and the receiver are always... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "The Simplex protocol is data link layer protocol for transmission of frames over computer network. It is hypothetical protocol designed for unidirectional data transmission over an ideal channel, i.e. a channel through which transmission can never go wr... |
How to Perform Arithmetic Operation using Switch Case in PHP through HTML form ? - GeeksforGeeks | 05 Jun, 2021
We are going to perform the basic arithmetic operations like- addition, subtraction, multiplication, and division using PHP. We are using HTML form to take the input values and choose an option to perform particular operation using Switch Case.
Arithmetic Operations are used to perform operations like add... | [
{
"code": null,
"e": 24787,
"s": 24756,
"text": " \n05 Jun, 2021\n"
},
{
"code": null,
"e": 25032,
"s": 24787,
"text": "We are going to perform the basic arithmetic operations like- addition, subtraction, multiplication, and division using PHP. We are using HTML form to take the ... |
Longest Sub-Array with Sum K | Practice | GeeksforGeeks | Given an array containing N integers and an integer K., Your task is to find the length of the longest Sub-Array with the sum of the elements equal to the given value K.
Example 1:
Input :
A[] = {10, 5, 2, 7, 1, 9}
K = 15
Output : 4
Explanation:
The sub-array is {5, 2, 7, 1}.
Example 2:
Input :
A[] = {-1, 2, 3}
... | [
{
"code": null,
"e": 409,
"s": 238,
"text": "Given an array containing N integers and an integer K., Your task is to find the length of the longest Sub-Array with the sum of the elements equal to the given value K. "
},
{
"code": null,
"e": 424,
"s": 411,
"text": "Example 1:\n "
... |
Remove names or dimnames from an Object in R Programming - unname() Function - GeeksforGeeks | 16 Jun, 2020
unname() function in R Language is used to remove the names or dimnames from an Object.
Syntax: unname(x)
Parameters:x: Object
Example 1:
# R Program to remove names from an object# Creating a matrixA = matrix(c(1:9), 3, 3) # Naming rows rownames(A) = c("a", "b", "c") # Naming columns colnames(A)... | [
{
"code": null,
"e": 24565,
"s": 24537,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 24653,
"s": 24565,
"text": "unname() function in R Language is used to remove the names or dimnames from an Object."
},
{
"code": null,
"e": 24671,
"s": 24653,
"text": "Sy... |
Java Program to adjust LocalDate to last Day of Year with TemporalAdjusters class | Let us first set a date:
LocalDate localDate = LocalDate.of(2019, Month.FEBRUARY, 11);
Now, adjust LocalDate to last Day of year:
LocalDate day = localDate.with(TemporalAdjusters.lastDayOfYear());
import java.time.LocalDate;
import java.time.Month;
import java.time.temporal.TemporalAdjusters;
public class Demo {
pub... | [
{
"code": null,
"e": 1087,
"s": 1062,
"text": "Let us first set a date:"
},
{
"code": null,
"e": 1149,
"s": 1087,
"text": "LocalDate localDate = LocalDate.of(2019, Month.FEBRUARY, 11);"
},
{
"code": null,
"e": 1192,
"s": 1149,
"text": "Now, adjust LocalDate to... |
Python - Read data from MongoDB - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
So far, we have set up everything now time to... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Neo4j - Index | Neo4j SQL supports Indexes on node or relationship properties to improve the performance of the application. We can create indexes on properties for all nodes, which have the same label name.
We can use these indexed columns on MATCH or WHERE or IN operator to improve the execution of CQL command.
In this chapter, we w... | [
{
"code": null,
"e": 2531,
"s": 2339,
"text": "Neo4j SQL supports Indexes on node or relationship properties to improve the performance of the application. We can create indexes on properties for all nodes, which have the same label name."
},
{
"code": null,
"e": 2638,
"s": 2531,
... |
How regular expression alternatives work in Python? | In real world applications, we often use regular expressions that match any one of two or more alternatives. Also, we sometimes use a quantifier to apply to several expressions. All such goals are achieved by grouping with parentheses; and, in the use of alternatives, applying alternation with the vertical bar (|).
Alt... | [
{
"code": null,
"e": 1379,
"s": 1062,
"text": "In real world applications, we often use regular expressions that match any one of two or more alternatives. Also, we sometimes use a quantifier to apply to several expressions. All such goals are achieved by grouping with parentheses; and, in the use o... |
Accessing array out of bounds in C/C++ - GeeksforGeeks | 07 Jul, 2017
Perquisite : Arrays in C/C++
In high level languages such as Java, there are functions which prevent you from accessing array out of bound by generating a exception such as java.lang.ArrayIndexOutOfBoundsException. But in case of C, there is no such functionality, so programmer need to take care of this si... | [
{
"code": null,
"e": 23975,
"s": 23947,
"text": "\n07 Jul, 2017"
},
{
"code": null,
"e": 24004,
"s": 23975,
"text": "Perquisite : Arrays in C/C++"
},
{
"code": null,
"e": 24291,
"s": 24004,
"text": "In high level languages such as Java, there are functions whi... |
Accelerate Your Exploratory Data Analysis With Pandas-Profiling | by Sukanta Roy | Towards Data Science | When starting a new data science project, the first step after getting your hands on the data set for the first time is to understand it. We achieve this by performing Exploratory Data Analysis (EDA). This includes finding out the data type of each variable, the distribution of the target variable, number of distinct v... | [
{
"code": null,
"e": 592,
"s": 172,
"text": "When starting a new data science project, the first step after getting your hands on the data set for the first time is to understand it. We achieve this by performing Exploratory Data Analysis (EDA). This includes finding out the data type of each variab... |
AWS - SAM Create a generic role and attach to all lambdas - | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Here, we will create an IAM role in the SAM t... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
JasperReports - Designs | The JRXML templates (or JRXML files) in JasperReport are standard XML files, having an extension of .jrxml. All the JRXML files contain tag <jasperReport>, as root element. This in turn contains many sub-elements (all of these are optional). JasperReport framework can handle different kinds of data sources. In this tut... | [
{
"code": null,
"e": 2829,
"s": 2254,
"text": "The JRXML templates (or JRXML files) in JasperReport are standard XML files, having an extension of .jrxml. All the JRXML files contain tag <jasperReport>, as root element. This in turn contains many sub-elements (all of these are optional). JasperRepor... |
How to group dataframe rows into list in Pandas Groupby? - GeeksforGeeks | 02 Feb, 2021
Suppose you have a pandas DataFrame consisting of 2 columns and we want to group these columns. In this article, we will discuss about the same. First, let;s create the dataframe.
Python3
# importing pandas as pdimport pandas as pd # Create the data framedf = pd.DataFrame({'column1': ['A', 'B', 'C', 'A'... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 24081,
"s": 23901,
"text": "Suppose you have a pandas DataFrame consisting of 2 columns and we want to group these columns. In this article, we will discuss about the same. First, let;s creat... |
Angular7 - Http Client | HttpClient will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
To start using the http service, we need to import the module in app.module.ts as shown below β
import { BrowserM... | [
{
"code": null,
"e": 2268,
"s": 2061,
"text": "HttpClient will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service."
},
{
"code": null,
"e": 2364,
... |
Biopython - Testing Techniques | Biopython have extensive test script to test the software under different conditions to make sure that the software is bug-free. To run the test script, download the source code of the Biopython and then run the below command β
python run_tests.py
This will run all the test scripts and gives the following output β
Pyt... | [
{
"code": null,
"e": 2334,
"s": 2106,
"text": "Biopython have extensive test script to test the software under different conditions to make sure that the software is bug-free. To run the test script, download the source code of the Biopython and then run the below command β"
},
{
"code": nul... |
CSS - speak | The speak property is used to specify that the text will be used for aural media. It also specifies how it will be spoken, for example normal or spelt out.
normal β Directs the user agent to speak the text using the pronunciation rules for that element and its children.
normal β Directs the user agent to speak the text... | [
{
"code": null,
"e": 2782,
"s": 2626,
"text": "The speak property is used to specify that the text will be used for aural media. It also specifies how it will be spoken, for example normal or spelt out."
},
{
"code": null,
"e": 2897,
"s": 2782,
"text": "normal β Directs the user ... |
Creating multiple Java objects by one type only | You can create a List of object easily. Consider the following example, where I'll create an array of Employee objects and print their details in a for loop.
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
public class Tester implements Cloneable {
private int ... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "You can create a List of object easily. Consider the following example, where I'll create an array of Employee objects and print their details in a for loop."
},
{
"code": null,
"e": 1913,
"s": 1220,
"text": "import java.lang.reflect... |
Permutation Coefficient - GeeksforGeeks | 22 Feb, 2022
Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set of n elements is given by n! , where β!β represents factorial.
The Permutation Coefficient represented by P(n, k) is used to represent the number of ways to obtain an order... | [
{
"code": null,
"e": 24187,
"s": 24159,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 24385,
"s": 24187,
"text": "Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set of n elements is given by n! ... |
Cluster Analysis: Create, Visualize and Interpret Customer Segments | by Maarten Grootendorst | Towards Data Science | Although we have seen a large influx of supervised machine learning techniques being used in organizations these methods suffer from, typically, one large issue; a need for labeled data. Fortunately, many unsupervised methods exist for clustering data into previously unseen groups, thereby extracting new insights from ... | [
{
"code": null,
"e": 508,
"s": 172,
"text": "Although we have seen a large influx of supervised machine learning techniques being used in organizations these methods suffer from, typically, one large issue; a need for labeled data. Fortunately, many unsupervised methods exist for clustering data int... |
DAX Text - REPLACE function | Replaces part of a text string, based on the number of characters you specify, with a different text string.
REPLACE (<old_text>, <start_num>, <num_chars>, <new_text>)
old_text
The string of text that contains the characters you want to replace, or a reference to a column that contains text.
start_num
The starting po... | [
{
"code": null,
"e": 2110,
"s": 2001,
"text": "Replaces part of a text string, based on the number of characters you specify, with a different text string."
},
{
"code": null,
"e": 2171,
"s": 2110,
"text": "REPLACE (<old_text>, <start_num>, <num_chars>, <new_text>) \n"
},
{
... |
Program to find length of longest contiguously strictly increasing sublist after removal in Python | Suppose we have a list of numbers called nums, we have to find the maximum length of a contiguous strictly increasing sublist. We are allowed to remove at most single element from the list.
So, if the input is like nums = [35, 5, 6, 7, 8, 9, 12, 11, 26], then the output will be 7, because if we remove 12 from nums, the... | [
{
"code": null,
"e": 1252,
"s": 1062,
"text": "Suppose we have a list of numbers called nums, we have to find the maximum length of a contiguous strictly increasing sublist. We are allowed to remove at most single element from the list."
},
{
"code": null,
"e": 1501,
"s": 1252,
"... |
Putting ML in production II: logging and monitoring | by Javier Rodriguez Zaurin | Towards Data Science | In our previous post we showed how one could use the Apache Kafkaβs Python API (Kafka-Python) to productionise an algorithm in real time. In this post we will focus more on the ML aspects, more specifically on how to log information during the (re)training process and monitor the results from the experiments. To that a... | [
{
"code": null,
"e": 559,
"s": 172,
"text": "In our previous post we showed how one could use the Apache Kafkaβs Python API (Kafka-Python) to productionise an algorithm in real time. In this post we will focus more on the ML aspects, more specifically on how to log information during the (re)trainin... |
Behavior Driven Development - Quick Guide | Behavior Driven Development (BDD) is a software development process that originally emerged from Test Driven Development (TDD).
According to Dan North, who is responsible for the evolution of BDD, βBDD is using examples at multiple levels to create a shared understanding and surface uncertainty to deliver software that... | [
{
"code": null,
"e": 1860,
"s": 1732,
"text": "Behavior Driven Development (BDD) is a software development process that originally emerged from Test Driven Development (TDD)."
},
{
"code": null,
"e": 2062,
"s": 1860,
"text": "According to Dan North, who is responsible for the evo... |
How to de-register a driver from driver managerβs drivers list using JDBC? | The java.sql.DriverManager class manages JDBC drivers in your application. This class maintains a list of required drivers and load them whenever it is initialized.
Therefore, you need to register the driver class before using it. However, you need to do it only once per application.
You can register a new Driver class... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "The java.sql.DriverManager class manages JDBC drivers in your application. This class maintains a list of required drivers and load them whenever it is initialized."
},
{
"code": null,
"e": 1347,
"s": 1227,
"text": "Therefore, you ne... |
Find the maximum occurring character after performing the given operations - GeeksforGeeks | 12 Nov, 2021
Given a string str consisting of 0, 1, and *, the task is to find the maximum occurring character out of 0 and 1 after performing the given operations:
Replace * with 0 where * appears on the left side of the existing 0s in the string.
Replace * with 1 where * appears on the right side of the existing 1s... | [
{
"code": null,
"e": 24951,
"s": 24923,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 25105,
"s": 24951,
"text": "Given a string str consisting of 0, 1, and *, the task is to find the maximum occurring character out of 0 and 1 after performing the given operations: "
},
{... |
Pandas concat() tricks you should know to speed up your data analysis | by B. Chen | Towards Data Science | Pandas provides various built-in functions for easily combining DataFrames. Among them, the concat() function seems fairly straightforward to use, but there are still many tricks you should know to speed up your data analysis.
In this article, youβll learn Pandas concat() tricks to deal with the following common proble... | [
{
"code": null,
"e": 399,
"s": 172,
"text": "Pandas provides various built-in functions for easily combining DataFrames. Among them, the concat() function seems fairly straightforward to use, but there are still many tricks you should know to speed up your data analysis."
},
{
"code": null,
... |
Find LCM of two numbers | In mathematics Least Common Multiple (LCM) is the smallest possible integer, that is divisible by both numbers.
LCM can be calculated by many methods, like factorization, etc. but in this algorithm, we have multiplied the bigger number with 1, 2, 3.... n until we find a number which is divisible by the second number.
I... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "In mathematics Least Common Multiple (LCM) is the smallest possible integer, that is divisible by both numbers."
},
{
"code": null,
"e": 1381,
"s": 1174,
"text": "LCM can be calculated by many methods, like factorization, etc. but in... |
How to restart an Activity in Android? | This example demonstrates how do I restart an Activity in android.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a new project.
Step 2 β Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
x... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "This example demonstrates how do I restart an Activity in android."
},
{
"code": null,
"e": 1258,
"s": 1129,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a... |
Scheduling with ease: Cost optimization tutorial for Python | by Eric Stoltz | Towards Data Science | Congratulations! Youβre the proud new owner of the coolest store in town. To keep the operation running, you need to ensure that you have the correct number of workers scheduled for each shift. In this tutorial, weβll design the lowest cost schedule for the upcoming week.
For the coming week, each day has two shifts of... | [
{
"code": null,
"e": 444,
"s": 171,
"text": "Congratulations! Youβre the proud new owner of the coolest store in town. To keep the operation running, you need to ensure that you have the correct number of workers scheduled for each shift. In this tutorial, weβll design the lowest cost schedule for t... |
C library function - realloc() | The C library function void *realloc(void *ptr, size_t size) attempts to resize the memory block pointed to by ptr that was previously allocated with a call to malloc or calloc.
Following is the declaration for realloc() function.
void *realloc(void *ptr, size_t size)
ptr β This is the pointer to a memory block previou... | [
{
"code": null,
"e": 2185,
"s": 2007,
"text": "The C library function void *realloc(void *ptr, size_t size) attempts to resize the memory block pointed to by ptr that was previously allocated with a call to malloc or calloc."
},
{
"code": null,
"e": 2238,
"s": 2185,
"text": "Foll... |
Behave - Reports | Report generation is one of the most important steps towards the test automation framework. At the end of the execution, we cannot rely on the console output rather we should have a detailed report.
It should have the information on the count of tests that passed, failed, skipped, feature and scenario breakdown. Behave... | [
{
"code": null,
"e": 2495,
"s": 2296,
"text": "Report generation is one of the most important steps towards the test automation framework. At the end of the execution, we cannot rely on the console output rather we should have a detailed report."
},
{
"code": null,
"e": 2754,
"s": 24... |
Important functions of STL Components in C++ - GeeksforGeeks | 04 Feb, 2022
C++
// C++ code#include <iostream>#include <utility>using namespace std; int main(){ // Declaring the PAIR1 of int and char // IF pair is not initialized then , // default value of int/double is 0 and // for string/char it is NULL pair<int, char> PAIR1; cout << PAIR1.first << " "; /... | [
{
"code": null,
"e": 24107,
"s": 24079,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 24111,
"s": 24107,
"text": "C++"
},
{
"code": "// C++ code#include <iostream>#include <utility>using namespace std; int main(){ // Declaring the PAIR1 of int and char // IF pair... |
8086 program to find sum of odd numbers in a given series - GeeksforGeeks | 01 Jun, 2021
Problem β Write an Assembly Language Program to find sum of odd numbers in a given series containing 8 bit numbers stored in a continuous memory location and store the result in another memory location.
Example β
Example Explanation β
500 offset stores the counter value of the series and the elements ... | [
{
"code": null,
"e": 24707,
"s": 24679,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 24911,
"s": 24707,
"text": "Problem β Write an Assembly Language Program to find sum of odd numbers in a given series containing 8 bit numbers stored in a continuous memory location and store... |
An Introduction to Geographical Data Visualization | by Ryan Gotesman | Towards Data Science | I have always been very impressed with figures that manage to combine data with geographical information. They are some of the most beautiful examples of data visualization I can think of and the information you can gleam with a single glance is astounding.
These kinds of figures are referred to as choropleth maps and ... | [
{
"code": null,
"e": 430,
"s": 172,
"text": "I have always been very impressed with figures that manage to combine data with geographical information. They are some of the most beautiful examples of data visualization I can think of and the information you can gleam with a single glance is astoundin... |
Python Number shuffle() Method | Python number method shuffle() randomizes the items of a list in place.
Following is the syntax for shuffle() method β
shuffle (lst )
Note β This function is not accessible directly, so we need to import shuffle module and then we need to call this function using random static object.
lst β This could be a list or tup... | [
{
"code": null,
"e": 2316,
"s": 2244,
"text": "Python number method shuffle() randomizes the items of a list in place."
},
{
"code": null,
"e": 2363,
"s": 2316,
"text": "Following is the syntax for shuffle() method β"
},
{
"code": null,
"e": 2379,
"s": 2363,
"... |
Keras - Lambda Layers | Lambda is used to transform the input data using an expression or function. For example, if Lambda with expression lambda x: x ** 2 is applied to a layer, then its input data will be squared before processing.
RepeatVector has four arguments and it is as follows β
keras.layers.Lambda(function, output_shape = None, mask... | [
{
"code": null,
"e": 2261,
"s": 2051,
"text": "Lambda is used to transform the input data using an expression or function. For example, if Lambda with expression lambda x: x ** 2 is applied to a layer, then its input data will be squared before processing."
},
{
"code": null,
"e": 2316,
... |
Sum of the alphabetical values of the characters of a string in C++ | In this problem, we are given an array of string str[]. Our task is to find the score of all strings in the array. The score is defined as the product of the position of the string with the sum of the alphabetical values of the characters of the string.
Letβs take an example to understand the problem,
Input
str[] = {β... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "In this problem, we are given an array of string str[]. Our task is to find the score of all strings in the array. The score is defined as the product of the position of the string with the sum of the alphabetical values of the characters of the string.... |
ObjectInputStream defaultReadObject() method in Java with examples - GeeksforGeeks | 05 Jun, 2020
The defaultReadObject() method of the ObjectInputStream class in Java is used to read the non-static and non-transient fields of the current class from this stream.
Syntax:
public void defaultReadObject()
Parameters: This method does not accept any parameter.
Return Value: This method returns the value th... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 24113,
"s": 23948,
"text": "The defaultReadObject() method of the ObjectInputStream class in Java is used to read the non-static and non-transient fields of the current class from this stream... |
How to use Pipenv with Jupyter and VSCode | by Daniel Deutsch | Towards Data Science | This article was written in 2019. During the years of development, I have encountered various issues with the pipenv setup. I changed the environment and dependency management to using a conda environment and a requirements file with pip-compile. My latest setup is described in my new article βHow to start a data scien... | [
{
"code": null,
"e": 603,
"s": 172,
"text": "This article was written in 2019. During the years of development, I have encountered various issues with the pipenv setup. I changed the environment and dependency management to using a conda environment and a requirements file with pip-compile. My lates... |
How to add data to a TableView in JavaFX? | TableView is a component that is used to create a table populate it, and remove items from it. You can create a table view by instantiating thejavafx.scene.control.TableView class.
The following Example demonstrates how to create a TableView and add data to it.
import javafx.application.Application;
import javafx.colle... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "TableView is a component that is used to create a table populate it, and remove items from it. You can create a table view by instantiating thejavafx.scene.control.TableView class."
},
{
"code": null,
"e": 1324,
"s": 1243,
"text": "T... |
Enhancing Optimized PySpark Queries | by Ed Turner | Towards Data Science | The tale of a dream materializing
As we continue increasing the volume of data we are processing and storing, and as the velocity of technological advances transforms from linear to logarithmic and from logarithmic to horizontally asymptotic, innovative approaches to improving the run-time of our software and analysis ... | [
{
"code": null,
"e": 206,
"s": 172,
"text": "The tale of a dream materializing"
},
{
"code": null,
"e": 507,
"s": 206,
"text": "As we continue increasing the volume of data we are processing and storing, and as the velocity of technological advances transforms from linear to loga... |
numpy.transpose | This function permutes the dimension of the given array. It returns a view wherever possible. The function takes the following parameters.
numpy.transpose(arr, axes)
Where,
arr
The array to be transposed
axes
List of ints, corresponding to the dimensions. By default, the dimensions are reversed
import numpy as np
a =... | [
{
"code": null,
"e": 2382,
"s": 2243,
"text": "This function permutes the dimension of the given array. It returns a view wherever possible. The function takes the following parameters."
},
{
"code": null,
"e": 2410,
"s": 2382,
"text": "numpy.transpose(arr, axes)\n"
},
{
... |
Getting Started with Text Vectorization | by Shirley Chen | Towards Data Science | Feel free to follow me on Medium :)
Recently, I completed βBook Recommendations from Charles Darwinβ case study on DataCamp. In this project, we will learn how to implement text preprocessing and text vectorization, how to build a book recommendation system using Natural Language Processing(NLP) and detect how closely ... | [
{
"code": null,
"e": 207,
"s": 171,
"text": "Feel free to follow me on Medium :)"
},
{
"code": null,
"e": 541,
"s": 207,
"text": "Recently, I completed βBook Recommendations from Charles Darwinβ case study on DataCamp. In this project, we will learn how to implement text preproce... |
How to create a weather bot in 5 minutes | by Andrew Rudchuk | Towards Data Science | Create weather bot to get the information about the weather in the Hala.ai chat. In this tutorial we are using the service https://weatherstack.com to get the information about the current weather.
Step 1. Go to the https://weatherstack.com and sign up for a free account
Step 2.After the registration, go to the https:/... | [
{
"code": null,
"e": 369,
"s": 171,
"text": "Create weather bot to get the information about the weather in the Hala.ai chat. In this tutorial we are using the service https://weatherstack.com to get the information about the current weather."
},
{
"code": null,
"e": 443,
"s": 369,
... |
Maximum number of strings that can be formed with given zeros and ones - GeeksforGeeks | 09 Aug, 2021
Given a list of strings arr[] of zeros and ones only and two integer N and M, where N is the number of 1βs and M is the number of 0βs. The task is to find the maximum number of strings from the given list of strings that can be constructured with given number of 0βs and 1βs.
Examples:
Input: arr[] = {β10β... | [
{
"code": null,
"e": 24700,
"s": 24672,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 24976,
"s": 24700,
"text": "Given a list of strings arr[] of zeros and ones only and two integer N and M, where N is the number of 1βs and M is the number of 0βs. The task is to find the maxi... |
Remove First Node of the Linked List using C++ | Given a linked list, we need to remove its first element and return the pointer to the head of the new list.
Input : 1 -> 2 -> 3 -> 4 -> 5 -> NULL
Output : 2 -> 3 -> 4 -> 5 -> NULL
Input : 2 -> 4 -> 6 -> 8 -> 33 -> 67 -> NULL
Output : 4 -> 6 -> 8 -> 33 -> 67 -> NULL
In the given problem, we need to remove the first no... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "Given a linked list, we need to remove its first element and return the pointer to the head of the new list."
},
{
"code": null,
"e": 1330,
"s": 1171,
"text": "Input : 1 -> 2 -> 3 -> 4 -> 5 -> NULL\nOutput : 2 -> 3 -> 4 -> 5 -> NULL\... |
PHP - Function MySQLi Num Rows | int mysqli_num_rows ( mysqli_result $result );
It returns the number of rows in a result set
It returns the number of rows in a result set.
result
It is a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result()
Try out the following example
<?php
$connection_mysql = mysqli_con... | [
{
"code": null,
"e": 2805,
"s": 2757,
"text": "int mysqli_num_rows ( mysqli_result $result );\n"
},
{
"code": null,
"e": 2851,
"s": 2805,
"text": "It returns the number of rows in a result set"
},
{
"code": null,
"e": 2898,
"s": 2851,
"text": "It returns the n... |
Exploring the Python Pandas Library | by Sadrach Pierre, Ph.D. | Towards Data Science | Pandas is a python library used for analyzing, transforming, and generating statistics from data. In this post, we will discuss several useful methods in Pandas for data wrangling and exploration. For our purposes, we will be using the Medical Cost Personal Datasets data from Kaggle.
Letβs get started!
To begin, letβs ... | [
{
"code": null,
"e": 457,
"s": 172,
"text": "Pandas is a python library used for analyzing, transforming, and generating statistics from data. In this post, we will discuss several useful methods in Pandas for data wrangling and exploration. For our purposes, we will be using the Medical Cost Person... |
Python | Assign multiple variables with list values - GeeksforGeeks | 02 Jan, 2019
We generally come through the task of getting certain index values and assigning variables out of them. The general approach we follow is to extract each list element by its index and then assign it to variables. This approach requires more line of code. Letβs discuss certain ways to do this task in compac... | [
{
"code": null,
"e": 24442,
"s": 24414,
"text": "\n02 Jan, 2019"
},
{
"code": null,
"e": 24782,
"s": 24442,
"text": "We generally come through the task of getting certain index values and assigning variables out of them. The general approach we follow is to extract each list elem... |
C library function - modf() | The C library function double modf(double x, double *integer) returns the fraction component (part after the decimal), and sets integer to the integer component.
Following is the declaration for modf() function.
double modf(double x, double *integer)
x β This is the floating point value.
x β This is the floating point ... | [
{
"code": null,
"e": 2169,
"s": 2007,
"text": "The C library function double modf(double x, double *integer) returns the fraction component (part after the decimal), and sets integer to the integer component."
},
{
"code": null,
"e": 2219,
"s": 2169,
"text": "Following is the dec... |
Chef - Files & Packages | In Chef, creating configuration files and moving packages are the key components. There are multiple ways how Chef manages the same. There are multiple ways how Chef supports in dealing with the files and software packages.
Step 1 β Edit the default recipe of the cookbook.
vipin@laptop:~/chef-repo $ subl cookbooks/test... | [
{
"code": null,
"e": 2604,
"s": 2380,
"text": "In Chef, creating configuration files and moving packages are the key components. There are multiple ways how Chef manages the same. There are multiple ways how Chef supports in dealing with the files and software packages."
},
{
"code": null,
... |
Check if array is sorted | Practice | GeeksforGeeks | Given an array arr[] of size N, check if it is sorted in non-decreasing order or not.
Example 1:
Input:
N = 5
arr[] = {10, 20, 30, 40, 50}
Output: 1
Explanation: The given array is sorted.
Example 2:
Input:
N = 6
arr[] = {90, 80, 100, 70, 40, 30}
Output: 0
Explanation: The given array is not sorted.
Your Task:
You d... | [
{
"code": null,
"e": 325,
"s": 238,
"text": "Given an array arr[] of size N, check if it is sorted in non-decreasing order or not. "
},
{
"code": null,
"e": 336,
"s": 325,
"text": "Example 1:"
},
{
"code": null,
"e": 429,
"s": 336,
"text": "Input:\nN = 5\narr[... |
How to get all the available azure VM images using Azure CLI in PowerShell? | To get all the available azure VM images using Azure CLI, you can use the command az vm image.
The below command will retrieve all the available azure images in the marketplace.
PS C:\> az vm image list --all
The above command will take some time to retrieve the output. To get the output into the table format, use the ... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To get all the available azure VM images using Azure CLI, you can use the command az vm image."
},
{
"code": null,
"e": 1240,
"s": 1157,
"text": "The below command will retrieve all the available azure images in the marketplace."
}... |
Find All Numbers Disappeared in an Array in C++ | Suppose we have an array of n elements. Some elements appear twice and other appear once. Elements are in range 1 <= A[i] <= n. We have to find those elements that are not present in the array. The constraint is that we have to solve this problem without using extra space, and time will be O(n).
So if the array is [4, ... | [
{
"code": null,
"e": 1359,
"s": 1062,
"text": "Suppose we have an array of n elements. Some elements appear twice and other appear once. Elements are in range 1 <= A[i] <= n. We have to find those elements that are not present in the array. The constraint is that we have to solve this problem withou... |
Dimensional Data Modeling - GeeksforGeeks | 24 Sep, 2021
Popular Schema β Star Schema, Snow Flake Schema
Dimensional Data Modelling is one of the data modelling techniques used in data warehouse design.
Goal: Improve the data retrieval.
The concept of Dimensional Modelling was developed by Ralph Kimball which is comprised of facts and dimension tables. Since ... | [
{
"code": null,
"e": 24023,
"s": 23995,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 24073,
"s": 24023,
"text": "Popular Schema β Star Schema, Snow Flake Schema "
},
{
"code": null,
"e": 24172,
"s": 24073,
"text": "Dimensional Data Modelling is one of the... |
Primβs MST for Adjacency List Representation | It is similar to the previous algorithm. Here the only difference is, the Graph G(V, E) is represented by an adjacency list.
Time complexity adjacency list representation is O(E log V).
Input:
The cost matrix:
Output:
Edge: A--B And Cost: 1
Edge: B--E And Cost: 2
Edge: A--C And Cost: 3
Edge: A--D And Cost: 4
Edge: E--... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "It is similar to the previous algorithm. Here the only difference is, the Graph G(V, E) is represented by an adjacency list."
},
{
"code": null,
"e": 1248,
"s": 1187,
"text": "Time complexity adjacency list representation is O(E log ... |
Difference Between Iterator and Spliterator in Java - GeeksforGeeks | 15 Oct, 2020
The Java Iterator interface represents an object capable of iterating through a collection of Java objects, one object at a time. The Iterator interface is one of the oldest mechanisms in Java for iterating collections of objects (although not the oldest β Enumerator predated Iterator).
Moreover, an iterat... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 25146,
"s": 24858,
"text": "The Java Iterator interface represents an object capable of iterating through a collection of Java objects, one object at a time. The Iterator interface is one of ... |
Databricks Delta Lake β Database on top of a Data Lake β Part 1 | by Manoj Kukreja | Towards Data Science | Going back 8 years, I still remember the days when I was adopting Big Data frameworks like Hadoop and Spark. Coming from a database background this adaptation was challenging for many reasons. The most challenging was the lack of database like transactions in Big Data frameworks. To cover for this missing functionality... | [
{
"code": null,
"e": 654,
"s": 172,
"text": "Going back 8 years, I still remember the days when I was adopting Big Data frameworks like Hadoop and Spark. Coming from a database background this adaptation was challenging for many reasons. The most challenging was the lack of database like transaction... |
Real-Time Head Pose Estimation in Python | Towards Data Science | Head pose estimation is a challenging problem in computer vision because of the various steps required to solve it. Firstly, we need to locate the face in the frame and then the various facial landmarks. Now, recognizing the face seems a trivial task in this day and that is true with faces facing the camera. The proble... | [
{
"code": null,
"e": 705,
"s": 47,
"text": "Head pose estimation is a challenging problem in computer vision because of the various steps required to solve it. Firstly, we need to locate the face in the frame and then the various facial landmarks. Now, recognizing the face seems a trivial task in th... |
How to create a qqplot with confidence interval in R? | A qqplot is the plot of quantiles that helps to understand whether the supplied data comes from the specified distribution, mostly it is used to check whether the data follows normal distribution or not. If we want to create the qqplot with confidence interval then qqPlot function of car package can be used as shown in... | [
{
"code": null,
"e": 1402,
"s": 1062,
"text": "A qqplot is the plot of quantiles that helps to understand whether the supplied data comes from the specified distribution, mostly it is used to check whether the data follows normal distribution or not. If we want to create the qqplot with confidence i... |
Tutorial: Using Deep Learning and CNNs to make a Hand Gesture recognition model | by Filipe Borba | Towards Data Science | First, hereβs the Github repository with the code. The project is in the format of a Jupyter Notebook, which can be uploaded to Google Colaboratory to work without environment issues.
Machine Learning is very useful for a variety of real-life problems. It is commonly used for tasks such as classification, recognition, ... | [
{
"code": null,
"e": 230,
"s": 46,
"text": "First, hereβs the Github repository with the code. The project is in the format of a Jupyter Notebook, which can be uploaded to Google Colaboratory to work without environment issues."
},
{
"code": null,
"e": 642,
"s": 230,
"text": "Mac... |
How to deploy Airflow on AWS: best practices | by AndreΜ Sionek | Towards Data Science | I created a repo to deploy Airflow on AWS following software engineering best practices. You can go straight there if you donβt feel like reading this post. But I do describe some things you might find useful here.
Run a docker-compose command and voiΜla, you have Airflow running on your local environment, and you are ... | [
{
"code": null,
"e": 387,
"s": 172,
"text": "I created a repo to deploy Airflow on AWS following software engineering best practices. You can go straight there if you donβt feel like reading this post. But I do describe some things you might find useful here."
},
{
"code": null,
"e": 731... |
Electron - File Handling | File handling is a very important part of building a desktop application. Almost all desktop apps interact with files.
We will create a form in our app that will take as input, a Name and an Email address. This form will be saved to a file and a list will be created that will show this as output.
Set up your main proce... | [
{
"code": null,
"e": 2184,
"s": 2065,
"text": "File handling is a very important part of building a desktop application. Almost all desktop apps interact with files."
},
{
"code": null,
"e": 2363,
"s": 2184,
"text": "We will create a form in our app that will take as input, a Nam... |
Find element at given index after a number of rotations - GeeksforGeeks | 26 Oct, 2021
An array consisting of N integers is given. There are several Right Circular Rotations of range[L..R] that we perform. After performing these rotations, we need to find element at a given index.Examples :
Input : arr[] : {1, 2, 3, 4, 5}
ranges[] = { {0, 2}, {0, 3} }
index : 1
Output : 3
E... | [
{
"code": null,
"e": 40885,
"s": 40857,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 41092,
"s": 40885,
"text": "An array consisting of N integers is given. There are several Right Circular Rotations of range[L..R] that we perform. After performing these rotations, we need to... |
Android - Clipboard | Android provides the clipboard framework for copying and pasting different types of data. The data could be text, images, binary stream data or other complex data types.
Android provides the library of ClipboardManager and ClipData and ClipData.item to use the copying and pasting framework.In order to use clipboard fra... | [
{
"code": null,
"e": 3777,
"s": 3607,
"text": "Android provides the clipboard framework for copying and pasting different types of data. The data could be text, images, binary stream data or other complex data types."
},
{
"code": null,
"e": 4027,
"s": 3777,
"text": "Android prov... |
Python Debugger β Python pdb - GeeksforGeeks | 03 Jan, 2021
Debugging in Python is facilitated by pdb module(python debugger) which comes built-in to the Python standard library. It is actually defined as the class Pdb which internally makes use of bdb(basic debugger functions) and cmd(support for line-oriented command interpreters) modules. The major advantage of ... | [
{
"code": null,
"e": 23808,
"s": 23780,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 24277,
"s": 23808,
"text": "Debugging in Python is facilitated by pdb module(python debugger) which comes built-in to the Python standard library. It is actually defined as the class Pdb whic... |
PouchDB - Replication | One of the most important features of PouchDB is replication, i.e. you can make a copy of a database. You can replicate either a PouchDB instance stored locally or a CouchDB instance stored remotely.
Following is the syntax of replicating a database in PouchDB. Here, a copy of the source database is the target. To this... | [
{
"code": null,
"e": 2253,
"s": 2053,
"text": "One of the most important features of PouchDB is replication, i.e. you can make a copy of a database. You can replicate either a PouchDB instance stored locally or a CouchDB instance stored remotely."
},
{
"code": null,
"e": 2514,
"s": 2... |
Sort the words in lexicographical order in C# | Firstly, set a string array β
string[] arr = new string[] {
"Indian",
"Moroccon",
"American",
};
To sort the words in lexicographical order β
var sort = from a in arr
orderby a
select a;
Live Demo
Let us see the complete code β
using System;
using System.Linq;
class Program {
static void Main() {
st... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Firstly, set a string array β"
},
{
"code": null,
"e": 1168,
"s": 1092,
"text": "string[] arr = new string[] {\n \"Indian\",\n \"Moroccon\",\n \"American\",\n};"
},
{
"code": null,
"e": 1213,
"s": 1168,
"tex... |
Efficiently Streaming a Large AWS S3 File via S3 Select | by Idris Rampurawala | Towards Data Science | AWS S3 is an industry-leading object storage service. We tend to store lots of data files on S3 and at times require processing these files. If the size of the file that we are processing is small, we can basically go with traditional file processing flow, wherein we fetch the file from S3 and then process it row by ro... | [
{
"code": null,
"e": 572,
"s": 171,
"text": "AWS S3 is an industry-leading object storage service. We tend to store lots of data files on S3 and at times require processing these files. If the size of the file that we are processing is small, we can basically go with traditional file processing flow... |
Yet Another Twitter Sentiment Analysis Part 1 β tackling class imbalance | by Ricky Kim | Towards Data Science | I finished an 11-part series blog posts on Twitter sentiment analysis not long ago. Why do I want to do the sentiment analysis again? I wanted to extend further and run sentiment analysis on real retrieved tweets. And there are other limits to my previous sentiment analysis project.
The project stopped at the final tra... | [
{
"code": null,
"e": 456,
"s": 172,
"text": "I finished an 11-part series blog posts on Twitter sentiment analysis not long ago. Why do I want to do the sentiment analysis again? I wanted to extend further and run sentiment analysis on real retrieved tweets. And there are other limits to my previous... |
Intuitive Guide to Convolution Neural Networks | by Thushan Ganegedara | Towards Data Science | This is the second article on my series introducing machine learning concepts with while stepping very lightly on mathematics. If you missed previous article you can find in here (on KL divergence). Fun fact, Iβm going to make this an interesting adventure by introducing some machine learning concept for every letter i... | [
{
"code": null,
"e": 541,
"s": 172,
"text": "This is the second article on my series introducing machine learning concepts with while stepping very lightly on mathematics. If you missed previous article you can find in here (on KL divergence). Fun fact, Iβm going to make this an interesting adventur... |
Python - MCQ Quiz Game using Tkinter - GeeksforGeeks | 20 Apr, 2022
Prerequisite: Python GUI β tkinter
Python provides a standard GUI framework Tkinter which is used to develop fast and easy GUI applications. Here we will be developing a simple multiple-choice quiz in python with GUI. We will be creating a multiple choice quiz in Python with Tkinter. First, we will create ... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 23960,
"s": 23925,
"text": "Prerequisite: Python GUI β tkinter"
},
{
"code": null,
"e": 24290,
"s": 23960,
"text": "Python provides a standard GUI framework Tkinter which ... |
C++ Program To Find Decimal Equivalent Of Binary Linked List - GeeksforGeeks | 03 Jan, 2022
Given a singly linked list of 0s and 1s find its decimal equivalent.
Input: 0->0->0->1->1->0->0->1->0
Output: 50
Input: 1->0->0
Output: 4
The decimal value of an empty linked list is considered as 0.
Initialize the result as 0. Traverse the linked list and for each node, multiply the result by 2 and ad... | [
{
"code": null,
"e": 24215,
"s": 24187,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 24284,
"s": 24215,
"text": "Given a singly linked list of 0s and 1s find its decimal equivalent."
},
{
"code": null,
"e": 24357,
"s": 24284,
"text": "Input: 0->0->0->1->1-... |
What is SimpleDateFormat in Java? | The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string.
One of the constructors of this class accepts a String value representing the desired date format and creates SimpleDateFormat object. To parse/convert a string as a Date object
Instantiate this class by passing desire... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string."
},
{
"code": null,
"e": 1342,
"s": 1164,
"text": "One of the constructors of this class accepts a String value representing the de... |
Program to find Perimeter / Circumference of Square and Rectangle in C++ | In this problem, we are given the side of a square (A) and the length and breadth of a rectangle (L and B). Our task is to create a Program to find Perimeter / Circumference of Square and Rectangle in C++.
To find the circumference of a square, we need the side of the square (a). For that, we will use the formula for t... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "In this problem, we are given the side of a square (A) and the length and breadth of a rectangle (L and B). Our task is to create a Program to find Perimeter / Circumference of Square and Rectangle in C++."
},
{
"code": null,
"e": 1422,
... |
Logic and implementation of a spam filter machine learning algorithm | by Lily Chen | Towards Data Science | Below is an email caught by Gmailβs spam filter. How did the spam filter decide this was a spam?
In this article, I talk about Naive Bayes algorithm for spam classification.
We know all of the words that this email contains:
[want, to, maximize, your, time, ..., save, on, the, breakers, bonus]
At the high level, the wa... | [
{
"code": null,
"e": 268,
"s": 171,
"text": "Below is an email caught by Gmailβs spam filter. How did the spam filter decide this was a spam?"
},
{
"code": null,
"e": 345,
"s": 268,
"text": "In this article, I talk about Naive Bayes algorithm for spam classification."
},
{
... |
Assign other value to a variable from two possible values in C++ | we have to assign a variable the value of other variables from two possible values without using any conditional operator.
In this problem, we are given a variable let's say a which can have a value of any of the two variables x and y. Now, we have to create a program to assign the value of another than its current val... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "we have to assign a variable the value of other variables from two possible values without using any conditional operator."
},
{
"code": null,
"e": 1460,
"s": 1185,
"text": "In this problem, we are given a variable let's say a which ... |
Dealing with Imbalanced dataset. Techniques to handle imbalanced data | by Vaibhav Jayaswal | Towards Data Science | The imbalanced dataset in real-world problems is not so rare. In layman terms, an imbalanced dataset is a dataset where classes are distributed unequally. An imbalanced data can create problems in the classification task. Before delving into the handling of imbalanced data, we should know the issues that an imbalanced ... | [
{
"code": null,
"e": 512,
"s": 172,
"text": "The imbalanced dataset in real-world problems is not so rare. In layman terms, an imbalanced dataset is a dataset where classes are distributed unequally. An imbalanced data can create problems in the classification task. Before delving into the handling ... |
How to use search functionality in custom list view in Android? | This example demonstrates how do I use the search functionality in custom listview in android.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a new project.
Step 2 β Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="u... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "This example demonstrates how do I use the search functionality in custom listview in android."
},
{
"code": null,
"e": 1286,
"s": 1157,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all ... |
SVM Hyperparameters Explained with Visualizations | by Soner YΔ±ldΔ±rΔ±m | Towards Data Science | Support Vector Machine (SVM) is a widely-used supervised machine learning algorithm. It is mostly used in classification tasks but suitable for regression tasks as well.
In this post, we dive deep into two important hyperparameters of SVMs, C and gamma, and explain their effects with visualizations. So I will assume yo... | [
{
"code": null,
"e": 341,
"s": 171,
"text": "Support Vector Machine (SVM) is a widely-used supervised machine learning algorithm. It is mostly used in classification tasks but suitable for regression tasks as well."
},
{
"code": null,
"e": 573,
"s": 341,
"text": "In this post, we... |
BabylonJS - Mesh AssetsManager | With assestsmanager class, you can load meshes, images and binaryfiles in the scene.
var assetsManager = new BABYLON.AssetsManager(scene);
<!doctype html>
<html>
<head>
<meta charset = "utf-8">
<title>BabylonJs - Basic Element-Creating Scene</title>
<script src = "babylon.js"></script>
<styl... | [
{
"code": null,
"e": 2268,
"s": 2183,
"text": "With assestsmanager class, you can load meshes, images and binaryfiles in the scene."
},
{
"code": null,
"e": 2323,
"s": 2268,
"text": "var assetsManager = new BABYLON.AssetsManager(scene);\n"
},
{
"code": null,
"e": 4105... |
How to create windows loading effect using HTML and CSS ? - GeeksforGeeks | 09 Mar, 2021
In this article, we are going to create a window loading effect before the lock screen appears using HTML and CSS.
Glipmse of the Windows Loading Effect:
Approach:
Create an HTML file that contains HTML div in which we are giving the loader effect.
Then we create 5 span elements which are used for creatin... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 25492,
"s": 25376,
"text": "In this article, we are going to create a window loading effect before the lock screen appears using HTML and CSS. "
},
{
"code": null,
"e": 25531,
... |
Smallest distinct window | Practice | GeeksforGeeks | Given a string 's'. The task is to find the smallest window length that contains all the characters of the given string at least one time.
For eg. A = aabcbcdbca, then the result would be 4 as of the smallest window will be dbca.
Example 1:
Input : "AABBBCBBAC"
Output : 3
Explanation : Sub-string -> "BAC"
Input : "a... | [
{
"code": null,
"e": 468,
"s": 238,
"text": "Given a string 's'. The task is to find the smallest window length that contains all the characters of the given string at least one time.\nFor eg. A = aabcbcdbca, then the result would be 4 as of the smallest window will be dbca."
},
{
"code": nu... |
Difference Between predict and predict_proba in scikit-learn | Towards Data Science | When training models (and more precisely supervised estimators) with sklearn, we sometimes need to predict the actual class while in some other occasions we may want to predict the class probabilities.
In todayβs article we will discuss how to use predict and predict_proba methods over a dataset in order to perform pre... | [
{
"code": null,
"e": 374,
"s": 172,
"text": "When training models (and more precisely supervised estimators) with sklearn, we sometimes need to predict the actual class while in some other occasions we may want to predict the class probabilities."
},
{
"code": null,
"e": 612,
"s": 37... |
Extra brackets with function names in C/C++ - GeeksforGeeks | 21 Jun, 2018
Consider below C program. The program has extra bracket around function name.
// C program to show that extra brackets with function// name work#include <stdio.h> void (foo)(int n){ printf("Function : %d ", n);} int main(){ (foo)(4); return 0; }
Output:
Function 4
So putting extra bracket with fun... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n21 Jun, 2018"
},
{
"code": null,
"e": 24310,
"s": 24232,
"text": "Consider below C program. The program has extra bracket around function name."
},
{
"code": "// C program to show that extra brackets with function// name ... |
Fetch records in MongoDB on querying its subset | You can use $all operator. Let us first create a collection with documents β
> db.subsetOfAnArrayDemo.insertOne({"StudentProgrammingSkills":
["Java","MongoDB","MySQL","C++","Data Structure","Algorithm","Python","Oracle","SQL Server"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cb9d1e1895c4fd159f80804... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "You can use $all operator. Let us first create a collection with documents β"
},
{
"code": null,
"e": 1387,
"s": 1139,
"text": "> db.subsetOfAnArrayDemo.insertOne({\"StudentProgrammingSkills\":\n [\"Java\",\"MongoDB\",\"MySQL\",\"C... |
Expressive words problem case in JavaScript | Sometimes people repeat letters to represent extra feeling, such as "hello" β> "heeellooo", "hi" β> "hiiii". In these strings like "heeellooo", we have groups of adjacent letters that are all the same: "h", "eee", "ll", "ooo".
For some given string S, a query word is stretchy if it can be made to be equal to S by any n... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "Sometimes people repeat letters to represent extra feeling, such as \"hello\" β> \"heeellooo\", \"hi\" β> \"hiiii\". In these strings like \"heeellooo\", we have groups of adjacent letters that are all the same: \"h\", \"eee\", \"ll\", \"ooo\"."
},
... |
Set the background color of an element with CSS | To set the background color of an element, use the background-color property.
You can try to run the following code to learn how to work with the background-color property:
<html>
<head>
<body>
<p style = "background-color:blue;">
This text has a blue background color.</p>
</body>
</... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To set the background color of an element, use the background-color property."
},
{
"code": null,
"e": 1235,
"s": 1140,
"text": "You can try to run the following code to learn how to work with the background-color property:"
},
{... |
Perceptrons, Logical Functions, and the XOR problem | by Francesco Cicala | Towards Data Science | Today we will explore what a Perceptron can do, what are its limitations, and we will prepare the ground to overreach these limits! Everything supported by graphs and code.
In Part 1 of this series, we introduced the Perceptron as a model that implements the following function:
For a particular choice of the parameters... | [
{
"code": null,
"e": 345,
"s": 172,
"text": "Today we will explore what a Perceptron can do, what are its limitations, and we will prepare the ground to overreach these limits! Everything supported by graphs and code."
},
{
"code": null,
"e": 451,
"s": 345,
"text": "In Part 1 of ... |
How to make loops run faster using Python? | This is a language agnostic question. Loops are there in almost every language and the same principles apply everywhere. You need to realize that compilers do most heavy lifting when it comes to loop optimization, but you as a programmer also need to keep your loops optimized.
It is important to realize that everything... | [
{
"code": null,
"e": 1340,
"s": 1062,
"text": "This is a language agnostic question. Loops are there in almost every language and the same principles apply everywhere. You need to realize that compilers do most heavy lifting when it comes to loop optimization, but you as a programmer also need to ke... |
What is Modulus Operator (%) in JavaScript? | The Modulus operator (%) outputs the remainder of an integer division.
You can try to run the following code to learn how to work with Modulus (%) operator.
<html>
<body>
<script>
var a = 33;
var b = 10;
document.write("a % b = ");
result = a % b;
document.write(re... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "The Modulus operator (%) outputs the remainder of an integer division."
},
{
"code": null,
"e": 1219,
"s": 1133,
"text": "You can try to run the following code to learn how to work with Modulus (%) operator."
},
{
"code": nul... |
Geospatial adventures. Step 2: Pandas vs. GeoPandas | by Dmitry Selemir | Towards Data Science | Having introduced shapely in my first post, itβs time to look at some interesting geo datasets and in order to do that we can not possibly do without Pandas and more specifically GeoPandas. I am going to assume you have come across Pandas before and will try and highlight some of the differences between the two and mor... | [
{
"code": null,
"e": 543,
"s": 171,
"text": "Having introduced shapely in my first post, itβs time to look at some interesting geo datasets and in order to do that we can not possibly do without Pandas and more specifically GeoPandas. I am going to assume you have come across Pandas before and will ... |
Predicting Hotel Reservation Cancellations with Machine Learning | by Egemen Zeytinci | Towards Data Science | As you can imagine, the cancellation rate for bookings in the online booking industry is quite high. Once the reservation has been cancelled, there is almost nothing to be done. This creates discomfort for many institutions and creates a desire to take precautions. Therefore, predicting reservations that can be cancell... | [
{
"code": null,
"e": 580,
"s": 172,
"text": "As you can imagine, the cancellation rate for bookings in the online booking industry is quite high. Once the reservation has been cancelled, there is almost nothing to be done. This creates discomfort for many institutions and creates a desire to take pr... |
Different possible marks for n questions and negative marking - GeeksforGeeks | 09 Mar, 2022
Given the number of questions as , and marks for the correct answer as and marks for the incorrect answer. One can either attempt to solve the question in an examination and get either marks if the answer is right, or marks if the answer is wrong, or leave the question unattended and get marks. The task is... | [
{
"code": null,
"e": 25061,
"s": 25033,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 25473,
"s": 25061,
"text": "Given the number of questions as , and marks for the correct answer as and marks for the incorrect answer. One can either attempt to solve the question in an exami... |
Hardware Protection and Type of Hardware Protection - GeeksforGeeks | 31 May, 2021
In this article, we are going to learn about hardware protection and itβs the type. so first letβs see the type of hardware which is used in a computer system. we know that a computer system contains the hardware like processor, monitor, RAM and many more, and one thing that the operating system ensures th... | [
{
"code": null,
"e": 24594,
"s": 24566,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24960,
"s": 24594,
"text": "In this article, we are going to learn about hardware protection and itβs the type. so first letβs see the type of hardware which is used in a computer system. we ... |
SequenceMatcher in Python for Longest Common Substring - GeeksforGeeks | 11 Dec, 2017
Given two strings βXβ and βYβ, print the longest common sub-string.
Examples:
Input : X = "GeeksforGeeks",
Y = "GeeksQuiz"
Output : Geeks
Input : X = "zxabcdezy",
Y = "yzabcdezx"
Output : abcdez
We have existing solution for this problem please refer Print the longest common substring... | [
{
"code": null,
"e": 24577,
"s": 24549,
"text": "\n11 Dec, 2017"
},
{
"code": null,
"e": 24645,
"s": 24577,
"text": "Given two strings βXβ and βYβ, print the longest common sub-string."
},
{
"code": null,
"e": 24655,
"s": 24645,
"text": "Examples:"
},
{
... |
The Amazon Data Analyst Interview | by Jay Feng | Towards Data Science | Amazon is one of the largest online markets in the world, and unlike the traditional market place, Amazon is gigantic! and it is filled with millions and millions of products on display. In the USA only, Amazon controls more than half of the online market, and since its inception in 1994, it has worked to achieve its u... | [
{
"code": null,
"e": 562,
"s": 171,
"text": "Amazon is one of the largest online markets in the world, and unlike the traditional market place, Amazon is gigantic! and it is filled with millions and millions of products on display. In the USA only, Amazon controls more than half of the online market... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.