title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
jQuery | Flipping Gallery Plugin
28 May, 2020 jQuery provides a simple, beautiful, and interactive flipping gallery plugin which helps programmers to flip many images in a gallery in various directions with the autoplay feature. The plugin is implemented by using HTML markups and simple javascript function call. Please download the Flipping gallery pl...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2020" }, { "code": null, "e": 296, "s": 28, "text": "jQuery provides a simple, beautiful, and interactive flipping gallery plugin which helps programmers to flip many images in a gallery in various directions with the autoplay f...
MVC (Model View Controller) Architecture Pattern in Android with Example
27 Oct, 2020 Developing an android application by applying a software architecture pattern is always preferred by the developers. An architecture pattern gives modularity to the project files and assures that all the codes get covered in Unit testing. It makes the task easy for developers to maintain the software and t...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Oct, 2020" }, { "code": null, "e": 728, "s": 52, "text": "Developing an android application by applying a software architecture pattern is always preferred by the developers. An architecture pattern gives modularity to the project f...
How to generate byte code file in python ?
01 Nov, 2017 Whenever the Python script compiles, it automatically generates a compiled code called as byte code. The byte-code is not actually interpreted to machine code, unless there is some exotic implementation such as PyPy. The byte-code is loaded into the Python run-time and interpreted by a virtual machine, whi...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Nov, 2017" }, { "code": null, "e": 269, "s": 52, "text": "Whenever the Python script compiles, it automatically generates a compiled code called as byte code. The byte-code is not actually interpreted to machine code, unless there i...
Sort an array when two halves are sorted
06 Jul, 2022 Given an integer array of which both first half and second half are sorted. Task is to merge two sorted halves of array into single sorted array. Examples: Input : A[] = { 2, 3, 8, -1, 7, 10 } Output : -1, 2, 3, 7, 8, 10 Input : A[] = {-4, 6, 9, -1, 3 } Output : -4, -1, 3, 6, 9 Method 1: A Simple Soluti...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 198, "s": 52, "text": "Given an integer array of which both first half and second half are sorted. Task is to merge two sorted halves of array into single sorted array." }, { "code": null, ...
Python | First occurrence of True number
06 Apr, 2022 Many times we require to find the first occurring non-zero number to begin the processing with. This has mostly use case in Machine Learning domain in which we require to process data excluding None or 0 values. Let’s discuss certain ways in which this can be performed. Method #1 : Using next() + enumerate...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Apr, 2022" }, { "code": null, "e": 552, "s": 28, "text": "Many times we require to find the first occurring non-zero number to begin the processing with. This has mostly use case in Machine Learning domain in which we require to proc...
Check if two strings are same ignoring their cases
19 Jul, 2021 Given two strings str1 and str2. The task is to check if the two given strings are same if a case-insensitive comparison is followed, i.e., the cases of the strings are ignored in Java.Examples: Input: str1 = "Geeks", str2 = "geeks" Output: Same Input: str1 = "Geek", str2 = "geeksforgeeks" Output: Not S...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jul, 2021" }, { "code": null, "e": 225, "s": 28, "text": "Given two strings str1 and str2. The task is to check if the two given strings are same if a case-insensitive comparison is followed, i.e., the cases of the strings are ignore...
Output of Java Programs | Set 34 (Collections)
09 Apr, 2021 1. What is the Output of the following Java Program? Java import java.util.LinkedList; class Demo {public void show() { LinkedList<Integer> list = new LinkedList<Integer>(); list.add(1); list.add(4); list.add(7); list.add(5); for (int i = 0; i < list.size(); i+...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Apr, 2021" }, { "code": null, "e": 108, "s": 54, "text": "1. What is the Output of the following Java Program? " }, { "code": null, "e": 113, "s": 108, "text": "Java" }, { "code": "import java.util.Linked...
PHP | ob_end_flush(), ob_end_clean() Functions
08 Mar, 2018 In the previous article on ob_start(), we learned how to start the output buffer; now we need to end the output buffering and send the whole HTML to the browser to render. We can do this by the help of functions ob_end_flush() and ob_end_clean(). ob_end_flush() Function Syntax: bool ob_end_flush () Parame...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Mar, 2018" }, { "code": null, "e": 275, "s": 28, "text": "In the previous article on ob_start(), we learned how to start the output buffer; now we need to end the output buffering and send the whole HTML to the browser to render. We ...
GATE | GATE-CS-2005 | Question 32
28 Jun, 2021 Consider the following C-program: double foo (double); /* Line 1 */ int main(){ double da, db; // input da db = foo(da); } double foo(double a){ return a;} The above code compiled without any error or warning. If Line 1 is deleted, the above code will show:(A) no compile warning or err...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 62, "s": 28, "text": "Consider the following C-program:" }, { "code": "double foo (double); /* Line 1 */ int main(){ double da, db; // input da db = foo(da); } double foo(d...
Image Translation using OpenCV | Python
20 May, 2019 Translation refers to the rectilinear shift of an object i.e. an image from one location to another. If we know the amount of shift in horizontal and the vertical direction, say (tx, ty) then we can make a transformation matrix e.g. where tx denotes the shift along the x-axis and ty denotes shift along the...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 May, 2019" }, { "code": null, "e": 575, "s": 28, "text": "Translation refers to the rectilinear shift of an object i.e. an image from one location to another. If we know the amount of shift in horizontal and the vertical direction, s...
Least frequent element in an array
24 May, 2021 Given an array, find the least frequent element in it. If there are multiple elements that appear least number of times, print any one of them.Examples : Input : arr[] = {1, 3, 2, 1, 2, 2, 3, 1} Output : 3 3 appears minimum number of times in given array. Input : arr[] = {10, 20, 30} Output : 10 or 20 o...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2021" }, { "code": null, "e": 208, "s": 52, "text": "Given an array, find the least frequent element in it. If there are multiple elements that appear least number of times, print any one of them.Examples : " }, { "cod...
How to create Dialog Box in ReactJS?
05 Mar, 2021 A Dialog is a type of modal window which appears in front of app content to provide critical information or ask for a decision. Material UI for React has this component available for us, and it is very easy to integrate. We can create Dialog Box in ReactJS using the following approach. Creating React Appli...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Mar, 2021" }, { "code": null, "e": 315, "s": 28, "text": "A Dialog is a type of modal window which appears in front of app content to provide critical information or ask for a decision. Material UI for React has this component availa...
How to Convert java.sql.Date to java.util.Date in Java?
04 Sep, 2021 If we have the Date object of the SQL package, then we can easily convert it into an util Date object. We need to pass the getTime() method while creating the util Date object. java.util.Date utilDate = new java.util.Date(sqlDate.getTime()); It will give us util Date object. Syntax: public long getTime() ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Sep, 2021" }, { "code": null, "e": 205, "s": 28, "text": "If we have the Date object of the SQL package, then we can easily convert it into an util Date object. We need to pass the getTime() method while creating the util Date object...
CharField - Django Forms - GeeksforGeeks
13 Feb, 2020 CharField in Django Forms is a string field, for small- to large-sized strings. It is used for taking text inputs from the user. The default widget for this input is TextInput. It uses MaxLengthValidator and MinLengthValidator if max_length and min_length are provided. Otherwise, all inputs are valid. Char...
[ { "code": null, "e": 24140, "s": 24112, "text": "\n13 Feb, 2020" }, { "code": null, "e": 24443, "s": 24140, "text": "CharField in Django Forms is a string field, for small- to large-sized strings. It is used for taking text inputs from the user. The default widget for this input ...
Create simple Blockchain using Python - GeeksforGeeks
19 Feb, 2022 A blockchain is a time-stamped decentralized series of fixed records that contains data of any size is controlled by a large network of computers that are scattered around the globe and not owned by a single organization. Every block is secured and connected with each other using hashing technology which p...
[ { "code": null, "e": 24135, "s": 24107, "text": "\n19 Feb, 2022" }, { "code": null, "e": 24501, "s": 24135, "text": "A blockchain is a time-stamped decentralized series of fixed records that contains data of any size is controlled by a large network of computers that are scattere...
Java Connection getCatalog() method with example
In general, a catalog is a directory which holds information about data sets, file or, a database. Whereas in a database catalog holds the list of all the databases, base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user groups. The getCatalog() method of the Connection interface returns ...
[ { "code": null, "e": 1322, "s": 1062, "text": "In general, a catalog is a directory which holds information about data sets, file or, a database. Whereas in a database catalog holds the list of all the databases, base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user g...
C program to add all perfect square elements in an array.
Write a program to find the sum of perfect square elements in an array. Given a number of elements in array as input and the sum of all the perfect square of those elements present in the array is output. For example, Input= 1, 2, 3, 4, 5, 9,10,11,16 The perfect squares are 1, 4, 9, 16. Sum = 1 + 4 + 9 +16 = 30 Output:...
[ { "code": null, "e": 1134, "s": 1062, "text": "Write a program to find the sum of perfect square elements in an array." }, { "code": null, "e": 1267, "s": 1134, "text": "Given a number of elements in array as input and the sum of all the perfect square of those elements present i...
How can I avoid too many OR statements in a MySQL query?
Use MySQL IN() to avoid too many OR statements. Let us first create a table − mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Name varchar(40) ); Query OK, 0 rows affected (0.89 sec) Insert some records in the table using insert command − mysql> insert into DemoTable(Name) values('Chri...
[ { "code": null, "e": 1140, "s": 1062, "text": "Use MySQL IN() to avoid too many OR statements. Let us first create a table −" }, { "code": null, "e": 1279, "s": 1140, "text": "mysql> create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n Name varchar(40)\n)...
Maximize Toys | Practice | GeeksforGeeks
Given an array arr[ ] of length N consisting cost of N toys and an integer K depicting the amount with you. Your task is to find maximum number of toys you can buy with K amount. Example 1: Input: N = 7 K = 50 arr[] = {1, 12, 5, 111, 200, 1000, 10} Output: 4 Explaination: The costs of the toys you can buy are 1, 12...
[ { "code": null, "e": 418, "s": 238, "text": "Given an array arr[ ] of length N consisting cost of N toys and an integer K depicting the amount with you. Your task is to find maximum number of toys you can buy with K amount. " }, { "code": null, "e": 429, "s": 418, "text": "Exampl...
Introduction to Regression Analysis [using Excel] | by Pranav Kaushik | Towards Data Science
Not familiar with tools like Python or R? It’s perfectly fine! You can still perform a regression analysis using Excel. And you don’t need to have any programming knowledge to do that. Excel is undoubtedly a very powerful tool when it comes to data analysis. You can do data cleaning, perform analysis using pivot tables...
[ { "code": null, "e": 214, "s": 172, "text": "Not familiar with tools like Python or R?" }, { "code": null, "e": 357, "s": 214, "text": "It’s perfectly fine! You can still perform a regression analysis using Excel. And you don’t need to have any programming knowledge to do that." ...
How to handle the warning of file_get_contents() function in PHP ? - GeeksforGeeks
07 May, 2021 The file_get_contents() function in PHP is an inbuilt function which is used to read a file into a string. The function uses memory mapping techniques which are supported by the server and thus enhances the performances making it a preferred way of reading contents of a file. The path of the file to be rea...
[ { "code": null, "e": 24373, "s": 24345, "text": "\n07 May, 2021" }, { "code": null, "e": 24783, "s": 24373, "text": "The file_get_contents() function in PHP is an inbuilt function which is used to read a file into a string. The function uses memory mapping techniques which are su...
Python | Word location in String
22 Apr, 2020 Sometimes, while working with Python strings, we can have problem in which we need to find location of a particular word. This can have application in domains such as day-day programming. Lets discuss certain ways in which this task can be done. Method #1 : Using re.findall() + index()This is one of the wa...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Apr, 2020" }, { "code": null, "e": 299, "s": 53, "text": "Sometimes, while working with Python strings, we can have problem in which we need to find location of a particular word. This can have application in domains such as day-day...
route command in Linux with Examples
17 May, 2020 route command in Linux is used when you want to work with the IP/kernel routing table. It is mainly used to set up static routes to specific hosts or networks via an interface. It is used for showing or update the IP/kernel routing table. Many Linux distributions do not have route command pre-installed. To...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 May, 2020" }, { "code": null, "e": 291, "s": 52, "text": "route command in Linux is used when you want to work with the IP/kernel routing table. It is mainly used to set up static routes to specific hosts or networks via an interfac...
How to set the Length of the Characters in TextBox in C#?
29 Nov, 2019 In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In TextBox, you are allowed to set the maximum number of characters which the user can type or paste or entered into the TextBox with the...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2019" }, { "code": null, "e": 618, "s": 28, "text": "In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In Te...
How to check/find an item in Dequeue using find() method
10 Dec, 2021 find() function finds the element in the given range of numbers. Returns an iterator to the first element in the range [first, last) that compares equal to the value to be searched. If no such element is found, the function returns last. Syntax: InputIterator find (InputIterator first, InputIterator last, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Dec, 2021" }, { "code": null, "e": 266, "s": 28, "text": "find() function finds the element in the given range of numbers. Returns an iterator to the first element in the range [first, last) that compares equal to the value to be sea...
Lower bound for comparison based sorting algorithms
06 Jul, 2021 The problem of sorting can be viewed as following. Input: A sequence of n numbers <a1, a2, . . . , an>. Output: A permutation (reordering) <a‘1, a‘2, . . . , a‘n> of the input sequence such that a‘1 <= a‘2 ..... <= a’n. A sorting algorithm is comparison based if it uses comparison operators to find the o...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2021" }, { "code": null, "e": 104, "s": 52, "text": "The problem of sorting can be viewed as following. " }, { "code": null, "e": 274, "s": 104, "text": "Input: A sequence of n numbers <a1, a2, . . . , an>. ...
ReactJS Reactstrap Navbar Component
24 Nov, 2021 Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Navbar component provides a way for users to provide them navigation controls at the top of an application. We can use the following approach...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Nov, 2021" }, { "code": null, "e": 395, "s": 28, "text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Navbar co...
Maximum Rectangular Area in a Histogram | Practice | GeeksforGeeks
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have the same width and the width is 1 unit, there will be N bars height of each bar will be given by the array arr. Example 1: Input: N = 7 arr[] ...
[ { "code": null, "e": 528, "s": 238, "text": "Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have the same width and the width is 1 unit, there will be N bars height of each b...
Program for Tower of Hanoi
13 Jul, 2022 Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules: Only one disk can be moved at a time.Each move consists of taking the upper disk from one of the stacks and placing it o...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Jul, 2022" }, { "code": null, "e": 241, "s": 54, "text": "Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following si...
Number of subarrays having product less than K
22 Jul, 2021 Given an array of positive numbers, calculate the number of possible contiguous subarrays having product lesser than a given number K. Examples : Input : arr[] = [1, 2, 3, 4] K = 10 Output : 7 The subarrays are {1}, {2}, {3}, {4} {1, 2}, {1, 2, 3} and {2, 3} Input : arr[] = [1, 9, 2, 8, 6, 4, 3...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jul, 2021" }, { "code": null, "e": 187, "s": 52, "text": "Given an array of positive numbers, calculate the number of possible contiguous subarrays having product lesser than a given number K." }, { "code": null, "e": 19...
StringBuilder.ToString Method in C#
29 Jan, 2019 This method is used to converts the value of this instance to a String. A new String object is created and initialized to get the character sequence from this StringBuilder object and then String is returned by ToString(). Subsequent changes to this sequence contained by Object do not affect the contents o...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jan, 2019" }, { "code": null, "e": 349, "s": 28, "text": "This method is used to converts the value of this instance to a String. A new String object is created and initialized to get the character sequence from this StringBuilder ob...
Multiple Color Detection in Real-Time using Python-OpenCV
10 May, 2020 For a robot to visualize the environment, along with the object detection, detection of its color in real-time is also very important. In self-driving car, to detect the traffic signals. Multiple color detection is used in some industrial robots, to performing pick-and-place task in separating different co...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 May, 2020" }, { "code": null, "e": 189, "s": 54, "text": "For a robot to visualize the environment, along with the object detection, detection of its color in real-time is also very important." }, { "code": null, "e": 24...
Python - Iterate over Tuples in Dictionary - GeeksforGeeks
24 Jan, 2022 In this article, we will discuss how to Iterate over Tuples in Dictionary in Python. We can get the particular tuples by using an index: Syntax: dictionary_name[index] To iterate the entire tuple values in a particular index for i in range(0, len(dictionary_name[index])): print(dictionary_name[index][...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n24 Jan, 2022" }, { "code": null, "e": 25623, "s": 25537, "text": "In this article, we will discuss how to Iterate over Tuples in Dictionary in Python. " }, { "code": null, "e": 25675, "s": 25623, "text": "We c...
C# | BitArray Class - GeeksforGeeks
03 Apr, 2019 The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1 and false indicates the bit is off i.e, 0. This class is contained in System.Collections namespace. Properties of BitArray Class: The BitArray class is a collection cl...
[ { "code": null, "e": 25639, "s": 25611, "text": "\n03 Apr, 2019" }, { "code": null, "e": 25879, "s": 25639, "text": "The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1 and false indicates the...
How to Install Tkinter on MacOS? - GeeksforGeeks
22 Sep, 2021 In this article, we will learn how to install Tkinter in Python on MacOS. Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python’s de-facto standard GUI. Follow the below steps to install the Tkinter package on macOS using pip: Step 1: In...
[ { "code": null, "e": 26031, "s": 26003, "text": "\n22 Sep, 2021" }, { "code": null, "e": 26254, "s": 26031, "text": "In this article, we will learn how to install Tkinter in Python on MacOS. Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to...
PHP | strtolower() Function - GeeksforGeeks
01 Aug, 2021 The strtolower() function is used to convert a string into lowercase. This function takes a string as parameter and converts all the uppercase english alphabets present in the string to lowercase. All other numeric characters or special characters in the string remains unchanged. Syntax: string strtolower(...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n01 Aug, 2021" }, { "code": null, "e": 26472, "s": 26191, "text": "The strtolower() function is used to convert a string into lowercase. This function takes a string as parameter and converts all the uppercase english alphabets pr...
D3.js hierarchy() Function - GeeksforGeeks
23 Sep, 2020 The d3.hierarchy() function in D3.js library is used to construct a root node data from a given hierarchical data. The data that is given must be of an object and must represent a root node. Syntax: d3.hierarchy(data[, children]); Parameters: This function takes a single parameter as given above and descri...
[ { "code": null, "e": 25809, "s": 25781, "text": "\n23 Sep, 2020" }, { "code": null, "e": 26000, "s": 25809, "text": "The d3.hierarchy() function in D3.js library is used to construct a root node data from a given hierarchical data. The data that is given must be of an object and ...
Javascript String @@iterator Method - GeeksforGeeks
28 Apr, 2021 String [@@iterator]( ) Method is used to make String iterable. [@@iterator]() returns iterator object which iterate over all code point of String. String[@@iterator] is Built – in Property of String. We can use this method by making a string iterator. We can make an iterator by calling the @@iterator prop...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n28 Apr, 2021" }, { "code": null, "e": 26746, "s": 26545, "text": "String [@@iterator]( ) Method is used to make String iterable. [@@iterator]() returns iterator object which iterate over all code point of String. String[@@iterato...
C# | How to get the Standard Output Stream through Console - GeeksforGeeks
28 Jan, 2019 Given a normal console, the task is to get the Standard Output Stream through this Console in C#. Approach: This can be done using the Out property in the Console class of the System package in C#. Program: Getting the Standard Output Stream // C# program to illustrate the// Console.Out Propertyusing Syste...
[ { "code": null, "e": 25355, "s": 25327, "text": "\n28 Jan, 2019" }, { "code": null, "e": 25453, "s": 25355, "text": "Given a normal console, the task is to get the Standard Output Stream through this Console in C#." }, { "code": null, "e": 25553, "s": 25453, "...
Python | Numpy matrix.trace() - GeeksforGeeks
29 May, 2019 With the help of Numpy matrix.trace() method, we can find the sum of all the elements of diagonal of a matrix by using the matrix.trace() method. Syntax : matrix.trace()Return : Return sum of a diagonal elements of a matrix Example #1 :In this example we can see that by using matrix.trace() method can help...
[ { "code": null, "e": 26436, "s": 26408, "text": "\n29 May, 2019" }, { "code": null, "e": 26582, "s": 26436, "text": "With the help of Numpy matrix.trace() method, we can find the sum of all the elements of diagonal of a matrix by using the matrix.trace() method." }, { "co...
Sound generation on clicking the button using JavaScript - GeeksforGeeks
16 Apr, 2019 The sound generation after clicking the button, receiving notifications or at the time of page load can be done by using JavaScript. Note: URL provided in the playSound function can be changed to give the custom sound url. Style property is not the part of implementation. It is used to provide a nice inter...
[ { "code": null, "e": 26021, "s": 25993, "text": "\n16 Apr, 2019" }, { "code": null, "e": 26154, "s": 26021, "text": "The sound generation after clicking the button, receiving notifications or at the time of page load can be done by using JavaScript." }, { "code": null, ...
GATE | GATE CS 2020 | Question 12 - GeeksforGeeks
26 May, 2021 For parameters a and b, both of which are ω(1), T(n)=T(n1/a)+1, and T(b)=1. Then T(n) is(A) Θ(logalogbn)(B) Θ(logabn)(C) Θ(logblogan)(D) Θ(log2log2n)Answer: (A)Explanation: Given, T(n) = T(n1/a)+1, T(b) = 1 Now, using iterative method, = T(n) = [T(n1/a2)+1] + 1 = [T(n1/a3)+1] + 2 = [T(n1/a4)+1] + 3 . . ...
[ { "code": null, "e": 25713, "s": 25685, "text": "\n26 May, 2021" }, { "code": null, "e": 25893, "s": 25713, "text": "For parameters a and b, both of which are ω(1), T(n)=T(n1/a)+1, and T(b)=1. Then T(n) is(A) Θ(logalogbn)(B) Θ(logabn)(C) Θ(logblogan)(D) Θ(log2log2n)Answer: (A)Exp...
turtle.heading() function in Python
14 Mar, 2022 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This function is used to return the turtle’s current heading. It doesn’t require any argum...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Mar, 2022" }, { "code": null, "e": 245, "s": 28, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver...
How to plot overlapping lines in Matplotlib?
To plot overlapping lines in matplotlib, we can use variable overlapping that basically sets the opacity or alpha value in the plot. Set the figure size and adjust the padding between and around the subplots. Initialize a variable overlapping to set the alpha value of the line. Plot line1 and line2 with red and green c...
[ { "code": null, "e": 1320, "s": 1187, "text": "To plot overlapping lines in matplotlib, we can use variable overlapping that basically sets the opacity or alpha value in the plot." }, { "code": null, "e": 1396, "s": 1320, "text": "Set the figure size and adjust the padding betwee...
URL getPort() method in Java with Examples
27 Dec, 2018 The getPort() function is a part of URL class. The function getPort() returns the port of a specified URL. The function returns the port number or -1 if the port is not set Function Signature public int getPort() Syntax url.getPort() Return Type: The function returns Integer Type Parameter: This function...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Dec, 2018" }, { "code": null, "e": 201, "s": 28, "text": "The getPort() function is a part of URL class. The function getPort() returns the port of a specified URL. The function returns the port number or -1 if the port is not set" ...
Python – Alternate List elements
30 Aug, 2020 Given 2 lists, print element in zig-zag manner, i.e print similar indices of lists and then proceed to next. Input : test_list1 = [5, 3, 1], test_list2 = [6, 4, 2]Output : [5, 6, 3, 4, 1, 2, 4]Explanation : 5 and 6, as in 0th index are printed first, then 3 and 4 on 1st index, and so on. Input : test_list1...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2020" }, { "code": null, "e": 137, "s": 28, "text": "Given 2 lists, print element in zig-zag manner, i.e print similar indices of lists and then proceed to next." }, { "code": null, "e": 317, "s": 137, "text"...
OS Process Management - GeeksforGeeks
28 Jul, 2021 void P (binary_semaphore *s) { unsigned y; unsigned *x = &(s->value); do { fetch-and-set x, y; } while (y); } void V (binary_semaphore *s) { S->value = 0; } Semaphore S is initialized to 2 Process W executes S=1, x=1 but it doesn't update the x variable. Then process Y executes S=0, it d...
[ { "code": null, "e": 34185, "s": 34157, "text": "\n28 Jul, 2021" }, { "code": null, "e": 34359, "s": 34185, "text": "void P (binary_semaphore *s) {\n unsigned y;\n unsigned *x = &(s->value);\n do {\n fetch-and-set x, y;\n } while (y);\n}\n\nvoid V (binary_semaphore *s) {\...
Convex Hull using Divide and Conquer Algorithm
22 Jun, 2022 A convex hull is the smallest convex polygon containing all the given points. Input is an array of points specified by their x and y coordinates. The output is the convex hull of this set of points. Examples: Input : points[] = {(0, 0), (0, 4), (-4, 0), (5, 0), (0, -6), (1, 0)}; Output ...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 132, "s": 54, "text": "A convex hull is the smallest convex polygon containing all the given points." }, { "code": null, "e": 263, "s": 132, "text": "Input is an array of points...
Count all possible paths from top left to bottom right of a mXn matrix
23 Jun, 2022 The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each cell you can either move only to right or downExamples : Input : m = 2, n = 2; Output : 2 There are two paths (0, 0) -> (0, 1) -> (1, 1) (0, 0) -> (1, 0) -> (1, 1) Input : m ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 239, "s": 52, "text": "The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each cell you can either move only to right or dow...
Split numbers from 1 to N into two equal sum subsets
17 Aug, 2021 Given an integer N, the task is to divide the numbers from 1 to N into two nonempty subsets such that the sum of elements in the set is equal. Print the element in the subset. If we can’t form any subset then print -1. Examples: Input N = 4 Output: Size of subset 1 is: 2 Elements of the subset are: 1 4 Siz...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Aug, 2021" }, { "code": null, "e": 273, "s": 54, "text": "Given an integer N, the task is to divide the numbers from 1 to N into two nonempty subsets such that the sum of elements in the set is equal. Print the element in the subset...
Generate Waffle chart using pyWaffle in Python
21 Apr, 2020 A Waffle Chart is a gripping visualization technique that is normally created to display progress towards goals. Where each cell in the Waffle Chart constitutes of 10 X 10 cell grid in which each cell represents one percentage point summing up to total 100%. It is commonly an effective option when you are ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2020" }, { "code": null, "e": 450, "s": 28, "text": "A Waffle Chart is a gripping visualization technique that is normally created to display progress towards goals. Where each cell in the Waffle Chart constitutes of 10 X 10 cel...
How to iterate over files in directory using Python?
17 May, 2021 Directory also sometimes known as a folder are unit organizational structure in a system’s file system for storing and locating files or more folders. Python as a scripting language provides various methods to iterate over files in a directory. Below are the various approaches by using which one can iterat...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 May, 2021" }, { "code": null, "e": 273, "s": 28, "text": "Directory also sometimes known as a folder are unit organizational structure in a system’s file system for storing and locating files or more folders. Python as a scripting la...
Zigzag (or diagonal) traversal of Matrix
20 Jun, 2022 Given a 2D matrix, print all elements of the given matrix in diagonal order. For example, consider the following 5 X 4 input matrix. Example: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Diagonal printing of the above matrix is 1 5 2 9 6 3 13 10 7 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jun, 2022" }, { "code": null, "e": 189, "s": 54, "text": "Given a 2D matrix, print all elements of the given matrix in diagonal order. For example, consider the following 5 X 4 input matrix. " }, { "code": null, "e": 19...
Difference Between CountDownLatch And CyclicBarrier in Java
10 May, 2022 In spite of the fact that both CountDownLatch and CyclicBarrier are utilized as a synchronization help that permits at least one thread to wait however there are sure contrasts between them. Knowing those contrasts between CountDownLatch and CyclicBarrier in Java will assist you with choosing when one of t...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 May, 2022" }, { "code": null, "e": 456, "s": 52, "text": "In spite of the fact that both CountDownLatch and CyclicBarrier are utilized as a synchronization help that permits at least one thread to wait however there are sure contras...
Change column name of a given DataFrame in R
16 Mar, 2021 A data frame is a tabular structure with fixed dimensions, of each rows as well as columns. It is a two-dimensional array like object with numerical, character based or factor-type data. Each element belonging to the data frame is indexed by a unique combination of the row and column number respectively. C...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Mar, 2021" }, { "code": null, "e": 403, "s": 53, "text": "A data frame is a tabular structure with fixed dimensions, of each rows as well as columns. It is a two-dimensional array like object with numerical, character based or facto...
Qt Alignment in PyQt5
01 Jul, 2021 In PyQt5, Qt alignment is used to set the alignment of the widgets. In order to use the Qt alignment methods, we have to import Qt from the QtCore class. from PyQt5.QtCore import Qt There are many methods in Qt alignment :1. Qt.AlignLeft 2. Qt.AlignRight 3. Qt.AlignBottom 4. Qt.AlignTop 5. Qt.AlignCent...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jul, 2021" }, { "code": null, "e": 209, "s": 53, "text": "In PyQt5, Qt alignment is used to set the alignment of the widgets. In order to use the Qt alignment methods, we have to import Qt from the QtCore class. " }, { "cod...
Longest substring with count of 1s more than 0s
20 Jul, 2021 Given a binary string find the longest substring which contains 1’s more than 0’s.Examples: Input : 1010 Output : 3 Substring 101 has 1 occurring more number of times than 0. Input : 101100 Output : 5 Substring 10110 has 1 occurring more number of times than 0. A simple solution is to one by one consi...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Jul, 2021" }, { "code": null, "e": 146, "s": 52, "text": "Given a binary string find the longest substring which contains 1’s more than 0’s.Examples: " }, { "code": null, "e": 317, "s": 146, "text": "Input : 101...
Find size of a list in Python
A list is a collection data type in Python. The elements in a list are change able and there is no specific order associated with the elements. In this article we will see how to find the length of a list in Python. Which means we have to get the count of number of elements present in the list irrespective of whether t...
[ { "code": null, "e": 1408, "s": 1062, "text": "A list is a collection data type in Python. The elements in a list are change able and there is no specific order associated with the elements. In this article we will see how to find the length of a list in Python. Which means we have to get the count ...
MySQL Tryit Editor v1.0
SELECT CustomerName, City, Country FROM Customers; ​ 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-ve...
[ { "code": null, "e": 51, "s": 0, "text": "SELECT CustomerName, City, Country FROM Customers;" }, { "code": null, "e": 53, "s": 51, "text": "​" }, { "code": null, "e": 125, "s": 62, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." },...
Encapsulation in Golang - GeeksforGeeks
03 Oct, 2019 Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. In a different way, encapsulation is a protective shield that prevents the data from being accessed by the code outside this shield. In object-oriented language...
[ { "code": null, "e": 24069, "s": 24041, "text": "\n03 Oct, 2019" }, { "code": null, "e": 24349, "s": 24069, "text": "Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. In a different w...
Check if incoming edges in a vertex of directed graph is equal to vertex itself or not - GeeksforGeeks
09 Sep, 2021 Given a directed Graph G(V, E) with V vertices and E edges, the task is to check that for all vertices of the given graph, the incoming edges in a vertex is equal to the vertex itself or not. Examples: Input: Output: Yes Explanation: For vertex 0 there are 0 incoming edges, for vertex 1 there is 1 incomi...
[ { "code": null, "e": 24675, "s": 24647, "text": "\n09 Sep, 2021" }, { "code": null, "e": 24867, "s": 24675, "text": "Given a directed Graph G(V, E) with V vertices and E edges, the task is to check that for all vertices of the given graph, the incoming edges in a vertex is equal ...
Fraud Detection in Python
Frauds are really in many transactions. We can apply machine learning algorithms to lies the past data and predict the possibility of a transaction being a fraud transaction. In our example we will take credit card transactions, analyse the data, create the features and labels and finally apply one of the ML algorithms...
[ { "code": null, "e": 1534, "s": 1062, "text": "Frauds are really in many transactions. We can apply machine learning algorithms to lies the past data and predict the possibility of a transaction being a fraud transaction. In our example we will take credit card transactions, analyse the data, create...
od command in Linux with example - GeeksforGeeks
24 May, 2019 od command in Linux is used to convert the content of input in different formats with octal format as the default format.This command is especially useful when debugging Linux scripts for unwanted changes or characters. If more than one file is specified, od command concatenates them in the listed order to...
[ { "code": null, "e": 23924, "s": 23896, "text": "\n24 May, 2019" }, { "code": null, "e": 24456, "s": 23924, "text": "od command in Linux is used to convert the content of input in different formats with octal format as the default format.This command is especially useful when deb...
How to Set the Padding of the Label in C#?
30 Jun, 2019 In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to set the space between the content and the boundaries of the Label control using the Padding Property in the windows form. You can set this property ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2019" }, { "code": null, "e": 364, "s": 28, "text": "In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to set the space be...
How to Scrape Paragraphs using Python?
29 Dec, 2020 Prerequisite: Implementing Web Scraping in Python with BeautifulSoup In this article, we are going to see how we extract all the paragraphs from the given HTML document or URL using python. Module Needed: bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module d...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Dec, 2020" }, { "code": null, "e": 122, "s": 53, "text": "Prerequisite: Implementing Web Scraping in Python with BeautifulSoup" }, { "code": null, "e": 243, "s": 122, "text": "In this article, we are going to see...
TypeScript | Array reverse() Method
03 Mar, 2021 The Array.reverse() is an inbuilt TypeScript function which is used to reverses the element of an array. Syntax: array.reverse(); Parameter: This methods does not accept any parameter. Return Value: This method returns the reversed single value of the array. Below examples illustrate the Array reverse() ...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Mar, 2021" }, { "code": null, "e": 142, "s": 28, "text": "The Array.reverse() is an inbuilt TypeScript function which is used to reverses the element of an array. Syntax:" }, { "code": null, "e": 160, "s": 142, "...
Software Engineering | Calculation of Function Point (FP)
28 Jun, 2020 Function Point (FP) is an element of software development which helps to approximate the cost of development early in the process. It may measures functionality from user’s point of view. Counting Function Point (FP): Step-1:F = 14 * scaleScale varies from 0 to 5 according to character of Complexity Adjust...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2020" }, { "code": null, "e": 242, "s": 54, "text": "Function Point (FP) is an element of software development which helps to approximate the cost of development early in the process. It may measures functionality from user’s p...
matplotlib.pyplot.phase_spectrum() in Python
22 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 333, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
GOCG13: Google’s Online Challenge Experience for Business Intern | Singapore
25 Oct, 2020 Google’s Business Internship is open to students from all academic disciplines. Many intern roles within this program don’t require technical skills and could include working with advertiser or publisher accounts to develop compelling advertising solutions for brand advertisers, improving access to relevan...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Oct, 2020" }, { "code": null, "e": 495, "s": 28, "text": "Google’s Business Internship is open to students from all academic disciplines. Many intern roles within this program don’t require technical skills and could include working ...
How to check a variable is of function type using JavaScript ?
15 Apr, 2019 A function in JavaScript is the set of statements used to perform a specific task. A function can be either a named one or an anonymous one. The set of statements inside a function is executed when the function is invoked or called. A function can be assigned to a variable or passed to a method. var gfg = ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Apr, 2019" }, { "code": null, "e": 325, "s": 28, "text": "A function in JavaScript is the set of statements used to perform a specific task. A function can be either a named one or an anonymous one. The set of statements inside a fun...
C Program for Identity Matrix
08 Jul, 2022 Introduction to Identity Matrix : The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or main diagonal are 1’s and all other elements are zeros. In the below image, every matrix is an Identity Matrix. In linear algebra, this is sometimes called a...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 86, "s": 52, "text": "Introduction to Identity Matrix :" }, { "code": null, "e": 314, "s": 86, "text": " The dictionary definition of an Identity Matrix is a square matrix in wh...
How to find the type of Struct in Golang?
05 May, 2020 A structure or struct in Golang is a user-defined data type which is a composition of various data fields. Each data field has its own data type, which can be a built-in or another user-defined type. Struct represents any real-world entity that has some set of properties/fields. Go does not support the con...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 May, 2020" }, { "code": null, "e": 499, "s": 28, "text": "A structure or struct in Golang is a user-defined data type which is a composition of various data fields. Each data field has its own data type, which can be a built-in or an...
How to count number of distinct values per field/ key in MongoDB?
You can use the distinct command for this. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows − > db.distinctCountValuesDemo.insertOne({"StudentFirstName":"John","StudentFavouriteSubject":["C","C++","Java","MySQL","C","C++"]}); { "a...
[ { "code": null, "e": 1368, "s": 1187, "text": "You can use the distinct command for this. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −" }, { "code": null, "e": 1791, "s": 1368, "text": ">...
List add(int index, E element) method in Java
11 Dec, 2018 The add(int index, E ele) method of List interface in Java is used to insert the specified element at the given index in the current list. Syntax: public void add(int index, E element) Parameter: This method accepts two parameters as shown in the above syntax: index: This parameter specifies the index at w...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Dec, 2018" }, { "code": null, "e": 167, "s": 28, "text": "The add(int index, E ele) method of List interface in Java is used to insert the specified element at the given index in the current list." }, { "code": null, "e":...
GCD of two numbers when one of them can be very large
23 Jun, 2022 Given two numbers ‘a’ and ‘b’ such that (0 <= a <= 10^12 and b <= b < 10^250). Find the GCD of two given numbers.Examples : Input: a = 978 b = 89798763754892653453379597352537489494736 Output: 6 Input: a = 1221 b = 1234567891011121314151617181920212223242526272829 Output: 3 Solution : ...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 180, "s": 54, "text": "Given two numbers ‘a’ and ‘b’ such that (0 <= a <= 10^12 and b <= b < 10^250). Find the GCD of two given numbers.Examples : " }, { "code": null, "e": 348, "s...
Variational AutoEncoders
27 Jan, 2022 Variational autoencoder was proposed in 2013 by Knigma and Welling at Google and Qualcomm. A variational autoencoder (VAE) provides a probabilistic manner for describing an observation in latent space. Thus, rather than building an encoder that outputs a single value to describe each latent state attribute...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2022" }, { "code": null, "e": 431, "s": 28, "text": "Variational autoencoder was proposed in 2013 by Knigma and Welling at Google and Qualcomm. A variational autoencoder (VAE) provides a probabilistic manner for describing an ob...
Make all combinations of size k
11 Jul, 2022 Given two numbers n and k and you have to find all possible combination of k numbers from 1...n.Examples: Input : n = 4 k = 2 Output : 1 2 1 3 1 4 2 3 2 4 3 4 Input : n = 5 k = 3 Output : 1 2 3 1 2 4 1 2 5 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Jul, 2022" }, { "code": null, "e": 162, "s": 54, "text": "Given two numbers n and k and you have to find all possible combination of k numbers from 1...n.Examples: " }, { "code": null, "e": 465, "s": 162, "text"...
C - Command Line Arguments
It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and many times they are important for your program especially when you want to control your program from outside instead of hard coding those values inside the code. The com...
[ { "code": null, "e": 2531, "s": 2218, "text": "It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and many times they are important for your program especially when you want to control your program from o...
How to animate scrollLeft using jQuery?
To animate scrollLeft using jQuery, use the animate() method with scrollLeft. You can try to run the following code to learn how to animate scrollLeft using jQuery: Live Demo <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready...
[ { "code": null, "e": 1265, "s": 1187, "text": "To animate scrollLeft using jQuery, use the animate() method with scrollLeft." }, { "code": null, "e": 1352, "s": 1265, "text": "You can try to run the following code to learn how to animate scrollLeft using jQuery:" }, { "co...
StringTokenizer Class in Java
15 Jun, 2022 StringTokenizer class in Java is used to break a string into tokens. A StringTokenizer object internally maintains a current position within the string to be tokenized. Some operations advance this current position past the characters processed. A token is returned by taking a substring of the string that ...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2022" }, { "code": null, "e": 935, "s": 52, "text": "StringTokenizer class in Java is used to break a string into tokens. A StringTokenizer object internally maintains a current position within the string to be tokenized. Some ...
JavaScript | hasOwnProperty() Method
22 Nov, 2021 The hasOwnProperty() method in JavaScript is used to check whether the object has the specified property as its own property. This is useful for checking if the object has inherited the property rather than being it’s own.Syntax: object.hasOwnProperty( prop ) Parameters: This method accepts single parame...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Nov, 2021" }, { "code": null, "e": 285, "s": 53, "text": "The hasOwnProperty() method in JavaScript is used to check whether the object has the specified property as its own property. This is useful for checking if the object has in...
Netstat command in Linux
24 May, 2019 Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc., Examples of some practical netstat command : -a -all : Show both listening and non-listening sockets. With the –interfaces opti...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2019" }, { "code": null, "e": 232, "s": 52, "text": "Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships ...
A beginner’s guide to joining data | by Skyler Dale | Towards Data Science
Joining data is one of the fundamental skills of data analysis. Unfortunately, it can also be a bit confusing when you’re just getting started, or when you’re making the transition from excel to SQL or Python. In this article, I’ll walk through an intuitive explanation of what it means to join data and how to do it eff...
[ { "code": null, "e": 382, "s": 172, "text": "Joining data is one of the fundamental skills of data analysis. Unfortunately, it can also be a bit confusing when you’re just getting started, or when you’re making the transition from excel to SQL or Python." }, { "code": null, "e": 502, ...
JavaScript to Calculate the nth root of a number
We are required to write a JavaScript function that calculates the nth root of a number and returns it. The code for this will be − const findNthRoot = (m, n) => { try { let negate = n % 2 == 1 && m < 0; if(negate) m = −m; let possible = Math.pow(m, 1 / n); n = Math.pow(possible, n);...
[ { "code": null, "e": 1166, "s": 1062, "text": "We are required to write a JavaScript function that calculates the nth root of a number and returns it." }, { "code": null, "e": 1194, "s": 1166, "text": "The code for this will be −" }, { "code": null, "e": 1552, "s"...
ES6 | Promises - GeeksforGeeks
25 Mar, 2022 Promises are a way to implement asynchronous programming in JavaScript(ES6 which is also known as ECMAScript-6). A Promise acts as a container for future values. Like if you order any food from any site to deliver it to your place that order record will be the promise and the food will be the value of that...
[ { "code": null, "e": 24270, "s": 24242, "text": "\n25 Mar, 2022" }, { "code": null, "e": 25793, "s": 24270, "text": "Promises are a way to implement asynchronous programming in JavaScript(ES6 which is also known as ECMAScript-6). A Promise acts as a container for future values. L...
How to Install and Configure an NTP Client and Server on Linux?
This article will help to know how to configure an NTP (Network Time Protocol) server and client on RHEL/Cent OS Linux to manage the system clock with to help of an NTP server. NPT is used to synchronize a computer’s machine’s time with another time source. In RHEL / CentOS Linux we can use NTP or OpenNTPD server, whic...
[ { "code": null, "e": 1239, "s": 1062, "text": "This article will help to know how to configure an NTP (Network Time Protocol) server and client on RHEL/Cent OS Linux to manage the system clock with to help of an NTP server." }, { "code": null, "e": 1446, "s": 1239, "text": "NPT i...
Tryit Editor v3.6 - Show Node.js
var http = require('http'); ​ http.createServer(function (req, res) { // add a HTTP header: res.writeHead(200, {'Content-Type': 'text/html'});
[ { "code": null, "e": 28, "s": 0, "text": "var http = require('http');" }, { "code": null, "e": 30, "s": 28, "text": "​" }, { "code": null, "e": 70, "s": 30, "text": "http.createServer(function (req, res) {" }, { "code": null, "e": 94, "s": 70, ...
How to set src to the img tag in html from the system drive?
To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load. With HTML, add the image source as the path of your system drive. For th...
[ { "code": null, "e": 1310, "s": 1062, "text": "To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load." },...
Linear Regression Explained. A High Level Overview of Linear... | by Jason Wong | Towards Data Science
Regression analysis is a statistical methodology that allows us to determine the strength and relationship of two variables. Regression is not limited to two variables, we could have 2 or more variables showing a relationship. The results from the regression help in predicting an unknown value depending on the relation...
[ { "code": null, "e": 741, "s": 172, "text": "Regression analysis is a statistical methodology that allows us to determine the strength and relationship of two variables. Regression is not limited to two variables, we could have 2 or more variables showing a relationship. The results from the regress...
Find any one of the multiple repeating elements in read only array | Set 2 - GeeksforGeeks
22 Oct, 2021 Given a read-only array arr[] of size N + 1, find one of the multiple repeating elements in the array where the array contains integers only between 1 and N. Note: Read-only array means that the contents of the array can’t be modified. Examples: Input: N = 5, arr[] = {1, 1, 2, 3, 5, 4} Output: 1 Explanati...
[ { "code": null, "e": 24702, "s": 24674, "text": "\n22 Oct, 2021" }, { "code": null, "e": 24938, "s": 24702, "text": "Given a read-only array arr[] of size N + 1, find one of the multiple repeating elements in the array where the array contains integers only between 1 and N. Note:...
Graph Traversals - GeeksforGeeks
15 Nov, 2018 1) Breadth First Search 2) Depth First Search 3) Prim's Minimum Spanning Tree 4) Kruskal' Minimum Spanning Tree 1) Stack 2) Queue 3) Priority Queue 4) Union Find 1) Queue 2) Stack 3) Priority Queue 4) Union Find 1) St...
[ { "code": null, "e": 27610, "s": 27582, "text": "\n15 Nov, 2018" }, { "code": null, "e": 27811, "s": 27610, "text": "1) Breadth First Search \n2) Depth First Search \n3) Prim's Minimum Spanning Tree \n4) Kruskal...
PHP mysqli_use_result() Function
The mysqli_use_result() function starts the retrieval of the resultset from the previously executed query mysqli_use_result($con) con(Mandatory) This is an object representing a connection to MySQL Server. The mysqli_use_result() function returns a result object and the boolean value false in case of an error. This fu...
[ { "code": null, "e": 2863, "s": 2757, "text": "The mysqli_use_result() function starts the retrieval of the resultset from the previously executed query" }, { "code": null, "e": 2888, "s": 2863, "text": "mysqli_use_result($con)\n" }, { "code": null, "e": 2903, "s"...
Visualizing models 101, using R. So you’ve got yourself a model, now... | by Peter Nistrup | Towards Data Science
This is (almost) a direct sequel to my previous article on “Model selection 101, using R”: (I should probably have made this a series huh?) medium.com So please check that out if you haven’t already as most examples will be using the same data and model from that analysis. That being said, this is a sequel as well as a...
[ { "code": null, "e": 312, "s": 172, "text": "This is (almost) a direct sequel to my previous article on “Model selection 101, using R”: (I should probably have made this a series huh?)" }, { "code": null, "e": 323, "s": 312, "text": "medium.com" }, { "code": null, "e"...
Display records with more than two occurrences in MySQL?
For this, you can use GROUP BY HAVING clause. Let us first create a table − mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Subject varchar(100) -> ); Query OK, 0 rows affected (0.53 sec) Insert some records in the table using insert command − mysql> insert into DemoTabl...
[ { "code": null, "e": 1138, "s": 1062, "text": "For this, you can use GROUP BY HAVING clause. Let us first create a table −" }, { "code": null, "e": 1299, "s": 1138, "text": "mysql> create table DemoTable\n -> (\n -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> Subject v...
Inter Process Communication - Pipes
Pipe is a communication medium between two or more related or interrelated processes. It can be either within one process or a communication between the child and the parent processes. Communication can also be multi-level such as communication between the parent, the child and the grand-child, etc. Communication is ac...
[ { "code": null, "e": 2381, "s": 1871, "text": "Pipe is a communication medium between two or more related or interrelated processes. It can be either within one process or a communication between the child and the parent processes. Communication can also be multi-level such as communication between ...
How to convert a string into uppercase in AngularJS?
Sometimes we may need to represent a name or a string in capital letters. To convert a string into uppercase in AngularJS, we can use the uppercase filter to change its case to uppercase. In HTML Template Binding {{uppercase_expression | uppercase}} In JavaScript $filter('uppercase')() Create a file "uppercase.html" in...
[ { "code": null, "e": 1250, "s": 1062, "text": "Sometimes we may need to represent a name or a string in capital letters. To convert a string into uppercase in AngularJS, we can use the uppercase filter to change its case to uppercase." }, { "code": null, "e": 1275, "s": 1250, "te...
How to train your deep learning models in a distributed fashion. | by Srikanth Machiraju | Towards Data Science
Deep learning algorithms are well suited for large data sets and also training deep learning networks needs large computation power. With GPUs / TPUs easily available on pay per use basis or for free (like Google collab), it is possible today to train a large neural network on cloud-like say Resnet 152 (152 layers) on ...
[ { "code": null, "e": 1156, "s": 172, "text": "Deep learning algorithms are well suited for large data sets and also training deep learning networks needs large computation power. With GPUs / TPUs easily available on pay per use basis or for free (like Google collab), it is possible today to train a ...
How to change the color of the placeholder attribute with CSS?
To change the color of the placeholder attribute with CSS, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; padding: 20px; } input { ...
[ { "code": null, "e": 1146, "s": 1062, "text": "To change the color of the placeholder attribute with CSS, the code is as follows −" }, { "code": null, "e": 1157, "s": 1146, "text": " Live Demo" }, { "code": null, "e": 1759, "s": 1157, "text": "<!DOCTYPE html>\...
jQuery | prepend() with Examples - GeeksforGeeks
30 Aug, 2021 The prepend() method is an inbuilt method in jQuery which is used to insert a specified content at the beginning of the selected element. Syntax: $(selector).prepend(content, function) Parameters: This method accept two parameters as mentioned above and described below: content: It is required paramet...
[ { "code": null, "e": 25009, "s": 24981, "text": "\n30 Aug, 2021" }, { "code": null, "e": 25148, "s": 25009, "text": "The prepend() method is an inbuilt method in jQuery which is used to insert a specified content at the beginning of the selected element. " }, { "code": nu...
The Complete Hands-On Machine Learning Crash Course | by Marco Peixeiro | Towards Data Science
Linear regression — theoryLinear regression — practiceLogistic regression — theoryLinear discriminant analysis (LDA) — theoryQuadratic discriminant analysis (QDA)— theoryLogistic regression, LDA and QDA — practiceResampling — theoryRegularization — theoryResampling and regularization — practiceDecision trees — theoryDe...
[ { "code": null, "e": 719, "s": 171, "text": "Linear regression — theoryLinear regression — practiceLogistic regression — theoryLinear discriminant analysis (LDA) — theoryQuadratic discriminant analysis (QDA)— theoryLogistic regression, LDA and QDA — practiceResampling — theoryRegularization — theory...