title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python program to print even numbers in a list | 23 Jun, 2022
Given a list of numbers, write a Python program to print all even numbers in the given list.
Example:
Input: list1 = [2, 7, 5, 64, 14]
Output: [2, 64, 14]
Input: list2 = [12, 14, 95, 3]
Output: [12, 14]
Iterate each element in the list using for loop and check if num % 2 == 0. If the condition satisfies,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 145,
"s": 52,
"text": "Given a list of numbers, write a Python program to print all even numbers in the given list."
},
{
"code": null,
"e": 155,
"s": 145,
"text": "Example: "
... |
Ethical Hacking - Exploitation | Exploitation is a piece of programmed software or script which can allow hackers to take control over a system, exploiting its vulnerabilities. Hackers normally use vulnerability scanners like Nessus, Nexpose, OpenVAS, etc. to find these vulnerabilities.
Metasploit is a powerful tool to locate vulnerabilities in a syst... | [
{
"code": null,
"e": 2734,
"s": 2479,
"text": "Exploitation is a piece of programmed software or script which can allow hackers to take control over a system, exploiting its vulnerabilities. Hackers normally use vulnerability scanners like Nessus, Nexpose, OpenVAS, etc. to find these vulnerabilities... |
How to check whether a form or a control is valid or not in Angular 10 ? - GeeksforGeeks | 03 Jun, 2021
In this article, we are going to check whether a form is touched or not in Angular 10. The valid property is used to report that the control or the form is valid or not.
Syntax:
form.valid
Return Value:
boolean: the boolean value to check whether a form is valid or not.
NgModule: Module used by the valid ... | [
{
"code": null,
"e": 25175,
"s": 25144,
"text": " \n03 Jun, 2021\n"
},
{
"code": null,
"e": 25345,
"s": 25175,
"text": "In this article, we are going to check whether a form is touched or not in Angular 10. The valid property is used to report that the control or the form is vali... |
ReactJS Blueprint DateRangePicker Component - GeeksforGeeks | 09 Jul, 2021
BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. DateRangePicker Component helps the user to select a single range of days, and it shows two sequential month calendars. We can use th... | [
{
"code": null,
"e": 25410,
"s": 25382,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 25805,
"s": 25410,
"text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app... |
Missing characters to make a string Pangram - GeeksforGeeks | 10 Mar, 2022
Pangram is a sentence containing every letter in the English alphabet. Given a string, find all characters that are missing from the string, i.e., the characters that can make the string a Pangram. We need to print output in alphabetic order.
Examples:
Input : welcome to geeksforgeeks
Output : abdhijnpquv... | [
{
"code": null,
"e": 24683,
"s": 24655,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 24926,
"s": 24683,
"text": "Pangram is a sentence containing every letter in the English alphabet. Given a string, find all characters that are missing from the string, i.e., the characters t... |
divisibleBy() function over array in JavaScript | We are required to write a JavaScript function that takes in an array of numbers and a single number as two arguments.
Our function should filter the array to contain only those numbers that are divisible by the number provided as second argument and return the filtered array.
Following is the code −
Live Demo
const a... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in an array of numbers and a single number as two arguments."
},
{
"code": null,
"e": 1340,
"s": 1181,
"text": "Our function should filter the array to contain only those numb... |
Bootstrap | Tables | Set-2 - GeeksforGeeks | 15 Jul, 2021
Bootstrap provides us series of classes that can be used to apply various styling to tables such as changing the heading appearance, making the rows striped, adding or removing borders, making rows hoverable. Bootstrap also provides classes for making tables responsive.
Borderless table: To make the table... | [
{
"code": null,
"e": 28440,
"s": 28412,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 28712,
"s": 28440,
"text": "Bootstrap provides us series of classes that can be used to apply various styling to tables such as changing the heading appearance, making the rows striped, addin... |
Convert.ToInt16 Method in C# | Convert a specified value to a 16-bit signed integer using the Convert.ToInt16 method in C#.
We have a double variable with a value initialized to it.
double doubleNum = 3.456;
Now, let us convert it to Int16 i.e. short.
short shortNum;
shortNum = Convert.ToInt16(doubleNum);
Here is the complete example −
Live Demo
us... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Convert a specified value to a 16-bit signed integer using the Convert.ToInt16 method in C#."
},
{
"code": null,
"e": 1213,
"s": 1155,
"text": "We have a double variable with a value initialized to it."
},
{
"code": null,
... |
“MRMR” Explained Exactly How You Wished Someone Explained to You | by Samuele Mazzanti | Towards Data Science | MRMR (acronym for Maximum Relevance — Minimum Redundancy) is a feature selection algorithm that has gained new popularity after the pubblication — in 2019 — of this paper by Uber engineers:
The authors show how — thanks to MRMR — they achieved great results in automating feature selection in various marketing applicati... | [
{
"code": null,
"e": 237,
"s": 47,
"text": "MRMR (acronym for Maximum Relevance — Minimum Redundancy) is a feature selection algorithm that has gained new popularity after the pubblication — in 2019 — of this paper by Uber engineers:"
},
{
"code": null,
"e": 385,
"s": 237,
"text"... |
How to write your own header file in C?
| Here we will see how to create own header file using C. To make a header file, we have to create one file with a name, and extension should be (*.h). In that function there will be no main() function. In that file, we can put some variables, some functions etc.
To use that header file, it should be present at the same ... | [
{
"code": null,
"e": 1324,
"s": 1062,
"text": "Here we will see how to create own header file using C. To make a header file, we have to create one file with a name, and extension should be (*.h). In that function there will be no main() function. In that file, we can put some variables, some functi... |
CSS Margins and Padding - GeeksforGeeks | 05 Apr, 2022
In this article, we will learn about the CSS Margin & Padding properties of the Box Model & understand their implementation through the example.
CSS Margins: CSS margins are used to create space around the element. We can set the different sizes of margins for individual sides(top, right, bottom, left).
M... | [
{
"code": null,
"e": 28071,
"s": 28043,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 28217,
"s": 28071,
"text": "In this article, we will learn about the CSS Margin & Padding properties of the Box Model & understand their implementation through the example. "
},
{
"co... |
Activation Functions. So why do we need Activation functions... | by Dhaval Dholakia | Towards Data Science | Welcome to my first post! I am a Data Scientist and have been an active reader of Medium blogs. Now, I am planning to use Medium blog to document my journey in learning Deep Learning and share my experiences through the projects I have been working on. Hopefully, by sharing my views on the subjects I can also learn fro... | [
{
"code": null,
"e": 652,
"s": 172,
"text": "Welcome to my first post! I am a Data Scientist and have been an active reader of Medium blogs. Now, I am planning to use Medium blog to document my journey in learning Deep Learning and share my experiences through the projects I have been working on. Ho... |
Approximating Integrals using Numpy [ Riemann / Trapeze / Simpson’s / Adaptive /Monte Carlo Integration ] | by Jae Duk Seo | Towards Data Science | Approximating integrals is a very important task in computer science (even relating to neural networks). And today I wanted to implement different methods of approximating integrals.
Functions that we are going to Use
In total we are going to approximate the integral for four different functions
1. integral from -8 to ... | [
{
"code": null,
"e": 355,
"s": 172,
"text": "Approximating integrals is a very important task in computer science (even relating to neural networks). And today I wanted to implement different methods of approximating integrals."
},
{
"code": null,
"e": 390,
"s": 355,
"text": "Fun... |
How to use R in Google Colab | Towards Data Science | Colab, or Colaboratory is an interactive notebook provided by Google (primarily) for writing and running Python through a browser. We can perform data analysis, create models, evaluate these models in Colab. The processing is done on Google-owned servers in the cloud. We only need a browser and a fairly stable internet... | [
{
"code": null,
"e": 504,
"s": 171,
"text": "Colab, or Colaboratory is an interactive notebook provided by Google (primarily) for writing and running Python through a browser. We can perform data analysis, create models, evaluate these models in Colab. The processing is done on Google-owned servers ... |
Set a linear gradient as the background image with CSS | Set a linear gradient as the background image, with linear-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSS
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
#demo {
height: 200px;
background: linear-gradient(green, ora... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "Set a linear gradient as the background image, with linear-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSS"
},
{
"code": null,
"e": 1241,
"s": 1231,
"text": "Live Demo"
... |
Pascal - goto Statement | A goto statement in Pascal provides an unconditional jump from the goto to a labeled statement in the same function.
NOTE − Use of goto statement is highly discouraged in any programming language because it makes difficult to trace the control flow of a program, making the program hard to understand and hard to modify.... | [
{
"code": null,
"e": 2200,
"s": 2083,
"text": "A goto statement in Pascal provides an unconditional jump from the goto to a labeled statement in the same function."
},
{
"code": null,
"e": 2485,
"s": 2200,
"text": "NOTE − Use of goto statement is highly discouraged in any program... |
A Simple Guide to Deploying a Dockerized Python app to Azure | by Bjørnar Kjenaas Mælum | Towards Data Science | So you are telling me you have built an app and now you want to deploy it for everyone to see? Look no further. Here is how to deploy it on Azure using Docker, Azure Container Registry and Azure Container Instances.
This guide uses a FastAPI app as the example app and assumes you are familiar with the basics of using t... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "So you are telling me you have built an app and now you want to deploy it for everyone to see? Look no further. Here is how to deploy it on Azure using Docker, Azure Container Registry and Azure Container Instances."
},
{
"code": null,
"e": 72... |
Filtering Tweets by Location. Regular Expressions + Account Location... | by Leah Pope | Towards Data Science | In my latest project, I explored the question, “What is the public sentiment in the United States on K-12 learning during the COVID-19 pandemic?”. Using data collected from Twitter, Natural Language Processing, and Supervised Machine Learning, I created a text classifier to predict Tweets' sentiment on this topic.
Sinc... | [
{
"code": null,
"e": 488,
"s": 172,
"text": "In my latest project, I explored the question, “What is the public sentiment in the United States on K-12 learning during the COVID-19 pandemic?”. Using data collected from Twitter, Natural Language Processing, and Supervised Machine Learning, I created a... |
How to build a simple GUI calculator using tkinter in Python | In Python, we use the tkinter library to create GUI components and craft better user interface.
In this article you will learn methods to build a simple GUI based calculator application.
Before we jump into it, there are a few things we need to get organised first.
Let us start by downloading Python’s imaging library t... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "In Python, we use the tkinter library to create GUI components and craft better user interface."
},
{
"code": null,
"e": 1249,
"s": 1158,
"text": "In this article you will learn methods to build a simple GUI based calculator applicat... |
Python 3 - String startswith() Method | The startswith() method checks whether the string starts with str, optionally restricting the matching with the given indices start and end.
Following is the syntax for startswith() method −
str.startswith(str, beg = 0,end = len(string));
str − This is the string to be checked.
str − This is the string to be checked.
... | [
{
"code": null,
"e": 2481,
"s": 2340,
"text": "The startswith() method checks whether the string starts with str, optionally restricting the matching with the given indices start and end."
},
{
"code": null,
"e": 2531,
"s": 2481,
"text": "Following is the syntax for startswith() ... |
stack empty() and stack size() in C++ STL | In this article we will be discussing the working, syntax and examples of stack::empty() and stack::size() function in C++ STL.
Stacks are the data structure that stores the data in LIFO (Last In First Out) where we do
insertion and deletion from the top of the last element inserted. Like a stack of plates, if we want ... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "In this article we will be discussing the working, syntax and examples of stack::empty() and stack::size() function in C++ STL."
},
{
"code": null,
"e": 1525,
"s": 1190,
"text": "Stacks are the data structure that stores the data in ... |
SQL Full Outer Join Using Where Clause - GeeksforGeeks | 25 Aug, 2021
A SQL join statement is used to combine rows or information from two or more than two tables on the basis of a common attribute or field. There are basically four types of JOINS in SQL.
In this article, we will discuss about FULL OUTER JOIN using WHERE clause.
Consider the two tables below:
Sample Input Ta... | [
{
"code": null,
"e": 24294,
"s": 24266,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 24480,
"s": 24294,
"text": "A SQL join statement is used to combine rows or information from two or more than two tables on the basis of a common attribute or field. There are basically four ... |
Full Pipeline Project: Python AI for detecting fake news | by Johnny Wales | Towards Data Science | Too many articles on machine learning focus only on modeling. Those crucial middle bits of model building and validation are surely deserving of attention, but I want more — and I hope you do, too. I’ve written this complete review of my own project, to include data wrangling, the aforementioned model work, and creatio... | [
{
"code": null,
"e": 635,
"s": 171,
"text": "Too many articles on machine learning focus only on modeling. Those crucial middle bits of model building and validation are surely deserving of attention, but I want more — and I hope you do, too. I’ve written this complete review of my own project, to i... |
How to Detect Mouth Open for Face Login | by Peter Xie | Towards Data Science | Have you ever used bank/payment app face login and been asked to open mouth, nod or turn head? Such methods have been very popular, especially in China, to prevent deceiving/hacking using static face images or 3D prints. I spent about two days and finally figured out a quite simple way to detect mouth open utilizing th... | [
{
"code": null,
"e": 544,
"s": 171,
"text": "Have you ever used bank/payment app face login and been asked to open mouth, nod or turn head? Such methods have been very popular, especially in China, to prevent deceiving/hacking using static face images or 3D prints. I spent about two days and finally... |
How to list the directory content in PowerShell? | To display the directory content, Get-ChildItem cmdlet is used. You need to provide the path of the directory or if you are in the same directory, you need to use only Get-ChildItem directly. In the below example, we need to display the contents of the D:\temp directory.
When Get-ChildItem command is run outside of thi... | [
{
"code": null,
"e": 1334,
"s": 1062,
"text": "To display the directory content, Get-ChildItem cmdlet is used. You need to provide the path of the directory or if you are in the same directory, you need to use only Get-ChildItem directly. In the below example, we need to display the contents of the ... |
BufferedWriter write() method in Java with Examples - GeeksforGeeks | 28 May, 2020
The write() method in BufferedWriter class in Java is used in three ways:
1. The write(int) method of BufferedWriter class in Java is used to write a single character at a time in the buffer writer stream.
Syntax:
public void write(int ch)
throws IOException
Overrides: This method overrides th... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 24022,
"s": 23948,
"text": "The write() method in BufferedWriter class in Java is used in three ways:"
},
{
"code": null,
"e": 24154,
"s": 24022,
"text": "1. The write(int... |
Android - Best Practices | There are some practices that you can follow while developing android application. These are suggested by the android itself and they keep on improving with respect to time.
These best practices include interaction design features, performance, security and privacy, compatibility, testing, distributing and monetizing t... | [
{
"code": null,
"e": 3781,
"s": 3607,
"text": "There are some practices that you can follow while developing android application. These are suggested by the android itself and they keep on improving with respect to time."
},
{
"code": null,
"e": 3980,
"s": 3781,
"text": "These be... |
Spring - MVC Framework Overview | The Spring Web MVC framework provides a model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. The MVC pattern results in separating the different aspects of the application (input logic, business logic, and UI logic), while providing a loose c... | [
{
"code": null,
"e": 3143,
"s": 2791,
"text": "The Spring Web MVC framework provides a model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. The MVC pattern results in separating the different aspects of the application (in... |
Visualizing NYC Bike Share Trips with a Chord Diagram | by Clif Kranish | Towards Data Science | The New York City bike share system Citi Bike provides trip data files that allow anyone to analyze the use of the system. Chord diagrams provide a way to visualize flows between entities. In this article I will show that once you have the data in the required format it is easy to create an interactive chord diagram th... | [
{
"code": null,
"e": 548,
"s": 172,
"text": "The New York City bike share system Citi Bike provides trip data files that allow anyone to analyze the use of the system. Chord diagrams provide a way to visualize flows between entities. In this article I will show that once you have the data in the req... |
Print the matrix diagonally downwards in C Program. | Given with an array of size n x n and the task is to print the matrix elements of integer type diagonally downwards.
Diagonally downwards means printing the array of any size of n x n in diagonally moving downward like in the figure given below −
Firstly it will print 1 and then move to 2 print it and moves down to 4 d... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "Given with an array of size n x n and the task is to print the matrix elements of integer type diagonally downwards."
},
{
"code": null,
"e": 1309,
"s": 1179,
"text": "Diagonally downwards means printing the array of any size of n x ... |
How do I declare global variables on Android? | This example demonstrates how to declare global variables 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"?>
<LinearLayout x... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "This example demonstrates how to declare global variables in Android."
},
{
"code": null,
"e": 1262,
"s": 1132,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to crea... |
Count of seats booked on each of the given N flights - GeeksforGeeks | 23 Jul, 2021
Given an integer N denoting the number of flights and array bookings[][3] with each row of the form {a, b, K} denoting that there are K seats booked from flight a to flight b ( consider 1-based indexing), the task is to find the sequence of the number of seats booked in N flights.
Examples:
Input: bookings... | [
{
"code": null,
"e": 25220,
"s": 25192,
"text": "\n23 Jul, 2021"
},
{
"code": null,
"e": 25502,
"s": 25220,
"text": "Given an integer N denoting the number of flights and array bookings[][3] with each row of the form {a, b, K} denoting that there are K seats booked from flight a ... |
Firebase - Write List Data | In our last chapter, we showed you how to write data in Firebase. Sometimes you need to have a unique identifier for your data. When you want to create unique identifiers for your data, you need to use the push method instead of the set method.
The push() method will create a unique id when the data is pushed. If we wa... | [
{
"code": null,
"e": 2411,
"s": 2166,
"text": "In our last chapter, we showed you how to write data in Firebase. Sometimes you need to have a unique identifier for your data. When you want to create unique identifiers for your data, you need to use the push method instead of the set method."
},
... |
Smarter Ways to Encode Categorical Data for Machine Learning | by Jeff Hale | Towards Data Science | Better encoding of categorical data can mean better model performance. In this article I’ll introduce you to a wide range of encoding options from the Category Encoders package for use with scikit-learn machine learning in Python.
Use Category Encoders to improve model performance when you have nominal or ordinal data ... | [
{
"code": null,
"e": 403,
"s": 172,
"text": "Better encoding of categorical data can mean better model performance. In this article I’ll introduce you to a wide range of encoding options from the Category Encoders package for use with scikit-learn machine learning in Python."
},
{
"code": nu... |
Reversing a List in Python - GeeksforGeeks | 19 Feb, 2022
Python provides us with various ways of reversing a list. We will go through few of the many techniques on how a list in python can be reversed. Examples:
Input : list = [10, 11, 12, 13, 14, 15]
Output : [15, 14, 13, 12, 11, 10]
Input : list = [4, 5, 6, 7, 8, 9]
Output : [9, 8, 7, 6, 5, 4]
Method 1: U... | [
{
"code": null,
"e": 24040,
"s": 24012,
"text": "\n19 Feb, 2022"
},
{
"code": null,
"e": 24197,
"s": 24040,
"text": "Python provides us with various ways of reversing a list. We will go through few of the many techniques on how a list in python can be reversed. Examples: "
},
... |
What are different transaction isolation levels in DBMS? | In case of transaction the term ACID has been used significantly to state some of important properties that a transaction must follow. We all know ACID stands for Atomicity, Consistency, Isolation and Durability and these properties collectively called as ACID Properties.
Database system ensures ACID property −
Atomici... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "In case of transaction the term ACID has been used significantly to state some of important properties that a transaction must follow. We all know ACID stands for Atomicity, Consistency, Isolation and Durability and these properties collectively called ... |
Find the day number in the current year for the given date - GeeksforGeeks | 08 Jun, 2021
Given a string str which represents a date formatted as YYYY-MM-DD, the task is to find the day number for the current year. For example, 1st January is the 1st day of the year, 2nd January is the 2nd day of the year, 1st February is the 32nd day of the year and so on.Examples:
Input: str = “2019-01-09” ... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 24893,
"s": 24612,
"text": "Given a string str which represents a date formatted as YYYY-MM-DD, the task is to find the day number for the current year. For example, 1st January is the 1st da... |
PHP - Ajax XML Parser | Using with Ajax we can parser xml from local directory as well as servers, Below example demonstrate how to parser xml with web browser.
<html>
<head>
<script>
function showCD(str) {
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
retur... | [
{
"code": null,
"e": 2894,
"s": 2757,
"text": "Using with Ajax we can parser xml from local directory as well as servers, Below example demonstrate how to parser xml with web browser."
},
{
"code": null,
"e": 4318,
"s": 2894,
"text": "<html>\n <head>\n \n <script>\n ... |
Biopython - Machine Learning | Bioinformatics is an excellent area to apply machine learning algorithms. Here, we have genetic information of large number of organisms and it is not possible to manually analyze all this information. If proper machine learning algorithm is used, we can extract lot of useful information from these data. Biopython prov... | [
{
"code": null,
"e": 2490,
"s": 2106,
"text": "Bioinformatics is an excellent area to apply machine learning algorithms. Here, we have genetic information of large number of organisms and it is not possible to manually analyze all this information. If proper machine learning algorithm is used, we ca... |
Amsterdam Airbnb dataset: An End-to-End Project | by Rob | Towards Data Science | A Data Science portfolio project is like studying for your driving license practical exam, you are not learning to drive, you are learning how to pass the exam.
When preparing your portfolio it’s important to have projects that cover different fields, techniques and are able to tell a story.
In this article, my main go... | [
{
"code": null,
"e": 332,
"s": 171,
"text": "A Data Science portfolio project is like studying for your driving license practical exam, you are not learning to drive, you are learning how to pass the exam."
},
{
"code": null,
"e": 464,
"s": 332,
"text": "When preparing your portf... |
Python - Random Numbers Summation - GeeksforGeeks | 19 Feb, 2020
Sometimes, in making programs for gaming or gambling, we come across the task of creating the list all with random numbers and perform its summation. This task has to performed in general using loop and appending the random numbers one by one and then performing sum. But there is always requirement to perf... | [
{
"code": null,
"e": 24358,
"s": 24330,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24751,
"s": 24358,
"text": "Sometimes, in making programs for gaming or gambling, we come across the task of creating the list all with random numbers and perform its summation. This task has... |
Program to count submatrices with all ones using Python | Suppose we have m x n binary matrix, we have to find how many submatrices have all ones.
So, if the input is like
then the output will be 13 as there are 6 (1x1) matrices, 3 (2,1) matrices, 2 (1x2) matrices, 1 (3x1) matrix and 1 (4x4) matrix.
To solve this, we will follow these steps −
m := row count of matrix
m := row... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "Suppose we have m x n binary matrix, we have to find how many submatrices have all ones."
},
{
"code": null,
"e": 1176,
"s": 1151,
"text": "So, if the input is like"
},
{
"code": null,
"e": 1305,
"s": 1176,
"text"... |
How to calculate Heikin Ashi candles in Python for trading | by Gianluca Malato | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
Quantitative traders... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
DAX Date & Time - SECOND function | Returns the seconds of a time value, as a number from 0 to 59.
SECOND (<datetime>)
datetime
A datetime value representing time. E.g. 18:15:15 or 5:45:15 P.M.
An integer number from 0 to 59.
The parameter to the SECOND function is the time that contains the second you want to find.
You can specify the time as one of t... | [
{
"code": null,
"e": 2064,
"s": 2001,
"text": "Returns the seconds of a time value, as a number from 0 to 59."
},
{
"code": null,
"e": 2086,
"s": 2064,
"text": "SECOND (<datetime>) \n"
},
{
"code": null,
"e": 2095,
"s": 2086,
"text": "datetime"
},
{
"c... |
How to return a string from a JavaScript function? | To return a string from a JavaScript function, use the return statement in JavaScript.
You need to run the following code to learn how to return a string using return statement −
<html>
<head>
<script>
function concatenate(name, subject) {
var val;
val = name + subject;
... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "To return a string from a JavaScript function, use the return statement in JavaScript."
},
{
"code": null,
"e": 1241,
"s": 1149,
"text": "You need to run the following code to learn how to return a string using return statement −"
... |
Multi-threaded Chat Application in Java | Set 2 (Client Side Programming) | 17 Jun, 2017
Prerequisites : Introducing threads in socket programming, Multi-threaded chat Application | Set 1
This article gives the implementation of client program for the multi-threaded chat application. Till now all examples in socket programming assume that client first sends some information and then server or ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jun, 2017"
},
{
"code": null,
"e": 153,
"s": 54,
"text": "Prerequisites : Introducing threads in socket programming, Multi-threaded chat Application | Set 1"
},
{
"code": null,
"e": 842,
"s": 153,
"text": "This a... |
List sublist() Method in Java with Examples | 19 Jun, 2019
This method gives a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
Syntax:
List subList(int fromIndex,
int toIndex)
Parameters: This function has two parameter fromIndex and toIndex, which are the starting and ending ranges respectively to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jun, 2019"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "This method gives a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive."
},
{
"code": null,
"e": 157,
"s": 149... |
Python | Pandas Series.str.len() | 28 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.len() method is used to determine length of each string in a Pandas series. This m... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Sep, 2018"
},
{
"code": null,
"e": 267,
"s": 53,
"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 im... |
How to Use xlim() and ylim() in R? | 28 Nov, 2021
In this article, we will be looking at the different ways to use the xlim() and the ylim() functions in the R programming language.
The xlim() function with the provided parameters as the range of the x-axis in vectors is used to set the x-axis without dropping any data of the given plot or an object accor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "In this article, we will be looking at the different ways to use the xlim() and the ylim() functions in the R programming language."
},
{
"code": null,
"e": 343,
... |
D3.js line() method | 19 Aug, 2020
The d3.line() method is used to constructs a new line generator with the default settings. The line generator is then used to make a line.
Syntax:
d3.line();
Parameters: This method takes no parameters.
Return Value: This method returns a line Generator.
Example 1: Making a simple line using this method.
<... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "The d3.line() method is used to constructs a new line generator with the default settings. The line generator is then used to make a line."
},
{
"code": null,
"e":... |
Matplotlib.pyplot.axes() in Python | 17 May, 2020
Pyplot is another module of matplotlib that enables users to integrate MATLAB within Python environment, and thus providing MATLAB like interface and making Python visually interactive.
pyplot.axes is a function of the matplotlib library that adds axes to the current graph and makes it as current axes. Its... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 214,
"s": 28,
"text": "Pyplot is another module of matplotlib that enables users to integrate MATLAB within Python environment, and thus providing MATLAB like interface and making Python visually in... |
Ruby | Array zip() function | 06 Dec, 2019
Array#zip() : zip() is a Array class method which Converts any arguments to arrays, then merges elements of self with corresponding elements from each argument.
Syntax: Array.zip()
Parameter: Array
Return: merges elements of self with corresponding elements from each argument.
Example #1 :
# Ruby code for ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 189,
"s": 28,
"text": "Array#zip() : zip() is a Array class method which Converts any arguments to arrays, then merges elements of self with corresponding elements from each argument."
},
{
... |
Koch Curve or Koch Snowflake | 03 Oct, 2018
What is Koch Curve?
The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a mathematical curve and one of the earliest fractal curves to have been described. It is based on the Koch curve, which appeared in a 1904 paper titled “On a continuous curve without tangents, constructible... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Oct, 2018"
},
{
"code": null,
"e": 48,
"s": 28,
"text": "What is Koch Curve?"
},
{
"code": null,
"e": 407,
"s": 48,
"text": "The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a mathem... |
Python – Model Deployment Using TensorFlow Serving | 27 Jan, 2022
The most important part of the machine learning pipeline is the model deployment. Model Deployment means Deployment is the method by which you integrate a machine learning model into an existing production environment to allow it to use for practical purposes in real-time.
There are many ways to deploy a m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "The most important part of the machine learning pipeline is the model deployment. Model Deployment means Deployment is the method by which you integrate a machine learning mod... |
Using std::vector::reserve whenever possible | 09 Jun, 2022
In C++ vectors are dynamic arrays. Unlike arrays, they don’t have a fixed size. They can grow or shrink as required. Vectors are assigned memory in blocks of contiguous locations. When the memory allocated for the vector falls short of storing new elements, a new memory block is allocated to vector and all... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 835,
"s": 52,
"text": "In C++ vectors are dynamic arrays. Unlike arrays, they don’t have a fixed size. They can grow or shrink as required. Vectors are assigned memory in blocks of contiguous locat... |
Flattening a Linked List | 17 Jun, 2022
Given a linked list where every node represents a linked list and contains two pointers of its type:
Pointer to next node in the main list (we call it ‘right’ pointer in the code below) Pointer to a linked list where this node is headed (we call it the ‘down’ pointer in the code below).
Pointer to next n... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 154,
"s": 52,
"text": "Given a linked list where every node represents a linked list and contains two pointers of its type: "
},
{
"code": null,
"e": 342,
"s": 154,
"text": "Poi... |
How to find the area of a triangle using JavaScript ? | 29 Jan, 2021
Given an HTML document containing input fields that holds the side of triangle i.e. side1, side2, and side 3. The task is to find the area of triangle using JavaScript.
Approach: First we will create three input fields using <input type=”number”> tag to holds number input. After filling the input value, wh... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2021"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "Given an HTML document containing input fields that holds the side of triangle i.e. side1, side2, and side 3. The task is to find the area of triangle using JavaScript."
},
... |
Get all fields names in a MongoDB collection? | You can use the concept of Map Reduce. Let us first create a collection with documents −
> db.getAllFieldNamesDemo.insertOne({"StudentFirstName":"David","StudentAge":23});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cd998e9b50a6c6dd317ad90")
}
Following is the query to display all documents from a collecti... | [
{
"code": null,
"e": 1276,
"s": 1187,
"text": "You can use the concept of Map Reduce. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1444,
"s": 1276,
"text": "> db.getAllFieldNamesDemo.insertOne({\"StudentFirstName\":\"David\",\"StudentAge\":23});\n{\n... |
SQL | LISTAGG - GeeksforGeeks | 22 Jun, 2018
LISTAGG function in DBMS is used to aggregate strings from data in columns in a database table.
It makes it very easy to concatenate strings. It is similar to concatenation but uses grouping.
The speciality about this function is that, it also allows to order the elements in the concatenated list.
Syntax:
... | [
{
"code": null,
"e": 23874,
"s": 23846,
"text": "\n22 Jun, 2018"
},
{
"code": null,
"e": 23970,
"s": 23874,
"text": "LISTAGG function in DBMS is used to aggregate strings from data in columns in a database table."
},
{
"code": null,
"e": 24066,
"s": 23970,
"te... |
Apex - Arrays | Arrays in Apex are basically the same as Lists in Apex. There is no logical distinction between the Arrays and Lists as their internal data structure and methods are also same but the array syntax is little traditional like Java.
Below is the representation of an Array of Products −
Index 0 − HCL
Index 1 − H2SO4
Index ... | [
{
"code": null,
"e": 2282,
"s": 2052,
"text": "Arrays in Apex are basically the same as Lists in Apex. There is no logical distinction between the Arrays and Lists as their internal data structure and methods are also same but the array syntax is little traditional like Java."
},
{
"code": n... |
Sum of the series 0.6, 0.06, 0.006, 0.0006, ...to n terms | 19 Mar, 2021
Given the number of terms i.e. n. Find the sum of the series 0.6, 0.06, 0.006, 0.0006, ...to n terms.Examples:
Input : 2
Output : 0.65934
Input : 3
Output : 0.665334
Lets denote the sum by S: Using the formula , we have [since r<1]Hence the required sum is Below is the implementation:
C++
Java
Pytho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Mar, 2021"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Given the number of terms i.e. n. Find the sum of the series 0.6, 0.06, 0.006, 0.0006, ...to n terms.Examples: "
},
{
"code": null,
"e": 197,
"s": 141,
"t... |
Reverse an ArrayList in Java | 13 May, 2021
Assuming you have gone through arraylist in java and know about arraylist. This post contains different examples for reversing an arraylist which are given below:1. By writing our own function(Using additional space): reverseArrayList() method in RevArrayList class contains logic for reversing an arraylist... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 559,
"s": 52,
"text": "Assuming you have gone through arraylist in java and know about arraylist. This post contains different examples for reversing an arraylist which are given below:1. By writin... |
Programs for printing pyramid patterns in C++ | 12 Jun, 2022
This article is aimed at giving a C++ implementation for pattern printing.
Simple pyramid pattern
CPP
// C++ code to demonstrate star pattern#include <iostream>using namespace std; // Function to demonstrate printing patternvoid pypart(int n){ // Outer loop to handle number of rows // n in this case... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 128,
"s": 52,
"text": "This article is aimed at giving a C++ implementation for pattern printing. "
},
{
"code": null,
"e": 151,
"s": 128,
"text": "Simple pyramid pattern"
},
... |
MongoDB – Maximum operator ( $max ) | 19 Apr, 2020
MongoDB provides different types of field update operators to update the values of the fields in the documents and the maximum operator ( $max ) is one of them. This operator updates the field with the specified value if the specified value is greater than the current value.
This operator will compare the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 304,
"s": 28,
"text": "MongoDB provides different types of field update operators to update the values of the fields in the documents and the maximum operator ( $max ) is one of them. This operator ... |
Multiply two polynomials | 24 Jun, 2022
Given two polynomials represented by two arrays, write a function that multiplies given two polynomials.
Example:
Input: A[] = {5, 0, 10, 6}
B[] = {1, 2, 4}
Output: prod[] = {5, 10, 30, 26, 52, 24}
The first input array represents "5 + 0x^1 + 10x^2 + 6x^3"
The second array represents "1 + 2x^... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 158,
"s": 52,
"text": "Given two polynomials represented by two arrays, write a function that multiplies given two polynomials. "
},
{
"code": null,
"e": 168,
"s": 158,
"text": ... |
Python – Retain Numbers in String | 03 Jul, 2020
Sometimes, while working with Python Strings, we can have a problem in which we need to perform the removal of all the characters other than integers. This kind of problem can have application in many data domains such as Machine Learning and web development. Let’s discuss certain ways in which this task c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "Sometimes, while working with Python Strings, we can have a problem in which we need to perform the removal of all the characters other than integers. This kind of problem can... |
Java Sound API | 17 May, 2022
JavaSound is a collection of classes and interfaces for effecting and controlling sound media in java. It consists of two packages.
javax.sound.sampled: This package provides an interface for the capture, mixing digital audio.
javax.sound.midi: This package provides an interface for MIDI (Musical Instrumen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "JavaSound is a collection of classes and interfaces for effecting and controlling sound media in java. It consists of two packages."
},
{
"code": null,
"e": 255,
... |
Program to remotely Power On a PC over the internet using the Wake-on-LAN protocol. | 18 Oct, 2021
Wake-on-LAN (WoL) is an Ethernet or token ring computer networking standard that allows a computer to be turned on or awakened by a network message.
The message is usually sent to the target computer by a program executed on a device connected to the same local area network, such as a smartphone.
It is al... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Wake-on-LAN (WoL) is an Ethernet or token ring computer networking standard that allows a computer to be turned on or awakened by a network message. "
},
{
"code": nu... |
Carrier Sense Multiple Access (CSMA) | 16 Jun, 2022
Prerequisite – Multiple Access Protocols This method was developed to decrease the chances of collisions when two or more stations start sending their signals over the data link layer. Carrier Sense multiple access requires that each station first check the state of the medium before sending.
Vulnerable T... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 349,
"s": 54,
"text": "Prerequisite – Multiple Access Protocols This method was developed to decrease the chances of collisions when two or more stations start sending their signals over the data l... |
GATE | GATE-CS-2005 | Question 86 | 28 Jun, 2021
Consider the following expression grammar. The semantic rules for expression calculation are stated next to each grammar production.
E → number E.val = number. val
| E '+' E E(1).val = E(2).val + E(3).val
| E '×' E E(1).val = E(2).val × E(3).val
Assume the conflicts in Part (a) of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "Consider the following expression grammar. The semantic rules for expression calculation are stated next to each grammar production."
},
{
"code": null,
"e": 299,... |
Spring Autowiring by Constructor | This mode is very similar to byType, but it applies to constructor arguments. Spring container looks at the beans on which autowire attribute is set constructor in the XML configuration file. It then tries to match and wire its constructor's argument with exactly one of the beans name in the configuration file. If matc... | [
{
"code": null,
"e": 2827,
"s": 2426,
"text": "This mode is very similar to byType, but it applies to constructor arguments. Spring container looks at the beans on which autowire attribute is set constructor in the XML configuration file. It then tries to match and wire its constructor's argument wi... |
How to style the Border of Label in C#? | 30 Jun, 2019
In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to style the border of the Label control using the BorderStyle Property. You can style the border of the label in three different ways and these values... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 374,
"s": 28,
"text": "In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to style the border... |
Minimum number of increasing subsequences | 22 Jun, 2022
Given an array of integers of size N, you have to divide it into the minimum number of “strictly increasing subsequences” For example: let the sequence be {1, 3, 2, 4}, then the answer would be 2. In this case, the first increasing sequence would be {1, 3, 4} and the second would be {2}.Examples:
Input : ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 352,
"s": 54,
"text": "Given an array of integers of size N, you have to divide it into the minimum number of “strictly increasing subsequences” For example: let the sequence be {1, 3, 2, 4}, then ... |
Given two unsorted arrays, find all pairs whose sum is x | 08 Jul, 2022
Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to X.
Examples:
Input : arr1[] = {-1, -2, 4, -6, 5, 7}
arr2[] = {6, 3, 4, 0}
x = 8
Output : 4 4
5 3
Input : arr1[] = {1, 2, 4, 5, 7}
arr2[] = {5, 6, 3, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 172,
"s": 52,
"text": "Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to X."
},
{
"code": null,
"e": 183,
"s": 172... |
Raw String Literal in C++ | 22 May, 2022
A Literal is a constant variable whose value does not change during the lifetime of the program. Whereas, a raw string literal is a string in which the escape characters like ‘ \n, \t, or \” ‘ of C++ are not processed. Hence, a raw string literal that starts with R”( and ends in )”.
The syntax for Raw stri... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 May, 2022"
},
{
"code": null,
"e": 336,
"s": 52,
"text": "A Literal is a constant variable whose value does not change during the lifetime of the program. Whereas, a raw string literal is a string in which the escape characters like... |
How to align navbar items to the right in Bootstrap 4 ? | 02 Mar, 2020
The .ml-auto class in Bootstrap can be used to align navbar items to the right. The .ml-auto class automatically aligns elements to the right. In this article, we will align the navbar to the right in two different ways, below both the approaches are discussed with proper example.
Example 1: In the first e... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 335,
"s": 53,
"text": "The .ml-auto class in Bootstrap can be used to align navbar items to the right. The .ml-auto class automatically aligns elements to the right. In this article, we will align ... |
Detecting negative cycle using Floyd Warshall | 24 Nov, 2021
We are given a directed graph. We need compute whether the graph has negative cycle or not. A negative cycle is one in which the overall sum of the cycle comes negative.
Negative weights are found in various applications of graphs. For example, instead of paying cost for a path, we may get some advantage i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 222,
"s": 52,
"text": "We are given a directed graph. We need compute whether the graph has negative cycle or not. A negative cycle is one in which the overall sum of the cycle comes negative."
}... |
Minimum cost to sort strings using reversal operations of different costs - GeeksforGeeks | 07 Mar, 2022
Given an array of strings and costs of reversing all strings, we need to sort the array. We cannot move strings in array, only string reversal is allowed. We need to reverse some of the strings in such a way that all strings make a lexicographic order and cost is also minimized. If it is not possible to so... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 26304,
"s": 25941,
"text": "Given an array of strings and costs of reversing all strings, we need to sort the array. We cannot move strings in array, only string reversal is allowed. We need ... |
How to Delete a Pivot Table in Excel? - GeeksforGeeks | 15 May, 2021
A pivot table is a tool in Excel that allows you to quickly summarize data in the spreadsheet. When it comes to deleting a Pivot Table, there are a few different ways you can do this.
The method you choose will depend on how you want to delete the Pivot Table.
Steps to delete the Pivot table and the Result... | [
{
"code": null,
"e": 26289,
"s": 26261,
"text": "\n15 May, 2021"
},
{
"code": null,
"e": 26473,
"s": 26289,
"text": "A pivot table is a tool in Excel that allows you to quickly summarize data in the spreadsheet. When it comes to deleting a Pivot Table, there are a few different w... |
How to create a Read More component in ReactJS? - GeeksforGeeks | 03 Mar, 2021
The following example covers how to create a Read More component in React JS using useState() hook.
Prerequisite:
Basic knowledge of npm & create-react-app command.
Basic Knowledge of useState() React hooks.
Basic Setup: You will start a new project using create-react-app using the following command:
npx c... | [
{
"code": null,
"e": 24852,
"s": 24824,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 24952,
"s": 24852,
"text": "The following example covers how to create a Read More component in React JS using useState() hook."
},
{
"code": null,
"e": 24966,
"s": 24952,
... |
Merge Sort | Practice | GeeksforGeeks | Given an array arr[], its starting position l and its ending position r. Sort the array using merge sort algorithm.
Example 1:
Input:
N = 5
arr[] = {4 1 3 9 7}
Output:
1 3 4 7 9
Example 2:
Input:
N = 10
arr[] = {10 9 8 7 6 5 4 3 2 1}
Output:
1 2 3 4 5 6 7 8 9 10
Constraints:
1 <= N <= 105
1 <= arr[i] <= 103
0
adityak... | [
{
"code": null,
"e": 365,
"s": 238,
"text": "Given an array arr[], its starting position l and its ending position r. Sort the array using merge sort algorithm.\nExample 1:"
},
{
"code": null,
"e": 417,
"s": 365,
"text": "Input:\nN = 5\narr[] = {4 1 3 9 7}\nOutput:\n1 3 4 7 9\n"
... |
Proper Ways to Pass Environment Variables in JSON for cURL POST | by Xu LIANG | Towards Data Science | The best practice is using a data generation function. Scrolling to the bottom for the detail.
When we build an API-based web (front-end and back-end separated), we usually want to see what the HTTP client is sending or to inspect and debug webhook requests. There are two approaches:
Build an API server by ourselves
Us... | [
{
"code": null,
"e": 266,
"s": 171,
"text": "The best practice is using a data generation function. Scrolling to the bottom for the detail."
},
{
"code": null,
"e": 456,
"s": 266,
"text": "When we build an API-based web (front-end and back-end separated), we usually want to see w... |
Evaluation of Expression Tree - GeeksforGeeks | 15 Mar, 2022
Given a simple expression tree, consisting of basic binary operators i.e., + , – ,* and / and some integers, evaluate the expression tree.
Examples:
Input: Root node of the below tree
Output:100
Input: Root node of the below tree
Output: 110
Approach: The approach to solve this problem is based on followin... | [
{
"code": null,
"e": 35457,
"s": 35429,
"text": "\n15 Mar, 2022"
},
{
"code": null,
"e": 35596,
"s": 35457,
"text": "Given a simple expression tree, consisting of basic binary operators i.e., + , – ,* and / and some integers, evaluate the expression tree."
},
{
"code": nu... |
How to bring an activity to the foreground i.e. top of stack using Kotlin? | This example demonstrates how to bring an activity to the foreground i.e. top of stack using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encodi... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "This example demonstrates how to bring an activity to the foreground i.e. top of stack using Kotlin."
},
{
"code": null,
"e": 1291,
"s": 1163,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fil... |
What is correct syntax to create Python dictionary? | A Python dictionary object is a collection of key-value pairs. Each item in a dictionary consists of a value associated with key. The association is defined by putting : between them. Such key-value pairs, separated by comma and included within curly brackets, forms a dictionary object.
Key component of item must be an... | [
{
"code": null,
"e": 1350,
"s": 1062,
"text": "A Python dictionary object is a collection of key-value pairs. Each item in a dictionary consists of a value associated with key. The association is defined by putting : between them. Such key-value pairs, separated by comma and included within curly br... |
How to reload CSS without reloading the page using JavaScript ? - GeeksforGeeks | 02 Jun, 2020
While working with CSS, you might have come across situations where you made some changes in the stylesheet and had to do a hard reload to see the changes reflected in your browser. Or maybe the style depends on some user interaction and you don’t wish to hard reload the page every time. Sometimes you don’... | [
{
"code": null,
"e": 24919,
"s": 24891,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 25485,
"s": 24919,
"text": "While working with CSS, you might have come across situations where you made some changes in the stylesheet and had to do a hard reload to see the changes reflecte... |
Conditional Rendering in ReactJS | In this article, we are going to see how to conditionally render a component based on some conditions in a React application
In ReactJS, we can render only the desired components based on certain given conditions by using the if-else statements or by using the logical && operator of JavaScript. When the provided condit... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "In this article, we are going to see how to conditionally render a component based on some conditions in a React application"
},
{
"code": null,
"e": 1456,
"s": 1187,
"text": "In ReactJS, we can render only the desired components bas... |
Tryit Editor v3.7 - Show Java | class MyPackageClass {
public static void main(String[] args) {
System.out.println("This is my package!"); | [] |
Multidex in Android - GeeksforGeeks | 19 Sep, 2021
Now as we are aware of Methods/Functions in android we know that every library has a large number of pre-built methods. In many, we have to use a lot of libraries according to the needs of our project which obviously increases the total number of methods in our android app. After adding multiple libraries ... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n19 Sep, 2021"
},
{
"code": null,
"e": 25065,
"s": 24725,
"text": "Now as we are aware of Methods/Functions in android we know that every library has a large number of pre-built methods. In many, we have to use a lot of libraries ... |
Advantages of Exception Handling - 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
Java provides a sophisticated exception handl... | [
{
"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,
... |
jQuery Mobile - Datapicker Widget | The DatePicker function can be used with widgets using JqueryUI in jQuery mobile as it does not support jQuery mobile widget. It is used to focus on the input to open an interactive calendar in a small overlay.
The calender pops up when input is focused to insert date. Add data-role = "date" attribute in the <input> fi... | [
{
"code": null,
"e": 2159,
"s": 1948,
"text": "The DatePicker function can be used with widgets using JqueryUI in jQuery mobile as it does not support jQuery mobile widget. It is used to focus on the input to open an interactive calendar in a small overlay."
},
{
"code": null,
"e": 2325,... |
C++ Program to Implement Bit Array | This is a C++ program to implement Bit Array. A Bit Array is an array data structures that compactly stores data. It is basically used to implement a simple data structure.
Functions and pseudocodes:
Begin
Function getBit(int val,int pos)
singleBit->b = 0
if(pos == 0)
singleBit->b = val & 1
else
... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "This is a C++ program to implement Bit Array. A Bit Array is an array data structures that compactly stores data. It is basically used to implement a simple data structure."
},
{
"code": null,
"e": 1262,
"s": 1235,
"text": "Functions... |
C program to print the length of a String using %n format specifier - GeeksforGeeks | 11 Oct, 2019
Given string str. The task is to find the length of the string using %n format specifier
Examples:
Input: Geeks For Geeks
Output: 15
Input: Geeks
Output: 5
Appropach:
To find the length of string, we use special format specifier “%n” in printf function. In C printf(), %n is a special format specifier wh... | [
{
"code": null,
"e": 24564,
"s": 24536,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 24653,
"s": 24564,
"text": "Given string str. The task is to find the length of the string using %n format specifier"
},
{
"code": null,
"e": 24663,
"s": 24653,
"text": "E... |
Custom Instance Segmentation Training With 7 Lines Of Code. | by Ayoola Olafenwa (she/her) | Towards Data Science | Image Segmentation is an important field in computer vision, it is applied in different fields of life. PixelLib is a library created to allow easy application of segmentation to real life problems. It supports instance segmentation of objects with Coco model. Segmentation with coco model is limited as you cannot perfo... | [
{
"code": null,
"e": 665,
"s": 171,
"text": "Image Segmentation is an important field in computer vision, it is applied in different fields of life. PixelLib is a library created to allow easy application of segmentation to real life problems. It supports instance segmentation of objects with Coco m... |
Java Examples - Split PDF into Many | How to split a PDF in to many using Java.
Following is an example program to split a PDF in to many using Java.
import org.apache.pdfbox.multipdf.Splitter;
import org.apache.pdfbox.pdmodel.PDDocument;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Iterator;
public cl... | [
{
"code": null,
"e": 2110,
"s": 2068,
"text": "How to split a PDF in to many using Java."
},
{
"code": null,
"e": 2180,
"s": 2110,
"text": "Following is an example program to split a PDF in to many using Java."
},
{
"code": null,
"e": 3199,
"s": 2180,
"text": ... |
eXtreme Deep Factorization Machine(xDeepFM) | by Abhishek Sharma | Towards Data Science | We are living in times where we are spoilt for choice. Whether it is food, music or entertainment the amount of options that we have is simply mind-boggling. But thanks to the recommendation engines that fuel these apps/sites these alternatives are provided to us in a ranked list. In this blog, we will be discussing a ... | [
{
"code": null,
"e": 575,
"s": 172,
"text": "We are living in times where we are spoilt for choice. Whether it is food, music or entertainment the amount of options that we have is simply mind-boggling. But thanks to the recommendation engines that fuel these apps/sites these alternatives are provid... |
How to provide shadow effect in a Plot using path_effect attribute in Matplotlib | In order to provide path effects like shadow effect in a plot or a graph, we can use the path_effect attribute.
For example, let’s see how we can use the path_effect attribute in Matplotlib add a shadow effect to a sigmoid function.
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patheffects import P... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "In order to provide path effects like shadow effect in a plot or a graph, we can use the path_effect attribute."
},
{
"code": null,
"e": 1295,
"s": 1174,
"text": "For example, let’s see how we can use the path_effect attribute in Mat... |
AngularJs Data Binding Example | ng-model in Angular Example Tutorials | 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
One of the important feature of AngularJs is ... | [
{
"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,
... |
CSS - Fade In Left Effect | The image come or cause to come gradually into or out of view, or to merge into another shot.
@keyframes fadeInLeft {
0% {
opacity: 0;
transform: translateX(-20px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
Transform − Transform applies to 2d and 3d transformation to an e... | [
{
"code": null,
"e": 2720,
"s": 2626,
"text": "The image come or cause to come gradually into or out of view, or to merge into another shot."
},
{
"code": null,
"e": 2881,
"s": 2720,
"text": "@keyframes fadeInLeft {\n 0% {\n opacity: 0;\n transform: translateX(-20px);... |
Second Chance (or Clock) Page Replacement Policy - GeeksforGeeks | 08 Feb, 2022
Prerequisite – Page Replacement Algorithms Apart from LRU, OPT and FIFO page replacement policies, we also have the second chance/clock page replacement policy. In the Second Chance page replacement policy, the candidate pages for removal are considered in a round robin matter, and a page that has been acc... | [
{
"code": null,
"e": 24614,
"s": 24586,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 25871,
"s": 24614,
"text": "Prerequisite – Page Replacement Algorithms Apart from LRU, OPT and FIFO page replacement policies, we also have the second chance/clock page replacement policy. In... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.