title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Python | os.fork() method
11 Oct, 2021 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.All functions in os module raise OSError in the case of invalid or inaccessible file name...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2021" }, { "code": null, "e": 442, "s": 28, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin...
Issues in the design of a code generator
13 Dec, 2019 Code generator converts the intermediate representation of source code into a form that can be readily executed by the machine. A code generator is expected to generate the correct code. Designing of code generator should be done in such a way so that it can be easily implemented, tested and maintained. Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Dec, 2019" }, { "code": null, "e": 357, "s": 52, "text": "Code generator converts the intermediate representation of source code into a form that can be readily executed by the machine. A code generator is expected to generate the c...
Floor in a Sorted Array
16 Feb, 2022 Given a sorted array and a value x, the floor of x is the largest element in array smaller than or equal to x. Write efficient functions to find floor of x.Examples: Input : arr[] = {1, 2, 8, 10, 10, 12, 19}, x = 5 Output : 2 2 is the largest element in arr[] smaller than 5. Input : arr[] = {1, 2, 8, 1...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Feb, 2022" }, { "code": null, "e": 220, "s": 52, "text": "Given a sorted array and a value x, the floor of x is the largest element in array smaller than or equal to x. Write efficient functions to find floor of x.Examples: " }, ...
Count of triangles with total n points with m collinear
20 May, 2022 There are ‘n’ points in a plane, out of which ‘m’ points are co-linear. Find the number of triangles formed by the points as vertices ?Examples : Input : n = 5, m = 4 Output : 6 Out of five points, four points are collinear, we can make 6 triangles. We can choose any 2 points from 4 collinear points an...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2022" }, { "code": null, "e": 200, "s": 52, "text": "There are ‘n’ points in a plane, out of which ‘m’ points are co-linear. Find the number of triangles formed by the points as vertices ?Examples : " }, { "code": null...
Computer System Life Cycle
21 Aug, 2019 The system life cycle is defined as collection of the phases of development through which a computer-based system passes. Life cycle phases have been defined in very many different ways and in varying degrees of detail. Most definitions, however, recognize broad phases such as initial conception, requireme...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Aug, 2019" }, { "code": null, "e": 479, "s": 54, "text": "The system life cycle is defined as collection of the phases of development through which a computer-based system passes. Life cycle phases have been defined in very many dif...
HTTP headers | Referrer-Policy
12 Oct, 2021 The Referrer Policy HTTP header sets the parameter for amount of information sent along with Referrer Header while making a request. Referrer policy is used to maintain the security and privacy of source account while fetching resources or performing navigation. This is done by modifying the algorithm used...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Oct, 2021" }, { "code": null, "e": 366, "s": 28, "text": "The Referrer Policy HTTP header sets the parameter for amount of information sent along with Referrer Header while making a request. Referrer policy is used to maintain the se...
Python | Triple list difference
29 Apr, 2019 The difference between 2 lists have been dealt previously, but sometimes, we can have more than two lists and we need to find the mutual differences of one list with every other list. This kind of problem has applications in many domains. Let’s discuss certain ways in which this problem can be solved. Meth...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Apr, 2019" }, { "code": null, "e": 331, "s": 28, "text": "The difference between 2 lists have been dealt previously, but sometimes, we can have more than two lists and we need to find the mutual differences of one list with every oth...
How to Create Text Color Animation using HTML and CSS ?
11 Aug, 2021 The text color can be changed according to programmer’s choice using CSS @keyframes rule. HTML Code: The following code snippet creates HTML div element which contains the text for modification. <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content= "width=device-w...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Aug, 2021" }, { "code": null, "e": 118, "s": 28, "text": "The text color can be changed according to programmer’s choice using CSS @keyframes rule." }, { "code": null, "e": 223, "s": 118, "text": "HTML Code: The f...
Maximum bishops that can be placed on N*N chessboard
27 May, 2021 Given an integer n, the task is to print the maximum number of bishops that can be placed on a n x n chessboard so that no two bishops attack each other. For example, maximum 2 bishops can be placed safely on 2 x 2 chessboard. Examples: Input: n = 2 Output: 2 We can place two bishop in a row. Input: n = ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2021" }, { "code": null, "e": 255, "s": 28, "text": "Given an integer n, the task is to print the maximum number of bishops that can be placed on a n x n chessboard so that no two bishops attack each other. For example, maximum ...
Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ | Set 1
03 Mar, 2022 Given an array of size n where all elements are distinct and in range from 0 to n-1, change contents of arr[] so that arr[i] = j is changed to arr[j] = i. Examples: Example 1: Input: arr[] = {1, 3, 0, 2}; Output: arr[] = {2, 0, 3, 1}; Explanation for the above output. Since arr[0] is 1, arr[1] is change...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Mar, 2022" }, { "code": null, "e": 219, "s": 52, "text": "Given an array of size n where all elements are distinct and in range from 0 to n-1, change contents of arr[] so that arr[i] = j is changed to arr[j] = i. Examples: " }, ...
Convert Named Vector to DataFrame in R
06 Jun, 2021 In this article, we will see how to convert the named vector to Dataframe in the R Programming Language. Method 1: Generally while converting a named vector to a dataframe we may face a problem. That is, names of vectors may get converted into row names, and data may be converted into a single column. So ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2021" }, { "code": null, "e": 134, "s": 28, "text": "In this article, we will see how to convert the named vector to Dataframe in the R Programming Language. " }, { "code": null, "e": 144, "s": 134, "text": "...
<mat-expansion-panel> in Angular Material
25 Feb, 2021 Introduction:Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it you can enter the below command and can download it. <...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Feb, 2021" }, { "code": null, "e": 429, "s": 28, "text": "Introduction:Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to i...
Explicitly define datatype in a Python function
29 Dec, 2020 Unlike other languages Java, C++, etc. Python is a strongly-typed dynamic language in which we don’t have to specify the data type of the function return value and function argument. It relates type with values instead of names. The only way to specify data of specific types is by providing explicit dataty...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2020" }, { "code": null, "e": 368, "s": 28, "text": "Unlike other languages Java, C++, etc. Python is a strongly-typed dynamic language in which we don’t have to specify the data type of the function return value and function ar...
Tryit Editor v3.7
HTML form attributes Tryit: submit method POST
[ { "code": null, "e": 31, "s": 10, "text": "HTML form attributes" } ]
How to get all the processes on remote computers using PowerShell?
To get all running processes on the remote computer, you need to use – ComputerNameparameter in Get-process cmdlet, WMI class Win32_Process or using the Get-CimInstance cmdlet. With –ComputerName parameter Get-process -ComputerName Test-PC To connect multiple computers use computer names separated by comma (,). Get-pro...
[ { "code": null, "e": 1239, "s": 1062, "text": "To get all running processes on the remote computer, you need to use – ComputerNameparameter in Get-process cmdlet, WMI class Win32_Process or using the Get-CimInstance cmdlet." }, { "code": null, "e": 1268, "s": 1239, "text": "With ...
Deep understanding of the ARIMA model | by Xichu Zhang | Towards Data Science
Generally, a model for time-series forecasting can be written as where yt is the variables to be forecasted (dependent variable, or response variable), t is the time at which the forecast is made, h is the forecast horizon, Xt is the variables used at time t to make forecast (independent variable), θ is a vector of par...
[ { "code": null, "e": 237, "s": 172, "text": "Generally, a model for time-series forecasting can be written as" }, { "code": null, "e": 776, "s": 237, "text": "where yt is the variables to be forecasted (dependent variable, or response variable), t is the time at which the forecas...
Crystal Reports - Quick Guide
SAP Crystal Reports is a Business Intelligence tool which is used to generate reports from both SAP and non-SAP data sources. It enables end users to generate reports that includes exceptional visualizations and implement new business requirements into reports to reduce dependency on IT and Report developers. SAP Cryst...
[ { "code": null, "e": 3281, "s": 2970, "text": "SAP Crystal Reports is a Business Intelligence tool which is used to generate reports from both SAP and non-SAP data sources. It enables end users to generate reports that includes exceptional visualizations and implement new business requirements into ...
C# Program to add a node after the given node in a Linked List
Set a LinkedList and add elements. string [] students = {"Beth","Jennifer","Amy","Vera"}; LinkedList<string> list = new LinkedList<string>(students); Firstly, add a new node at the end. var newNode = list.AddLast("Emma"); Now, use the AddAfter() method to add a node after the given node. list.AddAfter(newNode, "Matt");...
[ { "code": null, "e": 1097, "s": 1062, "text": "Set a LinkedList and add elements." }, { "code": null, "e": 1212, "s": 1097, "text": "string [] students = {\"Beth\",\"Jennifer\",\"Amy\",\"Vera\"};\nLinkedList<string> list = new LinkedList<string>(students);" }, { "code": n...
Stable Marriage Problem - GeeksforGeeks
23 Feb, 2022 The Stable Marriage Problem states that given N men and N women, where each person has ranked all members of the opposite sex in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than their current partners. If ther...
[ { "code": null, "e": 25118, "s": 25090, "text": "\n23 Feb, 2022" }, { "code": null, "e": 25493, "s": 25118, "text": "The Stable Marriage Problem states that given N men and N women, where each person has ranked all members of the opposite sex in order of preference, marry the men...
C++ Vector Library - front() Function
The C++ function std::vector::front() returns a reference to the first element of the vector. Following is the declaration for std::vector::front() function form std::vector header. reference front(); const_reference front() const; None Returns constant reference if object is constant qualified otherwise returns non-c...
[ { "code": null, "e": 2697, "s": 2603, "text": "The C++ function std::vector::front() returns a reference to the first element of the vector." }, { "code": null, "e": 2785, "s": 2697, "text": "Following is the declaration for std::vector::front() function form std::vector header."...
Python Design Patterns - Template
A template pattern defines a basic algorithm in a base class using abstract operation where subclasses override the concrete behavior. The template pattern keeps the outline of algorithm in a separate method. This method is referred as the template method. Following are the different features of the template pattern − ...
[ { "code": null, "e": 2736, "s": 2479, "text": "A template pattern defines a basic algorithm in a base class using abstract operation where subclasses override the concrete behavior. The template pattern keeps the outline of algorithm in a separate method. This method is referred as the template meth...
MySQL Tryit Editor v1.0
SELECT NOW() + 1; ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of the Try-SQL Editor, with...
[ { "code": null, "e": 18, "s": 0, "text": "SELECT NOW() + 1;" }, { "code": null, "e": 20, "s": 18, "text": "​" }, { "code": null, "e": 92, "s": 29, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "code": null, "e": 15...
How to Create a Color Picker Tool in Android using Color Wheel and Slider? - GeeksforGeeks
22 Oct, 2020 In the previous article How to Create a Basic Color Picker Tool in Android, we have discussed to create a basic color picker tool. In this article, we are going to create the same color picker tool but using a color wheel and slider. This is another type of the Color Picker which allows user to pick the br...
[ { "code": null, "e": 24773, "s": 24745, "text": "\n22 Oct, 2020" }, { "code": null, "e": 25268, "s": 24773, "text": "In the previous article How to Create a Basic Color Picker Tool in Android, we have discussed to create a basic color picker tool. In this article, we are going to...
Developing a DCGAN Model in Tensorflow 2.0 | by Mouhamed Ndoye | Towards Data Science
In early March 2019, TensorFlow 2.0 was released and we decided to create an image generator based on Taehoon Kim’s implementation of DCGAN. Here’s a tutorial on how to develop a DCGAN model in TensorFlow 2.0. “To avoid the fast convergence of D (discriminator) network, G (generator) network is updated twice for each D...
[ { "code": null, "e": 382, "s": 172, "text": "In early March 2019, TensorFlow 2.0 was released and we decided to create an image generator based on Taehoon Kim’s implementation of DCGAN. Here’s a tutorial on how to develop a DCGAN model in TensorFlow 2.0." }, { "code": null, "e": 545, ...
C library function - memcpy()
The C library function void *memcpy(void *dest, const void *src, size_t n) copies n characters from memory area src to memory area dest. Following is the declaration for memcpy() function. void *memcpy(void *dest, const void * src, size_t n) dest − This is pointer to the destination array where the content is to be cop...
[ { "code": null, "e": 2144, "s": 2007, "text": "The C library function void *memcpy(void *dest, const void *src, size_t n) copies n characters from memory area src to memory area dest." }, { "code": null, "e": 2196, "s": 2144, "text": "Following is the declaration for memcpy() fun...
AWS Lambda – Configuring Lambda Function
In the previous chapters, we have learnt how to create AWS Lambda function in AWS console. However, there are other parameters for creating a Lambda function. These include memory allocation, timeout etc. In this chapter, let us understand in detail about the following configuration properties for AWS Lambda. Login to ...
[ { "code": null, "e": 2611, "s": 2406, "text": "In the previous chapters, we have learnt how to create AWS Lambda function in AWS console. However, there are other parameters for creating a Lambda function. These include memory allocation, timeout etc." }, { "code": null, "e": 2717, "...
How to Fix: runtimewarning: invalid value encountered in double_scalars
18 Feb, 2022 In this article, we will discuss how to fix runtimewarning: invalid value encountered in double_scalars using Python. The error which we basically encounter when we use the Numpy library is Runtimewarning: invalid value encountered in doubled_scalars. We face this error basically when we do mathematical o...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Feb, 2022" }, { "code": null, "e": 146, "s": 28, "text": "In this article, we will discuss how to fix runtimewarning: invalid value encountered in double_scalars using Python." }, { "code": null, "e": 489, "s": 146, ...
How to check if a jQuery plugin is loaded?
02 Jun, 2020 There are multiple ways by which we can simply check whether the jQuery plugins are loaded successfully or not using jQuery. We can also check whether a particular function within the plugin is accessible or not. This tutorial will demonstrate how to check if a jQuery plugin is loaded or not. Step 1: Ins...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jun, 2020" }, { "code": null, "e": 324, "s": 28, "text": "There are multiple ways by which we can simply check whether the jQuery plugins are loaded successfully or not using jQuery. We can also check whether a particular function wi...
ListView Class in Flutter
10 Nov, 2021 In Flutter, ListView is a scrollable list of widgets arranged linearly. It displays its children one after another in the scroll direction i.e, vertical or horizontal. There are different types of ListViews : ListView ListView.builder ListView.separated ListView.custom ListView( {Key key, Axis scrollDirect...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Nov, 2021" }, { "code": null, "e": 220, "s": 52, "text": "In Flutter, ListView is a scrollable list of widgets arranged linearly. It displays its children one after another in the scroll direction i.e, vertical or horizontal." }, ...
Reversing a Stack with the help of another empty Stack
31 May, 2021 Given a Stack consisting of N elements, the task is to reverse the Stack using an extra stack. Examples: Input: stack = {1, 2, 3, 4, 5} Output: 1 2 3 4 5 Explanation: Input Stack: 5 4 3 2 1 Reversed Stack: 1 2 3 4 5 Input: stack = {1, 3, 5, 4, 2} Output: 1 3 5 4 2 Approach: Follow the steps below to solve ...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 May, 2021" }, { "code": null, "e": 149, "s": 54, "text": "Given a Stack consisting of N elements, the task is to reverse the Stack using an extra stack." }, { "code": null, "e": 159, "s": 149, "text": "Examples:"...
Youtube Data API | Set-1
03 Dec, 2018 Google provides a large set of API’s for the developer to choose from. Each and every service provided by Google has an associated API. Being on of them, Youtube Data API is very simple to use provides features like – Search for videos Handle videos like retrieve information about a video, insert a video, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Dec, 2018" }, { "code": null, "e": 246, "s": 28, "text": "Google provides a large set of API’s for the developer to choose from. Each and every service provided by Google has an associated API. Being on of them, Youtube Data API is v...
Python program to count Even and Odd numbers in a List
26 Oct, 2018 Given a list of numbers, write a Python program to count Even and Odd numbers in a List. Example: Input: list1 = [2, 7, 5, 64, 14] Output: Even = 3, odd = 2 Input: list2 = [12, 14, 95, 3] Output: Even = 2, odd = 2 Example 1: count Even and Odd numbers from given list using for loop Iterate each element in...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Oct, 2018" }, { "code": null, "e": 142, "s": 53, "text": "Given a list of numbers, write a Python program to count Even and Odd numbers in a List." }, { "code": null, "e": 151, "s": 142, "text": "Example:" }, ...
Matplotlib.axes.Axes.grid() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
Java Applet | Draw a line using drawLine() method
18 Jan, 2019 This article shall be explaining the code to draw a line using paint in Java. This uses drawLine() method. Syntax: drawLine(int x1, int y1, int x2, int y2) Parameters: The drawLine method takes four arguments: x1 – It takes the first point’s x coordinate. y1 – It takes first point’s y coordinate. x2 – It t...
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Jan, 2019" }, { "code": null, "e": 160, "s": 53, "text": "This article shall be explaining the code to draw a line using paint in Java. This uses drawLine() method." }, { "code": null, "e": 168, "s": 160, "text":...
Booth’s Multiplication Algorithm
30 Jun, 2022 Booth’s algorithm is a multiplication algorithm that multiplies two signed binary numbers in 2’s complement notation. Booth used desk calculators that were faster at shifting than adding and created the algorithm to increase their speed. Booth’s algorithm is of interest in the study of computer architectur...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2022" }, { "code": null, "e": 420, "s": 54, "text": "Booth’s algorithm is a multiplication algorithm that multiplies two signed binary numbers in 2’s complement notation. Booth used desk calculators that were faster at shifting...
PyQt5 QListWidget – Setting Edit Trigger Property
06 Aug, 2020 In this article we will see how we can set the edit trigger property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. This proper...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Aug, 2020" }, { "code": null, "e": 390, "s": 28, "text": "In this article we will see how we can set the edit trigger property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based...
Python | Difference between two lists
30 Jun, 2021 There are various ways in which the difference between two lists can be generated. In this article, we will see the two most important ways in which this can be done. One by using the set() method, and another by not using it. Examples: Input : list1 = [10, 15, 20, 25, 30, 35, 40] list2 = [25, 40, 35] ...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2021" }, { "code": null, "e": 281, "s": 52, "text": "There are various ways in which the difference between two lists can be generated. In this article, we will see the two most important ways in which this can be done. One by ...
Python | Add trailing Zeros to string
25 Jun, 2022 Sometimes, we wish to manipulate a string in such a way in which we might need to add additional zeros at the end of string; in case of filling the missing bits or any other specific requirement. The solution to this kind of problems is always handy and is good if one has knowledge of it. Let’s discuss cer...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Jun, 2022" }, { "code": null, "e": 374, "s": 28, "text": "Sometimes, we wish to manipulate a string in such a way in which we might need to add additional zeros at the end of string; in case of filling the missing bits or any other s...
TypeScript - String indexOf()
This method returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex or -1 if the value is not found. string.indexOf(searchValue[, fromIndex]) searchValue − A string representing the value to search for. searchValue − A string representing the ...
[ { "code": null, "e": 2359, "s": 2182, "text": "This method returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex or -1 if the value is not found." }, { "code": null, "e": 2401, "s": 2359, "text": "strin...
How to use PSCustomObject in PowerShell foreach parallel loop?
To use the PSCustomObject inside the Foreach Parallel loop, we first need to consider how we are using the variables inside the loop. $Out = "PowerShell" ForEach-Object -Parallel{ Write-Output "Hello.... $($using:Out)" } So let see if we can store or change a value in the $out variable. $Out = @() ForEach-Object -Pa...
[ { "code": null, "e": 1321, "s": 1187, "text": "To use the PSCustomObject inside the Foreach Parallel loop, we first need to consider how we are using the variables inside the loop." }, { "code": null, "e": 1411, "s": 1321, "text": "$Out = \"PowerShell\"\nForEach-Object -Parallel{...
Python program to find Indices of Overlapping Substrings
29 Dec, 2020 To count the number of overlapping sub strings in Python we can use the Re module. To get the indices we will use the re.finditer() method. But it returns the count of non-overlapping indices only. Examples: Input: String: “geeksforgeeksforgeeks” ; Pattern: “geeksforgeeks”Output: [0, 8]Explanation: The pat...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2020" }, { "code": null, "e": 226, "s": 28, "text": "To count the number of overlapping sub strings in Python we can use the Re module. To get the indices we will use the re.finditer() method. But it returns the count of non-ove...
Internet Service Provider (ISP) hierarchy
08 Oct, 2020 Internet Service Provider (ISP) is a company which provides internet connection to end user, but there are basically three levels of ISP. There are 3 levels of Internet Service Provider (ISP): Tier-1 ISP, Tier-2 ISP, and Tier-3 ISP. These are explained as following below. Tier-1 ISP: These ISPs are at th...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2020" }, { "code": null, "e": 262, "s": 28, "text": "Internet Service Provider (ISP) is a company which provides internet connection to end user, but there are basically three levels of ISP. There are 3 levels of Internet Servic...
Increment (Decrement) operators require L-value Expression
28 May, 2017 What will be the output of the following program? #include<stdio.h>int main(){ int i = 10; printf("%d", ++(-i)); return 0;} A) 11 B) 10 C) -9 D) None Answer: D, None – Compilation Error. Explanation: In C/C++ the pre-increment (decrement) and the post-increment (decrement) operators require an L-valu...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2017" }, { "code": null, "e": 104, "s": 54, "text": "What will be the output of the following program?" }, { "code": "#include<stdio.h>int main(){ int i = 10; printf(\"%d\", ++(-i)); return 0;}", "e": 184, ...
How to Calculate an Exponential Moving Average in Python?
12 Dec, 2021 Moving Averages are financial indicators which are used to analyze stock values over a long period of time. i.e. Average value for that long period is calculated. Exponential Moving Averages (EMA) is a type of Moving Averages. It helps users to filter noise and produce a smooth curve. In Moving Averages 2 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Dec, 2021" }, { "code": null, "e": 353, "s": 28, "text": "Moving Averages are financial indicators which are used to analyze stock values over a long period of time. i.e. Average value for that long period is calculated. Exponential ...
Python – Itertools.count()
01 Mar, 2020 Python Itertools are a great way of creating complex iterators which helps in getting faster execution time and writing memory-efficient code. Itertools provide us with functions for creating infinite sequences and itertools.count() is one such function and it does exactly what it sounds like, it counts! N...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Mar, 2020" }, { "code": null, "e": 359, "s": 53, "text": "Python Itertools are a great way of creating complex iterators which helps in getting faster execution time and writing memory-efficient code. Itertools provide us with funct...
PHP array_search() Function
01 Dec, 2021 In this article, we will see how to search the specific value in an array & corresponding return the key using the array_search() function in PHP, & will also understand its implementation through the examples. The array_search() is an inbuilt function in PHP that is used to search for a particular value i...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Dec, 2021" }, { "code": null, "e": 505, "s": 28, "text": "In this article, we will see how to search the specific value in an array & corresponding return the key using the array_search() function in PHP, & will also understand its i...
numpy.empty_like() in Python
29 Nov, 2018 numpy.empty_like(a, dtype = None, order = ‘K’, subok = True) : Return a new array with the same shape and type as a given array.Parameters : shape : Number of rows order : C_contiguous or F_contiguous dtype : [optional, float(by Default)] Data type of returned array. subok : [bool, optional] to make subc...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 169, "s": 28, "text": "numpy.empty_like(a, dtype = None, order = ‘K’, subok = True) : Return a new array with the same shape and type as a given array.Parameters :" }, { "code": null, "e...
MATLAB - Strings
Creating a character string is quite simple in MATLAB. In fact, we have used it many times. For example, you type the following in the command prompt − my_string = 'Tutorials Point' MATLAB will execute the above statement and return the following result − my_string = Tutorials Point MATLAB considers all variables as a...
[ { "code": null, "e": 2427, "s": 2275, "text": "Creating a character string is quite simple in MATLAB. In fact, we have used it many times. For example, you type the following in the command prompt −" }, { "code": null, "e": 2457, "s": 2427, "text": "my_string = 'Tutorials Point'"...
How to Create Your Own Package in Golang?
15 Sep, 2021 Go language is a high-level programming language developed at Google Inc. A high-level language is in simple words, the programming language category created by humans for human understanding. Before we jump onto high terminologies as packages, modules, functions, etc. let’s write the most basic program in...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Sep, 2021" }, { "code": null, "e": 413, "s": 28, "text": "Go language is a high-level programming language developed at Google Inc. A high-level language is in simple words, the programming language category created by humans for hum...
Python | Scipy integrate.simps() method
23 Jan, 2020 With the help of scipy.integrate.simps() method, we can get the integration of y(x) using samples along the axis and composite simpson’s rule by using scipy.integrate.simps() method. Syntax : scipy.integrate.simps(y, x)Return : Return the integrated value of y(x) using samples. Example #1 :In this example ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jan, 2020" }, { "code": null, "e": 211, "s": 28, "text": "With the help of scipy.integrate.simps() method, we can get the integration of y(x) using samples along the axis and composite simpson’s rule by using scipy.integrate.simps() ...
HTML <input> size Attribute
The size attribute of the <input> element is used to set the width of the input. The more the width would lead to a textbox with more width. You can set the size attribute for the following input types − text, search, email, password, tel and url. Following is the syntax − <input size="size_num"> Above, size_num is the...
[ { "code": null, "e": 1435, "s": 1187, "text": "The size attribute of the <input> element is used to set the width of the input. The more the width would lead to a textbox with more width. You can set the size attribute for the following input types − text, search, email, password, tel and url." },...
Python | How to sort a list of strings
23 May, 2022 Given a list of strings, the task is to sort that list based on given requirement. There are multiple scenarios possible while sorting a list of string, like – Sorting in alphabetical/reverse order. Based on length of string character Sorting the integer values in list of string etc. Let’s discuss various ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2022" }, { "code": null, "e": 188, "s": 28, "text": "Given a list of strings, the task is to sort that list based on given requirement. There are multiple scenarios possible while sorting a list of string, like –" }, { "...
Types of Multiplexing in Data Communications
25 Feb, 2022 What is Multiplexing?Multiplexing is the sharing of a medium or bandwidth. It is the process in which multiple signals coming from multiple sources are combined and transmitted over a single communication/physical line. Types of Multiplexing There are three types of Multiplexing : Frequency Division Multi...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Feb, 2022" }, { "code": null, "e": 249, "s": 28, "text": "What is Multiplexing?Multiplexing is the sharing of a medium or bandwidth. It is the process in which multiple signals coming from multiple sources are combined and transmitte...
Python | Merge list elements
28 Jan, 2019 Sometimes, we require to merge some of the elements as single element in the list. This is usually with the cases with character to string conversion. This type of task is usually required in the development domain to merge the names into one element. Let’s discuss certain ways in which this can be perform...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jan, 2019" }, { "code": null, "e": 339, "s": 28, "text": "Sometimes, we require to merge some of the elements as single element in the list. This is usually with the cases with character to string conversion. This type of task is usu...
HTML - <menu> Tag
The HTML <menu> tag is used for creating a menu list. This tag has been deprecated in HTML and redefined in HTML5. <!DOCTYPE html> <html> <head> <title>HTML menu Tag</title> </head> <body> <menu> <li>ol - ordered list</li> <li>ul - unordered list</li> <li>dir - director...
[ { "code": null, "e": 2489, "s": 2374, "text": "The HTML <menu> tag is used for creating a menu list. This tag has been deprecated in HTML and redefined in HTML5." }, { "code": null, "e": 2775, "s": 2489, "text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML menu Tag</t...
How to draw a filled polygon in OpenCV using Java?
The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc. To draw a filled polygon you need to invoke the fillPoly() method of this class. This method accepts the following parameters − A Mat object representing the image on which the polygon is to be drawn. A Mat object representing the ima...
[ { "code": null, "e": 1276, "s": 1062, "text": "The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc. To draw a filled polygon you need to invoke the fillPoly() method of this class. This method accepts the following parameters −" }, { "code": null, "e": 13...
Lexicographical Maximum substring of string - GeeksforGeeks
28 Feb, 2022 Given a string s we have to find the lexicographical maximum substring of a string Examples: Input : s = "ababaa" Output : babaa Explanation : "babaa" is the maximum lexicographic substring formed from this string Input : s = "asdfaa" Output : sdfaa The idea is simple, we traverse through all substrings....
[ { "code": null, "e": 24829, "s": 24801, "text": "\n28 Feb, 2022" }, { "code": null, "e": 24912, "s": 24829, "text": "Given a string s we have to find the lexicographical maximum substring of a string" }, { "code": null, "e": 24923, "s": 24912, "text": "Example...
VBA - Quick Guide
VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now predominantly used with Microsoft office applications such as MSExcel, MS-Word, and MS-Access. It helps techies to build customized applications and solutions to enhance the capabilities of those applications. T...
[ { "code": null, "e": 2139, "s": 1935, "text": "VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now predominantly used with Microsoft office applications such as MSExcel, MS-Word, and MS-Access." }, { "code": null, "e": 2419, "s...
Checking triangular inequality on list of lists in Python
The sum of two sides of a triangle is always greater than the third side. This is called triangle inequality. Python list of lists we will identify those sublists where the triangle inequality holds good. We will first get all the sublists sorted. Then for each sublist we will check if the if the sum of first two eleme...
[ { "code": null, "e": 1267, "s": 1062, "text": "The sum of two sides of a triangle is always greater than the third side. This is called triangle inequality. Python list of lists we will identify those sublists where the triangle inequality holds good." }, { "code": null, "e": 1421, "...
How to change the Node.js module wrapper ? - GeeksforGeeks
07 Oct, 2021 Module Wrapper Function: Under the hood, NodeJS does not run our code directly, it wraps the entire code inside a function before execution. This function is termed as Module Wrapper Function. Refer https://nodejs.org/api/modules.html#modules_the_module_wrapper for official documentation. Before a module’s...
[ { "code": null, "e": 26511, "s": 26483, "text": "\n07 Oct, 2021" }, { "code": null, "e": 26801, "s": 26511, "text": "Module Wrapper Function: Under the hood, NodeJS does not run our code directly, it wraps the entire code inside a function before execution. This function is terme...
Context Menu in Android with Example - GeeksforGeeks
25 Sep, 2020 In Android, there are three types of menus available to define a set of options and actions in the Android apps. The lists of menus in Android applications are the following: Android options menuAndroid context menuAndroid popup menu Android options menu Android context menu Android popup menu Here in this...
[ { "code": null, "e": 25154, "s": 25126, "text": "\n25 Sep, 2020" }, { "code": null, "e": 25329, "s": 25154, "text": "In Android, there are three types of menus available to define a set of options and actions in the Android apps. The lists of menus in Android applications are the...
RANK() Function in SQL Server - GeeksforGeeks
18 Sep, 2020 The RANK() function is a window function could be used in SQL Server to calculate a rank for each row within a partition of a result set. The same rank is assigned to the rows in a partition which have the same values. The rank of the first row is 1. The ranks may not be consecutive in the RANK() function...
[ { "code": null, "e": 23993, "s": 23965, "text": "\n18 Sep, 2020" }, { "code": null, "e": 24132, "s": 23993, "text": "The RANK() function is a window function could be used in SQL Server to calculate a rank for each row within a partition of a result set. " }, { "code": nu...
Java Program to Read a Large Text File Line by Line - GeeksforGeeks
13 Sep, 2021 As we are are well verse with this topic let us put more stress in order to figure out minute differences between them. Here we are supposed to read from a file on the local directory where a text file is present say it be ‘gfg.txt’. Let the content inside the file be as shown below: Geeks for Geeks. A com...
[ { "code": null, "e": 23972, "s": 23944, "text": "\n13 Sep, 2021" }, { "code": null, "e": 24257, "s": 23972, "text": "As we are are well verse with this topic let us put more stress in order to figure out minute differences between them. Here we are supposed to read from a file on...
Delete rows in PySpark dataframe based on multiple conditions - GeeksforGeeks
29 Jun, 2021 In this article, we are going to see how to delete rows in PySpark dataframe based on multiple conditions. Here we are going to use the logical expression to filter the row. Filter() function is used to filter the rows from RDD/DataFrame based on the given condition or SQL expression. Syntax: filter( condi...
[ { "code": null, "e": 24476, "s": 24448, "text": "\n29 Jun, 2021" }, { "code": null, "e": 24583, "s": 24476, "text": "In this article, we are going to see how to delete rows in PySpark dataframe based on multiple conditions." }, { "code": null, "e": 24762, "s": 245...
Console.ReadLine() Method in C# - GeeksforGeeks
26 Aug, 2021 This method is used to read the next line of characters from the standard input stream. It comes under the Console class(System Namespace). If the standard input device is the keyboard, the ReadLine method blocks until the user presses the Enter key. And if standard input is redirected to a file, then this...
[ { "code": null, "e": 25006, "s": 24978, "text": "\n26 Aug, 2021" }, { "code": null, "e": 25357, "s": 25006, "text": "This method is used to read the next line of characters from the standard input stream. It comes under the Console class(System Namespace). If the standard input d...
How to append a second list to an existing list in C#?
Use the AddRange() method to append a second list to an existing list. Here is list one − List < string > list1 = new List < string > (); list1.Add("One"); list1.Add("Two"); Here is list two − List < string > list2 = new List < string > (); list2.Add("Three"); ist2.Add("Four"); Now let us append − list1.AddRange(list...
[ { "code": null, "e": 1133, "s": 1062, "text": "Use the AddRange() method to append a second list to an existing list." }, { "code": null, "e": 1152, "s": 1133, "text": "Here is list one −" }, { "code": null, "e": 1237, "s": 1152, "text": "List < string > list1...
Tryit Editor v3.6 - Show Java
class Vehicle // Base class { public string brand = "Ford"; // Vehicle field public void honk() // Vehicle method { Console.WriteLine("Tuut, tuut!"); } } } using System; namespace MyApplication { class Car : Vehicle // Derived class { public string modelName = "Musta...
[ { "code": null, "e": 242, "s": 0, "text": "\n class Vehicle // Base class\n {\n public string brand = \"Ford\"; // Vehicle field\n public void honk() // Vehicle method \n {\n Console.WriteLine(\"Tuut, tuut!\");\n }\n }\n}\n\n" }, { "code": null, "e": 390...
PySpark - SparkFiles
In Apache Spark, you can upload your files using sc.addFile (sc is your default SparkContext) and get the path on a worker using SparkFiles.get. Thus, SparkFiles resolve the paths to files added through SparkContext.addFile(). SparkFiles contain the following classmethods − get(filename) getrootdirectory() Let us under...
[ { "code": null, "e": 2032, "s": 1805, "text": "In Apache Spark, you can upload your files using sc.addFile (sc is your default SparkContext) and get the path on a worker using SparkFiles.get. Thus, SparkFiles resolve the paths to files added through SparkContext.addFile()." }, { "code": null...
Build a Docker Container with Your Machine Learning Model | by Tina Bu | Towards Data Science
As a data scientist, I don’t have a lot of software engineering experience but I have certainly heard a lot of great comments about containers. I have heard about how lightweight they are compared to traditional VMs, how good they are at ensuring a safe consistent environment for your code, and how my devops effort it ...
[ { "code": null, "e": 528, "s": 171, "text": "As a data scientist, I don’t have a lot of software engineering experience but I have certainly heard a lot of great comments about containers. I have heard about how lightweight they are compared to traditional VMs, how good they are at ensuring a safe c...
How do you dynamically add Python modules to a package while your programming is running?
To dynamically import Python modules, you can use the importlib package's import_module(moduleName) function. You need to have moduleName as a string. For example, >>> from importlib import import_module >>> moduleName = "os" >>> globals()[moduleName] = import_module(moduleName) If you want to dynamically import a list...
[ { "code": null, "e": 1226, "s": 1062, "text": "To dynamically import Python modules, you can use the importlib package's import_module(moduleName) function. You need to have moduleName as a string. For example," }, { "code": null, "e": 1342, "s": 1226, "text": ">>> from importlib...
Linear Algebra for Machine Learning: Solve a System of Linear Equations | by Khuyen Tran | Towards Data Science
Let’s start with the common plot in data science: Scatter plot The plot above represents the correlation between the diameter and the height of the tree. Each dot is a sample of a tree. Our task is to find the best fit line to predict the height provided the diameter. How can we do that? That is when Linear Algebra is ...
[ { "code": null, "e": 235, "s": 172, "text": "Let’s start with the common plot in data science: Scatter plot" }, { "code": null, "e": 441, "s": 235, "text": "The plot above represents the correlation between the diameter and the height of the tree. Each dot is a sample of a tree. ...
How to create a "section counter" with CSS?
To create a section counter with CSS, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/fontawesome.min.css"> <style> * { box-sizing: b...
[ { "code": null, "e": 1125, "s": 1062, "text": "To create a section counter with CSS, the code is as follows −" }, { "code": null, "e": 1136, "s": 1125, "text": " Live Demo" }, { "code": null, "e": 2819, "s": 1136, "text": "<!DOCTYPE html>\n<html>\n<head>\n<met...
PL/SQL - GOTO Statement
A GOTO statement in PL/SQL programming language provides an unconditional jump from the GOTO to a labeled statement in the same subprogram. NOTE − The use of GOTO statement is not recommended in any programming language because it makes it difficult to trace the control flow of a program, making the program hard to und...
[ { "code": null, "e": 2205, "s": 2065, "text": "A GOTO statement in PL/SQL programming language provides an unconditional jump from the GOTO to a labeled statement in the same subprogram." }, { "code": null, "e": 2493, "s": 2205, "text": "NOTE − The use of GOTO statement is not re...
Amazon Interview Experience - GeeksforGeeks
01 Sep, 2021 I have applied to Amazon via LinkedIn. Finally, I got a mail stating that I can give my online test on Hacker-rank platform. Round 1: It is an online round on hacker-rank. Two coding questions were asked. We need to write time complexity and space complexity as well. Optimizing Alexa SuggestionsIn this que...
[ { "code": null, "e": 25210, "s": 25182, "text": "\n01 Sep, 2021" }, { "code": null, "e": 25335, "s": 25210, "text": "I have applied to Amazon via LinkedIn. Finally, I got a mail stating that I can give my online test on Hacker-rank platform." }, { "code": null, "e": 2...
C# If ... Else
C# supports the usual logical conditions from mathematics: Less than: a < b Less than or equal to: a <= b Greater than: a > b Greater than or equal to: a >= b Equal to a == b Not Equal to: a != b You can use these conditions to perform different actions for different decisions. C# has the following conditional statemen...
[ { "code": null, "e": 59, "s": 0, "text": "C# supports the usual logical conditions from mathematics:" }, { "code": null, "e": 76, "s": 59, "text": "Less than: a < b" }, { "code": null, "e": 106, "s": 76, "text": "Less than or equal to: a <= b" }, { "co...
Calculate average of numbers in a column MySQL query?
Calculate the average of numbers in a column with the help of MySQL aggregate function AVG(). The syntax is as follows − select avg(yourColumnName) as anyVariableName from yourTableName; To understand the above concept, let us create a table. The following is the query to create a table. mysql> create table AverageCalc...
[ { "code": null, "e": 1156, "s": 1062, "text": "Calculate the average of numbers in a column with the help of MySQL aggregate function AVG()." }, { "code": null, "e": 1183, "s": 1156, "text": "The syntax is as follows −" }, { "code": null, "e": 1249, "s": 1183, ...
Blowfish Algorithm with Examples - GeeksforGeeks
30 Sep, 2021 Blowfish is an encryption technique designed by Bruce Schneier in 1993 as an alternative to DES Encryption Technique. It is significantly faster than DES and provides a good encryption rate with no effective cryptanalysis technique found to date. It is one of the first, secure block cyphers not subject to ...
[ { "code": null, "e": 24690, "s": 24662, "text": "\n30 Sep, 2021" }, { "code": null, "e": 25055, "s": 24690, "text": "Blowfish is an encryption technique designed by Bruce Schneier in 1993 as an alternative to DES Encryption Technique. It is significantly faster than DES and provi...
A Non-Confusing Guide to Confusion Matrix | by Dario Radečić | Towards Data Science
You are hyped about machine learning. You don’t know much about statistics, but you know what the mean is. You’ve decided to skip all the prerequisites and train your first machine learning model. You’ve followed a code-along video tutorial by some Indian on YouTube. After spending 10 hours realizing you’ve missed an i...
[ { "code": null, "e": 551, "s": 172, "text": "You are hyped about machine learning. You don’t know much about statistics, but you know what the mean is. You’ve decided to skip all the prerequisites and train your first machine learning model. You’ve followed a code-along video tutorial by some Indian...
How to handle error object in JSP using JSTL tags?
You can make use of JSTL tags to write an error page ShowError.jsp with better structure and more information − <%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <%@page isErrorPage = "true" %> <html> <head> <title>Show Error Page</title> </head> <body> <h1>Opps...</h1> <t...
[ { "code": null, "e": 1174, "s": 1062, "text": "You can make use of JSTL tags to write an error page ShowError.jsp with better structure and more information −" }, { "code": null, "e": 2152, "s": 1174, "text": "<%@ taglib prefix = \"c\" uri = \"http://java.sun.com/jsp/jstl/core\" ...
C++ Program to Implement B Tree
The B-tree is a generalization of a binary search tree in that a node can have more than two children. It is basically a self-balancing tree data structure that maintains sorted data and allows sequential access, searches, insertions, and deletions in logarithmic time. Here is a C++ program to implement B tree of order...
[ { "code": null, "e": 1332, "s": 1062, "text": "The B-tree is a generalization of a binary search tree in that a node can have more than two children. It is basically a self-balancing tree data structure that maintains sorted data and allows sequential access, searches, insertions, and deletions in l...
XQuery - XPath
XQuery is XPath compliant. It uses XPath expressions to restrict the search results on XML collections. For more details on how to use XPath, see our XPath Tutorial. Recall the following XPath expression which we have used earlier to get the list of books. doc("books.xml")/books/book We will use the books.xml file and ...
[ { "code": null, "e": 2038, "s": 1872, "text": "XQuery is XPath compliant. It uses XPath expressions to restrict the search results on XML collections. For more details on how to use XPath, see our XPath Tutorial." }, { "code": null, "e": 2129, "s": 2038, "text": "Recall the follo...
Introduction to Genetic Algorithm and Python Implementation For Function Optimization | by Awan-Ur-Rahman | Towards Data Science
Here, in this article, I will try to give you an idea of how a genetic algorithm works and we will implement the genetic algorithm for function optimization. So, let’s start. The genetic algorithm is a search-based optimization technique. It is frequently used to find the optimal or nearest optimal solution. It was int...
[ { "code": null, "e": 347, "s": 172, "text": "Here, in this article, I will try to give you an idea of how a genetic algorithm works and we will implement the genetic algorithm for function optimization. So, let’s start." }, { "code": null, "e": 1201, "s": 347, "text": "The geneti...
Python | Generator Expressions - GeeksforGeeks
07 Sep, 2021 In Python, to create iterators, we can use both regular functions and generators. Generators are written just like a normal function but we use yield() instead of return() for returning a result. It is more powerful as a tool to implement iterators. It is easy and more convenient to implement because it of...
[ { "code": null, "e": 24238, "s": 24210, "text": "\n07 Sep, 2021" }, { "code": null, "e": 24936, "s": 24238, "text": "In Python, to create iterators, we can use both regular functions and generators. Generators are written just like a normal function but we use yield() instead of ...
Groovy - Regular Expressions
A regular expression is a pattern that is used to find substrings in text. Groovy supports regular expressions natively using the ~”regex” expression. The text enclosed within the quotations represent the expression for comparison. For example we can create a regular expression object as shown below − def regex = ~'Gro...
[ { "code": null, "e": 2470, "s": 2238, "text": "A regular expression is a pattern that is used to find substrings in text. Groovy supports regular expressions natively using the ~”regex” expression. The text enclosed within the quotations represent the expression for comparison." }, { "code":...
ASP.NET Core - Razor Tag Helpers
Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files. Tag helpers are a new feature and similar to HTML helpers, which help us render HTML. There are many built-in Tag Helpers for common tasks, such as creating forms, links, loading assets etc. Tag Helpers are author...
[ { "code": null, "e": 2654, "s": 2461, "text": "Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files. Tag helpers are a new feature and similar to HTML helpers, which help us render HTML." }, { "code": null, "e": 2887, "s": 2654, ...
Binding function in Python Tkinter
In python tkinter is a GUI library that can be used for various GUI programming. Such applications are useful to build desktop applications. In this article we will see one aspect of the GUI programming called Binding functions. This is about binding events to functions and methods so that when the event occurs that sp...
[ { "code": null, "e": 1411, "s": 1062, "text": "In python tkinter is a GUI library that can be used for various GUI programming. Such applications are useful to build desktop applications. In this article we will see one aspect of the GUI programming called Binding functions. This is about binding ev...
Transform Invoices Into Tabular Data Using Python | by Pranjal Saxena | Towards Data Science
99% of text data is available in unstructured form. And, when we talk about the unstructured data that is hard to interpret and manage — Invoices are one example of unstructured data. When we work in the analytics and data science field, we usually need data in tabular form to analyse them. By analysing, I mean — we ca...
[ { "code": null, "e": 231, "s": 47, "text": "99% of text data is available in unstructured form. And, when we talk about the unstructured data that is hard to interpret and manage — Invoices are one example of unstructured data." }, { "code": null, "e": 465, "s": 231, "text": "Whe...
Bubble Sort | Practice | GeeksforGeeks
Given an Integer N and a list arr. Sort the array using bubble sort algorithm. Example 1: Input: N = 5 arr[] = {4, 1, 3, 9, 7} Output: 1 3 4 7 9 Example 2: Input: N = 10 arr[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1} Output: 1 2 3 4 5 6 7 8 9 10 Constraints: 1 <= N <= 103 1 <= arr[i] <= 103 0 visionsameer392 days ago p...
[ { "code": null, "e": 380, "s": 290, "text": "Given an Integer N and a list arr. Sort the array using bubble sort algorithm.\nExample 1:" }, { "code": null, "e": 438, "s": 380, "text": "Input: \nN = 5\narr[] = {4, 1, 3, 9, 7}\nOutput: \n1 3 4 7 9\n" }, { "code": null, ...
Does C++ compiler create default constructor when we write our own?
In this tutorial, we will be discussing a program to understand if the C++ compiler creates a default constructor when we write our own. Generally, the C++ compiler uses the default constructor when no one is defined, but always uses the one defined by the user if any. Live Demo #include<iostream> using namespace std;...
[ { "code": null, "e": 1199, "s": 1062, "text": "In this tutorial, we will be discussing a program to understand if the C++ compiler creates a default constructor when we write our own." }, { "code": null, "e": 1332, "s": 1199, "text": "Generally, the C++ compiler uses the default ...
Function to find the length of the second smallest word in a string in JavaScript
We are required to write a JavaScript function that takes in a string sentence as first and the only argument. And the function should return the length of the second smallest word from the string. For example: If the string is − const str = 'This is a sample string'; Then the output should be 2. Therefore, let’s write...
[ { "code": null, "e": 1260, "s": 1062, "text": "We are required to write a JavaScript function that takes in a string sentence as first and the only argument. And the function should return the length of the second smallest word from the\nstring." }, { "code": null, "e": 1292, "s": 12...
Swing Examples - Creating Radio Button Group
Following example showcase how to use standard radio buttons in a group in a Java Swing application. We are using the following APIs. ButtonGroup − To create a Button group. ButtonGroup − To create a Button group. ButtonGroup.add(); − To add a radio button to a group. ButtonGroup.add(); − To add a radio button to a gro...
[ { "code": null, "e": 2140, "s": 2039, "text": "Following example showcase how to use standard radio buttons in a group in a Java Swing application." }, { "code": null, "e": 2173, "s": 2140, "text": "We are using the following APIs." }, { "code": null, "e": 2213, "...
Monte Carlo Simulation and Variants with Python | by Tatev Karen | Towards Data Science
Monte Carlo Simulation is based on repeated random sampling. The underlying concept of Monte Carlo is to use randomness to solve problems that might be deterministic in principle. Monte Carlo simulation is one of the most popular techniques to draw inferences about a population without knowing the true underlying popul...
[ { "code": null, "e": 782, "s": 172, "text": "Monte Carlo Simulation is based on repeated random sampling. The underlying concept of Monte Carlo is to use randomness to solve problems that might be deterministic in principle. Monte Carlo simulation is one of the most popular techniques to draw infere...
Converting degree to radian in JavaScript
The radian is the unit for measuring angles and is the standard unit of angular measure used in many areas of mathematics. We are required to write a JavaScript function that takes in a number that represents some degree and returns its corresponding radian. Following is the code − const deg = 180; const degreeToRadian...
[ { "code": null, "e": 1185, "s": 1062, "text": "The radian is the unit for measuring angles and is the standard unit of angular measure used in many areas of mathematics." }, { "code": null, "e": 1321, "s": 1185, "text": "We are required to write a JavaScript function that takes i...
Showing points coordinates in a plot in Python using Matplotlib
To show points coordinate in a plot in Python, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Create lists of x and y data points. Plot x and y data points with red color and starred marker Set some axis properties. Iterate x and y to show the coordinates o...
[ { "code": null, "e": 1143, "s": 1062, "text": "To show points coordinate in a plot in Python, we can take the following steps −" }, { "code": null, "e": 1219, "s": 1143, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "code": nul...
Data Structure and Algorithms Insertion Sort
This is an in-place comparison-based sorting algorithm. Here, a sub-list is maintained which is always sorted. For example, the lower part of an array is maintained to be sorted. An element which is to be 'insert'ed in this sorted sub-list, has to find its appropriate place and then it has to be inserted there. Hence t...
[ { "code": null, "e": 2925, "s": 2580, "text": "This is an in-place comparison-based sorting algorithm. Here, a sub-list is maintained which is always sorted. For example, the lower part of an array is maintained to be sorted. An element which is to be 'insert'ed in this sorted sub-list, has to find ...
Align columns to Left in Pandas - Python - GeeksforGeeks
22 Jul, 2021 Pandas library is useful for performing exploratory data analysis in Python. A pandas dataframe represents data in a tabular format. We can perform operations on the data and display it. In this article, we are going to align columns to the Left in Pandas. When we display the dataframe, we can align the da...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n22 Jul, 2021" }, { "code": null, "e": 25914, "s": 25561, "text": "Pandas library is useful for performing exploratory data analysis in Python. A pandas dataframe represents data in a tabular format. We can perform operations on t...
ML | Principal Component Analysis(PCA) - GeeksforGeeks
20 Jul, 2021 Principal Component Analysis (PCA) is a statistical procedure that uses an orthogonal transformation that converts a set of correlated variables to a set of uncorrelated variables. PCA is the most widely used tool in exploratory data analysis and in machine learning for predictive models. Moreover, PCA is ...
[ { "code": null, "e": 25609, "s": 25581, "text": "\n20 Jul, 2021" }, { "code": null, "e": 26109, "s": 25609, "text": "Principal Component Analysis (PCA) is a statistical procedure that uses an orthogonal transformation that converts a set of correlated variables to a set of uncorr...
Count numbers from 1 to n that have 4 as a digit - GeeksforGeeks
02 Feb, 2022 Given a number n, find count of all numbers from 1 to n that have 4 as a digit.Examples : Input: n = 5 Output: 1 Only 4 has '4' as digit Input: n = 50 Output: 14 Input: n = 328 Output: 60 This problem is mainly a variation of previous article on Compute sum of digits in all numbers from 1 to n....
[ { "code": null, "e": 26065, "s": 26037, "text": "\n02 Feb, 2022" }, { "code": null, "e": 26156, "s": 26065, "text": "Given a number n, find count of all numbers from 1 to n that have 4 as a digit.Examples : " }, { "code": null, "e": 26265, "s": 26156, "text": ...
How order of classes work in CSS ? - GeeksforGeeks
06 Sep, 2021 Many developers are aware of the concept of class overwriting in CSS. Well, is true but when it comes to how these classes are overwritten, most of them get confused. Classes are among the important assets of front-end development. Therefore, it is very important to have clarity about them. The attributes ...
[ { "code": null, "e": 29291, "s": 29263, "text": "\n06 Sep, 2021" }, { "code": null, "e": 29869, "s": 29291, "text": "Many developers are aware of the concept of class overwriting in CSS. Well, is true but when it comes to how these classes are overwritten, most of them get confus...
Find the average of first N natural numbers - GeeksforGeeks
19 Mar, 2021 Write a program to find the Average of first N natural number. Examples: Input : 10 Output : 5.5 1+2+3+4+5+6+7+8+9+10 = 5.5 Input : 7 Output : 4.0 1+2+3+4+5+6+7 = 4 Prerequisite : Sum of first n natural numbers.As discussed in previous post, sum of n natural number n(n+1)/2, we find the Average of n...
[ { "code": null, "e": 26684, "s": 26656, "text": "\n19 Mar, 2021" }, { "code": null, "e": 26759, "s": 26684, "text": "Write a program to find the Average of first N natural number. Examples: " }, { "code": null, "e": 26854, "s": 26759, "text": "Input : 10\nOu...