title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Number of Triangles in an Undirected Graph - GeeksforGeeks | 18 Apr, 2022
Given an Undirected simple graph, We need to find how many triangles it can have. For example below graph have 2 triangles in it.
Let A[][] be the adjacency matrix representation of the graph. If we calculate A3, then the number of triangles in Undirected Graph is equal to trace(A3) / 6. Where trace(A) is... | [
{
"code": null,
"e": 25016,
"s": 24988,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 25147,
"s": 25016,
"text": "Given an Undirected simple graph, We need to find how many triangles it can have. For example below graph have 2 triangles in it. "
},
{
"code": null,
... |
TypeORM - Working with Repository | Repository is specific to an entity. In other words, each entity will have its own, build-in repository and it can be accessed using getRepository() method of connection object as specified below −
const studRepository = manager.getRepository(Student);
Once the student repository object is created, it can be used to d... | [
{
"code": null,
"e": 2249,
"s": 2051,
"text": "Repository is specific to an entity. In other words, each entity will have its own, build-in repository and it can be accessed using getRepository() method of connection object as specified below −"
},
{
"code": null,
"e": 2305,
"s": 224... |
Neo4j CQL - Sorting | Neo4j CQL has provided "ORDER BY" Clause in MATCH Command to sort the results returned by a MATCH query.
We can sort rows either ascending order or descending order.
By default, it sorts rows in ascending order. If we want to sort them in descending order, we need to use DESC clause
ORDER BY <property-name-list> [DES... | [
{
"code": null,
"e": 2444,
"s": 2339,
"text": "Neo4j CQL has provided \"ORDER BY\" Clause in MATCH Command to sort the results returned by a MATCH query."
},
{
"code": null,
"e": 2505,
"s": 2444,
"text": "We can sort rows either ascending order or descending order."
},
{
... |
How to Create a Scatterplot with a Regression Line in R? - GeeksforGeeks | 17 Feb, 2021
A scatter plot uses dots to represent values for two different numeric variables. Scatter plots are used to observe relationships between variables. A linear regression is a straight line representation of relationship between an independent and dependent variable. In this article, we will discuss how a sc... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 25626,
"s": 25242,
"text": "A scatter plot uses dots to represent values for two different numeric variables. Scatter plots are used to observe relationships between variables. A linear regre... |
Selenium with C Sharp - How to perform Explicit Wait method? | We can perform explicit wait with Selenium webdriver in C#. This is done to achieve synchronization between our tests and the elements on the page. For implementation of explicit wait, we have to take the help of the WebDriverWait and ExpectedCondition classes.
We shall create an object of the WebDriverWait class. The ... | [
{
"code": null,
"e": 1324,
"s": 1062,
"text": "We can perform explicit wait with Selenium webdriver in C#. This is done to achieve synchronization between our tests and the elements on the page. For implementation of explicit wait, we have to take the help of the WebDriverWait and ExpectedCondition ... |
egrep command in Linux with examples - GeeksforGeeks | 15 May, 2019
egrep is a pattern searching command which belongs to the family of grep functions. It works the same way as grep -E does. It treats the pattern as an extended regular expression and prints out the lines that match the pattern. If there are several files with the matching pattern, it also displays the file... | [
{
"code": null,
"e": 24006,
"s": 23978,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24335,
"s": 24006,
"text": "egrep is a pattern searching command which belongs to the family of grep functions. It works the same way as grep -E does. It treats the pattern as an extended reg... |
AWS Lambda â Additional Example | Till now, we have seen working of AWS Lambda with AWS services. Based on that knowledge, let us create a simple user registration form and post the data using API gateway to AWS Lambda. AWS Lambda will get the data from the event or theAPI gateway trigger and will add those details to DynamoDB table.
Let us consider an... | [
{
"code": null,
"e": 2708,
"s": 2406,
"text": "Till now, we have seen working of AWS Lambda with AWS services. Based on that knowledge, let us create a simple user registration form and post the data using API gateway to AWS Lambda. AWS Lambda will get the data from the event or theAPI gateway trigg... |
MySQL query to subtract date records with week day and display the weekday with records | For this, you can use DATE_FORMAT(). Let us first create a table −
mysql> create table DemoTable1820
(
AdmissionDate varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1820 values('20/10/2019');
Query OK, 1 row affected ... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "For this, you can use DATE_FORMAT(). Let us first create a table −"
},
{
"code": null,
"e": 1246,
"s": 1129,
"text": "mysql> create table DemoTable1820\n (\n AdmissionDate varchar(20)\n );\nQuery OK, 0 rows affected (0.00... |
Deploy your Machine Learning Python Codes with Azure Functions | by lalitha raghavan | Towards Data Science | Azure Functions are code triggered events that scale well owing to their serverless capabilities. The triggering mechanisms are diverse — time based (CRON functions), http, storage triggers (blob, queue) etc. Functions are also unique in that they can be coded in a variety of languages like C#, Python, Javascript etc. ... | [
{
"code": null,
"e": 646,
"s": 172,
"text": "Azure Functions are code triggered events that scale well owing to their serverless capabilities. The triggering mechanisms are diverse — time based (CRON functions), http, storage triggers (blob, queue) etc. Functions are also unique in that they can be ... |
Perl readline Function | This function reads a line from the filehandle referred to by EXPR, returning the result. If you want to use a FILEHANDLE directly, it must be passed as a typeglob.
Simply readline function is equvivalent to <>.
Following is the simple syntax for this function −
readline EXPR
This function returns only one line in a s... | [
{
"code": null,
"e": 2385,
"s": 2220,
"text": "This function reads a line from the filehandle referred to by EXPR, returning the result. If you want to use a FILEHANDLE directly, it must be passed as a typeglob."
},
{
"code": null,
"e": 2432,
"s": 2385,
"text": "Simply readline f... |
How to convert dictionary into list of JavaScript objects? | Following is the code to convert dictionary into list of JavaScript objects −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verd... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "Following is the code to convert dictionary into list of JavaScript objects −"
},
{
"code": null,
"e": 1151,
"s": 1140,
"text": " Live Demo"
},
{
"code": null,
"e": 2221,
"s": 1151,
"text": "<!DOCTYPE html>\n<html... |
Tryit Editor v3.7 | Tryit: Ordered HTML list | [] |
How to combine multiple graphs in Python | Matplotlib allows to add more than one plot in the same graph. In this tutorial, I will show you how to present data in the same plot, on two different axes.
1.
Install matplotlib by opening up the python command prompt and firing pip install matplotlib.
import matplotlib.pyplot as plt
2.
Prepare the data to be display... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "Matplotlib allows to add more than one plot in the same graph. In this tutorial, I will show you how to present data in the same plot, on two different axes."
},
{
"code": null,
"e": 1317,
"s": 1220,
"text": "1.\nInstall matplotlib b... |
How to get the maximum file name length limit using Python? | On some platforms, the maximum filename length varies according to the location on the disk. If you run UNIX with different filesystems mounted in various locations on your directory tree, you might see the following values for the maximum filename length in those locations:
>>> import statvfs, os
>>> os.statvfs('/')[s... | [
{
"code": null,
"e": 1338,
"s": 1062,
"text": "On some platforms, the maximum filename length varies according to the location on the disk. If you run UNIX with different filesystems mounted in various locations on your directory tree, you might see the following values for the maximum filename leng... |
SciPy - CSGraph | CSGraph stands for Compressed Sparse Graph, which focuses on Fast graph algorithms based on sparse matrix representations.
To begin with, let us understand what a sparse graph is and how it helps in graph representations.
A graph is just a collection of nodes, which have links between them. Graphs can represent nearly ... | [
{
"code": null,
"e": 2010,
"s": 1887,
"text": "CSGraph stands for Compressed Sparse Graph, which focuses on Fast graph algorithms based on sparse matrix representations."
},
{
"code": null,
"e": 2109,
"s": 2010,
"text": "To begin with, let us understand what a sparse graph is and... |
C++ program to find minimum vertex cover size of a graph using binary search | In this article, we will be discussing a program to find the minimum vertex cover size of a given graph using binary search.
Minimum vertex cover is a set of vertices of the given graph such that every edge in the graph is incident of either of the vertices in that set.
For example, take the graph
2 ---- 4 ---- 6
| ... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "In this article, we will be discussing a program to find the minimum vertex cover size of a given graph using binary search."
},
{
"code": null,
"e": 1333,
"s": 1187,
"text": "Minimum vertex cover is a set of vertices of the given gr... |
Flashback Queries - GeeksforGeeks | 24 May, 2020
Flashback Query allows users to see the view of past data, If in case some data or table is being deleted by the user, then the flashback query provides us an opportunity to view that data again and perform manipulations over it.
In flashback queries we have an concept of flash area, in flash area we store... | [
{
"code": null,
"e": 25549,
"s": 25521,
"text": "\n24 May, 2020"
},
{
"code": null,
"e": 25779,
"s": 25549,
"text": "Flashback Query allows users to see the view of past data, If in case some data or table is being deleted by the user, then the flashback query provides us an oppo... |
Detecting Disaster from Tweets (Classical ML and LSTM Approach) | by Mazi Boustani | Towards Data Science | In this article, I am going to apply two different approaches to the classification task. I will first apply a classic machine learning classification algorithm using Gradient Boosting Classifier. Later in the code, I will use the LSTM technique to train an RNN model. As we are dealing with tweets then this is an NLP t... | [
{
"code": null,
"e": 603,
"s": 171,
"text": "In this article, I am going to apply two different approaches to the classification task. I will first apply a classic machine learning classification algorithm using Gradient Boosting Classifier. Later in the code, I will use the LSTM technique to train ... |
Tryit Editor v3.6 - Show Node.js Command Prompt | var events = require('events');
var eventEmitter = new events.EventEmitter();
//Create an event handler:
var myEventHandler = function () {
console.log('I hear a scream!');
}
//Assign the eventhandler to an event: | [
{
"code": null,
"e": 32,
"s": 0,
"text": "var events = require('events');"
},
{
"code": null,
"e": 78,
"s": 32,
"text": "var eventEmitter = new events.EventEmitter();"
},
{
"code": null,
"e": 80,
"s": 78,
"text": ""
},
{
"code": null,
"e": 107,
... |
Why Final Class used in Java? | The final keyword is used with a class to create a final class. The final class cannot be inherited and so the final keyword is commonly used with a class to prevent inheritance.
A program that demonstrates a final class in Java is given as follows:
Live Demo
final class A {
private int a = 9;
public void printA... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "The final keyword is used with a class to create a final class. The final class cannot be inherited and so the final keyword is commonly used with a class to prevent inheritance."
},
{
"code": null,
"e": 1312,
"s": 1241,
"text": "A p... |
Project: Modeling & Predicting of Churning Customers (in R) | by Jarar Zaidi | Towards Data Science | Table of Contents
1. Introduction
2. Data Wrangling
3. Exploratory Data Analysis
4. Modeling
5. References
You have just been hired as a Data Scientist. A manager at the bank is disturbed with an alarming number of customers leaving their credit card services. You have been hired as a data scientist to predict who is g... | [
{
"code": null,
"e": 190,
"s": 172,
"text": "Table of Contents"
},
{
"code": null,
"e": 206,
"s": 190,
"text": "1. Introduction"
},
{
"code": null,
"e": 224,
"s": 206,
"text": "2. Data Wrangling"
},
{
"code": null,
"e": 253,
"s": 224,
"text... |
How to get programmatically android serial number? | This example demonstrate about How to get programmatically android serial number.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "This example demonstrate about How to get programmatically android serial number."
},
{
"code": null,
"e": 1273,
"s": 1144,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta... |
Search in a row-column sorted Matrix | Practice | GeeksforGeeks | Given a matrix of size n x m, where every row and column is sorted in increasing order, and a number x. Find whether element x is present in the matrix or not.
Example 1:
Input:
n = 3, m = 3, x = 62
matrix[][] = {{ 3, 30, 38},
{36, 43, 60},
{40, 51, 69}}
Output: 0
Explanation:
62 is not pre... | [
{
"code": null,
"e": 410,
"s": 238,
"text": "Given a matrix of size n x m, where every row and column is sorted in increasing order, and a number x. Find whether element x is present in the matrix or not.\n\nExample 1:"
},
{
"code": null,
"e": 596,
"s": 410,
"text": "Input:\nn = ... |
ReactJS - Routing | In web application, Routing is a process of binding a web URL to a specific resource in the web application. In React, it is binding an URL to a component. React does not support routing natively as it is basically an user interface library. React community provides many third party component to handle routing in the R... | [
{
"code": null,
"e": 2450,
"s": 2033,
"text": "In web application, Routing is a process of binding a web URL to a specific resource in the web application. In React, it is binding an URL to a component. React does not support routing natively as it is basically an user interface library. React commu... |
Decision Tree Classifiers in Julia - GeeksforGeeks | 01 Nov, 2020
In statistics in Julia, classification is the problem of identifying to which of a set of categories (sub-populations) a new observation belongs, on the basis of a training set of data containing observations (or instances) whose category membership is known.
In the terminology of machine learning, classif... | [
{
"code": null,
"e": 24544,
"s": 24516,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 24804,
"s": 24544,
"text": "In statistics in Julia, classification is the problem of identifying to which of a set of categories (sub-populations) a new observation belongs, on the basis of a... |
How to use HTML5 localStorage and sessionStorage? | HTML5 introduced two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome the following drawbacks.
Cookies are included with every HTTP request, thereby slowing down your web application by transmitting the same data.
Cookies are limited to about 4 KB of data. Not ... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "HTML5 introduced two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome the following drawbacks."
},
{
"code": null,
"e": 1335,
"s": 1216,
"text": "Cookies are included with ev... |
How to Build a Simple Marketing Mix Model with Python | by Terence Shin | Towards Data Science | IntroductionWhat You’ll LearnWhat is a Marketing Mix Model?Walkthrough of the Marketing Mix Model
Introduction
What You’ll Learn
What is a Marketing Mix Model?
Walkthrough of the Marketing Mix Model
If you enjoy this, be sure to subscribe to never miss another article on data science guides, tricks and tips, life lesso... | [
{
"code": null,
"e": 270,
"s": 172,
"text": "IntroductionWhat You’ll LearnWhat is a Marketing Mix Model?Walkthrough of the Marketing Mix Model"
},
{
"code": null,
"e": 283,
"s": 270,
"text": "Introduction"
},
{
"code": null,
"e": 301,
"s": 283,
"text": "What Y... |
Get the location of an element in Java ArrayList | The location of an element in an ArrayList can be obtained using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurrence of the element that is specified. If the element is not available in the ArrayList, then this method returns -1.
A program that demonstrates this is given as f... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "The location of an element in an ArrayList can be obtained using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurrence of the element that is specified. If the element is not available in the ArrayList, then thi... |
How to merge many TSV files by common key using Python Pandas? - GeeksforGeeks | 23 Mar, 2022
For data analysis the most important thing is data and we need to prepare it before we can use it for analysis. Sometimes required data can be scattered in multiple files and we need to merge them. In this article, we are going to merge multiple TSV (Tab Separated Values) files with a common key. This can ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 24338,
"s": 23901,
"text": "For data analysis the most important thing is data and we need to prepare it before we can use it for analysis. Sometimes required data can be scattered in multipl... |
Software Analysis & Design Tools | Software analysis and design includes all activities, which help the transformation of requirement specification into implementation. Requirement specifications specify all functional and non-functional expectations from the software. These requirement specifications come in the shape of human readable and understanda... | [
{
"code": null,
"e": 2413,
"s": 2037,
"text": "Software analysis and design includes all activities, which help the transformation of requirement specification into implementation. Requirement specifications specify all functional and non-functional expectations from the software. These requirement... |
Program to check points are forming concave polygon or not in Python | Suppose we have outer points of a polygon in clockwise order. We have to check these points are forming a convex polygon or not. A polygon is said to be concave if any one of its interior angle is greater than 180°.
From this diagram it is clear that for each three consecutive points the interior angle is not more than... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "Suppose we have outer points of a polygon in clockwise order. We have to check these points are forming a convex polygon or not. A polygon is said to be concave if any one of its interior angle is greater than 180°."
},
{
"code": null,
"e": ... |
DateTime.Subtract() Method in C# | The DateTime.Subtract() method in C# is used to subtract the specified DateTime or span.
Following is the syntax −
public TimeSpan Subtract (DateTime value);
public DateTime Subtract (TimeSpan value);
Let us now see an example to implement the DateTime.Subtract() method −
using System;
public class Demo {
public sta... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "The DateTime.Subtract() method in C# is used to subtract the specified DateTime or span."
},
{
"code": null,
"e": 1177,
"s": 1151,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1263,
"s": 1177,
"text... |
How to make a multi-select dropdown using Angular 11/10 ? - GeeksforGeeks | 07 Oct, 2021
In this article, we will learn to build the multiple selection drop-down menu in Angular. To accomplish this task, we require Angular 10 or the Angular 11 version. Sometimes we need to display dynamically fetched multi-selected data in a drop-down menu, for this, we will use the npm @ng-select/ng-select p... | [
{
"code": null,
"e": 25093,
"s": 25062,
"text": " \n07 Oct, 2021\n"
},
{
"code": null,
"e": 25704,
"s": 25093,
"text": "In this article, we will learn to build the multiple selection drop-down menu in Angular. To accomplish this task, we require Angular 10 or the Angular 11 versi... |
GATE | GATE-CS-2014-(Set-1) | Question 65 - GeeksforGeeks | 28 Jun, 2021
A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of numbers with sum equal to n. For example, (1,1,2) is a 4-pennant. The set of all possible 1-pennants is {(1)}, the set of all possible 2-pennants is {(2), (1,1)} and the set of all 3-pennants is {(2,1), (1,1,1), (1,... | [
{
"code": null,
"e": 24075,
"s": 24047,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24537,
"s": 24075,
"text": "A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of numbers with sum equal to n. For example, (1,1,2) is a 4-pennant. The s... |
Outlier Detection with Hampel Filter | by Eryk Lewinson | Towards Data Science | Recently I stumbled upon a new (to me) outlier detection algorithm — the Hampel filter. In this short article, I would like to describe how it works and how to use it in practice. To the best of my knowledge, there is no Python library containing this algorithm, so we will implement it from scratch using two different ... | [
{
"code": null,
"e": 605,
"s": 172,
"text": "Recently I stumbled upon a new (to me) outlier detection algorithm — the Hampel filter. In this short article, I would like to describe how it works and how to use it in practice. To the best of my knowledge, there is no Python library containing this alg... |
MySQL date column auto fill with current date? | You can use now() with default auto fill and current date and time for this. Later, you can extract the date part using date() function.
Case 1:
The syntax is as follows:
yourDateColumnName date default ‘yourDateValue’;
Case 2:
The syntax is as follows:
yourDateColumnName datetime default now();
To understand the above... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "You can use now() with default auto fill and current date and time for this. Later, you can extract the date part using date() function."
},
{
"code": null,
"e": 1207,
"s": 1199,
"text": "Case 1:"
},
{
"code": null,
"e": ... |
How can we implement a timer thread in Java? | The Timer class schedules a task to run at a given time once or repeatedly. It can also run in the background as a daemon thread. To associate Timer with a daemon thread, there is a constructor with a boolean value. The Timer schedules a task with fixed delay as well as a fixed rate. In a fixed delay, if any execution ... | [
{
"code": null,
"e": 1873,
"s": 1062,
"text": "The Timer class schedules a task to run at a given time once or repeatedly. It can also run in the background as a daemon thread. To associate Timer with a daemon thread, there is a constructor with a boolean value. The Timer schedules a task with fixed... |
Forgetting in Deep Learning. Team member: Qiang Fei, Yingsi Jian... | by Mingyue Wei | Towards Data Science | Authors: Qiang Fei, Yingsi Jian, Mingyue Wei, Shuyuan Xiao
You may also checkout the contents through our project poster and video.
Disclaimer: The views expressed in this blog are those of the authors and are not endorsed by Harvard or Google.
Neural network models suffer from the phenomenon of catastrophic forgetting... | [
{
"code": null,
"e": 231,
"s": 172,
"text": "Authors: Qiang Fei, Yingsi Jian, Mingyue Wei, Shuyuan Xiao"
},
{
"code": null,
"e": 304,
"s": 231,
"text": "You may also checkout the contents through our project poster and video."
},
{
"code": null,
"e": 417,
"s": 304... |
Add a horizontal rule in HTML | The HTML <hr> tag is the horizontal rule tag, used for creating a horizontal line. The HTML <hr> tag supports following additional attributes −
You can try to run the following code to add a horizontal rule in HTML −
<!DOCTYPE html>
<html>
<head>
<title>HTML hr Tag</title>
</head>
<body>
<p>This te... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "The HTML <hr> tag is the horizontal rule tag, used for creating a horizontal line. The HTML <hr> tag supports following additional attributes −"
},
{
"code": null,
"e": 1279,
"s": 1206,
"text": "You can try to run the following code ... |
C# Program to Create a Thread Pool | For a thread pool, create more than two functions and queue methods for execution.
Firstly, create a method like −
public void one(object o) {
for (int i = 0; i <= 3; i++) {
Console.WriteLine("One executed");
}
}
In the same way, create more methods and then use ThreadPool.QueueUserWorkItem to queue the met... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "For a thread pool, create more than two functions and queue methods for execution."
},
{
"code": null,
"e": 1177,
"s": 1145,
"text": "Firstly, create a method like −"
},
{
"code": null,
"e": 1287,
"s": 1177,
"text... |
AWS - SAM Serverless Function Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Here we will see how to define the sam server... | [
{
"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,
... |
Java Cryptography - KeyPairGenerator | Java provides the KeyPairGenerator class. This class is used to generate pairs of public and private keys. To generate keys using the KeyPairGenerator class, follow the steps given below.
The KeyPairGenerator class provides getInstance() method which accepts a String variable representing the required key-generating al... | [
{
"code": null,
"e": 2241,
"s": 2053,
"text": "Java provides the KeyPairGenerator class. This class is used to generate pairs of public and private keys. To generate keys using the KeyPairGenerator class, follow the steps given below."
},
{
"code": null,
"e": 2440,
"s": 2241,
"te... |
Apex - SOQL For Loop | This type of for loop is used when we do not want to create the List and directly iterate over the returned set of records of the SOQL query. We will study more about the SOQL query in subsequent chapters. For now, just remember that it returns the list of records and field as given in the query.
for (variable : [soql_... | [
{
"code": null,
"e": 2350,
"s": 2052,
"text": "This type of for loop is used when we do not want to create the List and directly iterate over the returned set of records of the SOQL query. We will study more about the SOQL query in subsequent chapters. For now, just remember that it returns the list... |
Read all Files in Directory using R | 06 Jun, 2021
To list all files in a directory in R programming language we use list.files(). This function produces a list containing the names of files in the named directory. It returns a character vector containing the names of the files in the specified directories. If no files are present in the directory, it retu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 433,
"s": 54,
"text": "To list all files in a directory in R programming language we use list.files(). This function produces a list containing the names of files in the named directory. It returns... |
ROT13 cipher | 27 Jan, 2022
ROT13 cipher(read as – “rotate by 13 places”) is a special case of the Ceaser cipher in which the shift is always 13. So every letter is shifted 13 places to encrypt or to decrypt the message.
I You must think that it is just another caesar cipher so what’s different this time? Well the difference is in i... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 247,
"s": 53,
"text": "ROT13 cipher(read as – “rotate by 13 places”) is a special case of the Ceaser cipher in which the shift is always 13. So every letter is shifted 13 places to encrypt or to de... |
vector::front() and vector::back() in C++ STL | 23 Jun, 2022
Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container.
This function can be used to fetch the first element of a vector container.Syntax :
vectorname.front()
Parameters :
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 242,
"s": 53,
"text": "Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by t... |
How to rename multiple columns in PySpark dataframe ? | 04 Jul, 2021
In this article, we are going to see how to rename multiple columns in PySpark Dataframe.
Before starting let’s create a dataframe using pyspark:
Python3
# importing moduleimport pysparkfrom pyspark.sql.functions import col # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSessi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "In this article, we are going to see how to rename multiple columns in PySpark Dataframe."
},
{
"code": null,
"e": 174,
"s": 118,
"text": "Before starting ... |
Print prime numbers from 1 to N in reverse order | 12 May, 2021
Given a number N, print all prime number smaller than or equal to N in reverse order . For example, if N is 9, the output should be “7, 5, 3, 2”. Examples:
Input : N = 5
Output : 5 3 2
Input : N = 20
Output : 19 17 13 11 7 5 3 2
A simple solution is to traverse from N to 1. For every number, check if... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 210,
"s": 52,
"text": "Given a number N, print all prime number smaller than or equal to N in reverse order . For example, if N is 9, the output should be “7, 5, 3, 2”. Examples: "
},
{
"c... |
Java - exp() Method | The method returns the base of the natural logarithms, e, to the power of the argument.
double exp(double d)
Here is the detail of parameters −
d − Any primitive data type.
d − Any primitive data type.
This method returns the base of the natural logarithms, e, to the power of the argument.
This method returns the base... | [
{
"code": null,
"e": 2599,
"s": 2511,
"text": "The method returns the base of the natural logarithms, e, to the power of the argument."
},
{
"code": null,
"e": 2621,
"s": 2599,
"text": "double exp(double d)\n"
},
{
"code": null,
"e": 2656,
"s": 2621,
"text": "... |
MySQL - INSERT Statement | You can add new rows to an existing table of MySQL using the INSERT statement. In this, you need to specify the name of the table, column names, and values (in the same order as column names).
Following is the syntax of the INSERT statement of MySQL.
INSERT INTO table_name (column1, column2, column3,...columnN)
VALUES ... | [
{
"code": null,
"e": 2634,
"s": 2441,
"text": "You can add new rows to an existing table of MySQL using the INSERT statement. In this, you need to specify the name of the table, column names, and values (in the same order as column names)."
},
{
"code": null,
"e": 2692,
"s": 2634,
... |
How to scroll down followers popup in Instagram ? | 26 Mar, 2021
Here, in this article, we are going to discuss How to scroll down followers popup on Instagram Using Python. With the selenium, we will automate our browsers and performs automation on Instagram’s Social Website. Before going to practical implementation, we need to install the Selenium Library using the pi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 346,
"s": 28,
"text": "Here, in this article, we are going to discuss How to scroll down followers popup on Instagram Using Python. With the selenium, we will automate our browsers and performs auto... |
Word Ladder – Set 2 ( Bi-directional BFS ) | 01 Dec, 2021
Given a dictionary, and two words start and target (both of the same length). Find length of the smallest chain from start to target if it exists, such that adjacent words in the chain only differ by one character and each word in the chain is a valid word i.e., it exists in the dictionary. It may be assum... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 476,
"s": 54,
"text": "Given a dictionary, and two words start and target (both of the same length). Find length of the smallest chain from start to target if it exists, such that adjacent words in... |
Database - First Normal Form (1NF) | The First normal form (1NF) sets basic rules for an organized database −
Define the data items required, because they become the columns in a table.
Define the data items required, because they become the columns in a table.
Place the related data items in a table.
Place the related data items in a table.
Ensure that t... | [
{
"code": null,
"e": 2660,
"s": 2587,
"text": "The First normal form (1NF) sets basic rules for an organized database −"
},
{
"code": null,
"e": 2736,
"s": 2660,
"text": "Define the data items required, because they become the columns in a table."
},
{
"code": null,
"... |
Node.js async.queue() Method | 11 Jun, 2021
The async module is is designed for working with asynchronous JavaScript in NodeJS. The async.queue returns a queue object which is capable of concurrent processing i.e processing multiple items at a single time.
How to use async.queue?
Step 1: Create a package.json file. A package.json file is created by ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 241,
"s": 28,
"text": "The async module is is designed for working with asynchronous JavaScript in NodeJS. The async.queue returns a queue object which is capable of concurrent processing i.e proces... |
Generate integer from 1 to 7 with equal probability | 21 Oct, 2021
Given a function foo() that returns integers from 1 to 5 with equal probability, write a function that returns integers from 1 to 7 with equal probability using foo() only. Minimize the number of calls to foo() method. Also, use of any other library function is not allowed and no floating point arithmetic ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 791,
"s": 52,
"text": "Given a function foo() that returns integers from 1 to 5 with equal probability, write a function that returns integers from 1 to 7 with equal probability using foo() only. M... |
Python | Pandas Series.str.count() | 24 Sep, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas str.count() method is used to count occurrence of a string or regex pattern in each st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Sep, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes imp... |
Themes and Color Palettes in KivyMD | 06 Jun, 2021
KivyMD is an extension of the Kivy framework. KivyMD is a collection of Material Design widgets for use with Kivy, a GUI framework for making mobile applications. It is similar to the Kivy framework but provides a more attractive GUI. In this article, we are going to see themes and color palettes in KivyMD... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 337,
"s": 28,
"text": "KivyMD is an extension of the Kivy framework. KivyMD is a collection of Material Design widgets for use with Kivy, a GUI framework for making mobile applications. It is simila... |
How to capture out of memory exception in C#? | The System.OutOfMemoryException occurs when the CLR fail in allocating enough memory that is needed.
System.OutOfMemoryException is inherited from the System.SystemException class.
Set the strings −
string StudentName = "Tom";
string StudentSubject = "Maths";
Now you need to initialize with allocated Capacity that is t... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "The System.OutOfMemoryException occurs when the CLR fail in allocating enough memory that is needed."
},
{
"code": null,
"e": 1243,
"s": 1163,
"text": "System.OutOfMemoryException is inherited from the System.SystemException class."
... |
8 Ways to Filter Pandas Dataframes | by Soner Yıldırım | Towards Data Science | Pandas is a popular data analysis and manipulation library for Python. The core data structure of Pandas is dataframe which stores data in tabular form with labelled rows and columns.
A common operation in data analysis is to filter values based on a condition or multiple conditions. Pandas provides a variety of ways t... | [
{
"code": null,
"e": 355,
"s": 171,
"text": "Pandas is a popular data analysis and manipulation library for Python. The core data structure of Pandas is dataframe which stores data in tabular form with labelled rows and columns."
},
{
"code": null,
"e": 596,
"s": 355,
"text": "A ... |
Create a transparent box with CSS | To create a transparent box with CSS, you can try to run the following code
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div {
background-color: #808000;
padding: 20px;
}
div.myopacity {
opacity: 0.4;
filter: alpha(opacity=80);
... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To create a transparent box with CSS, you can try to run the following code"
},
{
"code": null,
"e": 1148,
"s": 1138,
"text": "Live Demo"
},
{
"code": null,
"e": 1640,
"s": 1148,
"text": "<!DOCTYPE html>\n<html>\n... |
F# - Nested Loops | F# programming language allows to use one loop inside another loop.
The syntax for a nested for loop statement could be as follows −
for var1 = start-expr1 to end-expr1 do
for var2 = start-expr2 to end-expr2 do
... // loop body
The syntax for a nested while loop statement could be as follows −
while test-expr... | [
{
"code": null,
"e": 2229,
"s": 2161,
"text": "F# programming language allows to use one loop inside another loop."
},
{
"code": null,
"e": 2294,
"s": 2229,
"text": "The syntax for a nested for loop statement could be as follows −"
},
{
"code": null,
"e": 2399,
"s... |
How to check for duplicates in MySQL table over multiple columns? | To check for duplicates in MySQL, you can use group by having clause. The syntax is as follows.
select yourColumnName1,yourColumnName2,......N,count(*) as anyVariableName from
yourTableName
group by yourColumnName1,yourColumnName2
having count(*) > 1;
To understand the above syntax, let us create a table. The query to ... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "To check for duplicates in MySQL, you can use group by having clause. The syntax is as follows."
},
{
"code": null,
"e": 1314,
"s": 1158,
"text": "select yourColumnName1,yourColumnName2,......N,count(*) as anyVariableName from\nyourT... |
How to rotate a video in OpenCV using C++? | Rotating a video is similar to rotate an image. The only difference is instead of load a still picture into an image matrix, we have loaded a video or take video stream from the camera.
Here, we are not loading the video but taking a video using the camera. If you want to use a video file, just put the address of the v... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "Rotating a video is similar to rotate an image. The only difference is instead of load a still picture into an image matrix, we have loaded a video or take video stream from the camera."
},
{
"code": null,
"e": 1402,
"s": 1248,
"text... |
How to make a canvas in Java Swing? | To make a canvas with Java Swing, use the Graphics2D class −
public void paint(Graphics g) {
Graphics2D graphic2d = (Graphics2D) g;
graphic2d.setColor(Color.BLUE);
graphic2d.fillRect(100, 50, 60, 80);
}
Above, we have created a rectangle and also added color to it.
The following is an example to make a canvas ... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To make a canvas with Java Swing, use the Graphics2D class −"
},
{
"code": null,
"e": 1274,
"s": 1123,
"text": "public void paint(Graphics g) {\n Graphics2D graphic2d = (Graphics2D) g;\n graphic2d.setColor(Color.BLUE);\n graphi... |
How do threads communicate with each other in Java? | Inter-thread communication involves the communication of threads with each other. The three methods that are used to implement inter-thread communication in Java
This method causes the current thread to release the lock. This is done until a specific amount of time has passed or another thread calls the notify() or not... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "Inter-thread communication involves the communication of threads with each other. The three methods that are used to implement inter-thread communication in Java"
},
{
"code": null,
"e": 1415,
"s": 1224,
"text": "This method causes t... |
How to create a simple http server listening at port 3000 to serve video ? - GeeksforGeeks | 22 Oct, 2021
We can serve video to the browser/front end using nodeJS with the help of “express” and the in-built nodeJS file system “fs“. Here we would use the HTML video tag to view the video on the webpage. We would use express for routing purposes. We would send the video bytes by creating a read stream and piping ... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 24893,
"s": 24531,
"text": "We can serve video to the browser/front end using nodeJS with the help of “express” and the in-built nodeJS file system “fs“. Here we would use the HTML video tag ... |
Find all angles of a given triangle - GeeksforGeeks | 17 Feb, 2022
Given coordinates of all three vertices of the triangle in the 2D plane, the task is to find all three angles.Example:
Input : A = (0, 0),
B = (0, 1),
C = (1, 0)
Output : 90, 45, 45
To solve this problem we use below Law of cosines.
c^2 = a^2 + b^2 - 2(a)(b)(cos beta)
After re-arr... | [
{
"code": null,
"e": 25172,
"s": 25144,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 25293,
"s": 25172,
"text": "Given coordinates of all three vertices of the triangle in the 2D plane, the task is to find all three angles.Example: "
},
{
"code": null,
"e": 25374... |
Appending suffix to numbers in JavaScript | We are required to write a JavaScript function that takes in a number, num, as the first and the
only argument.
The task of our function is to append ‘st’, ‘nd’, ‘rd’, ‘th’ to the number according to the following
rules:
st is used with numbers ending in 1 (e.g. 1st, pronounced first)
nd is used with numbers ending in ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number, num, as the first and the\nonly argument."
},
{
"code": null,
"e": 1283,
"s": 1174,
"text": "The task of our function is to append ‘st’, ‘nd’, ‘rd’, ‘th’ to the n... |
Using QuickUMLS for biomedical named entity recognition | Towards Data Science | At the outset of any new R&D project, I look to match the most appropriate solution to the problem at hand. While there are some very exciting large models available, one of my biggest concerns is bringing the solution into production without compromising on the outcomes I’d like to support. A question I had recently w... | [
{
"code": null,
"e": 717,
"s": 172,
"text": "At the outset of any new R&D project, I look to match the most appropriate solution to the problem at hand. While there are some very exciting large models available, one of my biggest concerns is bringing the solution into production without compromising... |
Scatter plot and Color mapping in Python | We can create a scatter plot using the scatter() method and we can set the color for every data point.
Create random values (for x and y) in a given shape, using np.random.rand() method.
Create random values (for x and y) in a given shape, using np.random.rand() method.
Create a scatter plot of *y* vs. *x* with varying... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "We can create a scatter plot using the scatter() method and we can set the color for every data point."
},
{
"code": null,
"e": 1249,
"s": 1165,
"text": "Create random values (for x and y) in a given shape, using np.random.rand() met... |
Difference between Template and TemplateURL in AngularJS - GeeksforGeeks | 08 Oct, 2021
As we know that, the @Component decorator is a function that accepts one object and that object has many properties. The major two important properties are template & template URL.
The are various Method to create Templates in Angular
The template is a part of a component that is used for the user interfac... | [
{
"code": null,
"e": 25119,
"s": 25091,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 25300,
"s": 25119,
"text": "As we know that, the @Component decorator is a function that accepts one object and that object has many properties. The major two important properties are templat... |
How to add Video Player in NextJS ? | 14 Dec, 2021
In this article, we are going to learn how we can add Video Player in NextJs. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac.
Approach: To add our Video Player we are going to use the react-player package. The ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 276,
"s": 53,
"text": "In this article, we are going to learn how we can add Video Player in NextJs. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for di... |
What are the differences between Widening Casting (Implicit) and Narrowing Casting (Explicit) in Java? | A Type casting in Java is used to convert objects or variables of one type into another. When we are converting or assigning one data type to another they might not compatible. If it is suitable then it will do smoothly otherwise chances of data loss.
Java Type Casting is classified into two types.
Widening Casting (Im... | [
{
"code": null,
"e": 1439,
"s": 1187,
"text": "A Type casting in Java is used to convert objects or variables of one type into another. When we are converting or assigning one data type to another they might not compatible. If it is suitable then it will do smoothly otherwise chances of data loss."
... |
Difference between Indirect and Implied Addressing Modes | 04 Jul, 2022
1. Indirect Addressing Mode: This is the mode of addressing where the instruction contains the address of the location where the target address is stored. So in this way, it is Indirectly storing the address of the target location in another memory location. So it is called Indirect Addressing mode.
Prere... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 330,
"s": 28,
"text": "1. Indirect Addressing Mode: This is the mode of addressing where the instruction contains the address of the location where the target address is stored. So in this way, it i... |
fork() in C | 09 Dec, 2019
Fork system call is used for creating a new process, which is called child process, which runs concurrently with the process that makes the fork() call (parent process). After a new child process is created, both processes will execute the next instruction following the fork() system call. A child process ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Dec, 2019"
},
{
"code": null,
"e": 465,
"s": 54,
"text": "Fork system call is used for creating a new process, which is called child process, which runs concurrently with the process that makes the fork() call (parent process). Afte... |
Array Type Manipulation in C++ | The array is a data structure in c++ that stored multiple data elements of the same data type in continuous memory locations.
In c++ programming language, there are inbuilt functions to manipulate array types. Some functions can also be applied to multidimensional arrays. The array header file contains functions to man... | [
{
"code": null,
"e": 1313,
"s": 1187,
"text": "The array is a data structure in c++ that stored multiple data elements of the same data type in continuous memory locations."
},
{
"code": null,
"e": 1551,
"s": 1313,
"text": "In c++ programming language, there are inbuilt functions... |
Number of digits to be removed to make a number divisible by 3 | 08 Jun, 2022
Given a very large number num (1 <= num <= 10^1000), print the number of digits that needs to be removed to make the number exactly divisible by 3. If it is not possible then print -1.
Examples :
Input: num = "1234"
Output: 1
Explanation: we need to remove one
digit that is 1 or 4, to make the
number div... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 239,
"s": 54,
"text": "Given a very large number num (1 <= num <= 10^1000), print the number of digits that needs to be removed to make the number exactly divisible by 3. If it is not possible then... |
Convert String or String Array to HashMap In Java | 08 Dec, 2020
Considering a string object that contains the student name and roll number separated by a comma, and each student contains the name and roll number separated by a colon. Now need is to convert the String to a Map object so that each student roll number becomes the key of the HashMap, and the name becomes t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 368,
"s": 28,
"text": "Considering a string object that contains the student name and roll number separated by a comma, and each student contains the name and roll number separated by a colon. Now n... |
Matplotlib.pyplot.axvline() in Python | 21 Apr, 2020
Matplotlib is a plotting library for creating static, animated, and interactive visualizations in Python. Matplotlib can be used in Python scripts, the Python and IPython shell, web application servers, and various graphical user interface toolkits like Tkinter, awxPython, etc.
Note: For more information, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "Matplotlib is a plotting library for creating static, animated, and interactive visualizations in Python. Matplotlib can be used in Python scripts, the Python and IPython shel... |
How to print string with double quotes in Golang? | 04 May, 2020
Whenever the user wants to double-quote a string, he can’t simply write the string within double quotes inside the fmt.Printf() command. This prints only the text written inside those quotes. To print the string along with quotes, he can use various methods including certain escape characters. There are di... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 396,
"s": 28,
"text": "Whenever the user wants to double-quote a string, he can’t simply write the string within double quotes inside the fmt.Printf() command. This prints only the text written insi... |
Job Sequencing Problem – Loss Minimization | 08 Jun, 2022
We are given N jobs numbered 1 to N. For each activity, let Ti denotes the number of days required to complete the job. For each day of delay before starting to work for job i, a loss of Li is incurred. We are required to find a sequence to complete the jobs so that overall loss is minimized. We can only w... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 543,
"s": 54,
"text": "We are given N jobs numbered 1 to N. For each activity, let Ti denotes the number of days required to complete the job. For each day of delay before starting to work for job ... |
HTML | download Attribute | 29 Apr, 2022
The HTML download Attribute is used to download the element when the user clicks on the hyperlink. It is used only when the href attribute is set. The downloaded file name will be the value of the attribute. The value of the attribute will be the name of the downloaded file. If the value is removed then or... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 434,
"s": 54,
"text": "The HTML download Attribute is used to download the element when the user clicks on the hyperlink. It is used only when the href attribute is set. The downloaded file name wi... |
Android - Camera | These are the following two ways, in which you can use camera in your application
Using existing android camera application in our application
Using existing android camera application in our application
Directly using Camera API provided by android in our application
Directly using Camera API provided by android in ou... | [
{
"code": null,
"e": 3823,
"s": 3741,
"text": "These are the following two ways, in which you can use camera in your application"
},
{
"code": null,
"e": 3884,
"s": 3823,
"text": "Using existing android camera application in our application"
},
{
"code": null,
"e": 39... |
Sorted merge in one array | 21 Jun, 2021
Given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Merge B into A in sorted order.Examples:
Input : a[] = {10, 12, 13, 14, 18, NA, NA, NA, NA, NA}
b[] = {16, 17, 19, 20, 22};;
Output : a[] = {10, 12, 13, 14, 16, 17, 18, 19, 20, 22}
One way is to merge t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 187,
"s": 54,
"text": "Given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Merge B into A in sorted order.Examples: "
},
{
"code": null,
"e": 338,... |
Find the parent of a node in the given binary tree | 13 Aug, 2021
Given a tree and a node, the task is to find the parent of the given node in the tree. Print -1 if the given node is the root node.Examples:
Input: Node = 3
1
/ \
2 3
/ \
4 5
Output: 1
Input: Node = 1
1
/ \
2 3
/ \
4 5
/
6
Output: -1
Appr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 196,
"s": 54,
"text": "Given a tree and a node, the task is to find the parent of the given node in the tree. Print -1 if the given node is the root node.Examples: "
},
{
"code": null,
... |
Tic Tac Toe GUI In Python using PyGame | 10 May, 2020
This article will guide you and give you a basic idea of designing a game Tic Tac Toe using pygame library of Python. Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 361,
"s": 52,
"text": "This article will guide you and give you a basic idea of designing a game Tic Tac Toe using pygame library of Python. Pygame is a cross-platform set of Python modules designe... |
Restoring and Building with MSBuild | In this chapter, we will discuss how to restore and build your MSBuild (*.csproj) file using the command line utility. To see what commands are available in .NET Core 2.0 preview 1, let us run the following command.
dotnet help
You will see all the commands like new, restore, build, etc.
Following is the default impl... | [
{
"code": null,
"e": 2736,
"s": 2520,
"text": "In this chapter, we will discuss how to restore and build your MSBuild (*.csproj) file using the command line utility. To see what commands are available in .NET Core 2.0 preview 1, let us run the following command."
},
{
"code": null,
"e": ... |
HTML | Viewport meta tag for Responsive Web Design | 24 Dec, 2021
What is Viewport?A Browser’s viewport is the area of web page in which the content is visible to the user. The viewport does not have the same size, it varies with the variation in screen size of the devices on which the website is visible. For a laptop, the viewport has a larger size as compared to a smar... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 377,
"s": 52,
"text": "What is Viewport?A Browser’s viewport is the area of web page in which the content is visible to the user. The viewport does not have the same size, it varies with the variat... |
How to change the size of Form controls in Bootstrap ? | 25 Nov, 2021
Bootstrap allows to change the size of form controls using .form-control classes. For default size .form-control is used, for smaller size we can use .form-control class along with .form-control-sm and for larger size we can use .form-control class along with .form-control-lg.
For default size:
class="for... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "Bootstrap allows to change the size of form controls using .form-control classes. For default size .form-control is used, for smaller size we can use .form-control class along... |
Python program to create dynamically named variables from user input - GeeksforGeeks | 19 May, 2021
Given a string input, the task is to write a Python program to create a variable from that input (as a variable name) and to assign it some value. Below are the methods to create dynamically named variables from user input:
Method 1: Using globals() method.
Python3
# Dynamic_Variable_Name can be# anything... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 25762,
"s": 25537,
"text": "Given a string input, the task is to write a Python program to create a variable from that input (as a variable name) and to assign it some value. Below are the me... |
Cowsay in Nodejs using Requests library - GeeksforGeeks | 14 Aug, 2021
Prerequisites:
Basic knowledge of NodeJS and JavaScript. Also, you should have NodeJS installed on your machine.
Using npm. A good resource. npm will get installed with NodeJS itself.
Basic knowledge of command line or terminal.
Essentially, we are going to use the requests library to make an API call to f... | [
{
"code": null,
"e": 24925,
"s": 24897,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 24940,
"s": 24925,
"text": "Prerequisites:"
},
{
"code": null,
"e": 25038,
"s": 24940,
"text": "Basic knowledge of NodeJS and JavaScript. Also, you should have NodeJS inst... |
Python - Filter unequal elements of two lists corresponding same index - GeeksforGeeks | 27 Dec, 2019
Sometimes, while working with Python data, we can have a problem in which we require to extract the values across multiple lists which are unequal and have similar index. This kind of problem can come in many domains. Let’s discuss certain ways in which this problem can be solved.
Method #1 : Using loop + ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n27 Dec, 2019"
},
{
"code": null,
"e": 25819,
"s": 25537,
"text": "Sometimes, while working with Python data, we can have a problem in which we require to extract the values across multiple lists which are unequal and have similar... |
Create Password Protected Zip File in Java - GeeksforGeeks | 04 Apr, 2022
Primarily, java does not have any function or package that will create a password-protected zip file without using some native codes. Java has some useful library which is good but they use some native codes to perform their task that makes their usage platform dependent to some extent. Whereas in the zip4... | [
{
"code": null,
"e": 25251,
"s": 25223,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 25711,
"s": 25251,
"text": "Primarily, java does not have any function or package that will create a password-protected zip file without using some native codes. Java has some useful library ... |
Node.js v8.getHeapStatistics() Method - GeeksforGeeks | 28 Jul, 2020
The v8.getHeapStatistics() method is an inbuilt application programming interface of the v8 module which is used to get statistics about heap derived from the v8 version.
Syntax:
v8.getHeapStatistics();
Parameters: This method does not have any parameters.
Return Value: This method returns an object that c... | [
{
"code": null,
"e": 38501,
"s": 38473,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 38672,
"s": 38501,
"text": "The v8.getHeapStatistics() method is an inbuilt application programming interface of the v8 module which is used to get statistics about heap derived from the v8 v... |
Add array elements in Ruby - GeeksforGeeks | 20 Jul, 2021
In this article, we will learn how to add elements to an array in Ruby.Method #1: Using Index
Ruby
# Ruby program to add elements # in array # creating string using []str = ["GFG", "G4G", "Sudo", "Geeks"] str[4] = "new_ele";print str # in we skip the elementsstr[6] = "test";
Output:
["GFG", "G4G", "Su... | [
{
"code": null,
"e": 24833,
"s": 24805,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 24928,
"s": 24833,
"text": "In this article, we will learn how to add elements to an array in Ruby.Method #1: Using Index "
},
{
"code": null,
"e": 24933,
"s": 24928,
"tex... |
HeapSort - GeeksforGeeks | 17 Jan, 2022
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the minimum element and place the minimum element at the beginning. We repeat the same process for the remaining elements.
What is Binary Heap? Let us first define a Co... | [
{
"code": null,
"e": 39005,
"s": 38977,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 39267,
"s": 39005,
"text": "Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the minimum element and ... |
Python Tkinter - ScrolledText Widget - GeeksforGeeks | 21 Apr, 2020
Tkinter is a built-in standard python library. With the help of Tkinter, many GUI applications can be created easily. There are various types of widgets available in Tkinter such as button, frame, label, menu, scrolledtext, canvas and many more. A widget is an element that provides various controls. Scroll... | [
{
"code": null,
"e": 42675,
"s": 42647,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 43327,
"s": 42675,
"text": "Tkinter is a built-in standard python library. With the help of Tkinter, many GUI applications can be created easily. There are various types of widgets available ... |
mailx in Linux - GeeksforGeeks | 24 Jul, 2020
Linux has an inbuilt Mail User Agent program called mailx. As the name suggests, it is a console application that is used for sending and receiving emails. The mailx utility is an enhanced version of the mail command. Along with the functionality provided by the original mail command, it provides extra fea... | [
{
"code": null,
"e": 25677,
"s": 25649,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 26120,
"s": 25677,
"text": "Linux has an inbuilt Mail User Agent program called mailx. As the name suggests, it is a console application that is used for sending and receiving emails. The mai... |
Python - Draw Octagonal shape Using Turtle Graphics - GeeksforGeeks | 19 Oct, 2020
In this article, we will learn how to Make an Octagon using Turtle Graphics in Python. For that lets first know what is Turtle Graphics.
backward(length): moves the pen in the backward direction by x unit.
right(angle): rotate the pen in the clockwise direction by an angle x.
left(angle): rotate the pen in... | [
{
"code": null,
"e": 25863,
"s": 25835,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 26000,
"s": 25863,
"text": "In this article, we will learn how to Make an Octagon using Turtle Graphics in Python. For that lets first know what is Turtle Graphics."
},
{
"code": null... |
How to change the checkbox value using jQuery ? - GeeksforGeeks | 03 Aug, 2021
The Checkboxes are used to let a user select one or more options for a limited number of choices. The :checkbox selector selects input elements with type checkbox.Syntax:
$('#textboxID').val($("#checkboxID").is(':checked'));
In the above syntax, basically the return value of the checked or unchecked chec... | [
{
"code": null,
"e": 26898,
"s": 26870,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 27071,
"s": 26898,
"text": "The Checkboxes are used to let a user select one or more options for a limited number of choices. The :checkbox selector selects input elements with type checkbox.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.