title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C program for file Transfer using UDP? | Data can be shifted between two computers implementing Socket programming in C.
In same case, files can easily be sent implementing User Datagram Protocol(UDP) and a
simple client/server.
Security − Handled by encryption.
Protocol − UDP
Encryption − XOR encryption
The server is started and waited for filename.
The serv... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Data can be shifted between two computers implementing Socket programming in C."
},
{
"code": null,
"e": 1250,
"s": 1142,
"text": "In same case, files can easily be sent implementing User Datagram Protocol(UDP) and a\nsimple client/s... |
What are pandigital numbers. Approach to find the pandigital Numbers using C++ | Pandigital Number − In Mathematics, a Pandigital number is an integer that in a given base has among its significant digits each digit used in the base at least once.
Pandigital numbers are the integers in which each digit is used as the base at least one time.
For example, 1245678 is a pandigital number.
Take Input a ... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Pandigital Number − In Mathematics, a Pandigital number is an integer that in a given base has among its significant digits each digit used in the base at least once."
},
{
"code": null,
"e": 1324,
"s": 1229,
"text": "Pandigital numb... |
Binning Records on a Continuous Variable with Pandas Cut and QCut | by Allison Stafford | Towards Data Science | Today, I’ll be using the “City of Seattle Wages: Comparison by Gender –Wage Progression Job Titles” data set to explore binning — aka grouping records — along a single numeric variable. Find the data here on the Seattle Open Data Portal.
A caution for binners: binning reduces granularity, and is not always helpful. Bin... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "Today, I’ll be using the “City of Seattle Wages: Comparison by Gender –Wage Progression Job Titles” data set to explore binning — aka grouping records — along a single numeric variable. Find the data here on the Seattle Open Data Portal."
},
{
"co... |
Find median of BST in O(n) time and O(1) space in C++ | With respect of a given Binary Search Tree(BST), our task is to determine median of it.
For even no. of nodes, median = ((n/2th node + (n+1)/2th node) /2 For odd no. of nodes, median = (n+1)/2th node.
For given BST(with odd no. of nodes) is −
7
/ \
4 9
/ \ / \
2 5 8 10
Inorder of Given BST... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "With respect of a given Binary Search Tree(BST), our task is to determine median of it."
},
{
"code": null,
"e": 1263,
"s": 1150,
"text": "For even no. of nodes, median = ((n/2th node + (n+1)/2th node) /2 For odd no. of nodes, median... |
Java program to Count the number of digits in a given integer | Read a number from user. Create an integer (count) initialize it with 0. Divide the number with 10. till the number is 0 and for each turn increment the count.
import java.util.Scanner;
public class CountingDigitsInInteger {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "Read a number from user. Create an integer (count) initialize it with 0. Divide the number with 10. till the number is 0 and for each turn increment the count."
},
{
"code": null,
"e": 1631,
"s": 1222,
"text": "import java.util.Scann... |
R - Linear Regression | Regression analysis is a very widely used statistical tool to establish a relationship model between two variables. One of these variable is called predictor variable whose value is gathered through experiments. The other variable is called response variable whose value is derived from the predictor variable.
In Linear... | [
{
"code": null,
"e": 2713,
"s": 2402,
"text": "Regression analysis is a very widely used statistical tool to establish a relationship model between two variables. One of these variable is called predictor variable whose value is gathered through experiments. The other variable is called response var... |
Find first k natural numbers missing in given array - GeeksforGeeks | 25 Jun, 2021
Given an array of size n and a number k, we need to print first k natural numbers that are not there in the given array.Examples:
Input : [2 3 4]
k = 3
Output : [1 5 6]
Input : [-2 -3 4]
k = 2
Output : [1 2]
1) Sort the given array. 2) After sorting, we find the position of the firs... | [
{
"code": null,
"e": 26492,
"s": 26464,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 26623,
"s": 26492,
"text": "Given an array of size n and a number k, we need to print first k natural numbers that are not there in the given array.Examples: "
},
{
"code": null,
... |
Add to existing value in MySQL column using CONCAT function? | To understand the concept, let us first create a demo table.
mysql> create table addToExistingValueDemo
-> (
-> Instructor_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> Instructor_Name varchar(30),
-> Instructor_TechnicalSubject text
-> );
Query OK, 0 rows affected (0.54 sec)
Insert some records in the ... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To understand the concept, let us first create a demo table."
},
{
"code": null,
"e": 1355,
"s": 1123,
"text": "mysql> create table addToExistingValueDemo\n -> (\n -> Instructor_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> ... |
How to chain asynchronous functions in JavaScript ? - GeeksforGeeks | 16 Feb, 2022
JavaScript is single-threaded asynchronous function is a time-consuming operations that can be performed without blocking other operations of the thread. This can be done by asynchronous code like promises or async functions (which basically are cleaner promises). Asynchronous functions are cool, but the t... | [
{
"code": null,
"e": 26699,
"s": 26671,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 27141,
"s": 26699,
"text": "JavaScript is single-threaded asynchronous function is a time-consuming operations that can be performed without blocking other operations of the thread. This can ... |
Console.SetIn() Method in C# - GeeksforGeeks | 11 Mar, 2019
The Console.SetIn() method is used to set the In property of the specified StreamReader object i.e. it redirects the standard input from the console to the input file. Since the console is set with this StreamReader object, the ReadLine() method can be called to read the contents of the file, line by line.... | [
{
"code": null,
"e": 25657,
"s": 25629,
"text": "\n11 Mar, 2019"
},
{
"code": null,
"e": 25965,
"s": 25657,
"text": "The Console.SetIn() method is used to set the In property of the specified StreamReader object i.e. it redirects the standard input from the console to the input f... |
Python Excel integration with Xlwings | by Jesko Rehberg | Towards Data Science | Oftentimes we conduct impressive Python analysis, but all that our colleagues are asking for is to receive the final results within Excel. Many of our colleagues do not want to work with Jupyter Notebook, Python scripts and the like. They just want to stick to their beloved spreadsheet tool (like Microsoft Excel, to ca... | [
{
"code": null,
"e": 883,
"s": 47,
"text": "Oftentimes we conduct impressive Python analysis, but all that our colleagues are asking for is to receive the final results within Excel. Many of our colleagues do not want to work with Jupyter Notebook, Python scripts and the like. They just want to stic... |
C# String.IndexOf( ) Method | The String.IndexOf() method in C# is used to find the zero-based index of the first occurrence of a specified Unicode character or string within this instance.
The syntax is as follows −
public int IndexOf (string val);
Above, val is the string to find.
Let us now see an example −
Live Demo
using System;
public class ... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "The String.IndexOf() method in C# is used to find the zero-based index of the first occurrence of a specified Unicode character or string within this instance."
},
{
"code": null,
"e": 1249,
"s": 1222,
"text": "The syntax is as follo... |
D3.js - Shapes API | This chapter discusses the different shape generators in D3.js.
You can configure the Shapes API using the following script.
<script src = "https://d3js.org/d3-path.v1.min.js"></script>
<script src = "https://d3js.org/d3-shape.v1.min.js"></script>
<script>
</script>
D3.js supports different shapes. Let us go through t... | [
{
"code": null,
"e": 2194,
"s": 2130,
"text": "This chapter discusses the different shape generators in D3.js."
},
{
"code": null,
"e": 2255,
"s": 2194,
"text": "You can configure the Shapes API using the following script."
},
{
"code": null,
"e": 2398,
"s": 2255,... |
SQL Tryit Editor v1.6 | DELETE FROM Customers;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the Try-SQL Editor, with a r... | [
{
"code": null,
"e": 23,
"s": 0,
"text": "DELETE FROM Customers;"
},
{
"code": null,
"e": 25,
"s": 23,
"text": ""
},
{
"code": null,
"e": 88,
"s": 25,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": null,
"e... |
BabelJS - Project setup using Babel 7 | The latest version of Babel, 7 released with changes to the already existing packages. The installation part remains the same as it was for Babel 6. The only difference in Babel 7 is that all the packages need to be installed with @babel/, for example @babel/core, @babel/preset-env, @babel/cli, @babel/polyfill, etc.
He... | [
{
"code": null,
"e": 2413,
"s": 2095,
"text": "The latest version of Babel, 7 released with changes to the already existing packages. The installation part remains the same as it was for Babel 6. The only difference in Babel 7 is that all the packages need to be installed with @babel/, for example @... |
LocalDateTime of(int) method in Java with Examples - GeeksforGeeks | 21 May, 2020
The of(int year, int month, int dayOfMonth, int hour, int minute) method of LocalDateTime class in Java is used to create an instance of LocalDateTime from the input year, month, day, hour and minute. The instance of LocalDateTime represents the date along with time. The parameters year, month and day are ... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n21 May, 2020"
},
{
"code": null,
"e": 32039,
"s": 23557,
"text": "The of(int year, int month, int dayOfMonth, int hour, int minute) method of LocalDateTime class in Java is used to create an instance of LocalDateTime from the inp... |
RESTful Web services - Interview Questions | Dear readers, these RESTful Web services Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of RESTful Web services. As per my experience good interviewers hardly plan to ask any particular question during your inte... | [
{
"code": null,
"e": 2320,
"s": 1855,
"text": "Dear readers, these RESTful Web services Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of RESTful Web services. As per my experience good inter... |
How to add an active class to the current element with JavaScript? | To add an active class to the current element with JavaScript, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.btn {
border: none;
outline: none;
padding: 10px 16px;
background-color: #6ea2f0;
... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To add an active class to the current element with JavaScript, the code is as follows −"
},
{
"code": null,
"e": 1161,
"s": 1150,
"text": " Live Demo"
},
{
"code": null,
"e": 2231,
"s": 1161,
"text": "<!DOCTYPE ht... |
Decision Trees: ID3 Algorithm Explained | Towards Data Science | This article targets to clearly explain the ID3 Algorithm (one of the many Algorithms used to build Decision Trees) in detail. We explain the algorithm using a fake sample Covid-19 dataset.
In simple words, a decision tree is a structure that contains nodes (rectangular boxes) and edges(arrows) and is built from a data... | [
{
"code": null,
"e": 362,
"s": 172,
"text": "This article targets to clearly explain the ID3 Algorithm (one of the many Algorithms used to build Decision Trees) in detail. We explain the algorithm using a fake sample Covid-19 dataset."
},
{
"code": null,
"e": 696,
"s": 362,
"text... |
Why is Immutability so Important in JavaScript? | 13 Jun, 2022
Why is immutability so important in JavaScript?
What’s wrong with mutability or mutating the objects in code?
Doesn’t it make things simple?
Before we go in-depth of understanding the importance of immutability we should first understand the concept of mutability and immutability in software development.
A... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 102,
"s": 54,
"text": "Why is immutability so important in JavaScript?"
},
{
"code": null,
"e": 164,
"s": 102,
"text": "What’s wrong with mutability or mutating the objects in c... |
Super Prime | 02 May, 2022
Super-prime numbers (also known as higher order primes) are the subsequence of prime numbers that occupy prime-numbered positions within the sequence of all prime numbers. First few Super-Primes are 3, 5, 11 and 17. The task is to print all the Super-Primes less than or equal to the given positive integer ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 373,
"s": 52,
"text": "Super-prime numbers (also known as higher order primes) are the subsequence of prime numbers that occupy prime-numbered positions within the sequence of all prime numbers. Fi... |
API Testing Tutorial for Beginners | An API (Application Programming Interface) is a computer interface that
allows two different software systems to communicate and share data. A
software system that performs an API has numerous functions/subroutines
that may be performed by another software system. Between two software
systems, an API describes the type... | [
{
"code": null,
"e": 1486,
"s": 1062,
"text": "An API (Application Programming Interface) is a computer interface that\nallows two different software systems to communicate and share data. A\nsoftware system that performs an API has numerous functions/subroutines\nthat may be performed by another so... |
Convert Images to PDFs using Tkinter | Python is a scripting language and thus, it helps in many ways to create file converters such as CSV to PDF, PDF to DOC, and vice-versa. With the help of certain libraries, we can also create an application that converts images into PDF. To create such an application, we use the img2pdf module in Python. It helps to pa... | [
{
"code": null,
"e": 1430,
"s": 1062,
"text": "Python is a scripting language and thus, it helps in many ways to create file converters such as CSV to PDF, PDF to DOC, and vice-versa. With the help of certain libraries, we can also create an application that converts images into PDF. To create such ... |
How to standardize columns in an R data frame? | This can be done by using scale function.
> data<- data.frame(x = rnorm(10, 50, 1.5), y = runif(10, 2, 5))
> data
x y
1 49.57542 2.940931
2 49.51565 2.264866
3 50.70819 2.918803
4 49.09796 2.416676
5 49.90089 2.349696
6 49.03445 3.883145
7 51.29564 4.072614
8 49.11014 3.526852
9 49.41255 3.320530
... | [
{
"code": null,
"e": 1104,
"s": 1062,
"text": "This can be done by using scale function."
},
{
"code": null,
"e": 1866,
"s": 1104,
"text": "> data<- data.frame(x = rnorm(10, 50, 1.5), y = runif(10, 2, 5))\n> data\n x y\n1 49.57542 2.940931\n2 49.51565 2.264866\n3 5... |
Minimize number of unique characters in string - GeeksforGeeks | 17 Sep, 2018
Given two strings A and B. Minimize the number of unique characters in string A by either swapping A[i] with B[i] or keeping it unchanged. The number of swaps can be greater than or equal to 0. Note that A[i] can be swapped only with same index element in B. Print the minimum number of unique characters. C... | [
{
"code": null,
"e": 25158,
"s": 25130,
"text": "\n17 Sep, 2018"
},
{
"code": null,
"e": 25499,
"s": 25158,
"text": "Given two strings A and B. Minimize the number of unique characters in string A by either swapping A[i] with B[i] or keeping it unchanged. The number of swaps can ... |
How to create an immutable class with mutable object references in Java?
| Immutable objects are those objects whose states cannot be changed once initialized. Sometimes it is necessary to make an immutable class as per the requirement. For example, All primitive wrapper classes (Integer, Byte, Long, Float, Double, Character, Boolean and Short) are immutable in Java. String class is also an i... | [
{
"code": null,
"e": 1398,
"s": 1062,
"text": "Immutable objects are those objects whose states cannot be changed once initialized. Sometimes it is necessary to make an immutable class as per the requirement. For example, All primitive wrapper classes (Integer, Byte, Long, Float, Double, Character, ... |
Encapsulation in Java | Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction.
Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction."
},
{
"code": null,
"e": 1511,
"s": 1185,
"text": "Encapsulation in Java is a mechanism of wrapping the data (... |
Find by _id on an array of objects in MongoDB database? | To find by _id on an array of objects, use aggregation and avoid using find(). Let us first create a collection with documents −
> db.demo414.insertOne(
... {
... "_id": "110",
... "details":[
... {
... "StudentName":"John",
... "StudentMarks":56
... },
... ... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "To find by _id on an array of objects, use aggregation and avoid using find(). Let us first create a collection with documents −"
},
{
"code": null,
"e": 1553,
"s": 1191,
"text": "> db.demo414.insertOne(\n... {\n... \"_id\":... |
How to print spaces in Python3? - GeeksforGeeks | 01 Aug, 2020
In this article, we will learn about how to print space or multiple spaces in the Python programming language. Spacing in Python language is quite simple than other programming language. In C languages, to print 10 spaces a loop is used while in python no loop is used to print number of spaces.
Following a... | [
{
"code": null,
"e": 24468,
"s": 24440,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 24764,
"s": 24468,
"text": "In this article, we will learn about how to print space or multiple spaces in the Python programming language. Spacing in Python language is quite simple than othe... |
SQLite - DISTINCT Keyword | SQLite DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only the unique records.
There may be a situation when you have multiple duplicate records in a table. While fetching such records, it makes more sense to fetch only unique records instead of fetchin... | [
{
"code": null,
"e": 2784,
"s": 2638,
"text": "SQLite DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only the unique records."
},
{
"code": null,
"e": 2979,
"s": 2784,
"text": "There may be a situation when you ha... |
Feature Engineering in R Programming - GeeksforGeeks | 28 Jun, 2021
Feature engineering is the most important technique used in creating machine learning models. Feature Engineering is a basic term used to cover many operations that are performed on the variables(features)to fit them into the algorithm. It helps in increasing the accuracy of the model thereby enhances the ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26985,
"s": 26487,
"text": "Feature engineering is the most important technique used in creating machine learning models. Feature Engineering is a basic term used to cover many operations tha... |
Exception Handling using classes in C++ - GeeksforGeeks | 07 Apr, 2021
In this article, we will discuss how to handle the exceptions using classes.
Exception Handling:
Exceptions are run-time anomalies or abnormal conditions that a program encounters during its execution.
There are two types of exceptions:Synchronous ExceptionAsynchronous Exception(Ex: which are beyond the pr... | [
{
"code": null,
"e": 25368,
"s": 25340,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 25445,
"s": 25368,
"text": "In this article, we will discuss how to handle the exceptions using classes."
},
{
"code": null,
"e": 25465,
"s": 25445,
"text": "Exception Han... |
java.net.PasswordAuthentication Class in Java - GeeksforGeeks | 28 Mar, 2021
PasswordAuthentication class is provided by package java.net for implementing networking applications, and it is used in those cases when it is required to hold the data that will be used by the Authenticator. It holds the username and password.
Syntax of its constructors :
PasswordAuthentication(String us... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n28 Mar, 2021"
},
{
"code": null,
"e": 25495,
"s": 25249,
"text": "PasswordAuthentication class is provided by package java.net for implementing networking applications, and it is used in those cases when it is required to hold th... |
Solving Homogeneous Recurrence Equations Using Polynomial Reduction - GeeksforGeeks | 02 Aug, 2021
A recurrence relation is an equation that recursively defines a sequence or multidimensional array of values, once one or more initial terms are given; each further term of the sequence or array is defined as a function of the preceding terms. Below are the steps required to solve a recurrence equation usi... | [
{
"code": null,
"e": 26768,
"s": 26740,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 27111,
"s": 26768,
"text": "A recurrence relation is an equation that recursively defines a sequence or multidimensional array of values, once one or more initial terms are given; each furthe... |
How to Detect if Someone's Stealing Your WiFi? - GeeksforGeeks | 10 May, 2020
When it comes to finding out who’s using our Wifi, there are n number of softwares available on the internet. As we know, that all Softwares are not to be trusted so here in this article we will look at an approach that is being used by most professionals and it only uses your “Command prompt” or “Terminal... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26507,
"s": 26197,
"text": "When it comes to finding out who’s using our Wifi, there are n number of softwares available on the internet. As we know, that all Softwares are not to be trusted ... |
Java Program for Largest Sum Contiguous Subarray - GeeksforGeeks | 29 Nov, 2021
Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.
Kadane’s Algorithm:
Initialize:
max_so_far = INT_MIN
max_ending_here = 0
Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) ... | [
{
"code": null,
"e": 26107,
"s": 26079,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 26242,
"s": 26107,
"text": "Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum. "
},
{
"code": null,
... |
PostgreSQL - DELETE - GeeksforGeeks | 28 Aug, 2020
To delete data from a table PostgreSQL has a DELETE statement.
Syntax:
DELETE FROM table
WHERE condition;
The below rules need to be followed while using the DELETE statement:
First, specify the table from which you want to delete data in the DELETE FROM clause.
Second, specify which rows to delete by usi... | [
{
"code": null,
"e": 29245,
"s": 29217,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 29308,
"s": 29245,
"text": "To delete data from a table PostgreSQL has a DELETE statement."
},
{
"code": null,
"e": 29352,
"s": 29308,
"text": "Syntax: \nDELETE FROM table... |
How to Convert an image to NumPy array and saveit to CSV file using Python? - GeeksforGeeks | 15 Sep, 2021
Let’s see how to Convert an image to NumPy array and then save that array into CSV file in Python? First, we will learn about how to convert an image to a numpy ndarray. There are many methods to convert an image to ndarray, few of them are:
Method 1: Using PIL and NumPy library.
We will use PIL.Image.open... | [
{
"code": null,
"e": 26193,
"s": 26165,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 26435,
"s": 26193,
"text": "Let’s see how to Convert an image to NumPy array and then save that array into CSV file in Python? First, we will learn about how to convert an image to a numpy nd... |
Tailwind CSS Order - GeeksforGeeks | 23 Mar, 2022
Order is one of the best feature of tailwind CSS by using this class we can order the flex and grid items according to our requirements. There are lots of order class. This class is used to render flex and grid items in a different order than they appear in the DOM.
Order:
order-1
order-2
order-3
order-4
o... | [
{
"code": null,
"e": 37385,
"s": 37357,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 37652,
"s": 37385,
"text": "Order is one of the best feature of tailwind CSS by using this class we can order the flex and grid items according to our requirements. There are lots of order cl... |
Replace all the matches of a Pattern from a String in R Programming - gsub() Function - GeeksforGeeks | 05 Jun, 2020
gsub() function in R Language is used to replace all the matches of a pattern from a string. If the pattern is not found the string will be returned as it is.
Syntax:gsub(pattern, replacement, string, ignore.case=TRUE/FALSE)
Parameters:pattern: string to be matchedreplacement: string for replacementstring:... | [
{
"code": null,
"e": 26085,
"s": 26057,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 26244,
"s": 26085,
"text": "gsub() function in R Language is used to replace all the matches of a pattern from a string. If the pattern is not found the string will be returned as it is."
}... |
set operator= in C++ STL - GeeksforGeeks | 02 Jun, 2020
The ‘=’ is an operator in C++ STL which copies (or moves) a set to another set and set::operator= is the corresponding operator function. There are three versions of this function:
The first version takes reference of an set as an argument and copies it to an set.Syntax:ums1.operator=(set &set2)Parameters:... | [
{
"code": null,
"e": 25369,
"s": 25341,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 25550,
"s": 25369,
"text": "The ‘=’ is an operator in C++ STL which copies (or moves) a set to another set and set::operator= is the corresponding operator function. There are three versions ... |
Password Strength Indicator using jQuery - GeeksforGeeks | 02 Dec, 2021
With the advent of new frameworks in web technologies, it has become quite easy to design and implement feature-rich and responsive web pages. Here, we are going to design a password strength indicator using jQuery and Bootstrap for register pages.
Functionality to implement:A progress bar to represent the... | [
{
"code": null,
"e": 26926,
"s": 26898,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 27175,
"s": 26926,
"text": "With the advent of new frameworks in web technologies, it has become quite easy to design and implement feature-rich and responsive web pages. Here, we are going t... |
ReactJS Blueprint FileInput Component - GeeksforGeeks | 08 Apr, 2022
BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. FileInput Component provides a way for users to upload files to our application. We can use the following approach in ReactJS to use ... | [
{
"code": null,
"e": 26557,
"s": 26529,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 26907,
"s": 26557,
"text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app... |
numpy string operations | title() function - GeeksforGeeks | 14 Jan, 2019
numpy.core.defchararray.title(arr): function is used to Return element-wise title cased version of string or unicode.Title case words start with uppercase characters, all remaining cased characters are lowercase.
Parameters:arr : [ array_like ] Input array which may be str or unicode.
Returns : [ndarray] O... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n14 Jan, 2019"
},
{
"code": null,
"e": 25750,
"s": 25537,
"text": "numpy.core.defchararray.title(arr): function is used to Return element-wise title cased version of string or unicode.Title case words start with uppercase characte... |
Market Basket Analysis with recommenderlab | by Diego Usai | Towards Data Science | Recently I wanted to learn something new and challenged myself to carry out an end-to-end Market Basket Analysis. To continue to challenge myself, I’ve decided to put the results of my efforts before the eyes of the data science community.
This is the second of three post arranged as follows:
Part 1: (which can be foun... | [
{
"code": null,
"e": 412,
"s": 172,
"text": "Recently I wanted to learn something new and challenged myself to carry out an end-to-end Market Basket Analysis. To continue to challenge myself, I’ve decided to put the results of my efforts before the eyes of the data science community."
},
{
"... |
CSS3 - Border Image | CSS Border image property is used to add image boarder to some elements.you don't need to use any HTML code to call boarder image.A sample syntax of boarder image is as follows −
#borderimg {
border: 10px solid transparent;
padding: 15px;
}
The most commonly used values are shown below −
border-image-source
Used ... | [
{
"code": null,
"e": 2805,
"s": 2626,
"text": "CSS Border image property is used to add image boarder to some elements.you don't need to use any HTML code to call boarder image.A sample syntax of boarder image is as follows −"
},
{
"code": null,
"e": 2873,
"s": 2805,
"text": "#bo... |
Python program to sort and reverse a given list | Suppose we have a list of numbers in Python. We have to reverse and sort the lists using list operations but do not change the actual list. To reverse the list we have reverse() function for lists but if we use it, the list will be reversed in place. Similar for the sort() also. To maintain
actual order we will use the... | [
{
"code": null,
"e": 1426,
"s": 1062,
"text": "Suppose we have a list of numbers in Python. We have to reverse and sort the lists using list operations but do not change the actual list. To reverse the list we have reverse() function for lists but if we use it, the list will be reversed in place. Si... |
public access modifier in Java | A class, method, constructor, interface, etc. declared public can be accessed from any other class. Therefore, fields, methods, blocks declared inside a public class can be accessed from any class belonging to the Java Universe.
However, if the public class we are trying to access is in a different package, then the pu... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "A class, method, constructor, interface, etc. declared public can be accessed from any other class. Therefore, fields, methods, blocks declared inside a public class can be accessed from any class belonging to the Java Universe."
},
{
"code": nu... |
Print 12 Days Of Christmas in a few lines of code | The xmas.c code - GeeksforGeeks | 04 Aug, 2021
‘The Twelve Days Of Christmas’ is an English Christmas Special Carol song which got published in around 1780s, and it was said that it was written by Catholics in hiding during the days of Queen Elizabeth I of England’s persecution. It was invented to help teach children articles of the Catholic faith with... | [
{
"code": null,
"e": 24930,
"s": 24902,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 26536,
"s": 24930,
"text": "‘The Twelve Days Of Christmas’ is an English Christmas Special Carol song which got published in around 1780s, and it was said that it was written by Catholics in ... |
A Guide to exploit Random Forest Classifier in PySpark | by Manusha Priyanjalee | Towards Data Science | In this article, I am going to give you a step-by-step guide on how to use PySpark for the classification of Iris flowers with Random Forest Classifier.
I have used the popular Iris dataset and I have provided the link to the dataset at the end of the article. I used Google Colab for coding and I have also provided Col... | [
{
"code": null,
"e": 324,
"s": 171,
"text": "In this article, I am going to give you a step-by-step guide on how to use PySpark for the classification of Iris flowers with Random Forest Classifier."
},
{
"code": null,
"e": 517,
"s": 324,
"text": "I have used the popular Iris data... |
Serverless - Regions, Memory-size, Timeouts | We saw how to deploy our first function using serverless in the previous chapter. In this chapter, we will look at some configurations that we can perform on the function. We will primarily look at the region, the memory-size, and the timeout.
By default, all lambda functions deployed using serverless are created in t... | [
{
"code": null,
"e": 2248,
"s": 2003,
"text": "We saw how to deploy our first function using serverless in the previous chapter. In this chapter, we will look at some configurations that we can perform on the function. We will primarily look at the region, the memory-size, and the timeout."
},
... |
How to code different types of moving averages in Python. | by Sofien Kaabar, CFA | Towards Data Science | Trading softwares come with different types of moving averages already pre-installed and ready to charted. But it can be interesting to understand how to calculate these moving averages so as to be able to use them when you’re back-testing potential strategies.
I have just published a new book after the success of New ... | [
{
"code": null,
"e": 434,
"s": 172,
"text": "Trading softwares come with different types of moving averages already pre-installed and ready to charted. But it can be interesting to understand how to calculate these moving averages so as to be able to use them when you’re back-testing potential strat... |
Python | Scipy integrate.dblquad() method - GeeksforGeeks | 23 Jan, 2020
With the help of scipy.integrate.dblquad() method, we can get the double integration of a given function from limit a to b by using scipy.integrate.dblquad() method.
Syntax : scipy.integrate.dblquad(func, a, b)
Return : Return the double integrated value of a polynomial.
Example #1 :In this example we can ... | [
{
"code": null,
"e": 24234,
"s": 24206,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 24400,
"s": 24234,
"text": "With the help of scipy.integrate.dblquad() method, we can get the double integration of a given function from limit a to b by using scipy.integrate.dblquad() metho... |
QUnit - Quick Guide | Testing is the process of checking the functionality of the application whether it is working as per the requirements and to ensure that at the developer level, unit testing comes into picture. Unit testing is the testing of a single entity (class or method). Unit testing is very essential for every software organizati... | [
{
"code": null,
"e": 2186,
"s": 1819,
"text": "Testing is the process of checking the functionality of the application whether it is working as per the requirements and to ensure that at the developer level, unit testing comes into picture. Unit testing is the testing of a single entity (class or me... |
Macros and its types in C/C++ - GeeksforGeeks | 25 Feb, 2022
A macro is a piece of code in a program that is replaced by the value of the macro. Macro is defined by #define directive. Whenever a macro name is encountered by the compiler, it replaces the name with the definition of the macro. Macro definitions need not be terminated by a semi-colon(;).Below are the p... | [
{
"code": null,
"e": 25670,
"s": 25642,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 26038,
"s": 25670,
"text": "A macro is a piece of code in a program that is replaced by the value of the macro. Macro is defined by #define directive. Whenever a macro name is encountered by ... |
Minimum characters required to be removed to sort binary string in ascending order - Set 2 - GeeksforGeeks | 20 Dec, 2021
Given binary string str of size N, the task is to remove the minimum number of characters from the given binary string such that the characters in the remaining string are in sorted order.
Examples:
Input: str = “1000101”Output: 2Explanation: Removal of the first two occurrences of ‘1’ modifies the string ... | [
{
"code": null,
"e": 25917,
"s": 25889,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26106,
"s": 25917,
"text": "Given binary string str of size N, the task is to remove the minimum number of characters from the given binary string such that the characters in the remaining st... |
Find the frequency of each element in a sorted array - GeeksforGeeks | 22 Jul, 2021
Given a sorted array, arr[] consisting of N integers, the task is to find the frequencies of each array element.
Examples:
Input: arr[] = {1, 1, 1, 2, 3, 3, 5, 5, 8, 8, 8, 9, 9, 10} Output: Frequency of 1 is: 3 Frequency of 2 is: 1 Frequency of 3 is: 2 Frequency of 5... | [
{
"code": null,
"e": 26066,
"s": 26038,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 26179,
"s": 26066,
"text": "Given a sorted array, arr[] consisting of N integers, the task is to find the frequencies of each array element."
},
{
"code": null,
"e": 26190,
"s... |
PHP | imagejpeg() Function - GeeksforGeeks | 30 Jan, 2020
The imagejpeg() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to JPEG and altering the quality of the image.
Syntax:
bool imagejpeg( resource $image, int $to, int $qual... | [
{
"code": null,
"e": 25967,
"s": 25939,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 26215,
"s": 25967,
"text": "The imagejpeg() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the ... |
Introduction to NPM scripts - GeeksforGeeks | 01 Jul, 2021
NPM is a Node Package Manager. It is the world’s largest Software Registry. This registry contains over 800,000 code packages. Many Open-source developers use npm to share software. Many organizations also use npm to manage private development.
“npm scripts” are the entries in the scripts field of the pack... | [
{
"code": null,
"e": 26011,
"s": 25983,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 26256,
"s": 26011,
"text": "NPM is a Node Package Manager. It is the world’s largest Software Registry. This registry contains over 800,000 code packages. Many Open-source developers use npm ... |
JavaScript | Syntax - GeeksforGeeks | 20 Nov, 2021
JavaScript is a lightweight and dynamic computer programming language. It is used to create client-side dynamic pages. It is open-source and cross-platform language.
Basic Syntax:
Javascript
<script> document.write("Basic Print method in JavaScript"); </script>
JavaScript syntax refers to the set of rule... | [
{
"code": null,
"e": 31329,
"s": 31301,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 31495,
"s": 31329,
"text": "JavaScript is a lightweight and dynamic computer programming language. It is used to create client-side dynamic pages. It is open-source and cross-platform languag... |
Remove an Element at Specific Index from an Array in Java | 21 Oct, 2021
Given an array of a fixed length. The task is to remove an element at a specific index from the array.
Examples:
Input: arr[] = { 1, 2, 3, 4, 5 }, index = 2
Output: arr[] = { 1, 2, 4, 5 }
Input: arr[] = { 4, 5, 9, 8, 1 }, index = 3
Output: arr[] = { 4, 5, 9, 1 }
An array is a data structure that contains... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 155,
"s": 52,
"text": "Given an array of a fixed length. The task is to remove an element at a specific index from the array."
},
{
"code": null,
"e": 166,
"s": 155,
"text": "Ex... |
Stringstream in C++ | Here we will see the string stream in C++. The string stream associates a string object with a string. Using this we can read from string as if it were a stream like cin.
The Stringstream has different methods. These are like below −
clear(): Used to clear the stream
str(): To get and set the string object whose conten... | [
{
"code": null,
"e": 1358,
"s": 1187,
"text": "Here we will see the string stream in C++. The string stream associates a string object with a string. Using this we can read from string as if it were a stream like cin."
},
{
"code": null,
"e": 1421,
"s": 1358,
"text": "The Strings... |
How to check whether a variable is null in PHP ? | 17 Nov, 2021
We have given a variable and the task is to check whether the value of given variable is null or not and returns a Boolean value using PHP. To check a variable is null or not, we use is_null() function. A variable is considered to be NULL if it does not store any value. It returns TRUE if value of variable... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 377,
"s": 28,
"text": "We have given a variable and the task is to check whether the value of given variable is null or not and returns a Boolean value using PHP. To check a variable is null or not,... |
Different ways to delete elements in std::map (erase() and clear()) | 25 May, 2018
This article deals with the deletion part of Maps.
Using erase() : erase() is used to erase the pair in map mentioned in argument, either its position, its value or a range of number.erase(key) : Erases the key-value pair using key mentioned in its argument. reorders the map after deletion. It returns the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2018"
},
{
"code": null,
"e": 79,
"s": 28,
"text": "This article deals with the deletion part of Maps."
},
{
"code": null,
"e": 4508,
"s": 79,
"text": "Using erase() : erase() is used to erase the pair in map... |
How to Check if a “lateinit” Variable Has Been Initialized or Not in Kotlin? | 23 Jun, 2021
In Kotlin, the lateinit keyword is used for those variables which are initialized after the declaration or we can say that the variable which is late initialized is called a lateinit variable. The lateinit keyword is used when we are sure that the variable will be initialized before using it. If we don’t i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 676,
"s": 28,
"text": "In Kotlin, the lateinit keyword is used for those variables which are initialized after the declaration or we can say that the variable which is late initialized is called a l... |
Count all sub-arrays having sum divisible by k | 06 Jul, 2022
You are given an array of positive and/or negative integers and a value K . The task is to find count of all sub-arrays whose sum is divisible by K?
Examples :
Input : arr[] = {4, 5, 0, -2, -3, 1},
K = 5
Output : 7
// there are 7 sub-arrays whose sum is divisible by K
// {4, 5, 0, -2, -3, 1}
//... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 201,
"s": 52,
"text": "You are given an array of positive and/or negative integers and a value K . The task is to find count of all sub-arrays whose sum is divisible by K?"
},
{
"code": nul... |
MySQLi - Create Table | To begin with, the table creation command requires the following details −
Name of the table
Name of the fields
Definitions for each field
Here is a generic SQL syntax to create a MySQL table −
CREATE TABLE table_name (column_name column_type);
Now, we will create the following table in the TUTORIALS database.
create ... | [
{
"code": null,
"e": 2472,
"s": 2397,
"text": "To begin with, the table creation command requires the following details −"
},
{
"code": null,
"e": 2490,
"s": 2472,
"text": "Name of the table"
},
{
"code": null,
"e": 2509,
"s": 2490,
"text": "Name of the fields... |
How to delete Tkinter widgets from a window? | Sometimes, we want to remove a widget that is of no use in the application. We can delete widgets from the window or frame using the .destroy method in tkinter. It can be invoked in the widget by defining a function for it.
In this example, we have created a button that will remove the text label widget from the window... | [
{
"code": null,
"e": 1411,
"s": 1187,
"text": "Sometimes, we want to remove a widget that is of no use in the application. We can delete widgets from the window or frame using the .destroy method in tkinter. It can be invoked in the widget by defining a function for it."
},
{
"code": null,
... |
Groovy - Basic Syntax | In order to understand the basic syntax of Groovy, let’s first look at a simple Hello World program.
Creating your first hello world program is as simple as just entering the following code line −
class Example {
static void main(String[] args) {
// Using a simple println statement to print output to the conso... | [
{
"code": null,
"e": 2473,
"s": 2372,
"text": "In order to understand the basic syntax of Groovy, let’s first look at a simple Hello World program."
},
{
"code": null,
"e": 2569,
"s": 2473,
"text": "Creating your first hello world program is as simple as just entering the followi... |
Python | Pandas Timestamp.day | 08 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.day attribute return the value of the day in the given Timestamp object.
Syn... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
MongoDB python | Delete Data and Drop Collection | 20 Mar, 2020
Prerequisite : MongoDB Basics, Insert and Update
Aim : To delete entries/documents of a collection in a database. Assume name of collection ‘my_collection’.Method used : delete_one() or delete_many()
Remove All Documents That Match a Condition : The following operation removes all documents that match the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Mar, 2020"
},
{
"code": null,
"e": 77,
"s": 28,
"text": "Prerequisite : MongoDB Basics, Insert and Update"
},
{
"code": null,
"e": 228,
"s": 77,
"text": "Aim : To delete entries/documents of a collection in a data... |
Python Bitwise Operators | 25 Mar, 2022
Operators are used to perform operations on values and variables. These are the special symbols that carry out arithmetic and logical computations. The value the operator operates on is known as Operand.
Table of Content:
Bitwise operators: Bitwise AND operatorBitwise OR operatorBitwise not operatorBitwi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Mar, 2022"
},
{
"code": null,
"e": 259,
"s": 54,
"text": "Operators are used to perform operations on values and variables. These are the special symbols that carry out arithmetic and logical computations. The value the operator ope... |
Time Picker Dialog in Android | 06 Jun, 2021
Android TimePicker is a user interface control for selecting the time in either 24-hour format or AM/PM mode. It is used to ensure that users pick the valid time for the day in our application. The time picker interface exists basically in two modes one is under XML layout and another is a dialog. In this ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 558,
"s": 28,
"text": "Android TimePicker is a user interface control for selecting the time in either 24-hour format or AM/PM mode. It is used to ensure that users pick the valid time for the day i... |
Producer-Consumer solution using threads in Java | 12 Apr, 2022
In computing, the producer-consumer problem (also known as the bounded-buffer problem) is a classic example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer, which share a common, fixed-size buffer used as a queue.
The producer’s job is to gene... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 332,
"s": 54,
"text": "In computing, the producer-consumer problem (also known as the bounded-buffer problem) is a classic example of a multi-process synchronization problem. The problem describes ... |
GATE | GATE-CS-2017 (Set 1) | Question 27 | 28 Jun, 2021
Consider the following C code:
#include <stdio.h>
int * assignval (int *x, int val)
{
*x = val;
return x;
}
int main()
{
int *x = malloc(sizeof(int));
if (NULL == x) return;
x = assignval(x, 0);
if(x)
{
x = (int*) malloc(sizeof (int));
if (NULL == x) return;
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 84,
"s": 53,
"text": "Consider the following C code:"
},
{
"code": null,
"e": 435,
"s": 84,
"text": "#include <stdio.h>\n\nint * assignval (int *x, int val)\n{\n *x = val;\n ... |
GATE | GATE CS 2010 | Question 61 | 28 Jun, 2021
Hari(H), Gita(G), Irfan(I) and Saira(S) are siblings (i.e., brothers and sisters). All were born on 1st January. The age difference between any two successive siblings (that is born one after another) is less than 3 years. Given the following facts:
i. Hari's age + Gita's age > Irfan's age + Saira's age
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 302,
"s": 52,
"text": "Hari(H), Gita(G), Irfan(I) and Saira(S) are siblings (i.e., brothers and sisters). All were born on 1st January. The age difference between any two successive siblings (that ... |
Python | Pandas DataFrame.loc[] | 20 Feb, 2019
Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Feb, 2019"
},
{
"code": null,
"e": 367,
"s": 53,
"text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both... |
Python MongoDB – $group (aggregation) | 10 Jul, 2020
MongoDB is an open-source document-oriented database. MongoDB stores data in the form of key-value pairs and is a NoSQL database program. The term NoSQL means non-relational. In this article, we will see the use of $group in MongoDB using Python.
In PyMongo, the Aggregate Method is mainly used to process d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "MongoDB is an open-source document-oriented database. MongoDB stores data in the form of key-value pairs and is a NoSQL database program. The term NoSQL means non-relational. ... |
Statistical Functions in Python | Python has ability to solve the mathematical expression,statistical data by importing statistic keyword. Python can do various types of statistical and mathematical operations.
These functions calculate the average value from a sample or population.
This function calculates the arithmetic mean or average value of sampl... | [
{
"code": null,
"e": 1364,
"s": 1187,
"text": "Python has ability to solve the mathematical expression,statistical data by importing statistic keyword. Python can do various types of statistical and mathematical operations."
},
{
"code": null,
"e": 1437,
"s": 1364,
"text": "These... |
Practical Uses of nc(netcat) command in Linux | 05 Jun, 2020
Netcat is one of the powerful networking tool, security tool or network monitoring tool. It acts like cat command over a network. It is even considered as a Swiss army knife of networking tools.It is generally used for the following reasons:
Operation related to TCP, UDP or UNIX-domain sockets
Port Scannin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 270,
"s": 28,
"text": "Netcat is one of the powerful networking tool, security tool or network monitoring tool. It acts like cat command over a network. It is even considered as a Swiss army knife o... |
PyQt5 – Jumble Word Game | 29 Dec, 2021
In this article we will see how we can create a jumble word game using PyQt5. Jumbled word game : Jumbled word is given to player, player has to rearrange the characters of the word to make a correct meaningful word. Below is how game will look like
GUI implementation steps : 1. Create a heading label that... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 278,
"s": 28,
"text": "In this article we will see how we can create a jumble word game using PyQt5. Jumbled word game : Jumbled word is given to player, player has to rearrange the characters of th... |
C# - Multidimensional Arrays | C# allows multidimensional arrays. Multi-dimensional arrays are also called rectangular array. You can declare a 2-dimensional array of strings as −
string [,] names;
or, a 3-dimensional array of int variables as −
int [ , , ] m;
The simplest form of the multidimensional array is the 2-dimensional array. A 2-dimensio... | [
{
"code": null,
"e": 2419,
"s": 2270,
"text": "C# allows multidimensional arrays. Multi-dimensional arrays are also called rectangular array. You can declare a 2-dimensional array of strings as −"
},
{
"code": null,
"e": 2438,
"s": 2419,
"text": "string [,] names;\n"
},
{
... |
How to hide/show HTML elements in JavaScript? | Using Css style we can hide or show HTML elements in javascript. Css provides properties such as block and none to hide/show the HTML elements.
In the following example when the "Hideme" button has clicked the text in the paragraph tag has been disappeared as shown in the output.
Live Demo
<html>
<body>
<p id="hide"... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "Using Css style we can hide or show HTML elements in javascript. Css provides properties such as block and none to hide/show the HTML elements."
},
{
"code": null,
"e": 1343,
"s": 1206,
"text": "In the following example when the \"Hi... |
How to write data into EEPROM with Arduino? | Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.
We will see how to write data to the E... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or setting... |
Count all Palindrome Sub-Strings in a String in C++ | In this tutorial, we will be discussing a program to find the number of palindrome sub strings in a string.
For this we will be given a string. Our task is to count the number of palindrome sub strings in the given string with length greater than 3.
#include<bits/stdc++.h>
using namespace std;
//counting palindrome str... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find the number of palindrome sub strings in a string."
},
{
"code": null,
"e": 1312,
"s": 1170,
"text": "For this we will be given a string. Our task is to count the number of pal... |
PHP mysqli_fetch_all() Function | A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries.
The mysqli_fetch_all() function accepts a result object as a parameter, retrieves all the rows in the given result object.
mysqli_fetch_all($result, [$type]);
result(Mandatory)
This is... | [
{
"code": null,
"e": 2892,
"s": 2757,
"text": "A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries."
},
{
"code": null,
"e": 3015,
"s": 2892,
"text": "The mysqli_fetch_all() function accepts a resul... |
Python dictionary keys() Method | Python dictionary method keys() returns a list of all the available keys in the dictionary.
Following is the syntax for keys() method −
dict.keys()
NA
NA
This method returns a list of all the available keys in the dictionary.
The following example shows the usage of keys() method.
#!/usr/bin/python
dict = {'Name': '... | [
{
"code": null,
"e": 2337,
"s": 2244,
"text": "Python dictionary method keys() returns a list of all the available keys in the dictionary."
},
{
"code": null,
"e": 2381,
"s": 2337,
"text": "Following is the syntax for keys() method −"
},
{
"code": null,
"e": 2394,
... |
Streaming scikit-learn with PySpark | by Ben Weber | Towards Data Science | This chapter explores model pipelines where records are evaluated as they arrive in a streaming ML framework. The book covers streaming workflows for both Spark with Kafka on AWS and PubSub with Dataflow on GCP, while this blog post covers the former. The source code for all of the examples in the chapter are available... | [
{
"code": null,
"e": 379,
"s": 47,
"text": "This chapter explores model pipelines where records are evaluated as they arrive in a streaming ML framework. The book covers streaming workflows for both Spark with Kafka on AWS and PubSub with Dataflow on GCP, while this blog post covers the former. The ... |
How to host a web-service using IIS (windows) and .net | A web service is any piece of software which offers service to other systems. It makes itself available over the internet and uses a standardized XML or, JSON messaging system. A web service enables communication among various applications by using open standards such as HTML, XML, WSDL, and SOAP.
IIS stands for, Inter... | [
{
"code": null,
"e": 1361,
"s": 1062,
"text": "A web service is any piece of software which offers service to other systems. It makes itself available over the internet and uses a standardized XML or, JSON messaging system. A web service enables communication among various applications by using open... |
C++ Valarray Library - pow Function | It returns a valarray containing the results of the power operation on all the elements, in the same order. The results calculated are x raised to the power y (xy).
Following is the declaration for std::pow function.
template<class T> valarray<T> log10 (const valarray<T>& x);
template<class T> valarray<T> log10 (const ... | [
{
"code": null,
"e": 2768,
"s": 2603,
"text": "It returns a valarray containing the results of the power operation on all the elements, in the same order. The results calculated are x raised to the power y (xy)."
},
{
"code": null,
"e": 2820,
"s": 2768,
"text": "Following is the ... |
Automating AWS S3 File Management with Python | by Elise Landman | Towards Data Science | Amazon Web Services (AWS) S3 is one of the most used cloud storage platforms worldwide. The free tier includes 5 GB of standard storage, 20,000 get requests and 2,000 put requests for 12 months, which makes it suitable for various small to medium-sized projects running over a relatively short period of time. Some proje... | [
{
"code": null,
"e": 689,
"s": 172,
"text": "Amazon Web Services (AWS) S3 is one of the most used cloud storage platforms worldwide. The free tier includes 5 GB of standard storage, 20,000 get requests and 2,000 put requests for 12 months, which makes it suitable for various small to medium-sized pr... |
Binary Insertion Sort in C++ | Binary Insertion sort is a special type up of Insertion sort which uses binary search algorithm to find out the correct position of the inserted element in the array.
Insertion sort is sorting technique that works by finding the correct position of the element in the array and then inserting it into its correct positio... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Binary Insertion sort is a special type up of Insertion sort which uses binary search algorithm to find out the correct position of the inserted element in the array."
},
{
"code": null,
"e": 1385,
"s": 1229,
"text": "Insertion sort ... |
How to Extract Keywords from PDFs and arrange in order of their weights using Python | by Prasad Patil | Towards Data Science | Keyword extraction is nothing but the task of identification of terms that best describe the subject of a document.
“Key phrases”, “key terms”, “key segments” or just “keywords” are the different nomenclatures often used for defining the terms that represent the most relevant information contained in the document. Alth... | [
{
"code": null,
"e": 288,
"s": 172,
"text": "Keyword extraction is nothing but the task of identification of terms that best describe the subject of a document."
},
{
"code": null,
"e": 613,
"s": 288,
"text": "“Key phrases”, “key terms”, “key segments” or just “keywords” are the ... |
How to rotate Matplotlib annotation to match a line? | To rotate matplotlib annotation to match a line, we can take the following steps−
Create a new figure or activate an existing figure using figure() method.
Add an '~.axes.Axes' to the figure as part of a subplot arrangement using add_subplot() method.
Initialize the variables, m (slope) and c (intercept).
Create x and ... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To rotate matplotlib annotation to match a line, we can take the following steps−"
},
{
"code": null,
"e": 1218,
"s": 1144,
"text": "Create a new figure or activate an existing figure using figure() method."
},
{
"code": null... |
The Easiest Ways to Perform Logical Operations on Two Dictionaries in Python | by Elena Kosourova | Towards Data Science | In this article, we’re going to take a look at the most straightforward ways to find the intersection, union, difference, and symmetric difference of two dictionaries in Python, both at the level of only keys and key-value pairs.
Let’s consider 2 dictionaries that have:
values of int type (so as we can use also mathema... | [
{
"code": null,
"e": 402,
"s": 172,
"text": "In this article, we’re going to take a look at the most straightforward ways to find the intersection, union, difference, and symmetric difference of two dictionaries in Python, both at the level of only keys and key-value pairs."
},
{
"code": nul... |
How to input multiple values from user in one line in Python? - GeeksforGeeks | 19 Nov, 2020
For instance, in C we can do something like this:
// Reads two values in one linescanf("%d %d", &x, &y)
One solution is to use raw_input() two times.
x, y = input(), input()
Another solution is to use split()
x, y = input().split()
Note that we don’t have to explicitly specify split(‘ ‘) because split() ... | [
{
"code": null,
"e": 24297,
"s": 24269,
"text": "\n19 Nov, 2020"
},
{
"code": null,
"e": 24347,
"s": 24297,
"text": "For instance, in C we can do something like this:"
},
{
"code": "// Reads two values in one linescanf(\"%d %d\", &x, &y) ",
"e": 24402,
"s": 24347,... |
10 Awesome Python 3.9 Features. The Must-Know Python 3.9 Features | by Farhad Malik | Towards Data Science | The latest Python 3.9.0 final version is out on the Monday, 2020–10–05
Just like most of the Python fans, I am super excited to explore and use the latest features. This article will provide an overview of the must-know features of Python 3.9.
This is again an exciting time for the Python programmers.
I read through th... | [
{
"code": null,
"e": 242,
"s": 171,
"text": "The latest Python 3.9.0 final version is out on the Monday, 2020–10–05"
},
{
"code": null,
"e": 415,
"s": 242,
"text": "Just like most of the Python fans, I am super excited to explore and use the latest features. This article will pro... |
How to add a new field to all the documents in a MongoDB collection | To add a new field, use $addFields in MongoDB. Let us create a collection with documents −
> db.demo712.insertOne({"Name":"John"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ea85f675d33e20ed1097b82")
}
> db.demo712.insertOne({"Name":"Chris"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ea85... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "To add a new field, use $addFields in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1531,
"s": 1153,
"text": "> db.demo712.insertOne({\"Name\":\"John\"});\n{\n \"acknowledged\" : true,\n \"inserted... |
Customer Segmentation with Machine Learning | by Ceren Iyim | Towards Data Science | Imagine that you are treating the grocery shop owner that you shop every day, as you treat your significant other. That can be fun at the beginning, however may cause disastrous situations too. Likewise, it can be unfavourable for a company to manage its relationships with every customer similarly.
Customer segmentatio... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Imagine that you are treating the grocery shop owner that you shop every day, as you treat your significant other. That can be fun at the beginning, however may cause disastrous situations too. Likewise, it can be unfavourable for a company to manage its ... |
How to create a strikethrough text using JavaScript? | To create a strikethrough text with JavaScript, use the strike() method. This method causes a string to be displayed as struck-out text as if it were in a <strike> tag.
You can try to run the following code to create a strikethrough text −
Live Demo
<html>
<head>
<title>JavaScript String strike() Method</title... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "To create a strikethrough text with JavaScript, use the strike() method. This method causes a string to be displayed as struck-out text as if it were in a <strike> tag."
},
{
"code": null,
"e": 1302,
"s": 1231,
"text": "You can try t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.