title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to launch activity only once when Android app is opened for the first time? | This example demonstrates about How to launch activity only once when Android app is opened for the first time.
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=... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "This example demonstrates about How to launch activity only once when Android app is opened for the first time."
},
{
"code": null,
"e": 1303,
"s": 1174,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Proj... |
Image Segmentation Using Keras and W&B | by Ayush Thakur | Towards Data Science | Are you interested to know where an object is in the image? What is the shape of the object? Which pixels belong to the object? To accomplish this, we need to segment the image, i.e., classify each pixel of the image to the object it belongs to or give each pixel of the image a label contrary to giving one label to an ... | [
{
"code": null,
"e": 499,
"s": 172,
"text": "Are you interested to know where an object is in the image? What is the shape of the object? Which pixels belong to the object? To accomplish this, we need to segment the image, i.e., classify each pixel of the image to the object it belongs to or give ea... |
MySQL ANALYZE TABLE Statement | The MySQL ANALYZE statement analyzes the specified table. This statement has three syntaxes −
This statement stores the key distribution analysis of the specified table(s). Following is the syntax of this table −
ANALYZE [NO_WRITE_TO_BINLOG | LOCAL]
TABLE tbl_name [, tbl_name] ...
Assume we have created a table wit... | [
{
"code": null,
"e": 2427,
"s": 2333,
"text": "The MySQL ANALYZE statement analyzes the specified table. This statement has three syntaxes −"
},
{
"code": null,
"e": 2546,
"s": 2427,
"text": "This statement stores the key distribution analysis of the specified table(s). Following... |
Single-node and distributed Deep Learning on Databricks | by Luuk van der Velden | Towards Data Science | by Luuk van der Velden & Rik Jongerius
Databricks is an analytics Eco-system now available on most major cloud providers Google, AWS, and Azure. Databricks cluster computations use the distributed Spark engine. Recently introduced single-node Spark clusters do not support distributed computations, why?
On multi-node cl... | [
{
"code": null,
"e": 210,
"s": 171,
"text": "by Luuk van der Velden & Rik Jongerius"
},
{
"code": null,
"e": 475,
"s": 210,
"text": "Databricks is an analytics Eco-system now available on most major cloud providers Google, AWS, and Azure. Databricks cluster computations use the d... |
How to display HTML in TextView in Android? | In Some situations, we should need to show HTML as text in android. Here is the simple solution to show HTML in TextView 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... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "In Some situations, we should need to show HTML as text in android. Here is the simple solution to show HTML in TextView in android."
},
{
"code": null,
"e": 1323,
"s": 1195,
"text": "Step 1 − Create a new project in Android Studio,g... |
Xamarin - Android Resources | When a new Android project is created, there are some files that are added to the project, by default. We call these default project files and folders as Android Resources. Take a look at the following screenshot.
The default Android resources include the following −
AndroidManifest.xml file − It contains information a... | [
{
"code": null,
"e": 2178,
"s": 1964,
"text": "When a new Android project is created, there are some files that are added to the project, by default. We call these default project files and folders as Android Resources. Take a look at the following screenshot."
},
{
"code": null,
"e": 22... |
ReactJS MDBootstrap List Group Component - GeeksforGeeks | 10 Jan, 2022
MDBootstrap is a Material Design and bootstrap-based react that is used to make good-looking webpages with its seamless and easy-to-use component. In this article, we will know how to use List Group Component in ReactJS MDBootstrap. List groups are a flexible and powerful component for displaying a series ... | [
{
"code": null,
"e": 24397,
"s": 24369,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 24716,
"s": 24397,
"text": "MDBootstrap is a Material Design and bootstrap-based react that is used to make good-looking webpages with its seamless and easy-to-use component. In this article,... |
Display all the Files in Perl | There are various ways to list down all the files available in a particular directory using Perl. First let's use the simple way to get and list down all the files using the glob operator −
#!/usr/bin/perl
# Display all the files in /tmp directory.
$dir = "/tmp/*";
my @files = glob( $dir );
foreach (@files ) {
print... | [
{
"code": null,
"e": 1252,
"s": 1062,
"text": "There are various ways to list down all the files available in a particular directory using Perl. First let's use the simple way to get and list down all the files using the glob operator −"
},
{
"code": null,
"e": 1794,
"s": 1252,
"... |
ARIMA Model Time Series | Towards Data Science | Climate Change is real. What makes it worse is because of the human activities that are not environment friendly, in the example using fossil fuel for the vehicle, coal-powered generator, cement production, etc. One of the effects of these activities is increasing in temperature and depletion on the ozone layer.
As we ... | [
{
"code": null,
"e": 486,
"s": 172,
"text": "Climate Change is real. What makes it worse is because of the human activities that are not environment friendly, in the example using fossil fuel for the vehicle, coal-powered generator, cement production, etc. One of the effects of these activities is i... |
How can we create an exception filter to handle unhandled exceptions in C#
ASP.NET WebAPI? | An exception filter is executed when a controller method throws any unhandled
exception that is not an HttpResponseException exception. The
HttpResponseException type is a special case, because it is designed specifically for
returning an HTTP response.
Exception filters implement the System.Web.Http.Filters.IException... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "An exception filter is executed when a controller method throws any unhandled\nexception that is not an HttpResponseException exception. The\nHttpResponseException type is a special case, because it is designed specifically for\nreturning an HTTP respon... |
Add two numbers represented by linked lists? | Here we will see how to add two numbers stored into separate linked list. In the linked list, each digit of the numbers is stored. If the number is 512, then it will be stored like below −
512 = (5)-->(1)-->(2)-->NULL
We are providing two lists of this type, our task is to add them and get the result after calculating ... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "Here we will see how to add two numbers stored into separate linked list. In the linked list, each digit of the numbers is stored. If the number is 512, then it will be stored like below −"
},
{
"code": null,
"e": 1280,
"s": 1251,
"t... |
Exploratory Data Analysis on Heart Disease UCI data set** | by Aishah Ismail | Towards Data Science | Exploratory Data Analysis (EDA) is a pre-processing step to understand the data. There are numerous methods and steps in performing EDA, however, most of them are specific, focusing on either visualization or distribution, and are incomplete. Therefore, here, I will walk-through step-by-step to understand, explore, and... | [
{
"code": null,
"e": 703,
"s": 172,
"text": "Exploratory Data Analysis (EDA) is a pre-processing step to understand the data. There are numerous methods and steps in performing EDA, however, most of them are specific, focusing on either visualization or distribution, and are incomplete. Therefore, h... |
Program to remove all nodes of a linked list whose value is same as in Python | Suppose we have a singly linked list, and one target, we have to return the same linked after
deleting all nodes whose value is same as target.
So, if the input is like [5,8,2,6,5,2,9,6,2,4], then the output will be [5, 8, 6, 5, 9, 6, 4, ]
To solve this, we will follow these steps −
head := node
while node and node.nex... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "Suppose we have a singly linked list, and one target, we have to return the same linked after\ndeleting all nodes whose value is same as target."
},
{
"code": null,
"e": 1302,
"s": 1206,
"text": "So, if the input is like [5,8,2,6,5,2... |
Spring - Static Pages Example | The following example shows how to write a simple web-based application using Spring MVC Framework, which can access static pages along with dynamic pages with the help of <mvc:resources> tag. To start with, let us have a working Eclipse IDE in place and take the following steps to develope a Dynamic Form based Web App... | [
{
"code": null,
"e": 2650,
"s": 2292,
"text": "The following example shows how to write a simple web-based application using Spring MVC Framework, which can access static pages along with dynamic pages with the help of <mvc:resources> tag. To start with, let us have a working Eclipse IDE in place an... |
How to find numeric columns in Pandas? | To find numeric columns in Pandas, we can make a list of integers and then include it into select_dtypes() method. Let's take an example and see how to apply this method.
Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.
Print the input DataFrame, df.
Make a list of data type, i.e., nu... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "To find numeric columns in Pandas, we can make a list of integers and then include it into select_dtypes() method. Let's take an example and see how to apply this method."
},
{
"code": null,
"e": 1317,
"s": 1233,
"text": "Create a tw... |
What is the use of underscore keyword in Java 9? | In earlier versions of Java, the underscore ("_") has used as an identifier or to create a variable name. Since Java 9, the underscore character is a reserved keyword and can't be used as an identifier or variable name. If we use a single underscore character as an identifier, the program fails to compile and throws a ... | [
{
"code": null,
"e": 1495,
"s": 1062,
"text": "In earlier versions of Java, the underscore (\"_\") has used as an identifier or to create a variable name. Since Java 9, the underscore character is a reserved keyword and can't be used as an identifier or variable name. If we use a single underscore c... |
A Deep Dive Into Data Quality. A real world introduction to data... | by Gary Cheung | Towards Data Science | Data quality is often seen as the unglamorous component to working with data. Ironically, it’s usually the component that takes up the majority of our time. Data quality might very well be the single most important component of a data pipeline, since, without a level of confidence and reliability in your data, the dash... | [
{
"code": null,
"e": 546,
"s": 171,
"text": "Data quality is often seen as the unglamorous component to working with data. Ironically, it’s usually the component that takes up the majority of our time. Data quality might very well be the single most important component of a data pipeline, since, wit... |
Find duplicates in an array | Practice | GeeksforGeeks | Given an array a[] of size N which contains elements from 0 to N-1, you need to find all the elements occurring more than once in the given array.
Example 1:
Input:
N = 4
a[] = {0,3,1,2}
Output: -1
Explanation: N=4 and all elements from 0
to (N-1 = 3) are present in the given
array. Therefore output is -1.
Example 2:
... | [
{
"code": null,
"e": 385,
"s": 238,
"text": "Given an array a[] of size N which contains elements from 0 to N-1, you need to find all the elements occurring more than once in the given array."
},
{
"code": null,
"e": 396,
"s": 385,
"text": "Example 1:"
},
{
"code": null,
... |
MySQL ALTER TABLE Statement | The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
The ALTER TABLE statement is also used to add and drop various constraints on
an existing table.
To add a column in a table, use the following syntax:
The following SQL adds an "Email" column to the "Customers" table:
To delete a... | [
{
"code": null,
"e": 90,
"s": 0,
"text": "The ALTER TABLE statement is used to add, delete, or modify columns in an existing table."
},
{
"code": null,
"e": 188,
"s": 90,
"text": "The ALTER TABLE statement is also used to add and drop various constraints on \nan existing table."
... |
Terminator – A Linux terminal emulator | 30 Jun, 2021
As the name suggests, ‘Terminator’ is a pretty badass emulator which provides you with functionalities like split horizontally, split vertically, etc, as one wants in a single window. Not only does it provide split horizontally or vertically, but, also one can give a custom title to each and every terminal... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 443,
"s": 52,
"text": "As the name suggests, ‘Terminator’ is a pretty badass emulator which provides you with functionalities like split horizontally, split vertically, etc, as one wants in a singl... |
numpy.linspace() in Python | 19 May, 2022
The numpy.linspace() function returns number spaces evenly w.r.t interval. Similar to numpy.arange() function but instead of step it uses sample number. Syntax :
numpy.linspace(start,
stop,
num = 50,
endpoint = True,
retstep = False,
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 May, 2022"
},
{
"code": null,
"e": 216,
"s": 52,
"text": "The numpy.linspace() function returns number spaces evenly w.r.t interval. Similar to numpy.arange() function but instead of step it uses sample number. Syntax : "
},
{
... |
Scrape Instagram using Instagramy in Python | 17 May, 2022
In this article, we will learn how can we get Instagram profile details using web scraping. Python provides powerful tools for web scraping, we will be using Instagramy here. This tool is specifically made for Instagram and also analyzes the data using Pandas.
The python package Instagramy is used to scrap... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 313,
"s": 52,
"text": "In this article, we will learn how can we get Instagram profile details using web scraping. Python provides powerful tools for web scraping, we will be using Instagramy here.... |
HTML | DOM Canvas Object | 11 Jul, 2022
The DOM Canvas Object is used to represent the HTML <Canvas> element. The <canvas> tag is used to draw a graphics in the document using javascript. It is new in HTML5. The canvas element is accessed by getElementById().
Syntax:
accessed by getElementById("id").
Where “id” is the ID assigned to the Canvas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "The DOM Canvas Object is used to represent the HTML <Canvas> element. The <canvas> tag is used to draw a graphics in the document using javascript. It is new in HTML5. The can... |
Number System and Base Conversions | 07 Jul, 2021
Electronic and Digital systems may use a variety of different number systems, (e.g. Decimal, Hexadecimal, Octal, Binary).
A number N in base or radix b can be written as:
(N)b = dn-1 dn-2 -- -- -- -- d1 d0 . d-1 d-2 -- -- -- -- d-m
In the above, dn-1 to d0 is the integer part, then follows a radix point,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 175,
"s": 52,
"text": "Electronic and Digital systems may use a variety of different number systems, (e.g. Decimal, Hexadecimal, Octal, Binary). "
},
{
"code": null,
"e": 225,
"s": ... |
Fix “Android emulator gets killed” Error in Android Studio | 09 May, 2021
Sometimes, (maybe after updating Android Studio) you might encounter a strange error, which might cause you a nightmare, the error is thrown by the Studio itself and it says:
Error while waiting for device: The emulator process for AVD was killed
Uggh...Now, what’s this error all about? Why did it happen ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "Sometimes, (maybe after updating Android Studio) you might encounter a strange error, which might cause you a nightmare, the error is thrown by the Studio itself and it says: ... |
Difference between List and ArrayList in Java | 20 Oct, 2021
A Collection is a group of individual objects represented as a single unit. Java provides Collection Framework which defines several classes and interfaces to represent a group of objects as a single unit This framework consists of the List Interface as well as the ArrayList class. In this article, the dif... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 412,
"s": 52,
"text": "A Collection is a group of individual objects represented as a single unit. Java provides Collection Framework which defines several classes and interfaces to represent a gro... |
Calculate Cumulative Sum of a Numeric Object in R Programming – cumsum() Function | 12 Apr, 2022
The cumulative sum can be defined as the sum of a set of numbers as the sum value grows with the sequence of numbers.
cumsum() function in R Language is used to calculate the cumulative sum of the vector passed as argument.
Syntax: cumsum(x)
Parameters:
x: Numeric Object
Example 1:
Python3
# R program t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "The cumulative sum can be defined as the sum of a set of numbers as the sum value grows with the sequence of numbers."
},
{
"code": null,
"e": 252,
"s": 146,
... |
Rearrange an array in maximum minimum form | Set 2 (O(1) extra space) | 15 Jun, 2022
Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, third-second max, fourth-second min and so on. Examples:
Input: arr[] = {1, 2, 3, 4, 5, 6, 7} Output: arr[] = {7, 1, 6, 2, 5, 3, 4}Input: arr[] = {1, 2, 3, 4, 5, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 254,
"s": 52,
"text": "Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, third-second max, fourth-secon... |
Python – Move all files from subfolders to main folder | 06 Jun, 2021
This article will discuss how to move all files from the subfolder to the main folder using Python. The approach is simple it is similar to moving files from one folder to another using Python, except here the main folder or parent folder of the subfolder is passed as the destination.
OS Module: OS module ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 314,
"s": 28,
"text": "This article will discuss how to move all files from the subfolder to the main folder using Python. The approach is simple it is similar to moving files from one folder to ano... |
Iterative Tower of Hanoi - GeeksforGeeks | 25 Feb, 2022
The Tower of Hanoi is a mathematical puzzle. It consists of three poles and a number of disks of different sizes which can slide onto any poles. The puzzle starts with the disk in a neat stack in ascending order of size in one pole, the smallest at the top thus making a conical shape. The objective of the ... | [
{
"code": null,
"e": 23845,
"s": 23817,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 24313,
"s": 23845,
"text": "The Tower of Hanoi is a mathematical puzzle. It consists of three poles and a number of disks of different sizes which can slide onto any poles. The puzzle starts ... |
How to use the Properties file to declare global variables in a framework in Selenium? | We can declare global variables in Selenium with the help of the Properties class which works with .properties file. In the .properties file, the data is stored in key value pairs. We can read and write values in the .properties file.
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "We can declare global variables in Selenium with the help of the Properties class which works with .properties file. In the .properties file, the data is stored in key value pairs. We can read and write values in the .properties file."
},
{
"cod... |
Clojure - Atoms | Atoms are a data type in Clojure that provide a way to manage shared, synchronous, independent state. An atom is just like any reference type in any other programming language. The primary use of an atom is to hold Clojure’s immutable datastructures. The value held by an atom is changed with the swap! method.
Internall... | [
{
"code": null,
"e": 2685,
"s": 2374,
"text": "Atoms are a data type in Clojure that provide a way to manage shared, synchronous, independent state. An atom is just like any reference type in any other programming language. The primary use of an atom is to hold Clojure’s immutable datastructures. Th... |
Java command line arguments | A command-line argument is an information that directly follows the program's name on the command line when it is executed. To access the command-line arguments inside a Java program is quite easy. They are stored as strings in the String array passed to main( ).
The following program displays all of the command-line a... | [
{
"code": null,
"e": 1326,
"s": 1062,
"text": "A command-line argument is an information that directly follows the program's name on the command line when it is executed. To access the command-line arguments inside a Java program is quite easy. They are stored as strings in the String array passed t... |
Android - Animations | Animation is the process of creating motion and shape change
Animation in android is possible from many ways. In this chapter we will discuss one easy and widely used way of making animation called tweened animation.
Tween Animation takes some parameters such as start value , end value, size , time duration , rotation ... | [
{
"code": null,
"e": 3668,
"s": 3607,
"text": "Animation is the process of creating motion and shape change"
},
{
"code": null,
"e": 3824,
"s": 3668,
"text": "Animation in android is possible from many ways. In this chapter we will discuss one easy and widely used way of making a... |
Get a List of Installed Softwares in Windows using Python - GeeksforGeeks | 01 Oct, 2020
In this article, we are going to write a Python script to get the installed software list in windows. We will use the subprocess module to interact with cmd and to retrieve information into your Python IDE. We can read the cmd command through the subprocess module.
Let’s see the logic, if we run this wmic ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24558,
"s": 24292,
"text": "In this article, we are going to write a Python script to get the installed software list in windows. We will use the subprocess module to interact with cmd and to... |
JSP - Syntax | In this chapter, we will discuss Syntax in JSP. We will understand the basic use of simple syntax (i.e, elements) involved with JSP development.
The elements of JSP have been described below −
A scriptlet can contain any number of JAVA language statements, variable or method declarations, or expressions that are valid ... | [
{
"code": null,
"e": 2384,
"s": 2239,
"text": "In this chapter, we will discuss Syntax in JSP. We will understand the basic use of simple syntax (i.e, elements) involved with JSP development."
},
{
"code": null,
"e": 2432,
"s": 2384,
"text": "The elements of JSP have been describ... |
Generating new faces with Variational Autoencoders | by Dhanush Kamath | Towards Data Science | Deep generative models are gaining tremendous popularity, both in the industry as well as academic research. The idea of a computer program generating new human faces or new animals can be quite exciting. Deep generative models take a slightly different approach compared to supervised learning which we shall discuss ve... | [
{
"code": null,
"e": 376,
"s": 47,
"text": "Deep generative models are gaining tremendous popularity, both in the industry as well as academic research. The idea of a computer program generating new human faces or new animals can be quite exciting. Deep generative models take a slightly different ap... |
How to pass string to a component using Angular2 ? - GeeksforGeeks | 15 Apr, 2020
In angular2, a component is considered as a ‘view’ with its own logic and data. Data binding is the process of combining data values with their corresponding representations. For components, string values can be passed, either directly as string literals or by storing the string literal in a variable. Ther... | [
{
"code": null,
"e": 24466,
"s": 24438,
"text": "\n15 Apr, 2020"
},
{
"code": null,
"e": 24916,
"s": 24466,
"text": "In angular2, a component is considered as a ‘view’ with its own logic and data. Data binding is the process of combining data values with their corresponding repre... |
Tryit Editor v3.6 - Show Python | import matplotlib.pyplot as plt
x = numpy.random.uniform(0.0, 5.0, 100000) | [
{
"code": null,
"e": 45,
"s": 13,
"text": "import matplotlib.pyplot as plt"
},
{
"code": null,
"e": 47,
"s": 45,
"text": ""
}
] |
File Handling in Julia - GeeksforGeeks | 10 Jul, 2020
Julia is a high-level, high-performance, and dynamic programming language that supports file Handling i.e., to read and write files. It is much easier for Julia to open, read, and write files as compared to various other languages. It has a similar way to handle the file as compared to python. It provides ... | [
{
"code": null,
"e": 24206,
"s": 24178,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 24978,
"s": 24206,
"text": "Julia is a high-level, high-performance, and dynamic programming language that supports file Handling i.e., to read and write files. It is much easier for Julia to... |
Sublime Text - Spell Check | Sublime Text Editor uses Hunspell for spell checking process. Hunspell is the spell checker of LibreOffice, Mozilla Thunderbird, Google chrome and many proprietary packages. Sublime Text editor includes dictionary support for proper spell check of words.
Sublime Text includes UTF-8 encoded dictionaries. To implement a ... | [
{
"code": null,
"e": 2712,
"s": 2457,
"text": "Sublime Text Editor uses Hunspell for spell checking process. Hunspell is the spell checker of LibreOffice, Mozilla Thunderbird, Google chrome and many proprietary packages. Sublime Text editor includes dictionary support for proper spell check of words... |
How to contain your first Django in docker and access it from AWS | by Abdelilah OUASSINI | Towards Data Science | Today, a lot of junior software engineering Jobs require a tech stack including Django, python, docker, and AWS. If you are a beginner and want to discover these techs, then you are in the right place. I will guide you through this article to get hands dirty manipulating theses tools and creating your first Python Djan... | [
{
"code": null,
"e": 551,
"s": 171,
"text": "Today, a lot of junior software engineering Jobs require a tech stack including Django, python, docker, and AWS. If you are a beginner and want to discover these techs, then you are in the right place. I will guide you through this article to get hands di... |
AngularJS | ng-required Directive - GeeksforGeeks | 28 Mar, 2019
The ng-required Directive in AngularJS is used to specify the required attribute of an HTML element. The input field in the form is required only if the expression inside ng-required directive returns true. It is Supported by <input>, <select> and <textarea>.
Syntax:
<element ng-required="expression"> Cont... | [
{
"code": null,
"e": 23896,
"s": 23868,
"text": "\n28 Mar, 2019"
},
{
"code": null,
"e": 24156,
"s": 23896,
"text": "The ng-required Directive in AngularJS is used to specify the required attribute of an HTML element. The input field in the form is required only if the expression... |
Python program to Display Hostname and IP address? | Python provides gethostname(),gethostbyname() two function. gethostname() retrives the standard host name for the local machine. gethostbyname() retrives host information corresponding to a host name from a host database.
Socket. gethostname()
Socket. gethostbyname()
Step 1: use module socket.
Step 2: use gethostname(... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "Python provides gethostname(),gethostbyname() two function. gethostname() retrives the standard host name for the local machine. gethostbyname() retrives host information corresponding to a host name from a host database."
},
{
"code": null,
... |
JavaFX | CubicCurve with examples - GeeksforGeeks | 06 Aug, 2018
CubicCurve is a part of JavaFX.The CubiCurve class defines a cubic Bézier parametric curve segment in (x, y) coordinate space. The Cubic curve passes through the starting point and the ending point and also passes through the two control points. The control points are specified as Bézier control points.C... | [
{
"code": null,
"e": 24513,
"s": 24485,
"text": "\n06 Aug, 2018"
},
{
"code": null,
"e": 24851,
"s": 24513,
"text": "CubicCurve is a part of JavaFX.The CubiCurve class defines a cubic Bézier parametric curve segment in (x, y) coordinate space. The Cubic curve passes through the ... |
How to print a triangle formed of '#' using JavaScript? | To print a triangle formed of “#”, you need to use a nested “for loop”.
Try the following code to print a triangle −
Live Demo
<html>
<head>
<body>
<p>Printing a triangle</p>
<script>
var i, j;
for(i=1; i < 5; i++) {
//inner loop
for(j=1; j... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "To print a triangle formed of “#”, you need to use a nested “for loop”."
},
{
"code": null,
"e": 1179,
"s": 1134,
"text": "Try the following code to print a triangle −"
},
{
"code": null,
"e": 1189,
"s": 1179,
"te... |
Normalization vs Standardization, which one is better | by Tanu N Prabhu | Towards Data Science | As we all know feature engineering is a problem of transforming raw data into a dataset. There are various feature engineering techniques available out there. The two most widely used and commonly confused feature engineering techniques are:
Normalization
Standardization
Today on this beautiful day or night we will exp... | [
{
"code": null,
"e": 414,
"s": 172,
"text": "As we all know feature engineering is a problem of transforming raw data into a dataset. There are various feature engineering techniques available out there. The two most widely used and commonly confused feature engineering techniques are:"
},
{
... |
Calling virtual methods in constructor/destructor in C++ - GeeksforGeeks | 18 Aug, 2021
Prerequisite: Virtual Function in C++Calling virtual functions from a constructor or destructor is considered dangerous most of the times and must be avoided whenever possible. All the C++ implementations need to call the version of the function defined at the level of the hierarchy in the current construc... | [
{
"code": null,
"e": 24124,
"s": 24096,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 24572,
"s": 24124,
"text": "Prerequisite: Virtual Function in C++Calling virtual functions from a constructor or destructor is considered dangerous most of the times and must be avoided whene... |
Does a constructor have a return type in Java? | No, constructor does not have any return type in Java.
Constructor looks like method but it is not. It does not have a return type and its name is same as the class name. Mostly it is used to instantiate the instance variables of a class.
If the programmer doesn’t write a constructor the compiler writes a constructors ... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "No, constructor does not have any return type in Java."
},
{
"code": null,
"e": 1301,
"s": 1117,
"text": "Constructor looks like method but it is not. It does not have a return type and its name is same as the class name. Mostly it i... |
DirectX - Window Events | This chapter will focus on the events used in DirectX. It includes various user actions which can be detected by Windows. Whenever a particular event occurs, a notification is sent which describes about the event.
The life cycle of processing the events is mentioned below −
Whenever a new event is created, it is kept i... | [
{
"code": null,
"e": 2512,
"s": 2298,
"text": "This chapter will focus on the events used in DirectX. It includes various user actions which can be detected by Windows. Whenever a particular event occurs, a notification is sent which describes about the event."
},
{
"code": null,
"e": 25... |
Poisson Process and Poisson Distribution in real-life: modeling peak times at an ice cream shop | by Carolina Bento | Towards Data Science | Several phenomena in the real world can be represented as counts of things. For example, the number of flights departing from an airport, number customers lining up at the store register, the number of earthquakes occurring in a year at a specific region.
Counting events is a relatively simple task, but if you want to ... | [
{
"code": null,
"e": 428,
"s": 172,
"text": "Several phenomena in the real world can be represented as counts of things. For example, the number of flights departing from an airport, number customers lining up at the store register, the number of earthquakes occurring in a year at a specific region.... |
Time-Series Forecasting: Predicting Stock Prices Using An LSTM Model | by Serafeim Loukas | Towards Data Science | Traditionally most machine learning (ML) models use as input features some observations (samples / examples) but there is no time dimension in the data.
Time-series forecasting models are the models that are capable to predict future values based on previously observed values. Time-series forecasting is widely used for... | [
{
"code": null,
"e": 325,
"s": 172,
"text": "Traditionally most machine learning (ML) models use as input features some observations (samples / examples) but there is no time dimension in the data."
},
{
"code": null,
"e": 690,
"s": 325,
"text": "Time-series forecasting models ar... |
XML - Elements | XML elements can be defined as building blocks of an XML. Elements can behave as containers to hold text, elements, attributes, media objects or all of these.
Each XML document contains one or more elements, the scope of which are either delimited by start and end tags, or for empty elements, by an empty-element tag.
F... | [
{
"code": null,
"e": 2120,
"s": 1961,
"text": "XML elements can be defined as building blocks of an XML. Elements can behave as containers to hold text, elements, attributes, media objects or all of these."
},
{
"code": null,
"e": 2280,
"s": 2120,
"text": "Each XML document conta... |
Delete a given node in Linked List under given constraints - GeeksforGeeks | 22 Feb, 2022
Given a Singly Linked List, write a function to delete a given node. Your function must follow following constraints: 1) It must accept a pointer to the start node as the first parameter and node to be deleted as the second parameter i.e., a pointer to head node is not global. 2) It should not return a poi... | [
{
"code": null,
"e": 24606,
"s": 24578,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 25727,
"s": 24606,
"text": "Given a Singly Linked List, write a function to delete a given node. Your function must follow following constraints: 1) It must accept a pointer to the start node... |
HTML <input> width Attribute | The width attribute of the <input> element is only used with image and allows you to set the width of the image added using −
<input type=”image”>
The width attribute introduced in HTML5 and acts as the submit button. Following is the syntax −
<input width="pixels">
Above, width represents the width in pixels.
Let us n... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "The width attribute of the <input> element is only used with image and allows you to set the width of the image added using −"
},
{
"code": null,
"e": 1209,
"s": 1188,
"text": "<input type=”image”>"
},
{
"code": null,
"e"... |
C Program for Bubble Sort on Linked List - GeeksforGeeks | 15 Oct, 2018
Given a singly linked list, sort it using bubble sort.
Input : 10->30->20->5
Output : 5->10->20->30
Input : 20->4->3
Output : 3->4->20
// C program to implement Bubble Sort on singly linked list#include<stdio.h>#include<stdlib.h> /* structure for a node */struct Node{ int data; struct Node *next;};... | [
{
"code": null,
"e": 24906,
"s": 24878,
"text": "\n15 Oct, 2018"
},
{
"code": null,
"e": 24961,
"s": 24906,
"text": "Given a singly linked list, sort it using bubble sort."
},
{
"code": null,
"e": 25042,
"s": 24961,
"text": "Input : 10->30->20->5\nOutput : 5->... |
AI with Python â NLTK Package | In this chapter, we will learn how to get started with the Natural Language Toolkit Package.
If we want to build applications with Natural Language processing then the change in context makes it most difficult. The context factor influences how the machine understands a particular sentence. Hence, we need to develop Na... | [
{
"code": null,
"e": 2298,
"s": 2205,
"text": "In this chapter, we will learn how to get started with the Natural Language Toolkit Package."
},
{
"code": null,
"e": 2670,
"s": 2298,
"text": "If we want to build applications with Natural Language processing then the change in cont... |
Check if rows of a Matrix can be rearranged to make Bitwise XOR of first column non-zero - GeeksforGeeks | 23 Apr, 2021
Given a matrix mat[][] of size N * M, the task is to check if it is possible to rearrange the row elements of the matrix such that Bitwise XOR of the first column element is non-zero. If it is possible then print “Yes” else print “No”.
Examples:
Input: mat[][] = {{1, 1, 2}, {2, 2, 2}, {3, 3, 3}}Output: Yes... | [
{
"code": null,
"e": 25506,
"s": 25478,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 25742,
"s": 25506,
"text": "Given a matrix mat[][] of size N * M, the task is to check if it is possible to rearrange the row elements of the matrix such that Bitwise XOR of the first column ... |
Python program to compare two Pandas series | In this program, we will declare two Pandas series and compare their elements. Before we solve the problem, we need to import the Pandas library into our local IDE. This can be done by installing Pandas on our local machine. The command for installing Pandas is −
pip install pandas
Series1 = [2,4,6,8,10]Series2 = [1,3,... | [
{
"code": null,
"e": 1326,
"s": 1062,
"text": "In this program, we will declare two Pandas series and compare their elements. Before we solve the problem, we need to import the Pandas library into our local IDE. This can be done by installing Pandas on our local machine. The command for installing P... |
How to create an array of strings in JavaScript? | To create an array of strings in JavaScript, simply assign values −
var animals = ["Time", "Money", "Work"];
You can also use the new keyword to create an array of strings in JavaScript −
var animals = new Array("Time", "Money", "Work");
The Array parameter is a list of strings or integers. When you specify a single nu... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To create an array of strings in JavaScript, simply assign values −"
},
{
"code": null,
"e": 1171,
"s": 1130,
"text": "var animals = [\"Time\", \"Money\", \"Work\"];"
},
{
"code": null,
"e": 1250,
"s": 1171,
"text... |
Posix Character Class \p{Alnum} Match | The character class \p{Alnum} matches any alphanumeric character.
The following example shows the usage of Posix character class matching.
package com.tutorialspoint;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PosixCharacterClassDemo {
private static final String REGEX = "\\p{Alnu... | [
{
"code": null,
"e": 2190,
"s": 2124,
"text": "The character class \\p{Alnum} matches any alphanumeric character."
},
{
"code": null,
"e": 2263,
"s": 2190,
"text": "The following example shows the usage of Posix character class matching."
},
{
"code": null,
"e": 2870,... |
How can I get the href of elements found by partial link text using Selenium? | We can get the href of elements found by partial link text with Selenium webdriver. First of all we need to identify the links with help of the find_elements_by_partial_link_text() method.
Next to get hold of href of the links we have to use the get_attribute() method and
then pass href as a parameter to the method.
Le... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "We can get the href of elements found by partial link text with Selenium webdriver. First of all we need to identify the links with help of the find_elements_by_partial_link_text() method."
},
{
"code": null,
"e": 1380,
"s": 1251,
"t... |
Python | os.system() method - GeeksforGeeks | 20 Jun, 2019
The OS module in python provides functions for interacting with the operating system. OS, comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.system() method execute the command (a string) in a subshell. This method is imp... | [
{
"code": null,
"e": 24178,
"s": 24150,
"text": "\n20 Jun, 2019"
},
{
"code": null,
"e": 24402,
"s": 24178,
"text": "The OS module in python provides functions for interacting with the operating system. OS, comes under Python’s standard utility modules. This module provides a por... |
MySQL - Quick Guide | A database is a separate application that stores a collection of data. Each database has one or more distinct APIs for creating, accessing, managing, searching and replicating the data it holds.
Other kinds of data stores can also be used, such as files on the file system or large hash tables in memory but data fetchin... | [
{
"code": null,
"e": 2528,
"s": 2333,
"text": "A database is a separate application that stores a collection of data. Each database has one or more distinct APIs for creating, accessing, managing, searching and replicating the data it holds."
},
{
"code": null,
"e": 2725,
"s": 2528,
... |
How do you get assembler output from C/C++ source in gcc? | Here we will see how to generate assembler output from C or C++ code using gcc.
The gcc provides a great feature to get all intermediate outputs from a source code while executing. To get the assembler output we can use the option ‘-S’ for the gcc. This option shows the output after compiling, but before sending to the... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Here we will see how to generate assembler output from C or C++ code using gcc."
},
{
"code": null,
"e": 1436,
"s": 1142,
"text": "The gcc provides a great feature to get all intermediate outputs from a source code while executing. T... |
How to query on top N rows in MongoDB? | To query on top N rows in MongoDB, you can use aggregate framework. Let us create a collection with documents
> db.topNRowsDemo.insertOne({"StudentName":"Larry","Score":78});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ca26eee6304881c5ce84b91")
}
> db.topNRowsDemo.insertOne({"StudentName":"Chris","Score":4... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "To query on top N rows in MongoDB, you can use aggregate framework. Let us create a collection with documents"
},
{
"code": null,
"e": 1919,
"s": 1172,
"text": "> db.topNRowsDemo.insertOne({\"StudentName\":\"Larry\",\"Score\":78});\n... |
An introduction to Information Theory for Data Science | by Gabriel de Longeaux | Towards Data Science | This article aims to present briefly the concept of quantity of information, within the framework of information theory, and to outline possible uses of this idea in the field of data analysis. From these simple elements, I was led to considerations on a measure of multivariate nonlinear correlations presented in this ... | [
{
"code": null,
"e": 501,
"s": 172,
"text": "This article aims to present briefly the concept of quantity of information, within the framework of information theory, and to outline possible uses of this idea in the field of data analysis. From these simple elements, I was led to considerations on a ... |
How to subtract date from today's date in JavaScript? | You need to use currentDate with the help of new Date().getDate(). The syntax is as follows −
var anyVariableName= yourCurrentDate - yourSubstractDateOfCurrentMonth;
var currentDate=new Date().getDate();
var substractDate=new Date("2020-07-01").getDate();
const numberOfDaysInCurrentMonthOnly = currentDate-substractDate... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "You need to use currentDate with the help of new Date().getDate(). The syntax is as follows −"
},
{
"code": null,
"e": 1228,
"s": 1156,
"text": "var anyVariableName= yourCurrentDate - yourSubstractDateOfCurrentMonth;"
},
{
"c... |
Collectors maxBy() method in Java 8 | The maxBy() method of the Collectors class in Java 8 returns a Collector that produces the maximal element according to a given Comparator, described as an Optional<T>.
The syntax is as follows
static <T> Collector<T,?,Optional<T>> maxBy(Comparator<? super T> comparator)
Here, the parameters
T - Type of the input eleme... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "The maxBy() method of the Collectors class in Java 8 returns a Collector that produces the maximal element according to a given Comparator, described as an Optional<T>."
},
{
"code": null,
"e": 1256,
"s": 1231,
"text": "The syntax is... |
How to set table width in HTML? | To set the table width in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <table> tag, with the CSS property width. HTML5 do not support the width attribute of <table>, so the CSS property width is used with the style attribute to set tabl... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "To set the table width in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <table> tag, with the CSS property width. HTML5 do not support the width attribute of <table>, so ... |
How to compare two strings without case sensitive in Java | The equalsIgnoreCase() method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
Live Demo
public class Sample {
public static void main(String args[]) {
String Str1 = new String(... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "The equalsIgnoreCase() method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object."
},
{
"code": null,
... |
Python - Data Operations | Python handles data of various formats mainly through the two libraries, Pandas and Numpy. We have already seen the important features of these two libraries in the previous chapters. In this chapter we will see some basic examples from each of the libraries on how to operate on data.
The most important object defined ... | [
{
"code": null,
"e": 2815,
"s": 2529,
"text": "Python handles data of various formats mainly through the two libraries, Pandas and Numpy. We have already seen the important features of these two libraries in the previous chapters. In this chapter we will see some basic examples from each of the libr... |
Java Swing BorderFactory Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to learn how 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,
... |
Java Examples - String buffering | How to buffer strings ?
Following example buffers strings and flushes it by using emit() method.
public class StringBuffer {
public static void main(String[] args) {
countTo_N_Improved();
}
private final static int MAX_LENGTH = 30;
private static String buffer = "";
private static void emit(Str... | [
{
"code": null,
"e": 2092,
"s": 2068,
"text": "How to buffer strings ?"
},
{
"code": null,
"e": 2165,
"s": 2092,
"text": "Following example buffers strings and flushes it by using emit() method."
},
{
"code": null,
"e": 2752,
"s": 2165,
"text": "public class S... |
C Program to find size of a File | This is a C Program to find size of a File.
Begin
function findfileSize()
Open a file pointer fp in read only mode.
If fp is equals to null then
Print “File not found” and return -1.
Else count the file size.
Close the file.
Put the file pointer at the beginning of the file
Declare a integ... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "This is a C Program to find size of a File."
},
{
"code": null,
"e": 1508,
"s": 1106,
"text": "Begin\n function findfileSize()\n Open a file pointer fp in read only mode.\n If fp is equals to null then\n Print “File not fo... |
Python | Bilateral Filtering - GeeksforGeeks | 31 Oct, 2021
A bilateral filter is used for smoothening images and reducing noise, while preserving edges. This article explains an approach using the averaging filter, while this article provides one using a median filter. However, these convolutions often result in a loss of important edge information, since they blu... | [
{
"code": null,
"e": 41448,
"s": 41420,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 41890,
"s": 41448,
"text": "A bilateral filter is used for smoothening images and reducing noise, while preserving edges. This article explains an approach using the averaging filter, while t... |
Machine Learning with Koalas and Spark | by MA Raza, Ph.D. | Towards Data Science | Pandas is considered a de-facto data analysis library written in python. Most of the data scientists or machine learning engineers start with Pandas and Numpy before moving to other libraries. No once can debate around the use of Pandas as a standard data processing library. There are a lot of benefits of using Pandas ... | [
{
"code": null,
"e": 636,
"s": 172,
"text": "Pandas is considered a de-facto data analysis library written in python. Most of the data scientists or machine learning engineers start with Pandas and Numpy before moving to other libraries. No once can debate around the use of Pandas as a standard data... |
Python Design Patterns - Strategy | The strategy pattern is a type of behavioral pattern. The main goal of strategy pattern is to enable client to choose from different algorithms or procedures to complete the specified task. Different algorithms can be swapped in and out without any complications for the mentioned task.
This pattern can be used to impro... | [
{
"code": null,
"e": 2766,
"s": 2479,
"text": "The strategy pattern is a type of behavioral pattern. The main goal of strategy pattern is to enable client to choose from different algorithms or procedures to complete the specified task. Different algorithms can be swapped in and out without any comp... |
MySQL - IN Clause | You can use IN clause to replace many OR conditions
To understand IN clause, consider an employee_tbl table, which is having the following records −
mysql> SELECT * FROM employee_tbl;
+------+------+------------+--------------------+
| id | name | work_date | daily_typing_pages |
+------+------+------------+--------... | [
{
"code": null,
"e": 2385,
"s": 2333,
"text": "You can use IN clause to replace many OR conditions"
},
{
"code": null,
"e": 2482,
"s": 2385,
"text": "To understand IN clause, consider an employee_tbl table, which is having the following records −"
},
{
"code": null,
"... |
Check if the value is infinity or NaN in Python - GeeksforGeeks | 23 Aug, 2021
In this article, we will check whether the given value is NaN or Infinity. This can be done using the math module. Let’s see how to check each value in detail.
NaN Stands for “Not a Number” and it is a numeric datatype used as a proxy for values that are either mathematically undefined or cannot be represe... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 24372,
"s": 24212,
"text": "In this article, we will check whether the given value is NaN or Infinity. This can be done using the math module. Let’s see how to check each value in detail."
... |
MCQ on Memory allocation and compilation process - GeeksforGeeks | 08 Dec, 2021
1. What will be the output of the following code?
C
#include <stdio.h>#include <stdlib.h> int main(){ union test { int i; float f; char c; }; union test* t; t = (union test*)malloc(sizeof(union test)); t->f = 20.60f; printf("%f", t->f); return 0;}
(a) Garbage val... | [
{
"code": null,
"e": 26599,
"s": 26571,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 26651,
"s": 26599,
"text": "1. What will be the output of the following code? "
},
{
"code": null,
"e": 26653,
"s": 26651,
"text": "C"
},
{
"code": "#include <std... |
Binary Search in Java - GeeksforGeeks | 28 Nov, 2021
Binary search is one of the searching techniques applied when the input is sorted as here we are focusing on finding the middle element that acts as a reference frame whether to go left or right to it as the elements are already sorted. This searching helps in optimizing the search technique with every ite... | [
{
"code": null,
"e": 24512,
"s": 24484,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 25027,
"s": 24512,
"text": "Binary search is one of the searching techniques applied when the input is sorted as here we are focusing on finding the middle element that acts as a reference fr... |
Activation Functions - GeeksforGeeks | 23 Aug, 2019
To put in simple terms, an artificial neuron calculates the ‘weighted sum’ of its inputs and adds a bias, as shown in the figure below by the net input.
Mathematically,
Now the value of net input can be any anything from -inf to +inf. The neuron doesn’t really know how to bound to value and thus is not a... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n23 Aug, 2019"
},
{
"code": null,
"e": 26360,
"s": 26207,
"text": "To put in simple terms, an artificial neuron calculates the ‘weighted sum’ of its inputs and adds a bias, as shown in the figure below by the net input."
},
{
... |
Compare Two Arrays in Java - GeeksforGeeks | 24 Apr, 2022
While comparing two arrays we can not use “==” operator as it will compare the addresses of the memory block to which both the arrays are pointing. If we want to compare the elements inside the array we need to figure out other ways instead of using arithmetic operators. As we all know arrays data structur... | [
{
"code": null,
"e": 27798,
"s": 27770,
"text": "\n24 Apr, 2022"
},
{
"code": null,
"e": 28370,
"s": 27798,
"text": "While comparing two arrays we can not use “==” operator as it will compare the addresses of the memory block to which both the arrays are pointing. If we want to c... |
Using Python Flask and Ajax to Pass Information between the Client and Server | by Alan Davies | Towards Data Science | The following provides an example of how we can pass information from the client to the server in a Python Flask application. Firstly demonstrating how data can be sent from the client to the server and processed and then how we can make this more efficient by carrying out the calculation client side and returning the ... | [
{
"code": null,
"e": 883,
"s": 172,
"text": "The following provides an example of how we can pass information from the client to the server in a Python Flask application. Firstly demonstrating how data can be sent from the client to the server and processed and then how we can make this more efficie... |
HTML title Tag - GeeksforGeeks | 17 Mar, 2022
The <title> tag in HTML is used to define the title of HTML document. It sets the title in the browser toolbar. It provides the title for the web page when it is added to favorites. It displays the title for the page in search engine results.Note: You can NOT have more than one <title> element in an HTML d... | [
{
"code": null,
"e": 24420,
"s": 24392,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 24736,
"s": 24420,
"text": "The <title> tag in HTML is used to define the title of HTML document. It sets the title in the browser toolbar. It provides the title for the web page when it is a... |
GATE | GATE-CS-2014-(Set-3) | Question 44 - GeeksforGeeks | 17 Sep, 2021
Consider the basic block given below.
a = b + c
c = a + d
d = b + c
e = d - b
a = e + b
The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are(A) 6 and 6(B) 8 and 10(C) 9 and 12(D) 4 and 4Answer: (A)Explanation: Simplifying the given equ... | [
{
"code": null,
"e": 25745,
"s": 25717,
"text": "\n17 Sep, 2021"
},
{
"code": null,
"e": 25783,
"s": 25745,
"text": "Consider the basic block given below."
},
{
"code": null,
"e": 25844,
"s": 25783,
"text": " a = b + c\n c = a + d\n d = b + c\n e = d - b\n... |
Divide a number into two parts - GeeksforGeeks | 28 Mar, 2022
Given an integer N containing the digit 4 at least once. The task is to divide the number into two parts x1 and x2 such that:
x1 + x2 = N.
And none of the parts contain the digit 4.
Note that there may be multiple answers.Examples:
Input: N = 4 Output: 1 3 1 + 3 = 4Input: N = 9441 Output: 9331 110 9331... | [
{
"code": null,
"e": 25441,
"s": 25413,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25569,
"s": 25441,
"text": "Given an integer N containing the digit 4 at least once. The task is to divide the number into two parts x1 and x2 such that: "
},
{
"code": null,
"e"... |
Different ways of Reading a file in C# | Here, we are reading two different files −
Reading text file −
Live Demo
using System;
using System.IO;
namespace FileApplication {
class Program {
static void Main(string[] args) {
try {
using (StreamReader sr = new StreamReader("d:/new.txt")) {
string line;
... | [
{
"code": null,
"e": 1105,
"s": 1062,
"text": "Here, we are reading two different files −"
},
{
"code": null,
"e": 1125,
"s": 1105,
"text": "Reading text file −"
},
{
"code": null,
"e": 1136,
"s": 1125,
"text": " Live Demo"
},
{
"code": null,
"e": ... |
How to allow multiple file uploads in HTML forms. | If you want to allow a user to upload the file to your website, you need to use a file upload box, also known as a file select box. This is created using the <input> element and the type attribute is set to file.
To allow multiple file uploads in HTML forms, use the multiple attributes. The multiple attributes work wit... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "If you want to allow a user to upload the file to your website, you need to use a file upload box, also known as a file select box. This is created using the <input> element and the type attribute is set to file."
},
{
"code": null,
"e": 141... |
How to Create a Custom Loss Function | Keras | by Shiva Verma | Towards Data Science | The Loss Function is one of the important components of Neural Network. Loss is nothing but a prediction error of Neural Net. And the method to calculate the loss is called Loss Function.
Loss is used to calculate the gradients for the neural net. And gradients are used to update the weights. This is how a Neural Net i... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "The Loss Function is one of the important components of Neural Network. Loss is nothing but a prediction error of Neural Net. And the method to calculate the loss is called Loss Function."
},
{
"code": null,
"e": 503,
"s": 360,
"text":... |
Evaluating Clustering Results. The criteria used to evaluate... | by Vijini Mallawaarachchi | Towards Data Science | The main goal of clustering approaches is to obtain high intra-cluster similarity and low inter-cluster similarity (objects in the same cluster are more similar than the objects in different clusters). I have been using different clustering approaches in my work on metagenomics binning analysis and in this article, I w... | [
{
"code": null,
"e": 562,
"s": 171,
"text": "The main goal of clustering approaches is to obtain high intra-cluster similarity and low inter-cluster similarity (objects in the same cluster are more similar than the objects in different clusters). I have been using different clustering approaches in ... |
Associating Attributes & Buffer Objects | Each attribute in the vertex shader program points to a vertex buffer object. After creating the vertex buffer objects, programmers have to associate them with the attributes of the vertex shader program. Each attribute points to only one vertex buffer object from which they extract the data values, and then these attr... | [
{
"code": null,
"e": 2408,
"s": 2047,
"text": "Each attribute in the vertex shader program points to a vertex buffer object. After creating the vertex buffer objects, programmers have to associate them with the attributes of the vertex shader program. Each attribute points to only one vertex buffer ... |
Store Hyperledger Fabric certificates and keys in CouchDB | by Shubham Chadokar | Towards Data Science | When an application interacts with the Hyperledger Fabric Network, it uses this identity to authenticate itself. Fabric network validates the identity and authorizes the application to interact.
In short, identities are very important and if you don’t save them properly, then it may turn into a headache. 😩
Originally ... | [
{
"code": null,
"e": 366,
"s": 171,
"text": "When an application interacts with the Hyperledger Fabric Network, it uses this identity to authenticate itself. Fabric network validates the identity and authorizes the application to interact."
},
{
"code": null,
"e": 479,
"s": 366,
... |
How to remove cellspacing from tables using CSS? - GeeksforGeeks | 01 Dec, 2020
This is a Default behavior of the table cells that there is some space between their Borders. To remove this space we can use the CSS border-collapsing Property. This Property is used to set the borders of the cell present inside the table and tells whether these cells will share a common border or not.
Sy... | [
{
"code": null,
"e": 25296,
"s": 25268,
"text": "\n01 Dec, 2020"
},
{
"code": null,
"e": 25601,
"s": 25296,
"text": "This is a Default behavior of the table cells that there is some space between their Borders. To remove this space we can use the CSS border-collapsing Property. T... |
C Program to Sort an array of names or strings | In this problem, we are given an array of string. Our task is to create a c program to sort an array of name or string. This program will sort all the names we have given in the input in ascending alphabetical order.
Let’s take an example to understand the problem,
namesArray = ["Rishabh", "Jyoti", "Palak", "Akash"]
["... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "In this problem, we are given an array of string. Our task is to create a c program to sort an array of name or string. This program will sort all the names we have given in the input in ascending alphabetical order."
},
{
"code": null,
"e":... |
How to change the scale of imshow in matplotlib without stretching the image? | To change the scale of imshow in matplotlib without stretching the image, we can take the following steps.
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create random data points with 4×4 dimension.
Create random d... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "To change the scale of imshow in matplotlib without stretching the image, we can take the following steps."
},
{
"code": null,
"e": 1245,
"s": 1169,
"text": "Set the figure size and adjust the padding between and around the subplots.... |
Count of ordered triplets (R, G, B) in a given original string - GeeksforGeeks | 27 Dec, 2021
Given a string S of size N, the task is to count all possible triplets in the given string which consists of only 3 colours (R)Red, (G)Green and (B)Blue in the order (R, G, B).
Examples:
Input: S = “RRGB” Output: 2 Explanation: There are two triplets of RGB in the given string:
R at index 0, G at index 2... | [
{
"code": null,
"e": 25274,
"s": 25246,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 25451,
"s": 25274,
"text": "Given a string S of size N, the task is to count all possible triplets in the given string which consists of only 3 colours (R)Red, (G)Green and (B)Blue in the ord... |
TestNG - Custom Reporter | In this section, we will cover, with an example, the method of writing your custom reporter and attaching it to TestNG. To write a custom reporter class, our extension class should implement the IReporter interface. Let's go ahead and create an example with the custom reporter.
Create a java class, say, SampleTest.java... | [
{
"code": null,
"e": 2473,
"s": 2194,
"text": "In this section, we will cover, with an example, the method of writing your custom reporter and attaching it to TestNG. To write a custom reporter class, our extension class should implement the IReporter interface. Let's go ahead and create an example ... |
TRUNCATE() Function in MySQL | 01 Oct, 2020
In this article, you will see how the TRUNCATE() function works. The TRUNCATE function in MySQL is used to truncate a number to a specified number of decimal places.
Syntax :
TRUNCATE( X, D)
Parameter :TRUNCATE() function accepts two parameters as mentioned above and described below.
X –The number which t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 194,
"s": 28,
"text": "In this article, you will see how the TRUNCATE() function works. The TRUNCATE function in MySQL is used to truncate a number to a specified number of decimal places."
},
{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.