title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Powerful One-Liner Python codes - GeeksforGeeks | 17 Feb, 2021
Python is a widely-used general-purpose, high-level programming language. Python programs generally are smaller than other programming languages like Java. Programmers have to type relatively less and indentation requirements of the language makes them readable all the time. However, Python programs can be... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 25966,
"s": 25563,
"text": "Python is a widely-used general-purpose, high-level programming language. Python programs generally are smaller than other programming languages like Java. Program... |
ReactJS Blueprint Checkbox Component - GeeksforGeeks | 08 Apr, 2022
BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Checkbox Component provides a way for users to toggle between checked, unchecked, and indeterminate states. We can use the following ... | [
{
"code": null,
"e": 26557,
"s": 26529,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 26933,
"s": 26557,
"text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app... |
Finding roots of a quadratic equation – JavaScript | We are required to write a JavaScript function that takes in three numbers (representing the coefficient of quadratic term, coefficient of linear term and the constant respectively in a quadratic quadratic).
And we are required to find the roots, (if they are real roots) otherwise we have to return false. Let's write t... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in three numbers (representing the coefficient of quadratic term, coefficient of linear term and the constant respectively in a quadratic quadratic)."
},
{
"code": null,
"e": 1408,
... |
Differential or Derivatives in MATLAB - GeeksforGeeks | 23 Aug, 2021
Differentiation of a function y = f(x) tells us how the value of y changes with respect to change in x. It can also be termed as the slope of a function.
Derivative of a function f(x) wrt to x is represented as
MATLAB allows users to calculate the derivative of a function using diff() method. Different sy... | [
{
"code": null,
"e": 24566,
"s": 24538,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 24720,
"s": 24566,
"text": "Differentiation of a function y = f(x) tells us how the value of y changes with respect to change in x. It can also be termed as the slope of a function."
},
{... |
Kalman Filter(3) — Localisation in Continuous State Space | by Jeremy Zhang | Towards Data Science | In past sessions, we tried to do localisation in a grid world, where our robot has different probabilities locating in different cells. In a word, the state space is discrete. To generalise the problem setting to continuous state space, we will get to the core of kalman filter.
Before we get to any details of kalman fi... | [
{
"code": null,
"e": 326,
"s": 47,
"text": "In past sessions, we tried to do localisation in a grid world, where our robot has different probabilities locating in different cells. In a word, the state space is discrete. To generalise the problem setting to continuous state space, we will get to the ... |
Sum of the Tan(x) expansion upto N terms - GeeksforGeeks | 14 Apr, 2021
Given two integers N and X. The task is to find the sum of tan(x) series up to N terms.The series :
x + x3/3 + 2x5/15 + 17x7/315 + 62x9/2835........
Examples:
Input : N = 6, X = 1 Output :The value from the expansion is 1.55137626113259Input : N = 4, X = 2 Output :The value from the expansion is 1.5206... | [
{
"code": null,
"e": 26072,
"s": 26044,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 26174,
"s": 26072,
"text": "Given two integers N and X. The task is to find the sum of tan(x) series up to N terms.The series : "
},
{
"code": null,
"e": 26223,
"s": 26174,
... |
Python - Itertools.accumulate() - GeeksforGeeks | 31 Mar, 2020
Python itertools module is a collection of tools for handling iterators.
According to the official documentation:
“Module [that] implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML... Together, they form an ‘iterator algebra’ making it possible to construct spe... | [
{
"code": null,
"e": 24522,
"s": 24494,
"text": "\n31 Mar, 2020"
},
{
"code": null,
"e": 24595,
"s": 24522,
"text": "Python itertools module is a collection of tools for handling iterators."
},
{
"code": null,
"e": 24636,
"s": 24595,
"text": "According to the ... |
Firebase - Detaching Callbacks | This chapter will show you how to detach callbacks in Firebase.
Let us say we want to detach a callback for a function with value event type.
var playersRef = firebase.database().ref("players/");
ref.on("value", function(data) {
console.log(data.val());
}, function (error) {
console.log("Error: " + error.code);
... | [
{
"code": null,
"e": 2230,
"s": 2166,
"text": "This chapter will show you how to detach callbacks in Firebase."
},
{
"code": null,
"e": 2308,
"s": 2230,
"text": "Let us say we want to detach a callback for a function with value event type."
},
{
"code": null,
"e": 249... |
Create a QR code generator app using ReactJS - GeeksforGeeks | 27 Aug, 2021
Introduction: In this article, we are going to make a simple QR Code generator app. QR code is a two-dimensional barcode readable on smartphones. Allows coding of more than 4000 characters in a double-barcode bar. QR codes can be used to show text to a user, to open a URL, to keep contact in an address boo... | [
{
"code": null,
"e": 26667,
"s": 26639,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 26998,
"s": 26667,
"text": "Introduction: In this article, we are going to make a simple QR Code generator app. QR code is a two-dimensional barcode readable on smartphones. Allows coding of ... |
C# | Char.IsSymbol() Method - GeeksforGeeks | 31 Jan, 2019
In C#, Char.IsSymbol() is a System.Char struct method which is used to check whether a Unicode character is a valid symbol defined under UnicodeCategory as MathSymbol, CurrencySymbol, ModifierSymbol, or OtherSymbol or not. This method can be overloaded by passing different types and number of arguments to ... | [
{
"code": null,
"e": 23726,
"s": 23698,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24037,
"s": 23726,
"text": "In C#, Char.IsSymbol() is a System.Char struct method which is used to check whether a Unicode character is a valid symbol defined under UnicodeCategory as MathSym... |
How to remove underscore from column names of an R data frame? | When we import data from outside sources then the header or column names might be imported with underscore separated values and this is also possible if the original data has the same format. Therefore, to make the headers shorter and look better we would prefer to remove the underscore sign and this can be easily done... | [
{
"code": null,
"e": 1415,
"s": 1062,
"text": "When we import data from outside sources then the header or column names might be imported with underscore separated values and this is also possible if the original data has the same format. Therefore, to make the headers shorter and look better we wou... |
Math.Pow() Method in C# | The Math.Pow() method in C# is used to compute a number raised to the power of some other number.
Following is the syntax −
public static double Pow(double val1, double val2)
Above, val1 is a double-precision floating-point number to be raised to a power., whereas val2 is a double-precision floating-point number that s... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "The Math.Pow() method in C# is used to compute a number raised to the power of some other number."
},
{
"code": null,
"e": 1186,
"s": 1160,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1237,
"s": 1186,
... |
Robot Return to Origin in C++ | Suppose there is a robot and its starting position is (0, 0). If we have a sequence of its movements, we have to check whether this robot ends up at (0, 0) after it completes its moves.
The move sequence is given as a string, and the character moves[i] represents its ith move. Symbols are R for right, L for left, U for... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "Suppose there is a robot and its starting position is (0, 0). If we have a sequence of its movements, we have to check whether this robot ends up at (0, 0) after it completes its moves."
},
{
"code": null,
"e": 1512,
"s": 1248,
"text... |
How to ceate right justified JTextField in Java? | To create right justified JTextField, set the alignment to be RIGHT. Here, we will be using the setHorizontalAlignment() method as well and within that the alignment would be set.
Create a JTextField −
JTextField emailId = new JTextField(20);
Now, align it to the right −
emailId.setHorizontalAlignment(JTextField.RIGHT)... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "To create right justified JTextField, set the alignment to be RIGHT. Here, we will be using the setHorizontalAlignment() method as well and within that the alignment would be set."
},
{
"code": null,
"e": 1264,
"s": 1242,
"text": "Cr... |
1st to Kth shortest path lengths from node 1 to N in given Graph - GeeksforGeeks | 28 Oct, 2021
Given a directed and weighted graph of N nodes and M edges, the task is to find the 1st to Kth shortest path lengths from node 1 to N.
Examples:
Input: N = 4, M = 6, K = 3, edges = {{1, 2, 1}, {1, 3, 3}, {2, 3, 2}, {2, 4, 6}, {3, 2, 8}, {3, 4, 1}}Output: 4 4 7Explanation: The shortest path length from 1 to... | [
{
"code": null,
"e": 25010,
"s": 24982,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 25145,
"s": 25010,
"text": "Given a directed and weighted graph of N nodes and M edges, the task is to find the 1st to Kth shortest path lengths from node 1 to N."
},
{
"code": null,
... |
Fruit Into Baskets in C++ | Suppose we have a row of trees, the i-th tree produces fruit with type tree[i]. we can start at any tree of our choice, then repeatedly perform these steps −
Add one piece of fruit from this tree to our baskets. If there is no chance, then stop.
Move to the next tree to the right of the current one. If there is no tree... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "Suppose we have a row of trees, the i-th tree produces fruit with type tree[i]. we can start at any tree of our choice, then repeatedly perform these steps −"
},
{
"code": null,
"e": 1308,
"s": 1220,
"text": "Add one piece of fruit f... |
Python - FTP | FTP or File Transfer Protocol is a well-known network protocol used to transfer files between computers in a network.
It is created on client server architecture and can be used along with user authentication. It can also be used without authentication but that
will be less secure. FTP connection which maintains a cu... | [
{
"code": null,
"e": 2843,
"s": 2326,
"text": "FTP or File Transfer Protocol is a well-known network protocol used to transfer files between computers in a network. \nIt is created on client server architecture and can be used along with user authentication. It can also be used without authenticatio... |
Left justify output in Java | Including a minus sign after the %, makes it left justified.
Note − By default, output is right justified
Firstly, create a formatter object −
Formatter f = new Formatter();
Now, use the format() method to left justify output −
f.format("|%-15.5f|", 299.675796)
The following is an example −
Live Demo
import java.util.... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "Including a minus sign after the %, makes it left justified."
},
{
"code": null,
"e": 1168,
"s": 1123,
"text": "Note − By default, output is right justified"
},
{
"code": null,
"e": 1205,
"s": 1168,
"text": "First... |
Compute the histogram of a set of data using NumPy in Python - GeeksforGeeks | 05 Sep, 2020
Numpy provides us the feature to compute the Histogram for the given data set using NumPy.histogram() function. The formation of histogram depends on the data set, whether it is predefined or randomly generated.
Syntax : numpy.histogram(data, bins=10, range=None, normed=None, weights=None, density=None)
Ca... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 24113,
"s": 23901,
"text": "Numpy provides us the feature to compute the Histogram for the given data set using NumPy.histogram() function. The formation of histogram depends on the data set,... |
Optional Parameters with Default Values | Function parameters can also be assigned values by default. However, such parameters can also be explicitly passed values.
function_name(param1,{param2= default_value}) {
//......
}
void main() {
test_param(123);
}
void test_param(n1,{s1:12}) {
print(n1);
print(s1);
}
It should return the foll... | [
{
"code": null,
"e": 2648,
"s": 2525,
"text": "Function parameters can also be assigned values by default. However, such parameters can also be explicitly passed values."
},
{
"code": null,
"e": 2714,
"s": 2648,
"text": "function_name(param1,{param2= default_value}) { \n //....... |
Print the Alphabets A to Z in Star Pattern - GeeksforGeeks | 17 Aug, 2021
Given any alphabet between A to Z, the task is to print the pattern of the given alphabet using star.
Examples:
Input: A
Output:
**
* *
******
* *
* *
Input: P
Output:
*****
* *
*****
*
*
Approach: The code to print each alphabet is created in a separate... | [
{
"code": null,
"e": 24332,
"s": 24304,
"text": "\n17 Aug, 2021"
},
{
"code": null,
"e": 24434,
"s": 24332,
"text": "Given any alphabet between A to Z, the task is to print the pattern of the given alphabet using star."
},
{
"code": null,
"e": 24445,
"s": 24434,
... |
ColabCode: Deploying Machine Learning Models From Google Colab | by Kaustubh Gupta | Towards Data Science | Google colab is the handiest online IDE for Python and Data Science enthusiasts. Released in 2017 for the public, it was initially an internal project used by the Google research team to collaborate on different AI projects. Since then, it has gained a lot of popularity due to its easy to use interface, Jupyter noteboo... | [
{
"code": null,
"e": 539,
"s": 171,
"text": "Google colab is the handiest online IDE for Python and Data Science enthusiasts. Released in 2017 for the public, it was initially an internal project used by the Google research team to collaborate on different AI projects. Since then, it has gained a lo... |
Fork() Bomb | 22 Jul, 2021
Prerequisite : fork() in CFork Bomb is a program that harms a system by making it run out of memory. It forks processes infinitely to fill memory. The fork bomb is a form of denial-of-service (DoS) attack against a Linux based system.Once a successful fork bomb has been activated in a system it may not be ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 496,
"s": 53,
"text": "Prerequisite : fork() in CFork Bomb is a program that harms a system by making it run out of memory. It forks processes infinitely to fill memory. The fork bomb is a form of ... |
How To Modify MAC address in Windows 10 (Both Wired and Wireless Adapter)? | 19 Jan, 2021
Prerequisite – Introduction of MAC Address, and Difference between MAC Address and IP Address
A Media Access Control address is unique in nature which is doled out to a Network Interface Card to be utilized as a network address in communications within a network. In the Open Systems Interconnection network... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jan, 2021"
},
{
"code": null,
"e": 122,
"s": 28,
"text": "Prerequisite – Introduction of MAC Address, and Difference between MAC Address and IP Address"
},
{
"code": null,
"e": 596,
"s": 122,
"text": "A Media Acce... |
How to align items at the center of the container using CSS ? | 17 Mar, 2021
An easy and common task for CSS is to align text or images into the center of any container.
Syntax:
.container{
text-align: center;
}
Example 1: We use the text-align property of CSS to center the item horizontally followed by the vertical-align and display property to align the item to the cen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 121,
"s": 28,
"text": "An easy and common task for CSS is to align text or images into the center of any container."
},
{
"code": null,
"e": 129,
"s": 121,
"text": "Syntax:"
},... |
What is Git-Ignore and How to Use it? | 10 Jul, 2020
There are various types of files we might want the git to ignore before committing, for example, the files that are to do with our user settings or any utility setting, private files like passwords and API keys. These files are not of any use to anyone else and we do not want to clutter our git. We can do ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 396,
"s": 54,
"text": "There are various types of files we might want the git to ignore before committing, for example, the files that are to do with our user settings or any utility setting, priva... |
statsmodels.durbin_watson() in Python | 26 Mar, 2020
With the help of statsmodels.durbin_watson() method, we can get the durbin watson test statistics and it is equal to 2*(1-r), where r is autocorrelation between residual.
Syntax : statsmodels.durbin_watson(residual)Return : Return a single floating point value of durbin watson.
Example #1 :In this example ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 199,
"s": 28,
"text": "With the help of statsmodels.durbin_watson() method, we can get the durbin watson test statistics and it is equal to 2*(1-r), where r is autocorrelation between residual."
}... |
Estimating a Homography Matrix - Yalda Zadeh, Sukrit Shashi Shankar | Towards Data Science | This short piece describes equations for estimating a 3 × 3 homography matrix. We first discuss the computation from intrinsic and extrinsic camera parameters; and wherever necessary, connect the formulation to the real-world camera specifications. We next present the computation methodology using two tuples of corresp... | [
{
"code": null,
"e": 588,
"s": 172,
"text": "This short piece describes equations for estimating a 3 × 3 homography matrix. We first discuss the computation from intrinsic and extrinsic camera parameters; and wherever necessary, connect the formulation to the real-world camera specifications. We nex... |
TensorFlow or PyTorch? which is the best? | Towards Data Science | A student at UPC Barcelona Tech asked me which is the best framework for programming a neural network? TensorFlow or PyTorch?. My answer was: Don’t worry, you start with either one, it doesn’t matter which one you choose, the important thing is to start, let’s go!
The steps to be taken to program a neural network in bo... | [
{
"code": null,
"e": 437,
"s": 172,
"text": "A student at UPC Barcelona Tech asked me which is the best framework for programming a neural network? TensorFlow or PyTorch?. My answer was: Don’t worry, you start with either one, it doesn’t matter which one you choose, the important thing is to start, ... |
What does it mean by select 1 from MySQL table? | The statement ‘select 1’ from any table name means that it returns only 1. For example, If any table has 4 records then it will return 1 four times.
Let us see an example. Firstly, we will create a table using the CREATE command.
mysql> create table StudentTable
-> (
-> id int,
-> name varchar(100)
-> );
Qu... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "The statement ‘select 1’ from any table name means that it returns only 1. For example, If any table has 4 records then it will return 1 four times."
},
{
"code": null,
"e": 1292,
"s": 1211,
"text": "Let us see an example. Firstly, w... |
How to create a pandas DataFrame using a list of lists? | The pandas DataFrame can be created by using the list of lists, to do this we need to pass a python list of lists as a parameter to the pandas.DataFrame() function.
Pandas DataFrame will represent the data in a tabular format, like rows and columns. If we create a pandas DataFrame using a list of lists, the inner list ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "The pandas DataFrame can be created by using the list of lists, to do this we need to pass a python list of lists as a parameter to the pandas.DataFrame() function."
},
{
"code": null,
"e": 1434,
"s": 1227,
"text": "Pandas DataFrame ... |
Hibernate Projection Example | Projection in Hibernate Example | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to see Hiberna... | [
{
"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,
... |
How select specific rows in MySQL? | To select specific rows, use FIND_IN_SET() function in MySQL. Let us first create a table −
mysql> create table DemoTable
(
ListOfValues varchar(200)
);
Query OK, 0 rows affected (0.31 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('112,114,567,Java,345');
Quer... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "To select specific rows, use FIND_IN_SET() function in MySQL. Let us first create a table −"
},
{
"code": null,
"e": 1261,
"s": 1154,
"text": "mysql> create table DemoTable\n (\n ListOfValues varchar(200)\n );\nQuery OK, 0 rows... |
Return all dates between two dates in an array in PHP | To return all dates between two dates, the code is as follows −
Live Demo
<?php
function displayDates($date1, $date2, $format = 'd-m-Y' ) {
$dates = array();
$current = strtotime($date1);
$date2 = strtotime($date2);
$stepVal = '+1 day';
while( $current <= $date2 ) {
$dates[] =... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "To return all dates between two dates, the code is as follows −"
},
{
"code": null,
"e": 1137,
"s": 1126,
"text": " Live Demo"
},
{
"code": null,
"e": 1569,
"s": 1137,
"text": "<?php\n function displayDates($dat... |
Keyword Extraction: from TF-IDF to BERT | Towards Data Science | The keyword extraction is one of the most required text mining tasks: given a document, the extraction algorithm should identify a set of terms that best describe its argument. In this tutorial, we are going to perform keyword extraction with five different approaches: TF-IDF, TextRank, TopicRank, YAKE!, and KeyBERT. L... | [
{
"code": null,
"e": 522,
"s": 172,
"text": "The keyword extraction is one of the most required text mining tasks: given a document, the extraction algorithm should identify a set of terms that best describe its argument. In this tutorial, we are going to perform keyword extraction with five differe... |
Text Generation Using N-Gram Model | by Oleg Borisov | Towards Data Science | My interest in Artificial Intelligence and in particular in Natural Language Processing (NLP) has sparked exactly when I have learned that machines are capable of generating the new text by using some simple statistical and probabilistic techniques. In this article I wanted to share this extremely simple and intuitive ... | [
{
"code": null,
"e": 534,
"s": 172,
"text": "My interest in Artificial Intelligence and in particular in Natural Language Processing (NLP) has sparked exactly when I have learned that machines are capable of generating the new text by using some simple statistical and probabilistic techniques. In th... |
Find All Duplicate Characters from a String using Python | One String is given. Our task is to find those characters whose frequency is more than one in the given string.
As an example, we can see that the string “Hello World. Let’s learn Python” so the algorithm will find those letters which are occurring multiple times. In this case, the output will look like this -
e : 3
l ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "One String is given. Our task is to find those characters whose frequency is more than one in the given string."
},
{
"code": null,
"e": 1374,
"s": 1174,
"text": "As an example, we can see that the string “Hello World. Let’s learn Py... |
Can the main method in Java return a value? | The public static void main(String args[]) is the entry point of a Java program Whenever you execute a program the JVM searches for the main method and starts executing the contents of it. If such method is not found the program gets executed successfully, but when you execute the program it generates an error.
As the ... | [
{
"code": null,
"e": 1375,
"s": 1062,
"text": "The public static void main(String args[]) is the entry point of a Java program Whenever you execute a program the JVM searches for the main method and starts executing the contents of it. If such method is not found the program gets executed successful... |
Find Nth number in a sequence which is not a multiple of a given number - GeeksforGeeks | 16 Apr, 2021
Given four integers A, N, L and R, the task is to find the N th number in a sequence of consecutive integers from L to R which is not a multiple of A. It is given that the sequence contain at least N numbers which are not divisible by A and the integer A is always greater than 1.
Examples:
Input: A = 2, ... | [
{
"code": null,
"e": 24655,
"s": 24627,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 24936,
"s": 24655,
"text": "Given four integers A, N, L and R, the task is to find the N th number in a sequence of consecutive integers from L to R which is not a multiple of A. It is given ... |
A Quantum-Enhanced LSTM Layer. Using the PennyLane Quantum Machine... | by Riccardo Di Sipio | Towards Data Science | In recent years, Toronto-based startup company Xanadu has introduced a python framework called PennyLane which allows users to create hybrid Quantum Machine Learning (QML) models. While it’s still too early to claim that quantum computing has taken over, there are some areas where it can give an advantage as for exampl... | [
{
"code": null,
"e": 749,
"s": 172,
"text": "In recent years, Toronto-based startup company Xanadu has introduced a python framework called PennyLane which allows users to create hybrid Quantum Machine Learning (QML) models. While it’s still too early to claim that quantum computing has taken over, ... |
How to remove empty string/lines from PowerShell? | In many instances, you need to remove empty lines or strings from the PowerShell string array or the files. In this article instead of removing empty string, we will get the result or filter the output from lines that are not empty. In this way, we can get the output without empty lines.
Consider the example below, we ... | [
{
"code": null,
"e": 1351,
"s": 1062,
"text": "In many instances, you need to remove empty lines or strings from the PowerShell string array or the files. In this article instead of removing empty string, we will get the result or filter the output from lines that are not empty. In this way, we can ... |
How to show minor tick labels on a log-scale with Matplotlib? | To show minor tick labels on a log-scale with Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create x and y data points using numpy.
Plot x and y data points using plot() method
Get the current axis using gca() method.
Set the yscale with log cl... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "To show minor tick labels on a log-scale with Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1230,
"s": 1154,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
... |
Python – Get Most recent previous business day | 18 Jul, 2021
Given a date, the task is to write a Python program to get the most recent previous business day from the given date.
Example:
Input : test_date = datetime(2020, 1, 31)
Output : 2020-01-30 00:00:00
Explanation : 31 Jan 2020, being a Friday, last business day is thursday, i.e 30 January.
Input : test_date =... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "Given a date, the task is to write a Python program to get the most recent previous business day from the given date."
},
{
"code": null,
"e": 155,
"s": 146,
... |
Find the roots of the polynomials using NumPy | 05 Sep, 2020
In this article, let’s discuss how to find the roots of a polynomial of a NumPy array. It can be found using various methods, let’s see them in detail.
Method 1: Using np.roots()
This function returns the roots of a polynomial with coefficients given in p. The coefficients of the polynomial are to be put i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 204,
"s": 52,
"text": "In this article, let’s discuss how to find the roots of a polynomial of a NumPy array. It can be found using various methods, let’s see them in detail."
},
{
"code": ... |
How to get LocalDateTime object from java.sql.Date using JDBC? | The java.time package of Java8 provides a class named LocalDateTime is used to get the current value of local date and time. Using this in addition to date and time values you can also get other date and time fields, such as day-of-year, day-of-week and week-of-year.
The java.sql.TimeStamp class provides a method with ... | [
{
"code": null,
"e": 1455,
"s": 1187,
"text": "The java.time package of Java8 provides a class named LocalDateTime is used to get the current value of local date and time. Using this in addition to date and time values you can also get other date and time fields, such as day-of-year, day-of-week and... |
Java while loop with Examples | 23 Jun, 2022
Java while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement. While loop in Java comes into use when we need to repeatedly execute a block of statements. The while loop is considered a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 470,
"s": 52,
"text": "Java while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if ... |
EditText widget in Android using Java with Examples | 24 Sep, 2021
Widget refers to the elements of the UI (User Interface) that helps user interacts with the Android App. Edittext is one of many such widgets which can be used to retrieve text data from user.
Edittext refers to the widget that displays an empty textfield in which a user can enter the required text and thi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Widget refers to the elements of the UI (User Interface) that helps user interacts with the Android App. Edittext is one of many such widgets which can be used to retrieve tex... |
Transition diagram for Identifiers in Compiler Design | 21 Nov, 2019
Transition diagram is a special kind of flowchart for language analysis. In transition diagram the boxes of flowchart are drawn as circle and called as states. States are connected by arrows called as edges. The label or weight on edge indicates the input character that can appear after that state.
Transit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Transition diagram is a special kind of flowchart for language analysis. In transition diagram the boxes of flowchart are drawn as circle and called as states. States are conn... |
Python | Inverse Sorting String | 11 May, 2020
Sometimes, while participating in a competitive programming test, we can be encountered with a problem in which we require to sort a pair in opposite orders by indices. This particular article focuses on solving a problem in which we require to sort the number in descending order and then the String in inc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 468,
"s": 28,
"text": "Sometimes, while participating in a competitive programming test, we can be encountered with a problem in which we require to sort a pair in opposite orders by indices. This p... |
Constructor newInstance() method in Java with Examples | 27 Nov, 2019
The newInstance() method of a Constructor class is used to create and initialize a new instance of this constructor, with the initialization parameters passed as parameter to this method. Each parameter is unwrapped to match primitive formal parameters, and both primitive and reference parameters are subje... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Nov, 2019"
},
{
"code": null,
"e": 385,
"s": 28,
"text": "The newInstance() method of a Constructor class is used to create and initialize a new instance of this constructor, with the initialization parameters passed as parameter to ... |
Chinese Remainder Theorem | Set 2 (Inverse Modulo based Implementation) | 07 Apr, 2022
We are given two arrays num[0..k-1] and rem[0..k-1]. In num[0..k-1], every pair is coprime (gcd for every pair is 1). We need to find minimum positive number x such that:
x % num[0] = rem[0],
x % num[1] = rem[1],
.......................
x % num[k-1] = rem[k-1]
Example:
Inp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Apr, 2022"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "We are given two arrays num[0..k-1] and rem[0..k-1]. In num[0..k-1], every pair is coprime (gcd for every pair is 1). We need to find minimum positive number x such that: "
... |
Perfect Sum Problem | 21 Dec, 2021
Given an array arr[] of integers and an integer K, the task is to print all subsets of the given array with the sum equal to the given target K.Examples:
Input: arr[] = {5, 10, 12, 13, 15, 18}, K = 30
Output: {12, 18}, {5, 12, 13}, {5, 10, 15}
Explanation:
Subsets with sum 30 are:
12 + 18 = 30
5 + 12 + ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 210,
"s": 54,
"text": "Given an array arr[] of integers and an integer K, the task is to print all subsets of the given array with the sum equal to the given target K.Examples: "
},
{
"cod... |
Scala String substring() method with example | 23 Oct, 2019
The substring() method is utilized to find the sub-string from the stated String which starts from the index specified.
Method Definition: String substring(int beginIndex)
Return Type: It returns the content from the given String Which starts from the index we specify.
Example: 1#
// Scala program of subst... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Oct, 2019"
},
{
"code": null,
"e": 148,
"s": 28,
"text": "The substring() method is utilized to find the sub-string from the stated String which starts from the index specified."
},
{
"code": null,
"e": 200,
"s": 148,... |
Maximum product of a pair of nodes from largest connected component in a Graph | 05 Jul, 2021
Given an undirected weighted graph G consisting of N vertices and M edges, and two arrays Edges[][2] and Weight[] consisting of M edges of the graph and weights of each edge respectively, the task is to find the maximum product of any two vertices of the largest connected component of the graph, formed by ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 402,
"s": 52,
"text": "Given an undirected weighted graph G consisting of N vertices and M edges, and two arrays Edges[][2] and Weight[] consisting of M edges of the graph and weights of each edge ... |
XML | Basics | 29 Oct, 2020
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The design goals of XML focus on simplicity, generality, and usability across the Internet. It is a textual data format with strong support ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Oct, 2020"
},
{
"code": null,
"e": 569,
"s": 54,
"text": "Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The des... |
PyQt5 QListWidget – Getting Current Selected Row | 01 Aug, 2020
In this article we will see how we can get the current selected row of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. Current row ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 488,
"s": 28,
"text": "In this article we will see how we can get the current selected row of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based ... |
Java program to implement selection sort | Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list.
The smallest e... | [
{
"code": null,
"e": 1368,
"s": 1062,
"text": "Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted par... |
How to check if an alert exists using WebDriver? | We can check if an alert exists with Selenium webdriver. An alert is created with the help of Javascript. We shall use the explicit wait concept in synchronization to verify the presence of an alert.
Let us consider the below alert and check its presence on the page. There is a condition called alertIsPresent which we ... | [
{
"code": null,
"e": 1262,
"s": 1062,
"text": "We can check if an alert exists with Selenium webdriver. An alert is created with the help of Javascript. We shall use the explicit wait concept in synchronization to verify the presence of an alert."
},
{
"code": null,
"e": 1512,
"s": 1... |
Understand how your TensorFlow Model is Making Predictions | by Karl Weinmeister | Towards Data Science | Machine learning can answer questions more quickly and accurately than ever before. As machine learning is used in more mission-critical applications, it is increasingly important to understand how these predictions are derived.
In this blog post, we’ll build a neural network model using the Keras API from TensorFlow, ... | [
{
"code": null,
"e": 401,
"s": 172,
"text": "Machine learning can answer questions more quickly and accurately than ever before. As machine learning is used in more mission-critical applications, it is increasingly important to understand how these predictions are derived."
},
{
"code": null... |
Playit | #myDIV { background-color:lightblue; transform:translate(10px);} | [] |
Finding word starting with specific letter in JavaScript | We are required to write a JavaScript function that takes in an array of string literals as the first argument and a single string character as the second argument.
Then our function should find and return the first array entry that starts with the character specified by the second argument.
The code for this will be −... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in an array of string literals as the first argument and a single string character as the second argument."
},
{
"code": null,
"e": 1355,
"s": 1227,
"text": "Then our function... |
How to use RecyclerView inside NestedScrollView in Android? | This example demonstrates how do I use RecyclerView inside NestedScrollView 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.
Add the following dependency in the build.gradle (Module: app)
implementation 'com.android.support:appc... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "This example demonstrates how do I use RecyclerView inside NestedScrollView in android."
},
{
"code": null,
"e": 1279,
"s": 1150,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require... |
How to count all child elements of a particular element using JavaScript ? - GeeksforGeeks | 24 Jan, 2022
Given an HTML document containing some elements nested elements and the task is to count all the child elements of a particular element. It is very simple to count the number of child elements of a particular element using JavaScript. For example: If you have a parent element consisting of many child eleme... | [
{
"code": null,
"e": 24486,
"s": 24458,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 24907,
"s": 24486,
"text": "Given an HTML document containing some elements nested elements and the task is to count all the child elements of a particular element. It is very simple to count... |
How can we assign a function to a variable in JavaScript? | In JavaScript, you can assign a function in a variable using the concept of anonymous functions. Anonymous, as the name suggests, allows creating a function without any names identifier. It can be used as an argument to other functions. They are called using the variable name −
This is how JavaScript anonymous function... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "In JavaScript, you can assign a function in a variable using the concept of anonymous functions. Anonymous, as the name suggests, allows creating a function without any names identifier. It can be used as an argument to other functions. They are called ... |
Shading an area between two points in a Matplotlib plot | To shade an area between two points in matplotlib, we can take the following steps−
Create x and y data points using numpy.
Plot x and y data points, with color=red and linewidth=2.
To shade an area parallel to X-axis, initialize two variables, y1 and y2.
To add horizontal span across the axes, use axhspan() method wit... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To shade an area between two points in matplotlib, we can take the following steps−"
},
{
"code": null,
"e": 1186,
"s": 1146,
"text": "Create x and y data points using numpy."
},
{
"code": null,
"e": 1244,
"s": 1186,
... |
Change current working directory with Python - GeeksforGeeks | 07 Sep, 2021
The OS module in Python is used for interacting with the operating system. This module comes under Python’s standard utility module so there is no need to install it externally. All functions in OS module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that hav... | [
{
"code": null,
"e": 23895,
"s": 23867,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 24535,
"s": 23895,
"text": "The OS module in Python is used for interacting with the operating system. This module comes under Python’s standard utility module so there is no need to install ... |
Spark 3.0 SQL Feature Update| ANSI SQL Compliance, Store Assignment policy, Upgraded query semantics, Function Upgrades | by Prabhakaran Vijayanagulu | Towards Data Science | Spark has added a lot of notable features with Spark SQL. Some will have a huge impact on checks like data quality and data validations. Though there is a lot of upgraded features, I’m listing out a few of those as these would be used in most common cases.
For Spark developers, who are at the initial stage of learning ... | [
{
"code": null,
"e": 428,
"s": 171,
"text": "Spark has added a lot of notable features with Spark SQL. Some will have a huge impact on checks like data quality and data validations. Though there is a lot of upgraded features, I’m listing out a few of those as these would be used in most common cases... |
Deriving Patterns of Fraud from the Enron Dataset | by Mahnoor Javed | Towards Data Science | The Enron fraud is a big, messy and totally fascinating story about corporate malfeasance of nearly every imaginable type.
In this article, we will use Python to analyze the dataset, and find out patterns and clues through data exploration, as well as build a regression model that could predict the bonus of a person at... | [
{
"code": null,
"e": 295,
"s": 172,
"text": "The Enron fraud is a big, messy and totally fascinating story about corporate malfeasance of nearly every imaginable type."
},
{
"code": null,
"e": 535,
"s": 295,
"text": "In this article, we will use Python to analyze the dataset, and... |
Sum of all the Boundary Nodes of a Binary Tree - GeeksforGeeks | 28 Jun, 2021
Given a binary tree, the task is to print the sum of all the boundary nodes of the tree.
Examples:
Input:
1
/ \
2 3
/ \ / \
4 5 6 7
Output: 28
Input:
1
/ \
2 3
\ /
... | [
{
"code": null,
"e": 24974,
"s": 24946,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25064,
"s": 24974,
"text": "Given a binary tree, the task is to print the sum of all the boundary nodes of the tree. "
},
{
"code": null,
"e": 25075,
"s": 25064,
"text": "... |
Minimize removal or insertions required to make two strings equal - GeeksforGeeks | 14 Jun, 2021
Given two strings S and T, both of length N and S is an anagram of string T, the task is to convert string S to T by performing the following operations minimum number of times:
Remove a character from either end.
Insert a character at any position.
Print the count of the minimum number of operations requi... | [
{
"code": null,
"e": 24281,
"s": 24253,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 24459,
"s": 24281,
"text": "Given two strings S and T, both of length N and S is an anagram of string T, the task is to convert string S to T by performing the following operations minimum nu... |
How to find the rank of a matrix in R? | The rank of a matrix is defined as the maximum number of linearly independent vectors in rows or columns. If we have a matrix with dimensions R x C, having R number of rows and C number of columns, and if R is less than C then the rank of the matrix would be R. To find the rank of a matrix in R, we can use rankMatrix f... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "The rank of a matrix is defined as the maximum number of linearly independent vectors in rows or columns. If we have a matrix with dimensions R x C, having R number of rows and C number of columns, and if R is less than C then the rank of the matrix wou... |
Does Java support multiple inheritance? Why? How can we resolve this? | Whenever, you extend a class a copy of superclass’s members is available to the subclass object and, when you can call the method of the superclass using the object of the subclass.
In the following example, we have a class named SuperClass with a method with name demo(). We are extending this class with another class ... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "Whenever, you extend a class a copy of superclass’s members is available to the subclass object and, when you can call the method of the superclass using the object of the subclass."
},
{
"code": null,
"e": 1394,
"s": 1244,
"text": "... |
Find two numbers with sum and product both same as N - GeeksforGeeks | 10 May, 2021
Given an integer N, the task is to find two numbers a and b such that a * b = N and a + b = N. Print “NO” if no such numbers are possible. Examples:
Input: N = 69 Output: a = 67.9851 b = 1.01493Input: N = 1 Output: NO
Approach: If observed carefully, we are given with sum and product of roots of a qu... | [
{
"code": null,
"e": 24711,
"s": 24683,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 24862,
"s": 24711,
"text": "Given an integer N, the task is to find two numbers a and b such that a * b = N and a + b = N. Print “NO” if no such numbers are possible. Examples: "
},
{
... |
Fill between two vertical lines in matplotlib | To fill color between two vertical lines, use the following steps −
Using plt.subplots() method, create a figure and a set of subplots. This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call.
Using plt.subplots() method, create a figure and... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To fill color between two vertical lines, use the following steps −"
},
{
"code": null,
"e": 1334,
"s": 1130,
"text": "Using plt.subplots() method, create a figure and a set of subplots. This utility wrapper makes it convenient to cr... |
The Python Debugger (pdb) | In software development jargon, 'debugging' term is popularly used to process of locating and rectifying errors in a program. Python's standard library contains pdb module which is a set of utilities for debugging of Python programs.
The debugging functionality is defined in a Pdb class. The module internally makes use... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "In software development jargon, 'debugging' term is popularly used to process of locating and rectifying errors in a program. Python's standard library contains pdb module which is a set of utilities for debugging of Python programs."
},
{
"code... |
C++ program to append content of one text file to another | This is a C++ program to append the content of one text file to another.
a.txt file contains “Tutorials”
a1.txt file contains “point”
Tutorialspoint
Begin
Define a fstream class object as fin.
Open a input file a.txt with input file stream class object fin.
Open a output file a1.txt with output file stream cla... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "This is a C++ program to append the content of one text file to another."
},
{
"code": null,
"e": 1196,
"s": 1135,
"text": "a.txt file contains “Tutorials”\na1.txt file contains “point”"
},
{
"code": null,
"e": 1211,
... |
How to use enums in C/C++? | Enumeration is a user defined datatype in C language. It is used to assign names to the integral constants, which makes a program easy to read and maintain. The keyword “enum” is used to declare an enumeration.
Here is the syntax of enum in C language,
enum enum_name{const1, const2, ....... };
The enum keyword is also ... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "Enumeration is a user defined datatype in C language. It is used to assign names to the integral constants, which makes a program easy to read and maintain. The keyword “enum” is used to declare an enumeration."
},
{
"code": null,
"e": 1315,... |
Split numeric, alphabetic and special symbols from a String - GeeksforGeeks | 16 Jun, 2021
Given string str, divide the string into three parts one containing a numeric part, one containing alphabetic, and one containing special characters.
Examples:
Input : geeks01for02geeks03!!!
Output :geeksforgeeks
010203
!!!
Here str = "Geeks01for02Geeks03!!!", we scan every character and ... | [
{
"code": null,
"e": 24655,
"s": 24627,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 24806,
"s": 24655,
"text": "Given string str, divide the string into three parts one containing a numeric part, one containing alphabetic, and one containing special characters. "
},
{
... |
ES6 - Number.MAX_VALUE | The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with.
The actual value of this constant is 1.7976931348623157 x 10308
var val = Number.MAX_VALUE;
var val = Number.MAX_VALUE;
console.log("Value of Number.MAX_VA... | [
{
"code": null,
"e": 2441,
"s": 2277,
"text": "The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with."
},
{
"code": null,
"e": 2505,
"s": 2441,
"text": "The actual value o... |
How to Run Synchronous Queries using sync-sql Module in Node.js ? | 28 Apr, 2020
The sync-sql module is designed to make synchronous queries to the database. Since normal SQL queries are asynchronous in node.js but if you want to run it synchronously, then it is possible using this module. In synchronized SQL, the result set is returned when the query is executed.
Note: Do not use this... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 340,
"s": 54,
"text": "The sync-sql module is designed to make synchronous queries to the database. Since normal SQL queries are asynchronous in node.js but if you want to run it synchronously, the... |
R – Stem and Leaf Plots | 30 Jun, 2020
Stem and Leaf plot is a technique of displaying the frequencies with which some classes of values may occur. It is basically a method of representing the quantitative data in the graphical format. The stem and leaf plot retains the original data item up to two significant figures unlike histogram. The data... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 481,
"s": 28,
"text": "Stem and Leaf plot is a technique of displaying the frequencies with which some classes of values may occur. It is basically a method of representing the quantitative data in ... |
Print anagrams together in Python using List and Dictionary | 19 Apr, 2022
Given an array of words, print all anagrams together ? Examples:
Input : arr = ['cat', 'dog', 'tac', 'god', 'act']
Output : 'cat tac act dog god'
This problem has existing solution please refer Anagrams and Given a sequence of words, print all anagrams together links. We will solve this problem in python u... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 119,
"s": 54,
"text": "Given an array of words, print all anagrams together ? Examples:"
},
{
"code": null,
"e": 200,
"s": 119,
"text": "Input : arr = ['cat', 'dog', 'tac', 'god... |
Python | Pandas Series.dt.hour | 20 Mar, 2019
Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.hour attribute return a numpy array containing the hour of the datetime in the underlying data of the given series object.
Syntax: Series.dt.hour
Parameter : None
Returns : numpy array
E... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.hour attribute return a numpy array containing the hou... |
Student Information Management System | 24 Mar, 2022
Prerequisites: Switch Case in C/C++ Problem Statement: Write a program to build a simple Software for Student Information Management System which can perform the following operations:
Store the First name of the student.Store the Last name of the student.Store the unique Roll number for every student.Store... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Mar, 2022"
},
{
"code": null,
"e": 238,
"s": 54,
"text": "Prerequisites: Switch Case in C/C++ Problem Statement: Write a program to build a simple Software for Student Information Management System which can perform the following op... |
Convert HashSet to TreeSet in Java | 03 Jan, 2019
Hashset: Hashset in Java is generally used for operations like search, insert and delete. It takes constant time for these operations on average. HashSet is faster than TreeSet. HashSet is Implemented using a hash table.
TreeSet: TreeSet in Java takes O(log n) for search, insert and delete which is higher ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jan, 2019"
},
{
"code": null,
"e": 273,
"s": 52,
"text": "Hashset: Hashset in Java is generally used for operations like search, insert and delete. It takes constant time for these operations on average. HashSet is faster than TreeS... |
How to get the file size using PHP ? | 22 Jan, 2021
In this article, we are going to discuss how to get the file size using PHP. PHP is a general-purpose scripting language that is suited for both server and client scripting language for website development. To get the file size, we will use filesize() function.
The filesize() function returns the size of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 291,
"s": 28,
"text": "In this article, we are going to discuss how to get the file size using PHP. PHP is a general-purpose scripting language that is suited for both server and client scripting la... |
Python OpenCV: Object Tracking using Homography | 13 Sep, 2021
In this article, we are trying to track an object in the video with the image already given in it. We can also track the object in the image. Before seeing object tracking using homography let us know some basics.
Homography is a transformation that maps the points in one point to the corresponding point i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "In this article, we are trying to track an object in the video with the image already given in it. We can also track the object in the image. Before seeing object tracking us... |
Print the longest palindromic prefix of a given string | 07 Jul, 2021
Given a string str, the task is to find the longest palindromic prefix of the given string.
Examples:
Input: str = “abaac” Output: aba Explanation: The longest prefix of the given string which is palindromic is “aba”.
Input: str = “abacabaxyz” Output: abacaba Explanation: The prefixes of the given string ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 144,
"s": 52,
"text": "Given a string str, the task is to find the longest palindromic prefix of the given string."
},
{
"code": null,
"e": 155,
"s": 144,
"text": "Examples: "
... |
Wissen Interview Experience | Set 1 (On-Campus) | 20 Sep, 2016
Wissen technology part of wissen Infotech came to our college for campus drive.Website- www.wissen.com
Round 1- written test -1.5 hrs6 coding questions1. Find intersection of 2 sorted arrays. Note: required O(n) and no use of data structure.
2. Stock – buy and sell to gain max profit. You have to buy and s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Sep, 2016"
},
{
"code": null,
"e": 155,
"s": 52,
"text": "Wissen technology part of wissen Infotech came to our college for campus drive.Website- www.wissen.com"
},
{
"code": null,
"e": 294,
"s": 155,
"text": "Ro... |
Kali-Whoami – Stay anonymous on Kali Linux | 14 Sep, 2021
In today’s life, we are surrounded by a lot of cyber security tools and we talk about our online anonymity, but are we really anonymous? A single mistake can reveal our anonymity, so here is a tool that can help us to make anonymity possible and it is called WHOAMI. It is very useful and has a very simple ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "In today’s life, we are surrounded by a lot of cyber security tools and we talk about our online anonymity, but are we really anonymous? A single mistake can reveal our anony... |
What is tools:context in Android Layout Files? | 12 Apr, 2021
Android Studio provides a much richer variety of functions in the form of various XML attributes in the tools namespace which enables design-time features or compile-time behaviors. When the app is being built, the build tools remove these attributes so that there is no effect on runtime behavior or APK si... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 478,
"s": 28,
"text": "Android Studio provides a much richer variety of functions in the form of various XML attributes in the tools namespace which enables design-time features or compile-time beha... |
PostgreSQL – Drop Function | 28 Aug, 2020
In PostgreSQL, the Drop function statement is used to remove a function.
Syntax:
drop function [if exists] function_name(argument_list)
[cascade | restrict]
Let’s analyze the above syntax:
First, specify the name of the function that you want to remove after the drop function keywords.
Second, use the if ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 101,
"s": 28,
"text": "In PostgreSQL, the Drop function statement is used to remove a function."
},
{
"code": null,
"e": 186,
"s": 101,
"text": "Syntax:\ndrop function [if exists... |
The Two Water Jug Puzzle | 31 May, 2022
You are on the side of the river. You are given a m liter jug and a n liter jug where 0 < m < n. Both the jugs are initially empty. The jugs don’t have markings to allow measuring smaller quantities. You have to use the jugs to measure d liters of water where d < n. Determine the minimum no of operations t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 454,
"s": 52,
"text": "You are on the side of the river. You are given a m liter jug and a n liter jug where 0 < m < n. Both the jugs are initially empty. The jugs don’t have markings to allow meas... |
How to check a string starts/ends with a specific string in jQuery ? | 21 Jul, 2021
JavaScript provides a lot of string methods that check whether a string is a substring of other string. So, jQuery wouldn’t be necessary at all to perform this task. However, we will cover all the different ways of checking whether a string starts or ends with a string:
startsWith() and endsWith() method
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 300,
"s": 28,
"text": "JavaScript provides a lot of string methods that check whether a string is a substring of other string. So, jQuery wouldn’t be necessary at all to perform this task. However, ... |
COVID-19 Tracker using ReactJS and real time API | 09 Sep, 2021
In this article, we will create a web application COVID-19 Tracker using ReactJS and real-time API. In this web application or website, when the user enters the name of the country, it will display the number of active cases, recovered cases, today’s cases, etc.
Pre-requisites:
Basic JavaScript such as fun... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 317,
"s": 54,
"text": "In this article, we will create a web application COVID-19 Tracker using ReactJS and real-time API. In this web application or website, when the user enters the name of the c... |
Sorting Custom Object by Implementing Comparable Interface in Java | 28 Dec, 2020
Java provides two interfaces to sort objects using data members of the class which are Comparable and Comparator. In this article, we will focus on a Comparable interface. A Comparable object is capable of comparing itself with another object by natural ordering. The class must implement the java.lang.Comp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 403,
"s": 52,
"text": "Java provides two interfaces to sort objects using data members of the class which are Comparable and Comparator. In this article, we will focus on a Comparable interface. A ... |
How to Convert a String value to Byte value in Java with Examples | 29 Jan, 2020
Given a String “str” in Java, the task is to convert this string to byte type.
Examples:
Input: str = "1"
Output: 1
Input: str = "3"
Output: 3
Approach 1: (Naive Method)One method is to traverse the string and add the numbers one by one to the byte type. This method is not an efficient approach.
Approach... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "Given a String “str” in Java, the task is to convert this string to byte type."
},
{
"code": null,
"e": 117,
"s": 107,
"text": "Examples:"
},
{
"co... |
How to remove the first character of string in PHP? | To remove the first character of a string in PHP, the code is as follows−
Live Demo
<?php
$str = "Test";
echo "Before removing the first character = ".$str;
$res = substr($str, 1);
echo "\nAfter removing the first character = ".$res;
?>
This will produce the following output −
Before removing the first cha... | [
{
"code": null,
"e": 1261,
"s": 1187,
"text": "To remove the first character of a string in PHP, the code is as follows−"
},
{
"code": null,
"e": 1272,
"s": 1261,
"text": " Live Demo"
},
{
"code": null,
"e": 1437,
"s": 1272,
"text": "<?php\n $str = \"Test\";... |
CharsetDecoder charset() in Java with examples | 23 Jul, 2020
CharsetDecoder.charset() is an in-built method in Java of CharsetDecoder class that returns the charset that created this decoder.
Syntax:
public final Charset charset()
Parameter: The function does not accepts any parameter.
Return value: The function returns the decoder’s charset.
Program below demonstr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jul, 2020"
},
{
"code": null,
"e": 159,
"s": 28,
"text": "CharsetDecoder.charset() is an in-built method in Java of CharsetDecoder class that returns the charset that created this decoder."
},
{
"code": null,
"e": 167,
... |
Speak the meaning of the word using Python | 28 Jun, 2022
The following article shows how by the use of two modules named, pyttsx3 and PyDictionary, we can make our system say out the meaning of the word given as input. It is module which speak the meaning when we want to have the meaning of the particular word.
PyDictionary: It is a Dictionary Module for Python ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 308,
"s": 52,
"text": "The following article shows how by the use of two modules named, pyttsx3 and PyDictionary, we can make our system say out the meaning of the word given as input. It is module... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.