title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Basic Authentication in Node.js using HTTP Header | 11 Feb, 2021
Authentication of the client is the first step before starting any Application. The basic authentication in the Node.js application can be done with the help express.js framework. Express.js framework is mainly used in Node.js application because of its help in handling and routing different types of reque... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 427,
"s": 54,
"text": "Authentication of the client is the first step before starting any Application. The basic authentication in the Node.js application can be done with the help express.js frame... |
Output of Java Program | Set 9 | 19 Sep, 2018
Difficulty level : Intermediate
Predict the output of following Java Programs.
Program 1:
class Gfg{ // constructor Gfg() { System.out.println("Geeksforgeeks"); } static Gfg a = new Gfg(); //line 8 public static void main(String args[]) { Gfg b; //line 12 b... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Sep, 2018"
},
{
"code": null,
"e": 86,
"s": 54,
"text": "Difficulty level : Intermediate"
},
{
"code": null,
"e": 133,
"s": 86,
"text": "Predict the output of following Java Programs."
},
{
"code": null,
... |
Accenture Archives - GeeksforGeeks | Binary Search
Insertion Sort
N-th root of a number
Accenture Interview Experience 2021
Randomized Binary Search Algorithm
Accenture Interview Experience for Associate Software Engineer (Off-Campus) 2022
Accenture Interview Experience | Set 1 (On-Campus)
Program for replacing one digit with other
Accenture Interview Exp... | [
{
"code": null,
"e": 24144,
"s": 24130,
"text": "Binary Search"
},
{
"code": null,
"e": 24159,
"s": 24144,
"text": "Insertion Sort"
},
{
"code": null,
"e": 24181,
"s": 24159,
"text": "N-th root of a number"
},
{
"code": null,
"e": 24217,
"s": 2... |
PyQt5 – Create Paint Application | 08 Oct, 2021
There are so many options provided by Python to develop GUI application and PyQt5 is one of them. PyQt5 is cross-platform GUI toolkit, a set of python bindings for Qt v5. One can develop an interactive desktop application with so much ease because of the tools and simplicity provided by this library.
In th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 330,
"s": 28,
"text": "There are so many options provided by Python to develop GUI application and PyQt5 is one of them. PyQt5 is cross-platform GUI toolkit, a set of python bindings for Qt v5. One ... |
move() method in PyQt5 | 26 Mar, 2020
In order to move (changing the position) any widget like buttons or label move() method is used in PyQt5 application. By default, all the widgets are on top left corner therefore, there is a need of changing the position of the widgets.
Syntax : move( x, y )
Arguments : It takes two arguments :1. X co-ordi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "In order to move (changing the position) any widget like buttons or label move() method is used in PyQt5 application. By default, all the widgets are on top left corner theref... |
Python | Fetch Nearest Hospital locations using GoogleMaps API | 17 May, 2022
If you are ever curious about how you can fetch nearest places (restaurant, hospital, labs, cafe’s, etc) location using your current location, this could be achieved using Python and Google Maps API. In this article, we will use Google Maps API to find the nearest hospital’s locations using Python. The API... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 478,
"s": 53,
"text": "If you are ever curious about how you can fetch nearest places (restaurant, hospital, labs, cafe’s, etc) location using your current location, this could be achieved using Py... |
Stopwatch using C language | 20 May, 2022
Create a digital stopwatch program in C which runs on linux base system. keyboardhit() function simply stands for keyboard hit. After pressing a key it generates a signal and returns a non zero integer. In this, there are 4 loops, 1st loop for hours, 2nd for minutes, 3rd for seconds and 4th loop for mainta... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 May, 2022"
},
{
"code": null,
"e": 1062,
"s": 52,
"text": "Create a digital stopwatch program in C which runs on linux base system. keyboardhit() function simply stands for keyboard hit. After pressing a key it generates a signal an... |
Write the syntax to declare a scrollable cursor on the ORDERS DB2 table. | A SCROLLABLE CURSOR can move in both forward and backward direction. In other words, it can fetch next as well as previous rows. A SCROLLABLE CURSOR is declared
using the “SCROLL” clause in the DECLARE CURSOR.
For example, if we want to declare a SCROLLABLE CURSOR on the ORDERS table then we have to declare the cursor ... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "A SCROLLABLE CURSOR can move in both forward and backward direction. In other words, it can fetch next as well as previous rows. A SCROLLABLE CURSOR is declared\nusing the “SCROLL” clause in the DECLARE CURSOR."
},
{
"code": null,
"e": 1394,... |
How to read a single character using Scanner class in Java? | From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. By default, whitespace is considered as the delimiter (to break the data into tokens).
Scanner cl... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. By default, whitespace is cons... |
How to implement search and filtering in a REST API with Node.js and Express.js ? - GeeksforGeeks | 06 Apr, 2021
Search and filtering are very basic features that an API must possess to serve data to the client application efficiently. By handling these operations on the server-side, we can reduce the amount of processing that has to be done on the client application, thereby increasing its performance.
An extremely ... | [
{
"code": null,
"e": 25028,
"s": 25000,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 25322,
"s": 25028,
"text": "Search and filtering are very basic features that an API must possess to serve data to the client application efficiently. By handling these operations on the serv... |
Rank variable by group using Dplyr package in R - GeeksforGeeks | 17 Oct, 2021
In this article, we are going to see how to rank the variable by group using dplyr in R Programming Language.
The dplyr package in R is used to perform mutations and data manipulations in R. It is particularly useful for working with data frames and data tables. The package can be downloaded and installed... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n17 Oct, 2021"
},
{
"code": null,
"e": 24962,
"s": 24851,
"text": "In this article, we are going to see how to rank the variable by group using dplyr in R Programming Language. "
},
{
"code": null,
"e": 25216,
"s":... |
How to monitor Python files for changes? | Monitoring files for changes in any language is hard because of cross platform issues. On python, there is a widely used cross platform library called watchdog that allows watching for changes. You can install it using:
$ pip install watchdog
To watch a file called 'my_file.txt' using watchdog, you can use the simple p... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "Monitoring files for changes in any language is hard because of cross platform issues. On python, there is a widely used cross platform library called watchdog that allows watching for changes. You can install it using:"
},
{
"code": null,
"... |
How do I declare a global variable in Python class? | A global variable is a variable with global scope, meaning that it is visible and accessible throughout the program, unless shadowed. The set of all global variables is known as the global environment or global scope of the program.
We declare a variable global by using the keyword global before a variable. All variab... | [
{
"code": null,
"e": 1295,
"s": 1062,
"text": "A global variable is a variable with global scope, meaning that it is visible and accessible throughout the program, unless shadowed. The set of all global variables is known as the global environment or global scope of the program."
},
{
"code"... |
SQLite - Quick Guide | This chapter helps you understand what is SQLite, how it differs from SQL, why it is needed and the way in which it handles the applications Database.
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is one of the fastest-growing da... | [
{
"code": null,
"e": 2789,
"s": 2638,
"text": "This chapter helps you understand what is SQLite, how it differs from SQL, why it is needed and the way in which it handles the applications Database."
},
{
"code": null,
"e": 3109,
"s": 2789,
"text": "SQLite is a software library th... |
GraphFrames in Jupyter: a practical guide | by Steven Van Dorpe | Towards Data Science | Graph analysis, originally a method used in computational biology, has become a more and more prominent data analysis technique for both social network analysis (community mining and modeling author types) and recommender systems. A simple and intuitive example are the once so famous Facebook friend cluster maps, which... | [
{
"code": null,
"e": 550,
"s": 172,
"text": "Graph analysis, originally a method used in computational biology, has become a more and more prominent data analysis technique for both social network analysis (community mining and modeling author types) and recommender systems. A simple and intuitive e... |
One line function for factorial of a number | 11 Jul, 2022
Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n.
Example :
Factorial of 6 is 6 * 5 * 4 * 3 * 2 * 1 which is 720.
We can find the factorial of a number in one line with the help of Ternary operator or commonly known as Conditional operator in recursion.
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 154,
"s": 53,
"text": "Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. "
},
{
"code": null,
"e": 219,
"s": 154,
"text": "Exam... |
Sniffing using bettercap in Linux | 18 Jan, 2021
Sniffing is the process of capturing and monitoring data packets that are passed through the network. It is used to capture the data of the victim and bettercap is a powerful tool used to perform various MITM(man in the middle) attacks on a network. Also, ARP Spoofing is a type of attack in which an attack... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 450,
"s": 52,
"text": "Sniffing is the process of capturing and monitoring data packets that are passed through the network. It is used to capture the data of the victim and bettercap is a powerful... |
How to Navigate through a ResultSet using a JDBC program? | The next() method of the ResultSet interface moves the pointer/Cursor of the current ResultSet object to the next row from the current position. This method returns a boolean value. If there are no rows next to its current position this method returns false, else it returns true.
Therefore, using this method in the whi... | [
{
"code": null,
"e": 1468,
"s": 1187,
"text": "The next() method of the ResultSet interface moves the pointer/Cursor of the current ResultSet object to the next row from the current position. This method returns a boolean value. If there are no rows next to its current position this method returns f... |
How to create a Reset Button in form using HTML ? | 30 Sep, 2021
In this article, we will learn how to create a Reset Button in HTML forms. Basically, the reset button is used to reset all the form data value and set to its initial default value. In case of user entered the wrong data then the user can easily correct it by clicking on “Reset Button”.
Approach: Here is ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "In this article, we will learn how to create a Reset Button in HTML forms. Basically, the reset button is used to reset all the form data value and set to its initial default... |
TCS NQT 2020 | Trains | 29 Oct, 2020
Problem:
In one pass, Train A can start from the source station at time T[0], halt at each station for h unit of time until it reaches the last station at time T[N – 1], where N is the positive integer representing a total number of stations.
Given, Train A’s timings at each unit of time as T[] = {10.00, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Oct, 2020"
},
{
"code": null,
"e": 63,
"s": 54,
"text": "Problem:"
},
{
"code": null,
"e": 298,
"s": 63,
"text": "In one pass, Train A can start from the source station at time T[0], halt at each station for h un... |
Python program to validate an IP Address | 15 Jul, 2021
Prerequisite: Python Regex
Given an IP address as input, write a Python program to check whether the given IP Address is Valid or not.
What is an IP (Internet Protocol) Address? Every computer connected to the Internet is identified by a unique four-part string, known as its Internet Protocol (IP) address... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 80,
"s": 52,
"text": "Prerequisite: Python Regex "
},
{
"code": null,
"e": 188,
"s": 80,
"text": "Given an IP address as input, write a Python program to check whether the given... |
Matplotlib.colors.Normalize class in Python | 07 Dec, 2021
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.colors.Normalize class belongs to the matplotlib.colors module. The matplotlib... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
JavaScript | Nested Classes | 28 May, 2020
Let us try to understand, what is class. A class in JavaScript is a type of function, which can be initialized through both function keyword as well as through class keyword. In this article, we will cover the inner class in javascript through the use of a function keyword. Here’s an example of the class u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "Let us try to understand, what is class. A class in JavaScript is a type of function, which can be initialized through both function keyword as well as through class keyword. ... |
list::push_front() and list::push_back() in C++ STL | 23 Jun, 2022
Lists are containers used in C++ to store data in a non-contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and deletion operations are costlier as compared to the insertion and deletion option in Lists.
list::push_front()
push_front() function is used to pus... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 305,
"s": 53,
"text": "Lists are containers used in C++ to store data in a non-contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and deletion operat... |
How to import a class from another file in Python ? | 30 Apr, 2021
In this article, we will see How to import a class from another file in Python.
Import in Python is analogous to #include header_file in C/C++. Python modules can get access to code from another module by importing the file/function using import. The import statement is that the commonest way of invoking t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "In this article, we will see How to import a class from another file in Python."
},
{
"code": null,
"e": 469,
"s": 108,
"text": "Import in Python is analog... |
Programming Paradigms in Python | 21 Apr, 2020
Paradigm can also be termed as a method to solve some problems or do some tasks. A programming paradigm is an approach to solve the problem using some programming language or also we can say it is a method to solve a problem using tools and techniques that are available to us following some approach. There... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 635,
"s": 54,
"text": "Paradigm can also be termed as a method to solve some problems or do some tasks. A programming paradigm is an approach to solve the problem using some programming language or... |
Shift matrix elements row-wise by k | 14 Jun, 2022
Given a square matrix mat[][] and a number k. The task is to shift the first k elements of each row to the right of the matrix.
Examples :
Input : mat[N][N] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
k = 2
Output :mat[N][N] = {{3, 1, 2}
{6, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 180,
"s": 52,
"text": "Given a square matrix mat[][] and a number k. The task is to shift the first k elements of each row to the right of the matrix."
},
{
"code": null,
"e": 193,
... |
unordered_map erase in C++ STL | 24 Dec, 2018
erase function is used to erase elements from the unordered_map. There are three type of erase functions supported by unordered_map :
erasing by iterator: It takes an iterator as a parameter and erases the key and value present at that iterator.Syntaxunordered_map.erase(const iterator);erasing by key: It t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 186,
"s": 52,
"text": "erase function is used to erase elements from the unordered_map. There are three type of erase functions supported by unordered_map :"
},
{
"code": null,
"e": 691... |
Python | Tuple multiplication | 21 Nov, 2019
Sometimes, while working with records, we can have a problem in which we may need to perform multiplication of tuples. This problem can occur in day-day programming. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using zip() + generator expressionThe combination of above functi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "Sometimes, while working with records, we can have a problem in which we may need to perform multiplication of tuples. This problem can occur in day-day programming. Let’s dis... |
C Program to check Armstrong Number | 24 Jun, 2022
Given a number x, determine whether the given number is Armstrong number or not.
A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if.
abcd... = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + ....
Example:
Input: 153
Output: Yes
153 is an Armstrong number.... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 135,
"s": 53,
"text": "Given a number x, determine whether the given number is Armstrong number or not. "
},
{
"code": null,
"e": 240,
"s": 135,
"text": "A positive integer of n... |
Check if the number is balanced | 07 May, 2021
Given a number N in the form of a string, the task is to check whether the given number is balanced or not.
Balanced Number: A number is said to be balanced if the sum of digits in the first half of it is equal to the sum of the digits in the second half. Note: All Palindromic numbers are balanced numbers.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "Given a number N in the form of a string, the task is to check whether the given number is balanced or not."
},
{
"code": null,
"e": 337,
"s": 136,
"text":... |
Sort the array in a given index range | 15 Jun, 2022
Given an array arr[] of N integers and an index range [a, b]. The task is to sort the array in this given index range i.e., sort the elements of the array from arr[a] to arr[b] while keeping the positions of other elements intact and print the modified array. Note: There is no relation between a and b i.e.... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 429,
"s": 53,
"text": "Given an array arr[] of N integers and an index range [a, b]. The task is to sort the array in this given index range i.e., sort the elements of the array from arr[a] to arr[... |
Java Concurrency – yield(), sleep() and join() Methods | 16 Jan, 2022
In this article, we will learn what is yield(), join(), and sleep() methods in Java and what is the basic difference between these three. First, we will see the basic introduction of all these three methods, and then we compare these three.
We can prevent the execution of a thread by using one of the follo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jan, 2022"
},
{
"code": null,
"e": 295,
"s": 54,
"text": "In this article, we will learn what is yield(), join(), and sleep() methods in Java and what is the basic difference between these three. First, we will see the basic introdu... |
Acronym in Python | Suppose we have a string s that is representing a phrase, we have to find its acronym. The acronyms should be capitalized and should not include the word "and".
So, if the input is like "Indian Space Research Organisation", then the output will be ISRO
To solve this, we will follow these steps −
tokens:= each word of s... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "Suppose we have a string s that is representing a phrase, we have to find its acronym. The acronyms should be capitalized and should not include the word \"and\"."
},
{
"code": null,
"e": 1315,
"s": 1223,
"text": "So, if the input is... |
How do I specify different layouts for portrait and landscape orientations in Android? | This example demonstrates how do I specify different layouts for portrait and landscape orientations in android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version=... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "This example demonstrates how do I specify different layouts for portrait and landscape orientations in android"
},
{
"code": null,
"e": 1303,
"s": 1174,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Proj... |
3 Approaches To Building A Recommendation System | by Kurtis Pykes | Towards Data Science | It’s no doubt that Recommendation systems are one of the most obvious ways to enhance user experience on various platforms, as well as introduce Machine Learning into a company. Hence, many companies have been adopting the “Recommended For You” mantra that has been popularized by the likes of Amazon, Netflix and Youtub... | [
{
"code": null,
"e": 577,
"s": 172,
"text": "It’s no doubt that Recommendation systems are one of the most obvious ways to enhance user experience on various platforms, as well as introduce Machine Learning into a company. Hence, many companies have been adopting the “Recommended For You” mantra tha... |
Programmatically Build REGEX (Regular Expression) in Python for Pattern Matching | by AbdulMajedRaja RS | Towards Data Science | Regular Expression (Regex — often pronounced as ri-je-x or reg-x) is extremely useful while you are about to do Text Analytics or Natural Language Processing. But as much as Regex is useful, it’s also extremely confusing and hard to understand and always require (at least for me) multiple DDGing with click and back to ... | [
{
"code": null,
"e": 523,
"s": 172,
"text": "Regular Expression (Regex — often pronounced as ri-je-x or reg-x) is extremely useful while you are about to do Text Analytics or Natural Language Processing. But as much as Regex is useful, it’s also extremely confusing and hard to understand and always ... |
Apache Spark on Windows: A Docker approach | by Israel Siqueira | Towards Data Science | Recently I was allocated to a project where the entire customer database is in Apache Spark / Hadoop. As a standard in all my projects, I first went to prepare the development environment on the corporate laptop, which comes with Windows as standard OS. As many already know, preparing a development environment on a Win... | [
{
"code": null,
"e": 674,
"s": 172,
"text": "Recently I was allocated to a project where the entire customer database is in Apache Spark / Hadoop. As a standard in all my projects, I first went to prepare the development environment on the corporate laptop, which comes with Windows as standard OS. A... |
Binary Tree and Lowest Common Ancestor | by Shuo Wang | Towards Data Science | It is the lowest level parent shared by two nodes within a tree.
Let’s take a look at an example:
Within the above binary tree, nodes 8 and 10 are highlighted. What are their shared parents?
It’s quite obvious that the shared parents are 5, 7, and 9.
But the shared parent at the lowest level is 9, and it is referred to... | [
{
"code": null,
"e": 237,
"s": 172,
"text": "It is the lowest level parent shared by two nodes within a tree."
},
{
"code": null,
"e": 270,
"s": 237,
"text": "Let’s take a look at an example:"
},
{
"code": null,
"e": 363,
"s": 270,
"text": "Within the above bi... |
C Program to check if an Array is Palindrome or not | Given an array arr[] of any size n, our task is to find out that the array is palindrome or not. Palindrome is a sequence which can be read backwards and forward as same, like: MADAM, NAMAN, etc.
So to check an array is palindrome or not so we can traverse an array from back and forward like −
Input: arr[] = {1, 0, 0, ... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "Given an array arr[] of any size n, our task is to find out that the array is palindrome or not. Palindrome is a sequence which can be read backwards and forward as same, like: MADAM, NAMAN, etc."
},
{
"code": null,
"e": 1357,
"s": 1258,... |
Shearing in 2D Graphics | 01 Jul, 2020
Shearing deals with changing the shape and size of the 2D object along x-axis and y-axis. It is similar to sliding the layers in one direction to change the shape of the 2D object.It is an ideal technique to change the shape of an existing object in a two dimensional plane. In a two dimensional plane, the ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 430,
"s": 54,
"text": "Shearing deals with changing the shape and size of the 2D object along x-axis and y-axis. It is similar to sliding the layers in one direction to change the shape of the 2D o... |
p5.js | createVideo() Function | 26 Feb, 2020
The createVideo() function is used to create a video element in the DOM. The video is created as a p5.MediaElement, which has methods for controlling the media and its playback.
Syntax:
createVideo(src, callback)
Parameters: This function accepts two parameters as mentioned above and described below:
src: ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Feb, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "The createVideo() function is used to create a video element in the DOM. The video is created as a p5.MediaElement, which has methods for controlling the media and its playbac... |
Read SQL database table into a Pandas DataFrame using SQLAlchemy | 17 Aug, 2020
To read sql table into a DataFrame using only the table name, without executing any query we use read_sql_table() method in Pandas. This function does not support DBAPI connections.
Syntax : pandas.read_sql_table(table_name, con, schema=None, index_col=None, coerce_float=True, parse_dates=None, columns=Non... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Aug, 2020"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "To read sql table into a DataFrame using only the table name, without executing any query we use read_sql_table() method in Pandas. This function does not support DBAPI connec... |
Matplotlib.pyplot.contour() in Python | 21 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.
The contour() function in pyplot module of matplotlib library is used to plot contours.
Syntax: matplotlib.pyplo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 223,
"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... |
UDP Server-Client implementation in C | 04 May, 2022
There are two major transport layer protocols to communicate between hosts: TCP and UDP. Creating TCP Server/Client was discussed in a previous post.
Prerequisite: Creating TCP Server/Client
Theory In UDP, the client does not form a connection with the server like in TCP and instead just sends a datagram.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 205,
"s": 54,
"text": "There are two major transport layer protocols to communicate between hosts: TCP and UDP. Creating TCP Server/Client was discussed in a previous post. "
},
{
"code": n... |
p5.js | curveVertex() Function | 25 May, 2020
The curveVertex() function in p5.js is used to specify the vertex coordinates used to draw a curve. It expects 2 parameters for 2D curves and 3 parameters for 3D curves. Both the 2D and 3D modes can be used for drawing in the WebGL mode. This function can only be used between the beginShape() and endShape(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2020"
},
{
"code": null,
"e": 338,
"s": 28,
"text": "The curveVertex() function in p5.js is used to specify the vertex coordinates used to draw a curve. It expects 2 parameters for 2D curves and 3 parameters for 3D curves. Both ... |
Python | Pandas Series.count() | 15 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.count() function return the count of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Count SQL Table Column Using Python | 23 Dec, 2020
Prerequisite: Python: MySQL Create Table
In this article, we are going to see how to count the table column of a MySQL Table Using Python. Python allows the integration of a wide range of database servers with applications. A database interface is required to access a database from Python. MySQL Connector-... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 69,
"s": 28,
"text": "Prerequisite: Python: MySQL Create Table"
},
{
"code": null,
"e": 411,
"s": 69,
"text": "In this article, we are going to see how to count the table column ... |
Largest power of k in n! (factorial) where k may not be prime | 08 Jul, 2021
Given two numbers k and n, find the largest power of k that divides n! Constraints:
K > 1
Examples:
Input : n = 7, k = 2
Output : 4
Explanation : 7! = 5040
The largest power of 2 that
divides 5040 is 24.
Input : n = 10, k = 9
Output : 2
The largest power of 9 that
divides 10! is 92.
We have discus... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 140,
"s": 54,
"text": "Given two numbers k and n, find the largest power of k that divides n! Constraints: "
},
{
"code": null,
"e": 147,
"s": 140,
"text": " K > 1"
},
{
... |
Largest Number formed from an Array | Practice | GeeksforGeeks | Given a list of non negative integers, arrange them in such a manner that they form the largest number possible.The result is going to be very large, hence return the result in the form of a string.
Example 1:
Input:
N = 5
Arr[] = {3, 30, 34, 5, 9}
Output: 9534330
Explanation: Given numbers are {3, 30, 34,
5, 9}, the... | [
{
"code": null,
"e": 437,
"s": 238,
"text": "Given a list of non negative integers, arrange them in such a manner that they form the largest number possible.The result is going to be very large, hence return the result in the form of a string."
},
{
"code": null,
"e": 449,
"s": 437,
... |
Get contents of entire page using Selenium | 25 Feb, 2021
In this article, we will discuss ways to get the contents of the entire page using Selenium. There can broadly be two methods for the same. Let’s discuss them in detail.
For extracting the visible text from the entire page, we can use the find_element_by_* methods which help us find or locate the elements ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 198,
"s": 28,
"text": "In this article, we will discuss ways to get the contents of the entire page using Selenium. There can broadly be two methods for the same. Let’s discuss them in detail."
},... |
Johnson’s algorithm for All-pairs shortest paths | Implementation | 12 Oct, 2018
Given a weighted Directed Graph where the weights may be negative, find the shortest path between every pair of vertices in the Graph using Johnson’s Algorithm.
The detailed explanation of Johnson’s algorithm has already been discussed in the previous post.
Refer: Johnson’s algorithm for All-pairs shortest... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Oct, 2018"
},
{
"code": null,
"e": 215,
"s": 54,
"text": "Given a weighted Directed Graph where the weights may be negative, find the shortest path between every pair of vertices in the Graph using Johnson’s Algorithm."
},
{
... |
Program to convert given number of days in terms of Years, Weeks and Days | 30 Jun, 2021
Given number of days, convert it in terms of Years, Week and Days.
Examples :
Input : 30
Output : years = 0
week = 4
days = 2
Input : 20
Output : years = 0
week = 2
days = 6
Approach :
Number of years will be the quotient when number of days will be divided by 365 i.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 119,
"s": 52,
"text": "Given number of days, convert it in terms of Years, Week and Days."
},
{
"code": null,
"e": 131,
"s": 119,
"text": "Examples : "
},
{
"code": null... |
How to store XML data into a MySQL database using Python? | 27 Mar, 2021
In this article, we are going to store XML data into the MySQL database using python through XAMPP server. So we are taking student XML data and storing the values into the database.
XAMPP server: It is a cross-platform web server used to develop and test programs on a local server. It is developed and man... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Mar, 2021"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "In this article, we are going to store XML data into the MySQL database using python through XAMPP server. So we are taking student XML data and storing the values into the da... |
Topological Sort of a graph using departure time of vertex | 04 Jul, 2022
Given a Directed Acyclic Graph (DAG), find Topological Sort of the graph.
Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph is not ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 128,
"s": 54,
"text": "Given a Directed Acyclic Graph (DAG), find Topological Sort of the graph."
},
{
"code": null,
"e": 368,
"s": 128,
"text": "Topological sorting for Directe... |
Node.js path.delimiter Property | 11 Oct, 2021
The path.delimiter property is an inbuilt application programming interface of the path module which is used to get platform-specific path delimiter.
Syntax:
path.delimiter;
Return Value: This property returns a string that represents platform specific path delimiter. The returned value is : for POSIX and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 178,
"s": 28,
"text": "The path.delimiter property is an inbuilt application programming interface of the path module which is used to get platform-specific path delimiter."
},
{
"code": nul... |
Running PyTorch on TPU: a bag of tricks | by Zahar Chikishev | Towards Data Science | At the time of writing these lines running PyTorch code on TPUs is not a well-trodden path. Naturally, TPUs have been optimized for and mainly used with TensorFlow. But Kaggle and Google distribute free TPU time on some of its competitions, and one doesn’t simply change his favorite framework, so this is a memo on my (... | [
{
"code": null,
"e": 566,
"s": 172,
"text": "At the time of writing these lines running PyTorch code on TPUs is not a well-trodden path. Naturally, TPUs have been optimized for and mainly used with TensorFlow. But Kaggle and Google distribute free TPU time on some of its competitions, and one doesn’... |
MySQL query to select maximum and minimum salary row? | For this, use sub query along with MIN() and MAX(). To display both the maximum and minimum value, use UNION ALL. Let us first create a table −
mysql> create table DemoTable
-> (
-> EmployeeName varchar(20),
-> EmployeeSalary int
-> );
Query OK, 0 rows affected (0.70 sec)
Insert some records in the table us... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "For this, use sub query along with MIN() and MAX(). To display both the maximum and minimum value, use UNION ALL. Let us first create a table −"
},
{
"code": null,
"e": 1347,
"s": 1206,
"text": "mysql> create table DemoTable\n -> (... |
What is spread Operator (...) in JavaScript? | With Spread Operator, allow the expression to expand to multiple arguments, elements, variables, etc.
You can try to run the following code to learn how to work with spread operator −
<html>
<body>
<script>
var a, b, c,d, e, f, g;
a = [10,20];
b = "rank";
c = [30,"points"]... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "With Spread Operator, allow the expression to expand to multiple arguments, elements, variables, etc."
},
{
"code": null,
"e": 1246,
"s": 1164,
"text": "You can try to run the following code to learn how to work with spread operator ... |
Print Linked List elements | Practice | GeeksforGeeks | Given a linked list. Print all the elements of the linked list.
Example 1:
Input:
N=2
LinkedList={1 , 2}
Output:
1 2
Explanation:
The linked list contains two
elements 1 and 2.The elements
are printed in a single line.
Example 2:
Input:
N = 3
Linked List = { 49, 10, 30}
Output:
49 10 30
Explanation:
The linked list ... | [
{
"code": null,
"e": 290,
"s": 226,
"text": "Given a linked list. Print all the elements of the linked list."
},
{
"code": null,
"e": 301,
"s": 290,
"text": "Example 1:"
},
{
"code": null,
"e": 447,
"s": 301,
"text": "Input:\nN=2\nLinkedList={1 , 2}\nOutput:\n... |
Find missing numbers in a sorted list range in Python | Given a list with sorted numbers, we want to find out which numbers are missing from the given range of numbers.
we can design a for loop to check for the range of numbers and use an if condition with the not in operator to check for the missing elements.
Live Demo
listA = [1,5,6, 7,11,14]
# Original list
print("Give... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "Given a list with sorted numbers, we want to find out which numbers are missing from the given range of numbers."
},
{
"code": null,
"e": 1318,
"s": 1175,
"text": "we can design a for loop to check for the range of numbers and use an... |
Closest Pair of Points Problem | In this problem, a set of n points are given on the 2D plane. In this problem, we have to find the pair of points, whose distance is minimum.
To solve this problem, we have to divide points into two halves, after that smallest distance between two points is calculated in a recursive way. Using distances from the middle... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "In this problem, a set of n points are given on the 2D plane. In this problem, we have to find the pair of points, whose distance is minimum."
},
{
"code": null,
"e": 1645,
"s": 1204,
"text": "To solve this problem, we have to divide... |
Determine when a Frame or Window is Opened in Java | To determine when a Window is opened in Java, use the WindowListener, which is the listener interface for receiving window events..
WindowListener listener = new WindowAdapter() {
public void windowOpened(WindowEvent evt) {
Frame frame = (Frame) evt.getSource();
System.out.println("Opened "+frame.getTitl... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "To determine when a Window is opened in Java, use the WindowListener, which is the listener interface for receiving window events.."
},
{
"code": null,
"e": 1396,
"s": 1194,
"text": "WindowListener listener = new WindowAdapter() {\n ... |
Automatically Update Data Sources in Python | by Joe T. Santhanavanich | Towards Data Science | In Data Sciences, several times, you get an external data source such as a csv table for your Python project from the open-source website or git repository. Some of these datasets may update periodically. Then, you might end up with open a web browser to download that dataset before running your Python script to get th... | [
{
"code": null,
"e": 638,
"s": 172,
"text": "In Data Sciences, several times, you get an external data source such as a csv table for your Python project from the open-source website or git repository. Some of these datasets may update periodically. Then, you might end up with open a web browser to ... |
Program to remove HTML tags from a given String - GeeksforGeeks | 11 Feb, 2022
Given a string str which contains some HTML tags, the task is to remove all the tags present in the given string str.Examples:
Input: str = “<div><b>Geeks for Geeks</b></div>” Output: Geeks for GeeksInput: str = “<a href=”https://www.geeksforgeeks.org/”>GFG</a>” Output: GFG
Approach: The idea is to u... | [
{
"code": null,
"e": 24773,
"s": 24745,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 24902,
"s": 24773,
"text": "Given a string str which contains some HTML tags, the task is to remove all the tags present in the given string str.Examples: "
},
{
"code": null,
"e... |
Material Design Lite - Tabs | The Material Design Lite (MDL) tab component is a user interface component which helps to show multiple screens in a single space in an exclusive manner.
MDL provides various CSS classes to apply various predefined visual and behavioral enhancements to the tabs. The following table mentions the available classes and th... | [
{
"code": null,
"e": 2040,
"s": 1886,
"text": "The Material Design Lite (MDL) tab component is a user interface component which helps to show multiple screens in a single space in an exclusive manner."
},
{
"code": null,
"e": 2219,
"s": 2040,
"text": "MDL provides various CSS cla... |
Tryit Editor v3.6 - Show Node.js | var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'}); | [
{
"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) {"
}
] |
Complex Numbers in Java | Complex numbers are those that have an imaginary part and a real part associated with it. They can
be added and subtracted like regular numbers. The real parts and imaginary parts are respectively
added or subtracted or even multiplied and divided.
Live Demo
public class Demo{
double my_real;
double my_imag;
... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "Complex numbers are those that have an imaginary part and a real part associated with it. They can\nbe added and subtracted like regular numbers. The real parts and imaginary parts are respectively\nadded or subtracted or even multiplied and divided."
... |
How to Build an AutoML App in Python | by Chanin Nantasenamat | Towards Data Science | Automated machine learning (AutoML) helps to lower the barrier to entry for machine learning model building by streamlining the process thereby allowing non-technical users to harness the power of machine learning. On the other hand, the availability of AutoML also helps to free up the time of data scientists (that the... | [
{
"code": null,
"e": 669,
"s": 171,
"text": "Automated machine learning (AutoML) helps to lower the barrier to entry for machine learning model building by streamlining the process thereby allowing non-technical users to harness the power of machine learning. On the other hand, the availability of A... |
Ethical Hacking - Metasploit | Metasploit is one of the most powerful exploit tools. Most of its resources can be found at: https://www.metasploit.com. It comes in two versions − commercial and free edition. There are no major differences in the two versions, so in this tutorial, we will be mostly using the Community version (free) of Metasploit.
As... | [
{
"code": null,
"e": 2797,
"s": 2479,
"text": "Metasploit is one of the most powerful exploit tools. Most of its resources can be found at: https://www.metasploit.com. It comes in two versions − commercial and free edition. There are no major differences in the two versions, so in this tutorial, we ... |
First Fit algorithm in Memory Management using Linked List - GeeksforGeeks | 25 Nov, 2021
First Fit Algorithm for Memory Management: The first memory partition which is sufficient to accommodate the process is allocated.We have already discussed first fit algorithm using arrays in this article. However, here we are going to look into another approach using a linked list where the deletion of al... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 24651,
"s": 24301,
"text": "First Fit Algorithm for Memory Management: The first memory partition which is sufficient to accommodate the process is allocated.We have already discussed first f... |
C program to find out the maximum value of AND, OR, and XOR operations that are less than a given value | Suppose we are given two integers k and n. Our task is to perform three operations; bitwise AND, bitwise OR, and bitwise XOR between all pairs of numbers up to range n. We return the maximum value of all three operations between any two pairs of numbers that is less than the given value k.
So, if the input is like n = ... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "Suppose we are given two integers k and n. Our task is to perform three operations; bitwise AND, bitwise OR, and bitwise XOR between all pairs of numbers up to range n. We return the maximum value of all three operations between any two pairs of numbers... |
HTML - <bdo> Tag | The HTML <bdo> tag is used to override the default text direction.
<!DOCTYPE html>
<html>
<head>
<title>HTML bdo Tag</title>
</head>
<body>
<bdo dir = "rtl">Here's some English embedded in text in another language
requiring a right-to-left presentation.</bdo>
</body>
</html>
This wil... | [
{
"code": null,
"e": 2441,
"s": 2374,
"text": "The HTML <bdo> tag is used to override the default text direction."
},
{
"code": null,
"e": 2686,
"s": 2441,
"text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML bdo Tag</title>\n </head>\n\n <body>\n <bdo dir = ... |
SQL query using COUNT and HAVING clause - GeeksforGeeks | 07 Apr, 2020
Consider a table STUDENT having the following schema:
STUDENT (Student_id, Student_Name, Address, Marks)
Student_id is the primary column of STUDENT table.
Let first create the table structure with CREATE Command in SQL:
CREATE TABLE STUDENT
(STUDENT_ID NUMBER (4),
STUDENT_NAME VARCHAR2 (20),
ADDRESS V... | [
{
"code": null,
"e": 23994,
"s": 23966,
"text": "\n07 Apr, 2020"
},
{
"code": null,
"e": 24048,
"s": 23994,
"text": "Consider a table STUDENT having the following schema:"
},
{
"code": null,
"e": 24100,
"s": 24048,
"text": "STUDENT (Student_id, Student_Name, A... |
How to use spread operator to join two or more arrays in JavaScript? | Two join two or more arrays we have a built-in method called array.concat(). But we can join arrays much more easily by using spread operator.
var merged = [...arr1, ...arr2];
Lets' try to merge arrays without spread operator.
In the following example, instead of the spread operator, array.concat() method is used to jo... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "Two join two or more arrays we have a built-in method called array.concat(). But we can join arrays much more easily by using spread operator."
},
{
"code": null,
"e": 1238,
"s": 1205,
"text": "var merged = [...arr1, ...arr2];"
},
... |
Running Airflow with Docker on EC2 + CI/CD with GitLab | by Ammar Chalifah | Towards Data Science | I’ve been learning data science for a year, yet until several weeks ago I still found myself completely clueless on the engineering side. Data analysis and artificial intelligence are stuff on the top of the pyramid, which requires strong data pipeline foundation. With this post, I will share my lessons learned while t... | [
{
"code": null,
"e": 749,
"s": 171,
"text": "I’ve been learning data science for a year, yet until several weeks ago I still found myself completely clueless on the engineering side. Data analysis and artificial intelligence are stuff on the top of the pyramid, which requires strong data pipeline fo... |
String tokenisation function in C | In this section, we will see how to tokenize strings in C. The C has library function for this. The C library function char *strtok(char *str, const char *delim) breaks string str into a series of tokens using the delimiter delim.
Following is the declaration for strtok() function.
char *strtok(char *str, const char *d... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "In this section, we will see how to tokenize strings in C. The C has library function for this. The C library function char *strtok(char *str, const char *delim) breaks string str into a series of tokens using the delimiter delim."
},
{
"code": ... |
How to automate drag & drop functionality using Selenium WebDriver Java? | The drag and drop action is done with the help of a mouse. It happens when we drag and then place an element from one place to another. This is a common scenario when we try to move a file from one folder to another by simply drag and drop action.
Selenium uses the Actions class to perform the drag drop action. The dra... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "The drag and drop action is done with the help of a mouse. It happens when we drag and then place an element from one place to another. This is a common scenario when we try to move a file from one folder to another by simply drag and drop action."
},... |
What are the benefits of a module in Java 9? | An important feature introduced in Java 9 is Module. By using a module, we can divide the code into smaller components called modules. It means each module has its own responsibility and declare its dependency on other modules to work correctly.
Below are the steps to create a modular project in Java 9:
Initially, we c... | [
{
"code": null,
"e": 1308,
"s": 1062,
"text": "An important feature introduced in Java 9 is Module. By using a module, we can divide the code into smaller components called modules. It means each module has its own responsibility and declare its dependency on other modules to work correctly."
},
... |
PostgreSQL - DATE/TIME Functions and Operators | We had discussed about the Date/Time data types in the chapter Data Types. Now, let us see the Date/Time operators and Functions.
The following table lists the behaviors of the basic arithmetic operators −
The following is the list of all important Date and Time related functions available.
Subtract arguments
Current d... | [
{
"code": null,
"e": 2955,
"s": 2825,
"text": "We had discussed about the Date/Time data types in the chapter Data Types. Now, let us see the Date/Time operators and Functions."
},
{
"code": null,
"e": 3031,
"s": 2955,
"text": "The following table lists the behaviors of the basic... |
Flask â HTTP methods | Http protocol is the foundation of data communication in world wide web. Different methods of data retrieval from specified URL are defined in this protocol.
The following table summarizes different http methods −
GET
Sends data in unencrypted form to the server. Most common method.
HEAD
Same as GET, but without respon... | [
{
"code": null,
"e": 2191,
"s": 2033,
"text": "Http protocol is the foundation of data communication in world wide web. Different methods of data retrieval from specified URL are defined in this protocol."
},
{
"code": null,
"e": 2247,
"s": 2191,
"text": "The following table summ... |
Hidden Markov Model — Implemented from scratch | by Oleg Żero | Towards Data Science | I want to expand this work into a series of μ-tutorial videos. If you’re interested, please subscribe to my newsletter to stay in touch.
The Internet is full of good articles that explain the theory behind the Hidden Markov Model (HMM) well (e.g. 1, 2, 3 and 4). However, many of these works contain a fair amount of rat... | [
{
"code": null,
"e": 309,
"s": 172,
"text": "I want to expand this work into a series of μ-tutorial videos. If you’re interested, please subscribe to my newsletter to stay in touch."
},
{
"code": null,
"e": 732,
"s": 309,
"text": "The Internet is full of good articles that explai... |
Output of C programs | Set 43 - GeeksforGeeks | 28 Aug, 2017
1. What is the output of following program?
#include <stdio.h>int main(){ int a = 1, b = 2, c = 3; c = a == b; printf("%d", c); return 0;}
Choose the correct answer:(A) 0(B) 1(C) 2(D) 3
Answer : (A)
Explanation :“==” is relational operator which returns only two values, either 0 or 1.0: If a ==... | [
{
"code": null,
"e": 24173,
"s": 24145,
"text": "\n28 Aug, 2017"
},
{
"code": null,
"e": 24217,
"s": 24173,
"text": "1. What is the output of following program?"
},
{
"code": "#include <stdio.h>int main(){ int a = 1, b = 2, c = 3; c = a == b; printf(\"%d\", c); ... |
Python | Merge first and last elements separately in a list - GeeksforGeeks | 07 Jun, 2019
Given a list of lists, where each sublist consists of only two elements, write a Python program to merge the first and last element of each sublist separately and finally, output a list of two sub-lists, one containing all first elements and other containing all last elements.
Examples:
Input : [['x', 'y']... | [
{
"code": null,
"e": 24236,
"s": 24208,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 24514,
"s": 24236,
"text": "Given a list of lists, where each sublist consists of only two elements, write a Python program to merge the first and last element of each sublist separately and ... |
Perceptron: Explanation, Implementation and a Visual Example | by Dorian Lazar | Towards Data Science | The perceptron is the building block of artificial neural networks, it is a simplified model of the biological neurons in our brain. A perceptron is the simplest neural network, one that is comprised of just one neuron. The perceptron algorithm was invented in 1958 by Frank Rosenblatt.
Below is an illustration of a bio... | [
{
"code": null,
"e": 458,
"s": 171,
"text": "The perceptron is the building block of artificial neural networks, it is a simplified model of the biological neurons in our brain. A perceptron is the simplest neural network, one that is comprised of just one neuron. The perceptron algorithm was invent... |
Prototype - Form.Element getValue() Method | This method returns the current value of a form control. A string is returned for most controls; only multiple select boxes return an array of values. The global shortcut for this method is $F().
formElement.getValue();
It returns a string or array of strings.
Following is the example to show how a control receives fo... | [
{
"code": null,
"e": 2257,
"s": 2061,
"text": "This method returns the current value of a form control. A string is returned for most controls; only multiple select boxes return an array of values. The global shortcut for this method is $F()."
},
{
"code": null,
"e": 2282,
"s": 2257,... |
HTML DOM MouseEvent clientX Property | The HTML DOM MouseEvent clientX property returns the horizontal (x) coordinate of the mouse pointer if a mouse event was triggered. Use with clientY to get the vertical coordinate as well.
Following is the syntax −
Returning reference to the clientX object
MouseEventObject.clientX
Let us see an example of MouseEvent cl... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "The HTML DOM MouseEvent clientX property returns the horizontal (x) coordinate of the mouse pointer if a mouse event was triggered. Use with clientY to get the vertical coordinate as well."
},
{
"code": null,
"e": 1277,
"s": 1251,
"t... |
Preorder Traversal | Practice | GeeksforGeeks | Given a binary tree, find its preorder traversal.
Example 1:
Input:
1
/
4
/ \
4 2
Output: 1 4 4 2
Example 2:
Input:
6
/ \
3 2
\ /
1 2
Output: 6 3 1 2 2
Your Task:
You just have to complete the function preorder() which takes th... | [
{
"code": null,
"e": 276,
"s": 226,
"text": "Given a binary tree, find its preorder traversal."
},
{
"code": null,
"e": 287,
"s": 276,
"text": "Example 1:"
},
{
"code": null,
"e": 378,
"s": 287,
"text": "Input:\n 1 \n / \n 4 \n ... |
Detect Cycle in a an Undirected Graph | To detect if there is any cycle in the undirected graph or not, we will use the DFS traversal for the given graph. For every visited vertex v, when we have found any adjacent vertex u, such that u is already visited, and u is not the parent of vertex v. Then one cycle is detected.
We will assume that there are no para... | [
{
"code": null,
"e": 1345,
"s": 1062,
"text": "To detect if there is any cycle in the undirected graph or not, we will use the DFS traversal for the given graph. For every visited vertex v, when we have found any adjacent vertex u, such that u is already visited, and u is not the parent of vertex v.... |
How to delete the local group from the windows system using PowerShell? | To delete the local group from the windows system using PowerShell, you need to use the RemoveLocalGroup command as shown below.
Remove-LocalGroup -Name TestGroup
In the above example, the local group name TestGroup will be removed from the local system. To remove the local group from the remote systems, we can use Inv... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "To delete the local group from the windows system using PowerShell, you need to use the RemoveLocalGroup command as shown below."
},
{
"code": null,
"e": 1225,
"s": 1191,
"text": "Remove-LocalGroup -Name TestGroup"
},
{
"code... |
How to create a Number Input using jQuery Mobile ? - GeeksforGeeks | 14 Dec, 2020
jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops In this article, we will be creating a number input area using jQuery Mobile.
Approach: Add jQuery Mobile scripts needed for your project.
<link rel=”stylesheet” href=”http:... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 25967,
"s": 25755,
"text": "jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops In this article, we will be c... |
Stringize and Token-pasting operator in C | In this section we will see what are the Stringize operator and Token Pasting operator in C. The Stringize operator is a preprocessor operator. It sends commands to compiler to convert a token into string. We use this operator at the macro definition.
Using stringize operator we can convert some text into string withou... | [
{
"code": null,
"e": 1314,
"s": 1062,
"text": "In this section we will see what are the Stringize operator and Token Pasting operator in C. The Stringize operator is a preprocessor operator. It sends commands to compiler to convert a token into string. We use this operator at the macro definition."
... |
Dynamic ScrollView in Kotlin - GeeksforGeeks | 18 Feb, 2021
In Android ScrollView incorporates multiple views within itself and allows them to be scrolled.
In this article we will be discussing how to programmatically create a Scroll view in Kotlin .
Let’s start by first creating a project in Android Studio. To do so, follow these instructions:
Click on File, then ... | [
{
"code": null,
"e": 24036,
"s": 24008,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 24132,
"s": 24036,
"text": "In Android ScrollView incorporates multiple views within itself and allows them to be scrolled."
},
{
"code": null,
"e": 24227,
"s": 24132,
"te... |
Java - The Collection Algorithms | The collections framework defines several algorithms that can be applied to collections and maps.
These algorithms are defined as static methods within the Collections class. Several of the methods can throw a ClassCastException, which occurs when an attempt is made to compare incompatible types, or an UnsupportedOpera... | [
{
"code": null,
"e": 2475,
"s": 2377,
"text": "The collections framework defines several algorithms that can be applied to collections and maps."
},
{
"code": null,
"e": 2787,
"s": 2475,
"text": "These algorithms are defined as static methods within the Collections class. Several... |
Max Sum Subarray of size K | Practice | GeeksforGeeks | Given an array of integers Arr of size N and a number K. Return the maximum sum of a subarray of size K.
Example 1:
Input:
N = 4, K = 2
Arr = [100, 200, 300, 400]
Output:
700
Explanation:
Arr3 + Arr4 =700,
which is maximum.
Example 2:
Input:
N = 4, K = 4
Arr = [100, 200, 300, 400]
Output:
1000
Explanation:
Arr1 + ... | [
{
"code": null,
"e": 343,
"s": 238,
"text": "Given an array of integers Arr of size N and a number K. Return the maximum sum of a subarray of size K."
},
{
"code": null,
"e": 356,
"s": 345,
"text": "Example 1:"
},
{
"code": null,
"e": 465,
"s": 356,
"text": "I... |
Rotating a 2-D (transposing a matrix) in JavaScript | The transpose of a matrix (2-D array) is simply a flipped version of the original matrix (2-D
array). We can transpose a matrix (2-D array) by switching its rows with its columns.
The code for this will be −
const arr = [
[1, 1, 1],
[2, 2, 2],
[3, 3, 3],
];
const transpose = arr => {
for (let i = 0; i < arr... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "The transpose of a matrix (2-D array) is simply a flipped version of the original matrix (2-D\narray). We can transpose a matrix (2-D array) by switching its rows with its columns."
},
{
"code": null,
"e": 1270,
"s": 1242,
"text": "T... |
How to edit the style of a heading in Treeview (Python ttk)? | Python Treeview widget is introduced for creating a Table look-like GUI in application. It includes many inbuilt features and functions which can be used to configure the properties. However, to configure the style of a tkinter widget, we generally refer to use ttk themed widget. This allows you to edit the style such ... | [
{
"code": null,
"e": 1474,
"s": 1062,
"text": "Python Treeview widget is introduced for creating a Table look-like GUI in application. It includes many inbuilt features and functions which can be used to configure the properties. However, to configure the style of a tkinter widget, we generally refe... |
wxPython - ListBox & ListCtrl Class | A wx.ListBox widget presents a vertically scrollable list of strings. By default, a single item in the list is selectable. However, it can be customized to be multi-select.
ListCtrl widget is a highly enhanced list display and selection tool. List of more than one column can be displayed in Report view, List view or Ic... | [
{
"code": null,
"e": 2055,
"s": 1882,
"text": "A wx.ListBox widget presents a vertically scrollable list of strings. By default, a single item in the list is selectable. However, it can be customized to be multi-select."
},
{
"code": null,
"e": 2211,
"s": 2055,
"text": "ListCtrl ... |
Difference between One-way Binding and Two-way Binding - GeeksforGeeks | 22 Jul, 2021
In this article, we will learn the concept of data binding in Angular. We will also explore its types & examine the differences between one-way binding and two-way binding in angular.
Data binding is a way to synchronise the data between the model and view components automatically. AngularJS implements da... | [
{
"code": null,
"e": 25197,
"s": 25169,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 25382,
"s": 25197,
"text": "In this article, we will learn the concept of data binding in Angular. We will also explore its types & examine the differences between one-way binding and two-way... |
ES6 - constructor () | Javascript Boolean constructor() method returns a reference to the Boolean function that created the instance's prototype.
Use the following syntax to create a Boolean constructor() method. It returns the function that created this object's instance.
boolean.constructor()
<html>
<head>
<title>JavaScript const... | [
{
"code": null,
"e": 2400,
"s": 2277,
"text": "Javascript Boolean constructor() method returns a reference to the Boolean function that created the instance's prototype."
},
{
"code": null,
"e": 2528,
"s": 2400,
"text": "Use the following syntax to create a Boolean constructor() ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.