title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
sprintf() in C | 28 Jun, 2022
Syntax:
int sprintf(char *str, const char *string,...);
Return:
If successful,
it returns the total number of
characters written excluding
null-character appended in the string,
in case of failure a negative number
is returned .
sprintf stands for “String print”. Instead of printing on console, it s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 61,
"s": 52,
"text": "Syntax: "
},
{
"code": null,
"e": 110,
"s": 61,
"text": "int sprintf(char *str, const char *string,...); "
},
{
"code": null,
"e": 119,
"s"... |
How to make a vertical line using HTML ? | 10 May, 2022
To make a vertical line, use border-left or border-right property. The height property is used to set the height of border (vertical line) element. Position property is used to set the position of vertical line.
Example 1: It creates a vertical line using border-left, height and position property.
html
<!... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 266,
"s": 54,
"text": "To make a vertical line, use border-left or border-right property. The height property is used to set the height of border (vertical line) element. Position property is used ... |
How to create an image element dynamically using JavaScript ? | 20 Jul, 2021
Given an HTML element and the task is to create an <img> element and append it to the document using JavaScript. In these examples when someone clicks on the button then the <img> element created. We can replace click event by any other JavaScript event.
Approach 1:
Create an empty img element using docume... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 307,
"s": 52,
"text": "Given an HTML element and the task is to create an <img> element and append it to the document using JavaScript. In these examples when someone clicks on the button then the ... |
How to add data in JSON file using Node.js ? | 29 Dec, 2021
JSON stands for Javascript Object Notation. It is one of the easiest ways to exchange information between applications and is generally used by websites/APIs to communicate. For getting started with Node.js, refer this article.
First of all, you need to ensure that the JSON file that you are expecting is n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 256,
"s": 28,
"text": "JSON stands for Javascript Object Notation. It is one of the easiest ways to exchange information between applications and is generally used by websites/APIs to communicate. F... |
Sort an array of large numbers | 29 Mar, 2022
Given an array of numbers where every number is represented as string. The numbers may be very large (may not fit in long long int), the task is to sort these numbers.Examples:
Input : arr[] = {"5", "1237637463746732323", "12" };
Output : arr[] = {"5", "12", "1237637463746732323"};
Input : arr[] = {"50"... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Mar, 2022"
},
{
"code": null,
"e": 233,
"s": 54,
"text": "Given an array of numbers where every number is represented as string. The numbers may be very large (may not fit in long long int), the task is to sort these numbers.Example... |
Python | Program to count number of lists in a list of lists | 07 May, 2019
Given a list of lists, write a Python program to count the number of lists contained within the list of lists.
Examples:
Input : [[1, 2, 3], [4, 5], [6, 7, 8, 9]]
Output : 3
Input : [[1], ['Bob'], ['Delhi'], ['x', 'y']]
Output : 4
Method #1 : Using len()
# Python3 program to Count number # of lists in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 139,
"s": 28,
"text": "Given a list of lists, write a Python program to count the number of lists contained within the list of lists."
},
{
"code": null,
"e": 149,
"s": 139,
"tex... |
Apriori Algorithm in R Programming | 20 Aug, 2021
Apriori algorithm is used for finding frequent itemsets in a dataset for association rule mining. It is called Apriori because it uses prior knowledge of frequent itemset properties. We apply an iterative approach or level-wise search where k-frequent itemsets are used to find k+1 itemsets. To improve the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 593,
"s": 52,
"text": "Apriori algorithm is used for finding frequent itemsets in a dataset for association rule mining. It is called Apriori because it uses prior knowledge of frequent itemset pro... |
XML parsing in Python | 28 Jun, 2022
This article focuses on how one can parse a given XML file and extract some useful data out of it in a structured way.
XML: XML stands for eXtensible Markup Language. It was designed to store and transport data. It was designed to be both human- and machine-readable.That’s why, the design goals of XML emph... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 171,
"s": 52,
"text": "This article focuses on how one can parse a given XML file and extract some useful data out of it in a structured way."
},
{
"code": null,
"e": 490,
"s": 171,... |
IntegerField – Django Forms | 13 Feb, 2020
IntegerField in Django Forms is a integer field, for input of Integer numbers. The default widget for this input is NumberInput. It normalizes to a Python Integer. It uses MaxLengthValidator and MinLengthValidator if max_length and min_length are provided. Otherwise, all inputs are valid.
IntegerField has ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 318,
"s": 28,
"text": "IntegerField in Django Forms is a integer field, for input of Integer numbers. The default widget for this input is NumberInput. It normalizes to a Python Integer. It uses Max... |
Generic Linked List in C | 27 Jun, 2022
Unlike C++ and Java, C doesn’t support generics. How to create a linked list in C that can be used for any data type? In C, we can use a void pointer and a function pointer to implement the same functionality. The great thing about void pointer is it can be used to point to any data type. Also, the size of... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jun, 2022"
},
{
"code": null,
"e": 552,
"s": 52,
"text": "Unlike C++ and Java, C doesn’t support generics. How to create a linked list in C that can be used for any data type? In C, we can use a void pointer and a function pointer t... |
Display the contents of a VIEW in MySQL? | Following is the syntax −
select * from yourViewName;
Let us first create a table −
mysql> create table DemoTable1388
-> (
-> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> StudentName varchar(40)
-> );
Query OK, 0 rows affected (0.71 sec)
Insert some records in the table using insert command −
mysql... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1116,
"s": 1088,
"text": "select * from yourViewName;"
},
{
"code": null,
"e": 1146,
"s": 1116,
"text": "Let us first create a table −"
},
{
"code": null,... |
How to implement a filter() for Objects in JavaScript? - GeeksforGeeks | 28 Jan, 2020
The filter() method basically outputs all the element object that pass a specific test or satisfies a specific function. The return type of the filter() method is an array that consists of all the element(s)/object(s) satisfying the specified function.
Syntax:
var newArray = arr.filter(callback(object[, in... | [
{
"code": null,
"e": 37579,
"s": 37551,
"text": "\n28 Jan, 2020"
},
{
"code": null,
"e": 37832,
"s": 37579,
"text": "The filter() method basically outputs all the element object that pass a specific test or satisfies a specific function. The return type of the filter() method is ... |
Dynamic VideoView in Kotlin - GeeksforGeeks | 16 Dec, 2021
In Android, VideoView is used to load video files. We can rely on any of the external resources, URLs, or the local data in order to fetch the video content. In this article, we will be discussing how to create a VideoView in Kotlin dynamically.
Note: If we use the video view in the background or just go b... | [
{
"code": null,
"e": 23719,
"s": 23691,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 23965,
"s": 23719,
"text": "In Android, VideoView is used to load video files. We can rely on any of the external resources, URLs, or the local data in order to fetch the video content. In th... |
How to generate Tkinter Buttons dynamically? | In this article, we will see how to create buttons dynamically in a tkinter window.
Creating buttons dynamically means customizing the buttons and their functionality by adding events to them.
First, we will import the tkinter library in the notebook, then we will create an instance using the Button function which take... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "In this article, we will see how to create buttons dynamically in a tkinter window.\nCreating buttons dynamically means customizing the buttons and their functionality by adding events to them."
},
{
"code": null,
"e": 1503,
"s": 1255,
... |
How to send data back to the Main Activity in Android using Kotlin? | This example demonstrates how to send data back to the Main Activity 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="utf... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrates how to send data back to the Main Activity in Android using Kotlin"
},
{
"code": null,
"e": 1284,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
Unfolding Naïve Bayes from Scratch ! | by Aisha Javed | Towards Data Science | Whether you are a beginner in Machine Learning or you have been trying hard to understand the Super Natural Machine Learning Algorithms and you still feel that the dots do not connect somehow, this post is definitely for you!
I have tried to keep things simple and in plain-English. The sole purpose is to deeply and cle... | [
{
"code": null,
"e": 398,
"s": 172,
"text": "Whether you are a beginner in Machine Learning or you have been trying hard to understand the Super Natural Machine Learning Algorithms and you still feel that the dots do not connect somehow, this post is definitely for you!"
},
{
"code": null,
... |
Angular 6 - Data Binding | Data Binding is available right from AngularJS, Angular 2,4 and is now available in Angular 6 as well. We use curly braces for data binding - {{}}; this process is called interpolation. We have already seen in our previous examples how we declared the value to the variable title and the same is printed in the browser.
... | [
{
"code": null,
"e": 2315,
"s": 1995,
"text": "Data Binding is available right from AngularJS, Angular 2,4 and is now available in Angular 6 as well. We use curly braces for data binding - {{}}; this process is called interpolation. We have already seen in our previous examples how we declared the v... |
How to bring your Data Science Project in production | by René Bremer | Towards Data Science | A lot of companies struggle to bring their data science projects into production. A common issue is that the closer the model is to production, the harder it is to answer the following question:
Why did the model predict this?
Having a build/release pipeline for data science projects can help to answer this question. I... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "A lot of companies struggle to bring their data science projects into production. A common issue is that the closer the model is to production, the harder it is to answer the following question:"
},
{
"code": null,
"e": 399,
"s": 367,
... |
CycleGANS and Pix2Pix. Credits: Presenting abridged version of... | by Manish Chablani | Towards Data Science | Credits: Presenting abridged version of these blogs to explain the idea and concepts behind pix2pix and cycleGANs.
Christopher Hesse blog:
affinelayer.com
Olga Liakhovich blog:
www.microsoft.com
paper: https://phillipi.github.io/pix2pix/
pix2pix uses a conditional generative adversarial network (cGAN) to learn a mappin... | [
{
"code": null,
"e": 287,
"s": 172,
"text": "Credits: Presenting abridged version of these blogs to explain the idea and concepts behind pix2pix and cycleGANs."
},
{
"code": null,
"e": 311,
"s": 287,
"text": "Christopher Hesse blog:"
},
{
"code": null,
"e": 327,
"... |
Rail Fence Cipher - Encryption and Decryption - GeeksforGeeks | 22 Mar, 2022
Given a plain-text message and a numeric key, cipher/de-cipher the given text using Rail Fence algorithm. The rail fence cipher (also called a zigzag cipher) is a form of transposition cipher. It derives its name from the way in which it is encoded. Examples:
Encryption
Input : "GeeksforGeeks "
Key = 3
... | [
{
"code": null,
"e": 24099,
"s": 24071,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 24361,
"s": 24099,
"text": "Given a plain-text message and a numeric key, cipher/de-cipher the given text using Rail Fence algorithm. The rail fence cipher (also called a zigzag cipher) is a ... |
Minimum possible sum of array elements after performing the given operation - GeeksforGeeks | 15 Nov, 2021
Given an array arr[] of positive integers and an integer x, the task is to minimize the sum of elements of the array after performing the given operation at most once. In a single operation, any element from the array can be divided by x (if it is divisible by x) and at the same time, any other element fro... | [
{
"code": null,
"e": 25205,
"s": 25177,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 25560,
"s": 25205,
"text": "Given an array arr[] of positive integers and an integer x, the task is to minimize the sum of elements of the array after performing the given operation at most o... |
ConcurrentNavigableMap Interface in Java - GeeksforGeeks | 19 Dec, 2021
The ConcurrentNavigableMap interface is a member of the Java Collection Framework. It extends from the NavigableMap interface and ConcurrentMap interface. The ConcurrentNavigableMap provides thread-safe access to map elements along with providing convenient navigation methods. It belongs to java.util.concu... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 24190,
"s": 23868,
"text": "The ConcurrentNavigableMap interface is a member of the Java Collection Framework. It extends from the NavigableMap interface and ConcurrentMap interface. The Conc... |
Logo - Turtle World | Logo has a number of other additional drawing commands, some of these are given below.
home
cleartext or ct
label
setxy
The label command takes a single word as a quoted string (e.g. “a_string”) or a list of words in [ ] brackets without quotation (e.g. [a string of letters]) and prints them on the graphics window at t... | [
{
"code": null,
"e": 1921,
"s": 1834,
"text": "Logo has a number of other additional drawing commands, some of these are given below."
},
{
"code": null,
"e": 1926,
"s": 1921,
"text": "home"
},
{
"code": null,
"e": 1942,
"s": 1926,
"text": "cleartext or ct"
... |
How to add a date and time in HTML5? | Use the <time> tag to add date and time. The HTML <time> tag is used for displaying the human readable date and time.
The HTML <time> tag also supports the following additional attribute −
You can try to run the following code to learn how to add date and time <details> in HTML5 −
<!Doctype html>
<html>
<head>
... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "Use the <time> tag to add date and time. The HTML <time> tag is used for displaying the human readable date and time."
},
{
"code": null,
"e": 1251,
"s": 1180,
"text": "The HTML <time> tag also supports the following additional attri... |
How to pad a number with leading zeros in JavaScript? | To pad a number with leading zeros, a function is created here, which checks the number with its length and add leading zeros.
You can try to run the following code to pad a number with leading zeros in JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<body>
<script>
String.prototype.padFunction = functi... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "To pad a number with leading zeros, a function is created here, which checks the number with its length and add leading zeros."
},
{
"code": null,
"e": 1278,
"s": 1189,
"text": "You can try to run the following code to pad a number w... |
Pulling Your Data Up By the Bootstraps | by Simon Spichak | Towards Data Science | If you work with any large datasets, you have probably heard of bootstrapping. If you are a burgeoning statistician or bioinformatician, it is part of your computational toolset. What is the point of using this function? More importantly, what is bootstrapping anyway?
Bradley Efron first published the idea of bootstrap... | [
{
"code": null,
"e": 441,
"s": 172,
"text": "If you work with any large datasets, you have probably heard of bootstrapping. If you are a burgeoning statistician or bioinformatician, it is part of your computational toolset. What is the point of using this function? More importantly, what is bootstra... |
Calling an External Program in Java using Process and Runtime - GeeksforGeeks | 09 Aug, 2019
Java contains the functionality of initiating an external process – an executable file or an existing application on the system, such as Google Chrome or the Media Player- by simple Java code. One way is to use following two classes for the purpose:
Process classRuntime class
Process class
Runtime class
Th... | [
{
"code": null,
"e": 24462,
"s": 24434,
"text": "\n09 Aug, 2019"
},
{
"code": null,
"e": 24712,
"s": 24462,
"text": "Java contains the functionality of initiating an external process – an executable file or an existing application on the system, such as Google Chrome or the Media... |
In JavaScript, can be use a new line in console.log? | Yes, we can use a new line using “\n” in console.log(). Following is the code −
const studentDetailsObject = new Object()
studentDetailsObject.name = 'David'
studentDetailsObject.subjectName = 'JavaScript'
studentDetailsObject.countryName = 'US'
studentDetailsObject.print = function(){
console.log('hello David');
}
... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Yes, we can use a new line using “\\n” in console.log(). Following is the code −"
},
{
"code": null,
"e": 1440,
"s": 1142,
"text": "const studentDetailsObject = new Object()\nstudentDetailsObject.name = 'David'\nstudentDetailsObject.... |
Angular 2 - Handling Events | In Angular 2, events such as button click or any other sort of events can also be handled very easily. The events get triggered from the html page and are sent across to Angular JS class for further processing.
Let’s look at an example of how we can achieve event handling. In our example, we will look at displaying a c... | [
{
"code": null,
"e": 2508,
"s": 2297,
"text": "In Angular 2, events such as button click or any other sort of events can also be handled very easily. The events get triggered from the html page and are sent across to Angular JS class for further processing."
},
{
"code": null,
"e": 2769,... |
Black-Box Attacks on Perceptual Image Hashes with GANs | by Nick Locascio | Towards Data Science | tldr: This post demonstrates that GANs are capable of breaking image hash algorithms in two key ways: (1) Reversal Attack: Synthesizing the original image from the hash (2) Poisoning Attack: synthesizing hash collisions for arbitrary natural image distributions.
A Perceptual image hash (PIH) is a short hexadecimal stri... | [
{
"code": null,
"e": 434,
"s": 171,
"text": "tldr: This post demonstrates that GANs are capable of breaking image hash algorithms in two key ways: (1) Reversal Attack: Synthesizing the original image from the hash (2) Poisoning Attack: synthesizing hash collisions for arbitrary natural image distrib... |
Find maximum element along with its index in Julia - findmax() Method - GeeksforGeeks | 26 Mar, 2020
The findmax() is an inbuilt function in julia which is used to return the maximum element of the specified collection along with its index. If there are multiple maximal elements are present in the collection, then the first one will be returned. If there is any data element is NaN, this element is returne... | [
{
"code": null,
"e": 24100,
"s": 24072,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 24410,
"s": 24100,
"text": "The findmax() is an inbuilt function in julia which is used to return the maximum element of the specified collection along with its index. If there are multiple m... |
Java nested if statement example | It is always legal to nest if-else statements which means you can use one if or else if statement inside another if or else if statement.
The syntax for a nested if...else is as follows −
if(Boolean_expression 1) {
// Executes when the Boolean expression 1 is true
if(Boolean_expression 2) {
// Executes when... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "It is always legal to nest if-else statements which means you can use one if or else if statement inside another if or else if statement."
},
{
"code": null,
"e": 1250,
"s": 1200,
"text": "The syntax for a nested if...else is as foll... |
Ridge Regression Python Example. A tutorial on how to implement Ridge... | by Cory Maklin | Towards Data Science | Overfitting, the process by which a model performs well for training samples but fails to generalize, is one of the main challenges in machine learning. In the proceeding article, we’ll cover how we can use regularization to help prevent overfitting. To be specific, we’ll talk about Ridge Regression, a distant cousin o... | [
{
"code": null,
"e": 572,
"s": 172,
"text": "Overfitting, the process by which a model performs well for training samples but fails to generalize, is one of the main challenges in machine learning. In the proceeding article, we’ll cover how we can use regularization to help prevent overfitting. To b... |
Could Pluto Be A Real Jupyter Replacement? | by Emmett Boudreau | Towards Data Science | Are you a Julia developer who is sick and tired of Jupyter Notebook always getting in the way of your programming?
Me niether.
Despite my overall lack of need for a new notebook system, as I don’t even use the one I have that often, I decided to take a look at Pluto.jl because of recommendation from a friend. Pluto.jl ... | [
{
"code": null,
"e": 287,
"s": 172,
"text": "Are you a Julia developer who is sick and tired of Jupyter Notebook always getting in the way of your programming?"
},
{
"code": null,
"e": 299,
"s": 287,
"text": "Me niether."
},
{
"code": null,
"e": 811,
"s": 299,
... |
Stop Hardcoding Sensitive Data in Your Python Applications | by Ahmed Besbes | Towards Data Science | As a data scientist, I daily use Python to build applications that rely on credentials and sensitive settings.
Here are some examples of those, off the top of my head:
API keys to access third-party services
Passwords and credentials
Email addresses or personal data (name, age, social security number, etc.)
Debug flags... | [
{
"code": null,
"e": 283,
"s": 172,
"text": "As a data scientist, I daily use Python to build applications that rely on credentials and sensitive settings."
},
{
"code": null,
"e": 340,
"s": 283,
"text": "Here are some examples of those, off the top of my head:"
},
{
"cod... |
Select any row from a Dataframe in Pandas | Python - GeeksforGeeks | 24 Oct, 2019
In this article, we will learn how to get the rows from a dataframe as a list, without using the functions like ilic[]. There are multiple ways to do get the rows as a list from given dataframe. Let’s see them will the help of examples.
# importing pandas as pd import pandas as pd # Create the datafram... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n24 Oct, 2019"
},
{
"code": null,
"e": 24138,
"s": 23901,
"text": "In this article, we will learn how to get the rows from a dataframe as a list, without using the functions like ilic[]. There are multiple ways to do get the rows ... |
Python program to print decimal octal hex and binary of first n numbers | Suppose we have a value n. We have to print Decimal, Octal, Hexadecimal and Binary equivalent of first n numbers (1 to n) in four different columns. As we know, we can express the numbers with prefix characters d, o, X and b for decimal, octal, hexadecimal and decimal respectively.
So, if the input is like n = 10, then... | [
{
"code": null,
"e": 1345,
"s": 1062,
"text": "Suppose we have a value n. We have to print Decimal, Octal, Hexadecimal and Binary equivalent of first n numbers (1 to n) in four different columns. As we know, we can express the numbers with prefix characters d, o, X and b for decimal, octal, hexadeci... |
Add 1 to a number represented as a linked list? | The linked list representation of a number is provided in such a way that the all nodes of the linked list are treated as one digit of the number. The node stores the number such that the first element of the linked list holds the most significant digit of the number, and the last element of the linked list holds the l... | [
{
"code": null,
"e": 1506,
"s": 1062,
"text": "The linked list representation of a number is provided in such a way that the all nodes of the linked list are treated as one digit of the number. The node stores the number such that the first element of the linked list holds the most significant digit... |
Plotting A Square Wave Using Matplotlib, Numpy And Scipy | 20 Apr, 2022
Prerequisites: linspace, Mathplotlib, Scipy
A square wave is a non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between the fixed minimum and maximum values, with the same duration at minimum and maximum. Graphical representations are always easy to understand and ar... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 72,
"s": 28,
"text": "Prerequisites: linspace, Mathplotlib, Scipy"
},
{
"code": null,
"e": 508,
"s": 72,
"text": "A square wave is a non-sinusoidal periodic waveform in which the... |
Node.js EventEmitter | 13 Oct, 2021
Node.js uses events module to create and handle custom events. The EventEmitter class can be used to create and handle custom events module.The syntax to Import the events module are given below:
Syntax:
const EventEmitter = require('events');
All EventEmitters emit the event newListener when new listeners... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Node.js uses events module to create and handle custom events. The EventEmitter class can be used to create and handle custom events module.The syntax to Import the events mod... |
How to change the color of Action Bar in an Android App? | 23 Feb, 2021
In this article, you will learn how to change the colour of the Action Bar in an Android App.
There are two ways to change color.
By changing styles.xml file:Just go to res/values/styles.xml fileedit the xml file to change the color of action bar.Code for styles.xml is given belowstyles.xmlactivity_main.xm... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 148,
"s": 54,
"text": "In this article, you will learn how to change the colour of the Action Bar in an Android App."
},
{
"code": null,
"e": 184,
"s": 148,
"text": "There are t... |
Python | Timezone Conversion | 19 Jul, 2019
Most datetime items came back from the dateutil parser are naive, which means they don’t have an explicit tzinfo. tzinfo determines the timezone and UTC offest. It is the standard ISO format for UTC datetime strings. UTC is the coordinated universal time, and is fundamentally the equivalent as GMT. ISO is ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 452,
"s": 28,
"text": "Most datetime items came back from the dateutil parser are naive, which means they don’t have an explicit tzinfo. tzinfo determines the timezone and UTC offest. It is the stan... |
Python MongoDB – Update_one() | 13 Jan, 2022
MongoDB is a cross-platform document-oriented and a non relational (i.e NoSQL) database program. It is an open-source document database, that stores the data in the form of key-value pairs.First create a database on which we perform the update_one() operation:
Python3
# importing Mongoclient from pymongo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 315,
"s": 52,
"text": "MongoDB is a cross-platform document-oriented and a non relational (i.e NoSQL) database program. It is an open-source document database, that stores the data in the form of k... |
Express.js req.get() Function | 09 Jul, 2020
The req.get() function returns the specified HTTP request header field which is case-insensitive match and the Referrer and Referrer fields are interchangeable.
Syntax:
req.get( field )
Parameter: The field parameter specifies the HTTP request header field.
Return Value: String.
Installation of express mod... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2020"
},
{
"code": null,
"e": 189,
"s": 28,
"text": "The req.get() function returns the specified HTTP request header field which is case-insensitive match and the Referrer and Referrer fields are interchangeable."
},
{
... |
OpenCV | Saving an Image | 26 Aug, 2019
This article aims to learn how to save an image from one location to any other desired location on your system in CPP using OpenCv. Using OpenCV, we can generate a blank image with any colour one wishes to.
So, let us dig deep into it and understand the concept with the complete explanation.
// c++ code ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "This article aims to learn how to save an image from one location to any other desired location on your system in CPP using OpenCv. Using OpenCV, we can generate a blank image... |
ggplot2 – Title and Subtitle with Different Size and Color in R | 16 May, 2021
A Title and the subtitle to a plot give a piece of information about the graph that what the graph actually wants to represent. This article describes how to add a Title and Subtitle with Different Sizes and Colors using ggplot2 in R Programming.
To add a Title and Subtitle within a plot, first, we have to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "A Title and the subtitle to a plot give a piece of information about the graph that what the graph actually wants to represent. This article describes how to add a Title and S... |
Structures, Unions and Enumerations in C++ | 18 Apr, 2022
In this article, we will discuss structures, unions, and enumerations and their differences.
The structure is a user-defined data type that is available in C++.
Structures are used to combine different types of data types, just like an array is used to combine the same type of data types.
A structure is de... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 147,
"s": 54,
"text": "In this article, we will discuss structures, unions, and enumerations and their differences."
},
{
"code": null,
"e": 215,
"s": 147,
"text": "The structur... |
Python program to print the octal value of the numbers from 1 to N | 24 Jan, 2021
Given a number N, the task is to write a Python program to print the octal value of the numbers from 1 to N.
Examples:
Input: 3
Output: 1
2
3
Input: 11
Output: 1
2
3
4
5
6
7
10
11
12
13
Approach:
We wil... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Given a number N, the task is to write a Python program to print the octal value of the numbers from 1 to N."
},
{
"code": null,
"e": 147,
"s": 137,
"text"... |
Graph Theory - Types of Graphs | There are various types of graphs depending upon the number of vertices, number of edges, interconnectivity, and their overall structure. We will discuss only a certain few important types of graphs in this chapter.
A graph having no edges is called a Null Graph.
In the above graph, there are three vertices named ‘a’, ... | [
{
"code": null,
"e": 2182,
"s": 1966,
"text": "There are various types of graphs depending upon the number of vertices, number of edges, interconnectivity, and their overall structure. We will discuss only a certain few important types of graphs in this chapter."
},
{
"code": null,
"e": ... |
Data Scientist vs Data Analyst. Here’s the Difference. | by Matt Przybyla | Towards Data Science | IntroductionData ScientistData AnalystSimilaritiesDifferencesSummaryReferences
Introduction
Data Scientist
Data Analyst
Similarities
Differences
Summary
References
Whereas data science and machine learning fields share confusion between their job descriptions, employers, and the general public, the difference between d... | [
{
"code": null,
"e": 250,
"s": 171,
"text": "IntroductionData ScientistData AnalystSimilaritiesDifferencesSummaryReferences"
},
{
"code": null,
"e": 263,
"s": 250,
"text": "Introduction"
},
{
"code": null,
"e": 278,
"s": 263,
"text": "Data Scientist"
},
{
... |
Matplotlib - Formatting Axes | Sometimes, one or a few points are much larger than the bulk of data. In such a case, the scale of an axis needs to be set as logarithmic rather than the normal scale. This is the Logarithmic scale. In Matplotlib, it is possible by setting xscale or vscale property of axes object to ‘log’.
It is also required sometimes... | [
{
"code": null,
"e": 2807,
"s": 2516,
"text": "Sometimes, one or a few points are much larger than the bulk of data. In such a case, the scale of an axis needs to be set as logarithmic rather than the normal scale. This is the Logarithmic scale. In Matplotlib, it is possible by setting xscale or vsc... |
Program to display Astrological sign or Zodiac sign for given date of birth - GeeksforGeeks | 17 May, 2021
For given date of birth, this program displays an astrological sign or Zodiac sign.Examples :
Input : Day = 10, Month = December
Output : Sagittarius
Explanation :
People born on this date have a zodiac Sagittarius.
Input : Day = 7, Month = September
Output : Virgo
Approach :Although the exact dates c... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 23997,
"s": 23901,
"text": "For given date of birth, this program displays an astrological sign or Zodiac sign.Examples : "
},
{
"code": null,
"e": 24170,
"s": 23997,
"te... |
Least prime factor of numbers till n - GeeksforGeeks | 08 Dec, 2021
Given a number n, print least prime factors of all numbers from 1 to n. The least prime factor of an integer n is the smallest prime number that divides the number. The least prime factor of all even numbers is 2. A prime number is its own least prime factor (as well as its own greatest prime factor).Note:... | [
{
"code": null,
"e": 24229,
"s": 24201,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 24573,
"s": 24229,
"text": "Given a number n, print least prime factors of all numbers from 1 to n. The least prime factor of an integer n is the smallest prime number that divides the number... |
IMS DB - Quick Guide | Database is a collection of correlated data items. These data items are organized and stored in a manner to provide fast and easy access. IMS database is a hierarchical database where data is stored at different levels and each entity is dependent on higher level entities. The physical elements on an application system... | [
{
"code": null,
"e": 2315,
"s": 1946,
"text": "Database is a collection of correlated data items. These data items are organized and stored in a manner to provide fast and easy access. IMS database is a hierarchical database where data is stored at different levels and each entity is dependent on hi... |
Histograms and Density Plots in Python | by Will Koehrsen | Towards Data Science | Visualizing One-Dimensional Data in Python
Plotting a single variable seems like it should be easy. With only one dimension how hard can it be to effectively display the data? For a long time, I got by using the simple histogram which shows the location of values, the spread of the data, and the shape of the data (norm... | [
{
"code": null,
"e": 215,
"s": 172,
"text": "Visualizing One-Dimensional Data in Python"
},
{
"code": null,
"e": 953,
"s": 215,
"text": "Plotting a single variable seems like it should be easy. With only one dimension how hard can it be to effectively display the data? For a long... |
SVM: Feature Selection and Kernels | by Pier Paolo Ippolito | Towards Data Science | A Support Vector Machine (SVM) is a supervised machine learning algorithm that can be employed for both classification and regression purposes.
- Noel Bambrick.
1
2
3
4
5
6
7
8
9
10
Powered by Play.ht
Create audio with Play.ht
Create Audio Narrations with Play.ht
Support Vector Machines (SVM) is a Machine Learning Algo... | [
{
"code": null,
"e": 315,
"s": 171,
"text": "A Support Vector Machine (SVM) is a supervised machine learning algorithm that can be employed for both classification and regression purposes."
},
{
"code": null,
"e": 332,
"s": 315,
"text": "- Noel Bambrick."
},
{
"code": nul... |
How to declare an attribute in Python without a value?
| In Python, as well as in several other languages, there is a value that means "no value". In Python, that value with no value is None. So the following shows how None is used −
class Student:
StudentName = None
RollNumber = None
Those are like instance variables though, and not class variables, so we may as well ... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "In Python, as well as in several other languages, there is a value that means \"no value\". In Python, that value with no value is None. So the following shows how None is used −"
},
{
"code": null,
"e": 1297,
"s": 1239,
"text": "cla... |
Android - Data Backup | Android allows you to backup your application data to remote "cloud" storage, in order to provide a restore point for the application data and settings. You can only backup your application data. In order to access the other applications data, you need to root your phone.
In order to make a data backup application, you... | [
{
"code": null,
"e": 3880,
"s": 3607,
"text": "Android allows you to backup your application data to remote \"cloud\" storage, in order to provide a restore point for the application data and settings. You can only backup your application data. In order to access the other applications data, you nee... |
How to make an anchor tag refer to nothing? | To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression "0" has no effect in JavaScript. Here the expression "0" is evaluated, but it is not loaded back into the current document.
Live Demo
<html>
<head>
<script>
<!--
//-->
... | [
{
"code": null,
"e": 1308,
"s": 1062,
"text": "To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression \"0\" has no effect in JavaScript. Here the expression \"0\" is evaluated, but it is not loaded back into the current document."
... |
Program to find century for a year in C++ | In this tutorial, we will be discussing a program to find the century for a year.
For this we will be provided with a year. Our task is to find the century in which the given year falls.
Live Demo
#include <bits/stdc++.h>
using namespace std;
void find_century(int year){
//year values can only be positive
if (ye... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find the century for a year."
},
{
"code": null,
"e": 1249,
"s": 1144,
"text": "For this we will be provided with a year. Our task is to find the century in which the given year fa... |
Java Program to take Screenshots - GeeksforGeeks | 18 Jan, 2018
In this program we will see how we can take screenshots using a java program and save the screenshot in desired folder.We use java.awt.Robot class to capture pixels of screen. It provides method like createScreenCapture which captures the current screen. This method returns captured image as BufferedImage ... | [
{
"code": null,
"e": 24856,
"s": 24828,
"text": "\n18 Jan, 2018"
},
{
"code": null,
"e": 25560,
"s": 24856,
"text": "In this program we will see how we can take screenshots using a java program and save the screenshot in desired folder.We use java.awt.Robot class to capture pixel... |
5 SMOTE Techniques for Oversampling your Imbalance Data | by Cornellius Yudha Wijaya | Towards Data Science | If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here.
Imbalance data is a case where the classification dataset class has a skewed proportion. For example, I would use the churn dataset from Kaggle for th... | [
{
"code": null,
"e": 342,
"s": 172,
"text": "If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here."
},
{
"code": null,
"e": 504,
"s": 342,
"text": "Imbalance data i... |
Spark SQL 102 — Aggregations and Window Functions | by David Vrba | Towards Data Science | Data aggregation is an important step in many data analyses. It is a way how to reduce the dataset and compute various metrics, statistics, and other characteristics. A related but slightly more advanced topic are window functions that allow computing also other analytical and ranking functions on the data based on a w... | [
{
"code": null,
"e": 522,
"s": 172,
"text": "Data aggregation is an important step in many data analyses. It is a way how to reduce the dataset and compute various metrics, statistics, and other characteristics. A related but slightly more advanced topic are window functions that allow computing als... |
Java Examples - Collection Comparison | How to compare elements in a collection ?
Following example compares the element of a collection by converting a string into a treeset using Collection.min() and Collection.max() methods of Collection class.
import java.util.Collections;
import java.util.Set;
import java.util.TreeSet;
public class MainClass {
publ... | [
{
"code": null,
"e": 2110,
"s": 2068,
"text": "How to compare elements in a collection ?"
},
{
"code": null,
"e": 2276,
"s": 2110,
"text": "Following example compares the element of a collection by converting a string into a treeset using Collection.min() and Collection.max() met... |
NumPy - Advanced Indexing | It is possible to make a selection from ndarray that is a non-tuple sequence, ndarray object of integer or Boolean data type, or a tuple with at least one item being a sequence object. Advanced indexing always returns a copy of the data. As against this, the slicing only presents a view.
There are two types of advanced... | [
{
"code": null,
"e": 2532,
"s": 2243,
"text": "It is possible to make a selection from ndarray that is a non-tuple sequence, ndarray object of integer or Boolean data type, or a tuple with at least one item being a sequence object. Advanced indexing always returns a copy of the data. As against this... |
C++ basic_streambuf Library - pbase | It is used in pointer to beginning of output sequence and returns a pointer to the first element of the array with the portion of the controlled output sequence that is currently buffered.
Following is the declaration for std::basic_streambuf::pbase.
char_type* pbase() const;
none
It returns a pointer to the beginning ... | [
{
"code": null,
"e": 2792,
"s": 2603,
"text": "It is used in pointer to beginning of output sequence and returns a pointer to the first element of the array with the portion of the controlled output sequence that is currently buffered."
},
{
"code": null,
"e": 2854,
"s": 2792,
"t... |
Part 9: Time Series Consensus Motifs | by Sean Law | Towards Data Science | STUMPY is a powerful and scalable Python library for modern time series analysis and, at its core, efficiently computes something called a matrix profile. The goal of this multi-part series is to explain what the matrix profile is and how you can start leveraging STUMPY for all of your modern time series data mining ta... | [
{
"code": null,
"e": 496,
"s": 171,
"text": "STUMPY is a powerful and scalable Python library for modern time series analysis and, at its core, efficiently computes something called a matrix profile. The goal of this multi-part series is to explain what the matrix profile is and how you can start le... |
How can we Implement a Stack using Queue in Java? | A Stack is a subclass of Vector class and it represents last-in-first-out (LIFO) stack of objects. The last element added at the top of the stack (In) can be the first element to be removed (Out) from the stack.
A Queue class extends Collection interface and it supports the insert and removes operations using a first-i... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "A Stack is a subclass of Vector class and it represents last-in-first-out (LIFO) stack of objects. The last element added at the top of the stack (In) can be the first element to be removed (Out) from the stack."
},
{
"code": null,
"e": 1466... |
TIKA - Extracting MS-Office Files | Given below is the program to extract content and metadata from a Microsoft Office Document.
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;
import org.... | [
{
"code": null,
"e": 2203,
"s": 2110,
"text": "Given below is the program to extract content and metadata from a Microsoft Office Document."
},
{
"code": null,
"e": 3416,
"s": 2203,
"text": "import java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\n\nimp... |
Spring Boot MongoDB + Spring Data 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 show how to... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
PHP | Uploading File - GeeksforGeeks | 12 May, 2018
Have you ever wondered how websites build their system of file uploading in PHP? Here we will come to know about the file uploading process. A question which you can come up with – ‘Are we able to upload any kind of file with this system?’. The answer is yes, we can upload files with different types of ext... | [
{
"code": null,
"e": 40527,
"s": 40499,
"text": "\n12 May, 2018"
},
{
"code": null,
"e": 40914,
"s": 40527,
"text": "Have you ever wondered how websites build their system of file uploading in PHP? Here we will come to know about the file uploading process. A question which you c... |
Node.js crypto.pbkdf2() Method | 11 Oct, 2021
The crypto.pbkdf2() method gives an asynchronous Password-Based Key Derivation Function 2 i.e. (PBKDF2) implementation. Moreover, a particular HMAC digest algorithm which is defined by digest is implemented to derive a key of the required byte length (keylen) from the stated password, salt, and iterations.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "The crypto.pbkdf2() method gives an asynchronous Password-Based Key Derivation Function 2 i.e. (PBKDF2) implementation. Moreover, a particular HMAC digest algorithm which is d... |
Oracle Interview Experience | Applications Engineer | 17 Jun, 2020
Round 1:
1) Tell me about yourself
2) Problem Statement:
Reverse the words in below string considering all negative test cases
Input: Hello World
Output: olleH dlroW
If the input have more than 1 space as separator then output should contain as much space as input
If the statement have start and... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2020"
},
{
"code": null,
"e": 41,
"s": 31,
"text": "Round 1: "
},
{
"code": null,
"e": 68,
"s": 41,
"text": "1) Tell me about yourself "
},
{
"code": null,
"e": 92,
"s": 68,
"text": "2) Pr... |
Python | Pandas.to_datetime() | 17 Sep, 2018
When a csv file is imported and a Data Frame is made, the Date time objects in the file are read as a string object rather a Date Time object and Hence it’s very tough to perform operations like Time difference on a string rather a Date Time object. Pandas to_datetime() method helps to convert string Date ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2018"
},
{
"code": null,
"e": 370,
"s": 28,
"text": "When a csv file is imported and a Data Frame is made, the Date time objects in the file are read as a string object rather a Date Time object and Hence it’s very tough to perf... |
Diameter of a tree using DFS | 10 Jun, 2022
The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with a diameter of five, the leaves that form the ends of the longest path are shaded (note that there is more than one path in each tree of ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 412,
"s": 54,
"text": "The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with a d... |
String Manipulation in Shell Scripting | 24 May, 2021
String Manipulation is defined as performing several operations on a string resulting change in its contents. In Shell Scripting, this can be done in two ways: pure bash string manipulation, and string manipulation via external commands.
Basics of pure bash string manipulation:
1. Assigning content to a v... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "String Manipulation is defined as performing several operations on a string resulting change in its contents. In Shell Scripting, this can be done in two ways: pure bash stri... |
Python | Unpacking tuple of lists | 04 Apr, 2019
Given a tuple of lists, write a Python program to unpack the elements of the lists that are packed inside the given tuple.
Examples:
Input : (['a', 'apple'], ['b', 'ball'])
Output : ['a', 'apple', 'b', 'ball']
Input : ([1, 'sam', 75], [2, 'bob', 39], [3, 'Kate', 87])
Output : [1, 'sam', 75, 2, 'bob', 39, ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 176,
"s": 53,
"text": "Given a tuple of lists, write a Python program to unpack the elements of the lists that are packed inside the given tuple."
},
{
"code": null,
"e": 186,
"s": ... |
What is TEXT data type in MySQL? | TEXT data objects are useful for storing long-form text strings in a MySQL database. Followings are some point about TEXT data type −
TEXT is the family of column type intended as high-capacity character storage.
The actual TEXT column type is of four types-TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT.
The four TEXT types a... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "TEXT data objects are useful for storing long-form text strings in a MySQL database. Followings are some point about TEXT data type −"
},
{
"code": null,
"e": 1275,
"s": 1196,
"text": "TEXT is the family of column type intended as hi... |
Python Design Patterns - Builder | Builder Pattern is a unique design pattern which helps in building complex object using simple objects and uses an algorithmic approach. This design pattern comes under the category of creational pattern. In this design pattern, a builder class builds the final object in step-by-step procedure. This builder is independ... | [
{
"code": null,
"e": 2821,
"s": 2479,
"text": "Builder Pattern is a unique design pattern which helps in building complex object using simple objects and uses an algorithmic approach. This design pattern comes under the category of creational pattern. In this design pattern, a builder class builds t... |
How String Hashcode value is calculated? - GeeksforGeeks | 01 Apr, 2020
The String hashCode() method returns the hashcode value of this String as an Integer.
Syntax:public int hashCode()
For Example:
import java.io.*; class GFG { public static void main(String[] args) { String str = "GFG"; System.out.println(str); int hashCode = str.hashCode(); ... | [
{
"code": null,
"e": 24122,
"s": 24094,
"text": "\n01 Apr, 2020"
},
{
"code": null,
"e": 24208,
"s": 24122,
"text": "The String hashCode() method returns the hashcode value of this String as an Integer."
},
{
"code": null,
"e": 24237,
"s": 24208,
"text": "Synt... |
Python 3 - Comparison Operators Example | These operators compare the values on either side of them and decide the relation among them. They are also called Relational operators.
Assume variable a holds the value 10 and variable b holds the value 20, then −
Assume variable a holds the value 10 and variable b holds the value 20, then −
#!/usr/bin/python3
a = 2... | [
{
"code": null,
"e": 2477,
"s": 2340,
"text": "These operators compare the values on either side of them and decide the relation among them. They are also called Relational operators."
},
{
"code": null,
"e": 2556,
"s": 2477,
"text": "Assume variable a holds the value 10 and vari... |
MapStruct - Using Builder | MapStruct allows to use Builders. We can use Builder frameworks or can use our custom builder. In below example, we are using a custom builder.
Open project mapping as updated in Mapping Direct Fields chapter in Eclipse.
Update Student.java with following code −
Student.java
package com.tutorialspoint.model;
public cl... | [
{
"code": null,
"e": 2404,
"s": 2260,
"text": "MapStruct allows to use Builders. We can use Builder frameworks or can use our custom builder. In below example, we are using a custom builder."
},
{
"code": null,
"e": 2481,
"s": 2404,
"text": "Open project mapping as updated in Map... |
How to add a day to datetime field in MySQL query? | To add a day to datetime field, use the DATE_ADD() function. The syntax is as follows −
SELECT DATE_ADD(yourColumnName,interval yourIntegerValue day) as anyVariableName from yourTableName;
Let us first create a table −
mysql> create table AddOneDayDemo
−> (
−> YourDay datetime
−> );
Query OK, 0 rows affected (1.37 s... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To add a day to datetime field, use the DATE_ADD() function. The syntax is as follows −"
},
{
"code": null,
"e": 1251,
"s": 1150,
"text": "SELECT DATE_ADD(yourColumnName,interval yourIntegerValue day) as anyVariableName from yourTabl... |
Clear text from textarea with selenium. | We can clear text from a text area with Selenium. We shall use the clear method to remove the content from a text area or an edit box. First we shall identify the text area with the help of any locator.
A text area is identified with textarea tagname in the html code. Let us input some text inside the below text area, ... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "We can clear text from a text area with Selenium. We shall use the clear method to remove the content from a text area or an edit box. First we shall identify the text area with the help of any locator."
},
{
"code": null,
"e": 1403,
"s"... |
How to calculate greatest common divisor of two or more numbers/arrays in JavaScript ? - GeeksforGeeks | 22 Apr, 2021
Given two or more numbers/array of numbers and the task is to find the GCD of the given numbers/array elements in JavaScript.
Examples:
Input : arr[] = {1, 2, 3}
Output : 1
Input : arr[] = {2, 4, 6, 8}
Output : 2
The GCD of three or more numbers equals the product of the prime factors common to all the ... | [
{
"code": null,
"e": 37995,
"s": 37967,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 38121,
"s": 37995,
"text": "Given two or more numbers/array of numbers and the task is to find the GCD of the given numbers/array elements in JavaScript."
},
{
"code": null,
"e": ... |
Java Program for Cutting a Rod | DP-13 - GeeksforGeeks | 25 Jun, 2021
Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, then the ma... | [
{
"code": null,
"e": 24824,
"s": 24796,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 25207,
"s": 24824,
"text": "Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting ... |
How to Use “NOT IN” Filter in Pandas? - GeeksforGeeks | 22 Nov, 2021
In this article, we will discuss NOT IN filter in pandas, NOT IN is a membership operator used to check whether the data is present in dataframe or not. It will return true if the value is not present, otherwise false
Python3
# import pandas moduleimport pandas as pd # create dataframedata1 = pd.DataFram... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 25866,
"s": 25647,
"text": "In this article, we will discuss NOT IN filter in pandas, NOT IN is a membership operator used to check whether the data is present in dataframe or not. It will re... |
Bitwise OR of all unordered pairs from a given array - GeeksforGeeks | 23 Apr, 2021
Given an array arr[] of size N, the task is to find the Bitwise XOR of all possible unordered pairs from the given array.
Examples:
Input: arr[] = {1, 5, 3, 7} Output: 7 Explanation: All possible unordered pairs are (1, 5), (1, 3), (1, 7), (5, 3), (5, 7), (3, 7) Bitwise OR of all possible pairs are = { ( 1... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 26187,
"s": 26065,
"text": "Given an array arr[] of size N, the task is to find the Bitwise XOR of all possible unordered pairs from the given array."
},
{
"code": null,
"e": 2619... |
<mat-grid-list> in Angular Material - GeeksforGeeks | 24 Sep, 2021
Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it you can enter the below command and can download it. mat-grid-list ... | [
{
"code": null,
"e": 26464,
"s": 26436,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 26822,
"s": 26464,
"text": "Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to in... |
Python | Convert list of strings to list of tuples - GeeksforGeeks | 29 Apr, 2019
Sometimes we deal with different types of data types and we require to inter convert from one data type to another and hence inter conversion always a useful tool to have knowledge about. The interconversion from tuples to other formats have been discussed earlier. This article deals with the converse case... | [
{
"code": null,
"e": 24472,
"s": 24444,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 24835,
"s": 24472,
"text": "Sometimes we deal with different types of data types and we require to inter convert from one data type to another and hence inter conversion always a useful tool ... |
How to show pdf in android webview? | This example demonstrate about How to show pdf in android webview.
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 xm... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "This example demonstrate about How to show pdf in android webview."
},
{
"code": null,
"e": 1258,
"s": 1129,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a... |
Undecidability - GeeksforGeeks | 21 Jan, 2014
First is Emptiness for CFG; whether a CFG is empty or not, this problem is decidable.
Second is everything for CFG; whether a CFG will generate all possible strings (completeness of CFG), this problem is undecidable.
Third is Regularity for REC; whether language generated by TM is regular is undecidable.
F... | [
{
"code": null,
"e": 31165,
"s": 31137,
"text": "\n21 Jan, 2014"
},
{
"code": null,
"e": 31251,
"s": 31165,
"text": "First is Emptiness for CFG; whether a CFG is empty or not, this problem is decidable."
},
{
"code": null,
"e": 31382,
"s": 31251,
"text": "Seco... |
Bird by Bird using Deep Learning. Advancing CNN model for fine-grained... | by Sofya Lipnitskaya | Towards Data Science | This article demonstrates how deep learning models used for image-related tasks can be advanced in order to address the fine-grained classification problem. For this objective, we will walk through the following two parts. First, you will get familiar with some basic concepts of computer vision and convolutional neural... | [
{
"code": null,
"e": 847,
"s": 171,
"text": "This article demonstrates how deep learning models used for image-related tasks can be advanced in order to address the fine-grained classification problem. For this objective, we will walk through the following two parts. First, you will get familiar wit... |
HTML Course | Basics of HTML - GeeksforGeeks | 08 Sep, 2021
Course Navigation
In this article, we will go through all the basic stuff required to write HTML. There are various tags that we must consider and know about while starting to code in HTML. These tags help in organization and basic formatting of elements in our script or web pages. These step by step pro... | [
{
"code": null,
"e": 31755,
"s": 31727,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 31775,
"s": 31755,
"text": "Course Navigation "
},
{
"code": null,
"e": 32351,
"s": 31775,
"text": "In this article, we will go through all the basic stuff required to wr... |
How to switch to frames in Selenium? | We can switch to frames in Selenium with the help of the following methods −
switchTo()defaultContent()This method is for switching to and fro in between frames and parent frames. The focus is shifted to the main page.
switchTo()defaultContent()
This method is for switching to and fro in between frames and parent frame... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "We can switch to frames in Selenium with the help of the following methods −"
},
{
"code": null,
"e": 1281,
"s": 1139,
"text": "switchTo()defaultContent()This method is for switching to and fro in between frames and parent frames. Th... |
C# - Jagged Arrays | A Jagged array is an array of arrays. You can declare a jagged array named scores of type int as −
int [][] scores;
Declaring an array, does not create the array in memory. To create the above array −
int[][] scores = new int[5][];
for (int i = 0; i < scores.Length; i++) {
scores[i] = new int[4];
}
You can initiali... | [
{
"code": null,
"e": 2369,
"s": 2270,
"text": "A Jagged array is an array of arrays. You can declare a jagged array named scores of type int as −"
},
{
"code": null,
"e": 2387,
"s": 2369,
"text": "int [][] scores;\n"
},
{
"code": null,
"e": 2472,
"s": 2387,
"t... |
How to add +1 to existing MySQL values? | Let us see an example and create a table first.
mysql> create table Add1ToExistingValue
-> (
-> Value int
-> );
Query OK, 0 rows affected (0.56 sec)
Insert some records in the table using insert command.
The query is as follows
mysql> insert into Add1ToExistingValue values(10);
Query OK, 1 row affected (0.12 s... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "Let us see an example and create a table first."
},
{
"code": null,
"e": 1220,
"s": 1110,
"text": "mysql> create table Add1ToExistingValue\n -> (\n -> Value int\n -> );\nQuery OK, 0 rows affected (0.56 sec)"
},
{
"code"... |
C# | List Class - GeeksforGeeks | 03 Apr, 2019
List<T> class represents the list of objects which can be accessed by index. It comes under the System.Collection.Generic namespace. List class can be used to create a collection of different types like integers, strings etc. List<T> class also provides the methods to search, sort, and manipulate lists.
Ch... | [
{
"code": null,
"e": 24494,
"s": 24466,
"text": "\n03 Apr, 2019"
},
{
"code": null,
"e": 24799,
"s": 24494,
"text": "List<T> class represents the list of objects which can be accessed by index. It comes under the System.Collection.Generic namespace. List class can be used to crea... |
Build an end-to-end Machine Learning Model with MLlib in pySpark. | by Nasir Safdari | Towards Data Science | In-Memory computation and Parallel-Processing are some of the major reasons that Apache Spark has become very popular in the big data industry to deal with data products at large scale and perform faster analysis. built on top of Spark, MLlib is a scalable Machine Learning library that delivers both high-quality algori... | [
{
"code": null,
"e": 833,
"s": 172,
"text": "In-Memory computation and Parallel-Processing are some of the major reasons that Apache Spark has become very popular in the big data industry to deal with data products at large scale and perform faster analysis. built on top of Spark, MLlib is a scalabl... |
How to get last 4 characters from string in
C#? | Firstly, set the string −
string str = "Football and Tennis";
Now, use the substring() method to get the last 4 characters −
str.Substring(str.Length - 4);
Let us see the complete code −
Live Demo
using System;
public class Demo {
public static void Main() {
string str = "Football and Tennis";
string re... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Firstly, set the string −"
},
{
"code": null,
"e": 1124,
"s": 1088,
"text": "string str = \"Football and Tennis\";"
},
{
"code": null,
"e": 1187,
"s": 1124,
"text": "Now, use the substring() method to get the last... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.