title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Adobe Interview | Set 10 (Software Engineer) - GeeksforGeeks | 22 May, 2019
Written:Aptitude: Objective 50 min 45 questionsLR- 2 passages-5 eachDI- 1 paragraph- 5 eachMathematical
Easy only. Just time concern for those who are out of touch. My suggestion will be to do the LR in the end.
Java WhiteBox test: Subjective 45 min 20 questionsjava-15j2ee-5What is package and how is it us... | [
{
"code": null,
"e": 25218,
"s": 25190,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 25322,
"s": 25218,
"text": "Written:Aptitude: Objective 50 min 45 questionsLR- 2 passages-5 eachDI- 1 paragraph- 5 eachMathematical"
},
{
"code": null,
"e": 25430,
"s": 25322,... |
Find maximum length sub-list in a nested list in Python | we often deal with nested lists when doing data analysis in python. In this article, we will see how to find out the longest list among the elements in a nested list and then print this along with its length.
We declare a nested list and give it as input to the lambda function along with its length. Finally, we apply t... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "we often deal with nested lists when doing data analysis in python. In this article, we will see how to find out the longest list among the elements in a nested list and then print this along with its length."
},
{
"code": null,
"e": 1470,
... |
Bootstrap 3 Tutorial | Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.
Bootstrap is completely free to download and use!
This Bootstrap tutorial contains hundreds of Bootstrap examples.
With our online editor, you can edit the code, and click on a button to view the result.
... | [
{
"code": null,
"e": 116,
"s": 0,
"text": "Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites."
},
{
"code": null,
"e": 166,
"s": 116,
"text": "Bootstrap is completely free to download and use!"
},
{
"code": ... |
continue - Unix, Linux Command | continue - To resume the next iteration of an enclosing for, while, until, or select loop.
continue [n]
Create a Utility Class to use continue.
#continuesample
for myloop in 1 2 3 4 5
do
echo -n "$myloop"
if [ "$myloop" -eq 3 ]
then
continue # Skip rest of this particular loop iteration.
fi
done
Run th... | [
{
"code": null,
"e": 10668,
"s": 10577,
"text": "continue - To resume the next iteration of an enclosing for, while, until, or select loop."
},
{
"code": null,
"e": 10681,
"s": 10668,
"text": "continue [n]"
},
{
"code": null,
"e": 10721,
"s": 10681,
"text": "C... |
Valid Parentheses in C++ | Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid.
The task is simple; we will use the stack to do this. We should foll... | [
{
"code": null,
"e": 1314,
"s": 1062,
"text": "Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid."
... |
How to convert ISO 8601 string to Date/time object in Android? | This example demonstrates how do I convert ISO 8601 string to date/time object in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "This example demonstrates how do I convert ISO 8601 string to date/time object in android."
},
{
"code": null,
"e": 1282,
"s": 1153,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ... |
Containership in C++ - GeeksforGeeks | 09 Oct, 2019
We can create an object of one class into another and that object will be a member of the class. This type of relationship between classes is known as containership or has_a relationship as one class contain the object of another class. And the class which contains the object and members of another class i... | [
{
"code": null,
"e": 24124,
"s": 24096,
"text": "\n09 Oct, 2019"
},
{
"code": null,
"e": 24654,
"s": 24124,
"text": "We can create an object of one class into another and that object will be a member of the class. This type of relationship between classes is known as containershi... |
How to Align Column DIVs as Left-Center-Right with CSS Flex | To align items of a flex container along its main axis by distributing space around it, we use the justify-content property of CSS.
The syntax of CSS justify-content property is as follows −
Selector {
display: flex;
justify-content: /*value*/
}
The following examples illustrate CSS justify-content property.
Liv... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "To align items of a flex container along its main axis by distributing space around it, we use the justify-content property of CSS."
},
{
"code": null,
"e": 1253,
"s": 1194,
"text": "The syntax of CSS justify-content property is as f... |
SWING - Quick Guide | Swing API is a set of extensible GUI Components to ease the developer's life to create JAVA based Front End/GUI Applications. It is build on top of AWT API and acts as a replacement of AWT API, since it has almost every control corresponding to AWT controls. Swing component follows a Model-View-Controller architecture ... | [
{
"code": null,
"e": 2119,
"s": 1763,
"text": "Swing API is a set of extensible GUI Components to ease the developer's life to create JAVA based Front End/GUI Applications. It is build on top of AWT API and acts as a replacement of AWT API, since it has almost every control corresponding to AWT cont... |
Find Duplicates of array using bit array in C++ | We have an array of n numbers, where n is maximum 32,000. Now the given array may have duplicate entries and we do not know what n is. Now the question is arisen that with only4 Kilobytes of memory available, how would display or print all duplicates elements in the array?
arr[] = {2, 6, 2, 11, 13, 11}
2 11
2 and 11 ap... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "We have an array of n numbers, where n is maximum 32,000. Now the given array may have duplicate entries and we do not know what n is. Now the question is arisen that with only4 Kilobytes of memory available, how would display or print all duplicates el... |
Multiple Statements in Python | The semicolon ( ; ) allows multiple statements on the single line given that neither statement starts a new code block. Here is a sample snip using the semicolon −
import sys; x = 'foo'; sys.stdout.write(x + '\n')
A group of individual statements, which make a single code block are called suites in Python. Compound or ... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "The semicolon ( ; ) allows multiple statements on the single line given that neither statement starts a new code block. Here is a sample snip using the semicolon −"
},
{
"code": null,
"e": 1276,
"s": 1226,
"text": "import sys; x = 'f... |
How to compare two lists in Python? | The list in python is a collection of similar items. We may at times need to compare data items in the two lists to perform certain operations. We will discuss certain methods to compare two lists in python.
The list.sort() method sorts the two lists and the == operator compares the two lists item by item which means t... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "The list in python is a collection of similar items. We may at times need to compare data items in the two lists to perform certain operations. We will discuss certain methods to compare two lists in python."
},
{
"code": null,
"e": 1660,
... |
Bayesian Linear Regression in Python: Using Machine Learning to Predict Student Grades Part 2 | by Will Koehrsen | Towards Data Science | In Part One of this Bayesian Machine Learning project, we outlined our problem, performed a full exploratory data analysis, selected our features, and established benchmarks. Here we will implement Bayesian Linear Regression in Python to build a model. After we have trained our model, we will interpret the model parame... | [
{
"code": null,
"e": 654,
"s": 172,
"text": "In Part One of this Bayesian Machine Learning project, we outlined our problem, performed a full exploratory data analysis, selected our features, and established benchmarks. Here we will implement Bayesian Linear Regression in Python to build a model. Af... |
How to get the child element of a parent using JavaScript? | Following is the code for getting the child element of a parent using JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva,... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "Following is the code for getting the child element of a parent using JavaScript −"
},
{
"code": null,
"e": 1156,
"s": 1145,
"text": " Live Demo"
},
{
"code": null,
"e": 2312,
"s": 1156,
"text": "<!DOCTYPE html>\n... |
Implement Your First Ever Lane Detection In Any Car Racing Game | Towards Data Science | Lane detection and control has become a common feature in many vehicles today. Additionally it is a basic starting point for anyone going in the direction of Autonomous Driving. But for most people who are not working on autonomous driving or computer vision, starting with it might appear much more of a daunting task t... | [
{
"code": null,
"e": 512,
"s": 172,
"text": "Lane detection and control has become a common feature in many vehicles today. Additionally it is a basic starting point for anyone going in the direction of Autonomous Driving. But for most people who are not working on autonomous driving or computer vis... |
[Learning Note] Single Shot MultiBox Detector with Pytorch — Part 1 | by Ceshine Lee | Towards Data Science | Recently I’m trying to pick up Pytorch as well as some object detection deep learning algorithms. So to kill two birds with one stone, I decided to read the Single Shot MultiBox Detector paper along with one of the Pytorch implementation written by Max deGroot.
Admittedly, I have some trouble understanding some ideas i... | [
{
"code": null,
"e": 434,
"s": 172,
"text": "Recently I’m trying to pick up Pytorch as well as some object detection deep learning algorithms. So to kill two birds with one stone, I decided to read the Single Shot MultiBox Detector paper along with one of the Pytorch implementation written by Max de... |
Java.io.SequenceInputStream in Java - GeeksforGeeks | 06 Jan, 2017
The SequenceInputStream class allows you to concatenate multiple InputStreams. It reads data of streams one by one. It starts out with an ordered collection of input streams and reads from the first one until end of file is reached, whereupon it reads from the second one, and so on, until end of file is re... | [
{
"code": null,
"e": 23939,
"s": 23911,
"text": "\n06 Jan, 2017"
},
{
"code": null,
"e": 24296,
"s": 23939,
"text": "The SequenceInputStream class allows you to concatenate multiple InputStreams. It reads data of streams one by one. It starts out with an ordered collection of inp... |
Hierarchical data in Pandas - GeeksforGeeks | 11 Dec, 2020
In pandas, we can arrange data within the data frame from the existing data frame. For example, we are having the same name with different features, instead of writing the name all time, we can write only once. We can create hierarchical data from the existing data frame using pandas.
Example:
See the stud... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 24498,
"s": 24212,
"text": "In pandas, we can arrange data within the data frame from the existing data frame. For example, we are having the same name with different features, instead of wri... |
HTML5 - Web RTC | Web RTC introduced by World Wide Web Consortium (W3C). That supports browser-tobrowser applications for voice calling, video chat, and P2P file sharing.
If you want to try out? web RTC available for Chrome, Opera, and Firefox. A good place to start is the simple video chat application at here. Web RTC implements three ... | [
{
"code": null,
"e": 2761,
"s": 2608,
"text": "Web RTC introduced by World Wide Web Consortium (W3C). That supports browser-tobrowser applications for voice calling, video chat, and P2P file sharing."
},
{
"code": null,
"e": 2951,
"s": 2761,
"text": "If you want to try out? web R... |
Visual Servoing for Robotics. Robotics — path planning using only... | by Emmanouil Markodimitrakis | Towards Data Science | The purpose of this project is to implement an end to end visual servoing project using a fish-eye camera and a Turtlubot3 with ROS. Visual servoing means, that the robot will implement autonomous driving using only one sensor, the camera!
The first objective is to move the robot from the current position to the target... | [
{
"code": null,
"e": 411,
"s": 171,
"text": "The purpose of this project is to implement an end to end visual servoing project using a fish-eye camera and a Turtlubot3 with ROS. Visual servoing means, that the robot will implement autonomous driving using only one sensor, the camera!"
},
{
"... |
jQuery | Keydown() with Examples - GeeksforGeeks | 13 Feb, 2019
The keydown() is an inbuilt method in jQuery which is used to trigger the keydown event whenever User presses a key on the keyboard. If the key is kept pressed, the event is sent every time the operating system repeats the key. So, Using keydown() method we can detect if any key is on its way down.Syntax:
... | [
{
"code": null,
"e": 25151,
"s": 25123,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 25458,
"s": 25151,
"text": "The keydown() is an inbuilt method in jQuery which is used to trigger the keydown event whenever User presses a key on the keyboard. If the key is kept pressed, th... |
numpy.index() in Python | 28 Nov, 2018
numpy.core.defchararray.index(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range But if substring is not found, it raises ValueError.
Parameters:arr : array-like or string to be searched.substring : substring to search for.start, end : [int, optional] Range ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "numpy.core.defchararray.index(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range But if substring is not found, it raises Valu... |
Sort Correlation Matrix in Python | 26 Dec, 2020
Prerequisites: correlation matrix
A correlation matrix investigates the dependence between multiple variables at the same time. It shows symmetric tabular data where each row and column represent a variable, and the corresponding value is the correlation coefficient denoting the strength of a relationship ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Dec, 2020"
},
{
"code": null,
"e": 62,
"s": 28,
"text": "Prerequisites: correlation matrix"
},
{
"code": null,
"e": 770,
"s": 62,
"text": "A correlation matrix investigates the dependence between multiple variable... |
Print a given matrix in zigzag form | 11 Jul, 2022
Given a 2D array, print it in zigzag form. Examples :
Input :
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
Output :
1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 20 19 18 17 16
Input :
10 24 32
50 6 17
99 ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 107,
"s": 52,
"text": "Given a 2D array, print it in zigzag form. Examples : "
},
{
"code": null,
"e": 417,
"s": 107,
"text": "Input : \n 1 2 3 4 5\n 6 ... |
Pairwise Swap Nodes of a given Linked List | 15 Jul, 2022
Given a singly linked list, write a function to swap elements pairwise.
Input : 1->2->3->4->5->6->NULL Output : 2->1->4->3->6->5->NULL
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
English
This is a modal window.
Beginning of dialog window. Es... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2022"
},
{
"code": null,
"e": 125,
"s": 52,
"text": "Given a singly linked list, write a function to swap elements pairwise. "
},
{
"code": null,
"e": 188,
"s": 125,
"text": "Input : 1->2->3->4->5->6->NULL O... |
How to validate Visa Card number using Regular Expression | 15 Feb, 2021
Given a string str, the task is to check whether the given string is valid Visa Card number or not by using Regular Expression. The valid Visa Card number must satisfy the following conditions:
It should be 13 or 16 digits long, new cards have 16 digits and old cards have 13 digits.It should be starts wi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 250,
"s": 54,
"text": "Given a string str, the task is to check whether the given string is valid Visa Card number or not by using Regular Expression. The valid Visa Card number must satisfy the fo... |
What is Application Service Provider (ASP) ? | 22 Jun, 2021
Application Service Provider :It is a third-party unit which provides access to software applications and other services to individuals, multiple customers or organizations to meet their requirements through Internet. Multiple users and organizations access the service over the network based on pay per use... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 600,
"s": 28,
"text": "Application Service Provider :It is a third-party unit which provides access to software applications and other services to individuals, multiple customers or organizations to... |
Program for IP forwarding table lookup | 22 Nov, 2021
In Unix operating system, there is a routing table that contains a certain number of tuples. These tuples are consist of network IP, subnet mask, gateway IP, and interface name. These details are used to forward a packet to the outside of its network to connect to the internet. So this article gives an ide... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 416,
"s": 28,
"text": "In Unix operating system, there is a routing table that contains a certain number of tuples. These tuples are consist of network IP, subnet mask, gateway IP, and interface nam... |
Conditional Inference Trees in R Programming | 10 Jul, 2020
Conditional Inference Trees is a non-parametric class of decision trees and is also known as unbiased recursive partitioning. It is a recursive partitioning approach for continuous and multivariate response variables in a conditional inference framework. To perform this approach in R Programming, ctree() f... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 529,
"s": 53,
"text": "Conditional Inference Trees is a non-parametric class of decision trees and is also known as unbiased recursive partitioning. It is a recursive partitioning approach for cont... |
Converting an image to ASCII image in Python | In this article we we want to convert a given images into a text bases image also called ASCII image.
Below is the Python program which will take an input imagee and various functions to convert them into grayscale picture and then apply the ASCII characters to create different patterns insert the image. Finally the em... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "In this article we we want to convert a given images into a text bases image also called ASCII image."
},
{
"code": null,
"e": 1454,
"s": 1164,
"text": "Below is the Python program which will take an input imagee and various function... |
C++ Program for QuickSort? | Quicksort is a sorting technique which uses comparisons to sort an unsorted list( array ). Quicksort is also known as partition exchange sort.
It is not a stable sort, Because the relative order of equal sort items is not preserved. Quicksort can operate on an array, requiring small additional amounts of memory to perf... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "Quicksort is a sorting technique which uses comparisons to sort an unsorted list( array ). Quicksort is also known as partition exchange sort."
},
{
"code": null,
"e": 1557,
"s": 1205,
"text": "It is not a stable sort, Because the re... |
Pandas GroupBy – Unstack | 19 Jan, 2022
Pandas Unstack is a function that pivots the level of the indexed columns in a stacked dataframe. A stacked dataframe is usually a result of an aggregated groupby function in pandas. Stack() sets the columns to a new level of hierarchy whereas Unstack() pivots the indexed column. There are different ways t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 436,
"s": 52,
"text": "Pandas Unstack is a function that pivots the level of the indexed columns in a stacked dataframe. A stacked dataframe is usually a result of an aggregated groupby function in... |
Minimum increment by k operations to make all elements equal | 31 May, 2022
You are given an array of n-elements, you have to find the number of operations needed to make all elements of array equal. Where a single operation can increment an element by k. If it is not possible to make all elements equal print -1.Example :
Input : arr[] = {4, 7, 19, 16}, k = 3
Output : 10
Input... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 302,
"s": 52,
"text": "You are given an array of n-elements, you have to find the number of operations needed to make all elements of array equal. Where a single operation can increment an element ... |
Maximum difference between node and its ancestor in Binary Tree | 31 Mar, 2022
Given a binary tree, we need to find maximum value we can get by subtracting value of node B from value of node A, where A and B are two nodes of the binary tree and A is an ancestor of B. Expected time complexity is O(n).
For example, consider below binary tree
We can have various ancestor-node differenc... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 277,
"s": 54,
"text": "Given a binary tree, we need to find maximum value we can get by subtracting value of node B from value of node A, where A and B are two nodes of the binary tree and A is an ... |
Python – Moving an object in PyGame | 06 Mar, 2020
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Now, it’s up to the imagination or necessity of developer, what type of game he/she wants to develop using this tool... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Mar, 2020"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python progr... |
std::reverse() in C++ | 17 Feb, 2021
reverse() is a predefined function in header file algorithm. It is defined as a template in the above mentioned header file. It reverses the order of the elements in the range [first, last) of any container. The time complexity is O(n). Note: The range used is [first, last), which contains all the elements... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 468,
"s": 52,
"text": "reverse() is a predefined function in header file algorithm. It is defined as a template in the above mentioned header file. It reverses the order of the elements in the rang... |
Getting Started With Testing in Python | 11 Aug, 2021
Here we’ll learn how to create a basic test, execute it, and find the bugs before your users do! You’ll learn about the tools available to write and execute tests and also see testing terms like automated, manual, unit and integration tests as well.
Example for Unit testing:
Python3
# define a functiondef ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 302,
"s": 52,
"text": "Here we’ll learn how to create a basic test, execute it, and find the bugs before your users do! You’ll learn about the tools available to write and execute tests and also se... |
How to Publish Python package at PyPi using Twine module? | 19 Oct, 2021
Python is so flexible and easy to use because of its available packages that are hosted on pypi.org, Let’s see how to publish your own package on PyPi using Twine module.
You must have account of pypi.org, if don’t create an account
The twine library is created to simplify uploading packages in pypi. To in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 199,
"s": 28,
"text": "Python is so flexible and easy to use because of its available packages that are hosted on pypi.org, Let’s see how to publish your own package on PyPi using Twine module."
}... |
jQuery Highcharts Plugin | 08 Jun, 2020
jQuery provides a very modern and highly interactive Highcharts plugin for programmers to implement charts for representing or comparing data for web and mobile applications. It’s multi-platform and supports SVG.
You have to download the required files in the working folder so that the programmer can inclu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 241,
"s": 28,
"text": "jQuery provides a very modern and highly interactive Highcharts plugin for programmers to implement charts for representing or comparing data for web and mobile applications. ... |
Determine the type of an image in Python using imghdr | 08 Feb, 2018
Suppose you are given an image type file and you need to determine the type of that file. In simple words, you need to get the extension of that image type file. This can be used in a project to verify whether the image you have requested for is actually an image and with which extension does it come.
imgh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Feb, 2018"
},
{
"code": null,
"e": 355,
"s": 52,
"text": "Suppose you are given an image type file and you need to determine the type of that file. In simple words, you need to get the extension of that image type file. This can be ... |
std::stol() and std::stoll() functions in C++ | 21 Jun, 2018
std::stol(): This function converts the string, provided as an argument in the function call, to long int. It parses str interpreting its content as an integral number of the specified base, which is returned as a value of type long int.Syntax:long int stol (const string& str, size_t* idx = 0, int base = ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2018"
},
{
"code": null,
"e": 3352,
"s": 52,
"text": "std::stol(): This function converts the string, provided as an argument in the function call, to long int. It parses str interpreting its content as an integral number of th... |
numpy.amax() in Python | 28 Apr, 2022
The numpy.amax() method returns the maximum of an array or maximum along the axis(if mentioned). Syntax:
numpy.amax(arr, axis = None, out = None, keepdims = <class numpy._globals._NoValue>)
Parameters –
arr : [array_like] input data
axis : [int or tuples of int] axis along which we want the max value. Oth... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 157,
"s": 52,
"text": "The numpy.amax() method returns the maximum of an array or maximum along the axis(if mentioned). Syntax:"
},
{
"code": null,
"e": 242,
"s": 157,
"text": "... |
How to Adjust the Volume of Android Phone Programmatically from the App? | 15 Oct, 2020
As stated in the title of this article let’s discuss how to adjust the volume of an Android Phone programmatically from the App. Basically, control the volume in the app mean
Increase or Decrease the Volume without the Volume Bar UI
Increase or Decrease the Volume with the Volume Bar UI
Mute or Unmute the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 229,
"s": 53,
"text": "As stated in the title of this article let’s discuss how to adjust the volume of an Android Phone programmatically from the App. Basically, control the volume in the app mean... |
Rearrange Odd and Even values in Alternate Fashion in Ascending Order | 15 Sep, 2021
Given an array of integers (both odd and even), the task is to arrange them in such a way that odd and even values come in alternate fashion in non-decreasing order(ascending) respectively.
If the smallest value is Even then we have to print Even-Odd pattern.
If the smallest value is Odd then we have to ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 244,
"s": 52,
"text": "Given an array of integers (both odd and even), the task is to arrange them in such a way that odd and even values come in alternate fashion in non-decreasing order(ascending... |
How to Scrape Web Data from Google using Python? | 29 Dec, 2020
Prerequisites: Python Requests, Implementing Web Scraping in Python with BeautifulSoup
Web scraping is a technique to fetch data from websites. While surfing on the web, many websites don’t allow the user to save data for personal use. One way is to manually copy-paste the data, which both tedious and time... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 140,
"s": 53,
"text": "Prerequisites: Python Requests, Implementing Web Scraping in Python with BeautifulSoup"
},
{
"code": null,
"e": 449,
"s": 140,
"text": "Web scraping is a ... |
Zero-day Exploit (Cyber Security Attack) | 29 Jun, 2022
In this IT era, majority of the cyberspaces are vulnerable to different kinds of attacks.
Zero-day exploit is a type of cyber security attack that occur on the same day the software, hardware or firmware flaw is detected by the manufacturer. As it’s been zero days since the security flaw was last exploit,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 119,
"s": 28,
"text": "In this IT era, majority of the cyberspaces are vulnerable to different kinds of attacks. "
},
{
"code": null,
"e": 682,
"s": 119,
"text": "Zero-day exploi... |
Python | Count occurrences of a character in string | 22 Nov, 2018
Given a string, the task is to count the frequency of a single character in that string. This particular operation on string is quite useful in many applications such as removing duplicates or detecting unwanted characters.
Method #1 : Naive method
Iterate the entire string for that particular character an... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 276,
"s": 52,
"text": "Given a string, the task is to count the frequency of a single character in that string. This particular operation on string is quite useful in many applications such as remo... |
Prolog - Inputs and Outputs | In this chapter, we will see some techniques to handle inputs and outputs through prolog. We will use some built in predicates to do these tasks, and also see file handling techniques.
Following topics will be discussed in detail −
Handling inputs and outputs
Handling inputs and outputs
File handling using Prolog
File ... | [
{
"code": null,
"e": 2411,
"s": 2226,
"text": "In this chapter, we will see some techniques to handle inputs and outputs through prolog. We will use some built in predicates to do these tasks, and also see file handling techniques."
},
{
"code": null,
"e": 2458,
"s": 2411,
"text"... |
Smaller on Left | Practice | GeeksforGeeks | Given an array arr[ ] of N positive integers, the task is to find the greatest element on the left of every element in the array which is strictly smaller than itself, if this element does not exist for an index print "-1".
Example 1:
Input:
N = 5
arr[] = {2, 3, 4, 5, 1}
Output:
-1 2 3 4 -1
Explanation:
Greatest eleme... | [
{
"code": null,
"e": 462,
"s": 238,
"text": "Given an array arr[ ] of N positive integers, the task is to find the greatest element on the left of every element in the array which is strictly smaller than itself, if this element does not exist for an index print \"-1\"."
},
{
"code": null,
... |
Program to add two binary strings, and return also as binary string in C++ | Suppose we have two binary strings a and b, we have to add these binary numbers and find their sum, also as a string.
So, if the input is like a = "10110", b = "10010", then the output will be "101000".
To solve this, we will follow these steps −
ret := empty string
na := size of a, nb := size of b
i := na - 1, j := nb... | [
{
"code": null,
"e": 1305,
"s": 1187,
"text": "Suppose we have two binary strings a and b, we have to add these binary numbers and find their sum, also as a string."
},
{
"code": null,
"e": 1390,
"s": 1305,
"text": "So, if the input is like a = \"10110\", b = \"10010\", then the ... |
Modify contents of Linked List | 03 Jul, 2022
Given a singly linked list containing n nodes. Modify the value of first half nodes such that 1st node’s new value is equal to the last node’s value minus first node’s current value, 2nd node’s new value is equal to the second last node’s value minus 2nd node’s current value, likewise for first half nodes.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 457,
"s": 54,
"text": "Given a singly linked list containing n nodes. Modify the value of first half nodes such that 1st node’s new value is equal to the last node’s value minus first node’s curren... |
Vue.js Methods | 10 Sep, 2021
A Vue method is an object associated with the Vue instance. Functions are defined inside the methods object. Methods are useful when you need to perform some action with v-on directive on an element to handle events. Functions defined inside the methods object can be further called for performing actions.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 335,
"s": 28,
"text": "A Vue method is an object associated with the Vue instance. Functions are defined inside the methods object. Methods are useful when you need to perform some action with v-on ... |
Convert OpenCV image to PIL image in Python | 17 Dec, 2020
OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human. When it is integrated with ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 556,
"s": 28,
"text": "OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Jav... |
Rename column by index in Pandas | 26 Dec, 2020
Prerequisites: Pandas
A column of a data frame can be changed using the position it is in known as its index. Just by the use of index a column can be renamed. This article discusses all such possible methods.
Import required python library.
Create data
Provide index of the column to be renamed as argumen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Dec, 2020"
},
{
"code": null,
"e": 50,
"s": 28,
"text": "Prerequisites: Pandas"
},
{
"code": null,
"e": 239,
"s": 50,
"text": "A column of a data frame can be changed using the position it is in known as its index... |
Finding the smallest positive integer not present in an array in JavaScript | We are required to write a JavaScript function that takes in array of integers as the first and the only argument.
Our function should find and return that smallest positive integer which is not present in the array.
For example −
If the input array is −
const arr = [4, 2, -1, 0, 3, 9, 1, -5];
Then the output should be... | [
{
"code": null,
"e": 1302,
"s": 1187,
"text": "We are required to write a JavaScript function that takes in array of integers as the first and the only argument."
},
{
"code": null,
"e": 1404,
"s": 1302,
"text": "Our function should find and return that smallest positive integer ... |
How to add and remove properties from objects in JavaScript ? | 13 Jan, 2022
In this article, we will try to understand how to add properties to an object as well as how to add or remove the properties from an object in JavaScript.
Before we actually go and see the addition and removal of properties from an object let us first understand the basics of an object in JavaScript.
Objec... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 209,
"s": 54,
"text": "In this article, we will try to understand how to add properties to an object as well as how to add or remove the properties from an object in JavaScript."
},
{
"code... |
What is the use of tilde operator (~) in R? | Tilde operator is used to define the relationship between dependent variable and independent variables in a statistical model formula. The variable on the left-hand side of tilde operator is the dependent variable and the variable(s) on the right-hand side of tilde operator is/are called the independent variable(s). So... | [
{
"code": null,
"e": 1654,
"s": 1187,
"text": "Tilde operator is used to define the relationship between dependent variable and independent variables in a statistical model formula. The variable on the left-hand side of tilde operator is the dependent variable and the variable(s) on the right-hand s... |
Count pairs in a sorted array whose sum is less than x | 08 Jul, 2022
Given a sorted integer array and number x, the task is to count pairs in array whose sum is less than x.
Examples:
Input : arr[] = {1, 3, 7, 9, 10, 11}
x = 7
Output : 1
There is only one pair (1, 3)
Input : arr[] = {1, 2, 3, 4, 5, 6, 7, 8}
x = 7
Output : 6
Pairs are (1, 2), (1, 3), (1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 157,
"s": 52,
"text": "Given a sorted integer array and number x, the task is to count pairs in array whose sum is less than x."
},
{
"code": null,
"e": 168,
"s": 157,
"text": "... |
PySpark dataframe add column based on other columns | 23 Aug, 2021
In this article, we are going to see how to add columns based on another column to the Pyspark Dataframe.
Creating Dataframe for demonstration:
Here we are going to create a dataframe from a list of the given dataset.
Python3
# Create a spark sessionfrom pyspark.sql import SparkSessionspark = SparkSession.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 160,
"s": 54,
"text": "In this article, we are going to see how to add columns based on another column to the Pyspark Dataframe."
},
{
"code": null,
"e": 198,
"s": 160,
"text": ... |
How to ignore mouse interaction on overlay image using JavaScript ? | 22 Jun, 2020
Ignoring mouse interaction on overlay image can be controlled by a CSS property namely pointer-events.It is a property that defines if an element of the page will react to the pointer-events.
Syntax:
pointer-events: auto\none;
Example: The following example demonstrates the use of pointer-events property.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 220,
"s": 28,
"text": "Ignoring mouse interaction on overlay image can be controlled by a CSS property namely pointer-events.It is a property that defines if an element of the page will react to the... |
PyQt5 QListWidget – Current Selected Row Signal | 01 Aug, 2020
In this article we will see how we can get the current selected row changed signal 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 lis... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 561,
"s": 28,
"text": "In this article we will see how we can get the current selected row changed signal of the QListWidget. QListWidget is a convenience class that provides a list view with a clas... |
What is negative infinity in JavaScript? | 30 Aug, 2019
The negative infinity in JavaScript is a constant value which is used to represent a value which is the lowest available. This means that no other number is lesser than this value. It can be generated using a self-made function or by an arithmetic operation.
Note: JavaScript shows the NEGATIVE_INFINITY val... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Aug, 2019"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "The negative infinity in JavaScript is a constant value which is used to represent a value which is the lowest available. This means that no other number is lesser than this v... |
How to remove underline from link using JavaScript ? | 23 Apr, 2020
Given a link and the task is to remove the underline from the anchor element with the help of JavaScript. There are two approaches that are discussed below:
Approach 1: Use textDecoration property of JavaScript to perform this operation. It can be set to many values but, in this example it has been set to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2020"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "Given a link and the task is to remove the underline from the anchor element with the help of JavaScript. There are two approaches that are discussed below:"
},
{
"cod... |
How to swap elements in the matrix in MATLAB? | 24 Jan, 2022
In this article, we will see the swapping of elements into a matrix in MATLAB. Different methods are illustrated below:
In this method, we are simply changing the elements of particular rows and columns in the specified rows and columns respectively.
Example 1:
Matlab
% MATLAB code for 2*2 matrix. its fir... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 148,
"s": 28,
"text": "In this article, we will see the swapping of elements into a matrix in MATLAB. Different methods are illustrated below:"
},
{
"code": null,
"e": 280,
"s": 148,... |
JSTL - SQL <sql:query> Tag | The <sql:query> tag executes an SQL SELECT statement and saves the result in a scoped variable.
The <sql:query> tag has the following attributes −
To start with the basic concept, let us create an Employees table in the TEST database and create few records in that table as follows −
Follow these steps to create the Emp... | [
{
"code": null,
"e": 2335,
"s": 2239,
"text": "The <sql:query> tag executes an SQL SELECT statement and saves the result in a scoped variable."
},
{
"code": null,
"e": 2386,
"s": 2335,
"text": "The <sql:query> tag has the following attributes −"
},
{
"code": null,
"e"... |
How to create a Toggle Button in JavaFX? | A button is a component, which performs an action (like submit, login, etc..) when pressed. It is usually labeled with a text or an image specifying the respective action.
A toggle button indicates whether it is elected or not, using toggle button(s) you can switch between multiple states. Generally, multiple toggle bu... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "A button is a component, which performs an action (like submit, login, etc..) when pressed. It is usually labeled with a text or an image specifying the respective action."
},
{
"code": null,
"e": 1439,
"s": 1234,
"text": "A toggle b... |
PATHCONTAINS function | Returns TRUE if the specified item exists within the specified path. Otherwise, returns FALSE.
PATHCONTAINS (<path>, <item>)
path
A string created as the result of evaluating a PATH function.
item
A text expression to look for in the path result.
TRUE or FALSE.
If the item is an integer number, it is converted to tex... | [
{
"code": null,
"e": 2096,
"s": 2001,
"text": "Returns TRUE if the specified item exists within the specified path. Otherwise, returns FALSE."
},
{
"code": null,
"e": 2128,
"s": 2096,
"text": "PATHCONTAINS (<path>, <item>) \n"
},
{
"code": null,
"e": 2133,
"s": 21... |
Python Pandas CategoricalIndex - Reorder categories | To eorder categories, use the CategoricalIndex reorder_categories() method in Pandas. At first, import the required libraries −
import pandas as pd
CategoricalIndex can only take on a limited, and usually fixed, number of possible values. Set the categories for the categorical using the "categories" parameter. Treat th... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "To eorder categories, use the CategoricalIndex reorder_categories() method in Pandas. At first, import the required libraries −"
},
{
"code": null,
"e": 1210,
"s": 1190,
"text": "import pandas as pd"
},
{
"code": null,
"e... |
Construct Pushdown automata for L = {0n1m2(n+m) | m,n ≥ 0} - GeeksforGeeks | 23 Aug, 2018
Prerequisite – Pushdown automata, NPDA for accepting the language L = {ambnc(m+n) | m,n ≥ 1}PDA plays a very important role in task of compiler designing. That is why there is a need to have a good practice on PDA. Our objective is to construct a PDA which accepts a string of the form {(0^n)(1^m)(2^(n+m))}... | [
{
"code": null,
"e": 29836,
"s": 29808,
"text": "\n23 Aug, 2018"
},
{
"code": null,
"e": 30144,
"s": 29836,
"text": "Prerequisite – Pushdown automata, NPDA for accepting the language L = {ambnc(m+n) | m,n ≥ 1}PDA plays a very important role in task of compiler designing. That is ... |
Aptitude - Calendar Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to Calendar. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz... | [
{
"code": null,
"e": 4214,
"s": 3892,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to Calendar. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You... |
PHP array_column() Function | The array_column() function returns the values from a single column of the input array and identified by the column_key.
Optionally, you can pass index_key to index the values in the returned array by the values from the index_key column of the input array.
array array_column( array $input , mixed $column_key [, mixed ... | [
{
"code": null,
"e": 2878,
"s": 2757,
"text": "The array_column() function returns the values from a single column of the input array and identified by the column_key."
},
{
"code": null,
"e": 3015,
"s": 2878,
"text": "Optionally, you can pass index_key to index the values in the... |
Namespaces and Scope in Python | In python we deal with variables, functions, libraries and modules etc. There is a chance the name of the variable you are going to use is already existing as name of another variable or as the name of another function or another method. In such scenario, we need to learn about how all these names are managed by a pyth... | [
{
"code": null,
"e": 1428,
"s": 1062,
"text": "In python we deal with variables, functions, libraries and modules etc. There is a chance the name of the variable you are going to use is already existing as name of another variable or as the name of another function or another method. In such scenari... |
RSpec - Tags | RSpec Tags provide an easy way to run specific tests in your spec files. By default, RSpec will run all tests in the spec files that it runs, but you might only need to run a subset of them. Let’s say that you have some tests that run very quickly and that you’ve just made a change to your application code and you want... | [
{
"code": null,
"e": 2203,
"s": 1794,
"text": "RSpec Tags provide an easy way to run specific tests in your spec files. By default, RSpec will run all tests in the spec files that it runs, but you might only need to run a subset of them. Let’s say that you have some tests that run very quickly and t... |
How To Run Commands On Multiple Remote Servers Simultaneously | OpenSSH is a widely used tool to access the remote servers, copy or transfer files, and perform all sorts of system administration tasks. One caution while using OpenSSH is that you can’t run the same command on multiple remote servers in one go. However, Don’t be disappointed! Meet PSSH, Parallel SSH, a simple, and us... | [
{
"code": null,
"e": 1522,
"s": 1062,
"text": "OpenSSH is a widely used tool to access the remote servers, copy or transfer files, and perform all sorts of system administration tasks. One caution while using OpenSSH is that you can’t run the same command on multiple remote servers in one go. Howeve... |
BigIntegerMath sqrt() function | Guava | Java - GeeksforGeeks | 03 Aug, 2021
The method sqrt(BigInteger x, RoundingMode mode) of Guava’s BigIntegerMath class returns the square root of x, rounded with the specified rounding mode.
Syntax:
public static BigInteger sqrt(BigInteger x, RoundingMode mode)
Parameters: This method takes the following parameters:
x : The BigInteger number ... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 23710,
"s": 23557,
"text": "The method sqrt(BigInteger x, RoundingMode mode) of Guava’s BigIntegerMath class returns the square root of x, rounded with the specified rounding mode."
},
{
... |
What are the rules about using an underscore in a C++ identifier? | From MSDN docs −
Use of two sequential underscore characters ( __ ) at the beginning of an identifier, or a single leading underscore followed by a capital letter, is reserved for C++ implementations in all scopes. You should avoid using one leading underscore followed by a lowercase letter for names with file scope be... | [
{
"code": null,
"e": 1079,
"s": 1062,
"text": "From MSDN docs −"
},
{
"code": null,
"e": 1455,
"s": 1079,
"text": "Use of two sequential underscore characters ( __ ) at the beginning of an identifier, or a single leading underscore followed by a capital letter, is reserved for C+... |
Replace Tab with space in SAP ABAP | You just need to make a small change. You need to add an “If condition” for handling the tab as shown below −
if <field Name> CO gc_hex_char
I think it should sort out your issue and neither it looks like hardcoding or a wrong implementation. | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "You just need to make a small change. You need to add an “If condition” for handling the tab as shown below −"
},
{
"code": null,
"e": 1204,
"s": 1172,
"text": "if <field Name> CO gc_hex_char\n"
},
{
"code": null,
"e": 13... |
GATE | GATE CS Mock 2018 | Set 2 | Question 64 - GeeksforGeeks | 15 Oct, 2019
Consider the given schedule and choose the suitable option.
S = T1:R(x), T1:R(y), T1:W(x), T2:R(y), T3:W(y), T1:W(x), T2:R(y)
(A) Schedule is view serializable(B) Schedule is conflict serializable but not view serializable(C) Schedule is view serializable but not conflict serializable(D) Neither view seri... | [
{
"code": null,
"e": 24075,
"s": 24047,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 24135,
"s": 24075,
"text": "Consider the given schedule and choose the suitable option."
},
{
"code": null,
"e": 24202,
"s": 24135,
"text": "S = T1:R(x), T1:R(y), T1:W(x),... |
RSpec - Writing Specs | In this chapter, we will create a new Ruby class, save it in its own file and create a separate spec file to test this class.
First, in our new class, it is called StringAnalyzer. It’s a simple class that, you guessed it, analyzes strings. Our class has only one method has_vowels? which as its names suggests, returns t... | [
{
"code": null,
"e": 1920,
"s": 1794,
"text": "In this chapter, we will create a new Ruby class, save it in its own file and create a separate spec file to test this class."
},
{
"code": null,
"e": 2218,
"s": 1920,
"text": "First, in our new class, it is called StringAnalyzer. It... |
MySQL ALTER column to remove primary key and auto_increment? | You can use ALTER command to remove primary key and auto_increment. The syntax is as follows −
ALTER TABLE yourTableName DROP PRIMARY KEY,change yourColumnName yourColumnName data type;
To understand the above syntax, let us create a table. The query to create a table is as follows −
mysql> create table removePrimaryKe... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "You can use ALTER command to remove primary key and auto_increment. The syntax is as follows −"
},
{
"code": null,
"e": 1248,
"s": 1157,
"text": "ALTER TABLE yourTableName DROP PRIMARY KEY,change yourColumnName yourColumnName data ty... |
Count occurrences of a character in a repeated string in C++ | Given a string str, a character and a positive integer N. The string str is repeated indefinitely. The goal is to find the count of occurrences of character in str in first N characters of repetitions.
If str is “abac”, character is ch=‘b’ and N is 10.
In first 10 characters of “abacabacabacabac.......” b occurs twice.... | [
{
"code": null,
"e": 1264,
"s": 1062,
"text": "Given a string str, a character and a positive integer N. The string str is repeated indefinitely. The goal is to find the count of occurrences of character in str in first N characters of repetitions."
},
{
"code": null,
"e": 1315,
"s":... |
Java Program to convert Boolean to String | To convert Boolean to String in Java, use the toString() method. For this, firstly, we have declared two booleans.
boolean bool1 = false;
boolean bool2 = true;
Now, convert Boolean to String using the toString() method in Java as shown below −
String str1 = new Boolean(bool1).toString();
String str2 = new Boolean(bool2... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "To convert Boolean to String in Java, use the toString() method. For this, firstly, we have declared two booleans."
},
{
"code": null,
"e": 1222,
"s": 1177,
"text": "boolean bool1 = false;\nboolean bool2 = true;"
},
{
"code":... |
How to delete multiple ids in MongoDB? | To delete multiple ids in MongoDB, you can use $in operator. Following is the syntax
db.yourCollectionName.remove( { _id : { $in: [yourObjectId1, yourObjectId2, yourObjectId3)] } } );
Let us create a collection with documents
> db.deleteMultipleIdsDemo.insertOne({"ClientName":"Chris","ClientAge":26});
{
"acknowledge... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To delete multiple ids in MongoDB, you can use $in operator. Following is the syntax"
},
{
"code": null,
"e": 1246,
"s": 1147,
"text": "db.yourCollectionName.remove( { _id : { $in: [yourObjectId1, yourObjectId2, yourObjectId3)] } } )... |
Perl while Loop | A while loop statement in Perl programming language repeatedly executes a target statement as long as a given condition is true.
The syntax of a while loop in Perl programming language is −
while(condition) {
statement(s);
}
Here statement(s) may be a single statement or a block of statements. The condition may be ... | [
{
"code": null,
"e": 2349,
"s": 2220,
"text": "A while loop statement in Perl programming language repeatedly executes a target statement as long as a given condition is true."
},
{
"code": null,
"e": 2410,
"s": 2349,
"text": "The syntax of a while loop in Perl programming langua... |
Understand and Compare Cloud Functions vs Cloud Run | by Sue Lynn | Towards Data Science | As a data scientist, you will need to decide how to perform model deployment steps, which could involve converting your scripts and deploying them as a microservice. In my case, I was confused about which GCP components should I use to deploy the microservice. Should I deploy on Cloud Run or Cloud Function? Both are GC... | [
{
"code": null,
"e": 842,
"s": 171,
"text": "As a data scientist, you will need to decide how to perform model deployment steps, which could involve converting your scripts and deploying them as a microservice. In my case, I was confused about which GCP components should I use to deploy the microser... |
What is an alert box in JavaScript? | An alert dialog box is mostly used to give a warning message to the users. For example, if one input field requires to enter some text but the user does not provide any input, then as a part of validation, you can use an alert box to give a warning message.
Nonetheless, an alert box can still be used for friendlier mes... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "An alert dialog box is mostly used to give a warning message to the users. For example, if one input field requires to enter some text but the user does not provide any input, then as a part of validation, you can use an alert box to give a warning mess... |
Controlling Method Scope In Scala - GeeksforGeeks | 06 Nov, 2019
As the name suggests Access Modifiers in scala helps to restrict the scope of a class, variable, method or data member. Controlling Method Scope In Scala helps to restrict the scope of method or data member. There are five types of controlling method scope in Scala:
Public ScopePrivate ScopeProtected Scope... | [
{
"code": null,
"e": 24014,
"s": 23986,
"text": "\n06 Nov, 2019"
},
{
"code": null,
"e": 24281,
"s": 24014,
"text": "As the name suggests Access Modifiers in scala helps to restrict the scope of a class, variable, method or data member. Controlling Method Scope In Scala helps to ... |
MongoDB - ObjectId | We have been using MongoDB Object Id in all the previous chapters. In this chapter, we will understand the structure of ObjectId.
An ObjectId is a 12-byte BSON type having the following structure −
The first 4 bytes representing the seconds since the unix epoch
The next 3 bytes are the machine identifier
The next 2 byt... | [
{
"code": null,
"e": 2683,
"s": 2553,
"text": "We have been using MongoDB Object Id in all the previous chapters. In this chapter, we will understand the structure of ObjectId."
},
{
"code": null,
"e": 2751,
"s": 2683,
"text": "An ObjectId is a 12-byte BSON type having the follow... |
Bokeh - Circle Glyphs | The figure object has many methods using which vectorised glyphs of different shapes such as circle, rectangle, polygon, etc. can, be drawn.
Following methods are available for drawing circle glyphs −
The circle() method adds a circle glyph to the figure and needs x and y coordinates of its center. Additionally, it can... | [
{
"code": null,
"e": 2411,
"s": 2270,
"text": "The figure object has many methods using which vectorised glyphs of different shapes such as circle, rectangle, polygon, etc. can, be drawn."
},
{
"code": null,
"e": 2471,
"s": 2411,
"text": "Following methods are available for drawi... |
How to delete last element from a List in C++ STL | Suppose we have one STL list in C++. There are few elements. We have to delete the last element from that list. So if the elements are like [10, 41, 54, 20, 23, 69, 84, 75], then last element is 75. We will see the C++ code to delete last element from list.
Live Demo
#include<iostream>
#include<list>
using namespace s... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "Suppose we have one STL list in C++. There are few elements. We have to delete the last element from that list. So if the elements are like [10, 41, 54, 20, 23, 69, 84, 75], then last element is 75. We will see the C++ code to delete last element from l... |
How to compute a growth rate in BigQuery using SQL | by Romain Granger | Towards Data Science | For some use cases, it’s important to monitor the change of a specific variable over a period of time. A common example would be to monitor revenue month-over-month to understand the growth of a business and measure the impact of, for example, special marketing efforts, a limited time offer, giveaways, changes in prici... | [
{
"code": null,
"e": 503,
"s": 172,
"text": "For some use cases, it’s important to monitor the change of a specific variable over a period of time. A common example would be to monitor revenue month-over-month to understand the growth of a business and measure the impact of, for example, special mar... |
How to add 1 day to the date in MySQL? | We can add 1 day to the date with the help of DATE_ADD() function.
Creating a table.
mysql> create table Add1DayDemo
-> (
-> id int,
-> MyDate datetime not null
-> );
Query OK, 0 rows affected (1.06 sec)
Insert some records.
mysql> insert into Add1DayDemo values(1,now());
Query OK, 1 row affected (0.08 sec)... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "We can add 1 day to the date with the help of DATE_ADD() function."
},
{
"code": null,
"e": 1147,
"s": 1129,
"text": "Creating a table."
},
{
"code": null,
"e": 1278,
"s": 1147,
"text": "mysql> create table Add1Da... |
Object Detector Android App Using PyTorch Mobile Neural Network | by Tushar Chand Kapoor | Towards Data Science | Tushar Kapoor: (https://www.tusharck.com/)
Running Machine Learning code on mobile devices is the next big thing. PyTorch, in the latest release PyTorch 1.3, added PyTorch Mobile for deploying machine learning models on Android and iOS devices.
Here we will look into creating an Android Application for object detection... | [
{
"code": null,
"e": 215,
"s": 172,
"text": "Tushar Kapoor: (https://www.tusharck.com/)"
},
{
"code": null,
"e": 417,
"s": 215,
"text": "Running Machine Learning code on mobile devices is the next big thing. PyTorch, in the latest release PyTorch 1.3, added PyTorch Mobile for dep... |
Explaining Python Classes in a simple way | by Eugenia Anello | Towards Data Science | When I studied the Python Classes the first time, I found it really complicated and I didn’t grasp the reason why they needed to be known. In a university lesson, the professor started to explain directly the syntax to build the classes without explaining the real sense of doing this particular topic and used very bori... | [
{
"code": null,
"e": 534,
"s": 172,
"text": "When I studied the Python Classes the first time, I found it really complicated and I didn’t grasp the reason why they needed to be known. In a university lesson, the professor started to explain directly the syntax to build the classes without explaining... |
How to match beginning of a particular string/line using Java RegEx | The meta character “^” matches the beginning of a particular string i.e. it matches the first character of the string. For example,
The expression “^\\d” matches the string/line starting with a digit.
The expression “^\\d” matches the string/line starting with a digit.
The expression “^[a-z]” matches the string/line st... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "The meta character “^” matches the beginning of a particular string i.e. it matches the first character of the string. For example,"
},
{
"code": null,
"e": 1263,
"s": 1194,
"text": "The expression “^\\\\d” matches the string/line st... |
How Do You Implement AdaBoost with Python? | by Rukshan Pramoditha | Towards Data Science | We’re continuing from Part 1 of Boosting algorithms in machine learning article series. Have you read Part 1? It gives you a short introduction to boosting and definitions of some key technical terms that are all important to understand today’s content.
Today, we’re going to learn one of the most popular boosting algor... | [
{
"code": null,
"e": 426,
"s": 172,
"text": "We’re continuing from Part 1 of Boosting algorithms in machine learning article series. Have you read Part 1? It gives you a short introduction to boosting and definitions of some key technical terms that are all important to understand today’s content."
... |
C++ Environment Setup | If you are still willing to set up your environment for C++, you need to have the following two softwares on your computer.
This will be used to type your program. Examples of few editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi.
Name and version of text editor can vary on differen... | [
{
"code": null,
"e": 2442,
"s": 2318,
"text": "If you are still willing to set up your environment for C++, you need to have the following two softwares on your computer."
},
{
"code": null,
"e": 2586,
"s": 2442,
"text": "This will be used to type your program. Examples of few ed... |
Swap two variables in one line in Java | In order to swap two variable using single expression or in single line we could use bitwise XOR operator of Java.
As we now that in Java XOR functions as XOR of two numbers a and b returns a number which has all the bits as 1 wherever bits of a and b differs.
So for swapping of two variable we would use this operator ... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "In order to swap two variable using single expression or in single line we could use bitwise XOR operator of Java."
},
{
"code": null,
"e": 1323,
"s": 1177,
"text": "As we now that in Java XOR functions as XOR of two numbers a and b ... |
Square every digit of a number - JavaScript | We are required to write a JavaScript function that takes in a number and returns a new number in which all the digits of the original number are squared and concatenated
For example: If the number is −
9119
Then the output should be −
811181
because 9^2 is 81 and 1^2 is 1.
Following is the code −
const num = 9119;
con... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number and returns a new number in which all the digits of the original number are squared and concatenated"
},
{
"code": null,
"e": 1265,
"s": 1233,
"text": "For example... |
wprintf() and wscanf in C Library - GeeksforGeeks | 19 Dec, 2017
If you are dealing with the wide characters then printf() and scanf() function cannot be used. There are different functions for input and output C wide string.
wprintf() : The wprintf() function writes the wide string pointed to by format to stdout. The wide string format may contain format specifiers sta... | [
{
"code": null,
"e": 23817,
"s": 23789,
"text": "\n19 Dec, 2017"
},
{
"code": null,
"e": 23978,
"s": 23817,
"text": "If you are dealing with the wide characters then printf() and scanf() function cannot be used. There are different functions for input and output C wide string."
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.