title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Prolog - Quick Guide | Prolog as the name itself suggests, is the short form of LOGical PROgramming. It is a logical and declarative programming language. Before diving deep into the concepts of Prolog, let us first understand what exactly logical programming is.
Logic Programming is one of the Computer Programming Paradigm, in which the pro... | [
{
"code": null,
"e": 2333,
"s": 2092,
"text": "Prolog as the name itself suggests, is the short form of LOGical PROgramming. It is a logical and declarative programming language. Before diving deep into the concepts of Prolog, let us first understand what exactly logical programming is."
},
{
... |
Java 8 Interview Questions | Dear readers, these Java 8 Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java 8 Language. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally que... | [
{
"code": null,
"e": 2320,
"s": 1874,
"text": "Dear readers, these Java 8 Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java 8 Language. As per my experience good interviewers hardly plan... |
MATLAB - Plotting | To plot the graph of a function, you need to take the following steps −
Define x, by specifying the range of values for the variable x, for which the function is to be plotted
Define x, by specifying the range of values for the variable x, for which the function is to be plotted
Define the function, y = f(x)
Define the... | [
{
"code": null,
"e": 2213,
"s": 2141,
"text": "To plot the graph of a function, you need to take the following steps −"
},
{
"code": null,
"e": 2317,
"s": 2213,
"text": "Define x, by specifying the range of values for the variable x, for which the function is to be plotted"
},
... |
Sum of the Series 1/(1*2) + 1/(2*3) + 1/(3*4) + 1/(4*5) + ... in C++
| In this problem, we are given a number n which is the nth term of the series 1/(1*2) + 1/(2*3) +...+ 1/(n*(n+1)). Our task is to create a program to find the sum of the series.
Input
n = 3
Output
0.75
Explanation − sum = 1/(1*2) + 1/(2*3) + 1/(3*4) = 1⁄2 + 1⁄6+ 1/12 = (6+2+1)/12 = 9/12 = 3⁄4 = 0.75
A simple solution ... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "In this problem, we are given a number n which is the nth term of the series 1/(1*2) + 1/(2*3) +...+ 1/(n*(n+1)). Our task is to create a program to find the sum of the series."
},
{
"code": null,
"e": 1246,
"s": 1239,
"text": "Input... |
Spring MVC Login Form Example Tutorials - 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
Spring MVC Login Form is a basic example for ... | [
{
"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,
... |
Image Processing in Java - Colored Image to Grayscale Image Conversion - GeeksforGeeks | 14 Nov, 2021
Prerequisites:
Image Processing in Java – Read and Write
Image Processing In Java – Get and set Pixels
In this article, we will be converting a colored image to a grayscale image.
RGB Color Model – The RGB color model is an additive mixing model in which red, green, and blue light are added together in va... | [
{
"code": null,
"e": 24906,
"s": 24878,
"text": "\n14 Nov, 2021"
},
{
"code": null,
"e": 24921,
"s": 24906,
"text": "Prerequisites:"
},
{
"code": null,
"e": 24963,
"s": 24921,
"text": "Image Processing in Java – Read and Write"
},
{
"code": null,
"... |
PHP Exercises With Solutions | Theory of Computation
$str1 = "00004";
$str2 = "008";
$str3 = "00007-STR";
$a = 'Burch Jr, Philip H., The American establishment, Research in political economy 6(1983), 83-156';
[
{
"name" : "John Garg",
"age" : "15",
"school" : "Ahlcon Public school"
},
{
"name" : "Smith Soy",
"age" : "16",
"school" : "St.... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 165,
"s": 112,
"text": "$str1 = \"00004\";\n$str2 = \"008\";\n$str3 = \"00007-STR\";"
},
{
"code": null,
"e": 268,
"s": 165,
"text": "$a = 'Burch Jr, Philip H., The Amer... |
How to validate a form using jQuery? | At first you have to make a html form like.
<html>
<body>
<h2>Validation of a form</h2>
<form id="form" method="post" action="">
First name:<br>
<input type="text" name="firstname" value="john">
<br>
Last name:<br>
<input type="text" name="lastname" value="Doe">
<br>
Email:<br>
<input type="email" name="u_email" value=... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "At first you have to make a html form like."
},
{
"code": null,
"e": 1478,
"s": 1106,
"text": "<html>\n<body>\n<h2>Validation of a form</h2>\n<form id=\"form\" method=\"post\" action=\"\">\nFirst name:<br>\n<input type=\"text\" name=... |
Maximum frequency of any array element possible by at most K increments - GeeksforGeeks | 13 Jul, 2021
Given an array arr[] of size N and an integer K, the task is to find the maximum possible frequency of any array element by at most K increments.
Examples:
Input: arr[] = {1, 4, 8, 13}, N = 4, K = 5 Output: 2 Explanation: Incrementing arr[0] twice modifies arr[] to {4, 4, 8, 13}. Maximum frequency = 2. In... | [
{
"code": null,
"e": 25366,
"s": 25335,
"text": " \n13 Jul, 2021\n"
},
{
"code": null,
"e": 25512,
"s": 25366,
"text": "Given an array arr[] of size N and an integer K, the task is to find the maximum possible frequency of any array element by at most K increments."
},
{
... |
How to open a file in append mode with Python? | To open files in append mode, specify 'a' as the mode(a=append). For example,
f = open('my_file.txt', 'a')
file_content = f.read()
f.write('Hello World')
f.close()
Above code opens my_file.txt in append mode and appends the file to contain "Hello World" at the end. | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To open files in append mode, specify 'a' as the mode(a=append). For example,"
},
{
"code": null,
"e": 1226,
"s": 1140,
"text": "f = open('my_file.txt', 'a')\nfile_content = f.read()\nf.write('Hello World')\nf.close()"
},
{
"... |
Decision Making in Julia (if, if-else, Nested-if, if-elseif-else ladder) - GeeksforGeeks | 19 Feb, 2020
Decision-making statements in programming languages decide the direction of the flow of program execution. A programming language uses control statements to control the flow of execution of a program based on certain conditions. These are used to cause the flow of execution to advance and branch based on c... | [
{
"code": null,
"e": 24184,
"s": 24156,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24576,
"s": 24184,
"text": "Decision-making statements in programming languages decide the direction of the flow of program execution. A programming language uses control statements to contro... |
How to multiply two Arrays in JavaScript? | Following is the code to multiply two arrays in JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "Following is the code to multiply two arrays in JavaScript −"
},
{
"code": null,
"e": 1134,
"s": 1123,
"text": " Live Demo"
},
{
"code": null,
"e": 2315,
"s": 1134,
"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<h... |
How to add Days to a Date in Python? | 29 Dec, 2020
Python provides an in-built module datetime which allows easy manipulation and modification of date and time values. It allows arithmetic operations as well as formatting the output obtained from the DateTime module. The module contains various classes like date, time, timedelta, etc. that simulate the eas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 397,
"s": 28,
"text": "Python provides an in-built module datetime which allows easy manipulation and modification of date and time values. It allows arithmetic operations as well as formatting the ... |
Django Models | Set – 1 | 21 Jun, 2019
Prerequisites : Django Creating apps
According to Django Models, A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps to a single database table.
The basics:
Each model is a Python clas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2019"
},
{
"code": null,
"e": 65,
"s": 28,
"text": "Prerequisites : Django Creating apps"
},
{
"code": null,
"e": 296,
"s": 65,
"text": "According to Django Models, A model is the single, definitive source of... |
Python | Pandas DataFrame.values | 20 Feb, 2019
Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Feb, 2019"
},
{
"code": null,
"e": 342,
"s": 28,
"text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both ... |
How to create a bootstrap tooltip using jQuery ? | 02 Dec, 2021
Tooltip is like a balloon or also a small screen tip that displays text descriptions to any object in a webpage. A tooltip is displayed when the user hovers over an object using the cursor. It is a very useful part of a website and now can be found in almost all websites including some web applications lik... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 502,
"s": 28,
"text": "Tooltip is like a balloon or also a small screen tip that displays text descriptions to any object in a webpage. A tooltip is displayed when the user hovers over an object usi... |
PHP | array_filter() Function | 08 Mar, 2018
This built-in function in PHP is used to filter the elements of an array using a user-defined function which is also called a callback function. The array_filter() function iterates over each value in the array, passing them to the user-defined function or the callback function. If the callback function re... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Mar, 2018"
},
{
"code": null,
"e": 576,
"s": 53,
"text": "This built-in function in PHP is used to filter the elements of an array using a user-defined function which is also called a callback function. The array_filter() function i... |
cpio command in Linux with Examples | 15 May, 2019
cpio stands for “copy in, copy out“. It is used for processing the archive files like *.cpio or *.tar. This command can copy files to and from archives.
Synopsis:
Copy-out Mode: Copy files named in name-list to the archiveSyntax:cpio -o < name-list > archive
Syntax:
cpio -o < name-list > archive
Copy-in Mo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 207,
"s": 54,
"text": "cpio stands for “copy in, copy out“. It is used for processing the archive files like *.cpio or *.tar. This command can copy files to and from archives."
},
{
"code":... |
How to open web cam in JavaScript ? | 31 Mar, 2021
In this article, we will see how to open a webcam and show a live video using JavaScript. For this we are going to use Navigator media Devices.
Navigator Media Devices: It is a read-only property that returns a Media Devices object, which helps us to access the connected media input devices like camera and... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "In this article, we will see how to open a webcam and show a live video using JavaScript. For this we are going to use Navigator media Devices."
},
{
"code": null,
... |
Xamarin - Andriod Views | A Listview is a user interface element that displays lists of items that are scrollable.
In this example, you are going to create a listView that displays the days of the week. To start with, let us create a new XML file and name it listViewTemplate.xml.
In listViewTemplate.xml, we add a new textview as shown below.
<?... | [
{
"code": null,
"e": 2187,
"s": 2098,
"text": "A Listview is a user interface element that displays lists of items that are scrollable."
},
{
"code": null,
"e": 2353,
"s": 2187,
"text": "In this example, you are going to create a listView that displays the days of the week. To st... |
Kotlin labelled break | 28 Mar, 2022
While working with loops say you want to stop the execution of loop immediately if a certain condition is satisfied. In this case you can use either break or return expression to exit from the loop. In this article, we are going to learn how to use break expression to exit a loop. When break expression enc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 966,
"s": 28,
"text": "While working with loops say you want to stop the execution of loop immediately if a certain condition is satisfied. In this case you can use either break or return expression... |
Image Classification with Web App | 12 Apr, 2022
Detecting Emergency Vehicles Using CNNs
Motivation: Recently I participated in JanataHack: Computer Vision Hackathon hosted by Analytics Vidhya. The aim of the competition was to create a binary image classifier that could differentiate the Non?-?Emergency Vehicles eg. private owned vehicles. from the eme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 69,
"s": 28,
"text": "Detecting Emergency Vehicles Using CNNs "
},
{
"code": null,
"e": 387,
"s": 69,
"text": "Motivation: Recently I participated in JanataHack: Computer Vision ... |
Vertical alignment in Bootstrap with Examples | 15 Jul, 2021
Vertical Alignment in bootstrap changes the alignment of elements vertically with the help vertical-alignment utilities. The vertical-align utilities only affects inline(Present in one Line), inline-block(Present as blocks in one line), inline-table, and table cell(Elements in a cell of a table) elements.V... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 449,
"s": 52,
"text": "Vertical Alignment in bootstrap changes the alignment of elements vertically with the help vertical-alignment utilities. The vertical-align utilities only affects inline(Pres... |
B and B+ Trees - GeeksforGeeks | 22 Aug, 2021
Insertion of 3 keys
10 20 30
Insertion of 4th key (1st split)
30
/ \
10*20 40
Insertion of 5th key no split
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 5
30
/ \
5*10*20 40
Insertion of 6th key (2nd Split)
To maximize splits, let... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n22 Aug, 2021"
},
{
"code": null,
"e": 30739,
"s": 29577,
"text": "Insertion of 3 keys\n10 20 30\n\nInsertion of 4th key (1st split)\n 30\n / \\\n10*20 40\n\n\nInsertion of 5th key no split \nTo maximize splits, let us i... |
How to draw an SVG file on an HTML5 canvas? | To draw SVG onto canvas, you need to use SVG image. Firstly, use the <foreignObject> element which contains the HTML. After that, you need to draw the SVG image into the canvas.
You can try the following code to draw an SVG file on an HTML canvas
<!DOCTYPE html>
<html>
<head>
<title>SVG file on HTML Canvas </t... | [
{
"code": null,
"e": 1365,
"s": 1187,
"text": "To draw SVG onto canvas, you need to use SVG image. Firstly, use the <foreignObject> element which contains the HTML. After that, you need to draw the SVG image into the canvas."
},
{
"code": null,
"e": 1434,
"s": 1365,
"text": "You ... |
PyQt5 – How to make Round Radio Button ? | 22 Apr, 2020
In this article we will see how to create round radio button. By default the shape of radio button is rectangular although if we set width equal to the height it become square. Below is the representation of normal bordered radio button vs the radio button round in shape.
In order to do this we have to do... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "In this article we will see how to create round radio button. By default the shape of radio button is rectangular although if we set width equal to the height it become square... |
Local variables in Java | Local variables are declared in methods, constructors, or blocks.
Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block.
Access modifiers cannot be used for local variables.
Local variables are visible only within ... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Local variables are declared in methods, constructors, or blocks."
},
{
"code": null,
"e": 1289,
"s": 1128,
"text": "Local variables are created when the method, constructor or block is entered and the variable will be destroyed once... |
How to set a particular font for a button text in Android using Kotlin? | This example demonstrates how to set a particular font for a button text in Android using Kotlin
Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "This example demonstrates how to set a particular font for a button text in Android using Kotlin"
},
{
"code": null,
"e": 1287,
"s": 1159,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all... |
PyQt - QCheckBox Widget | A rectangular box before the text label appears when a QCheckBox object is added to the parent window. Just as QRadioButton, it is also a selectable button. Its common use is in a scenario when the user is asked to choose one or more of the available options.
Unlike Radio buttons, check boxes are not mutually exclusive... | [
{
"code": null,
"e": 2186,
"s": 1926,
"text": "A rectangular box before the text label appears when a QCheckBox object is added to the parent window. Just as QRadioButton, it is also a selectable button. Its common use is in a scenario when the user is asked to choose one or more of the available op... |
Node.js indexOf() function - GeeksforGeeks | 13 Oct, 2021
The indexOf() function is a string function from Node.js which is used to find a string with another string.
Syntax:
str1.indexOf( str2 )
Parameter: This function uses two parameters as mentioned above and described below:
str1: It holds the string content where another string to be search.
str2: It holds ... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 24640,
"s": 24531,
"text": "The indexOf() function is a string function from Node.js which is used to find a string with another string."
},
{
"code": null,
"e": 24648,
"s": 2... |
Lagrange multipliers with visualizations and code | by Rohit Pandey | Towards Data Science | In this story, we’re going to take an aerial tour of optimization with Lagrange multipliers. When do we need them? Whenever we have an optimization problem with constraints. Here are some examples:
A hedge fund wants to decide the proportions of stocks to include in their portfolio such that they get the maximum possib... | [
{
"code": null,
"e": 370,
"s": 172,
"text": "In this story, we’re going to take an aerial tour of optimization with Lagrange multipliers. When do we need them? Whenever we have an optimization problem with constraints. Here are some examples:"
},
{
"code": null,
"e": 1187,
"s": 370,
... |
In MySQL, what is the difference between SERIAL and AUTO_INCREMENT? | In MySQL, both SERIAL and AUTO_INCREMENT are used to define a sequence as a default value for a field. But they are technically different from each other.
The AUTO_INCREMENT attribute is supported by all numeric data types except for BIT and DECIMAL. There can only be one AUTO_INCREMENT field per table and the sequence... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "In MySQL, both SERIAL and AUTO_INCREMENT are used to define a sequence as a default value for a field. But they are technically different from each other."
},
{
"code": null,
"e": 1469,
"s": 1217,
"text": "The AUTO_INCREMENT attribut... |
TIQ Part 1 — How to destroy your Power BI model with Auto Date/Time | by Nikola Ilic | Towards Data Science | TIQ stands for Time Intelligence Quotient. As “regular” intelligence is usually being measured as IQ, and Time Intelligence is one of the most important topics in data modeling, I decided to start a blog series which will introduce some basic concepts, pros and cons of specific solutions and potential pitfalls to avoid... | [
{
"code": null,
"e": 625,
"s": 172,
"text": "TIQ stands for Time Intelligence Quotient. As “regular” intelligence is usually being measured as IQ, and Time Intelligence is one of the most important topics in data modeling, I decided to start a blog series which will introduce some basic concepts, pr... |
Angular 4 - Examples | In this chapter, we will discuss a few examples related to Angular 4.
To begin with, we have created an example which shows a login form with input as username and password. Upon entering the correct values, it will enter inside and show another form wherein, you can enter the customer details. In addition, we have cre... | [
{
"code": null,
"e": 2062,
"s": 1992,
"text": "In this chapter, we will discuss a few examples related to Angular 4."
},
{
"code": null,
"e": 2375,
"s": 2062,
"text": "To begin with, we have created an example which shows a login form with input as username and password. Upon ent... |
SENTIMENTAL ANALYSIS USING VADER. interpretation and classification of... | by Aditya Beri | Towards Data Science | Sentiment analysis is a text analysis method that detects polarity (e.g. a positive or negative opinion) within the text, whether a whole document, paragraph, sentence, or clause.
Sentiment analysis aims to measure the attitude, sentiments, evaluations, attitudes, and emotions of a speaker/writer based on the computati... | [
{
"code": null,
"e": 352,
"s": 172,
"text": "Sentiment analysis is a text analysis method that detects polarity (e.g. a positive or negative opinion) within the text, whether a whole document, paragraph, sentence, or clause."
},
{
"code": null,
"e": 534,
"s": 352,
"text": "Sentim... |
Draw circles using the polar coordinates and mid-point circle drawing algorithm on the same console using openGL in C++ - GeeksforGeeks | 16 Jul, 2021
In this article, the task is to draw circles in two different subwindows using two different algorithms, and the circles are created using a single mouse click.
Approach:
There are two subwindows and both of them use different algorithms to create circles.
The left subwindow creates a circle using Midpoint... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 24179,
"s": 24018,
"text": "In this article, the task is to draw circles in two different subwindows using two different algorithms, and the circles are created using a single mouse click."
... |
How to select all columns except one in a Pandas DataFrame? | To select all columns except one column in Pandas DataFrame, we can use df.loc[:, df.columns != <column name>].
Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.
Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.
Print the input DataFrame, df.
Print the... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "To select all columns except one column in Pandas DataFrame, we can use df.loc[:, df.columns != <column name>]."
},
{
"code": null,
"e": 1258,
"s": 1174,
"text": "Create a two-dimensional, size-mutable, potentially heterogeneous tabu... |
Find records on or after a specific date in MongoDB? | To find records on or after a date, use $gte i.e., greater than equal. Let us create a collection with documents −
> db.demo91.insertOne({"ArrivalDate":new ISODate("2020-01-10")});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e2d49fd79799acab037af66")
}
> db.demo91.insertOne({"ArrivalDate":new ISODate("2019... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "To find records on or after a date, use $gte i.e., greater than equal. Let us create a collection with documents −"
},
{
"code": null,
"e": 1479,
"s": 1177,
"text": "> db.demo91.insertOne({\"ArrivalDate\":new ISODate(\"2020-01-10\")}... |
DAX Date & Time - EOMONTH function | Returns the date in datetime format of the last day of the month, before or after a specified number of months.
EOMONTH (<start_date>, <months>)
start_date
A date that represents the start date.
It can be in datetime or text format.
months
A whole number that represents the number of months before or after start_date... | [
{
"code": null,
"e": 2113,
"s": 2001,
"text": "Returns the date in datetime format of the last day of the month, before or after a specified number of months."
},
{
"code": null,
"e": 2148,
"s": 2113,
"text": "EOMONTH (<start_date>, <months>) \n"
},
{
"code": null,
"e... |
JSON - Objects | JSON objects can be created with JavaScript. Let us see the various ways of creating JSON objects using JavaScript −
Creation of an empty Object −
var JSONObj = {};
Creation of a new Object −
var JSONObj = new Object();
Creation of an object with attribute bookname with value in string, attribute price with numeric v... | [
{
"code": null,
"e": 1897,
"s": 1780,
"text": "JSON objects can be created with JavaScript. Let us see the various ways of creating JSON objects using JavaScript −"
},
{
"code": null,
"e": 1927,
"s": 1897,
"text": "Creation of an empty Object −"
},
{
"code": null,
"e"... |
Facebook API | Set-3 - GeeksforGeeks | 25 Jun, 2019
Prerequisite: Facebook API | Set-1, Set-2
In this article we will be discussing three methods:
searchget_connectionsget_allconnections
search
get_connections
get_allconnections
The valid value types are place and placetopic.
Parameters:id: It is a string containing a valid value.args: This is optional and ... | [
{
"code": null,
"e": 25473,
"s": 25445,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 25515,
"s": 25473,
"text": "Prerequisite: Facebook API | Set-1, Set-2"
},
{
"code": null,
"e": 25568,
"s": 25515,
"text": "In this article we will be discussing three meth... |
Collections enumeration() method in Java with Examples - GeeksforGeeks | 08 Jun, 2021
The enumeration() method of java.util.Collections class is used to return an enumeration over the specified collection. This provides interoperability with legacy APIs that require an enumeration as input.Syntax:
public static Enumeration enumeration(Collection c)
Parameters: This method takes the colle... | [
{
"code": null,
"e": 24090,
"s": 24062,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 24305,
"s": 24090,
"text": "The enumeration() method of java.util.Collections class is used to return an enumeration over the specified collection. This provides interoperability with legacy ... |
Python program to convert a list of characters into a string | Python requires this kind of conversion a lot. For example, such conversions are useful for serialization purposes. An example of such a conversion would be −
['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'] to "hello world"
Python has a join method that can be used for such conversions. It can be applied on a d... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "Python requires this kind of conversion a lot. For example, such conversions are useful for serialization purposes. An example of such a conversion would be −"
},
{
"code": null,
"e": 1294,
"s": 1221,
"text": "['h', 'e', 'l', 'l', 'o... |
Practical Explainable AI: Loan Approval Use Case | by Raheel Ahmad | Towards Data Science | Explainability is extremely crucial in systems that are responsible for carrying out mission-critical tasks. For example, in healthcare, if scientists are relying on AI models to help them figure out whether the patient will have cancer or not, they need to be 100% sure of their diagnoses otherwise this can result in d... | [
{
"code": null,
"e": 686,
"s": 47,
"text": "Explainability is extremely crucial in systems that are responsible for carrying out mission-critical tasks. For example, in healthcare, if scientists are relying on AI models to help them figure out whether the patient will have cancer or not, they need t... |
C library function - getenv() | The C library function char *getenv(const char *name) searches for the environment string pointed to by name and returns the associated value to the string.
Following is the declaration for getenv() function.
char *getenv(const char *name)
name − This is the C string containing the name of the requested variable.
name ... | [
{
"code": null,
"e": 2164,
"s": 2007,
"text": "The C library function char *getenv(const char *name) searches for the environment string pointed to by name and returns the associated value to the string."
},
{
"code": null,
"e": 2216,
"s": 2164,
"text": "Following is the declarat... |
LSB based Image steganography using MATLAB - GeeksforGeeks | 12 Dec, 2021
Prerequisite: Image Steganography Introduction, Implementation using Python.Steganography is the method of hiding secret data inside any form of digital media. The main idea behind steganography is to hide the existence of data in any medium like audio, video, image, etc. When we talk about image steganogr... | [
{
"code": null,
"e": 26475,
"s": 26447,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 27397,
"s": 26475,
"text": "Prerequisite: Image Steganography Introduction, Implementation using Python.Steganography is the method of hiding secret data inside any form of digital media. The... |
Find distance from root to given node in a binary tree - GeeksforGeeks | 24 Jun, 2021
Given the root of a binary tree and a key x in it, find the distance of the given key from the root. Distance means the number of edges between two nodes.
Examples:
Input : x = 45,
Root of below tree
5
/ \
10 15
/ \ / \
20 25 30 35
\
45
Outpu... | [
{
"code": null,
"e": 35768,
"s": 35740,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 35925,
"s": 35768,
"text": "Given the root of a binary tree and a key x in it, find the distance of the given key from the root. Distance means the number of edges between two nodes."
},
... |
How to get the first day of next month in MySQL? | With the help of following MySQL query, we can get the first day of next month −
mysql> SELECT DATE_FORMAT(CURDATE() + INTERVAL 1 MONTH,'%Y-%m-01') AS
'FIRST DAY OF NEXT MONTH';
+-------------------------+
| FIRST DAY OF NEXT MONTH |
+-------------------------+
| 2017-11-01 |
+-------------------------+
1 ... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "With the help of following MySQL query, we can get the first day of next month −"
},
{
"code": null,
"e": 1404,
"s": 1143,
"text": "mysql> SELECT DATE_FORMAT(CURDATE() + INTERVAL 1 MONTH,'%Y-%m-01') AS\n'FIRST DAY OF NEXT MONTH';\n+-... |
How to set checkbox checked on button click in AngularJS ? - GeeksforGeeks | 14 Oct, 2020
In this article, we will see how to set checkbox checked on the click of a button in AngularJS.
Approach: The approach is to use the ng-checked to check the checkbox in the DOM. In the first example, a single checkbox is checked by the button and In the second example, multiple checkbox are checked by butt... | [
{
"code": null,
"e": 25109,
"s": 25081,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 25205,
"s": 25109,
"text": "In this article, we will see how to set checkbox checked on the click of a button in AngularJS."
},
{
"code": null,
"e": 25461,
"s": 25205,
"te... |
C program to perform reflection of the given 2D image using computer graphics - GeeksforGeeks | 04 May, 2021
In this article, we will discuss how to perform reflection in C using computer graphics using logic rather than the direct matrix formula of translation followed by rotation and translation.
This technique has currently been applied for the object taken as a triangle, the code can be applied to any object,... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 25780,
"s": 25589,
"text": "In this article, we will discuss how to perform reflection in C using computer graphics using logic rather than the direct matrix formula of translation followed b... |
MomentJS - Time from now | This method will tell the length of time from now. Suppose for example if you pass a date to this method it will display the difference if it is in years, months, hours, minutes, or seconds.
moment().fromNow();
moment().fromNow(Boolean);
var changeddate = moment([2018, 0, 1]).fromNow();
Observe that the date given to ... | [
{
"code": null,
"e": 2151,
"s": 1960,
"text": "This method will tell the length of time from now. Suppose for example if you pass a date to this method it will display the difference if it is in years, months, hours, minutes, or seconds."
},
{
"code": null,
"e": 2199,
"s": 2151,
... |
Detect the RGB color from a webcam using Python - OpenCV - GeeksforGeeks | 02 Sep, 2020
Prerequisites: Python NumPy, Python OpenCV
Every image is represented by 3 colors that are Red, Green and Blue. Let us see how to find the most dominant color captured by the webcam using Python.
Approach:
Import the cv2 and NumPy modulesCapture the webcam video using the cv2.VideoCapture(0) method.Display... | [
{
"code": null,
"e": 25871,
"s": 25843,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 25914,
"s": 25871,
"text": "Prerequisites: Python NumPy, Python OpenCV"
},
{
"code": null,
"e": 26067,
"s": 25914,
"text": "Every image is represented by 3 colors that are... |
C++ Loop Types | There may be a situation, when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.
Programming languages provide various control structures that allow for more complicated e... | [
{
"code": null,
"e": 2548,
"s": 2318,
"text": "There may be a situation, when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on."
},
{
"code": n... |
Python Faker Library - GeeksforGeeks | 24 Nov, 2020
Faker is a Python package that generates fake data for you.
Installation: Help LinkOpen Anaconda prompt command to install:
conda install -c conda-forge faker
Import package
from faker import Faker
Faker has the ability to print/get a lot of different fake data, for instance, it can print fake name, add... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n24 Nov, 2020"
},
{
"code": null,
"e": 24776,
"s": 24716,
"text": "Faker is a Python package that generates fake data for you."
},
{
"code": null,
"e": 24840,
"s": 24776,
"text": "Installation: Help LinkOpen An... |
Apache Derby - Update Data | The UPDATE statement is used to update data in a table. Apache Derby provides two types of updates (syntax) namely searched update and positioned update.
The searched UPDATE statement updates all the specified columns of a table.
Following is the syntax of the UPDATE query −
ij> UPDATE table_name
SET column_name = v... | [
{
"code": null,
"e": 2334,
"s": 2180,
"text": "The UPDATE statement is used to update data in a table. Apache Derby provides two types of updates (syntax) namely searched update and positioned update."
},
{
"code": null,
"e": 2410,
"s": 2334,
"text": "The searched UPDATE statemen... |
Average of Cubes of first N natural numbers - GeeksforGeeks | 08 Oct, 2021
Given a positive integer N, the task is to find the average of cubes of first N natural numbers. Examples:
Input: N = 2 Output: 4.5 Explanation: For integer N = 2, We have ( 13 + 23 ) = 1 + 8 = 9 average = 9 / 2 that is 4.5Input: N = 3 Output: 12 Explanation: For N = 3, We have ( 13 + 23 + 23 + 23 + 33 + ... | [
{
"code": null,
"e": 24721,
"s": 24693,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 24829,
"s": 24721,
"text": "Given a positive integer N, the task is to find the average of cubes of first N natural numbers. Examples: "
},
{
"code": null,
"e": 25080,
"s": 24... |
How to parse HTTP Cookie header and return an object of all cookie name-value pairs in JavaScript ? - GeeksforGeeks | 22 Jul, 2021
Cookies are simply small text files that a web server sends to the user’s browser. They contain the following data.
Name-value pair with actual data.The expiry date for when the cookie becomes invalid.Domain and path of the server it should be sent to.
Name-value pair with actual data.
The expiry date for ... | [
{
"code": null,
"e": 25398,
"s": 25370,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 25514,
"s": 25398,
"text": "Cookies are simply small text files that a web server sends to the user’s browser. They contain the following data."
},
{
"code": null,
"e": 25651,
... |
Equivalence Class Testing- Next date problem - GeeksforGeeks | 28 Jan, 2020
Equivalence class testing (Equivalence class Partitioning) is a black-box testing technique used in software testing as a major step in the Software development life cycle (SDLC). This testing technique is better than many of the testing techniques like boundary value analysis, worst case testing, robust c... | [
{
"code": null,
"e": 25975,
"s": 25947,
"text": "\n28 Jan, 2020"
},
{
"code": null,
"e": 26700,
"s": 25975,
"text": "Equivalence class testing (Equivalence class Partitioning) is a black-box testing technique used in software testing as a major step in the Software development li... |
fputcsv() function in PHP | The fputcsv() function formats a line as CSV and writes it to an open file. The function returns the length of the written string.
fputcsv(file_pointer, fields, delimiter, enclosure, escape)
file_pointer − A valid file pointer to a file successfully opened by fopen(), popen(), or fsockopen().
file_pointer − A valid fil... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "The fputcsv() function formats a line as CSV and writes it to an open file. The function returns the length of the written string."
},
{
"code": null,
"e": 1253,
"s": 1193,
"text": "fputcsv(file_pointer, fields, delimiter, enclosure,... |
How to return an object from a JavaScript function? | To return an object from a JavaScript function, use the return statement, with this keyword.
You can try to run the following code to return an object from a JavaScipt function −
Live Demo
<html>
<head>
<script>
var employee = {
empname: "David",
department : "Finance",
... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To return an object from a JavaScript function, use the return statement, with this keyword."
},
{
"code": null,
"e": 1241,
"s": 1155,
"text": "You can try to run the following code to return an object from a JavaScipt function −"
... |
How to compute f1 score for named-entity recognition in Keras | by Hironsan | Towards Data Science | In named-entity recognition, f1 score is used to evaluate the performance of trained models, especially, the evaluation is per entity, not token.
The function to evaluate f1 score is implemented in many machine learning frameworks. However, its target is classification tasks, not sequence labeling like named-entity rec... | [
{
"code": null,
"e": 318,
"s": 172,
"text": "In named-entity recognition, f1 score is used to evaluate the performance of trained models, especially, the evaluation is per entity, not token."
},
{
"code": null,
"e": 502,
"s": 318,
"text": "The function to evaluate f1 score is imp... |
How to catch ZeroDivisionError Exception in Python? | When zero shows up in the denominator of a division operation, a ZeroDivisionError is raised.
We re-write the given code as follows to handle the exception and find its type.
import sys
try:
x = 11/0
print x
except Exception as e:
print sys.exc_type
print e
<type 'exceptions.ZeroDivisionError'>
integer division or modu... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "When zero shows up in the denominator of a division operation, a ZeroDivisionError is raised."
},
{
"code": null,
"e": 1237,
"s": 1156,
"text": "We re-write the given code as follows to handle the exception and find its type."
},
... |
How to stop asynctask thread in Kotlin? | This example demonstrates how to stop an asynctask thread in Kotlin.
Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xm... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "This example demonstrates how to stop an asynctask thread in Kotlin."
},
{
"code": null,
"e": 1260,
"s": 1131,
"text": "Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create... |
What are the rules of margin collapse in CSS ? - GeeksforGeeks | 23 Apr, 2021
Margin collapsing is a behavior of CSS where the vertical margins of block-level elements are combined into one i.e. to the margin of the element with the largest value. Sometimes when we assigned margins to elements it does not work in the way we think it to be and that creates confusion. The following ru... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 25340,
"s": 24985,
"text": "Margin collapsing is a behavior of CSS where the vertical margins of block-level elements are combined into one i.e. to the margin of the element with the largest ... |
MFC - Command Button | A command button is an enhanced version of the regular button. It displays a green arrow icon on the left, followed by a caption in regular size. Under the main caption, it can display another smaller caption that serves as a hint to provide more information.
Create
Creates the Windows button control and attaches it to... | [
{
"code": null,
"e": 2327,
"s": 2067,
"text": "A command button is an enhanced version of the regular button. It displays a green arrow icon on the left, followed by a caption in regular size. Under the main caption, it can display another smaller caption that serves as a hint to provide more inform... |
How to Master Python for Data Science | by Chanin Nantasenamat | Towards Data Science | So you’re embarking on your journey into data science and everyone recommends that you start with learning how to code. You decided on Python and are now paralyzed by the large piles of learning resources that are at your disposal. Perhaps you are overwhelmed and owing to analysis paralysis, you are procrastinating you... | [
{
"code": null,
"e": 541,
"s": 172,
"text": "So you’re embarking on your journey into data science and everyone recommends that you start with learning how to code. You decided on Python and are now paralyzed by the large piles of learning resources that are at your disposal. Perhaps you are overwhe... |
Statistical Simulation in R with Code — Part 1 | by Leihua Ye, PhD | Towards Data Science | This is part 1of a dual post on Statistical Simulation. Please check out part 2 here if you haven’t:
towardsdatascience.com
For the past few months, I’ve received several Data Science interviews from the top tech companies. Almost all of the interviewers asked me to perform statistical simulation for a real business sc... | [
{
"code": null,
"e": 272,
"s": 171,
"text": "This is part 1of a dual post on Statistical Simulation. Please check out part 2 here if you haven’t:"
},
{
"code": null,
"e": 295,
"s": 272,
"text": "towardsdatascience.com"
},
{
"code": null,
"e": 526,
"s": 295,
"t... |
Max Heap in Java | Max heap is a complete binary tree, wherein the value of a root node at every step is greater than or equal to value at the child node.
Below is an implementation of Max Heap using library functions.
Live Demo
import java.util.*;
public class Demo{
public static void main(String args[]){
PriorityQueue<Integer... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "Max heap is a complete binary tree, wherein the value of a root node at every step is greater than or equal to value at the child node."
},
{
"code": null,
"e": 1262,
"s": 1198,
"text": "Below is an implementation of Max Heap using l... |
Predicting Airbnb prices with machine learning and deep learning | by Laura Lewis | Towards Data Science | Airbnb is a home-sharing platform that allows home-owners and renters (‘hosts’) to put their properties (‘listings’) online, so that guests can pay to stay in them. Hosts are expected to set their own prices for their listings. Although Airbnb and other sites provide some general guidance, there are currently no free a... | [
{
"code": null,
"e": 588,
"s": 172,
"text": "Airbnb is a home-sharing platform that allows home-owners and renters (‘hosts’) to put their properties (‘listings’) online, so that guests can pay to stay in them. Hosts are expected to set their own prices for their listings. Although Airbnb and other s... |
Identify last document from MongoDB find() result set? | To identify the last document from MongoDB find() result set, you can use sort() in descending order. The syntax is as follows −
db.yourCollectionName.find().sort( { _id : -1 } ).limit(1).pretty();
To understand the above syntax, let us create a collection with the document. The query to create a collection with a docu... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "To identify the last document from MongoDB find() result set, you can use sort() in descending order. The syntax is as follows −"
},
{
"code": null,
"e": 1260,
"s": 1191,
"text": "db.yourCollectionName.find().sort( { _id : -1 } ).lim... |
Is it impossible to add a column in MySQL specifically before another column? | No, you can easily add a column before another column using ALTER.
Note − To add a column at a specific position within a table row, use FIRST or AFTER col_name Let us first create a table −
mysql> create table DemoTable
-> (
-> Id int,
-> Name varchar(20),
-> CountryName varchar(100)
-> );
Query OK, 0 r... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "No, you can easily add a column before another column using ALTER."
},
{
"code": null,
"e": 1253,
"s": 1129,
"text": "Note − To add a column at a specific position within a table row, use FIRST or AFTER col_name Let us first create a... |
xgbse: Improving XGBoost for Survival Analysis | by Guilherme Marmerola | Towards Data Science | “There are two cultures in the use of statistical modeling to reach conclusions from data. One assumes that the data are generated by a given stochastic data model. The other uses algorithmic models and treats the data mechanism as unknown.” — Leo Breiman, Statistical Modeling: The Two Cultures
Survival Analysis is a b... | [
{
"code": null,
"e": 468,
"s": 172,
"text": "“There are two cultures in the use of statistical modeling to reach conclusions from data. One assumes that the data are generated by a given stochastic data model. The other uses algorithmic models and treats the data mechanism as unknown.” — Leo Breiman... |
How to parse json string in android? | This example demonstrates How to parse JSON string 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"?>
<LinearLayout xmlns:... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "This example demonstrates How to parse JSON string in android."
},
{
"code": null,
"e": 1254,
"s": 1125,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new... |
Explain the components of DBMS? | The database management system (DBMS) software is divided into several components. Each component will perform a specific operation. Some of the functions of the DBMS are supported by operating systems.
The DBMS accepts the SQL commands that are generated from a variety of user interfaces, which produces a query evalua... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "The database management system (DBMS) software is divided into several components. Each component will perform a specific operation. Some of the functions of the DBMS are supported by operating systems."
},
{
"code": null,
"e": 1461,
"s"... |
TypeScript - Ifâ¦else Statement | An if can be followed by an optional else block. The else block will execute if the Boolean expression tested by the if statement evaluates to false.
if(boolean_expression) {
// statement(s) will execute if the boolean expression is true
} else {
// statement(s) will execute if the boolean expression is false ... | [
{
"code": null,
"e": 2198,
"s": 2048,
"text": "An if can be followed by an optional else block. The else block will execute if the Boolean expression tested by the if statement evaluates to false."
},
{
"code": null,
"e": 2372,
"s": 2198,
"text": "if(boolean_expression) { \n /... |
Report Sections | We discussed the structure of a simple report template in the chapter Getting Started. On similar lines, JasperReports structures the report template into multiple sections. Sections are portions of the report that have a specified height and can contain report objects like lines, rectangles, images, or text fields.
Th... | [
{
"code": null,
"e": 2572,
"s": 2254,
"text": "We discussed the structure of a simple report template in the chapter Getting Started. On similar lines, JasperReports structures the report template into multiple sections. Sections are portions of the report that have a specified height and can contai... |
CSS Central, Horizontal and Vertical Alignment | We can align an element or the content inside it by using CSS which provides various options for alignment of an element and its content horizontally, vertically or in center.
Inline-elementsInline elements or inline-block elements such as text, anchor, span, etc. can be aligned horizontally with the help of CSS text-a... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "We can align an element or the content inside it by using CSS which provides various options for alignment of an element and its content horizontally, vertically or in center."
},
{
"code": null,
"e": 1397,
"s": 1238,
"text": "Inline... |
Traffic sign recognition using deep neural networks | by Piyush Malhotra | Towards Data Science | by Piyush Malhotra, Puneet and Tanishq Chamola
In today’s world as the number of vehicles are increasing so are the road accidents and according to reports, India is on 1st spot in most number of accidents in a country. This is caused due to many reasons such as poor enforcement of laws, carelessness etc. One of the re... | [
{
"code": null,
"e": 218,
"s": 171,
"text": "by Piyush Malhotra, Puneet and Tanishq Chamola"
},
{
"code": null,
"e": 733,
"s": 218,
"text": "In today’s world as the number of vehicles are increasing so are the road accidents and according to reports, India is on 1st spot in most ... |
How do I use PIL with Tkinter? | The PIL or Pillow package in Python provides a way to process images in a program. We can open an image, manipulate the image for different use, and can use it to visualize the data as well. In order to use the PIL package in Tkinter, you've to install the Python Pillow library in your environment.
To install Pillow, j... | [
{
"code": null,
"e": 1362,
"s": 1062,
"text": "The PIL or Pillow package in Python provides a way to process images in a program. We can open an image, manipulate the image for different use, and can use it to visualize the data as well. In order to use the PIL package in Tkinter, you've to install ... |
Apache Pig - Cross Operator | The CROSS operator computes the cross-product of two or more relations. This chapter explains with example how to use the cross operator in Pig Latin.
Given below is the syntax of the CROSS operator.
grunt> Relation3_name = CROSS Relation1_name, Relation2_name;
Assume that we have two files namely customers.txt and or... | [
{
"code": null,
"e": 2835,
"s": 2684,
"text": "The CROSS operator computes the cross-product of two or more relations. This chapter explains with example how to use the cross operator in Pig Latin."
},
{
"code": null,
"e": 2884,
"s": 2835,
"text": "Given below is the syntax of th... |
Java program to find the percentage of uppercase, lowercase, digits and special characters in a String | Convert the given string into an array of characters for each character of the array verify whether it is upper case, lower case, digit or, any other character using isUpperCase(), isLowerCase(), isDigit() method of the Character class.
Live Demo
public class Sample2 {
public static void main(String args[]) {
... | [
{
"code": null,
"e": 1299,
"s": 1062,
"text": "Convert the given string into an array of characters for each character of the array verify whether it is upper case, lower case, digit or, any other character using isUpperCase(), isLowerCase(), isDigit() method of the Character class."
},
{
"c... |
Program to print hollow pyramid, diamond pattern and their modifications | 12 Jul, 2022
For Prerequisite : Loops, If Else Statement1. Hollow pyramid/triangle pattern The pattern is similar to pyramid pattern. The only difference is, we will replace all internal ‘#’ or ‘*’ characters by space character and we will print 2*N-1 (N = number of rows in pattern) ‘#’ or ‘*’ characters in last row. E... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 372,
"s": 54,
"text": "For Prerequisite : Loops, If Else Statement1. Hollow pyramid/triangle pattern The pattern is similar to pyramid pattern. The only difference is, we will replace all internal ... |
Difference between fundamental data types and derived data types | 25 Mar, 2022
In computer programming, data type is a classification that specifies to compiler or interpreter which type of data user is intending to use.
There are two types of data types –
Primitive/Fundamental data type: Each variable in C/C++ has an associated data type. Each data type requires different amounts ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Mar, 2022"
},
{
"code": null,
"e": 195,
"s": 52,
"text": "In computer programming, data type is a classification that specifies to compiler or interpreter which type of data user is intending to use. "
},
{
"code": null,
... |
Count occurrences of a substring recursively | 06 May, 2022
Given two strings str1 and str2, the task is to count the number of times str2 occurs in str1 using recursion.
Examples:
Input: str1 = “geeksforgeeks”, str2 = “geek”Output: 2Explanation: The occurrences of str2 in str1 are starting at index {0, 8}
Input: str1 = “aaaaa”, str2 = “aaa”Output: 3Explanation: T... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 May, 2022"
},
{
"code": null,
"e": 163,
"s": 52,
"text": "Given two strings str1 and str2, the task is to count the number of times str2 occurs in str1 using recursion."
},
{
"code": null,
"e": 174,
"s": 163,
"te... |
How to remove all Global Modules in Node.js ? | 01 Jul, 2020
Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside of a browser. You need to remember that Node.js is not a framework and it’s not a programming language. Most of the people are confused and understand it’s a framework or a programming language. We often ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 512,
"s": 28,
"text": "Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside of a browser. You need to remember that Node.js is not a framework and i... |
Working of Keyword long in C programming | 13 Oct, 2018
long is a keyword in Java that symbolises the Long datatype. The long data type is a 64-bit two’s complement integer with:
Size: 64 bit
Value: -263 to 263-1.
Output of 64 bit GCC compiler would give the size of long as 8 whereas on 32 bit GCC compiler the size would be 4. So it varies from compiler to comp... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Oct, 2018"
},
{
"code": null,
"e": 176,
"s": 53,
"text": "long is a keyword in Java that symbolises the Long datatype. The long data type is a 64-bit two’s complement integer with:"
},
{
"code": null,
"e": 189,
"s": ... |
Schnorr Digital Signature | 02 Jun, 2020
In cryptography, a Schnorr signature is a digital signature produced by the Schnorr signature algorithm that was described by Claus Schnorr. It is a digital signature scheme known for its simplicity, is efficient and generates short signatures. It is one of the protocols used to implement “Proof Of Knowled... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 963,
"s": 54,
"text": "In cryptography, a Schnorr signature is a digital signature produced by the Schnorr signature algorithm that was described by Claus Schnorr. It is a digital signature scheme ... |
Scrap books using Beautifulsoup from books.toscrape in Python | 02 Jul, 2021
Web Scraping is the technique of extracting large amounts of data from websites where the extracted data is saved in a local file on your computer. The simplest form of Web Scrapping is manually copying and pasting data from a web page into a text file or spreadsheet. Sometimes this is the only solution wh... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 573,
"s": 28,
"text": "Web Scraping is the technique of extracting large amounts of data from websites where the extracted data is saved in a local file on your computer. The simplest form of Web Sc... |
Python | Sort list of tuples by specific ordering | 26 Feb, 2019
The normal sorting of tuples has been dealt previously. This article aims at sorting the given list of tuples by the second element, based on the order provided in some list.
Method #1 : Using list comprehension + filter() + lambdaAbove three functions can be combined to perform the particular task in whic... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 229,
"s": 54,
"text": "The normal sorting of tuples has been dealt previously. This article aims at sorting the given list of tuples by the second element, based on the order provided in some list.... |
HTML Text Formatting | 13 Dec, 2021
In this article, we will know HTML Text Formatting, & will understand various ways of formatting the text. HTML facilitates the ability for formatting text just like we do in MS Word or any text editing software. We will go through a few such options.
Example: In this example, we simply display text in HTM... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 304,
"s": 52,
"text": "In this article, we will know HTML Text Formatting, & will understand various ways of formatting the text. HTML facilitates the ability for formatting text just like we do in... |
Sort the character array based on ASCII % N | 08 Oct, 2021
Given an array arr[] of characters and an integer M, the task is to sort the array based on ASCII % M i.e. the character whose ASCII value % M is minimum should appear first.
Examples:
Input: arr[] = {‘a’, ‘b’, ‘c’, ‘e’}, M = 2 Output: b a c e The ASCII % M for the array are {97 % 2, 98 % 2, 99 % 2, 101 %... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "Given an array arr[] of characters and an integer M, the task is to sort the array based on ASCII % M i.e. the character whose ASCII value % M is minimum should appear first."... |
Find number of pairs in an array such that their XOR is 0 | 12 Jun, 2022
Given an array of size N. Find the number of pairs (i, j) such that XOR = 0, and 1 <= i < j <= N.Examples :
Input : A[] = {1, 3, 4, 1, 4}
Output : 2
Explanation : Index (0, 3) and (2, 4)
Input : A[] = {2, 2, 2}
Output : 3
First Approach : SortingXOR = 0 is only satisfied when . Therefore, we will first ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 162,
"s": 52,
"text": "Given an array of size N. Find the number of pairs (i, j) such that XOR = 0, and 1 <= i < j <= N.Examples : "
},
{
"code": null,
"e": 277,
"s": 162,
"tex... |
Map clear() method in Java with Example | 31 Dec, 2018
The java.util.Map.clear() method in Java is used to clear and remove all of the elements or mappings from a specified Map collection.
Syntax:
void clear()
Parameters: The method does not accept any parameters.
Return Value: The method does not return any value.
Below programs are used to illustrate the wor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2018"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "The java.util.Map.clear() method in Java is used to clear and remove all of the elements or mappings from a specified Map collection."
},
{
"code": null,
"e": 170,... |
Kruskal’s Algorithm (Simple Implementation for Adjacency Matrix) | 08 Jul, 2021
Below are the steps for finding MST using Kruskal’s algorithm
1. Sort all the edges in non-decreasing order of their weight. 2. Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. If cycle is not formed, include this edge. Else, discard it. 3. Repeat step#2 until there... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 118,
"s": 54,
"text": "Below are the steps for finding MST using Kruskal’s algorithm "
},
{
"code": null,
"e": 400,
"s": 118,
"text": "1. Sort all the edges in non-decreasing o... |
Create Constant Variable in Python using Pconst Library | 03 Mar, 2021
Constant variable the name itself says that it is constant. We have to define a constant variable at the time of declaration. After that, we will not able to change the value of a constant variable. In some cases, constant variables are very useful.
Creating constant variables, functions, objects is allowe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 304,
"s": 54,
"text": "Constant variable the name itself says that it is constant. We have to define a constant variable at the time of declaration. After that, we will not able to change the value... |
Perl | Greedy and non-greedy match | 29 Dec, 2019
Regular Expressions(Regex/RE) is a sequence of characters that are used for pattern matching. Or we can say that it is a way of describing a set of strings without having to list all strings in your program. We can apply a regular expression by using the pattern binding operators =~ and !~. Regex operator ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 452,
"s": 28,
"text": "Regular Expressions(Regex/RE) is a sequence of characters that are used for pattern matching. Or we can say that it is a way of describing a set of strings without having to l... |
EmBomber – Email Bomber Tool in Kali Linux | 29 Jun, 2021
EmBomber tool is used to perform call and SMS bombing on the target Email address. You must ensure that you always install the latest version of EmBomber from GitHub in order to not get stuck with the working of the tool. This tool works with open-source intelligence APIs that’s why this tool requires an ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 566,
"s": 28,
"text": "EmBomber tool is used to perform call and SMS bombing on the target Email address. You must ensure that you always install the latest version of EmBomber from GitHub in order... |
SQL | GROUP BY | 21 Mar, 2018
The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has same values in different rows then it will arrange these rows in a group.
Important Points:
GROUP BY clause is used with the SELECT statement.
In the query, GROUP BY c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has same values in different rows then... |
Python | Pandas MultiIndex.droplevel() | 24 Dec, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas MultiIndex.droplevel() function return Index with requested level removed. If MultiInd... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
offsetWidth, clientWidth, scrollWidth and Height, respectively in CSS | 28 Mar, 2019
offsetWidth: It returns the width of an HTML element including padding, border and scrollbar in pixels but it does not include margin width. If the element does not have any associated layout box then it returns zero.
Syntax:
element.offsetWidth
clientWidth: It returns the width of an HTML element includin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2019"
},
{
"code": null,
"e": 246,
"s": 28,
"text": "offsetWidth: It returns the width of an HTML element including padding, border and scrollbar in pixels but it does not include margin width. If the element does not have any a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.