title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Turn an image by 90 degree | 12 Jun, 2022
Given an image, how will you turn it by 90 degrees? A vague question. Minimize the browser and try your solution before going further. An image can be treated as 2D matrix which can be stored in a buffer. We are provided with matrix dimensions and it’s base address. How can we turn it? For example see the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 374,
"s": 52,
"text": "Given an image, how will you turn it by 90 degrees? A vague question. Minimize the browser and try your solution before going further. An image can be treated as 2D matrix wh... |
Java program to calculate the power of a Given number using recursion | You can calculate the power where the base and exponent are given, using recursion as shown in the following program.
import java.util.Scanner;
public class PowerUsingRecursion {
public static int power(int base, int exp){
if (exp !=0){
return (base * power(base, exp-1));
}else {
return... | [
{
"code": null,
"e": 1305,
"s": 1187,
"text": "You can calculate the power where the base and exponent are given, using recursion as shown in the following program."
},
{
"code": null,
"e": 1834,
"s": 1305,
"text": "import java.util.Scanner;\npublic class PowerUsingRecursion {\n ... |
PyQt5 – Set icon size of item icon in ComboBox | 22 Apr, 2020
In this article we will see how we can set the icon size to the item of combo box. By default there is no icon set to the icon in the combo box although we can set icon to each item with the help of setItemIcon method, sometimes there is a need for adjusting the icon size.
In order to change the icon size ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "In this article we will see how we can set the icon size to the item of combo box. By default there is no icon set to the icon in the combo box although we can set icon to eac... |
StringBuilder reverse() in Java with Examples | 19 Aug, 2019
The reverse() method of StringBuilder is used to reverse the characters in the StringBuilder. The method helps to this character sequence to be replaced by the reverse of the sequence.
Syntax:
public java.lang.AbstractStringBuilder reverse()
Returns:This method returns StringBuilder object after reversing ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Aug, 2019"
},
{
"code": null,
"e": 237,
"s": 52,
"text": "The reverse() method of StringBuilder is used to reverse the characters in the StringBuilder. The method helps to this character sequence to be replaced by the reverse of the... |
Number of triangles formed by joining vertices of n-sided polygon with two common sides and no common sides | 31 May, 2022
Given N-sided polygon we need to find the total number of triangles formed by joining the vertices of the given polygon with exactly two sides being common and no side being common.Examples:
Input : N = 6 Output : 6 2 The image below is of a triangle forming inside a Hexagon by joining vertices as shown ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Given N-sided polygon we need to find the total number of triangles formed by joining the vertices of the given polygon with exactly two sides being common and no side being c... |
Working with wav files in Python using Pydub | 18 Jan, 2022
Audio files are a widespread means of transferring information. So let’s see how to work with audio files using Python. Python provides a module called pydub to work with audio files. pydub is a Python library to work with only .wav files. By using this library we can play, split, merge, edit our .wav audi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 344,
"s": 28,
"text": "Audio files are a widespread means of transferring information. So let’s see how to work with audio files using Python. Python provides a module called pydub to work with audi... |
How to use MetaMask to Deploy a Smart contract in Solidity (Blockchain)? | 11 May, 2022
Smart contracts are self-executing contracts. They were first proposed by Nick Szabo in the 90s. They are set of rules and protocols which two parties agree upon and have to follow. One of the main features is that they are immutable once deployed on the blockchain. It is widely used in the Ethereum blockc... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 431,
"s": 54,
"text": "Smart contracts are self-executing contracts. They were first proposed by Nick Szabo in the 90s. They are set of rules and protocols which two parties agree upon and have to ... |
SimpleExpandableListAdapter in Android with Example | 25 Sep, 2020
Android ExpandableListView is a view that is used to shows items as a vertically scrolling two-level list. The basic difference with ListView is it allows two levels of the display which are groups that can be easily expanded and collapsed by touching to view and their respective children’s items. In order... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Sep, 2020"
},
{
"code": null,
"e": 497,
"s": 54,
"text": "Android ExpandableListView is a view that is used to shows items as a vertically scrolling two-level list. The basic difference with ListView is it allows two levels of the d... |
Mindtree Interview Experience for Software Engineer C1 (Off-Campus) | 05 Apr, 2021
INTERVIEW PROCESS:
Assessment – 21st March 2021(Aptitude, Logical, Coding(Imp) on WeCreateProblems Platform) –>Result Same day NightEnglish Skill Assessment (Mettl) – 22nd March 2021 –>Result after 4 daysTechnical Round 1 – 27th March 2021 (WeCreateProblems platform)Technical Round 2-28th March 2021 (WeC... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 74,
"s": 54,
"text": "INTERVIEW PROCESS: "
},
{
"code": null,
"e": 437,
"s": 74,
"text": "Assessment – 21st March 2021(Aptitude, Logical, Coding(Imp) on WeCreateProblems Platfo... |
What is Context in Android? - GeeksforGeeks | 10 Sep, 2020
Android apps are popular for a long time and it is evolving to a greater level as user’s expectations are that they need to view the data that they want in an easier smoother view. Hence, the android developers must know the important terminologies before developing the app. In Android Programming we gener... | [
{
"code": null,
"e": 26517,
"s": 26489,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 26998,
"s": 26517,
"text": "Android apps are popular for a long time and it is evolving to a greater level as user’s expectations are that they need to view the data that they want in an easi... |
If memory allocation using new is failed in C++ then how it should be handled? - GeeksforGeeks | 20 Jul, 2021
In this article, if memory allocation using new is failed in C++ then how it should be handled? When an object of a class is created dynamically using new operator, the object occupies memory in the heap. Below are the major thing that must be keep in mind:
What if sufficient memory is not available in the... | [
{
"code": null,
"e": 25368,
"s": 25340,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 25626,
"s": 25368,
"text": "In this article, if memory allocation using new is failed in C++ then how it should be handled? When an object of a class is created dynamically using new operator... |
How to Implement Generic LinkedList in Java? - GeeksforGeeks | 28 Mar, 2022
Linked List is Linear Data Structures that store values in nodes. As we do know here each Node possesses two properties namely the value of the node and link to the next node if present so. Linked List can not only be of Integer data type but String, boolean, Float, Character, etc. We can implement such a ... | [
{
"code": null,
"e": 25303,
"s": 25275,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25682,
"s": 25303,
"text": "Linked List is Linear Data Structures that store values in nodes. As we do know here each Node possesses two properties namely the value of the node and link to th... |
Array vs ArrayList in Java - GeeksforGeeks | 11 May, 2022
Let us discuss the concept of the arrays and ArrayList briefly in the header to incorporate the understanding in java programs later landing onto the conclusive differences between them. As we all are aware of that arrays are linear data structures providing functionality to add elements in a continuous ma... | [
{
"code": null,
"e": 25733,
"s": 25705,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 26473,
"s": 25733,
"text": "Let us discuss the concept of the arrays and ArrayList briefly in the header to incorporate the understanding in java programs later landing onto the conclusive di... |
Python | Check if string repeats itself - GeeksforGeeks | 25 Jun, 2019
While working with strings, many times, we can come across a use case in which we need to find if a string has in it the repeating substring, which repeats all over the string and thus making a multiple of the root substring. Let’s discuss certain ways in which we can get the root substring of string.
Meth... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 25840,
"s": 25537,
"text": "While working with strings, many times, we can come across a use case in which we need to find if a string has in it the repeating substring, which repeats all ove... |
How to create a Collapsed Sidebar? - GeeksforGeeks | 09 Jul, 2019
Bootstrap Sidebar is a component that is used for vertical navigation. It can be customized in various styles according to your requirement by using CSS and can be made responsive by using JavaScript.
The .sidebar class is used to create simple Bootstrap sidebar. To make a collapsing sidebar, you need to h... | [
{
"code": null,
"e": 25983,
"s": 25955,
"text": "\n09 Jul, 2019"
},
{
"code": null,
"e": 26184,
"s": 25983,
"text": "Bootstrap Sidebar is a component that is used for vertical navigation. It can be customized in various styles according to your requirement by using CSS and can be... |
Recursive Functions in R Programming - GeeksforGeeks | 10 May, 2020
Recursion, in the simplest terms, is a type of looping technique. It exploits the basic working of functions in R. Recursion is when the function calls itself. This forms a loop, where every time the function is called, it calls itself again and again and this technique is known as recursion. Since the loo... | [
{
"code": null,
"e": 30289,
"s": 30261,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 30877,
"s": 30289,
"text": "Recursion, in the simplest terms, is a type of looping technique. It exploits the basic working of functions in R. Recursion is when the function calls itself. Thi... |
Unbounded Knapsack (Repetition of items allowed) - GeeksforGeeks | 20 May, 2021
Given a knapsack weight W and a set of n items with certain value vali and weight wti, we need to calculate the maximum amount that could make up this quantity exactly. This is different from classical Knapsack problem, here we are allowed to use unlimited number of instances of an item.Examples:
Input : ... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 26078,
"s": 25779,
"text": "Given a knapsack weight W and a set of n items with certain value vali and weight wti, we need to calculate the maximum amount that could make up this quantity exa... |
How to execute AngularJS controller function on page load ? - GeeksforGeeks | 18 Nov, 2019
The task is to execute/call a JS function on page load using AngularJS. This function can be used to perform initialization.
Calling a function or initializing a single value on page load in AngularJS is quite easy. AngularJS provides us with a dedicated directive for this specific task. It’s the ng-init d... | [
{
"code": null,
"e": 25670,
"s": 25642,
"text": "\n18 Nov, 2019"
},
{
"code": null,
"e": 25795,
"s": 25670,
"text": "The task is to execute/call a JS function on page load using AngularJS. This function can be used to perform initialization."
},
{
"code": null,
"e": 2... |
Calculate Trace of a Matrix in R Programming – tr() Function | 19 Jun, 2020
tr() function in R Language is used to calculate the trace of a matrix. Trace of a matrix is the sum of the values on the main diagonal(upper left to lower right) of the matrix.
Syntax: tr(x)
Parameters:x: Matrix
Example 1:
# R program to calculate# trace of a matrix # Loading librarylibrary(psych) # Cre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jun, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "tr() function in R Language is used to calculate the trace of a matrix. Trace of a matrix is the sum of the values on the main diagonal(upper left to lower right) of the matri... |
Python unittest – assertIn() function | 29 Aug, 2020
assertIn() in Python is a unittest library function that is used in unit testing to check whether a string is contained in other or not. This function will take three string parameters as input and return a boolean value depending upon the assert condition. If the key is contained in container string it wi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 373,
"s": 28,
"text": "assertIn() in Python is a unittest library function that is used in unit testing to check whether a string is contained in other or not. This function will take three string p... |
Implementation of Diffie-Hellman Algorithm | 09 Jun, 2022
Background
Elliptic Curve Cryptography (ECC) is an approach to public-key cryptography, based on the algebraic structure of elliptic curves over finite fields. ECC requires a smaller key as compared to non-ECC cryptography to provide equivalent security (a 256-bit ECC security has equivalent security attai... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 65,
"s": 54,
"text": "Background"
},
{
"code": null,
"e": 396,
"s": 65,
"text": "Elliptic Curve Cryptography (ECC) is an approach to public-key cryptography, based on the algebr... |
Python – Run same function in parallel with different parameters | 03 Mar, 2021
In this article, we will learn how to run the same function in parallel with different parameters. We can run the same function in parallel with different parameters using parallel processing.
The number of tasks performed by the program can be increased by parallel processing, which decreases the total pr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 247,
"s": 54,
"text": "In this article, we will learn how to run the same function in parallel with different parameters. We can run the same function in parallel with different parameters using pa... |
Traversing directory in Java using BFS | 24 Mar, 2018
Given a directory, print all files and folders present in directory tree rooted with given directory.
We can iteratively traverse directory in BFS using below steps. We create an empty queue and we first enqueue given directory path. We run a loop while queue is not empty. We dequeue an item from queue. If... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Mar, 2018"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "Given a directory, print all files and folders present in directory tree rooted with given directory."
},
{
"code": null,
"e": 503,
"s": 130,
"text": "We c... |
Matching strings for similar characters - JavaScript | We are required to write a JavaScript function that accepts two string and a number n.
The function matches the two strings i.e., it checks if the two strings contains the same characters.
The function returns true if both the strings contain the same character irrespective of their order or if they contain at most n d... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "We are required to write a JavaScript function that accepts two string and a number n."
},
{
"code": null,
"e": 1251,
"s": 1149,
"text": "The function matches the two strings i.e., it checks if the two strings contains the same chara... |
TestNG - Executing Tests | The test cases are executed using TestNG class. This class is the main entry point for running tests in the TestNG framework. Users can create their own TestNG object and invoke it in many different ways such as −
On an existing testng.xml.
On an existing testng.xml.
On a synthetic testng.xml, created entirely from Jav... | [
{
"code": null,
"e": 2274,
"s": 2060,
"text": "The test cases are executed using TestNG class. This class is the main entry point for running tests in the TestNG framework. Users can create their own TestNG object and invoke it in many different ways such as −"
},
{
"code": null,
"e": 23... |
Maven - Build & Test Project | What we learnt in Project Creation chapter is how to create a Java application using Maven. Now we'll see how to build and test the application.
Go to C:/MVN directory where you've created your java application. Open consumerBanking folder. You will see the POM.xml file with the following contents. Update it to reflect... | [
{
"code": null,
"e": 2205,
"s": 2060,
"text": "What we learnt in Project Creation chapter is how to create a Java application using Maven. Now we'll see how to build and test the application."
},
{
"code": null,
"e": 2407,
"s": 2205,
"text": "Go to C:/MVN directory where you've c... |
Model? Or do you mean Weight of Evidence (WoE) and Information Value (IV)? | by JT Quant | Towards Data Science | As a data scientist, I’m always interested to know how certain independent variables, such as occupation, influence the dependent variables, such as income. Specifically, when it comes to classification problems, WoE and IV can tell stories between an independent variable and a dependent variable.
These concepts were d... | [
{
"code": null,
"e": 470,
"s": 171,
"text": "As a data scientist, I’m always interested to know how certain independent variables, such as occupation, influence the dependent variables, such as income. Specifically, when it comes to classification problems, WoE and IV can tell stories between an ind... |
Loading Image using Glide in Android | Before getting into Glide example, we should know what is glide, Glide is an image processing library developed by muyangmin. Using glide library we can show image, decode images,cache images, animated gifs and many more.
This example demonstrate about how to integrate glide in android.
Step 1 − Create a new project in... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "Before getting into Glide example, we should know what is glide, Glide is an image processing library developed by muyangmin. Using glide library we can show image, decode images,cache images, animated gifs and many more."
},
{
"code": null,
... |
How to fill the NA with last observation in the column of an R data frame? | There are multiple ways to fill missing values in data analysis and one of the ways is filling them with the previous value in the same column of the data frame. For example, if we have a column x in data frame df and this columns x contains some NA values then we can fill them with the values in the upper row. This ca... | [
{
"code": null,
"e": 1442,
"s": 1062,
"text": "There are multiple ways to fill missing values in data analysis and one of the ways is filling them with the previous value in the same column of the data frame. For example, if we have a column x in data frame df and this columns x contains some NA val... |
C# Program For Reading Data From Stream and Cast Data to Chars - GeeksforGeeks | 01 Nov, 2021
Given data, now our task is to read data from the stream and cast data to chars in C#. So to do this task we use the following class and methods:
FileStream: It is a class that is used to read and write files. So, to manipulate files using FileStream, you need to create an object of FileStream class.
Synt... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24448,
"s": 24302,
"text": "Given data, now our task is to read data from the stream and cast data to chars in C#. So to do this task we use the following class and methods:"
},
{
"co... |
How to create a plot in R with a different plot window size using plot function? | We can create plots in R with having different plot window sizes. This will be helpful when we want to express X-axis or Y-axis differently. Also, the change in the size of the plot window will help us to paste the plot in places that are short or large. For example, if we want to present the plot in a business meeting... | [
{
"code": null,
"e": 1485,
"s": 1062,
"text": "We can create plots in R with having different plot window sizes. This will be helpful when we want to express X-axis or Y-axis differently. Also, the change in the size of the plot window will help us to paste the plot in places that are short or large... |
C++ Program to Implement Network_Flow Problem | This is a C++ Program to implement Network_Flow problem using Ford Fulkerson algorithm.
Begin
function bfs() returns true if there is path from source s to sink t in
the residual graph which indicates additional possible flow in the graph.
End
Begin
function fordfulkarson() return maximum flow in given graph:
... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "This is a C++ Program to implement Network_Flow problem using Ford Fulkerson algorithm."
},
{
"code": null,
"e": 1511,
"s": 1150,
"text": "Begin\n function bfs() returns true if there is path from source s to sink t in\n the resi... |
Cosets in Mathematics - GeeksforGeeks | 07 Sep, 2020
Coset is subset of mathematical group consisting of all the products obtained by multiplying fixed element of group by each of elements of given subgroup, either on right or on left.mCosets are basic tool in study of groups
Suppose if A is group, and B is subgroup of A, and is an element of A, then
aB = {a... | [
{
"code": null,
"e": 24916,
"s": 24888,
"text": "\n07 Sep, 2020"
},
{
"code": null,
"e": 25140,
"s": 24916,
"text": "Coset is subset of mathematical group consisting of all the products obtained by multiplying fixed element of group by each of elements of given subgroup, either o... |
How to Plot Complex Numbers in Python? | You can plot complex numbers on a polar plot. If you have an array of complex numbers, you can plot it using:
import matplotlib.pyplot as plt
import numpy as np
cnums = np.arange(5) + 1j * np.arange(6,11)
X = [x.real for x in cnums]
Y = [x.imag for x in cnums]
plt.scatter(X,Y, color='red')
plt.show()
This will plot a ... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "You can plot complex numbers on a polar plot. If you have an array of complex numbers, you can plot it using:"
},
{
"code": null,
"e": 1365,
"s": 1172,
"text": "import matplotlib.pyplot as plt\nimport numpy as np\n\ncnums = np.arange... |
Running Jupyter Notebook on Google Cloud Platform in 15 min | by Amulya Aankul | Towards Data Science | Recently, while I was doing my research project on Computer Vision using Convolutional Neural Network, I found out that my 8GB RAM laptop is useless. It took me an hour to learn from just 1 epoch. Therefore, rather than spending 1500$ on a new GPU based laptop, I did it for free on Google Cloud. (Google Cloud gives 300... | [
{
"code": null,
"e": 552,
"s": 171,
"text": "Recently, while I was doing my research project on Computer Vision using Convolutional Neural Network, I found out that my 8GB RAM laptop is useless. It took me an hour to learn from just 1 epoch. Therefore, rather than spending 1500$ on a new GPU based l... |
C# Program for Anagram Substring Search (Or Search for all permutations) - GeeksforGeeks | 07 Jul, 2021
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m.Expected time complexity is O(n)
Examples:
1) Input: txt[] = "BACDGABCDA" pat[] = "ABCD"
Outpu... | [
{
"code": null,
"e": 25334,
"s": 25306,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 25575,
"s": 25334,
"text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or a... |
Deep Learning with Python: Neural Networks (complete tutorial) | by Mauro Di Pietro | Towards Data Science | In this article, I will show how to build Neural Networks with Python and how to explain Deep Learning to the Business using visualization and creating an explainer for model predictions.
Deep Learning is a type of machine learning that imitates the way humans gain certain types of knowledge, and it got more popular ov... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "In this article, I will show how to build Neural Networks with Python and how to explain Deep Learning to the Business using visualization and creating an explainer for model predictions."
},
{
"code": null,
"e": 733,
"s": 360,
"text":... |
How to insert a document into a MongoDB collection using Java? | You can insert a document into an existing collection in MongoDB using the insert() method.
db.coll.insert(doc)
Where,
db is the database.
db is the database.
coll is the collection (name) in which you want to insert the document
coll is the collection (name) in which you want to insert the document
doc is the document... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "You can insert a document into an existing collection in MongoDB using the insert() method."
},
{
"code": null,
"e": 1174,
"s": 1154,
"text": "db.coll.insert(doc)"
},
{
"code": null,
"e": 1181,
"s": 1174,
"text": ... |
How do I use Window Manager (wm) attributes in Tkinter? | The Window Manager is a toolkit available in Tcl/Tk that can be accessed with the command 'wm'. The 'wm' command allows you to set the appearance and geometry of the Tkinter window. We can control the title, color, size, and other attributes with this command. The 'wm' command has numerous keywords that can be used to ... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "The Window Manager is a toolkit available in Tcl/Tk that can be accessed with the command 'wm'. The 'wm' command allows you to set the appearance and geometry of the Tkinter window. We can control the title, color, size, and other attributes with this c... |
env command in Linux with Examples - GeeksforGeeks | 15 May, 2019
env is used to either print environment variables. It is also used to run a utility or command in a custom environment. In practice, env has another common use. It is often used by shell scripts to launch the correct interpreter. In this usage, the environment is typically not changed.
Syntax :
env [OPTION... | [
{
"code": null,
"e": 24146,
"s": 24118,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24433,
"s": 24146,
"text": "env is used to either print environment variables. It is also used to run a utility or command in a custom environment. In practice, env has another common use. It... |
Plot a Line Graph for Pandas Dataframe with Matplotlib? | We will plot a line grapg for Pandas DataFrame using the plot(). At first, import the required libraries −
import pandas as pd
import matplotlib.pyplot as plt
Create a DataFrame −
dataFrame = pd.DataFrame(
{
"Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Bentley', 'Jaguar'],"Reg_Price": [2000, 2500, 2800, 3000, 3... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "We will plot a line grapg for Pandas DataFrame using the plot(). At first, import the required libraries −"
},
{
"code": null,
"e": 1221,
"s": 1169,
"text": "import pandas as pd\nimport matplotlib.pyplot as plt"
},
{
"code": ... |
How to bind multiple versions of a DB2 program into a package? | Packages are DB2 database objects which hold the executable forms of SQLs which are used in COBOL-DB2 programs. The packages are stored in a catalog table and contain the strategy/tables/columns/predicate associated with the SQL statements.
If there is a DB2 table ORDERS_TEST in test environment and ORDERS_PROD in prod... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "Packages are DB2 database objects which hold the executable forms of SQLs which are used in COBOL-DB2 programs. The packages are stored in a catalog table and contain the strategy/tables/columns/predicate associated with the SQL statements."
},
{
... |
Pattern pattern() method in Java with examples | The java.util.regex package of java provides various classes to find particular patterns in character sequences. The pattern class of this package is a compiled representation of a regular expression.
The pattern() method of the Pattern class fetches and returns the regular expression in the string format, using which ... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "The java.util.regex package of java provides various classes to find particular patterns in character sequences. The pattern class of this package is a compiled representation of a regular expression."
},
{
"code": null,
"e": 1416,
"s": ... |
wxPython - Change font of Radio Button - GeeksforGeeks | 06 Jan, 2022
In this article we are going to learn that how can we change the font of the label text present on the radio button present in the frame. We need to follow some steps as follows:
Step 1: Create a wx.Font object. Step 2: Add different attributes of font in parameters like: family, style etc. Step 3: Create... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 24472,
"s": 24292,
"text": "In this article we are going to learn that how can we change the font of the label text present on the radio button present in the frame. We need to follow some st... |
How To Change the Nginx Web Document Location on Ubuntu 16.04 | In this article, we will learn about how to move or change the location of the Nginx Web server documents folder. By default Nginx Web server default location is at /usr/share/nginx/html which is located on the default file system of the Linux. Generally, this is done, based on the website requirement or client require... | [
{
"code": null,
"e": 1389,
"s": 1062,
"text": "In this article, we will learn about how to move or change the location of the Nginx Web server documents folder. By default Nginx Web server default location is at /usr/share/nginx/html which is located on the default file system of the Linux. Generall... |
ASP.NET Core - Razor View Import | In this chapter, we will discuss the Razor View Import. In addition to the ViewStart file, there is also a ViewImports file that the MVC framework will look for when rendering any view.
Like the ViewStart file, we can drop ViewImports.cshtml into a folder, and the ViewImports file can influence all the views in the fol... | [
{
"code": null,
"e": 2647,
"s": 2461,
"text": "In this chapter, we will discuss the Razor View Import. In addition to the ViewStart file, there is also a ViewImports file that the MVC framework will look for when rendering any view."
},
{
"code": null,
"e": 2795,
"s": 2647,
"text... |
How to install DSC resources using PowerShell? | To install the DSC resource using PowerShell, we can use the same command to install modules in PowerShell (Install-Module).
The Find-DscResource command would get all the available DSC resources. To search the specific DSC resource, you can provide the -Name parameter in the Find-DscReource command. For example, we ne... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "To install the DSC resource using PowerShell, we can use the same command to install modules in PowerShell (Install-Module)."
},
{
"code": null,
"e": 1431,
"s": 1187,
"text": "The Find-DscResource command would get all the available ... |
Exp() and Count() Function in MS Access | 01 Sep, 2020
1. Exp() function :In MS Access, the Exp() function returns e( 2.718281) power raised to a number. In this function, a number will be pass as a parameter and it will return e raised to the power of a specified number.e is a constant which value is equal to 2.718281. It is the base of natural logarithms.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Sep, 2020"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "1. Exp() function :In MS Access, the Exp() function returns e( 2.718281) power raised to a number. In this function, a number will be pass as a parameter and it will return e ... |
Python Pandas - Swap levels of a MultiIndex | To swap levels of a MultiIndex, use the swaplevel() method in Pandas. The levels to be swapped should be mentioned as arguments.
At first, import the required libraries −
import pandas as pd
MultiIndex is a multi-level, or hierarchical, index object for pandas objects. Create arrays −
arrays = [[2, 4, 3, 1], ['Peter', ... | [
{
"code": null,
"e": 1316,
"s": 1187,
"text": "To swap levels of a MultiIndex, use the swaplevel() method in Pandas. The levels to be swapped should be mentioned as arguments."
},
{
"code": null,
"e": 1358,
"s": 1316,
"text": "At first, import the required libraries −"
},
{
... |
How to use files in public folder in ReactJS ? | 19 Aug, 2021
The public folder contains static files such as index.html, javascript library files, images, and other assets, etc. which you don’t want to be processed by webpack. Files in this folder are copied and pasted as they are directly into the build folder. Only files inside the `public` folder can be reference... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 376,
"s": 52,
"text": "The public folder contains static files such as index.html, javascript library files, images, and other assets, etc. which you don’t want to be processed by webpack. Files in... |
Minimum swaps and K together | Practice | GeeksforGeeks | Given an array arr of n positive integers and a number k. One can apply a swap operation on the array any number of times, i.e choose any two index i and j (i < j) and swap arr[i] , arr[j] . Find the minimum number of swaps required to bring all the numbers less than or equal to k together, i.e. make them a contiguous ... | [
{
"code": null,
"e": 568,
"s": 238,
"text": "Given an array arr of n positive integers and a number k. One can apply a swap operation on the array any number of times, i.e choose any two index i and j (i < j) and swap arr[i] , arr[j] . Find the minimum number of swaps required to bring all the numbe... |
Build a DIY Mini Radar Using Arduino, Python and Streamlit | by M Khorasani | Towards Data Science | For those of us in the business of robotics, specifically the competitive type the likes of sumo-wrestling and RoboCup bots, we know that detecting objects for avoidance or for collision rather cannot possibly be overstated. While more often than not you would inundate your robot with a slew of IR sensors to detect obj... | [
{
"code": null,
"e": 809,
"s": 171,
"text": "For those of us in the business of robotics, specifically the competitive type the likes of sumo-wrestling and RoboCup bots, we know that detecting objects for avoidance or for collision rather cannot possibly be overstated. While more often than not you ... |
BreakIterator getText() method in Java with Examples - GeeksforGeeks | 27 Jun, 2021
The getText() method of java.text.BreakIterator class is used to get the text previously set by the setText() method in breakiterator.Syntax:
public abstract CharacterIterator getText()
Parameter: This method does not accept any parameter.Return Value: This method provides the text scanned previously.Bel... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n27 Jun, 2021"
},
{
"code": null,
"e": 24012,
"s": 23868,
"text": "The getText() method of java.text.BreakIterator class is used to get the text previously set by the setText() method in breakiterator.Syntax: "
},
{
"code... |
Check if string follows order of characters defined by a pattern or not | Set 1 - GeeksforGeeks | 08 Jun, 2021
Given an input string and a pattern, check if characters in the input string follows the same order as determined by characters present in the pattern. Assume there won’t be any duplicate characters in the pattern.Examples:
Input:
string = "engineers rock"
pattern = "er";
Output: true
Explanation:
All ... | [
{
"code": null,
"e": 25027,
"s": 24999,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 25253,
"s": 25027,
"text": "Given an input string and a pattern, check if characters in the input string follows the same order as determined by characters present in the pattern. Assume ther... |
How to permanently hide the Navigation Bar in an Android activity using Kotlin? | This example demonstrates how to permanently hide the Navigation Bar in an Android activity using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" ... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "This example demonstrates how to permanently hide the Navigation Bar in an Android activity using Kotlin."
},
{
"code": null,
"e": 1297,
"s": 1168,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project an... |
Tryit Editor v3.7 | CSS Attr Selectors
Tryit: The [attribute|="value"] selector | [
{
"code": null,
"e": 28,
"s": 9,
"text": "CSS Attr Selectors"
}
] |
How to create a Dialog in JavaFX? | A Dialog is a graphical element, a window that shows information to the window and receives a response. You can create a dialog by instantiating the javafx.scene.control.Dialog class.
The following Example demonstrates the creation of a Dialog.
import javafx.application.Application;
import javafx.geometry.Insets;
impor... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "A Dialog is a graphical element, a window that shows information to the window and receives a response. You can create a dialog by instantiating the javafx.scene.control.Dialog class."
},
{
"code": null,
"e": 1307,
"s": 1246,
"text":... |
Java - String equals() Method | This method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
Here is the syntax of this method −
public boolean equals(Object anObject)
Here is the detail of parameters −
anObj... | [
{
"code": null,
"e": 2581,
"s": 2377,
"text": "This method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object."
},
{
"code": null,
"e": 2617,
"s... |
Create a Table of Content in Tree View Architecture using HTML, CSS and JavaScript - GeeksforGeeks | 31 Dec, 2019
The tree view elements are kind of dropdown menu however well organized. This kind of view gives your web site an organized look, to create a tree view architecture of a drop down we can use HTML, CSS, and JavaScript. We will divide the whole procedure into two sections Creating structure and Designing str... | [
{
"code": null,
"e": 25321,
"s": 25293,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 25672,
"s": 25321,
"text": "The tree view elements are kind of dropdown menu however well organized. This kind of view gives your web site an organized look, to create a tree view architectur... |
Check if a number ends with another number or not - GeeksforGeeks | 22 Nov, 2021
Given two numbers A and B where (A > B), the task is to check if B is a suffix of A or not. Print “Yes” if it is a suffix Else print “No”.Examples:
Input: A = 12345, B = 45 Output: YesInput: A = 12345, B = 123 Output: No
Method 1:
Convert the given numbers A and B to strings str1 and str2 respectiv... | [
{
"code": null,
"e": 25094,
"s": 25066,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 25244,
"s": 25094,
"text": "Given two numbers A and B where (A > B), the task is to check if B is a suffix of A or not. Print “Yes” if it is a suffix Else print “No”.Examples: "
},
{
... |
How to force Matplotlib to show the values on X-axis as integers? | To force matplotlib to show the values on X-axis as integers, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create two lists, x and y, of data points.
Plot x and y using plot() method.
Make a new list for only integers tick on X-axis. Use math.floor() and ... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "To force matplotlib to show the values on X-axis as integers, we can take the following steps −"
},
{
"code": null,
"e": 1234,
"s": 1158,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
... |
Using Machine Learning To Detect Fraud | by Kurtis Pykes | Towards Data Science | Introduction
The Fraud detection problem
The Data
Building the Framework
Machine Learning is a subset of Artificial Intelligence (AI) that provides systems with the ability to automatically learn and improve from experience without being explicitly programmed. In saying that, it has been made possible for us (humans) t... | [
{
"code": null,
"e": 185,
"s": 172,
"text": "Introduction"
},
{
"code": null,
"e": 213,
"s": 185,
"text": "The Fraud detection problem"
},
{
"code": null,
"e": 222,
"s": 213,
"text": "The Data"
},
{
"code": null,
"e": 245,
"s": 222,
"text":... |
TypeScript - String search() | This method executes the search for a match between a regular expression and this String object.
string.search(regexp);
regexp − A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).
If successful, the search returns the index of the regular... | [
{
"code": null,
"e": 2145,
"s": 2048,
"text": "This method executes the search for a match between a regular expression and this String object."
},
{
"code": null,
"e": 2169,
"s": 2145,
"text": "string.search(regexp);\n"
},
{
"code": null,
"e": 2310,
"s": 2169,
... |
What makes Scala scalable? - GeeksforGeeks | 22 Apr, 2021
Scalability of a language is effected by some factors ranging from syntax details to component abstraction construct. The main aspect of scala that makes it scalable is that it is a combination of both object-oriented and functional programming. It has good support for both the programming constructs like ... | [
{
"code": null,
"e": 23695,
"s": 23667,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 24406,
"s": 23695,
"text": "Scalability of a language is effected by some factors ranging from syntax details to component abstraction construct. The main aspect of scala that makes it scalab... |
Adding WYSIWYG editor to Django Project - GeeksforGeeks | 01 Nov, 2020
Often, to manage content efficiently we use WYSIWYG (What You See Is What You Get) editor which stores our content in html and is also helpful to upload images, creating links, lists and works almost like WordPress editor. This article is in continuation of Blog CMS Project in Django. Check this out here –... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 24658,
"s": 24292,
"text": "Often, to manage content efficiently we use WYSIWYG (What You See Is What You Get) editor which stores our content in html and is also helpful to upload images, cr... |
Count the Specials | Practice | GeeksforGeeks | Given an array A (may contain duplicates) of N elements and a positive integer K. The task is to count the number of elements which occurs exactly floor(N/K) times in the array.
Example:
Input:N = 5K = 2A[] = 1 4 1 2 4Output:2Explanation:In the given array, 1 and 4 occurs floor(5/2) = 2 times. So count is 2.
Your Task:... | [
{
"code": null,
"e": 456,
"s": 278,
"text": "Given an array A (may contain duplicates) of N elements and a positive integer K. The task is to count the number of elements which occurs exactly floor(N/K) times in the array."
},
{
"code": null,
"e": 465,
"s": 456,
"text": "Example:... |
How to create shadow in Android Buttons? | This example demonstrates how How to create shadow in Android Buttons.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<androidx.cons... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "This example demonstrates how How to create shadow in Android Buttons."
},
{
"code": null,
"e": 1263,
"s": 1133,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cre... |
Privacy-Preserving Deep Learning with Federated Learning | Towards Data Science | Apple has recently announced a 47% YOY increase of its iPhone revenue with 49.26 million smartphones sold in the second quarter of 2021 [1]. For AAPL holders, this is absolutely good news. But what does it means for us, Data Science and AI enthusiasts?
Well, let’s do some calculations here. On average, every human crea... | [
{
"code": null,
"e": 418,
"s": 165,
"text": "Apple has recently announced a 47% YOY increase of its iPhone revenue with 49.26 million smartphones sold in the second quarter of 2021 [1]. For AAPL holders, this is absolutely good news. But what does it means for us, Data Science and AI enthusiasts?"
... |
Tryit Editor v3.7 | Tryit: A bordered list | [] |
A single MySQL query to search multiple words from different column values | For this, you can use WHERE clause with multiple LIKE. Let us first create a table −
mysql> create table DemoTable1536
-> (
-> Sentence text
-> );
Query OK, 0 rows affected (0.51 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1536 values('I like MySQL database.');
Quer... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "For this, you can use WHERE clause with multiple LIKE. Let us first create a table −"
},
{
"code": null,
"e": 1255,
"s": 1147,
"text": "mysql> create table DemoTable1536\n -> (\n -> Sentence text\n -> );\nQuery OK, 0 rows affec... |
Categories of SQL Functions - GeeksforGeeks | 02 Dec, 2021
SQL Functions are developed into Oracle Database and are available to use in various appropriate SQL Statements. Functions in SQL and User defined function in Pl/SQL both are different.
In query, if you call a SQL function with an argument with different datatype other than expected by the function, then ... | [
{
"code": null,
"e": 24249,
"s": 24221,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 24436,
"s": 24249,
"text": "SQL Functions are developed into Oracle Database and are available to use in various appropriate SQL Statements. Functions in SQL and User defined function in Pl/S... |
Spring Boot - Building RESTful Web Services | Spring Boot provides a very good support to building RESTful Web Services for enterprise applications. This chapter will explain in detail about building RESTful web services using Spring Boot.
Note − For building a RESTful Web Services, we need to add the Spring Boot Starter Web dependency into the build configuration... | [
{
"code": null,
"e": 3219,
"s": 3025,
"text": "Spring Boot provides a very good support to building RESTful Web Services for enterprise applications. This chapter will explain in detail about building RESTful web services using Spring Boot."
},
{
"code": null,
"e": 3352,
"s": 3219,
... |
PyQt5 QCalendarWidget - Getting Selected Date - GeeksforGeeks | 06 Aug, 2021
In this article we will see how we can get the selected date of QCalendarWidget, selected date is the date that is currently highlighted user can change the selected date using mouse and cursor by default selected date is the real-time date although we can set the selected date any time with the help of se... | [
{
"code": null,
"e": 25112,
"s": 25084,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 25441,
"s": 25112,
"text": "In this article we will see how we can get the selected date of QCalendarWidget, selected date is the date that is currently highlighted user can change the select... |
C Program find nCr and nPr. | In C programming language, nCr is referred as the combination. nCr is the selection of r objects from a set of n objects, where the order of objects does not matter.
nPr is referred as the permutation. nPr is arrangement of 'r' objects from a set of 'n' objects, which should be in an order or sequence.
The formulas to ... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "In C programming language, nCr is referred as the combination. nCr is the selection of r objects from a set of n objects, where the order of objects does not matter."
},
{
"code": null,
"e": 1366,
"s": 1228,
"text": "nPr is referred ... |
Special Operators in SQL | The different special operators in SQL are as follows −
ALL operator
ANY Operator
BETWEEN Operator
EXISTS Operator
IN Operator
LIKE Operator
Now let us create a table to understand the examples of special operators −
<Employee>
<Dependents>
Details of all the special operators using the above tables are −
The ALL opera... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "The different special operators in SQL are as follows −"
},
{
"code": null,
"e": 1131,
"s": 1118,
"text": "ALL operator"
},
{
"code": null,
"e": 1144,
"s": 1131,
"text": "ANY Operator"
},
{
"code": null,
... |
How to Get the names of the table in SQL - GeeksforGeeks | 14 Aug, 2020
The syntax provided in this article works only for SQL Server and MySQL.
If you want to know how many tables are present in your database and the details of the table like TABLE_SCHEMA, TABLE_TYPE and all.
Syntax (When we have only single database):
Select * from schema_name.table_name
Syntax (When we ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n14 Aug, 2020"
},
{
"code": null,
"e": 24286,
"s": 24212,
"text": "The syntax provided in this article works only for SQL Server and MySQL. "
},
{
"code": null,
"e": 24420,
"s": 24286,
"text": "If you want to k... |
The Future of Machine Learning and why it looks a lot like Julia 🤖 | by Logan Kilpatrick | Towards Data Science | TLDR; the future of ML is Julia. If you are looking for a quick answer, there you have it. If you want the well reasoned explanation, stick around. And don’t just take my word for it:
dev-discuss.pytorch.org
(The post above summarized: PyTorch devs want all the features Julia provides, but they don’t want to re-write P... | [
{
"code": null,
"e": 356,
"s": 172,
"text": "TLDR; the future of ML is Julia. If you are looking for a quick answer, there you have it. If you want the well reasoned explanation, stick around. And don’t just take my word for it:"
},
{
"code": null,
"e": 380,
"s": 356,
"text": "de... |
Delete a tail node from the given singly Linked List using C++ | A Linked List is a linear Data Structure that contains nodes and each node has two fields; one is the value or data to be inserted and the other field stores the address of the next node.
Our task here is to delete a node from the end of a Linked List. The last node is known as the tail node. If there is no node in the... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "A Linked List is a linear Data Structure that contains nodes and each node has two fields; one is the value or data to be inserted and the other field stores the address of the next node."
},
{
"code": null,
"e": 1414,
"s": 1250,
"te... |
Part 2: Hyperopt.. In this blog series, I am comparing... | by Jakub Czakon | Towards Data Science | In this blog series, I am comparing python HPO libraries. Before reading this post, I would highly advise that you read Part 0: Introduction where I:
talked about what HPO is,
selected libraries to compare,
selected the evaluation criteria,
defined an example problem for the HPO.
Code for this blog post and other parts... | [
{
"code": null,
"e": 321,
"s": 171,
"text": "In this blog series, I am comparing python HPO libraries. Before reading this post, I would highly advise that you read Part 0: Introduction where I:"
},
{
"code": null,
"e": 347,
"s": 321,
"text": "talked about what HPO is,"
},
{
... |
What is an array of structures in C language? | The most common use of structure in C programming language is an array of structures.
To declare an array of structures, first the structure must be defined and then, an array variable of that type can be defined.
For example, struct book b[10]; //10 elements in an array of structures of type ‘book’
Given below is the ... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "The most common use of structure in C programming language is an array of structures."
},
{
"code": null,
"e": 1276,
"s": 1148,
"text": "To declare an array of structures, first the structure must be defined and then, an array variab... |
Create a Pipeline in Pandas - GeeksforGeeks | 17 Jan, 2022
Pipelines play a useful role in transforming and manipulating tons of data. Pipeline are a sequence of data processing mechanisms. Pandas pipeline feature allows us to string together various user-defined Python functions in order to build a pipeline of data processing. There are two ways to create a Pipel... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 24596,
"s": 24212,
"text": "Pipelines play a useful role in transforming and manipulating tons of data. Pipeline are a sequence of data processing mechanisms. Pandas pipeline feature allows u... |
10 tips to improve your plotting. Because in real-life data science... | by Gonzalo Ferreiro Volpi | Towards Data Science | I have to be honest with you: when I was studying Data Science I completely underestimated the importance of plotting. It’s true, everything was a mess back then: in between learning Python from scratch, getting my head around all the possible algorithms and understanding the math behind everything, plotting was the ve... | [
{
"code": null,
"e": 516,
"s": 172,
"text": "I have to be honest with you: when I was studying Data Science I completely underestimated the importance of plotting. It’s true, everything was a mess back then: in between learning Python from scratch, getting my head around all the possible algorithms ... |
Convert Java Boolean Primitive to Boolean object | To convert Boolean Primitive to Boolean object, use the valueOf() method in Java.
Firstly, let us take a boolean primitive.
boolean val = false;
To convert it into an object, use the valueOf() method and set the argument as the boolean primitive.
Boolean res = Boolean.valueOf(val);
Let us see the complete example to le... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To convert Boolean Primitive to Boolean object, use the valueOf() method in Java."
},
{
"code": null,
"e": 1186,
"s": 1144,
"text": "Firstly, let us take a boolean primitive."
},
{
"code": null,
"e": 1207,
"s": 1186,
... |
How to create a simple counter Using ReactJS? - GeeksforGeeks | 05 Jan, 2021
React is a front-end, open-source JavaScript library that is used to create interactive UI. It is developed and maintained by Facebook. It can be used for the development of single-page and mobile applications.
We’ll be creating a simple application where we have 2 buttons one to increment and one to decre... | [
{
"code": null,
"e": 25691,
"s": 25663,
"text": "\n05 Jan, 2021"
},
{
"code": null,
"e": 25902,
"s": 25691,
"text": "React is a front-end, open-source JavaScript library that is used to create interactive UI. It is developed and maintained by Facebook. It can be used for the deve... |
Count Integral points inside a Triangle - GeeksforGeeks | 11 Jan, 2022
Given three non-collinear integral points in XY plane, find the number of integral points inside the triangle formed by the three points. (A point in XY plane is said to be integral/lattice point if both its co-ordinates are integral).
Example:
Input: p = (0, 0), q = (0, 5) and r = (5,0)
Output: 6
Expl... | [
{
"code": null,
"e": 26365,
"s": 26337,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 26601,
"s": 26365,
"text": "Given three non-collinear integral points in XY plane, find the number of integral points inside the triangle formed by the three points. (A point in XY plane is s... |
How to sort a nested Python dictionary? | If you have a dictionary of the following format:
{
'KEY1':{'name':'foo','data':1351,'completed':100},
'KEY2':{'name':'bar','data':1541,'completed':12},
'KEY3':{'name':'baz','data':58413,'completed':18}
}
And you want to sort by the key, completed within each entry, in a ascending order, you can use the sorted... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "If you have a dictionary of the following format:"
},
{
"code": null,
"e": 1276,
"s": 1112,
"text": "{\n 'KEY1':{'name':'foo','data':1351,'completed':100},\n 'KEY2':{'name':'bar','data':1541,'completed':12},\n 'KEY3':{'name':'b... |
Async & await keyword in C# | The async and await keyword is used in C# for asynchronous programming.
An application with a GUI, check the content of the queue and if an unprocessed task is there, it takes it out and processes it first. The code executes synchronously and the unprocessed task is completed first. The application will show stop respo... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "The async and await keyword is used in C# for asynchronous programming."
},
{
"code": null,
"e": 1449,
"s": 1134,
"text": "An application with a GUI, check the content of the queue and if an unprocessed task is there, it takes it out... |
Convert to Strictly increasing integer array with minimum changes - GeeksforGeeks | 20 Apr, 2022
Given an array of n integers. Write a program to find minimum number of changes in array so that array is strictly increasing of integers. In strictly increasing array A[i] < A[i+1] for 0 <= i < nExamples:
Input : arr[] = { 1, 2, 6, 5, 4}
Output : 2
We can change a[2] to any value
between 2 and 5.
and a... | [
{
"code": null,
"e": 25334,
"s": 25306,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 25542,
"s": 25334,
"text": "Given an array of n integers. Write a program to find minimum number of changes in array so that array is strictly increasing of integers. In strictly increasing a... |
Changing year in MySQL date? | To change the year in MySQL date, you need to use DATE_FORMAT() function with UPDATE
command. The syntax is as follows.
UPDATE yourTableName
SET yourDateColumnName = DATE_FORMAT(yourDateColumnName ,'yourYearValue-%m-%d');
To understand the above syntax, let us create a table. The query to create a table is as follows −... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "To change the year in MySQL date, you need to use DATE_FORMAT() function with UPDATE\ncommand. The syntax is as follows."
},
{
"code": null,
"e": 1284,
"s": 1182,
"text": "UPDATE yourTableName\nSET yourDateColumnName = DATE_FORMAT(yo... |
RTTI (Run-time type Information) in C++ program | In this section, we will see what is the RTTI (Runtime Type Information) in C++. In C++ the RTTI is a mechanism, that exposes information about an object’s datatype during runtime. This feature can be available only when the class has at least one virtual function. It allows the type of an object to be determined when ... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "In this section, we will see what is the RTTI (Runtime Type Information) in C++. In C++ the RTTI is a mechanism, that exposes information about an object’s datatype during runtime. This feature can be available only when the class has at least one virtu... |
Cheat sheet for implementing 7 methods for selecting the optimal number of clusters in Python | by Indraneel Dutta Baruah | Towards Data Science | Segmentation provides a data driven angle for examining meaningful segments that executives can use to take targeted actions and improve business outcomes. Many executives run the risk of making decisions based on overgeneralizations because they utilize a one-size-fits-all approach to assess their business ecosystem. ... | [
{
"code": null,
"e": 617,
"s": 172,
"text": "Segmentation provides a data driven angle for examining meaningful segments that executives can use to take targeted actions and improve business outcomes. Many executives run the risk of making decisions based on overgeneralizations because they utilize ... |
Find all substrings that are anagrams of another substring of the string S - GeeksforGeeks | 25 Aug, 2021
Given a string S, the task is to find all the substrings in the string S which is an anagram of another different substring in the string S. The different substrings mean the substring starts at the different index.
Examples:
Input: S = “aba”Output: a a ab baExplanation:Following substrings are anagrams of... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 25218,
"s": 25002,
"text": "Given a string S, the task is to find all the substrings in the string S which is an anagram of another different substring in the string S. The different substrin... |
Factorial recursion in JavaScript | We are required to write a JavaScript function that computes the Factorial of a number n by making use of recursive approach.
Here, we are finding the factorial recursion and creating a custom function recursiceFactorial() −
const num = 9;
const recursiceFactorial = (num, res = 1) => {
if(num){
return recursic... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "We are required to write a JavaScript function that computes the Factorial of a number n by making use of recursive approach."
},
{
"code": null,
"e": 1287,
"s": 1188,
"text": "Here, we are finding the factorial recursion and creatin... |
Custom Named Entity Recognition Using spaCy | by Kaustumbh Jaiswal | Towards Data Science | Named entity recognition (NER) is a sub-task of information extraction (IE) that seeks out and categorises specified entities in a body or bodies of texts. NER is also simply known as entity identification, entity chunking and entity extraction. NER is used in many fields in Artificial Intelligence (AI) including Natur... | [
{
"code": null,
"e": 543,
"s": 172,
"text": "Named entity recognition (NER) is a sub-task of information extraction (IE) that seeks out and categorises specified entities in a body or bodies of texts. NER is also simply known as entity identification, entity chunking and entity extraction. NER is us... |
How to count the number of rows in a table in Selenium with python? | We can count the total number of rows in a table in Selenium. The rows of a table are represented by <tr> tag in html code. To get all the rows, we shall use the locator xpath and then use find_elements_by_xpath method. The list of rows will be returned. Next we need to compute the size of the list with the help of len... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "We can count the total number of rows in a table in Selenium. The rows of a table are represented by <tr> tag in html code. To get all the rows, we shall use the locator xpath and then use find_elements_by_xpath method. The list of rows will be returned... |
Silverlight - Getting Started | In this chapter, we will look at a working example of Silverlight. We need two things −
First, we require a web page. Silverlight is intended for rich internet applications, It is designed to run inside of a web browser as part of a web page. The page needs to incorporate a suitable tag to load the Silverlight plug-in.... | [
{
"code": null,
"e": 2420,
"s": 2332,
"text": "In this chapter, we will look at a working example of Silverlight. We need two things −"
},
{
"code": null,
"e": 2792,
"s": 2420,
"text": "First, we require a web page. Silverlight is intended for rich internet applications, It is de... |
How to set the line breakpoint in the PowerShell? | To set the line breakpoint in the script, we can use the Set-PSBreakpoint command with -Line parameter and need to give the path of the script on which the Line breakpoint needs to set.
Consider we have the script below which retrieves the value up to 99, starting from 1,
We will set the Line Breakpoint at line number ... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "To set the line breakpoint in the script, we can use the Set-PSBreakpoint command with -Line parameter and need to give the path of the script on which the Line breakpoint needs to set."
},
{
"code": null,
"e": 1335,
"s": 1248,
"text... |
MySQL - CREATE TABLESPACE Statement | A logical group of datafiles in a database is known as a table space each database contains at least one tablespace.
You can create a tablespace in MySQL using the CREATE TABLESPACE Statement.
Following is the syntax to create a table space in MySQL −
CREATE [UNDO] TABLESPACE tablespace_name
Where, tablespace_name is ... | [
{
"code": null,
"e": 2450,
"s": 2333,
"text": "A logical group of datafiles in a database is known as a table space each database contains at least one tablespace."
},
{
"code": null,
"e": 2526,
"s": 2450,
"text": "You can create a tablespace in MySQL using the CREATE TABLESPACE ... |
Inheritance in Java | Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance, the information is made manageable in a hierarchical order.
The class which inherits the properties of other is known as a subclass (derived class, child class) and the class ... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance, the information is made manageable in a hierarchical order. "
},
{
"code": null,
"e": 1464,
"... |
Check whether a binary tree is a full binary tree or not - GeeksforGeeks | 20 Jan, 2022
A full binary tree is defined as a binary tree in which all nodes have either zero or two child nodes. Conversely, there is no node in a full binary tree, which has one child node. More information about full binary trees can be found here.
For Example :
To check whether a binary tree is a full binary tr... | [
{
"code": null,
"e": 25516,
"s": 25488,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 25757,
"s": 25516,
"text": "A full binary tree is defined as a binary tree in which all nodes have either zero or two child nodes. Conversely, there is no node in a full binary tree, which ha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.