title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Python – Remove given character from first element of Tuple
02 Dec, 2021 Given a Tuple list, remove K character from 1st element of Tuple being String. Input : test_list = [(“GF$g!”, 5), (“!i$s”, 4), (“best!$”, 10)], K = ‘$’Output : [(‘GFg!’, 5), (‘!is’, 4), (‘best!’, 10)]Explanation : First element’s strings K value removed. Input : test_list = [(“GF$g!”, 5), (“best!$”, 10)], ...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Dec, 2021" }, { "code": null, "e": 107, "s": 28, "text": "Given a Tuple list, remove K character from 1st element of Tuple being String." }, { "code": null, "e": 283, "s": 107, "text": "Input : test_list = [(“GF$g...
Reactive Programming
Reactive programming is a programming paradigm that deals with data flows and the propagation of change. It means that when a data flow is emitted by one component, the change will be propagated to other components by reactive programming library. The propagation of change will continue until it reaches the final recei...
[ { "code": null, "e": 2545, "s": 2056, "text": "Reactive programming is a programming paradigm that deals with data flows and the propagation of change. It means that when a data flow is emitted by one component, the change will be propagated to other components by reactive programming library. The p...
Python | Remove consecutive duplicates from list
11 Feb, 2019 In Python, we generally wish to remove the duplicate elements, but sometimes for several specific usecases, we require to have remove just the elements repeated in succession. This is a quite easy task and having a shorthand for it can be useful. Let’s discuss certain ways in which this task can be perform...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Feb, 2019" }, { "code": null, "e": 339, "s": 28, "text": "In Python, we generally wish to remove the duplicate elements, but sometimes for several specific usecases, we require to have remove just the elements repeated in succession....
Producer Consumer Problem using Semaphores
The producer consumer problem is a synchronization problem. There is a fixed size buffer and the producer produces items and enters them into the buffer. The consumer removes the items from the buffer and consumes them. A producer should not produce items into the buffer when the consumer is consuming an item from the ...
[ { "code": null, "e": 1407, "s": 1187, "text": "The producer consumer problem is a synchronization problem. There is a fixed size buffer and the producer produces items and enters them into the buffer. The consumer removes the items from the buffer and consumes them." }, { "code": null, "...
How to sort lines of text files in Linux?
To sort lines of text files, we use the sort command in the Linux system. The sort command is used to prints the lines of its input or concatenation of all files listed in its argument list in sorted order. The operation of sorting is done based on one or more sort keys extracted from each line of input. By default, th...
[ { "code": null, "e": 1261, "s": 1187, "text": "To sort lines of text files, we use the sort command in the Linux system." }, { "code": null, "e": 1548, "s": 1261, "text": "The sort command is used to prints the lines of its input or concatenation of all files listed in its argume...
Bar Charts - Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Bar Charts. 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 qu...
[ { "code": null, "e": 4350, "s": 4026, "text": "Following quiz provides Multiple Choice Questions (MCQs) related to Bar Charts. 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. Y...
What are the differences between any vs Object in TypeScript?
31 Jan, 2020 TypeScript is an open-source programming language. It is a superset of JavaScript language. TypeScript is designed for the development of large applications. any: It is a built-in data type in TypeScript which helps in describing the type of variable which we are unsure of while writing the code.Though the...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Jan, 2020" }, { "code": null, "e": 212, "s": 54, "text": "TypeScript is an open-source programming language. It is a superset of JavaScript language. TypeScript is designed for the development of large applications." }, { "c...
Python Dictionary
07 Jul, 2022 Dictionary in Python is an unordered collection of data values, used to store data values like a map, which, unlike other data types which hold only a single value as an element. Dictionary holds key:value pair. Key-Value is provided in the dictionary to make it more optimized. Python3 Dict = {1: 'Geeks',...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 231, "s": 52, "text": "Dictionary in Python is an unordered collection of data values, used to store data values like a map, which, unlike other data types which hold only a single value as an elem...
How to hide border and background on empty cells in a table using CSS ?
06 Apr, 2021 In this article, we will learn how to hide borders and backgrounds on empty cells in a table using CSS. The empty-cells property of CSS is used to hide the borders and backgrounds on empty cells. Approach: The empty-cells property of CSS is used to hide the borders and backgrounds on empty cells. To hide t...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Apr, 2021" }, { "code": null, "e": 224, "s": 28, "text": "In this article, we will learn how to hide borders and backgrounds on empty cells in a table using CSS. The empty-cells property of CSS is used to hide the borders and backgro...
Print left rotation of array in O(n) time and O(1) space
27 May, 2022 Given an array of size n and multiple values around which we need to left rotate the array. How to quickly print multiple left rotations? Examples : Input : arr[] = {1, 3, 5, 7, 9} k1 = 1 k2 = 3 k3 = 4 k4 = 6 Output : 3 5 7 9 1 7 9 1 3 5 9 1 3 5 7 3 5 7 9 1 Input : arr[] = {1, 3, 5, 7, 9} k1 = 14 Out...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 May, 2022" }, { "code": null, "e": 190, "s": 52, "text": "Given an array of size n and multiple values around which we need to left rotate the array. How to quickly print multiple left rotations?" }, { "code": null, "e":...
How to Calculate a Bootstrap Standard Error in R?
04 Jan, 2022 In this article, we will be looking at the different approaches to calculate a bootstrap standard error using various packages and their functionalities in the R programming language. Bootstrap Standard Error: The standard deviation of the bootstrap samples (also known as the bootstrap standard error) is a...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jan, 2022" }, { "code": null, "e": 212, "s": 28, "text": "In this article, we will be looking at the different approaches to calculate a bootstrap standard error using various packages and their functionalities in the R programming l...
Priority Interrupts | (S/W Polling and Daisy Chaining)
23 Mar, 2022 In I/O Interface (Interrupt and DMA Mode), we have discussed the concept behind the Interrupt-initiated I/O. To summarize, when I/O devices are ready for I/O transfer, they generate an interrupt request signal to the computer. The CPU receives this signal, suspends the current instructions it is executing,...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Mar, 2022" }, { "code": null, "e": 893, "s": 54, "text": "In I/O Interface (Interrupt and DMA Mode), we have discussed the concept behind the Interrupt-initiated I/O. To summarize, when I/O devices are ready for I/O transfer, they g...
Unix / Linux Shell - The select Loop
The select loop provides an easy way to create a numbered menu from which users can select options. It is useful when you need to ask the user to choose one or more items from a list of choices. select var in word1 word2 ... wordN do Statement(s) to be executed for every word. done Here var is the name of a variabl...
[ { "code": null, "e": 3076, "s": 2881, "text": "The select loop provides an easy way to create a numbered menu from which users can select options. It is useful when you need to ask the user to choose one or more items from a list of choices." }, { "code": null, "e": 3168, "s": 3076, ...
Python VLC MediaList – Adding Media to it
29 Aug, 2020 In this article we will see how we can add media to the MediaList object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaList object contains the multiple media, in other wo...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 511, "s": 28, "text": "In this article we will see how we can add media to the MediaList object in the python vlc module. VLC media player is a free and open-source portable cross-platform media pla...
Classes and Object in MATLAB
09 May, 2021 A class is a blueprint that defines the variables and the methods which provide a commonly shared basis for its corresponding objects. It defines an object that encapsulates data and the operations performed on that data. classdef is a keyword used to define MATLAB classes. Syntax to define a class: classd...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 May, 2021" }, { "code": null, "e": 303, "s": 28, "text": "A class is a blueprint that defines the variables and the methods which provide a commonly shared basis for its corresponding objects. It defines an object that encapsulates d...
Python | os.mkfifo() method
26 Aug, 2019 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. os.mkfifo() method in Python is used to create a FIFO (a named pipe) named path with the...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Aug, 2019" }, { "code": null, "e": 247, "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...
Point to next higher value node in a linked list with an arbitrary pointer
27 Jun, 2022 Given singly linked list with every node having an additional “arbitrary” pointer that currently points to NULL. Need to make the “arbitrary” pointer point to the next higher value node. We strongly recommend to minimize your browser and try this yourself first A Simple Solution is to traverse all nodes on...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Jun, 2022" }, { "code": null, "e": 241, "s": 54, "text": "Given singly linked list with every node having an additional “arbitrary” pointer that currently points to NULL. Need to make the “arbitrary” pointer point to the next higher...
ReactJS shouldComponentUpdate() Method
16 Nov, 2020 The shouldComponentUpdate method allows us to exit the complex react update life cycle to avoid calling it again and again on every re-render. It only updates the component if the props passed to it changes. The shouldComponentUpdate method is majorly used for optimizing the performance and to increase the...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Nov, 2020" }, { "code": null, "e": 260, "s": 52, "text": "The shouldComponentUpdate method allows us to exit the complex react update life cycle to avoid calling it again and again on every re-render. It only updates the component i...
Overlay Density Plots in Base R
17 Jun, 2021 In this article, we will discuss how to overlay density plot using some base functions of the R Programming Language. Overlaying density plots means creating some density plots of the different data over a single plot. Plot() : This is a generic function for plotting R objects. Syntax: plot(x, y, ...) Para...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2021" }, { "code": null, "e": 247, "s": 28, "text": "In this article, we will discuss how to overlay density plot using some base functions of the R Programming Language. Overlaying density plots means creating some density plot...
Python | Drop-down list in kivy using .kv file
08 Dec, 2021 Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. Kivy Tutorial – Learn Kivy with Examples. A drop-down list can be used...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Dec, 2021" }, { "code": null, "e": 264, "s": 28, "text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it doe...
Class and Object in Scala
19 Aug, 2021 Classes and Objects are basic concepts of Object Oriented Programming which revolve around the real-life entities. A class is a user-defined blueprint or prototype from which objects are created. Or in other words, a class combines the fields and methods(member function which defines actions) into a single...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Aug, 2021" }, { "code": null, "e": 143, "s": 28, "text": "Classes and Objects are basic concepts of Object Oriented Programming which revolve around the real-life entities." }, { "code": null, "e": 565, "s": 143, ...
list reverse function in C++ STL
14 Jun, 2022 The list::reverse() is a built-in function in C++ STL which is used to reverse a list container. It reverses the order of elements in the list container. Syntax: list_name.reverse() Parameters: This function does not accept any parameters. Return Value: This function does not return any value. It just reve...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Jun, 2022" }, { "code": null, "e": 215, "s": 53, "text": "The list::reverse() is a built-in function in C++ STL which is used to reverse a list container. It reverses the order of elements in the list container. Syntax:" }, { ...
Flutter - Circular & Linear Progress Indicators - GeeksforGeeks
15 Feb, 2021 Progress Indicator in any application displays the time which is needed for some tasks to complete such as downloading, installation, uploading, file transfer, etc. This shows the progress of a task or the time to display the length of the processes. In Flutter, progress can be displayed in two ways: Circu...
[ { "code": null, "e": 25940, "s": 25912, "text": "\n15 Feb, 2021" }, { "code": null, "e": 26191, "s": 25940, "text": "Progress Indicator in any application displays the time which is needed for some tasks to complete such as downloading, installation, uploading, file transfer, etc...
Scrapping Weather prediction Data using Python and BS4 - GeeksforGeeks
29 Dec, 2020 This article revolves around scrapping weather prediction d data using python and bs4 library. Let’s checkout components used in the script – BeautifulSoup– It is a powerful Python library for pulling out data from HTML/XML files. It creates a parse tree for parsed pages that can be used to extract data fr...
[ { "code": null, "e": 24522, "s": 24494, "text": "\n29 Dec, 2020" }, { "code": null, "e": 24664, "s": 24522, "text": "This article revolves around scrapping weather prediction d data using python and bs4 library. Let’s checkout components used in the script –" }, { "code":...
How to delete particular data in a document in MongoDB?
You can use $unset. Let us first create a collection with documents − > db.demo20.insertOne( ... { ... ... "ListOfEmployee" : [ ... { ... "EmployeeName1" : "John" ... }, ... { ... "EmployeeName2" : "Carol" ... } ... ], ... "EmployeeName2" ...
[ { "code": null, "e": 1132, "s": 1062, "text": "You can use $unset. Let us first create a collection with documents −" }, { "code": null, "e": 1488, "s": 1132, "text": "> db.demo20.insertOne(\n... {\n...\n... \"ListOfEmployee\" : [\n... {\n... \"Emplo...
until command in Linux with Examples
27 May, 2019 until command in Linux used to execute a set of commands as long as the final command in the ‘until’ Commands has an exit status which is not zero. It is mostly used where the user needs to execute a set of commands until a condition is true. Syntax: until COMMANDS; do COMMANDS; done Here, if the COMMANDS ...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 May, 2019" }, { "code": null, "e": 295, "s": 52, "text": "until command in Linux used to execute a set of commands as long as the final command in the ‘until’ Commands has an exit status which is not zero. It is mostly used where th...
To find sum of two numbers without using any operator
30 May, 2022 Write a program to find sum of positive integers without using any operator. Only use of printf() is allowed. No other library function can be used. Solution It’s a trick question. We can use printf() to find sum of two numbers as printf() returns the number of characters printed. The width field in printf...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 May, 2022" }, { "code": null, "e": 201, "s": 52, "text": "Write a program to find sum of positive integers without using any operator. Only use of printf() is allowed. No other library function can be used." }, { "code": nul...
Expression contains redundant bracket or not
16 Jun, 2022 Given a string of balanced expression, find if it contains a redundant parenthesis or not. A set of parenthesis are redundant if the same sub-expression is surrounded by unnecessary or multiple brackets. Print ‘Yes’ if redundant, else ‘No’.Note: Expression may contain ‘+‘, ‘*‘, ‘–‘ and ‘/‘ operators. Given...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 431, "s": 54, "text": "Given a string of balanced expression, find if it contains a redundant parenthesis or not. A set of parenthesis are redundant if the same sub-expression is surrounded by unne...
List Interface in Java with Examples
07 Jul, 2022 The List interface in Java provides a way to store the ordered collection. It is a child interface of Collection. It is an ordered collection of objects in which duplicate values can be stored. Since List preserves the insertion order, it allows positional access and insertion of elements. The List interf...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 344, "s": 52, "text": "The List interface in Java provides a way to store the ordered collection. It is a child interface of Collection. It is an ordered collection of objects in which duplicate va...
Number Theory (Interesting Facts and Algorithms)
Difficulty Level : Hard Questions based on various concepts of number theory and different types of number are quite frequently asked in programming contests. In this article, we discuss some famous facts and algorithms: Interesting Facts : All 4 digit palindromic numbers are divisible by 11.If we repeat a three-digit ...
[ { "code": null, "e": 24, "s": 0, "text": "Difficulty Level :\nHard" }, { "code": null, "e": 221, "s": 24, "text": "Questions based on various concepts of number theory and different types of number are quite frequently asked in programming contests. In this article, we discuss so...
Count ways to distribute m items among n people
06 May, 2021 Given m and n representing number of mangoes and number of people respectively. Task is to calculate number of ways to distribute m mangoes among n people. Considering both variables m and n, we arrive at 4 typical use cases where mangoes and people are considered to be:1) Both identical 2) Unique and iden...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 May, 2021" }, { "code": null, "e": 497, "s": 52, "text": "Given m and n representing number of mangoes and number of people respectively. Task is to calculate number of ways to distribute m mangoes among n people. Considering both v...
Edge detection using Prewitt, Scharr and Sobel Operator
27 Jan, 2022 The discontinuity in the image brightness is called an edge. Edge detection is the technique used to identify the regions in the image where the brightness of the image changes sharply. This sharp change in the intensity value is observed at the local minima or local maxima in the image histogram, using th...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2022" }, { "code": null, "e": 362, "s": 28, "text": "The discontinuity in the image brightness is called an edge. Edge detection is the technique used to identify the regions in the image where the brightness of the image change...
How to validate URL using regular expression in JavaScript?
23 May, 2019 Given a URL, the task is to validate it. Here we are going to declare a URL valid or Invalid by matching it with the RegExp by using JavaScript. We’re going to discuss a few methods. Example 1: This example validates the URL = ‘https://www.geeksforgeeks.org’ by using Regular Expression. <!DOCTYPE HTML><htm...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2019" }, { "code": null, "e": 211, "s": 28, "text": "Given a URL, the task is to validate it. Here we are going to declare a URL valid or Invalid by matching it with the RegExp by using JavaScript. We’re going to discuss a few m...
Java.util.function.IntBinaryOperator interface with Examples
18 Jul, 2019 The IntBinaryOperator interface was introduced in Java 8. It represents an operation on two int values and returns the result as an int value. It is a functional interface and thus can be used as a lambda expression or in a method reference. It is mostly used when the operation needs to be encapsulated fro...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2019" }, { "code": null, "e": 347, "s": 28, "text": "The IntBinaryOperator interface was introduced in Java 8. It represents an operation on two int values and returns the result as an int value. It is a functional interface and...
numpy.moveaxis() function | Python
22 Apr, 2020 numpy.moveaxis() function move axes of an array to new positions. Other axes remain in their original order. Syntax : numpy.moveaxis(arr, source, destination)Parameters :arr : [ndarray] input array.source : [ int or sequence of int] Original positions of the axes to move. These must be unique.destination :...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 137, "s": 28, "text": "numpy.moveaxis() function move axes of an array to new positions. Other axes remain in their original order." }, { "code": null, "e": 524, "s": 137, "text"...
How to import variables from another file in Python?
03 Mar, 2021 When the lines of code increase, it is cumbersome to search for the required block of code. It is a good practice to differentiate the lines of code according to their working. It can be done by having separate files for different working codes. As we know, various libraries in Python provide various metho...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Mar, 2021" }, { "code": null, "e": 501, "s": 28, "text": "When the lines of code increase, it is cumbersome to search for the required block of code. It is a good practice to differentiate the lines of code according to their working...
Wand polygon() function in Python
10 May, 2020 polygon() function is another drawing function introduced in wand.drawing module. We can draw complex shapes using polygon() function. It takes a list of points in polygons as argument. Stroke line will automatically close between first & last point. Syntax : wand.drawing.polygon(points) Parameters : Exam...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 May, 2020" }, { "code": null, "e": 279, "s": 28, "text": "polygon() function is another drawing function introduced in wand.drawing module. We can draw complex shapes using polygon() function. It takes a list of points in polygons as...
NLP | Flattening Deep Tree
26 Feb, 2019 Some of the corpora that we use are often deep trees of nested phrases. But working on such deep trees is a tedious job for training the chunker. As IOB tag parsing is not designed for nested chunks. So, in order to use these trees for chunker training, we must flatten them.Well, POS (part of Speech) are a...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Feb, 2019" }, { "code": null, "e": 539, "s": 28, "text": "Some of the corpora that we use are often deep trees of nested phrases. But working on such deep trees is a tedious job for training the chunker. As IOB tag parsing is not des...
Program to invert bits of a number Efficiently
28 Apr, 2021 Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained after inverting the bits. Note: Leading 0’s are not being considered.Examples: Input : 11 Output : 4 (11)10 = (1011)2 After inverting the bits, we get: (0100)2 = (4)10. ...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Apr, 2021" }, { "code": null, "e": 270, "s": 54, "text": "Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained after inverting the bits. Note: Leading...
Optional or() method in Java with examples
30 Jul, 2019 The or() method of java.util.Optional class in Java is used to get this Optional instance if any value is present. If there is no value present in this Optional instance, then this method returns an Optional instance with the value generated from the specified supplier. Syntax: public Optional<T> or(Suppli...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jul, 2019" }, { "code": null, "e": 299, "s": 28, "text": "The or() method of java.util.Optional class in Java is used to get this Optional instance if any value is present. If there is no value present in this Optional instance, then...
How to remove or hide X-axis labels from a Seaborn / Matplotlib plot?
To remove or hide X-axis labels from a Seaborn/Matplotlib plot, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Use sns.set_style() to set an aesthetic style for the Seaborn plot. Us...
[ { "code": null, "e": 1285, "s": 1187, "text": "To remove or hide X-axis labels from a Seaborn/Matplotlib plot, we can take the following steps −" }, { "code": null, "e": 1361, "s": 1285, "text": "Set the figure size and adjust the padding between and around the subplots." }, ...
Second most repeated word in a sequence in Python
07 Jun, 2022 Given a sequence of strings, the task is to find out the second most repeated (or frequent) string in the given sequence. (Considering no two words are the second most repeated, there will be always a single word).Examples: Input : {"aaa", "bbb", "ccc", "bbb", "aaa", "aaa"} Output : bbb Input ...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Jun, 2022" }, { "code": null, "e": 279, "s": 53, "text": "Given a sequence of strings, the task is to find out the second most repeated (or frequent) string in the given sequence. (Considering no two words are the second most repeat...
Golang Tutorial – Learn Go Programming Language
03 Feb, 2020 Golang or Go Programming Language is a statically-typed and procedural programming language having syntax similar to C language. It was developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google. But they launched it in 2009 as an open-source programming language. It provides a rich standa...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Feb, 2020" }, { "code": null, "e": 663, "s": 52, "text": "Golang or Go Programming Language is a statically-typed and procedural programming language having syntax similar to C language. It was developed in 2007 by Robert Griesemer,...
Python VLC Instance – Setting Loop on the media
29 Aug, 2020 In this article we will see how we can set loop on the single media from the Instance class in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Instance act as a main object of the V...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 579, "s": 28, "text": "In this article we will see how we can set loop on the single media from the Instance class in the python vlc module. VLC media player is a free and open-source portable cross...
Python Program that Extract words starting with Vowel From A list
11 Oct, 2020 Given a list with string elements, the following program extracts those elements which start with vowels(a, e, i, o, u). Input : test_list = [“all”, “love”, “get”, “educated”, “by”, “gfg”] Output : [‘all’, ‘educated’] Explanation : a, e are vowels, hence words extracted.Input : test_list = [“all”, “love”, ...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Oct, 2020" }, { "code": null, "e": 174, "s": 53, "text": "Given a list with string elements, the following program extracts those elements which start with vowels(a, e, i, o, u)." }, { "code": null, "e": 488, "s": 17...
How to use Skeleton Component in ReactJS ?
08 Apr, 2021 A Skeleton Component is used whenever the data is not loaded, the placeholder preview is to be shown to the user. This component displays a placeholder preview of our content. Material UI for React has this component available for us, and it is very easy to integrate. We can use the following approach in R...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2021" }, { "code": null, "e": 369, "s": 28, "text": "A Skeleton Component is used whenever the data is not loaded, the placeholder preview is to be shown to the user. This component displays a placeholder preview of our content....
Top 50 Computer Networking Interview questions and answers
08 Sep, 2021 1. Name two technologies by which you would connect two offices in remote locations. Two technologies by which would connect two offices in remote locations are VPN and Cloud computing. 2. What is internetworking? Internetworking is a combination of two words, inter and networking which implies an associat...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Sep, 2021" }, { "code": null, "e": 137, "s": 52, "text": "1. Name two technologies by which you would connect two offices in remote locations." }, { "code": null, "e": 238, "s": 137, "text": "Two technologies by ...
Why copy constructor argument should be const in C++?
05 Jan, 2022 When we create our own copy constructor, we pass an object by reference and we generally pass it as a const reference. One reason for passing const reference is, we should use const in C++ wherever possible so that objects are not accidentally modified. This is one good reason for passing reference as cons...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jan, 2022" }, { "code": null, "e": 496, "s": 52, "text": "When we create our own copy constructor, we pass an object by reference and we generally pass it as a const reference. One reason for passing const reference is, we should us...
MYBATIS - Stored Procedures
You can call a stored procedure using MyBatis. First of all, let us understand how to create a stored procedure in MySQL. We have the following EMPLOYEE table in MySQL − CREATE TABLE details.student( ID int(10) NOT NULL AUTO_INCREMENT, NAME varchar(100) NOT NULL, BRANCH varchar(255) NOT NULL, PERCENTAGE int...
[ { "code": null, "e": 2127, "s": 2005, "text": "You can call a stored procedure using MyBatis. First of all, let us understand how to create a stored procedure in MySQL." }, { "code": null, "e": 2175, "s": 2127, "text": "We have the following EMPLOYEE table in MySQL −" }, { ...
std::inner_product in C++
16 Aug, 2021 Compute cumulative inner product of range Returns the result of accumulating init with the inner products of the pairs formed by the elements of two ranges starting at first1 and first2.The two default operations (to add up the result of multiplying the pairs) may be overridden by the arguments binary_op1 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Aug, 2021" }, { "code": null, "e": 393, "s": 28, "text": "Compute cumulative inner product of range Returns the result of accumulating init with the inner products of the pairs formed by the elements of two ranges starting at first1 ...
How to get the day and month of a year using JavaScript ?
23 Aug, 2019 Given a date and the task is to get the day and month of a year using JavaScript. Approach: First get the current date by using new Date(). Use currentDate.getDay() to get the current day in number format, Map it to the day name. Use currentDate.getMonth() to get the current month in number format, Map it ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2019" }, { "code": null, "e": 110, "s": 28, "text": "Given a date and the task is to get the day and month of a year using JavaScript." }, { "code": null, "e": 120, "s": 110, "text": "Approach:" }, { ...
hdparm command in Linux with Examples
21 May, 2019 “hdparm“(i.e, hard disk parameter) is one of the command line programs for Linux which is used to handle disk devices and hard disks. With the help of this command, you can get statistics about the hard disk, alter writing intervals, acoustic management, and DMA settings. It can also set parameters related...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2019" }, { "code": null, "e": 422, "s": 28, "text": "“hdparm“(i.e, hard disk parameter) is one of the command line programs for Linux which is used to handle disk devices and hard disks. With the help of this command, you can ge...
Iterative Merge Sort - GeeksforGeeks
02 Mar, 2022 Following is a typical recursive implementation of Merge Sort C++ C Java Python3 C# Javascript // Recursive C++ program for merge sort#include<bits/stdc++.h>using namespace std; // Function to merge the two haves// arr[l..m] and arr[m+1..r] of array arr[]void merge(int arr[], int l, int m, int r); // l is...
[ { "code": null, "e": 25233, "s": 25205, "text": "\n02 Mar, 2022" }, { "code": null, "e": 25296, "s": 25233, "text": "Following is a typical recursive implementation of Merge Sort " }, { "code": null, "e": 25300, "s": 25296, "text": "C++" }, { "code": n...
Auto-Hide or Auto-Extend Floating Action Button in RecyclerView in Android - GeeksforGeeks
27 Sep, 2021 In the article Auto-Hide or Auto-Extend Floating Action Button for NestedScrollView in Android it’s been discussed and demonstrated how to auto-extend or hide the Floating Action Button in the Nested Scroll View. In this article, it’s discussed how to Hide or Extend the Floating Action Button in Android. L...
[ { "code": null, "e": 26491, "s": 26463, "text": "\n27 Sep, 2021" }, { "code": null, "e": 26863, "s": 26491, "text": "In the article Auto-Hide or Auto-Extend Floating Action Button for NestedScrollView in Android it’s been discussed and demonstrated how to auto-extend or hide the ...
Gas Station in C++
Suppose there is a circle, and there are n gas stations on the circle. We have two sets of data like − The amount of gas that every gas stations has Distance from one gas stations to another. Calculate the first point, from where a car will be able to complete the circle. Assume for 1 unit of gas, the car can go 1 unit...
[ { "code": null, "e": 1165, "s": 1062, "text": "Suppose there is a circle, and there are n gas stations on the circle. We have two sets of data like −" }, { "code": null, "e": 1211, "s": 1165, "text": "The amount of gas that every gas stations has" }, { "code": null, "...
How to Install and Run UserRecon Tool? - GeeksforGeeks
05 Oct, 2021 UserRecon tool is used to find usernames across over 75 social networks. It is very useful when you are running an investigation to determine the usage of the same username across different social media platforms such as Twitter, Instagram, MySpace, Youtube, Reddit, WordPress, GitHub, and many more. With t...
[ { "code": null, "e": 24976, "s": 24948, "text": "\n05 Oct, 2021" }, { "code": null, "e": 25462, "s": 24976, "text": "UserRecon tool is used to find usernames across over 75 social networks. It is very useful when you are running an investigation to determine the usage of the same...
How to Install Zip and Unzip in Linux? - GeeksforGeeks
06 Oct, 2021 Zip is a command-line compression utility for files and directories. File and folder compression allows for quicker and more reliable file and folder transfer, storage, and email. Unzip, on the other hand, is a program that allows you to decompress files and directories. zip is used to compress the files t...
[ { "code": null, "e": 25076, "s": 25048, "text": "\n06 Oct, 2021" }, { "code": null, "e": 25348, "s": 25076, "text": "Zip is a command-line compression utility for files and directories. File and folder compression allows for quicker and more reliable file and folder transfer, sto...
C program to insert a node at any position using double linked list
Linked lists use dynamic memory allocation and are collection of nodes. Nodes have two parts which are data and link. The types of linked lists in C programming language are as follows − Single / Singly linked lists. Double / Doubly linked lists. Circular single linked list. Circular double linked list. The diagram giv...
[ { "code": null, "e": 1134, "s": 1062, "text": "Linked lists use dynamic memory allocation and are collection of nodes." }, { "code": null, "e": 1180, "s": 1134, "text": "Nodes have two parts which are data and link." }, { "code": null, "e": 1249, "s": 1180, "t...
Can we override a private or static method in Java
No, we cannot override private or static methods in Java. Private methods in Java are not visible to any other class which limits their scope to the class in which they are declared. Let us see what happens when we try to override a private method − Live Demo class Parent { private void display() { System.out...
[ { "code": null, "e": 1120, "s": 1062, "text": "No, we cannot override private or static methods in Java." }, { "code": null, "e": 1245, "s": 1120, "text": "Private methods in Java are not visible to any other class which limits their scope to the class in which they are declared....
WebCam Motion Detector in Python - GeeksforGeeks
10 Nov, 2021 This python program will allow you to detect motion and also store the time interval of the motion. Requirement: Python3OpenCV(libraries)Pandas(libraries) Python3 OpenCV(libraries) Pandas(libraries) Install Requirements : Install Python3, install Pandas and OpenCV libraries. Main Logic : Videos can be tre...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n10 Nov, 2021" }, { "code": null, "e": 26507, "s": 26407, "text": "This python program will allow you to detect motion and also store the time interval of the motion." }, { "code": null, "e": 26521, "s": 26507, ...
Handling Big Volume of Petroleum Well Log Data with a Boosted Time-Efficiency on Python | by Yohanes Nuwara | Towards Data Science
This is a story of a geophysicist who has been already getting tired of handling the big volume of well log data with manual input in most commercial software out there. Who feels the same I feel? However, I successfully developed a way to get out of this tiring routine of manual input barely using programming skills w...
[ { "code": null, "e": 898, "s": 172, "text": "This is a story of a geophysicist who has been already getting tired of handling the big volume of well log data with manual input in most commercial software out there. Who feels the same I feel? However, I successfully developed a way to get out of this...
Convert tuple to float value in Python
When it is required to convert a tuple to a float value, the 'join' method, 'float' method, 'str' method and generator expression can be used. Generator is a simple way of creating iterators. It automatically implements a class with '__iter__()' and '__next__()' methods and keeps track of the internal states, as well a...
[ { "code": null, "e": 1205, "s": 1062, "text": "When it is required to convert a tuple to a float value, the 'join' method, 'float' method, 'str' method and generator expression can be used." }, { "code": null, "e": 1468, "s": 1205, "text": "Generator is a simple way of creating i...
What is method overloading in C#?
Two or more than two methods having the same name but different parameters is what we call method overloading in C#. Method overloading in C# can be performed by changing the number of arguments and the data type of the arguments. Let’s say you have a function that prints multiplication of numbers, then our overloaded ...
[ { "code": null, "e": 1179, "s": 1062, "text": "Two or more than two methods having the same name but different parameters is what we call method overloading in C#." }, { "code": null, "e": 1293, "s": 1179, "text": "Method overloading in C# can be performed by changing the number ...
Bootstrap - List Group
The purpose of list group component is to render complex and customized content in lists. To get a basic list group − Add the class .list-group to element <ul>. Add the class .list-group to element <ul>. Add class .list-group-item to <li>. Add class .list-group-item to <li>. The following example demonstrates this − <u...
[ { "code": null, "e": 3449, "s": 3331, "text": "The purpose of list group component is to render complex and customized content in lists. To get a basic list group −" }, { "code": null, "e": 3492, "s": 3449, "text": "Add the class .list-group to element <ul>." }, { "code":...
Which Of Your Features Are Overfitting? | by Samuele Mazzanti | Towards Data Science
What matters most in machine learning is making good predictions on new data. When predictions are good on training data but bad on test data, it is said that the model is “overfitting”. It means that the model has learnt too many noisy patterns from training data, and so it’s unable to generalize well to data it has n...
[ { "code": null, "e": 249, "s": 171, "text": "What matters most in machine learning is making good predictions on new data." }, { "code": null, "e": 507, "s": 249, "text": "When predictions are good on training data but bad on test data, it is said that the model is “overfitting”....
Build your first ML integrated ChatBot on DialogFlow! | by Chayan Kathuria | Towards Data Science
Your first Machine Learning integrated chat bot on Google’s DialogFlow in 4 steps! Any Machine Learning model is pretty much useless unless you put it to some real life use. Running the model on Jupyter Notebook and bragging about 99.99% accuracy doesn’t help. You need to make an end-to-end application out of it to pre...
[ { "code": null, "e": 254, "s": 171, "text": "Your first Machine Learning integrated chat bot on Google’s DialogFlow in 4 steps!" }, { "code": null, "e": 569, "s": 254, "text": "Any Machine Learning model is pretty much useless unless you put it to some real life use. Running the ...
abs() function for complex number in c++ - GeeksforGeeks
10 Oct, 2018 The abs() function for complex number is defined in the complex header file. This function is used to return the absolute value of the complex number z. Syntax: template<class T> T abs (const complex<T>& z); Parameter: z: It represents the given complex number. Return: It returns the absolute value of the...
[ { "code": null, "e": 24448, "s": 24420, "text": "\n10 Oct, 2018" }, { "code": null, "e": 24601, "s": 24448, "text": "The abs() function for complex number is defined in the complex header file. This function is used to return the absolute value of the complex number z." }, { ...
What is Poisson Distribution? When to use it? How to predict football match results? | Towards Data Science
Understanding the dataset, performing appropriate preprocessing operations, and interpreting the results are essential for training the machine in the light of more accurate data. For example, if we consider dimensionality reduction, the type of dimensionality reduction method (linear or nonlinear) is applied depending...
[ { "code": null, "e": 1112, "s": 172, "text": "Understanding the dataset, performing appropriate preprocessing operations, and interpreting the results are essential for training the machine in the light of more accurate data. For example, if we consider dimensionality reduction, the type of dimensio...
What is APP_BASE_HREF in Angular 10 ?
13 Apr, 2021 In this article, we are going to see what is APP_BASE_HREF in Angular 10 and how to use it. APP_BASE_HREF returns a predefined DI token for the base href of the current page. The APP_BASE_HREF is the URL prefix that should be preserved. Syntax: provide: APP_BASE_HREF, useValue: '/gfgapp' Approach: In app...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Apr, 2021" }, { "code": null, "e": 120, "s": 28, "text": "In this article, we are going to see what is APP_BASE_HREF in Angular 10 and how to use it." }, { "code": null, "e": 265, "s": 120, "text": "APP_BASE_HREF ...
Maximum number of customers that can be satisfied with given quantity
25 May, 2022 A new variety of rice has been brought in supermarket and being available for the first time, the quantity of this rice is limited. Each customer demands the rice in two different packaging of size a and size b. The sizes a and b are decided by staff as per the demand. Given the size of the packets a and b...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 May, 2022" }, { "code": null, "e": 1153, "s": 52, "text": "A new variety of rice has been brought in supermarket and being available for the first time, the quantity of this rice is limited. Each customer demands the rice in two dif...
How to return a json object from a Python function?
20 Dec, 2021 The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer the data. Python supports JSON through a built-in package called json and this module can be used to convert a python dictionary to JS...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Dec, 2021" }, { "code": null, "e": 410, "s": 28, "text": "The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer th...
Difference between dict.items() and dict.iteritems() in Python - GeeksforGeeks
12 Dec, 2019 dict.items() and dict.iteriteams() almots does the same thing, but there is a slight difference between them – dict.items(): returns a copy of the dictionary’s list in the form of (key, value) tuple pairs, which is a (Python v3.x) version, and exists in (Python v2.x) version. dict.iteritems(): returns an i...
[ { "code": null, "e": 24182, "s": 24154, "text": "\n12 Dec, 2019" }, { "code": null, "e": 24293, "s": 24182, "text": "dict.items() and dict.iteriteams() almots does the same thing, but there is a slight difference between them –" }, { "code": null, "e": 24459, "s":...
Extract Content from HTML
How to extract content from an HTML document using java. Following is the program to extract content from an HTML document using java. import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.tika.exception.TikaException; import org.apache.tika.metadata.Metadata; import org.ap...
[ { "code": null, "e": 2125, "s": 2068, "text": "How to extract content from an HTML document using java." }, { "code": null, "e": 2203, "s": 2125, "text": "Following is the program to extract content from an HTML document using java." }, { "code": null, "e": 3420, ...
10 Examples to Master *args and **kwargs in Python | by Soner Yıldırım | Towards Data Science
Functions are building blocks in Python. They take zero or more arguments and return a value. Python is pretty flexible in terms of how arguments are passed to a function. The *args and **kwargs make it easier and cleaner to handle arguments. The important parts are “*” and “**”. You can use any word instead of args an...
[ { "code": null, "e": 415, "s": 172, "text": "Functions are building blocks in Python. They take zero or more arguments and return a value. Python is pretty flexible in terms of how arguments are passed to a function. The *args and **kwargs make it easier and cleaner to handle arguments." }, { ...
Python - Pairs with Sum equal to K in tuple list - GeeksforGeeks
06 Mar, 2020 Sometimes, while working with data, we can have a problem in which we need to find the sum of pairs of tuple list. And specifically the sum that is equal to K. This kind of problem can be important in web development and competitive programming. Lets discuss certain ways in which this task can be performed...
[ { "code": null, "e": 24984, "s": 24956, "text": "\n06 Mar, 2020" }, { "code": null, "e": 25293, "s": 24984, "text": "Sometimes, while working with data, we can have a problem in which we need to find the sum of pairs of tuple list. And specifically the sum that is equal to K. Thi...
Julia Programming - Environment Setup
To install Julia, we need to download binary Julia platform in executable form which you can download from the link https://julialang.org/downloads/. On the webpage, you will find Julia in 32-bit and 64-bit format for all three major platforms, i.e. Linux, Windows, and Macintosh (OS X). The current stable release which...
[ { "code": null, "e": 2430, "s": 2078, "text": "To install Julia, we need to download binary Julia platform in executable form which you can download from the link https://julialang.org/downloads/. On the webpage, you will find Julia in 32-bit and 64-bit format for all three major platforms, i.e. Lin...
Java Program for Counting Sort
The Counting Sort counts the number of objects having distinct key values. Let us see an example − Note − The below code can be used with negative numbers as well. Live Demo import java.util.*; public class Demo{ static void count_sort(int[] arr){ int max_val = Arrays.stream(arr).max().getAsInt(); int m...
[ { "code": null, "e": 1161, "s": 1062, "text": "The Counting Sort counts the number of objects having distinct key values. Let us see an example −" }, { "code": null, "e": 1226, "s": 1161, "text": "Note − The below code can be used with negative numbers as well." }, { "cod...
D3.js - Installation
In this chapter, we will learn how to set up the D3.js development environment. Before we start, we need the following components − D3.js library Editor Web browser Web server Let us go through the steps one by one in detail. We need to include the D3.js library into your HTML webpage in order to use D3.js to create da...
[ { "code": null, "e": 2262, "s": 2130, "text": "In this chapter, we will learn how to set up the D3.js development environment. Before we start, we need the following components −" }, { "code": null, "e": 2276, "s": 2262, "text": "D3.js library" }, { "code": null, "e":...
Django - Apache Setup
So far, in our examples, we have used the Django dev web server. But this server is just for testing and is not fit for production environment. Once in production, you need a real server like Apache, Nginx, etc. Let's discuss Apache in this chapter. Serving Django applications via Apache is done by using mod_wsgi. So t...
[ { "code": null, "e": 2295, "s": 2045, "text": "So far, in our examples, we have used the Django dev web server. But this server is just for testing and is not fit for production environment. Once in production, you need a real server like Apache, Nginx, etc. Let's discuss Apache in this chapter." ...
Kibana - Management
The Management section in Kibana is used to manage the index patterns. In this chapter, we will discuss the following − Create Index Pattern without Time filter field Create Index Pattern with Time filter field To do this, go to Kibana UI and click Management − To work with Kibana, we first have to create index which i...
[ { "code": null, "e": 2225, "s": 2105, "text": "The Management section in Kibana is used to manage the index patterns. In this chapter, we will discuss the following −" }, { "code": null, "e": 2272, "s": 2225, "text": "Create Index Pattern without Time filter field" }, { "...
How to Deploy your Machine Learning Models on Kubernetes | by Dimitris Poulopoulos | Towards Data Science
Kubernetes is a production-grade container orchestration system, which automates the deployment, scaling and management of containerized applications. The project is open-sourced and battle-tested with mission-critical applications that Google runs. Machine learning solutions are often broken down into many steps that ...
[ { "code": null, "e": 297, "s": 47, "text": "Kubernetes is a production-grade container orchestration system, which automates the deployment, scaling and management of containerized applications. The project is open-sourced and battle-tested with mission-critical applications that Google runs." }, ...
Python | Average String length in list - GeeksforGeeks
29 Nov, 2019 Sometimes, while working with data, we can have a problem in which we need to gather information of average length of String data in list. This kind of information might be useful in Data Science domain. Let’s discuss certain ways in which this task can be performed. Method #1 : Using list comprehension + ...
[ { "code": null, "e": 24200, "s": 24172, "text": "\n29 Nov, 2019" }, { "code": null, "e": 24468, "s": 24200, "text": "Sometimes, while working with data, we can have a problem in which we need to gather information of average length of String data in list. This kind of information...
Jar files in Java - GeeksforGeeks
28 Jul, 2021 A JAR (Java Archive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file to distribute application software or libraries on the Java platform. In simple words, a JAR file is a file that contains a compressed ver...
[ { "code": null, "e": 24368, "s": 24340, "text": "\n28 Jul, 2021" }, { "code": null, "e": 25016, "s": 24368, "text": "A JAR (Java Archive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one...
Working with Times and Dates in BigQuery | by Christianlauer | Towards Data Science
Who is not familiar with this situation? What was that thing again with the correct timestamp format? Just google it and next time it will end so again. Here are some of the use cases, that I often come in touch with and which I wanted to write down, in the hope not to have to google them again. Let’s start with a very...
[ { "code": null, "e": 343, "s": 46, "text": "Who is not familiar with this situation? What was that thing again with the correct timestamp format? Just google it and next time it will end so again. Here are some of the use cases, that I often come in touch with and which I wanted to write down, in th...
Java Basic Data Types | Practice | GeeksforGeeks
Read a value and store it in the appropriate Java Data Type. Example 1: Input: 18 abc 9.9876 Output: 18 abc 9.9876 Explanation: The three inputs are stored in approriate data types and then printed in order. Your Task: Your task is to complete each of the given functions javaIntType() : read an integer in...
[ { "code": null, "e": 288, "s": 226, "text": "Read a value and store it in the appropriate Java Data Type. " }, { "code": null, "e": 300, "s": 288, "text": "\nExample 1:" }, { "code": null, "e": 445, "s": 300, "text": "Input: \n18 \nabc \n9.9876 \nOutput:\n18 \...
basename - Unix, Linux Command
basename - Strips directory and suffix from filenames. basename NAME [SUFFIX] basename OPTION basename prints NAME with any leading directory components removed. If Suffix is specified, it will also remove a trailing SUFFIX. To get the name of the file present in test folder $ basename test/sample.txt sample.txt ...
[ { "code": null, "e": 10632, "s": 10577, "text": "basename - Strips directory and suffix from filenames." }, { "code": null, "e": 10671, "s": 10632, "text": "basename NAME [SUFFIX]\nbasename OPTION" }, { "code": null, "e": 10802, "s": 10671, "text": "basename p...
Design a 3D Hover Annotation Card using tilt.js - GeeksforGeeks
01 Feb, 2021 3D Hover Annotation Card: Upon hovering the card will display another card in 3D effect on top, the card possesses a tilting effect as well. This effect can be created using vanilla-tilt.js library and CSS. Installation: This can be installed by using a node package manager (npm) or by adding the CDN link...
[ { "code": null, "e": 26255, "s": 26227, "text": "\n01 Feb, 2021" }, { "code": null, "e": 26463, "s": 26255, "text": "3D Hover Annotation Card: Upon hovering the card will display another card in 3D effect on top, the card possesses a tilting effect as well. This effect can be cre...
How to implement Single Responsibility Principle using C#?
A class should have only one reason to change. Definition − In this context, responsibility is considered to be one reason to change. This principle states that if we have 2 reasons to change for a class, we have to split the functionality in two classes. Each class will handle only one responsibility and if in the fut...
[ { "code": null, "e": 1109, "s": 1062, "text": "A class should have only one reason to change." }, { "code": null, "e": 1196, "s": 1109, "text": "Definition − In this context, responsibility is considered to be one reason to change." }, { "code": null, "e": 1632, "...
RFMT Segmentation Using K-Means Clustering | by Yexi Yuan | Towards Data Science
Important note: This was created as part of my own personal learning process for data science in python. I find it extremely helpful when i write this down to help me learn better and faster. This was part of the course on DataCamp and the code is based on the course and other online resources I used. Please visit Data...
[ { "code": null, "e": 613, "s": 172, "text": "Important note: This was created as part of my own personal learning process for data science in python. I find it extremely helpful when i write this down to help me learn better and faster. This was part of the course on DataCamp and the code is based o...
Implementing web scraping using lxml in Python - GeeksforGeeks
05 Oct, 2021 Web scraping basically refers to fetching only some important piece of information from one or more websites. Every website has recognizable structure/pattern of HTML elements. Steps to perform web scraping :1. Send a link and get the response from the sent link 2. Then convert response object to a byte s...
[ { "code": null, "e": 24932, "s": 24904, "text": "\n05 Oct, 2021" }, { "code": null, "e": 25110, "s": 24932, "text": "Web scraping basically refers to fetching only some important piece of information from one or more websites. Every website has recognizable structure/pattern of H...
gets() is risky to use! - GeeksforGeeks
05 Nov, 2020 Consider the below program. C void read(){ char str[20]; gets(str); printf("%s", str); return;} The code looks simple, it reads string from standard input and prints the entered string, but it suffers from Buffer Overflow as gets() doesn’t do any array bound testing. gets() keeps on reading until ...
[ { "code": null, "e": 24454, "s": 24426, "text": "\n05 Nov, 2020" }, { "code": null, "e": 24483, "s": 24454, "text": "Consider the below program. " }, { "code": null, "e": 24485, "s": 24483, "text": "C" }, { "code": "void read(){ char str[20]; gets(...
Start Coding | Practice | GeeksforGeeks
When learning a new language, we first learn to output some message. Here, we'll start with the famous Hello World message. Now, here you are given a function to complete. Don't worry about the ins and outs of functions, just add the command (cout<<"Hello World") to print Hello World. Input Format :No input Output form...
[ { "code": null, "e": 512, "s": 226, "text": "When learning a new language, we first learn to output some message. Here, we'll start with the famous Hello World message. Now, here you are given a function to complete. Don't worry about the ins and outs of functions, just add the command (cout<<\"Hell...
SaltStack - Installation
Before moving to installation, you need to have the following requirements − A Linux server (latest Ubuntu server). A Linux server (latest Ubuntu server). sudo or root access to this server. sudo or root access to this server. Install all the updates using the following command − sudo apt-get update Install the SaltMa...
[ { "code": null, "e": 2284, "s": 2207, "text": "Before moving to installation, you need to have the following requirements −" }, { "code": null, "e": 2323, "s": 2284, "text": "A Linux server (latest Ubuntu server)." }, { "code": null, "e": 2362, "s": 2323, "tex...
How to edit values of an object inside an array in a class - JavaScript?
For this, use the “this” keyword. Following is the code − class Employee { constructor() { this.tempObject = [ { firstName: "David", setTheAnotherFirstName() { this.firstName = "Carol"; }, }, ]; } } var ...
[ { "code": null, "e": 1096, "s": 1062, "text": "For this, use the “this” keyword." }, { "code": null, "e": 1120, "s": 1096, "text": "Following is the code −" }, { "code": null, "e": 1540, "s": 1120, "text": "class Employee {\n constructor() {\n this.t...
How to find the minimum value of an array in JavaScript?
Math.min() function usually takes all the elements in an array and scrutinize each and every value to get the minimum value.It's methodology is discussed in the below example. Live Demo Example <html> <body> <script> function minimum(value) { if (toString.call(value) !== "[object Array]") return false; ...
[ { "code": null, "e": 1238, "s": 1062, "text": "Math.min() function usually takes all the elements in an array and scrutinize each and every value to get the minimum value.It's methodology is discussed in the below example." }, { "code": null, "e": 1249, "s": 1238, "text": " Live ...
SQLAlchemy Core - Using Aliases
The alias in SQL corresponds to a “renamed” version of a table or SELECT statement, which occurs anytime you say “SELECT * FROM table1 AS a”. The AS creates a new name for the table. Aliases allow any table or subquery to be referenced by a unique name. In case of a table, this allows the same table to be named in the ...
[ { "code": null, "e": 2594, "s": 2340, "text": "The alias in SQL corresponds to a “renamed” version of a table or SELECT statement, which occurs anytime you say “SELECT * FROM table1 AS a”. The AS creates a new name for the table. Aliases allow any table or subquery to be referenced by a unique name....
Difference between DOMContentLoaded and load Events - GeeksforGeeks
18 Nov, 2019 These two events DOMContentLoaded and load are used to check when a webpage has loaded completely. Still, there are some factors that determine the preference of one over the other. Let’s have a look at both of them and understand their working. DOMContentLoaded event gets executed once the basic HTML docu...
[ { "code": null, "e": 24858, "s": 24830, "text": "\n18 Nov, 2019" }, { "code": null, "e": 25104, "s": 24858, "text": "These two events DOMContentLoaded and load are used to check when a webpage has loaded completely. Still, there are some factors that determine the preference of o...
C# | Insert an object at the top of the Stack - Push Operation - GeeksforGeeks
01 Feb, 2019 Stack represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushing the item and when you remove it, it is called popping the item. Stack<T>.Push(T) Method is used to inserts an object at the top o...
[ { "code": null, "e": 24466, "s": 24438, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24789, "s": 24466, "text": "Stack represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is ...
Python 3 - List list() Method
The list() method takes sequence types and converts them to lists. This is used to convert a given tuple into list. Note − Tuple are very similar to lists with only difference that element values of a tuple can not be changed and tuple elements are put between parentheses instead of square bracket. This function also c...
[ { "code": null, "e": 2456, "s": 2340, "text": "The list() method takes sequence types and converts them to lists. This is used to convert a given tuple into list." }, { "code": null, "e": 2704, "s": 2456, "text": "Note − Tuple are very similar to lists with only difference that e...
How to setup cookies in Python CGI Programming?
It is very easy to send cookies to browser. These cookies are sent along with HTTP Header before to Content-type field. Assuming you want to set UserID and Password as cookies. Setting the cookies is done as follows − #!/usr/bin/python print "Set-Cookie:UserID = XYZ;\r\n" print "Set-Cookie:Password = XYZ123;\r\n" print...
[ { "code": null, "e": 1280, "s": 1062, "text": "It is very easy to send cookies to browser. These cookies are sent along with HTTP Header before to Content-type field. Assuming you want to set UserID and Password as cookies. Setting the cookies is done as follows −" }, { "code": null, "e"...