title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Angular 6 - Http Service | Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
To start using the http service, we need to import the module in app.module.ts as shown below β
import { Brows... | [
{
"code": null,
"e": 2204,
"s": 1995,
"text": "Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service."
},
{
"code": null,
"e": 2301,
... |
MySQL - ALTER Command | The MySQL ALTER command is very useful when you want to change a name of your table, any table field or if you want to add or delete an existing column in a table.
Let us begin with the creation of a table called testalter_tbl.
root@host# mysql -u root -p password;
Enter password:*******
mysql> use TUTORIALS;
Database... | [
{
"code": null,
"e": 2497,
"s": 2333,
"text": "The MySQL ALTER command is very useful when you want to change a name of your table, any table field or if you want to add or delete an existing column in a table."
},
{
"code": null,
"e": 2561,
"s": 2497,
"text": "Let us begin with ... |
Set style to current link in a Navigation Bar with CSS | To set a style to current link in a navigation bar, add style to .active. You can try to run the following code to style current link:
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 5;
padding: 5;
}
li a {
... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "To set a style to current link in a navigation bar, add style to .active. You can try to run the following code to style current link:"
},
{
"code": null,
"e": 1207,
"s": 1197,
"text": "Live Demo"
},
{
"code": null,
"e": ... |
Delete items from dictionary while iterating in Python | A python dictionary is a collection which is unordered, changeable and indexed. They have keys and values and each item is referred using the key. In this article we will explore the ways to delete the items form a dictionary.
In this approach we capture the key values that are needed to be deleted. Once we apply the d... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "A python dictionary is a collection which is unordered, changeable and indexed. They have keys and values and each item is referred using the key. In this article we will explore the ways to delete the items form a dictionary."
},
{
"code": null... |
Java - Regular Expressions | Java provides the java.util.regex package for pattern matching with regular expressions. Java regular expressions are very similar to the Perl programming language and very easy to learn.
A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a spec... | [
{
"code": null,
"e": 2565,
"s": 2377,
"text": "Java provides the java.util.regex package for pattern matching with regular expressions. Java regular expressions are very similar to the Perl programming language and very easy to learn."
},
{
"code": null,
"e": 2794,
"s": 2565,
"te... |
Python - Remove Top level from Dictionary - GeeksforGeeks | 22 Apr, 2020
Sometimes, while working with Python Dictionaries, we can have nesting of dictionaries, with each key being single values dictionary. In this we need to remove the top level of dictionary. This can have application in data preprocessing. Lets discuss certain ways in which this task can be performed.
Method... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25838,
"s": 25537,
"text": "Sometimes, while working with Python Dictionaries, we can have nesting of dictionaries, with each key being single values dictionary. In this we need to remove the... |
Assign Mice to Holes - GeeksforGeeks | 31 Mar, 2021
There are N Mice and N holes are placed in a straight line. Each hole can accommodate only 1 mouse. A mouse can stay at his position, move one step right from x to x + 1, or move one step left from x to x -1. Any of these moves consumes 1 minute. Assign mice to holes so that the time when the last mouse ge... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 26435,
"s": 26097,
"text": "There are N Mice and N holes are placed in a straight line. Each hole can accommodate only 1 mouse. A mouse can stay at his position, move one step right from x to... |
Check if any two intervals intersects among a given set of intervals - GeeksforGeeks | 24 Nov, 2021
An interval is represented as a combination of start time and end time. Given a set of intervals, check if any two intervals intersect.
Examples:
Input: arr[] = {{1, 3}, {5, 7}, {2, 4}, {6, 8}}
Output: true
The intervals {1, 3} and {2, 4} overlap
Input: arr[] = {{1, 3}, {7, 9}, {4, 6}, {10, 13}}
Outp... | [
{
"code": null,
"e": 25835,
"s": 25807,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 25972,
"s": 25835,
"text": "An interval is represented as a combination of start time and end time. Given a set of intervals, check if any two intervals intersect. "
},
{
"code": null... |
Check whether an Array is Subarray of another Array - GeeksforGeeks | 11 May, 2021
Given two arrays A[] and B[] consisting of and integers. The task is to check whether the array B[] is a subarray of the array A[] or not.Examples:
Input : A[] = {2, 3, 0, 5, 1, 1, 2}, B[] = {3, 0, 5, 1} Output : YesInput : A[] = {1, 2, 3, 4, 5}, B[] = {2, 5, 6} Output : No
Source : Visa Interview Ex... | [
{
"code": null,
"e": 26179,
"s": 26151,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 26329,
"s": 26179,
"text": "Given two arrays A[] and B[] consisting of and integers. The task is to check whether the array B[] is a subarray of the array A[] or not.Examples: "
},
{
... |
Explain the differences between for(..in) and for(..of) statement in JavaScript. - GeeksforGeeks | 31 Jan, 2020
Often in a JavaScript script, we iterate over some objects of few built-in classes like Arrays, Dictionaries, Strings, Maps, etc. We iterate the objects using loops. JavaScript supports different kinds of loops:
for loop
for (..in) loop
for (..of) loop
while loop
do-while loop
In this article, we will be l... | [
{
"code": null,
"e": 31329,
"s": 31301,
"text": "\n31 Jan, 2020"
},
{
"code": null,
"e": 31541,
"s": 31329,
"text": "Often in a JavaScript script, we iterate over some objects of few built-in classes like Arrays, Dictionaries, Strings, Maps, etc. We iterate the objects using loop... |
Print all ways to break a string in bracket form - GeeksforGeeks | 25 Jan, 2022
Given a string, find all ways to break the given string in bracket form. Enclose each substring within a parenthesis.
Examples:
Input : abc
Output: (a)(b)(c)
(a)(bc)
(ab)(c)
(abc)
Input : abcd
Output : (a)(b)(c)(d)
(a)(b)(cd)
(a)(bc)(d)
(a)(bcd)
... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 26215,
"s": 26097,
"text": "Given a string, find all ways to break the given string in bracket form. Enclose each substring within a parenthesis."
},
{
"code": null,
"e": 26226,
... |
Program to find the XOR of ASCII values of characters in a string - GeeksforGeeks | 28 Jan, 2022
Given a string str, the task is to find the XOR of ASCII values of characters in the string.Examples:
Input: str = βGeeksβ Output: 95 ASCII value of G = 71 ASCII value of e = 101 ASCII value of e = 101 ASCII value of k = 107 ASCII value of s = 115 XOR of ASCII values = 71 ^ 101 ^ 101 ^ 107 ^ 115 = 95Inpu... | [
{
"code": null,
"e": 25891,
"s": 25863,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 25995,
"s": 25891,
"text": "Given a string str, the task is to find the XOR of ASCII values of characters in the string.Examples: "
},
{
"code": null,
"e": 26227,
"s": 25995,... |
PHP | SimpleXMLElement addChild() Function - GeeksforGeeks | 29 May, 2019
Pre-requisite: Read XML Basics
The SimpleXMLElement::addChild() function is an inbuilt function in PHP which is used to add a child in a SimpleXML object.
Syntax:
SimpleXMLElement SimpleXMLElement::addChild($name, $value, $namespace);
Parameter: This function accepts three parameters as mentioned above and... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n29 May, 2019"
},
{
"code": null,
"e": 26248,
"s": 26217,
"text": "Pre-requisite: Read XML Basics"
},
{
"code": null,
"e": 26372,
"s": 26248,
"text": "The SimpleXMLElement::addChild() function is an inbuilt fun... |
Euler Circuit in a Directed Graph | The Euler path is a path, by which we can visit every edge exactly once. We can use the same vertices for multiple times. The Euler Circuit is a special type of Euler path. When the starting vertex of the Euler path is also connected with the ending vertex of that path, then it is called the Euler Circuit.
To check whe... | [
{
"code": null,
"e": 1370,
"s": 1062,
"text": "The Euler path is a path, by which we can visit every edge exactly once. We can use the same vertices for multiple times. The Euler Circuit is a special type of Euler path. When the starting vertex of the Euler path is also connected with the ending ver... |
C# User Input | You have already learned that Console.WriteLine() is used to output (print) values. Now we will use
Console.ReadLine() to get user input.
In the following example, the user can input his or hers username, which is stored in the
variable userName. Then we print the value of
userName:
// Type your username and press ... | [
{
"code": null,
"e": 139,
"s": 0,
"text": "You have already learned that Console.WriteLine() is used to output (print) values. Now we will use \nConsole.ReadLine() to get user input."
},
{
"code": null,
"e": 288,
"s": 139,
"text": "In the following example, the user can input his... |
Understanding Dimensionality Reduction for Machine Learning | by Rajat S | Towards Data Science | Recently, I was asked to work on a dataset that was a bit on the heavy side. It was so large that my Excel program would stop responding for a few minutes while loading, and manually exploring the data started to become a real pain.
I am still a newbie in the Machine Learning world. So, I had to go back the Excel multi... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "Recently, I was asked to work on a dataset that was a bit on the heavy side. It was so large that my Excel program would stop responding for a few minutes while loading, and manually exploring the data started to become a real pain."
},
{
"code": ... |
600X t-SNE speedup with RAPIDS. RAPIDS GPU-accelerated t-SNE achieves a... | by Connor Shorten | Towards Data Science | GPU accelerations are commonly associated with Deep Learning. GPUs power Convolutional Neural Networks for Computer Vision and Transformers for Natural Language Processing. They do this through parallel computation, making them much faster for certain tasks compared to CPUs.
RAPIDS is expanding the utilization of GPUs ... | [
{
"code": null,
"e": 447,
"s": 171,
"text": "GPU accelerations are commonly associated with Deep Learning. GPUs power Convolutional Neural Networks for Computer Vision and Transformers for Natural Language Processing. They do this through parallel computation, making them much faster for certain tas... |
list::swap() in C++ STL - GeeksforGeeks | 12 Jan, 2018
Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and deletion operations are costlier as compared to the insertion and deletion option in Lists.
This function is used to swap the contents of one list w... | [
{
"code": null,
"e": 25649,
"s": 25621,
"text": "\n12 Jan, 2018"
},
{
"code": null,
"e": 25900,
"s": 25649,
"text": "Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and dele... |
Logger getName() Method in Java with Examples - GeeksforGeeks | 26 Mar, 2019
getName() method of a Logger class used to get the name of logger. Many times you have to check the logger name so we can use this method to get the logger name.
Syntax:
public String getName()
Parameters: This method accepts nothing.
Return value: This method return logger name and it will be null for an... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n26 Mar, 2019"
},
{
"code": null,
"e": 25387,
"s": 25225,
"text": "getName() method of a Logger class used to get the name of logger. Many times you have to check the logger name so we can use this method to get the logger name."
... |
Inorder Tree Traversal without recursion and without stack! - GeeksforGeeks | 26 Oct, 2021
Using Morris Traversal, we can traverse the tree without using stack and recursion. The idea of Morris Traversal is based on Threaded Binary Tree. In this traversal, we first create links to Inorder successor and print the data using these links, and finally revert the changes to restore original tree.
1.... | [
{
"code": null,
"e": 39003,
"s": 38975,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 39308,
"s": 39003,
"text": "Using Morris Traversal, we can traverse the tree without using stack and recursion. The idea of Morris Traversal is based on Threaded Binary Tree. In this traversa... |
Mid-Square hashing - GeeksforGeeks | 18 Jul, 2018
Mid-Square hashing is a hashing technique in which unique keys are generated. In this technique, a seed value is taken and it is squared. Then, some digits from the middle are extracted. These extracted digits form a number which is taken as the new seed. This technique can generate keys with high randomne... | [
{
"code": null,
"e": 26093,
"s": 26065,
"text": "\n18 Jul, 2018"
},
{
"code": null,
"e": 26895,
"s": 26093,
"text": "Mid-Square hashing is a hashing technique in which unique keys are generated. In this technique, a seed value is taken and it is squared. Then, some digits from th... |
PostgreSQL - GROUP BY clause - GeeksforGeeks | 28 Aug, 2020
The PostgreSQL GROUP BY clause is used to divide rows returned by SELECT statement into different groups. The speciality of GROUP BY clause is that one can use Functions like SUM() to calculate the sum of items or COUNT() to get the total number of items in the groups.
Syntax:
SELECT
column_1,
colu... | [
{
"code": null,
"e": 29269,
"s": 29241,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 29539,
"s": 29269,
"text": "The PostgreSQL GROUP BY clause is used to divide rows returned by SELECT statement into different groups. The speciality of GROUP BY clause is that one can use Fun... |
Decimal Equivalent of Gray Code and its Inverse - GeeksforGeeks | 08 Jul, 2021
Given a decimal number n. Find the gray code of this number in decimal form.
Examples:
Input : 7 Output : 4 Explanation: 7 is represented as 111 in binary form. The equivalent gray code of 111 is 100 in binary form, whose decimal equivalent is 4.
Input : 10 Output : 15 Explanation: 10 is represented as 10... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 26354,
"s": 26277,
"text": "Given a decimal number n. Find the gray code of this number in decimal form."
},
{
"code": null,
"e": 26365,
"s": 26354,
"text": "Examples: "
... |
Data Structures and Algorithms | Set 21 - GeeksforGeeks | 27 Mar, 2017
Following questions have been asked in GATE CS 2008 exam.
1. The subset-sum problem is defined as follows. Given a set of n positive integers, S = {a1 ,a2 ,a3 ,...,an} and positive integer W, is there a subset of S whose elements sum to W? A dynamic program for solving this problem uses a 2-dimensional Boo... | [
{
"code": null,
"e": 25573,
"s": 25545,
"text": "\n27 Mar, 2017"
},
{
"code": null,
"e": 25631,
"s": 25573,
"text": "Following questions have been asked in GATE CS 2008 exam."
},
{
"code": null,
"e": 26275,
"s": 25631,
"text": "1. The subset-sum problem is def... |
Compress the array into Ranges - GeeksforGeeks | 18 Nov, 2021
Given an array of integers of size N, The task is to print the consecutive integers as a range.Examples:
Input : N = 7, arr=[7, 8, 9, 15, 16, 20, 25] Output : 7-9 15-16 20 25 Consecutive elements present are[ {7, 8, 9}, {15, 16}, {20}, {25} ] Hence output the result as 7-9 15-16 20 25Input : N = 6, arr=[1... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 26173,
"s": 26067,
"text": "Given an array of integers of size N, The task is to print the consecutive integers as a range.Examples: "
},
{
"code": null,
"e": 26406,
"s": 2617... |
HTML - <table> Tag | The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.
<!DOCTYPE html>
<html>
<head>
<title>HTML table Tag</title>
</head>
<body>
<table border = "1">
<tr>
<th>Team</th>
<th>Ranking</th>
... | [
{
"code": null,
"e": 2499,
"s": 2374,
"text": "The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table."
},
{
"code": null,
"e": 3015,
"s": 2499,
"text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML t... |
Largest Rectangle in a Matrix. How to combine programming techniques | by Shuo Wang | Towards Data Science | As I accumulate more experience in coding and life in general, one of the things among my observations that stood out to me is that, whenever there is a problem to be solved, there usually exists a very intuitive solution to it. Sometimes this solution happens to be efficient, sometimes grossly suboptimal. This is espe... | [
{
"code": null,
"e": 722,
"s": 172,
"text": "As I accumulate more experience in coding and life in general, one of the things among my observations that stood out to me is that, whenever there is a problem to be solved, there usually exists a very intuitive solution to it. Sometimes this solution ha... |
Docker - Containers and Shells | By default, when you launch a container, you will also use a shell command while launching the container as shown below. This is what we have seen in the earlier chapters when we were working with containers.
In the above screenshot, you can observe that we have issued the following command β
sudo docker run βit centos... | [
{
"code": null,
"e": 2549,
"s": 2340,
"text": "By default, when you launch a container, you will also use a shell command while launching the container as shown below. This is what we have seen in the earlier chapters when we were working with containers."
},
{
"code": null,
"e": 2634,
... |
Overload unary minus operator in C++? | The operator keyword declares a function specifying what operator-symbol means when applied to instances of a class. This gives the operator more than one meaning, or "overloads" it. The compiler distinguishes between the different meanings of an operator by examining the types of its operands.
The unary operators oper... | [
{
"code": null,
"e": 1358,
"s": 1062,
"text": "The operator keyword declares a function specifying what operator-symbol means when applied to instances of a class. This gives the operator more than one meaning, or \"overloads\" it. The compiler distinguishes between the different meanings of an oper... |
How to add Google reCAPTCHA to Django forms ? - GeeksforGeeks | 30 May, 2021
This tutorial explains to integrate Googleβs reCaptcha system to your Django site. To create a form in Django you can check out β How to create a form using Django Forms ?
Adding reCaptcha to any HTML form involves the following steps:
Register your site domain to reCaptcha Admin Console.Add recaptcha key... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 24100,
"s": 23927,
"text": "This tutorial explains to integrate Googleβs reCaptcha system to your Django site. To create a form in Django you can check out β How to create a form using Django... |
A quick tutorial on how to deploy your Streamlit app to Heroku. | by Navid Mashinchi | Towards Data Science | Welcome to the step-by-step tutorial on how to deploy your Streamlit app to Heroku. For the past two weeks, I have been working with Streamlit, and I was very impressed with its capabilities. Itβs ideal for sharing your data science project with the world since itβs very straightforward. In this tutorial, I assume you ... | [
{
"code": null,
"e": 1234,
"s": 172,
"text": "Welcome to the step-by-step tutorial on how to deploy your Streamlit app to Heroku. For the past two weeks, I have been working with Streamlit, and I was very impressed with its capabilities. Itβs ideal for sharing your data science project with the worl... |
C# - Multithreading | A thread is defined as the execution path of a program. Each thread defines a unique flow of control. If your application involves complicated and time consuming operations, then it is often helpful to set different execution paths or threads, with each thread performing a particular job.
Threads are lightweight proces... | [
{
"code": null,
"e": 2560,
"s": 2270,
"text": "A thread is defined as the execution path of a program. Each thread defines a unique flow of control. If your application involves complicated and time consuming operations, then it is often helpful to set different execution paths or threads, with each... |
D3.js selection.node() Function - GeeksforGeeks | 21 Dec, 2021
The selection.node() function in D3.js is used to return the first element in the selection. If the selection does not contain any elements then it returns null.
Syntax:
selection.node()
Parameters: This function does not accept any parameters.
Return Values: This function returns the first element in the... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 25463,
"s": 25300,
"text": "The selection.node() function in D3.js is used to return the first element in the selection. If the selection does not contain any elements then it returns null. "... |
Reading and writing files from/to Amazon S3 with Pandas | by Onel Harrison | Feb, 2021 | Towards Data Science | Write pandas data frame to CSV file on S3
> Using boto3
> Using s3fs-supported pandas API
Read a CSV file on S3 into a pandas data frame
> Using boto3
> Using s3fs-supported pandas API
Summary
There is an outstanding issue regarding dependency resolution when both boto3 and s3fs are specified as dependencies in a proje... | [
{
"code": null,
"e": 214,
"s": 172,
"text": "Write pandas data frame to CSV file on S3"
},
{
"code": null,
"e": 228,
"s": 214,
"text": "> Using boto3"
},
{
"code": null,
"e": 262,
"s": 228,
"text": "> Using s3fs-supported pandas API"
},
{
"code": null,... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider three software items: Program-X, Control Flow Diagram of Program-Y and Control Flow Diagram of Program-Z as shown belowThe values of McCabeβs Cyclomatic complexity of Program-X, Program-Y and Program-Z respectively are(A) 4, 4, 7(B) 3, 4, 7(C) 4, 4, 8(D) 4, 3, 8Answer: (A)Explanation:
The cyclomat... | [
{
"code": null,
"e": 24516,
"s": 24488,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24811,
"s": 24516,
"text": "Consider three software items: Program-X, Control Flow Diagram of Program-Y and Control Flow Diagram of Program-Z as shown belowThe values of McCabeβs Cyclomatic c... |
Stylized Facts. What does it take to predict the future... | by Ke Gui | Towards Data Science | Warning: There is no magical formula or Holy Grail here, though a new world might open the door for you.
Identifying OutliersIdentifying Outliers β Part TwoIdentifying Outliers β Part ThreeStylized FactsFeature Engineering & Feature SelectionData TransformationFractionally Differentiated FeaturesData LabellingMeta-labe... | [
{
"code": null,
"e": 277,
"s": 172,
"text": "Warning: There is no magical formula or Holy Grail here, though a new world might open the door for you."
},
{
"code": null,
"e": 510,
"s": 277,
"text": "Identifying OutliersIdentifying Outliers β Part TwoIdentifying Outliers β Part Th... |
Requests - HTTP Requests Headers | In the previous chapter, we have seen how to make the request and get the response. This chapter will explore a little more on the header section of the URL. So, we are going to look into the following β
Understanding Request Headers
Custom Headers
Response Headers
Hit any URL in the browser, inspect it and check in de... | [
{
"code": null,
"e": 2392,
"s": 2188,
"text": "In the previous chapter, we have seen how to make the request and get the response. This chapter will explore a little more on the header section of the URL. So, we are going to look into the following β"
},
{
"code": null,
"e": 2422,
"s... |
Python Program for Print Number series without using any loop | In this article, we will learn about the solution to the problem statement given below β
Problem statement β Given Two number N and K, our problem is to subtract a number K from N until number(N) is greater than zero(0), once the N becomes negative or zero then we start adding K to it until that number become the origi... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below β"
},
{
"code": null,
"e": 1397,
"s": 1151,
"text": "Problem statement β Given Two number N and K, our problem is to subtract a number K from N un... |
Number of paths | Practice | GeeksforGeeks | The problem is to count all the possible paths from top left to bottom right of a MxN matrix with the constraints that from each cell you can either move to right or down.
Example 1:
Input:
M = 3 and N = 3
Output: 6
Explanation:
Let the given input 3*3 matrix is filled
as such:
A B C
D E F
G H I
The possible paths whi... | [
{
"code": null,
"e": 410,
"s": 238,
"text": "The problem is to count all the possible paths from top left to bottom right of a MxN matrix with the constraints that from each cell you can either move to right or down."
},
{
"code": null,
"e": 421,
"s": 410,
"text": "Example 1:"
... |
How to convert a matrix into a matrix with single column in R? | If we have a matrix then we might want to convert it to matrix with single column for some analytical purpose such as multiplying with a vector that has the length equal to the total number of elements as in the matrix. Thus, the matrix can be converted to a single column matrix by using matrix function itself but for ... | [
{
"code": null,
"e": 1444,
"s": 1062,
"text": "If we have a matrix then we might want to convert it to matrix with single column for some analytical purpose such as multiplying with a vector that has the length equal to the total number of elements as in the matrix. Thus, the matrix can be converted... |
SQL Tryit Editor v1.6 | SELECT Orders.OrderID, Employees.LastName, Employees.FirstName
FROM Orders
RIGHT JOIN Employees
ON Orders.EmployeeID = Employees.EmployeeID
ORDER BY Orders.OrderID;
β
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, becau... | [
{
"code": null,
"e": 63,
"s": 0,
"text": "SELECT Orders.OrderID, Employees.LastName, Employees.FirstName"
},
{
"code": null,
"e": 75,
"s": 63,
"text": "FROM Orders"
},
{
"code": null,
"e": 96,
"s": 75,
"text": "RIGHT JOIN Employees"
},
{
"code": null,
... |
How to test if a vector contains the given element in R ? - GeeksforGeeks | 05 Apr, 2021
In this article, letβs discuss how to check a specific element in a vector in R Programming Language.
Method 1: Using loop
A for loop can be used to check if the element belongs to the vector. A boolean flag can be declared and initialized to False. As soon as the element is contained in the vector, the fl... | [
{
"code": null,
"e": 24481,
"s": 24453,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 24583,
"s": 24481,
"text": "In this article, letβs discuss how to check a specific element in a vector in R Programming Language."
},
{
"code": null,
"e": 24604,
"s": 24583,
... |
How to check internet connection in android? | This example demonstrate about how to check the state of internet connection through broadcast Receiver.
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 β To find the internet status we have to add network state permission to Androi... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "This example demonstrate about how to check the state of internet connection through broadcast Receiver."
},
{
"code": null,
"e": 1296,
"s": 1167,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and... |
Image Processing with Python β Blob Detection using Scikit-Image | by Tonichi Edeza | Towards Data Science | One of the most important skills a data scientist needs when working with images is being able to identify specific parts of the image. An image only becomes useful if specific points of interest can be identified and itemized. In this article we will learn how to do just that.
Letβs get started!
As always let us first... | [
{
"code": null,
"e": 451,
"s": 172,
"text": "One of the most important skills a data scientist needs when working with images is being able to identify specific parts of the image. An image only becomes useful if specific points of interest can be identified and itemized. In this article we will lea... |
How to remove white spaces from a string using jQuery ? | 22 Mar, 2021
In this article, we will see how to remove the white spaces from string using jQuery. To remove the white spaces, we will use trim() method. The trim() method is used to remove the white spaces from the beginning and end of a string.
Syntax:
jQuery.trim( str )
Parameters: This method accepts a single param... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "In this article, we will see how to remove the white spaces from string using jQuery. To remove the white spaces, we will use trim() method. The trim() method is used to remov... |
Message Dialogs in Java (GUI) | 26 Oct, 2021
Message dialogs provide information to the user. Message dialogs are created with the JOptionPane.showMessageDialog() method.
We call the static showMessageDialog() method of the JOptionPane class to create a message dialog. We provide the dialogβs parent, message text, title, and message type. The message... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 180,
"s": 54,
"text": "Message dialogs provide information to the user. Message dialogs are created with the JOptionPane.showMessageDialog() method."
},
{
"code": null,
"e": 404,
"s... |
Sequence Alignment problem | 18 Feb, 2022
Given as an input two strings, = , and = , output the alignment of the strings, character by character, so that the net penalty is minimized. The penalty is calculated as: 1. A penalty of occurs if a gap is inserted between the string. 2. A penalty of occurs for mis-matching the characters of and .
Example... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 352,
"s": 52,
"text": "Given as an input two strings, = , and = , output the alignment of the strings, character by character, so that the net penalty is minimized. The penalty is calculated as: 1.... |
How to change the style of alert box using CSS ? | 12 Jun, 2022
An alert box is an important feature of JavaScript. It is used to inform the client or the user about the click events. Like if the user subscribes to your page for daily updates then you can wish them back, or thank them by showing an alert box message. Sometimes developers like us do not want to just sho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 623,
"s": 28,
"text": "An alert box is an important feature of JavaScript. It is used to inform the client or the user about the click events. Like if the user subscribes to your page for daily upda... |
ByteBuffer putInt() methods in Java with Examples | 27 Jun, 2019
The putInt(int value) method of java.nio.ByteBuffer Class is used to write four bytes containing the given int value, in the current byte order, into this buffer at the current position, and then increments the position by four.
Syntax :
public abstract ByteBuffer putInt(int value)
Parameters: This method ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jun, 2019"
},
{
"code": null,
"e": 257,
"s": 28,
"text": "The putInt(int value) method of java.nio.ByteBuffer Class is used to write four bytes containing the given int value, in the current byte order, into this buffer at the curren... |
Working with CSV Files in Julia | 17 Jan, 2022
CSV file (Comma-separated values file) is a plain text file that uses commas to separate values and fields. It is majorly used to store data in the form of tables or spreadsheets. Each row of a table or spreadsheet is a record filled with data that belongs to n fields (or Columns). It is used to import or ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "CSV file (Comma-separated values file) is a plain text file that uses commas to separate values and fields. It is majorly used to store data in the form of tables or spreadshe... |
String Alignment in Python f-string | 28 Jul, 2020
Text Alignment in Python is useful for printing out clean formatted output. Some times the data to be printed varies in length which makes it look messy when printed. By using String Alignment the output string can be aligned by defining the alignment as left, right or center and also defining space (width... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 364,
"s": 28,
"text": "Text Alignment in Python is useful for printing out clean formatted output. Some times the data to be printed varies in length which makes it look messy when printed. By using... |
Java Program for Maximum circular subarray sum | 29 Dec, 2021
Given n numbers (both +ve and -ve), arranged in a circle, find the maximum sum of consecutive numbers.
Examples:
Input: a[] = {8, -8, 9, -9, 10, -11, 12}
Output: 22 (12 + 8 - 8 + 9 - 9 + 10)
Input: a[] = {10, -3, -4, 7, 6, 5, -4, -1}
Output: 23 (7 + 6 + 5 - 4 -1 + 10)
Input: a[] = {-1, 40, -14, 7, 6... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "Given n numbers (both +ve and -ve), arranged in a circle, find the maximum sum of consecutive numbers. "
},
{
"code": null,
"e": 143,
"s": 132,
"text": "Ex... |
Chinese Postman or Route Inspection | Set 1 (introduction) | 07 Jul, 2022
Chinese Postman Problem is a variation of Eulerian circuit problem for undirected graphs. An Euler Circuit is a closed walk that covers every edge once starting and ending position is same. Chinese Postman problem is defined for connected and undirected graph. The problem is to find shortest path or circui... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 414,
"s": 52,
"text": "Chinese Postman Problem is a variation of Eulerian circuit problem for undirected graphs. An Euler Circuit is a closed walk that covers every edge once starting and ending po... |
How to create a nested webpage in HTML ? | 25 Aug, 2021
When the content of one completely different webpage is embedded into another webpage, it is called a nested webpage. In simple words, a webpage that is inside another webpage of a completely different domain.
In this article, we are going to learn how to create a nested webpage. There are two methods to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 238,
"s": 28,
"text": "When the content of one completely different webpage is embedded into another webpage, it is called a nested webpage. In simple words, a webpage that is inside another webpage... |
How to get the Response status code in Golang? | Response status codes are the numbers that we get in response that signify what type of response we received from the server when we asked for something from it.
There are different status codes that one gets from the response, and these are mainly divided into five categories.
Generally, the status codes are divided i... | [
{
"code": null,
"e": 1349,
"s": 1187,
"text": "Response status codes are the numbers that we get in response that signify what type of response we received from the server when we asked for something from it."
},
{
"code": null,
"e": 1466,
"s": 1349,
"text": "There are different ... |
How to create a multi-page website using React.js ? | 06 Jan, 2022
In this article, we will see how to create a simple multipage website using React Js.
Prerequisite:
npmcreate-react-appreact-router-domstyled components
npm
create-react-app
react-router-dom
styled components
Approach: We will create a simple website that will have different pages and a navbar. We will cre... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 140,
"s": 54,
"text": "In this article, we will see how to create a simple multipage website using React Js."
},
{
"code": null,
"e": 154,
"s": 140,
"text": "Prerequisite:"
},... |
Find the number of valid parentheses expressions of given length | 03 Nov, 2021
Given a number n find the number of valid parentheses expressions of that length. Examples :
Input: 2
Output: 1
There is only possible valid expression of length 2, "()"
Input: 4
Output: 2
Possible valid expression of length 4 are "(())" and "()()"
Input: 6
Output: 5
Possible valid expressions are (... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 149,
"s": 54,
"text": "Given a number n find the number of valid parentheses expressions of that length. Examples : "
},
{
"code": null,
"e": 402,
"s": 149,
"text": "Input: 2\n... |
PHP | imagepng() Function | 29 Oct, 2021
The imagepng() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to PNG and applying filters to the image.
Syntax:
bool imagepng( resource $image, int $to, int $quality, in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 270,
"s": 28,
"text": "The imagepng() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, conv... |
Spring Framework Annotations | 15 Dec, 2021
Spring framework is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and scalable enterprise applications. This framework mainly focuses on providing various ways to help you manage your business objects. Now ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 823,
"s": 53,
"text": "Spring framework is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and sca... |
Node.js NPM uuid | 08 Apr, 2022
NPM(Node Package Manager) is a package manager of Node.js packages. There is an NPM package called βshortidβ used to create short non-sequential url-friendly unique ids. Unique ids are created by Cryptographically-strong random values thatβs why it is very secure. It has support for cross-platform like Nod... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 382,
"s": 28,
"text": "NPM(Node Package Manager) is a package manager of Node.js packages. There is an NPM package called βshortidβ used to create short non-sequential url-friendly unique ids. Uniqu... |
HTML <u> Tag | 17 Mar, 2022
The <u> tag in HTML stands for underline, and itβs used to underline the text enclosed within the <u> tag. This tag is generally used to underline misspelled words. This tag requires a starting as well as ending tag.
Syntax:
<u> Contents... </u>
Note: This tag is depreciated from HTML 4.1 and redefined i... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 270,
"s": 53,
"text": "The <u> tag in HTML stands for underline, and itβs used to underline the text enclosed within the <u> tag. This tag is generally used to underline misspelled words. This tag ... |
PostgreSQL β CREATE TABLESPACE | 08 Feb, 2021
In PostgreSQL a tablespace is used to map a logical name to a physical location on disk. In the simplest word, we can understand tablespace as a location on the disk where all database objects of PostgreSQL are stored. These objects can be an index or a table etc.
PostgreSQL has two default tablespaces:
pg... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 293,
"s": 28,
"text": "In PostgreSQL a tablespace is used to map a logical name to a physical location on disk. In the simplest word, we can understand tablespace as a location on the disk where all... |
βthisβ reference in Java | 27 Jul, 2021
βthisβ is a reference variable that refers to the current object.
Following are the ways to use βthisβ keyword in java :1. Using βthisβ keyword to refer current class instance variables
Java
//Java code for using 'this' keyword to//refer current class instance variablesclass Test{ int a; int b; ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 118,
"s": 52,
"text": "βthisβ is a reference variable that refers to the current object."
},
{
"code": null,
"e": 238,
"s": 118,
"text": "Following are the ways to use βthisβ ke... |
How to create array using given columns, rows, and tables in R ? | 24 Sep, 2021
In this article, we will discuss how to create an array using given columns, rows, and tables in R Programming Language. The array is created using the array() function.
Syntax: Array(vector.., dim=c(row, columns, tables))
Parameter:
x: vector
dim: values used to create array
Example 1: Creating a simple a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 198,
"s": 28,
"text": "In this article, we will discuss how to create an array using given columns, rows, and tables in R Programming Language. The array is created using the array() function."
},... |
Nested Interface in Java | 30 Aug, 2018
We can declare interfaces as member of a class or another interface. Such an interface is called as member interface or nested interface.
Interface in a classInterfaces (or classes) can have only public and default access specifiers when declared outside any other class (Refer this for details). This inter... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Aug, 2018"
},
{
"code": null,
"e": 192,
"s": 54,
"text": "We can declare interfaces as member of a class or another interface. Such an interface is called as member interface or nested interface."
},
{
"code": null,
"e":... |
File Objects in Python | 03 Apr, 2017
A file object allows us to use, access and manipulate all the user accessible files. One can read and write any such files.When a file operation fails for an I/O-related reason, the exception IOError is raised. This includes situations where the operation is not defined for some reason, like seek() on a tt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Apr, 2017"
},
{
"code": null,
"e": 415,
"s": 28,
"text": "A file object allows us to use, access and manipulate all the user accessible files. One can read and write any such files.When a file operation fails for an I/O-related reaso... |
How to change any data type into a String in Python? | 24 Jul, 2020
Python defines type conversion functions to directly convert one data type to another which is useful in day to day and competitive programming. A string is a sequence of characters. Strings are amongst the most popular types in Python. We can create them simply by enclosing characters in quotes.
Example :... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "Python defines type conversion functions to directly convert one data type to another which is useful in day to day and competitive programming. A string is a sequence of char... |
How To Fold Legend into Two Rows in ggplot2 in R | 14 Sep, 2021
In this article, we are going to see how to draw a ggplot2 legend with two Rows in R Programming Language.
If we want to draw ggplot2 Legend with two rows, we have to add guides and guide_legend functions to the theme() function. Inside guides() function, we take parameter named color, which has call to gu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 135,
"s": 28,
"text": "In this article, we are going to see how to draw a ggplot2 legend with two Rows in R Programming Language."
},
{
"code": null,
"e": 374,
"s": 135,
"text": ... |
Working with the Python Debugger | 22 Jun, 2020
Python Debugger may be a new word for the beginner developers . In this post , we will try to explain the meaning of Debugging and Debugging with Python .
Debugging means the complete control over the program execution. Developers use debugging to overcome program from any bad issues. So debugging is a he... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 208,
"s": 52,
"text": "Python Debugger may be a new word for the beginner developers . In this post , we will try to explain the meaning of Debugging and Debugging with Python . "
},
{
"cod... |
How to Generate Barcode in Python? | 05 Sep, 2020
In this article, we are going to write a short script to generate barcodes using Python. Weβll be using the python-barcode module which is a fork of the pyBarcode module. This module provides us the functionality to generate barcodes in SVG format. Pillow is required to generate barcodes in image formats (... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 381,
"s": 53,
"text": "In this article, we are going to write a short script to generate barcodes using Python. Weβll be using the python-barcode module which is a fork of the pyBarcode module. Thi... |
Select Subset of DataTable Columns in R | 23 Sep, 2021
In this article, we will discuss how to select a subset of data table columns in R programming language.
Letβs create a data table using a matrix. First, we need to load data.table package in the working space.
Installation
install.packages(βdata.tableβ)
Loading
library(βdata.table... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "In this article, we will discuss how to select a subset of data table columns in R programming language."
},
{
"code": null,
"e": 239,
"s": 133,
"text": "L... |
jQuery UI Button disable() Method | 21 Dec, 2021
jQuery UI consists of GUI widgets, visual effects, and themes implemented using HTML, CSS, and jQuery. jQuery UI is great for building UI interfaces for the webpages. The jQuery UI Button disable() method is used to disable the button widget. It does not accept any parameter.
Syntax:
$(".selector").button(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using HTML, CSS, and jQuery. jQuery UI is great for building UI interfaces for the webpages. The jQue... |
Neo4j Create Index | 06 Jun, 2021
In neo4j you can create index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special features in neo4j indexing once you create indexing that index will manage itself and keep it up to date whenever changes made on the data... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 405,
"s": 28,
"text": "In neo4j you can create index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special featur... |
Rotation of colorbar tick labels in Matplotlib | 24 Jan, 2021
Colorbar is an axis that indicates the mapping of data values to the colors used in plot. The colorbar() function in pyplot module of matplotlib adds a colorbar to a plot indicating the color scale.
Typical Colorbar
Sometimes it is desirable to rotate the ticklabels for better visualization and understandi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "Colorbar is an axis that indicates the mapping of data values to the colors used in plot. The colorbar() function in pyplot module of matplotlib adds a colorbar to a plot indi... |
Ruby | Hash fetch function | 07 Jan, 2020
Hash#fetch() is a Hash class method which returns a value from the hash for the given key. With no other arguments, it will raise a KeyError exception.
Syntax: Hash.fetch()
Parameter: Hash values
Return: value from the hash for the given key
Example #1 :
# Ruby code for Hash.fetch() method # declaring Has... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 180,
"s": 28,
"text": "Hash#fetch() is a Hash class method which returns a value from the hash for the given key. With no other arguments, it will raise a KeyError exception."
},
{
"code": n... |
10 Useful Jupyter Notebook Extensions for a Data Scientist in 2021 | Towards Data Science | Every Data Scientist spends most of his time in data visualization, preprocessing and model tuning based on the results. These are the toughest situations for every Data Scientist because you will get a good model when you perform all these three steps precisely. There are 10 very helpful jupyter notebook extensions to... | [
{
"code": null,
"e": 522,
"s": 172,
"text": "Every Data Scientist spends most of his time in data visualization, preprocessing and model tuning based on the results. These are the toughest situations for every Data Scientist because you will get a good model when you perform all these three steps pr... |
Python Program to Flatten a Nested List using Recursion - GeeksforGeeks | 14 Aug, 2021
Given a nested list, the task is to write a python program to flatten a nested list using recursion.
Examples:
Input: [[8, 9], [10, 11, βgeeksβ], [13]]
Output: [8, 9, 10, 11, βgeeksβ, 13]
Input: [[βAβ, βBβ, βCβ], [βDβ, βEβ, βFβ]]
Output: [βAβ, βBβ, βCβ, βDβ, βEβ, βFβ]
Step-by-step Approach:
Firstly, we try... | [
{
"code": null,
"e": 24236,
"s": 24208,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 24337,
"s": 24236,
"text": "Given a nested list, the task is to write a python program to flatten a nested list using recursion."
},
{
"code": null,
"e": 24347,
"s": 24337,
... |
A Really Simple Way to Edit Row by Row in a Pandas DataFrame | by Byron Dolon | Towards Data Science | Have you ever needed to edit each row in a table based on some conditions?
Itβs a common task for data analysis projects. I used to search StackOverflow for a solution every time I needed to do this. Finally, I read the Pandas documentation and created a template that works every time I need to edit data row by row.
He... | [
{
"code": null,
"e": 247,
"s": 172,
"text": "Have you ever needed to edit each row in a table based on some conditions?"
},
{
"code": null,
"e": 490,
"s": 247,
"text": "Itβs a common task for data analysis projects. I used to search StackOverflow for a solution every time I neede... |
How to copy files of the specific extension using PowerShell? | To copy the files using the specific files extension using PowerShell, we can use the Copy-Item command.
The below command will copy only the .ps1 files from the source to the destination.
For example,
PS C:\> Copy-Item -Path C:\Temp -Recurse -Filter *.ps1 -Destination C:\Temp1\ -Verbose
If the C:\Temp1 doesn't exist, ... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To copy the files using the specific files extension using PowerShell, we can use the Copy-Item command."
},
{
"code": null,
"e": 1251,
"s": 1167,
"text": "The below command will copy only the .ps1 files from the source to the destin... |
C | String | Question 9 - GeeksforGeeks | 28 Jun, 2021
Consider the following C program segment:
char p[20]; char *s = "string"; int length = strlen(s); int i; for (i = 0; i < length; i++) p[i] = s[length β i]; printf("%s", p);
The output of the program is? (GATE CS 2004)(A) gnirts(B) gnirt(C) string(D) no output is printedAnswer: (D)Explanation: Let us co... | [
{
"code": null,
"e": 24058,
"s": 24030,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24100,
"s": 24058,
"text": "Consider the following C program segment:"
},
{
"code": "char p[20]; char *s = \"string\"; int length = strlen(s); int i; for (i = 0; i < length; i++) ... |
UDDI - Data Model | UDDI includes an XML Schema that describes the following data structures β
businessEntity
businessService
bindingTemplate
tModel
publisherAssertion
The business entity structure represents the provider of web services. Within the UDDI registry, this structure contains information about the company itself, including con... | [
{
"code": null,
"e": 2014,
"s": 1939,
"text": "UDDI includes an XML Schema that describes the following data structures β"
},
{
"code": null,
"e": 2029,
"s": 2014,
"text": "businessEntity"
},
{
"code": null,
"e": 2045,
"s": 2029,
"text": "businessService"
},... |
Sum and Product of digits in a number that divide the number | 22 Apr, 2021
Given a positive integer N. The task is to find sum and product of digits of the number which evenly divides the number n.Examples:
Input: N = 12
Output: Sum = 3, product = 2
1 and 2 divide 12. So, their sum is 3 and product is 2.
Input: N = 1012
Output: Sum = 4, product = 2
1, 1 and 2 divide 1012.
Ap... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "Given a positive integer N. The task is to find sum and product of digits of the number which evenly divides the number n.Examples: "
},
{
"code": null,
"e": 331,... |
Print given sentence into its equivalent ASCII form | 07 Jul, 2022
Given a string containing words forming a sentence(belonging to english language). The task is to output the equivalent ASCII sentence of the input sentence. ASCII form of a sentence is the conversion of each of the character of the input string and aligning them in position of characters present in the st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "Given a string containing words forming a sentence(belonging to english language). The task is to output the equivalent ASCII sentence of the input sentence. ASCII form of a s... |
HTML | DOM onsubmit Event | 08 Mar, 2022
The onsubmit event in HTML DOM occurs after submission of a form. The form tag supports this event.Supported HTML Tags:
<form>
Syntax:
In HTML:
<element onsubmit="Script">
In JavaScript:
object.onsubmit = function(){myScript};
In JavaScript, using the addEventListener() method:
object.addEventList... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "The onsubmit event in HTML DOM occurs after submission of a form. The form tag supports this event.Supported HTML Tags: "
},
{
"code": null,
"e": 156,
"s": 149... |
How to instantiate Struct Pointer Address Operator in Golang? | 20 Aug, 2021
As pointers are the special variables that are used to store the memory address of another variable whereas, the struct is user-defined data type that consists of different types. A struct is mainly a holder for all other data types. By using a pointer to a struct we can easily manipulate/access the data a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 536,
"s": 28,
"text": "As pointers are the special variables that are used to store the memory address of another variable whereas, the struct is user-defined data type that consists of different ty... |
What is global installation of dependencies in Node.js ? | 29 Jul, 2021
The global installation of dependencies in Node.js is putting global packages in a single place in the system exactly where it depends on your setup, regardless of where you run the command npm install -g <package-name> to install dependencies.
Installing the local dependencies means the module will be ava... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 299,
"s": 54,
"text": "The global installation of dependencies in Node.js is putting global packages in a single place in the system exactly where it depends on your setup, regardless of where you ... |
Rexx - substr String | This method gets a sub string from a particular string.
substr(string1,index,count)
string1 β The source string.
string1 β The source string.
index β The starting index position for the sub string.
index β The starting index position for the sub string.
count β The number of characters for the sub string.
count β The... | [
{
"code": null,
"e": 2529,
"s": 2473,
"text": "This method gets a sub string from a particular string."
},
{
"code": null,
"e": 2559,
"s": 2529,
"text": "substr(string1,index,count) \n"
},
{
"code": null,
"e": 2588,
"s": 2559,
"text": "string1 β The source str... |
Python Program to Print matrix in antispiral form | 06 Jan, 2022
Given a 2D array, the task is to print matrix in anti spiral form:Examples:
Output: 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Input : arr[][4] = {1, 2, 3, 4
5, 6, 7, 8
9, 10, 11, 12
13, 14, 15, 16};
Output : 10 11 7 6 5 9 13 14 15 16 12 8 4 3 2 1
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 106,
"s": 28,
"text": "Given a 2D array, the task is to print matrix in anti spiral form:Examples: "
},
{
"code": null,
"e": 154,
"s": 106,
"text": "Output: 16 15 14 13 12 11 10... |
PyQt5 β How to auto resize Label | adjustSize QLabel | 26 Mar, 2020
During the designing of the GUI (Graphical User Interface) application there is a need to display plain text as information where label is used, but sometimes information text could be large or much smaller and it is difficult to use resize() method so have to auto adjust the size of the label according to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 397,
"s": 28,
"text": "During the designing of the GUI (Graphical User Interface) application there is a need to display plain text as information where label is used, but sometimes information text... |
How to set FlowLayout for JFrame in Java? | To set FlowLayout for a frame, use the Container. At first, set a JFrame β
JFrame frame = new JFrame();
Now, use Container and set the layout as FlowLayoutβ
Container container
container = frame.getContentPane();
container.setLayout(new FlowLayout());
The following is an example to set FlowLayout for JFrame β
package m... | [
{
"code": null,
"e": 1262,
"s": 1187,
"text": "To set FlowLayout for a frame, use the Container. At first, set a JFrame β"
},
{
"code": null,
"e": 1291,
"s": 1262,
"text": "JFrame frame = new JFrame();"
},
{
"code": null,
"e": 1344,
"s": 1291,
"text": "Now, us... |
How to check if the PyMongo Cursor is Empty? | 10 Jul, 2020
MongoDB is an open source NOSQL database, and is implemented in C++. It is a document oriented database implementation that stores data in structures called Collections (group of MongoDB documents). PyMongo is a famous open source library that is used for embedded MongoDB queries. PyMongo is widely used fo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 440,
"s": 28,
"text": "MongoDB is an open source NOSQL database, and is implemented in C++. It is a document oriented database implementation that stores data in structures called Collections (group... |
Reading and Writing Data to Excel File in Java using Apache POI | 03 Jul, 2022
In Java, reading an Excel file is not similar to reading a Word file because of cells in an Excel file. JDK does not provide a direct API to read data from Excel files for which we have to toggle to a third-party library that is Apache POI. Apache POI is an open-source java library designed for reading and... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 910,
"s": 28,
"text": "In Java, reading an Excel file is not similar to reading a Word file because of cells in an Excel file. JDK does not provide a direct API to read data from Excel files for whi... |
JavaFX | TitledPane Class | 26 Sep, 2018
TitledPane class is a part of JavaFX. TitledPane class creates a panel with a title which can be opened or closed. TitledPane class extends the Labeled class.
Constructor of the class:
TitledPane(): Creates a new TitledPane object.
TitledPane(String t, Node n): Creates a new TitledPane object with specifie... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2018"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "TitledPane class is a part of JavaFX. TitledPane class creates a panel with a title which can be opened or closed. TitledPane class extends the Labeled class."
},
{
"c... |
Recoverability in DBMS | 28 Jun, 2021
Prerequisite:
Introduction to Concurrency Control
Types of Schedules
As discussed, a transaction may not execute completely due to hardware failure, system crash or software issues. In that case, we have to roll back the failed transaction. But some other transaction may also have used values produced by t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 66,
"s": 52,
"text": "Prerequisite:"
},
{
"code": null,
"e": 102,
"s": 66,
"text": "Introduction to Concurrency Control"
},
{
"code": null,
"e": 121,
"s": 102,
... |
Validate the size of input=file in HTML5? | You can try to run the following code to validate the size of input type file:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<form >
<input type="file" id="myfile" data-max-size="321... | [
{
"code": null,
"e": 1266,
"s": 1187,
"text": "You can try to run the following code to validate the size of input type file:"
},
{
"code": null,
"e": 2148,
"s": 1266,
"text": "<!DOCTYPE html>\n <html>\n <head>\n <script src=\"http://ajax.googleapis.com/ajax/libs/j... |
Optional filter() method in Java with examples | 30 Jul, 2019
The filter() method of java.util.Optional class in Java is used to filter the value of this Optional instance by matching it with the given Predicate, and then return the filtered Optional instance. If there is no value present in this Optional instance, then this method returns an empty Optional instance.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "The filter() method of java.util.Optional class in Java is used to filter the value of this Optional instance by matching it with the given Predicate, and then return the filt... |
Internationalization(I18N) in Java | 17 Dec, 2021
Internationalization(I18N) is the process of designing web applications in such a way that which provides support for various countries, various languages, and various currencies automatically without performing any change in the application is called Internationalization(I18N). It is known as I18N because... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 419,
"s": 52,
"text": "Internationalization(I18N) is the process of designing web applications in such a way that which provides support for various countries, various languages, and various curren... |
How to use getters/setters in TypeScript ? | 26 Jul, 2021
In TypeScript, there are two supported methods getter and setter to access and set the class members. In this very short article, Iβm going to show you Typescript Accessor which includes getters/setters method.
Actually, getters and setters are nothing but a way for you to provide access to the properties ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 264,
"s": 53,
"text": "In TypeScript, there are two supported methods getter and setter to access and set the class members. In this very short article, Iβm going to show you Typescript Accessor wh... |
How to disable a form control in Angular ? | 24 May, 2021
In this article, we are going to see how to disable a form control in Angular 10. We will use AbstractControl disabled property to disable a form control element.
Syntax:
<formelement disabled></formelement>
Return Value:
boolean: returns boolean stating whether the element is disabled or not.
Approach:
C... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "In this article, we are going to see how to disable a form control in Angular 10. We will use AbstractControl disabled property to disable a form control element."
},
{
... |
Difference between friend function and member function in C++ | 12 Jun, 2022
Friend Function: It is basically a function that is used to access all private and protected members of classes. It is considered as a non-member function of class and is declared by the class that is granting access. This function is prefixed using the friend keyword in the declaration as shown below:
Cla... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 358,
"s": 54,
"text": "Friend Function: It is basically a function that is used to access all private and protected members of classes. It is considered as a non-member function of class and is dec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.