title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
GATE | Gate IT 2005 | Question 76 - GeeksforGeeks | 28 Jun, 2021
A company has a class C network address of 204.204.204.0. It wishes to have three subnets, one with 100 hosts and two with 50 hosts each. Which one of the following options represents a feasible set of subnet address/subnet mask pairs?
(A) 204.204.204.128/255.255.255.192204.204.204.0/255.255.255.128204.20... | [
{
"code": null,
"e": 25711,
"s": 25683,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25947,
"s": 25711,
"text": "A company has a class C network address of 204.204.204.0. It wishes to have three subnets, one with 100 hosts and two with 50 hosts each. Which one of the followin... |
Python | Finding 'n' Character Words in a Text File - GeeksforGeeks | 26 Mar, 2020
This article aims to find words with a certain number of character. In the code mentioned below, a python program is given to find the words contain three characters in the text file.
Examples:
Input : Hello, how are you ?
Output :howareyou
Code: Python program to find the words contain three characters in... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25721,
"s": 25537,
"text": "This article aims to find words with a certain number of character. In the code mentioned below, a python program is given to find the words contain three characte... |
Difference between Boxing and Unboxing in C# - GeeksforGeeks | 17 Apr, 2019
Boxing and unboxing is an important concept in C#. C# Type System contains three data types: Value Types (int, char, etc), Reference Types (object) and Pointer Types. Basically, it converts a Value Type to a Reference Type, and vice versa. Boxing and Unboxing enables a unified view of the type system in wh... | [
{
"code": null,
"e": 25070,
"s": 25042,
"text": "\n17 Apr, 2019"
},
{
"code": null,
"e": 25430,
"s": 25070,
"text": "Boxing and unboxing is an important concept in C#. C# Type System contains three data types: Value Types (int, char, etc), Reference Types (object) and Pointer Typ... |
Sort an array where a subarray of a sorted array is in reverse order - GeeksforGeeks | 15 Nov, 2021
Given an array of N numbers where a subarray is sorted in descending order and rest of the numbers in the array are in ascending order. The task is to sort an array where a subarray of a sorted array is in reversed order.
Examples:
Input: 2 5 65 55 50 70 90 Output: 2 5 50 55 65 70 90 The subarray from 2n... | [
{
"code": null,
"e": 26066,
"s": 26038,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 26289,
"s": 26066,
"text": "Given an array of N numbers where a subarray is sorted in descending order and rest of the numbers in the array are in ascending order. The task is to sort an arra... |
Semantic-UI | Input Field - GeeksforGeeks | 20 May, 2020
Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is same as a bootstrap for use and has great different elements to use to make your website look more amazing. It uses a class to add CSS to the elements. Semantic-UI classes can be applied to the Input fiel... | [
{
"code": null,
"e": 26033,
"s": 26005,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 26379,
"s": 26033,
"text": "Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is same as a bootstrap for use and has great different elements... |
LocalTime toString() method in Java with Examples - GeeksforGeeks | 06 Dec, 2018
The toString() method of LocalTime class is used to represents this time as a String, such as 20:15:34.111.
Following ISO-8601 formats are used for representation:
HH:mm
HH:mm:ss
HH:mm:ss.SSS
HH:mm:ss.SSSSSS
HH:mm:ss.SSSSSSSSS
This method is derived from the Object Class and behaves in a similar way.
Synta... | [
{
"code": null,
"e": 25505,
"s": 25477,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 25613,
"s": 25505,
"text": "The toString() method of LocalTime class is used to represents this time as a String, such as 20:15:34.111."
},
{
"code": null,
"e": 25669,
"s": 25... |
varchar, varchar(max) and nvarchar in MS SQL Server - GeeksforGeeks | 03 Sep, 2020
We know that a database can different datatypes. Consider an organization having various databases like Employees, Departments, Finance. The employee database has a table that stores the details of each employee and employee is uniquely identified using the employee ID.
In most of the cases, an employee ID... | [
{
"code": null,
"e": 25161,
"s": 25133,
"text": "\n03 Sep, 2020"
},
{
"code": null,
"e": 25432,
"s": 25161,
"text": "We know that a database can different datatypes. Consider an organization having various databases like Employees, Departments, Finance. The employee database has ... |
Find the number of ways to divide number into four parts such that a = c and b = d - GeeksforGeeks | 09 Nov, 2021
Given a number N. Find the number of ways to divide a number into four parts(a, b, c, d) such that a = c and b = d and a not equal to b. Examples:
Input : N = 6 Output : 1 Explanation : four parts are {1, 2, 1, 2}Input : N = 20 Output : 4 Explanation : possible ways are {1, 1, 9, 9}, {2, 2, 8, 8}, {3, 3, ... | [
{
"code": null,
"e": 26333,
"s": 26305,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 26481,
"s": 26333,
"text": "Given a number N. Find the number of ways to divide a number into four parts(a, b, c, d) such that a = c and b = d and a not equal to b. Examples: "
},
{
"... |
GATE | GATE CS 2010 | Question 28 - GeeksforGeeks | 15 Nov, 2018
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the degree sequence of any graph?
(I) 7, 6, 5, 4, 4, 3, 2, 1
(II) 6, 6, 6, 6, 3, 3, 2, 2
(III) 7, 6, 6, 4, 4, 3, 2, 2
(IV) 8, 7, 7, 6, 4, 2, 1, 1
... | [
{
"code": null,
"e": 25771,
"s": 25743,
"text": "\n15 Nov, 2018"
},
{
"code": null,
"e": 25965,
"s": 25771,
"text": "The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the... |
jQuery | delay() with Examples - GeeksforGeeks | 13 Feb, 2019
The delay() is an inbuilt method in jQuery which is used to set a timer to delay the execution of the next item in the queue.Syntax:
$(selector).delay(para1, para2);
Parameter: It accepts two parameters which are specified below-
para1: It specifies the speed of the delay.
para2: It is optional and specif... | [
{
"code": null,
"e": 41968,
"s": 41940,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 42101,
"s": 41968,
"text": "The delay() is an inbuilt method in jQuery which is used to set a timer to delay the execution of the next item in the queue.Syntax:"
},
{
"code": null,
... |
Find the first and last M digits from K-th power of N - GeeksforGeeks | 26 May, 2021
Given a two integers N and K, the task is to find the first M and last M digits of the number NK .Examples:
Input: N = 2345, K = 3, M = 3 Output: 128 625 Explanation: 2345 3 = 12895213625 Therefore, the first M(= 3) digits are 128 and the last three digits are 625.Input: N = 12, K = 12, M = 4 Output: 891... | [
{
"code": null,
"e": 25961,
"s": 25933,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 26071,
"s": 25961,
"text": "Given a two integers N and K, the task is to find the first M and last M digits of the number NK .Examples: "
},
{
"code": null,
"e": 26312,
"s": ... |
AngularJS | ng-focus Directive - GeeksforGeeks | 31 Aug, 2021
The ng-focus Directive in AngluarJS is used to apply custom behavior when an element is focused. It can be used to show/hide some element or it can popup alert when element is being focused. It is supported by <a>, <input>, <select> and <textarea> elements.
Syntax:
<element ng-focus="expression"> Content... | [
{
"code": null,
"e": 26160,
"s": 26132,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 26418,
"s": 26160,
"text": "The ng-focus Directive in AngluarJS is used to apply custom behavior when an element is focused. It can be used to show/hide some element or it can popup alert whe... |
Java.io.FilePermission Class in Java - GeeksforGeeks | 01 Feb, 2017
java.io.FilePermission class is used to represent access to a file or a directory. These accesses are in the form of a path name and a set of actions associated to the path name(specifies which file to be open along with the the extension and the path).
For Example, in FilePermission(βGEEKS.txtβ, βreadβ) β... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n01 Feb, 2017"
},
{
"code": null,
"e": 25503,
"s": 25249,
"text": "java.io.FilePermission class is used to represent access to a file or a directory. These accesses are in the form of a path name and a set of actions associated to... |
Node.js crypto.randomBytes() Method - GeeksforGeeks | 11 Oct, 2021
The crypto.randomBytes() method is used to generate a cryptographically well-built artificial random data and the number of bytes to be generated in the written code.Syntax:
crypto.randomBytes( size, callback )
Parameters: This method accept two parameters as mentioned above and described below:
size: ... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 26345,
"s": 26169,
"text": "The crypto.randomBytes() method is used to generate a cryptographically well-built artificial random data and the number of bytes to be generated in the written co... |
Write a bash script to print a particular line from a file in C | In this program, we are given a file name text.txt. Our task is to print a particular line from the file.
For this there are multiple methods in bash script, they are awk, sed, head.
$> awk β{if(NR==LINE_NUMBER) print $0}β filename
$> sed -n LINE_NUMBERp filename
$head -n LineNumber filename | tail - n + LINE_NUMBER
Co... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "In this program, we are given a file name text.txt. Our task is to print a particular line from the file."
},
{
"code": null,
"e": 1245,
"s": 1168,
"text": "For this there are multiple methods in bash script, they are awk, sed, head.... |
Spring Batch - MySQL to Flat File | In this chapter, we will create a Spring Batch application which uses an MySQL Reader and a Flatfile Writer (.txt ).
Reader β The Reader we are using in the application is JdbcCursorItemReader to read data from MySQL database.
Assume we have created a table in the MySQL database as shown below.
CREATE TABLE details.xml... | [
{
"code": null,
"e": 2045,
"s": 1928,
"text": "In this chapter, we will create a Spring Batch application which uses an MySQL Reader and a Flatfile Writer (.txt )."
},
{
"code": null,
"e": 2155,
"s": 2045,
"text": "Reader β The Reader we are using in the application is JdbcCursor... |
MariaDB - Update Query | The UPDATE command modifies existing fields by changing values. It uses the SET clause to specify columns for modification, and to specify the new values assigned. These values can be either an expression or the default value of the field. Setting a default value requires using the DEFAULT keyword. The command can also... | [
{
"code": null,
"e": 2797,
"s": 2362,
"text": "The UPDATE command modifies existing fields by changing values. It uses the SET clause to specify columns for modification, and to specify the new values assigned. These values can be either an expression or the default value of the field. Setting a def... |
Send Data Alert with Python SMTP. Sending Business Reporting and Email... | by Vincent Tatan | Towards Data Science | For data scientists, it is very important to communicate reports to the non technical users especially if there are some abnormality within the data. From my working experience, most analysts would send the users business reports manually β they would process the data, run some validations, and generate reports to send... | [
{
"code": null,
"e": 574,
"s": 171,
"text": "For data scientists, it is very important to communicate reports to the non technical users especially if there are some abnormality within the data. From my working experience, most analysts would send the users business reports manually β they would pro... |
Top three elements in binary tree - GeeksforGeeks | 30 Jun, 2021
We have a simple binary tree and we have to print the top 3 largest elements present in the binary tree.Examples:
Input :
1
/ \
2 3
/ \ / \
4 5 4 5
Output :Three largest elements are 5 4 3
Approach We can simply take three variables first, second, third t... | [
{
"code": null,
"e": 35455,
"s": 35427,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 35570,
"s": 35455,
"text": "We have a simple binary tree and we have to print the top 3 largest elements present in the binary tree.Examples: "
},
{
"code": null,
"e": 35696,
... |
hibernate one to many | one to many mapping in hibernate | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In OOPs each entity can have some relation wi... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Python Pandas - Get the quarter of the year from Period object | To get the quarter of the year component of the Period, use the period.quarter property. At first, import the required libraries β
import pandas as pd
The pandas.Period represents a period of time. Creating two Period objects
period1 = pd.Period("2020-02-27 08:32:48")
period2 = pd.Period(freq="M", year = 2021, month = ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "To get the quarter of the year component of the Period, use the period.quarter property. At first, import the required libraries β"
},
{
"code": null,
"e": 1213,
"s": 1193,
"text": "import pandas as pd"
},
{
"code": null,
... |
Node.js - Global Objects | Node.js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly. These objects are modules, functions, strings and object itself as explained below.
The __filename represents the filename of the code being exe... | [
{
"code": null,
"e": 2278,
"s": 2018,
"text": "Node.js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly. These objects are modules, functions, strings and object itself as explained ... |
Java & MySQL - Select Database Example | This chapter provides an example on how to select a Database using JDBC application. Before executing the following example, make sure you have the following in place β
To execute the following example you need to replace the username and password with your actual user name and password.
To execute the following exampl... | [
{
"code": null,
"e": 2855,
"s": 2686,
"text": "This chapter provides an example on how to select a Database using JDBC application. Before executing the following example, make sure you have the following in place β"
},
{
"code": null,
"e": 2975,
"s": 2855,
"text": "To execute th... |
What are different types of access modifiers available in C#? | Access modifiers are used to specify the scope of accessibility of a member of a class or type of the class itself. There are six different types of access modifiers.
Public
Public
Private
Private
Protected
Protected
Internal
Internal
Protected Internal
Protected Internal
Private Protected
Private Protected
Objects tha... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Access modifiers are used to specify the scope of accessibility of a member of a class or type of the class itself. There are six different types of access modifiers."
},
{
"code": null,
"e": 1236,
"s": 1229,
"text": "Public"
},
... |
Scraping tweets and analyzing Social Sentiments | by Amardeep Chauhan | Towards Data Science | Natural Language Processing (NLP) is really a very interesting and broad field of Artificial Intelligence. Here I am going to use it for processing of text-based record and will give you a crash course on Scraping and Sentiment Analysis. For Scraping, I have used Selenium & tweepy and for Sentiment Analysis, I have use... | [
{
"code": null,
"e": 701,
"s": 172,
"text": "Natural Language Processing (NLP) is really a very interesting and broad field of Artificial Intelligence. Here I am going to use it for processing of text-based record and will give you a crash course on Scraping and Sentiment Analysis. For Scraping, I h... |
GATE | GATE CS 2019 | Question 46 - GeeksforGeeks | 18 Feb, 2019
There are n unsorted arrays: A1, A2, ....,An. Assume that n is odd. Each of A1, A2, ...., An contains n distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of A1, A2, ....,An is ________ .
(A) Ξ(n log n)(B) Ξ(n2)(C) Ξ... | [
{
"code": null,
"e": 25873,
"s": 25845,
"text": "\n18 Feb, 2019"
},
{
"code": null,
"e": 26152,
"s": 25873,
"text": "There are n unsorted arrays: A1, A2, ....,An. Assume that n is odd. Each of A1, A2, ...., An contains n distinct elements. There are no common elements between any... |
Model Fitting, Correlation, p-value, t-Statistic, Confidence Intervals and Visualization in Python | by Rashida Nasrin Sucky | Towards Data Science | Linear regression is the most commonly used regression model. The reason is it is simple to use, it can infer good information and it is easy to understand. In this article, we will discuss the fitting of the linear regression model to the data, inference from it, and some useful visualization.
Python programming langu... | [
{
"code": null,
"e": 468,
"s": 172,
"text": "Linear regression is the most commonly used regression model. The reason is it is simple to use, it can infer good information and it is easy to understand. In this article, we will discuss the fitting of the linear regression model to the data, inference... |
Meteor - EJSON | EJSON is an extension of JSON syntax that supports Date and Binary types.
To install EJSON package, we need to add it from the command prompt window.
C:\Users\username\Desktop\meteorApp>meteor add ejson
We can deserialize the date using the parse method.
if (Meteor.isClient) {
var myEjsonDate = '{"$date": 145502963... | [
{
"code": null,
"e": 2195,
"s": 2121,
"text": "EJSON is an extension of JSON syntax that supports Date and Binary types."
},
{
"code": null,
"e": 2271,
"s": 2195,
"text": "To install EJSON package, we need to add it from the command prompt window."
},
{
"code": null,
... |
Learn How To Use Spark ML and Spark Streaming | by Navid Mashinchi | Towards Data Science | In this article, I am going over an example of how we can use Spark ML to make predictions on streaming data. Note we wonβt focus on comparing different models and tuning the model. The main focus will be on how we can incorporate Spark Streaming to make predictions using databricks. In addition to that, you should hav... | [
{
"code": null,
"e": 593,
"s": 172,
"text": "In this article, I am going over an example of how we can use Spark ML to make predictions on streaming data. Note we wonβt focus on comparing different models and tuning the model. The main focus will be on how we can incorporate Spark Streaming to make ... |
Perl | Appending to a File - GeeksforGeeks | 05 Mar, 2019
When a file is opened in write mode using β>β, the content of the existing file is deleted and content added using the print statement is written to the file. In this mode, the writing point will be set to the end of the file. So old content of file remains intact and anything that is written to file using... | [
{
"code": null,
"e": 24020,
"s": 23992,
"text": "\n05 Mar, 2019"
},
{
"code": null,
"e": 24487,
"s": 24020,
"text": "When a file is opened in write mode using β>β, the content of the existing file is deleted and content added using the print statement is written to the file. In t... |
How to copy certain files from one folder to another using Python? | The shutil module provides functions for copying files, as well as entire folders. For copying multiple files at once, you'll have to have a list of all files you want to copy and loop over them to copy them.
Calling shutil.copy(source, destination) will copy the file at the path source to the folder at the path destin... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "The shutil module provides functions for copying files, as well as entire folders. For copying multiple files at once, you'll have to have a list of all files you want to copy and loop over them to copy them."
},
{
"code": null,
"e": 1579,
... |
View stored procedure/function definition in MySQL? | To view stored procedure/function definition in MySQL, you can use show command. The syntax is as follows β
SHOW CREATE PROCEDURE yourProcedureName;
To understand the above syntax, you can create a procedure and check that definition. Let us create a stored procedure β
mysql> delimiter //
mysql> create procedure AllRec... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "To view stored procedure/function definition in MySQL, you can use show command. The syntax is as follows β"
},
{
"code": null,
"e": 1211,
"s": 1170,
"text": "SHOW CREATE PROCEDURE yourProcedureName;"
},
{
"code": null,
"... |
Check if a triangle of positive area is possible with the given angles in Python | Suppose we have three angles. We have to check whether it is possible to create a triangle of positive area with these angles or not.
So, if the input is like a = 40 b = 120 c = 20, then the output will be True as the sum of 40 + 120 + 20 = 180.
To solve this, we will follow these steps β
if a, b and c are not 0 and (a... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Suppose we have three angles. We have to check whether it is possible to create a triangle of positive area with these angles or not."
},
{
"code": null,
"e": 1308,
"s": 1196,
"text": "So, if the input is like a = 40 b = 120 c = 20, ... |
Aptitude - Pipes & Cisterns Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to Pipes & Cisterns. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in ... | [
{
"code": null,
"e": 4222,
"s": 3892,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to Pipes & Cisterns. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer but... |
Extract Tweets using GetOldTweets3 - GeeksforGeeks | 29 Aug, 2020
For most text mining or classification projects, extracting tweets is one of the most important and initial steps. The well-known method is extracting tweets with tweepy and creating a developer account in twitter. Due to certain security reasons, Twitter takes nearly 15 days to verify the process of makin... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24817,
"s": 24292,
"text": "For most text mining or classification projects, extracting tweets is one of the most important and initial steps. The well-known method is extracting tweets with ... |
How to perform different commands over ssh with Python? | The simplest way to use SSH using python is to use paramiko. You can install it using β
$ pip install paramiko
To use paramiko, ensure that you have correctly set up SSH keys(https://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-776639788.html) on the host machine and when running the python script, these ... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "The simplest way to use SSH using python is to use paramiko. You can install it using β"
},
{
"code": null,
"e": 1173,
"s": 1150,
"text": "$ pip install paramiko"
},
{
"code": null,
"e": 1486,
"s": 1173,
"text": "... |
A Novel Approach to Feature Importance β Shapley Additive Explanations | by Prakhar Rathi | Towards Data Science | If youβre stuck behind a paywall, click here to get my friend link and view this article.
Machine learning interpretability is a topic of growing importance in this field. Interpret means to explain or to present in understandable terms. In the context of ML systems, interpretability is the ability to explain or to pre... | [
{
"code": null,
"e": 261,
"s": 171,
"text": "If youβre stuck behind a paywall, click here to get my friend link and view this article."
},
{
"code": null,
"e": 870,
"s": 261,
"text": "Machine learning interpretability is a topic of growing importance in this field. Interpret mean... |
DocumentDB - SQL Server | The JSON files are a natural fit, and they may just be able to be imported as is to DocumentDB. However, importing from a relational database like SQL Server is going to require some sort of transformation, meaning we need to somehow bridge the gap between the normalized data in SQL Server and its denormalized represen... | [
{
"code": null,
"e": 2622,
"s": 2280,
"text": "The JSON files are a natural fit, and they may just be able to be imported as is to DocumentDB. However, importing from a relational database like SQL Server is going to require some sort of transformation, meaning we need to somehow bridge the gap betw... |
C# Method Overloading | With method overloading, multiple methods can have the same name with different
parameters:
int MyMethod(int x)
float MyMethod(float x)
double MyMethod(double x, double y)
Consider the following example, which have two methods that add numbers of different type:
static int PlusMethodInt(int x, int y)
{
return x + y;
... | [
{
"code": null,
"e": 92,
"s": 0,
"text": "With method overloading, multiple methods can have the same name with different\nparameters:"
},
{
"code": null,
"e": 172,
"s": 92,
"text": "int MyMethod(int x)\nfloat MyMethod(float x)\ndouble MyMethod(double x, double y)"
},
{
"... |
WPF - Keyboard | There are many types of keyboard inputs such as KeyDown, KeyUp, TextInput, etc. In the following example, some of the keyboard inputs are handled. The following example defines a handler for the Click event and a handler for the KeyDown event.
Letβs create a new WPF project with the name WPFKeyboardInput.
Letβs create ... | [
{
"code": null,
"e": 2264,
"s": 2020,
"text": "There are many types of keyboard inputs such as KeyDown, KeyUp, TextInput, etc. In the following example, some of the keyboard inputs are handled. The following example defines a handler for the Click event and a handler for the KeyDown event."
},
{... |
C++ Program to Find ith Largest Number from a Given List Using Order-Statistic Algorithm | This is a C++ program to find ith largest number from a given list using Order-Statistic Algorithm.
Begin
function Insert() to insert nodes into the tree:
Arguments:
root, d.
Body of the function:
If tree is completely null then insert new node as root.
If d = tmp->data, increase the count... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "This is a C++ program to find ith largest number from a given list using Order-Statistic Algorithm."
},
{
"code": null,
"e": 2302,
"s": 1162,
"text": "Begin\n function Insert() to insert nodes into the tree:\n Arguments:\n r... |
How to Add Space Between Widgets in Flutter? - GeeksforGeeks | 14 Aug, 2020
In this article, weβll learn how to add space between widgets. There are many options available in flutter which you can use to provide space and make UI attractive. If you use Row and Column for arranging widgets, then by default limited options are available for alignment. There are many options availabl... | [
{
"code": null,
"e": 23942,
"s": 23914,
"text": "\n14 Aug, 2020"
},
{
"code": null,
"e": 24485,
"s": 23942,
"text": "In this article, weβll learn how to add space between widgets. There are many options available in flutter which you can use to provide space and make UI attractiv... |
Ruby on Rails - Examples | In this chapter, we will create a simple but operational online library system for holding and managing the books.
This application has a basic architecture and will be built using two ActiveRecord models to describe the types of data that is stored β
Books, which describes an actual listing.
Subject, which is used to ... | [
{
"code": null,
"e": 2218,
"s": 2103,
"text": "In this chapter, we will create a simple but operational online library system for holding and managing the books."
},
{
"code": null,
"e": 2355,
"s": 2218,
"text": "This application has a basic architecture and will be built using t... |
C# | Convert Class - GeeksforGeeks | 03 Apr, 2019
Convert class provides different methods to convert a base data type to another base data type. The base types supported by the Convert class are Boolean, Char, SByte, Byte, Int16, Int32, Int64, UInt16, UInt32, UInt64, Single, Double, Decimal, DateTime, and String. It also provides methods that support oth... | [
{
"code": null,
"e": 23838,
"s": 23810,
"text": "\n03 Apr, 2019"
},
{
"code": null,
"e": 24207,
"s": 23838,
"text": "Convert class provides different methods to convert a base data type to another base data type. The base types supported by the Convert class are Boolean, Char, SB... |
Perfect Binary Tree Specific Level Order Traversal - GeeksforGeeks | 14 Jan, 2022
Given a Perfect Binary Tree like below: (click on image to get a clear view)
Print the level order of nodes in following specific manner:
1 2 3 4 7 5 6 8 15 9 14 10 13 11 12 16 31 17 30 18 29 19 28 20 27 21 26 22 25 23 24
i.e. print nodes in level order but nodes should be from left and right side alt... | [
{
"code": null,
"e": 24631,
"s": 24603,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 24708,
"s": 24631,
"text": "Given a Perfect Binary Tree like below: (click on image to get a clear view)"
},
{
"code": null,
"e": 24771,
"s": 24708,
"text": "Print the lev... |
Using DELETE Expression | In the previous chapter, we have understood what an Update expression does. The next expression that we are going to learn is Delete.
The delete operation can be achieved by running delete() method on target table object as given in the following statement β
stmt = students.delete()
In case of students table, the above... | [
{
"code": null,
"e": 2474,
"s": 2340,
"text": "In the previous chapter, we have understood what an Update expression does. The next expression that we are going to learn is Delete."
},
{
"code": null,
"e": 2599,
"s": 2474,
"text": "The delete operation can be achieved by running ... |
Deploying Machine Learning projects using Tkinter | by Pier Paolo Ippolito | Towards Data Science | 1
2
3
4
5
6
7
8
9
10
Powered by Play.ht
Create audio with Play.ht
Create Audio Narrations with Play.ht
Thanks to a wide variety of open-source libraries, it is relatively easy nowadays to start exploring datasets and making some first predictions using simple Machine Learning (ML) algorithms in Python. Although, to mak... | [
{
"code": null,
"e": 173,
"s": 171,
"text": "1"
},
{
"code": null,
"e": 175,
"s": 173,
"text": "2"
},
{
"code": null,
"e": 177,
"s": 175,
"text": "3"
},
{
"code": null,
"e": 179,
"s": 177,
"text": "4"
},
{
"code": null,
"e": 181... |
How to deploy your ML models into the browser | by Dweep Joshipura | Towards Data Science | When I was a beginner in AI and ML, I often had questions like why am I learning this? And could I even make a difference before landing at a job?
These questions came up because I knew how to train models, but not how to deploy them. So if youβre at that stage and want to learn how to use models, youβre at the right p... | [
{
"code": null,
"e": 318,
"s": 171,
"text": "When I was a beginner in AI and ML, I often had questions like why am I learning this? And could I even make a difference before landing at a job?"
},
{
"code": null,
"e": 497,
"s": 318,
"text": "These questions came up because I knew ... |
PHP microtime() Function | The microtime() function returns the current Unix timestamp with microseconds. By default, this function returns a string value which contains microseconds and seconds separated by space (msec sec).
microtime($get_as_float)
get_as_float(Optional)
This is a boolean value which is used to specify whether the result shou... | [
{
"code": null,
"e": 2956,
"s": 2757,
"text": "The microtime() function returns the current Unix timestamp with microseconds. By default, this function returns a string value which contains microseconds and seconds separated by space (msec sec)."
},
{
"code": null,
"e": 2982,
"s": 29... |
C++ Increment and Decrement Operators | The increment operator ++ adds 1 to its operand, and the decrement operator -- subtracts 1 from its operand. Thus β
x = x+1;
is the same as
x++;
And similarly β
x = x-1;
is the same as
x--;
Both the increment and decrement operators can either precede (prefix) or follow (postfix) the operand. For example β
x ... | [
{
"code": null,
"e": 2434,
"s": 2318,
"text": "The increment operator ++ adds 1 to its operand, and the decrement operator -- subtracts 1 from its operand. Thus β"
},
{
"code": null,
"e": 2468,
"s": 2434,
"text": "x = x+1;\n \nis the same as\n \nx++;\n"
},
{
"code": null,... |
Using the birthday paradox to teach probability fundamentals | by Cassie Kozyrkov | Towards Data Science | Short answer: it depends how many friends you have...
1.3K plays1.3K
Todayβs the birthday of someone dear to me (hip hip hooray!), which is a fabulous excuse to cover some probability basics in birthday language. Our goal is figuring out this perennial stats homework chart topper together:
If you have N people in a... | [
{
"code": null,
"e": 225,
"s": 171,
"text": "Short answer: it depends how many friends you have..."
},
{
"code": null,
"e": 244,
"s": 225,
"text": "\n\n1.3K plays1.3K\n\n"
},
{
"code": null,
"e": 466,
"s": 244,
"text": "Todayβs the birthday of someone dear to ... |
Advanced Python Visualizations in PowerBI | Towards Data Science | How the latest Python-PowerBI integration can be used to leverage the advanced visuals from python combined with the native data drill through and DAX functionalities
The latest Python visual support completes the support for Python in Power BI, enabling you to use Python scripts to prepare your dataset, apply sophisti... | [
{
"code": null,
"e": 339,
"s": 172,
"text": "How the latest Python-PowerBI integration can be used to leverage the advanced visuals from python combined with the native data drill through and DAX functionalities"
},
{
"code": null,
"e": 676,
"s": 339,
"text": "The latest Python v... |
Some interesting facts about static member functions in C++ - GeeksforGeeks | 30 Oct, 2020
1) static member functions do not have this pointer. For example following program fails in compilation with error β`thisβ is unavailable for static member functions β
CPP
#include<iostream>class Test { static Test * fun() { return this; // compiler error }}; int main(){ getchar(); return... | [
{
"code": null,
"e": 23759,
"s": 23731,
"text": "\n30 Oct, 2020"
},
{
"code": null,
"e": 23927,
"s": 23759,
"text": "1) static member functions do not have this pointer. For example following program fails in compilation with error β`thisβ is unavailable for static member functio... |
Union of Two Sorted Arrays | Practice | GeeksforGeeks | Union of two arrays can be defined as the common and distinct elements in the two arrays.
Given two sorted arrays of size n and m respectively, find their union.
Example 1:
Input:
n = 5, arr1[] = {1, 2, 3, 4, 5}
m = 3, arr2 [] = {1, 2, 3}
Output: 1 2 3 4 5
Explanation: Distinct elements including
both the arrays a... | [
{
"code": null,
"e": 400,
"s": 238,
"text": "Union of two arrays can be defined as the common and distinct elements in the two arrays.\nGiven two sorted arrays of size n and m respectively, find their union."
},
{
"code": null,
"e": 412,
"s": 400,
"text": "\nExample 1:"
},
{
... |
How to disable MySQL foreign key checks and what are the benefits of
disabling it? | We can disable foreign key checks with the help of the following statement β
mysql> Set foreign_key_checks = 0;
Query OK, 0 rows affected (0.00 sec)
And we can enable it with the help of the following statement β
mysql> Set foreign_key_checks = 1;
Query OK, 0 rows affected (0.00 sec)
Some benefits of disabling foreign ... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "We can disable foreign key checks with the help of the following statement β"
},
{
"code": null,
"e": 1211,
"s": 1139,
"text": "mysql> Set foreign_key_checks = 0;\nQuery OK, 0 rows affected (0.00 sec)"
},
{
"code": null,
... |
Dart Programming - Map | The Map object is a simple key/value pair. Keys and values in a map may be of any type. A Map is a dynamic collection. In other words, Maps can grow and shrink at runtime.
Maps can be declared in two ways β
Using Map Literals
Using a Map constructor
To declare a map using map literals, you need to enclose the key-value... | [
{
"code": null,
"e": 2697,
"s": 2525,
"text": "The Map object is a simple key/value pair. Keys and values in a map may be of any type. A Map is a dynamic collection. In other words, Maps can grow and shrink at runtime."
},
{
"code": null,
"e": 2732,
"s": 2697,
"text": "Maps can b... |
C# Bitwise and Bit Shift Operators | Bitwise operator works on bits and performs bit by bit operation.
The Bitwise operators supported by C# are listed in the following table. Assume variable A holds 60 and variable B holds 13 β
The following is an example showing how to implement the Bitwise operators in C#.
Live Demo
using System;
namespace MyApplicatio... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Bitwise operator works on bits and performs bit by bit operation."
},
{
"code": null,
"e": 1254,
"s": 1128,
"text": "The Bitwise operators supported by C# are listed in the following table. Assume variable A holds 60 and variable B h... |
IPC using Message Queues | Why do we need message queues when we already have the shared memory? It would be for multiple reasons, let us try to break this into multiple points for simplification β
As understood, once the message is received by a process it would be no longer available for any other process. Whereas in shared memory, the data is... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "Why do we need message queues when we already have the shared memory? It would be for multiple reasons, let us try to break this into multiple points for simplification β"
},
{
"code": null,
"e": 1427,
"s": 1233,
"text": "As understo... |
Genetic Programming applied to AI Heuristic Optimization | by Ryan Shrott | Towards Data Science | My interest in genetic programming began in 2015 when I studied the iterated ultimatum game. More recently, I have been using genetic algorithms to optimize parameters in a risk management system at work. In this short article, I will discuss the high level idea and the necessary ingredients to build your own genetic a... | [
{
"code": null,
"e": 777,
"s": 172,
"text": "My interest in genetic programming began in 2015 when I studied the iterated ultimatum game. More recently, I have been using genetic algorithms to optimize parameters in a risk management system at work. In this short article, I will discuss the high lev... |
How to serialize a null field using Gson library in Java? | By default, the Gson object does not serialize the fields with null values to JSON. If a field in a Java object is null, Gson excludes it. We can force Gson to serialize null values via the GsonBuilder class. We need to call the serializeNulls() method on the GsonBuilder instance before creating the Gson object. Once s... | [
{
"code": null,
"e": 1507,
"s": 1062,
"text": "By default, the Gson object does not serialize the fields with null values to JSON. If a field in a Java object is null, Gson excludes it. We can force Gson to serialize null values via the GsonBuilder class. We need to call the serializeNulls() method ... |
C library function - mblen() | The C library function int mblen(const char *str, size_t n) returns the length of a multi-byte character pointed to, by the argument str.
Following is the declaration for mblen() function.
int mblen(const char *str, size_t n)
str β This is the pointer to the first byte of a multibyte character.
str β This is the pointe... | [
{
"code": null,
"e": 2145,
"s": 2007,
"text": "The C library function int mblen(const char *str, size_t n) returns the length of a multi-byte character pointed to, by the argument str."
},
{
"code": null,
"e": 2196,
"s": 2145,
"text": "Following is the declaration for mblen() fun... |
While loop with Compile time constants - GeeksforGeeks | 14 Dec, 2020
While loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement. It is mostly used in situations where the exact number of iterations beforehand. Below is the image to illustrate the while loo... | [
{
"code": null,
"e": 25751,
"s": 25723,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 26061,
"s": 25751,
"text": "While loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeati... |
How to create an inline frame using HTML5 ? - GeeksforGeeks | 30 Jun, 2020
In this article, we will create an inline iframe by using a <iframe> tag in a document.It represents a fixed rectangular area within the document in which the browser can display a separate document along with scroll bars and borders. Inline frames are used to embed another document within the current HTML... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 26599,
"s": 26277,
"text": "In this article, we will create an inline iframe by using a <iframe> tag in a document.It represents a fixed rectangular area within the document in which the brow... |
D3.js zoom.scaleExtent() Function - GeeksforGeeks | 09 Sep, 2020
The zoom.scaleExtent() Function in D3.js is used to set the scale extends to the specified array of numbers [k0, k1]. The k0 is the minimum allowed scale factor and k1 is the maximum allowed scale factor
Syntax:
zoom.scaleExtent([extent])
Parameters: This function accepts a single parameter as mentioned ab... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 26749,
"s": 26545,
"text": "The zoom.scaleExtent() Function in D3.js is used to set the scale extends to the specified array of numbers [k0, k1]. The k0 is the minimum allowed scale factor an... |
Count of different ways to express N as the sum of 1, 3 and 4 - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 419,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
Scala | Arrays - GeeksforGeeks | 11 Mar, 2019
Array is a special kind of collection in scala. it is a fixed size data structure that stores elements of the same data type. The index of the first element of an array is zero and the last element is the total number of elements minus one. It is a collection of mutable values. It corresponds to arrays(in ... | [
{
"code": null,
"e": 26614,
"s": 26586,
"text": "\n11 Mar, 2019"
},
{
"code": null,
"e": 27022,
"s": 26614,
"text": "Array is a special kind of collection in scala. it is a fixed size data structure that stores elements of the same data type. The index of the first element of an ... |
C++ Assignment Operators | Try the following example to understand all the assignment operators available in C++.
Copy and paste the following C++ program in test.cpp file and compile and run this program.
#include <iostream>
using namespace std;
main() {
int a = 21;
int c ;
c = a;
cout << "Line 1 - = Operator, Value of c = : " <... | [
{
"code": null,
"e": 2405,
"s": 2318,
"text": "Try the following example to understand all the assignment operators available in C++."
},
{
"code": null,
"e": 2497,
"s": 2405,
"text": "Copy and paste the following C++ program in test.cpp file and compile and run this program."
... |
Can static variables be called using className.variableName in Java? | Class variables also known as static variables are declared with the static keyword There would only be one copy of each class variable per class, regardless of how many objects are created from it. You can access a class variable without instantiation using the class name as className.variableName.
Live Demo
public c... | [
{
"code": null,
"e": 1363,
"s": 1062,
"text": "Class variables also known as static variables are declared with the static keyword There would only be one copy of each class variable per class, regardless of how many objects are created from it. You can access a class variable without instantiation ... |
Format double type in Java | Letβs say we have the following three values β
double val1 = 15.546;
double val2 = 25.87;
double val3 = Math.PI;
Let us now format these double-type numbers. Firstly, we are formatting Eulerβs number with Math.exp(). After that, we have also evaluated log. The %.3f you can see here is what we used for formatting the nu... | [
{
"code": null,
"e": 1109,
"s": 1062,
"text": "Letβs say we have the following three values β"
},
{
"code": null,
"e": 1175,
"s": 1109,
"text": "double val1 = 15.546;\ndouble val2 = 25.87;\ndouble val3 = Math.PI;"
},
{
"code": null,
"e": 1389,
"s": 1175,
"text... |
How can I show image rollover with a mouse event in JavaScript? | To show image rollover with a mouse event, you can try to run the following code β
<html>
<head>
<title>Rollover with a Mouse Event</title>
<script>
<!--
if(document.images) {
var image1 = new Image(); // Preload an image
image1.src = "/images/html.gif";... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To show image rollover with a mouse event, you can try to run the following code β"
},
{
"code": null,
"e": 1836,
"s": 1145,
"text": "<html>\n <head>\n <title>Rollover with a Mouse Event</title>\n <script>\n <!--\... |
Multiplication Table | Practice | GeeksforGeeks | Print the multiplication table of a given number N.
Example 1:
Input:
N = 9
Output:
9 18 27 36 45 54 63 72 81 90
Explanation:
The table of 9 is the output whose 1st
term is 9 and the 10th term is 90.
Example 2:
Input:
N = 2
Output:
2 4 6 8 10 12 14 16 18 20
Your Task:
You don't need to read input. Your task... | [
{
"code": null,
"e": 279,
"s": 226,
"text": "Print the multiplication table of a given number N. "
},
{
"code": null,
"e": 291,
"s": 279,
"text": "\nExample 1:"
},
{
"code": null,
"e": 431,
"s": 291,
"text": "Input:\nN = 9\n\nOutput:\n9 18 27 36 45 54 63 72 81... |
Restricting and Sorting Data Questions | 1. Which of the following clause is used to limit the number of rows retrieved from a SELECT query?
LIMIT
WHERE
AND
FROM
LIMIT
WHERE
AND
FROM
Answer: B. The WHERE clause is used to restrict the number of rows returned from a SELECT query.
2. Choose the database elements whose values can be compared in a WHERE clause ... | [
{
"code": null,
"e": 2563,
"s": 2463,
"text": "1. Which of the following clause is used to limit the number of rows retrieved from a SELECT query?"
},
{
"code": null,
"e": 2586,
"s": 2563,
"text": "\nLIMIT\nWHERE\nAND\nFROM\n"
},
{
"code": null,
"e": 2592,
"s": 25... |
How to build a simple song recommender system | by Eric Le | Towards Data Science | This blog post is inspired by Siraj Ravalβs Deep Learning Foundation Nanodegree at Udacity. Then repo of this exercise can be found here.
Building a recommendation system is a common task that is faced by Amazon, Netflix, Spotify and Google. The underlying goal of the recommendation system is to personalize content and... | [
{
"code": null,
"e": 310,
"s": 172,
"text": "This blog post is inspired by Siraj Ravalβs Deep Learning Foundation Nanodegree at Udacity. Then repo of this exercise can be found here."
},
{
"code": null,
"e": 586,
"s": 310,
"text": "Building a recommendation system is a common tas... |
Overlay an image segmentation with Numpy and Matplotlib | To overlay an image segmentation with numpy, we can take the following Steps β
Make a masked array of 10Γ10 dimension.
Make a masked array of 10Γ10 dimension.
Update the masked array with 1 for some region.
Update the masked array with 1 for some region.
Make image data using numpy.
Make image data using numpy.
Mask an... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "To overlay an image segmentation with numpy, we can take the following Steps β"
},
{
"code": null,
"e": 1181,
"s": 1141,
"text": "Make a masked array of 10Γ10 dimension."
},
{
"code": null,
"e": 1221,
"s": 1181,
"... |
How to Create a Reminder Notification in Android? | This example demonstrate about How to Create a Reminder Notification 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" ?>
<R... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrate about How to Create a Reminder Notification in Android"
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required detail... |
How to draw images in the Tkinter window? | To process images with Tkinter and other Python packages, we generally refer to use Pillow Package or PIL in Python. It provides a way to load and process the images in the program wherever we need. Initially, we convert the image to an instance of PhotoImage object that allows images to be further used in many use cas... | [
{
"code": null,
"e": 1577,
"s": 1062,
"text": "To process images with Tkinter and other Python packages, we generally refer to use Pillow Package or PIL in Python. It provides a way to load and process the images in the program wherever we need. Initially, we convert the image to an instance of Phot... |
Longest Common Subsequence | The longest common subsequence is a type of subsequence which is present in both of the given sequences or arrays.
We can see that there are many subproblems, which are computed again and again to solve this problem. By using the Overlapping Substructure Property of Dynamic programming, we can overcome the computationa... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "The longest common subsequence is a type of subsequence which is present in both of the given sequences or arrays."
},
{
"code": null,
"e": 1536,
"s": 1177,
"text": "We can see that there are many subproblems, which are computed agai... |
Apache Derby - Environment Setup | Following chapter explains how to download and install Apache Derby.
Visit the home page of Apache Derby home page https://db.apache.org/derby/. Click the Download tab.
Select and click on the link of the latest version of Apache Derby.
On clicking the selected link, you will be redirected to the Distributions page of ... | [
{
"code": null,
"e": 2249,
"s": 2180,
"text": "Following chapter explains how to download and install Apache Derby."
},
{
"code": null,
"e": 2349,
"s": 2249,
"text": "Visit the home page of Apache Derby home page https://db.apache.org/derby/. Click the Download tab."
},
{
... |
How to use Volley Library to parse JSON in Android Kotlin App? | This example demonstrates how to use Volley Library to parse JSON in Kotlin.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a new project.
Step 2 β Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeL... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrates how to use Volley Library to parse JSON in Kotlin."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details t... |
Algorithms | Analysis of Algorithms (Recurrences) | Question 6 - GeeksforGeeks | 28 Jun, 2021
The running time of an algorithm is represented by the following recurrence relation:
if n <= 3 then T(n) = n
else T(n) = T(n/3) + cn
Which one of the following represents the time complexity of the algorithm?(A) (n)(B) (n log n)(C) (n^2)(D) (n^2log n)(A) A(B) B(C) C(D) DAnswer: (A)Explanation... | [
{
"code": null,
"e": 25012,
"s": 24984,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25098,
"s": 25012,
"text": "The running time of an algorithm is represented by the following recurrence relation:"
},
{
"code": null,
"e": 25159,
"s": 25098,
"text": " ... |
How do you remove an array element by its index in MongoDB | To remove array element by its index in MongoDB, you can use unsetandpull operator. There are two steps to remove array elements from an array.The syntax for the same is as follows:
db.yourCollectionName.update({},{$unset:{"yourArrayListName.yourPosition":yourPositionValue}};
db.yourCollectionName.update({},{$pull:{"yo... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "To remove array element by its index in MongoDB, you can use unsetandpull operator. There are two steps to remove array elements from an array.The syntax for the same is as follows:"
},
{
"code": null,
"e": 1408,
"s": 1244,
"text": "... |
Data Cleaning β How to Handle Missing Values with Pandas | by Indhumathy Chelliah | Towards Data Science | Data Cleaning is one of the important steps in EDA. Data cleaning can be done in many ways. One of them is handling missing values.
Letβs learn about how to handle missing values in a dataset.
Identify Missing ValuesReplace Missing ValuesFill missing valuesDrop missing values
Identify Missing Values
Replace Missing Val... | [
{
"code": null,
"e": 179,
"s": 47,
"text": "Data Cleaning is one of the important steps in EDA. Data cleaning can be done in many ways. One of them is handling missing values."
},
{
"code": null,
"e": 240,
"s": 179,
"text": "Letβs learn about how to handle missing values in a dat... |
βregisterβ keyword in C | Register variables tell the compiler to store the variable in CPU register instead of memory. Frequently used variables are kept in registers and they have faster accessibility. We can never get the addresses of these variables. βregisterβ keyword is used to declare the register variables.
Scope β They are local to the... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "Register variables tell the compiler to store the variable in CPU register instead of memory. Frequently used variables are kept in registers and they have faster accessibility. We can never get the addresses of these variables. βregisterβ keyword is us... |
Tryit Editor v3.7 | Tryit: HTML text color | [] |
Byte Streams in Java | These handle data in bytes (8 bits) i.e., the byte stream classes read/write data of 8 bits. Using these you can store characters, videos, audios, images etc.
The InputStream and OutputStream classes (abstract) are the super classes of all the input/output stream classes: classes that are used to read/write a stream of... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "These handle data in bytes (8 bits) i.e., the byte stream classes read/write data of 8 bits. Using these you can store characters, videos, audios, images etc."
},
{
"code": null,
"e": 1453,
"s": 1221,
"text": "The InputStream and Out... |
Documenting Flask Endpoint using Flask-Autodoc - GeeksforGeeks | 04 Jul, 2021
Documentation of endpoints is an essential task in web development and being able to apply it in different frameworks is always a utility. This article discusses how endpoints in Flask can be decorated to generate good documentation of them using the Flask-Autodoc module. This module provides the following... | [
{
"code": null,
"e": 24316,
"s": 24288,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 24636,
"s": 24316,
"text": "Documentation of endpoints is an essential task in web development and being able to apply it in different frameworks is always a utility. This article discusses h... |
What is the difference between JavaScript and C++? | The following are the differences between JavaScript and C++.
JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complementary to and integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and ... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "The following are the differences between JavaScript and C++."
},
{
"code": null,
"e": 1398,
"s": 1124,
"text": "JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications.... |
Check if all digits of a number divide it in Python | Suppose we have a number n. We have to check whether all digits of it can divide n or not.
So, if the input is like n = 135, then the output will be True, because (135 / 1 = 135), (135 / 3 = 45) and (135 / 5 = 27).
To solve this, we will follow these steps β
val := n
while val > 0, dod := val mod 10if n is not divisibl... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "Suppose we have a number n. We have to check whether all digits of it can divide n or not."
},
{
"code": null,
"e": 1277,
"s": 1153,
"text": "So, if the input is like n = 135, then the output will be True, because (135 / 1 = 135), (1... |
How to create a separator using JavaFX? | A separator is a horizontal or, the vertical line separating the UI elements of an application.
In JavaFX the javafx.scene.control.Separator class represents a separator, to create a separator you need to instantiate this class. This class has three properties namely β
halignment β This property specifies the horizonta... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "A separator is a horizontal or, the vertical line separating the UI elements of an application."
},
{
"code": null,
"e": 1332,
"s": 1158,
"text": "In JavaFX the javafx.scene.control.Separator class represents a separator, to create a... |
How to call multiple JavaScript functions in onclick event? | To call multiple JavaScript functions in on click event, use a semicolon as shown below β
onclick="Display1();Display2()"
Live Demo
<html>
<head>
<script>
function Display1() {
document.write ("Hello there!");
}
function Display2() {
document.write ("Hello Wor... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To call multiple JavaScript functions in on click event, use a semicolon as shown below β"
},
{
"code": null,
"e": 1184,
"s": 1152,
"text": "onclick=\"Display1();Display2()\""
},
{
"code": null,
"e": 1194,
"s": 1184,
... |
numpy.zeros_like() in Python - GeeksforGeeks | 28 Mar, 2022
This numpy method returns an array of given shape and type as given array, with zeros.
Syntax: numpy.zeros_like(array, dtype = None, order = 'K', subok = True)
Parameters :
array : array_like input
subok : [optional, boolean]If true, then newly created array will be sub-class of array;
... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 24381,
"s": 24292,
"text": "This numpy method returns an array of given shape and type as given array, with zeros. "
},
{
"code": null,
"e": 24454,
"s": 24381,
"text": "S... |
Python | Pandas Period.qyear - GeeksforGeeks | 06 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 Period.qyear attribute return the fiscal year the Period lies in according to its star... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 24506,
"s": 24292,
"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 a... |
Add elements to LinkedHashMap collection in Java | Use the put() method to add elements to LinkedHashMap collection.
First, let us create a LinkedHashMap β
LinkedHashMap<String, String> l = new LinkedHashMap<String, String>();
Now, add elements β
l.put("1", "Jack");
l.put("2", "Tom");
l.put("3", "Jimmy");
l.put("4", "Morgan");
l.put("5", "Tim");
l.put("6", "Brad");
The... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Use the put() method to add elements to LinkedHashMap collection."
},
{
"code": null,
"e": 1167,
"s": 1128,
"text": "First, let us create a LinkedHashMap β"
},
{
"code": null,
"e": 1238,
"s": 1167,
"text": "Linked... |
Python Number uniform() Method | Python number method uniform() returns a random float r, such that x is less than or equal to r and r is less than y.
Following is the syntax for uniform() method β
uniform(x, y)
Note β This function is not accessible directly, so we need to import uniform module and then we need to call this function using random sta... | [
{
"code": null,
"e": 2362,
"s": 2244,
"text": "Python number method uniform() returns a random float r, such that x is less than or equal to r and r is less than y."
},
{
"code": null,
"e": 2409,
"s": 2362,
"text": "Following is the syntax for uniform() method β"
},
{
"co... |
How to add radio button list in alert dialog? | This example demonstrate about how to add radio button list in alert dialog
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"?>
<Linear... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "This example demonstrate about how to add radio button list in alert dialog"
},
{
"code": null,
"e": 1267,
"s": 1138,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to... |
AUC and its implementation in CatBoost | by Anna Volodkevich | Towards Data Science | The ROC curve shows the modelβs ability to distinguishing between classes.
The model which randomly assigns a class to object is a βbadβ classifier and has a diagonal ROC curve. The better is the classifier, the higher is the ROC curve. The ROC curve is plotted with TPR, True Positive Rate, on the y-axis against the FP... | [
{
"code": null,
"e": 247,
"s": 172,
"text": "The ROC curve shows the modelβs ability to distinguishing between classes."
},
{
"code": null,
"e": 686,
"s": 247,
"text": "The model which randomly assigns a class to object is a βbadβ classifier and has a diagonal ROC curve. The bett... |
Edge Chasing Algorithms - GeeksforGeeks | 24 Jun, 2020
Deadlock might be a virtual disadvantage that may get up at some point of a community of cooperating or competitive procedures. A deadlock is that state of affairs where a group of methods are blocked as a result of every technique requiring a fixed process, sources needed for its headaches and anticipatin... | [
{
"code": null,
"e": 25871,
"s": 25843,
"text": "\n24 Jun, 2020"
},
{
"code": null,
"e": 26318,
"s": 25871,
"text": "Deadlock might be a virtual disadvantage that may get up at some point of a community of cooperating or competitive procedures. A deadlock is that state of affairs... |
StringBuilder appendCodePoint() method in Java with Examples - GeeksforGeeks | 13 Dec, 2021
The appendCodePoint(int codePoint) method of StringBuilder class is the inbuilt method used to append the string representation of the codePoint argument to this sequence. The argument is appended to this StringBuilder content and length of the object is increased by Character.charCount(codePoint). The eff... | [
{
"code": null,
"e": 24090,
"s": 24062,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 24563,
"s": 24090,
"text": "The appendCodePoint(int codePoint) method of StringBuilder class is the inbuilt method used to append the string representation of the codePoint argument to this s... |
Bootstrap .nav-justified class | Make tabs or pills of equal widths as of their parent at screens wider than 768px using class .nav-justified along with .nav, .nav-tabs or .nav, .nav-pills respectively. On smaller screens, the nav links are stacked.
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "Make tabs or pills of equal widths as of their parent at screens wider than 768px using class .nav-justified along with .nav, .nav-tabs or .nav, .nav-pills respectively. On smaller screens, the nav links are stacked."
},
{
"code": null,
"e":... |
How to Round Time to the Nearest Quarter Hour using JavaScript ? - GeeksforGeeks | 26 Mar, 2020
We have given a time and the task is to round the time to the nearest quarter-hour with the help of JavaScript. There are two approaches that are discussed below:
Approach 1: Use getMinutes() and getHours() methods to get the minutes and hours in a variable (Ex. mins, hrs) add the 7.5 to mins, divide it by... | [
{
"code": null,
"e": 25478,
"s": 25450,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25641,
"s": 25478,
"text": "We have given a time and the task is to round the time to the nearest quarter-hour with the help of JavaScript. There are two approaches that are discussed below:"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.