title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to get MySQL query result in same order as given by IN clause? | For this, you can use IN() along with ORDER BY FIELD(). Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstName varchar(100)
);
Query OK, 0 rows affected (0.64 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable(Firs... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "For this, you can use IN() along with ORDER BY FIELD(). Let us first create a table −"
},
{
"code": null,
"e": 1293,
"s": 1148,
"text": "mysql> create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n FirstName v... |
Sort the numbers according to their sum of digits - GeeksforGeeks | 29 Apr, 2022
Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits.Examples:
Input: arr[] = {12, 10, 102, 31, 15} Output: 10 12 102 31 15 10 => 1 + 0 = 1 12 => 1 + 2 = 3 102 => 1 + 0 + 2 = 3 31 => 3 + 1= 4 15 => 1 + 5 = 6Input: arr[] = {14, 1101, 10, 35, ... | [
{
"code": null,
"e": 25174,
"s": 25146,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 25303,
"s": 25174,
"text": "Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits.Examples: "
},
{
"code": null,
"e... |
Practical Guide to DQN. Tensorflow.js implementation of DQN in... | by Ziad SALLOUM | Towards Data Science | “Practice what you know, and it will help to make clear what now you do not know”Rembrandt
The Deep Q-Network proposed by Mnih et al. [2015] is a jumpstart and building point for many deep reinforcement learning algorithms. However, despite its simplicity on the surface, nevertheless, it represents some challenges when... | [
{
"code": null,
"e": 131,
"s": 40,
"text": "“Practice what you know, and it will help to make clear what now you do not know”Rembrandt"
},
{
"code": null,
"e": 418,
"s": 131,
"text": "The Deep Q-Network proposed by Mnih et al. [2015] is a jumpstart and building point for many dee... |
IDE | GeeksforGeeks | A computer science portal for geeks | Please enter your email address or userHandle.
12345678910111213141516171819202122232425262728293031323334353637// C++ program sort array in even and odd manner.// The odd numbers are to be sorted in descending// order and the even numbers in ascending order#include<bits/stdc++.h>using namespace std;// To do two way so... | [
{
"code": null,
"e": 164,
"s": 117,
"text": "Please enter your email address or userHandle."
},
{
"code": null,
"e": 1616,
"s": 164,
"text": "12345678910111213141516171819202122232425262728293031323334353637// C++ program sort array in even and odd manner.// The odd numbers are t... |
Clockwise Spiral Traversal of Binary Tree - GeeksforGeeks | 14 Feb, 2022
Given a Binary Tree. The task is to print the circular clockwise spiral order traversal of the given binary tree.
For the above binary tree, the circular clockwise spiral order traversal will be 1, 4, 5, 6, 7, 2, 3.
Examples:
Input :
10
/ \
... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 25358,
"s": 25242,
"text": "Given a Binary Tree. The task is to print the circular clockwise spiral order traversal of the given binary tree. "
},
{
"code": null,
"e": 25461,
... |
Print all sequences of given length in C++ | In this problem, we are given two integer values, k, and n. And we have to
print all the sequences of length k from numbers from 1 to n in sorted order.
Let’s take an example to understand the topic −
Input:k = 2 ; n = 3
Output:
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
So in this problem, we have to print the sequence as st... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "In this problem, we are given two integer values, k, and n. And we have to\nprint all the sequences of length k from numbers from 1 to n in sorted order."
},
{
"code": null,
"e": 1263,
"s": 1215,
"text": "Let’s take an example to und... |
Explain jQuery.append(), jQuery.prepend(), jQuery.after() and jQuery.before() methods. | jQuery.append()
The append( content ) method appends content to the inside of every matched element. Here is the description of all the parameters used by this method −
content − Content to insert after each target. This could be HTML or Text content
You can try to run the following code to learn how to work with jQuer... | [
{
"code": null,
"e": 1078,
"s": 1062,
"text": "jQuery.append()"
},
{
"code": null,
"e": 1231,
"s": 1078,
"text": "The append( content ) method appends content to the inside of every matched element. Here is the description of all the parameters used by this method −"
},
{
... |
How to change the visibility of the Cursor of Console in C# | To change the visibility of the Cursor, use the Console.CursorVisible property.
Let us see an example −
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Demo {
public static void Main (string[] args) {
Console.BackgroundColor = ConsoleCol... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To change the visibility of the Cursor, use the Console.CursorVisible property."
},
{
"code": null,
"e": 1166,
"s": 1142,
"text": "Let us see an example −"
},
{
"code": null,
"e": 1966,
"s": 1166,
"text": "using S... |
Comprehensive Guide To Approximate Nearest Neighbors Algorithms | by Eyal Trabelsi | Towards Data Science | Today as users consume more and more information from the internet at a moment’s notice, there is an increasing need for efficient ways to do search. This is why “Nearest Neighbor” has become a hot research topic, in order to increase the chance of users to find the information they are looking for in reasonable time.
... | [
{
"code": null,
"e": 492,
"s": 172,
"text": "Today as users consume more and more information from the internet at a moment’s notice, there is an increasing need for efficient ways to do search. This is why “Nearest Neighbor” has become a hot research topic, in order to increase the chance of users ... |
Images and masks splitting into multiple pieces in Python with Google Colab | by Oleksii Sheremet | Towards Data Science | Data labelers use special annotation tools for objects annotation. For example, the Computer Vision Annotation Tool (CVAT) is widely known in computer vision. Naturally, it is more convenient for labelers to work with high-resolution images. This is especially true when you need to mark a large number of objects.
In on... | [
{
"code": null,
"e": 486,
"s": 171,
"text": "Data labelers use special annotation tools for objects annotation. For example, the Computer Vision Annotation Tool (CVAT) is widely known in computer vision. Naturally, it is more convenient for labelers to work with high-resolution images. This is espec... |
Load and Query CSV File in S3 with Presto | by Yifeng Jiang | Towards Data Science | It is such a simple and common task in big data that I thought folks must have done this a thousand times, so when a customer asked me this, I went straight to the internet trying to find some good examples to share with the customer. Guess what? I couldn’t find one! So I decided to write one myself.
A typical data ETL... | [
{
"code": null,
"e": 473,
"s": 171,
"text": "It is such a simple and common task in big data that I thought folks must have done this a thousand times, so when a customer asked me this, I went straight to the internet trying to find some good examples to share with the customer. Guess what? I couldn... |
Convert HashMap to LinkedList in Java - GeeksforGeeks | 21 Feb, 2022
HashMap is similar to the HashTable, but it is unsynchronized. It allows to store the null keys as well, but there should be only one null key object and there can be any number of null values.
LinkedList is a part of the Collection framework present in java.util package. This class is an implementation of... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 24142,
"s": 23948,
"text": "HashMap is similar to the HashTable, but it is unsynchronized. It allows to store the null keys as well, but there should be only one null key object and there can... |
Difference Between Packages and Interfaces in Java | In this post, we will understand the difference between packages and interfaces in Java.
It is a group of classes and/or interfaces that are together.
It is a group of classes and/or interfaces that are together.
It can be created using the "Package" keyword.
It can be created using the "Package" keyword.
It can be imp... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "In this post, we will understand the difference between packages and interfaces in Java."
},
{
"code": null,
"e": 1213,
"s": 1151,
"text": "It is a group of classes and/or interfaces that are together."
},
{
"code": null,
... |
Write program to shutdown a system in C/C++ | A program to shutdown the system works on the operating systems like windows, linux or macOS. To shut it off and close all opened applications.
Shut down or Power off a computer means removing power from a computer's main components in an organised prescribed way and turning off all the works that are done by the compu... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "A program to shutdown the system works on the operating systems like windows, linux or macOS. To shut it off and close all opened applications."
},
{
"code": null,
"e": 1633,
"s": 1206,
"text": "Shut down or Power off a computer mean... |
Program to print multiplication table of any number in PHP - GeeksforGeeks | 27 Oct, 2021
In this article, we will see how to print the multiplication table of any given number using PHP. To make the multiplication table, first, we get a number input from the user and then use for loop to display the multiplication table.
We use HTML and PHP to display the multiplication table. The HTML part i... | [
{
"code": null,
"e": 24866,
"s": 24835,
"text": " \n27 Oct, 2021\n"
},
{
"code": null,
"e": 25100,
"s": 24866,
"text": "In this article, we will see how to print the multiplication table of any given number using PHP. To make the multiplication table, first, we get a number input... |
Jagged Array in Java | Jagged array is a multidimensional array where member arrays are of different size. For example, we can create a 2D array where first array is of 3 elements, and is of 4 elements. Following is the example demonstrating the concept of jagged array.
Live Demo
public class Tester {
public static void main(String[] arg... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "Jagged array is a multidimensional array where member arrays are of different size. For example, we can create a 2D array where first array is of 3 elements, and is of 4 elements. Following is the example demonstrating the concept of jagged array."
},... |
How to Calculate Minkowski Distance in R? - GeeksforGeeks | 14 Jan, 2022
In this article, we are going to see how to calculate Minkowski Distance in the R Programming language.
Minkowski distance is a distance measured between two points in N-dimensional space. It is basically a generalization of the Euclidean distance and the Manhattan distance. It is widely used in the field ... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 26701,
"s": 26597,
"text": "In this article, we are going to see how to calculate Minkowski Distance in the R Programming language."
},
{
"code": null,
"e": 27177,
"s": 26701,... |
Java ResultSetMetaData getColumnName() method with example | The getColumnName() method of the ResultSetMetaData (interface) retrieves and returns the name of the specified column in the current ResultSet object.
This method accepts an integer value representing the index of a column and, returns a String value representing the name of the specified column.
To get the ResultSetM... | [
{
"code": null,
"e": 1214,
"s": 1062,
"text": "The getColumnName() method of the ResultSetMetaData (interface) retrieves and returns the name of the specified column in the current ResultSet object."
},
{
"code": null,
"e": 1361,
"s": 1214,
"text": "This method accepts an integer... |
React.js Error Boundaries - GeeksforGeeks | 20 Nov, 2021
Error Boundaries: Error Boundaries basically provide some sort of boundaries or checks on errors, They are React components that are used to handle JavaScript errors in their child component tree.
React components that catch JavaScript errors anywhere in their child component tree, log those errors, and di... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 26268,
"s": 26071,
"text": "Error Boundaries: Error Boundaries basically provide some sort of boundaries or checks on errors, They are React components that are used to handle JavaScript erro... |
Area of triangle formed by the axes of co-ordinates and a given straight line - GeeksforGeeks | 18 Mar, 2021
Given a straight line with equation coefficients as a, b & c(ax + by + c = 0), the task is to find the area of the triangle formed by the axes of co-ordinates and this straight line.Examples:
Input: a = -2, b = 4, c = 3
Output: 0.5625
Input: a = 4, b = 3, c = 12
Output: 6
Approach:
Let PQ be the str... | [
{
"code": null,
"e": 26047,
"s": 26019,
"text": "\n18 Mar, 2021"
},
{
"code": null,
"e": 26241,
"s": 26047,
"text": "Given a straight line with equation coefficients as a, b & c(ax + by + c = 0), the task is to find the area of the triangle formed by the axes of co-ordinates and ... |
Interfacing a speaker with Arduino | In this tutorial, we will interface a simple piezo-buzzer with Arduino to create beeping sounds. Such an arrangement can be used in applications like burglar alarms, or water level indicators or such similar projects.
As you can see, the circuit diagram is quite straightforward. You need to connect the buzzer’s GND to ... | [
{
"code": null,
"e": 1280,
"s": 1062,
"text": "In this tutorial, we will interface a simple piezo-buzzer with Arduino to create beeping sounds. Such an arrangement can be used in applications like burglar alarms, or water level indicators or such similar projects."
},
{
"code": null,
"e"... |
Minimum number of distinct elements after removing m items - GeeksforGeeks | 28 Mar, 2022
Given an array of items, an i-th index element denotes the item id’s, and given a number m, the task is to remove m elements such that there should be minimum distinct id’s left. Print the number of distinct id’s.Examples:
Input : arr[] = { 2, 2, 1, 3, 3, 3}
m = 3
Output : 1
Remove 1 and bot... | [
{
"code": null,
"e": 26717,
"s": 26689,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 26942,
"s": 26717,
"text": "Given an array of items, an i-th index element denotes the item id’s, and given a number m, the task is to remove m elements such that there should be minimum dist... |
Meaningful Metrics: Cumulative Gains and Lyft Charts | by RAFFI SAHAKYAN | Towards Data Science | Nowadays, all major companies rely heavily on their data science capabilities. Business data units are becoming larger and more sophisticated in terms of the complexity and diversity of analysis. However, the success of delivering data science solutions into business reality largely depends on the interpretability of f... | [
{
"code": null,
"e": 655,
"s": 171,
"text": "Nowadays, all major companies rely heavily on their data science capabilities. Business data units are becoming larger and more sophisticated in terms of the complexity and diversity of analysis. However, the success of delivering data science solutions i... |
Java & MySQL - Insert Records Example | This chapter provides an example on how to insert records in a table using JDBC application. Before executing following example, make sure you have the following in place −
To execute the following example you can replace the username and password with your actual user name and password.
To execute the following exampl... | [
{
"code": null,
"e": 2859,
"s": 2686,
"text": "This chapter provides an example on how to insert records in a table using JDBC application. Before executing following example, make sure you have the following in place −"
},
{
"code": null,
"e": 2975,
"s": 2859,
"text": "To execut... |
CSS | ::after Selector | 20 Dec, 2018
::after selector is used to add same content multiple times after the content of other elements. This selector is same as ::before selector.
Syntax:
::after{
content:
}
Below HTMl/CSS code shows the functionality of ::after selector :
<!DOCTYPE html><html> <head> <style> p::after { ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Dec, 2018"
},
{
"code": null,
"e": 195,
"s": 54,
"text": "::after selector is used to add same content multiple times after the content of other elements. This selector is same as ::before selector."
},
{
"code": null,
"... |
How to Display an Image in Grayscale in Matplotlib? | 01 Feb, 2022
In this article, we are going to depict images using matplotlib module in grayscale representation i.e. image representation using two colors only i.e. black and white.
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Feb, 2022"
},
{
"code": null,
"e": 221,
"s": 52,
"text": "In this article, we are going to depict images using matplotlib module in grayscale representation i.e. image representation using two colors only i.e. black and white."
},... |
HSBC Campus Placement | 31 Aug, 2018
Round 1: On Screen Test
Part 1(90 questions and 75 mins)
There were three sections in part 1
Aptitude : Very basic and easy questions. Consisted of 30 questions.
Verbal Ability : Consisted of 30 questions. Among which one was a comprehension passage.
Technical : Consisted moderate level questions. Include... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Aug, 2018"
},
{
"code": null,
"e": 53,
"s": 28,
"text": "Round 1: On Screen Test "
},
{
"code": null,
"e": 86,
"s": 53,
"text": "Part 1(90 questions and 75 mins)"
},
{
"code": null,
"e": 122,
"s": ... |
Get current time in milliseconds using Python | 27 Dec, 2019
Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules, so there is no need to install it externally.
time.time() method of Time module is used to get the time in seconds since epoch. The handling of leap seconds is platform dependent.
Note:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2019"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules, so there is no need to install it externally."
},
... |
How to use <mat-chip-list> and <mat-chip> in Angular Material ? | 08 Feb, 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-chip-list ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 362,
"s": 28,
"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 install it, we... |
Overlay an image on another image in Python | 03 Jan, 2021
Overlaying an image over another refers to the process of copying the image data of one image over the other. Overlaying could refer to other types of image processing methods as well such as overlaying similar images for noise reduction, Blending, etc. But for now, we will concentrate on the former one. I... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 463,
"s": 54,
"text": "Overlaying an image over another refers to the process of copying the image data of one image over the other. Overlaying could refer to other types of image processing method... |
Largest factor of a given number which is a perfect square | 21 Sep, 2021
Given a number . The task is to find the largest factor of that number which is a perfect square.Examples:
Input : N = 420
Output : 4
Input : N = 100
Output : 100
A Simple Solution is to traverse all of the numbers in decreasing order from the given number down till 1 and if any of these numbers is a f... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 162,
"s": 54,
"text": "Given a number . The task is to find the largest factor of that number which is a perfect square.Examples: "
},
{
"code": null,
"e": 219,
"s": 162,
"text"... |
Packages in Golang | 20 Nov, 2019
Packages are the most powerful part of the Go language. The purpose of a package is to design and maintain a large number of programs by grouping related features together into single units so that they can be easy to maintain and understand and independent of the other package programs. This modularity al... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 565,
"s": 28,
"text": "Packages are the most powerful part of the Go language. The purpose of a package is to design and maintain a large number of programs by grouping related features together int... |
Timing Functions With Decorators – Python | 05 Apr, 2021
Everything in Python is an object. Functions in Python also object. Hence, like any other object they can be referenced by variables, stored in data structures like dictionary or list, passed as an argument to another function, and returned as a value from another function. In this article, we are going to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 401,
"s": 52,
"text": "Everything in Python is an object. Functions in Python also object. Hence, like any other object they can be referenced by variables, stored in data structures like dictionar... |
Nearest prime less than given number n | 22 Apr, 2022
You are given a number n ( 3 <= n < 10^6 ) and you have to find nearest prime less than n?
Examples:
Input : n = 10
Output: 7
Input : n = 17
Output: 13
Input : n = 30
Output: 29
A simple solution for this problem is to iterate from n-1 to 2, and for every number, check if it is a prime. If prime, then ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 145,
"s": 54,
"text": "You are given a number n ( 3 <= n < 10^6 ) and you have to find nearest prime less than n?"
},
{
"code": null,
"e": 156,
"s": 145,
"text": "Examples: "
... |
JavaScript | Generator | 13 Jun, 2022
Like Python Generators, JavaScript also supports Generator functions and Generator Objects.Generator-Function : A generator-function is defined like a normal function, but whenever it needs to generate a value, it does so with the yield keyword rather than return. The yield statement suspends function’s ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 549,
"s": 28,
"text": "Like Python Generators, JavaScript also supports Generator functions and Generator Objects.Generator-Function : A generator-function is defined like a normal function, but whe... |
Bar Chart Race & Choropleth Map of COVID-19 python | Towards Data Science | “Visualization gives you answers to questions you didn’t know you had” — Ben Schneiderman
In the era of data science, we must say data is beauty. We can not even think of a day without data. More or less modern technologies are dependent on the data-driven process. But only raw data doesn't make any charm to us until i... | [
{
"code": null,
"e": 262,
"s": 172,
"text": "“Visualization gives you answers to questions you didn’t know you had” — Ben Schneiderman"
},
{
"code": null,
"e": 832,
"s": 262,
"text": "In the era of data science, we must say data is beauty. We can not even think of a day without d... |
Tryit Editor v3.7 | Tryit: A list with i, ii, iii | [] |
Using Pandas Method Chaining to improve code readability | by B. Chen | Towards Data Science | We have been talking about using the Pandas pipe function to improve code readability. In this article, let’s have a look at Pandas Method Chaining.
In Data Processing, it is often necessary to perform operations on a certain row or column to obtain new data. Instead of writing
df = pd.read_csv('data.csv')df = df.filln... | [
{
"code": null,
"e": 320,
"s": 171,
"text": "We have been talking about using the Pandas pipe function to improve code readability. In this article, let’s have a look at Pandas Method Chaining."
},
{
"code": null,
"e": 450,
"s": 320,
"text": "In Data Processing, it is often neces... |
How to determine if network type (2G, 3G or 4G) in Android Kotlin? | This example demonstrates how to determine if network type (2G, 3G or 4G) in Android 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.
<RelativeLayout xmlns:android="htt... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrates how to determine if network type (2G, 3G or 4G) in Android Kotlin."
},
{
"code": null,
"e": 1283,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all req... |
MINUTE(), MICROSECOND() and HOUR() functions in MySQL - GeeksforGeeks | 09 Dec, 2021
1. MINUTE() : The MySQL MINUTE() function is used for return the minute part of a datetime value. It can be between 0 to 59.When the datetime is passed in MINUTE() function then it will return the minute value .
Syntax –
MINUTE(datetime)
Parameter – It take parameter a dateline value.
Return – It retur... | [
{
"code": null,
"e": 23950,
"s": 23922,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 24163,
"s": 23950,
"text": "1. MINUTE() : The MySQL MINUTE() function is used for return the minute part of a datetime value. It can be between 0 to 59.When the datetime is passed in MINUTE()... |
Random Forest Algorithm in Python from Scratch | by Eligijus Bujokas | Towards Data Science | This article aims to demystify the popular random forest (here and throughout the text — RF) algorithm and show its principles by using graphs, code snippets and code outputs.
The full implementation of the RF algorithm written by me in python can be accessed via: https://github.com/Eligijus112/decision-tree-python
I h... | [
{
"code": null,
"e": 348,
"s": 172,
"text": "This article aims to demystify the popular random forest (here and throughout the text — RF) algorithm and show its principles by using graphs, code snippets and code outputs."
},
{
"code": null,
"e": 489,
"s": 348,
"text": "The full i... |
Character constants vs String literals in C# | Character literals are enclosed in single quotes. For example, 'x' and can be stored in a simple variable of char type. A character literal can be a plain character (such as 'x'), an escape sequence (such as '\t'), or a universal character (such as '\u02C0').
Certain characters in C# are preceded by a backslash. They h... | [
{
"code": null,
"e": 1322,
"s": 1062,
"text": "Character literals are enclosed in single quotes. For example, 'x' and can be stored in a simple variable of char type. A character literal can be a plain character (such as 'x'), an escape sequence (such as '\\t'), or a universal character (such as '\\... |
How MySQL IF ELSE statement can be used in a stored procedure? | MySQL IF ELSE statement implements a basic conditional construct when the expression evaluates to false. Its syntax is as follows −
IF expression THEN
statements;
ELSE
else-statements;
END IF;
The statements must end with a semicolon.
To demonstrate the use of IF ELSE statement within MySQL stored procedure, we a... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "MySQL IF ELSE statement implements a basic conditional construct when the expression evaluates to false. Its syntax is as follows −"
},
{
"code": null,
"e": 1261,
"s": 1194,
"text": "IF expression THEN\n statements;\nELSE\n else-... |
JSF - JDBC Integration | In this article, we'll demonstrate how to integrate database in JSF using JDBC.
Following are the database requirements to run this example.
Open Source and lightweight database
JDBC driver for PostgreSQL 9.1 and JDK 1.5 or above
Put PostgreSQL JDBC4 Driver jar in tomcat web server's lib directory.
create user user1;
c... | [
{
"code": null,
"e": 2032,
"s": 1952,
"text": "In this article, we'll demonstrate how to integrate database in JSF using JDBC."
},
{
"code": null,
"e": 2093,
"s": 2032,
"text": "Following are the database requirements to run this example."
},
{
"code": null,
"e": 2130... |
N-Queen Problem | Local Search using Hill climbing with random neighbour - GeeksforGeeks | 24 Jun, 2021
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for 8 Queen problem.
Input: N = 4 Output: 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 Explanation: The Position of queens are: 1 – {1, 2} 2 – {2, 4} 3 – {3, 1} 4 ... | [
{
"code": null,
"e": 25172,
"s": 25144,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 25350,
"s": 25172,
"text": "The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for 8 Q... |
How to Configure Github Actions the Easy Way. | by Salma El Shahawy | Towards Data Science | In my previous article, I walked you through a step by step tutorial to correctly setting up the python3 environment using pyenv on your local machine. However, some issues may arise in some circumstances due to some conflicts resulting from pull requests that use different python versions or even missing modules.
This... | [
{
"code": null,
"e": 487,
"s": 171,
"text": "In my previous article, I walked you through a step by step tutorial to correctly setting up the python3 environment using pyenv on your local machine. However, some issues may arise in some circumstances due to some conflicts resulting from pull requests... |
Lambda Functions with Practical Examples in Python | by Susan Maina | Towards Data Science | When I first came across lambda functions in python, I was very much intimidated and thought they were for advanced Pythonistas. Beginner python tutorials applaud the language for its readable syntax, but lambdas sure didn’t seem user-friendly.
However, once I understood the general syntax and examined some simple use ... | [
{
"code": null,
"e": 292,
"s": 47,
"text": "When I first came across lambda functions in python, I was very much intimidated and thought they were for advanced Pythonistas. Beginner python tutorials applaud the language for its readable syntax, but lambdas sure didn’t seem user-friendly."
},
{
... |
Select all columns, except one given column in a Pandas DataFrame | 20 Aug, 2020
DataFrame Data structure are the heart of Pandas library. Dataframes are basically two dimension Series object. They have rows and columns with rows representing the index and columns representing the content. Now, let’s see how to Select all columns, except one given column in Pandas Dataframe.
First, Let... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 325,
"s": 28,
"text": "DataFrame Data structure are the heart of Pandas library. Dataframes are basically two dimension Series object. They have rows and columns with rows representing the index and... |
Python | Program to implement simple FLAMES game | 11 Jun, 2021
Python is a multipurpose language and one can do literally anything with it. Python can also be used for game development. Let’s create a simple FLAMES game without using any external game libraries like PyGame.FLAMES is a popular game named after the acronym: Friends, Lovers, Affectionate, Marriage, Enemi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 509,
"s": 54,
"text": "Python is a multipurpose language and one can do literally anything with it. Python can also be used for game development. Let’s create a simple FLAMES game without using any... |
string::npos in C++ with Examples | 16 Jul, 2021
What is string::npos:
It is a constant static member value with the highest possible value for an element of type size_t.
It actually means until the end of the string.
It is used as the value for a length parameter in the string’s member functions.
As a return value, it is usually used to indicate no matc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 74,
"s": 52,
"text": "What is string::npos:"
},
{
"code": null,
"e": 174,
"s": 74,
"text": "It is a constant static member value with the highest possible value for an element o... |
Fault Injection in Software Engineering | 24 Jun, 2019
Fault Injection is a technique for enhancing the testing quality by involving the intentional faults in the software. Fault injection is often in stress testing and it is considered as an important part of developing robust software.
The broadcast of a fault through to an noticeable failure follows a well ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "Fault Injection is a technique for enhancing the testing quality by involving the intentional faults in the software. Fault injection is often in stress testing and it is cons... |
MySQL - REVOKE Statement | The MySQL REVOKE statement is used to revoke the privileges or roles on an account.
Following is the syntax of the MySQL REVOKE Statement −
REVOKE
privilege1, privilege2, privilege3....
ON [object_type] priv_level
TO user_or_role1, user_or_role2, user_or_role3....
Assume we have created a user named 'test_use... | [
{
"code": null,
"e": 2525,
"s": 2441,
"text": "The MySQL REVOKE statement is used to revoke the privileges or roles on an account."
},
{
"code": null,
"e": 2581,
"s": 2525,
"text": "Following is the syntax of the MySQL REVOKE Statement −"
},
{
"code": null,
"e": 2716,... |
How to register a BroadcastReceiver programmatically in Android? | This example demonstrates how do I register a BroadcastReceiver programtically 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... | [
{
"code": null,
"e": 1278,
"s": 1187,
"text": "This example demonstrates how do I register a BroadcastReceiver programtically in android."
},
{
"code": null,
"e": 1407,
"s": 1278,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ... |
AngularJS | ng-mouseover Directive | 26 Mar, 2019
The ng-mouseover Directive in AngularJS is used to apply custom behavior when an mouseover event occurs on a specific HTML element. It can be used to show popup alert when mouse moves over a specific element. It is supported by all HTML elements.
Syntax:
<element ng-mouseover="expression"> Contents... </el... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2019"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "The ng-mouseover Directive in AngularJS is used to apply custom behavior when an mouseover event occurs on a specific HTML element. It can be used to show popup alert when mou... |
Android EditText in Kotlin - GeeksforGeeks | 18 Feb, 2021
EditText is used to get input from the user. EditText is commonly used in forms and login or registration screens. Following steps are used to create EditText in Kotlin:
Add a EditText in activity_main.xml file.Add a Button in activity_main.xml file.Open MainActivity.kt file and set OnClickListner for the ... | [
{
"code": null,
"e": 23992,
"s": 23964,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 24162,
"s": 23992,
"text": "EditText is used to get input from the user. EditText is commonly used in forms and login or registration screens. Following steps are used to create EditText in K... |
6 Lesser Known Pandas Plotting Tools | by Soner Yıldırım | Towards Data Science | Pandas is the go-to Python library for data analysis and manipulation. It provides numerous functions and methods that expedice the data analysis process.
When it comes to data visualization, pandas is not the prominent choice because there exist great visualization libraries such as matplotlib, seaborn, and plotly.
Wi... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "Pandas is the go-to Python library for data analysis and manipulation. It provides numerous functions and methods that expedice the data analysis process."
},
{
"code": null,
"e": 490,
"s": 327,
"text": "When it comes to data visualiza... |
How to markup postal address in HTML? | To markup postal address in HTML, use the <address> tag. The <address>...</address> tag is to add contact information. It can also be used to add contact information for the author of an article or document.
Just keep in mind too that each line should be followed by a <br> tag, as in address.
You can try to run the fol... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "To markup postal address in HTML, use the <address> tag. The <address>...</address> tag is to add contact information. It can also be used to add contact information for the author of an article or document."
},
{
"code": null,
"e": 1356,
... |
(Self-)Supervised Pre-training? Self-training? Which one to start with? | by KamWoh Ng | Towards Data Science | Recently, pre-training has been a hot topic in Computer Vision (and also NLP), especially one of the breakthroughs in NLP — BERT, which proposed a method to train an NLP model by using a “self-supervised” signal.
In short, we come up with an algorithm that can generate a “pseudo-label” itself (meaning a label that is t... | [
{
"code": null,
"e": 385,
"s": 172,
"text": "Recently, pre-training has been a hot topic in Computer Vision (and also NLP), especially one of the breakthroughs in NLP — BERT, which proposed a method to train an NLP model by using a “self-supervised” signal."
},
{
"code": null,
"e": 1034,... |
How to add an audio player to an HTML webpage? | The HTML <audio> element is used to add audio to web page. To add an audio player, add the controls attribute.
The following three audio formats are supported in HTML − MP3, Wav, and Ogg.
You can try to run the following code to add an audio player to an HTML web page
Live Demo
<!DOCTYPE html>
<html>
<head>
<t... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "The HTML <audio> element is used to add audio to web page. To add an audio player, add the controls attribute."
},
{
"code": null,
"e": 1250,
"s": 1173,
"text": "The following three audio formats are supported in HTML − MP3, Wav, and... |
Check if the given string is shuffled substring of another string - GeeksforGeeks | 20 Jan, 2022
Given strings str1 and str2. The task is to find if str1 is a substring in the shuffled form of str2 or not. Print “YES” if str1 is a substring in shuffled form of str2 else print “NO”.
Example
Input: str1 = “onetwofour”, str2 = “hellofourtwooneworld” Output: YES Explanation: str1 is substring in shuffle... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 25563,
"s": 25376,
"text": "Given strings str1 and str2. The task is to find if str1 is a substring in the shuffled form of str2 or not. Print “YES” if str1 is a substring in shuffled form of... |
Building A Linear Regression with PySpark and MLlib | by Susan Li | Towards Data Science | Apache Spark has become one of the most commonly used and supported open-source tools for machine learning and data science.
In this post, I’ll help you get started using Apache Spark’s spark.ml Linear Regression for predicting Boston housing prices. Our data is from the Kaggle competition: Housing Values in Suburbs of... | [
{
"code": null,
"e": 297,
"s": 172,
"text": "Apache Spark has become one of the most commonly used and supported open-source tools for machine learning and data science."
},
{
"code": null,
"e": 564,
"s": 297,
"text": "In this post, I’ll help you get started using Apache Spark’s ... |
Using the COUNT/GROUP BY/JOIN Combination in SQL | by Michael Grogan | Towards Data Science | It is often the case that when working with a table in SQL, one wishes to count the number of instances in that table. This could be of a product category, brand, etc.
This can prove simple enough when working with one table. However, the task can be somewhat cumbersome when working across multiple tables.
Here, we wil... | [
{
"code": null,
"e": 339,
"s": 171,
"text": "It is often the case that when working with a table in SQL, one wishes to count the number of instances in that table. This could be of a product category, brand, etc."
},
{
"code": null,
"e": 479,
"s": 339,
"text": "This can prove sim... |
Img-circle Bootstrap class | Use the img-circle Bootstrap class to style your image and make it completely round.
You can try to run the following code to implement the img-circle class
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Images</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<s... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "Use the img-circle Bootstrap class to style your image and make it completely round."
},
{
"code": null,
"e": 1219,
"s": 1147,
"text": "You can try to run the following code to implement the img-circle class"
},
{
"code": nul... |
Euler Circuit in an Undirected Graph | Practice | GeeksforGeeks | Eulerian Path is a path in a graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path that starts and ends on the same vertex. Given the number of vertices V and adjacency list adj denoting the graph. Your task is to find that there exists the Euler circuit or not
Note that: Given graph is connec... | [
{
"code": null,
"e": 526,
"s": 238,
"text": "Eulerian Path is a path in a graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path that starts and ends on the same vertex. Given the number of vertices V and adjacency list adj denoting the graph. Your task is to find that there... |
Create MySQL Database Using PHP | To create and delete a database you should have admin privilege. Its very easy to create a new MySQL database. PHP uses mysql_query function to create a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure.
bool mysql_query( sql, connection );
sql
Required - SQL query to c... | [
{
"code": null,
"e": 3010,
"s": 2757,
"text": "To create and delete a database you should have admin privilege. Its very easy to create a new MySQL database. PHP uses mysql_query function to create a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure."... |
Display all the dates for a particular month using NumPy - GeeksforGeeks | 07 Sep, 2021
In NumPy to display all the dates for a particular month, we can do it with the help of NumPy.arrange() pass the first parameter the particular month and the second parameter the next month and the third parameter is the datatype datetime64[D]. It will return all the dates for the particular month.
Syntax:... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 24592,
"s": 24292,
"text": "In NumPy to display all the dates for a particular month, we can do it with the help of NumPy.arrange() pass the first parameter the particular month and the secon... |
Magical String[Duplicate Problem] | Practice | GeeksforGeeks | You are given a string S, convert it into a magical string.
A string can be made into a magical string if the alphabets are swapped in the given manner: a->z or z->a, b->y or y->b, and so on.
Note: All the alphabets in the string are in lowercase.
Example 1:
Input:
S = varun
Output:
ezifm
Explanation:
Magical str... | [
{
"code": null,
"e": 434,
"s": 238,
"text": "You are given a string S, convert it into a magical string.\nA string can be made into a magical string if the alphabets are swapped in the given manner: a->z or z->a, b->y or y->b, and so on. \n "
},
{
"code": null,
"e": 490,
"s": 434,
... |
How to deal with error 'height' must be a vector or a matrix while creating barplot? | The error 'height' must be a vector or a matrix while creating barplot occurs when we provide data frame name instead of column names or read it with as.matrix. If we want to create bar plot for columns in a data frame then the data frame needs to be read as matrix.
For Example, if we have a data frame called df then w... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "The error 'height' must be a vector or a matrix while creating barplot occurs when we provide data frame name instead of column names or read it with as.matrix. If we want to create bar plot for columns in a data frame then the data frame needs to be re... |
CakePHP - Update a Record | To update a record in database, we first need to get hold of a table using TableRegistry class. We can fetch the instance out of registry using the get() method. The get() method will take the name of the database table as an argument. Now, this new instance is used to get particular record that we want to update.
Call... | [
{
"code": null,
"e": 2558,
"s": 2242,
"text": "To update a record in database, we first need to get hold of a table using TableRegistry class. We can fetch the instance out of registry using the get() method. The get() method will take the name of the database table as an argument. Now, this new ins... |
AWT MenuBar Class | The MenuBar class provides menu bar bound to a frame and is platform specific.
Following is the declaration for java.awt.MenuBar class:
public class MenuBar
extends MenuComponent
implements MenuContainer, Accessible
MenuBar()
Creates a new menu bar.
void dispatchEvent(AWTEvent e)
Menu add(Menu m)
Adds the s... | [
{
"code": null,
"e": 1826,
"s": 1747,
"text": "The MenuBar class provides menu bar bound to a frame and is platform specific."
},
{
"code": null,
"e": 1883,
"s": 1826,
"text": "Following is the declaration for java.awt.MenuBar class:"
},
{
"code": null,
"e": 1972,
... |
How to prevent Singleton Pattern from Reflection, Serialization and Cloning? | 05 Aug, 2021
Prerequisite: Singleton Pattern
In this article, we will see that what are various concepts which can break singleton property of a class and how to avoid them. There are mainly 3 concepts which can break singleton property of a class. Let’s discuss them one by one.
Reflection: Reflection can be caused to ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 86,
"s": 54,
"text": "Prerequisite: Singleton Pattern"
},
{
"code": null,
"e": 321,
"s": 86,
"text": "In this article, we will see that what are various concepts which can break... |
Implementing Apriori algorithm in Python | 18 May, 2022
Prerequisites: Apriori AlgorithmApriori Algorithm is a Machine Learning algorithm which is used to gain insight into the structured relationships between different items involved. The most prominent practical application of the algorithm is to recommend products based on the products already present in the... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 May, 2022"
},
{
"code": null,
"e": 468,
"s": 54,
"text": "Prerequisites: Apriori AlgorithmApriori Algorithm is a Machine Learning algorithm which is used to gain insight into the structured relationships between different items invo... |
Angular forms FormGroupDirective | 02 Jun, 2021
In this article, we are going to see what is FormGroupDirective in Angular 10 and how to use it.
FormGroupDirective is used to Bind an existing FormGroup to a DOM element.
Syntax:
<form [FormGroup] ="name">
Exported from:
ReactiveFormsModule
Selectors:
[FormGroup]
Approach:
Create the Angular app to be ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "In this article, we are going to see what is FormGroupDirective in Angular 10 and how to use it."
},
{
"code": null,
"e": 200,
"s": 125,
"text": "FormGroup... |
WEEKOFYEAR() Function in MySQL | 05 Oct, 2020
WEEKOFYEAR() function in MySQL is used to find the week number for a given date. If the date is NULL, the WEEKOFYEAR function will return NULL. Otherwise, it returns the value of week which ranges between 1 to 53.
Syntax :
WEEKOFYEAR( date)
Parameter :This method accepts only one parameter.
date –The date ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Oct, 2020"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "WEEKOFYEAR() function in MySQL is used to find the week number for a given date. If the date is NULL, the WEEKOFYEAR function will return NULL. Otherwise, it returns the value... |
XSS-Freak – XSS Scanner Fully Written in Kali Linux | 14 Sep, 2021
XSS or Cross-Site Scripting is the most emerging security flaw in Web Applications. When the arbitrary or malicious JavaScript is executed by the web application then it is said to be an XSS Vulnerable Website. There are various XSS Scanners through which we can detect the XSS on the target domain. XSS-Fre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 584,
"s": 28,
"text": "XSS or Cross-Site Scripting is the most emerging security flaw in Web Applications. When the arbitrary or malicious JavaScript is executed by the web application then it is sa... |
Download Google Image Using Python and Selenium | 10 Jan, 2022
In this article, we are going to see how to download google Image using Python and Selenium.
On the terminal of your PC, type the following command.
pip install selenium
We also need to install a web driver that will help us to automatically run the web browser. You can install Firefox web driver, Interne... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 148,
"s": 54,
"text": "In this article, we are going to see how to download google Image using Python and Selenium. "
},
{
"code": null,
"e": 204,
"s": 148,
"text": "On the term... |
CSS touch-action Property | 20 Dec, 2020
The touch-action CSS property is used to change the view of the selected element with respect to the change in touch by the user, For example, zooming the image, scrolling the image, etc. It is the action made by the touchscreen user on a particular region selected on the screen.
Note: Panning is nothing b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Dec, 2020"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "The touch-action CSS property is used to change the view of the selected element with respect to the change in touch by the user, For example, zooming the image, scrolling the... |
Difference between Servlet and JSP | 29 Jun, 2022
Brief Introduction: Servlet technology is used to create a web application. A servlet is a Java class that is used to extend the capabilities of servers that host applications accessed by means of a request-response model. Servlets are mainly used to extend the applications hosted by web services.
JSP is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 352,
"s": 52,
"text": "Brief Introduction: Servlet technology is used to create a web application. A servlet is a Java class that is used to extend the capabilities of servers that host application... |
How to return HTML or build HTML using JavaScript ? | 23 Apr, 2021
JavaScript is very powerful and with it, we can build dynamic web content and add many features to a web application. With HTML, we create the structure of the web page and the same thing can also be done with JavaScript.
There are few JavaScript methods called as createElement(), appendChild() with whic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 252,
"s": 28,
"text": "JavaScript is very powerful and with it, we can build dynamic web content and add many features to a web application. With HTML, we create the structure of the web page and t... |
Different Input and Output Techniques in Python3 | 23 Jun, 2020
In this Article, we will learn some basic input-output techniques with the help of which we can easily follow the input and output format mentioned in the questions that we face in either daily coding life or in competitive programming.
1. Taking a single Input: A single input in Python can be taken using... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2020"
},
{
"code": null,
"e": 289,
"s": 52,
"text": "In this Article, we will learn some basic input-output techniques with the help of which we can easily follow the input and output format mentioned in the questions that we f... |
How to change the plot line color from blue to black in Matplotlib? | To change the plot line color from blue to black, we can use setcolor() method−
Create x and y data points using numpy.
Plot line x and y using plot() method; store the returned value in line.
Set the color as black using set_color() method.
To display the figure, use show() method.
import numpy as np
from matplotlib i... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To change the plot line color from blue to black, we can use setcolor() method−"
},
{
"code": null,
"e": 1182,
"s": 1142,
"text": "Create x and y data points using numpy."
},
{
"code": null,
"e": 1255,
"s": 1182,
... |
SIP - Session Description Protocol | SDP stands for Session Description Protocol. It is used to describe multimedia sessions in a format understood by the participants over a network. Depending on this description, a party decides whether to join a conference or when or how to join a conference.
The owner of a conference advertises it over the network by ... | [
{
"code": null,
"e": 2110,
"s": 1850,
"text": "SDP stands for Session Description Protocol. It is used to describe multimedia sessions in a format understood by the participants over a network. Depending on this description, a party decides whether to join a conference or when or how to join a confe... |
C library function - vprintf() | The C library function int vprintf(const char *format, va_list arg) sends formatted output to stdout using an argument list passed to it.
Following is the declaration for vprintf() function.
int vprintf(const char *format, va_list arg)
format − This is the String that contains the text to be written to buffer. It can o... | [
{
"code": null,
"e": 2145,
"s": 2007,
"text": "The C library function int vprintf(const char *format, va_list arg) sends formatted output to stdout using an argument list passed to it."
},
{
"code": null,
"e": 2198,
"s": 2145,
"text": "Following is the declaration for vprintf() f... |
Groovy - subString() | Returns a new String that is a substring of this String. This method has 2 different variants
String substring(int beginIndex) − Pad the String with the spaces appended to the right.
String substring(int beginIndex) − Pad the String with the spaces appended to the right.
Syntax
String substring(int beginIndex)
Paramet... | [
{
"code": null,
"e": 2332,
"s": 2238,
"text": "Returns a new String that is a substring of this String. This method has 2 different variants"
},
{
"code": null,
"e": 2421,
"s": 2332,
"text": "String substring(int beginIndex) − Pad the String with the spaces appended to the right.... |
Count square and non-square numbers before n in C++ | We are given a number N. The goal is to find ordered pairs of positive numbers such that the sum of their cubes is N.
Traverse all numbers from 1 to N and check if it is a perfect square. If floor(sqrt(i))==ceil(sqrt(i)).
Then the number is a perfect square.
Perfect squares below N can be found using formula: floor(sqr... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "We are given a number N. The goal is to find ordered pairs of positive numbers such that the sum of their cubes is N."
},
{
"code": null,
"e": 1284,
"s": 1180,
"text": "Traverse all numbers from 1 to N and check if it is a perfect sq... |
Program to find the Nth Prime Number - GeeksforGeeks | 26 Apr, 2021
Given an integer N. The task is to find the Nth prime number.
Examples:
Input : 5 Output : 11
Input : 16 Output : 53
Input : 1049 Output : 8377
Approach:
Find the prime numbers up to MAX_SIZE using Sieve of Eratosthenes.
Store all primes in a vector.
For a given number N, return the element at (N-1)th... | [
{
"code": null,
"e": 24668,
"s": 24640,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 24730,
"s": 24668,
"text": "Given an integer N. The task is to find the Nth prime number."
},
{
"code": null,
"e": 24742,
"s": 24730,
"text": "Examples: "
},
{
"c... |
Getting Highest and Lowest Value Element From a Set by Using Sorting Logic on TreeSet in Java - GeeksforGeeks | 28 Dec, 2020
TreeSet in java implements the Set Interface and uses a red-black tree for storing values. We use TreeSet for sorting as the elements in TreeSet are stored in ascending order by default. Once the TreeSet is created, we can get the Highest Element Value from the Last element of the TreeSet and the first ele... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 24731,
"s": 23948,
"text": "TreeSet in java implements the Set Interface and uses a red-black tree for storing values. We use TreeSet for sorting as the elements in TreeSet are stored in asce... |
Laravel - Retrieve Records | After configuring the database, we can retrieve the records using the DB facade with select method. The syntax of select method is as shown in the following table.
$query(string) − query to execute in database
$bindings(array) − values to bind with queries
Step 1 − Execute the below command to create a controller calle... | [
{
"code": null,
"e": 2636,
"s": 2472,
"text": "After configuring the database, we can retrieve the records using the DB facade with select method. The syntax of select method is as shown in the following table."
},
{
"code": null,
"e": 2682,
"s": 2636,
"text": "$query(string) − q... |
Introduction to Simulation Modeling in Python - GeeksforGeeks | 03 Mar, 2021
Simulation is imitating the operations which take place within a system to study its behavior. Analyzing and creating the model of a system to predict its performance is called simulation modeling.
Simulation mimics a real-life process to determine or predict the response of the entire system. This helps t... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 25845,
"s": 25647,
"text": "Simulation is imitating the operations which take place within a system to study its behavior. Analyzing and creating the model of a system to predict its performa... |
Difference between print() and println() in Java | As we know in Java these both methods are primarily used to display text from code to console. Both these methods are of PrintStream class and are called on static member 'out' of 'System' class which is a final type class.
The following are the important differences between print() and println().
JavaTester.java
impor... | [
{
"code": null,
"e": 1286,
"s": 1062,
"text": "As we know in Java these both methods are primarily used to display text from code to console. Both these methods are of PrintStream class and are called on static member 'out' of 'System' class which is a final type class."
},
{
"code": null,
... |
How to Install Python Pycharm on Linux? - GeeksforGeeks | 06 Oct, 2021
Prerequisite: Python Language Introduction Python is a widely-used general-purpose, high-level programming language. It was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on code readability, and its syntax allows programmers... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 27267,
"s": 26197,
"text": "Prerequisite: Python Language Introduction Python is a widely-used general-purpose, high-level programming language. It was initially designed by Guido van Rossum ... |
Add hover color to a table with Bootstrap | To add hover color to table, use the table-hover class. You can try to run the following code to implement the table-hover class:
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Table</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<link rel = "styleshe... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "To add hover color to table, use the table-hover class. You can try to run the following code to implement the table-hover class:"
},
{
"code": null,
"e": 1202,
"s": 1192,
"text": "Live Demo"
},
{
"code": null,
"e": 2414,... |
How to pass multiple JSON Objects as data using jQuery's $.ajax() ? - GeeksforGeeks | 30 Apr, 2021
The purpose of this article is to pass multiple JSON objects as data using the jQuery $ajax() method in an HTML document.
Approach: Create a button in an HTML document to send JSON objects to a PHP server. In the JavaScript file, add a click event listener to the button. On clicking of the button, a reques... | [
{
"code": null,
"e": 26962,
"s": 26934,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 27084,
"s": 26962,
"text": "The purpose of this article is to pass multiple JSON objects as data using the jQuery $ajax() method in an HTML document."
},
{
"code": null,
"e": 2737... |
Python | Numpy np.fft() method - GeeksforGeeks | 21 Nov, 2019
With the help of np.fft() method, we can get the 1-D Fourier Transform by using np.fft() method.
Syntax : np.fft(Array)Return : Return a series of fourier transformation.
Example #1 :In this example we can see that by using np.fft() method, we are able to get the series of fourier transformation by using t... | [
{
"code": null,
"e": 26304,
"s": 26276,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 26401,
"s": 26304,
"text": "With the help of np.fft() method, we can get the 1-D Fourier Transform by using np.fft() method."
},
{
"code": null,
"e": 26475,
"s": 26401,
"t... |
How to create popup message using Alerter Library in android - GeeksforGeeks | 12 Jun, 2020
In this article, we learn about how to create a popup message with the help of Alerter Library. It is better to use Alerter than using Toast or Snackbar in cases if some alert messages are to be displayed to the user. We can add various onClickListners to our alerter message which makes it better and it al... | [
{
"code": null,
"e": 25246,
"s": 25218,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 25579,
"s": 25246,
"text": "In this article, we learn about how to create a popup message with the help of Alerter Library. It is better to use Alerter than using Toast or Snackbar in cases i... |
C# Average Method | To find the average of integers in C#, use the Queryable Average() method.
Let’s say the following is our integer array.
var arr = new int[] { 10, 17, 25, 30, 40, 55, 60, 70 };
Now, use the Average() method to get the average of the elements.
double avg = Queryable.Average(arr.AsQueryable());
Live Demo
using System;
u... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To find the average of integers in C#, use the Queryable Average() method."
},
{
"code": null,
"e": 1183,
"s": 1137,
"text": "Let’s say the following is our integer array."
},
{
"code": null,
"e": 1239,
"s": 1183,
... |
R – NonLinear Least Square | 22 Apr, 2020
In non-linear function, the points plotted on the graph are not linear and thus, do not give a curve or line on the graph. So, non-linear regression analysis is used to alter the parameters of the function to obtain a curve or regression line that is closed to your data.To perform this, Non-Linear Least Sq... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 558,
"s": 28,
"text": "In non-linear function, the points plotted on the graph are not linear and thus, do not give a curve or line on the graph. So, non-linear regression analysis is used to alter ... |
HTML | thead bgcolor Attribute | 31 Dec, 2019
The HTML thead bgcolor Attribute is used to specify the background color of a table head. It is not supported by HTML 5.
Syntax:
<thead bgcolor= "color_name | hex_number | rgb_number">
Attribute Values:
color_name: It sets the text color by using the color name. For example “red”.
hex_number: It sets the t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "The HTML thead bgcolor Attribute is used to specify the background color of a table head. It is not supported by HTML 5."
},
{
"code": null,
"e": 157,
"s": 149... |
Change Legend Size in Base R Plot | 30 May, 2021
In this article, we will be looking at the approach to change the size of the legend in the plot in the R programming language.
To change the legend size of the plot, the user needs to use the cex argument of the legend function and specify its value with the user requirement, the values of cex greater tha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 156,
"s": 28,
"text": "In this article, we will be looking at the approach to change the size of the legend in the plot in the R programming language."
},
{
"code": null,
"e": 464,
"... |
JavaScript String fromCharCode() Method | 05 Oct, 2021
Below is the example of the String.fromCharCode() Method.
Example:<script> function func() { var str = String.fromCharCode(71, 70, 71); document.write(str); } func(); </script>
<script> function func() { var str = String.fromCharCode(71, 70, 71); document.write(str); } func(); </script>
O... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 86,
"s": 28,
"text": "Below is the example of the String.fromCharCode() Method."
},
{
"code": null,
"e": 214,
"s": 86,
"text": "Example:<script> function func() { var str = S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.