title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Python 3 - os.makedirs() Method
The method makedirs() is recursive directory creation function. Like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory. The default mode is 0o777 (octal). On some systems, mode is ignored. Where it is used, the current umask value is first masked out. If exist_ok is False (the d...
[ { "code": null, "e": 2501, "s": 2340, "text": "The method makedirs() is recursive directory creation function. Like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory." }, { "code": null, "e": 2633, "s": 2501, "text": "The default mode is 0...
Find maximum sum of triplets in an array such than i < j < k and a[i] < a[j] < a[k] in C++
With respect of a given array of positive integers of size n, our task to determine the maximum sum of triplet ( ai + aj + ak ) such that 0 <= i < j < k < n and ai< aj< ak. a[] = 3 6 4 2 5 10 19 All possible triplets are:- 3 4 5 => sum = 12 3 6 10 => sum = 19 3 4 10 => sum = 17 4 5 10 => sum = 19 2 5 10 => sum = 17 Max...
[ { "code": null, "e": 1235, "s": 1062, "text": "With respect of a given array of positive integers of size n, our task to determine the maximum\nsum of triplet ( ai + aj + ak ) such that 0 <= i < j < k < n and ai< aj< ak." }, { "code": null, "e": 1254, "s": 1235, "text": "a[] = 3 ...
How to close or hide the virtual keyboard on Android?
In Android there are some situations, we should close android default keyboard forcefully. For that this example is help for you. 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.x...
[ { "code": null, "e": 1192, "s": 1062, "text": "In Android there are some situations, we should close android default keyboard forcefully. For that this example is help for you." }, { "code": null, "e": 1321, "s": 1192, "text": "Step 1 − Create a new project in Android Studio, go ...
Vectors with Uniformly Spaced Elements
MATLAB allows you to create a vector with uniformly spaced elements. To create a vector v with the first element f, last element l, and the difference between elements is any real number n, we write − v = [f : n : l] Create a script file with the following code − v = [1: 2: 20]; sqv = v.^2; disp(v); disp(sqv); When yo...
[ { "code": null, "e": 2210, "s": 2141, "text": "MATLAB allows you to create a vector with uniformly spaced elements." }, { "code": null, "e": 2342, "s": 2210, "text": "To create a vector v with the first element f, last element l, and the difference between elements is any real nu...
Abstract base classes and how to use them in your data science project | by Sebastian Dick | Towards Data Science
Have you ever encountered code like this and wondered what’s so abstract about these classes and methods? Well, I’m about to show you! If you stick around long enough I will also share a little trick that you can use to automate unit testing across your classes. One key concept of object-oriented programming (OOP) is i...
[ { "code": null, "e": 307, "s": 172, "text": "Have you ever encountered code like this and wondered what’s so abstract about these classes and methods? Well, I’m about to show you!" }, { "code": null, "e": 435, "s": 307, "text": "If you stick around long enough I will also share a...
How to count the number of columns in a table in Selenium with python?
We can count the number of columns in a table in Selenium. The headers of a table are represented by <th> tag in html and always in the first row of the table. The rows are identified with <tr> tag in html. The total count of the number of column headers is mostly equal to the total number of columns. A <th> tag’s pare...
[ { "code": null, "e": 1407, "s": 1062, "text": "We can count the number of columns in a table in Selenium. The headers\nof a table are represented by <th> tag in html and always in the first row of the\ntable. The rows are identified with <tr> tag in html. The total count of the number\nof column hea...
Jackson Annotations - Mixin
Mixin Annotation is a way to associate annotations without modifying the target class. See the example below − import java.io.IOException; import com.fasterxml.jackson.annotation.JsonIgnoreType; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; public class Jacks...
[ { "code": null, "e": 2586, "s": 2475, "text": "Mixin Annotation is a way to associate annotations without modifying the target class. See the example below −" }, { "code": null, "e": 3937, "s": 2586, "text": "import java.io.IOException;\n\nimport com.fasterxml.jackson.annotation....
How to Share Image of Your App with Another App in Android? - GeeksforGeeks
12 Mar, 2021 Most of the time while using an app we want to share images from the app to another app. While using Many Social Media Platforms we find this feature to be very useful when we want to share information from one app to another. The Android Intent resolver is used when sending data to another app as part of ...
[ { "code": null, "e": 25140, "s": 25112, "text": "\n12 Mar, 2021" }, { "code": null, "e": 25590, "s": 25140, "text": "Most of the time while using an app we want to share images from the app to another app. While using Many Social Media Platforms we find this feature to be very us...
Difference between "blank" and "_blank" target attributes in HTML - GeeksforGeeks
03 Aug, 2021 If you have ever noticed on the website that few links got opened either in a new tab or in a new window or sometimes, it might also happen that in some websites, click on the link, for the first time, it will open in a new tab & that particular open tab will update & reused every time whenever we click to...
[ { "code": null, "e": 24919, "s": 24891, "text": "\n03 Aug, 2021" }, { "code": null, "e": 25602, "s": 24919, "text": "If you have ever noticed on the website that few links got opened either in a new tab or in a new window or sometimes, it might also happen that in some websites, ...
R - CSV Files
In R, we can read data from files stored outside the R environment. We can also write data into files which will be stored and accessed by the operating system. R can read and write into various file formats like csv, excel, xml etc. In this chapter we will learn to read data from a csv file and then write data into a ...
[ { "code": null, "e": 2636, "s": 2402, "text": "In R, we can read data from files stored outside the R environment. We can also write data into files which will be stored and accessed by the operating system. R can read and write into various file formats like csv, excel, xml etc." }, { "code...
Groovy - pop()
Removes the last item from this List. Object pop() None The popped value from the list. Following is an example of the usage of this method − class Example { static void main(String[] args) { def lst = [11, 12, 13, 14]; println(lst.pop()); println(lst); } } When we run the above program...
[ { "code": null, "e": 2276, "s": 2238, "text": "Removes the last item from this List." }, { "code": null, "e": 2291, "s": 2276, "text": "Object pop() \n" }, { "code": null, "e": 2296, "s": 2291, "text": "None" }, { "code": null, "e": 2328, "s": ...
Create your Professional/Educational resume using LaTeX | by Ridham Dave | Towards Data Science
A resume can be considered your first impression in front of your employer. A resume is the most suitable means of announcing your claim that you are the perfect choice for the position to your prospects employer. In this tutorial, I would like to demonstrate the use of the LaTeX environment to create a well organized ...
[ { "code": null, "e": 543, "s": 172, "text": "A resume can be considered your first impression in front of your employer. A resume is the most suitable means of announcing your claim that you are the perfect choice for the position to your prospects employer. In this tutorial, I would like to demonst...
GATE | GATE-CS-2009 | Question 33 - GeeksforGeeks
28 Jun, 2021 The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while test-and-set(X) ; } void leave_CS(X) { X = 0; } In the above solution, X is a memory location associated with the CS and is initialized ...
[ { "code": null, "e": 24570, "s": 24542, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24709, "s": 24570, "text": "The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:" }, { "code": nu...
Polymer - Custom Elements
Polymer is a framework that allows creating custom elements using standard HTML elements. Custom web elements provide the following features − It provides custom element name with associating class. It provides custom element name with associating class. When you change the state of custom element instance, it will req...
[ { "code": null, "e": 1883, "s": 1740, "text": "Polymer is a framework that allows creating custom elements using standard HTML elements. Custom web elements provide the following features −" }, { "code": null, "e": 1939, "s": 1883, "text": "It provides custom element name with as...
Tryit Editor v3.7
Tryit: HTML image size
[]
Find the Sum of the series 1, 2, 3, 6, 9, 18, 27, 54, ... till N terms - GeeksforGeeks
13 Jan, 2022 Given a number N, the task is to find the sum of the below series till N terms. Examples: Input: N = 8 Output: 201 1 + 2 + 3 + 6 + 9 + 18 + 27 + 54 + 81 = 201Input: N = 12 Output: 1821 1 + 2 + 3 + 6 + 9 + 18 + 27 + 54 + 81 + 162 + 243 + 486 + 729 = 1821 Approach: From the given series, find the form...
[ { "code": null, "e": 25823, "s": 25795, "text": "\n13 Jan, 2022" }, { "code": null, "e": 25904, "s": 25823, "text": "Given a number N, the task is to find the sum of the below series till N terms. " }, { "code": null, "e": 25916, "s": 25904, "text": "Examples:...
Creating the ecology classic ‘Kite diagram’ in Python | by Alan Davies | Towards Data Science
Kite diagrams are classically used in both ecology and biology studies and also form part of the school syllabus on A-Level Biology courses in the UK. Despite this, there are few options for creating these diagrams in standard software visualisation packages, and most seem to still be hand drawn. This short post will e...
[ { "code": null, "e": 569, "s": 171, "text": "Kite diagrams are classically used in both ecology and biology studies and also form part of the school syllabus on A-Level Biology courses in the UK. Despite this, there are few options for creating these diagrams in standard software visualisation packa...
Call a method on a Super Class in Scala - GeeksforGeeks
05 Aug, 2019 This concept is used when we want to call super class method. So whenever a base and subclass have same named methods then to resolve ambiguity we use super keyword to call base class method. The keyword “super” came into this with the concept of Inheritance. Below is the example of call a method on a supe...
[ { "code": null, "e": 24086, "s": 24058, "text": "\n05 Aug, 2019" }, { "code": null, "e": 24346, "s": 24086, "text": "This concept is used when we want to call super class method. So whenever a base and subclass have same named methods then to resolve ambiguity we use super keywor...
Lucy's Neighbours | Practice | GeeksforGeeks
Lucy lives in house number X. She has a list of N house numbers in the society. Distance between houses can be determined by studying the difference between house numbers. Help her find out K closest neighbors. Note: If two houses are equidistant and Lucy has to pick only one, the house with the smaller house number is...
[ { "code": null, "e": 577, "s": 238, "text": "Lucy lives in house number X. She has a list of N house numbers in the society. Distance between houses can be determined by studying the difference between house numbers. Help her find out K closest neighbors.\nNote: If two houses are equidistant and Luc...
How to Create Button in React-Native App ?
27 Apr, 2020 In this article, we will see how to create buttons in react-native, their syntax, and different types of buttons available in react native. Creating a Button in react native is very simple. First, we have to import the button component from React Native. import { Button } from 'react-native' If you are not...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Apr, 2020" }, { "code": null, "e": 194, "s": 54, "text": "In this article, we will see how to create buttons in react-native, their syntax, and different types of buttons available in react native." }, { "code": null, "e...
gpg - Unix, Linux Command
gpg [--homedir name] [--options file] [options] command [args] gpg is the main program for the GnuPG system. This man page only lists the commands and options available. For more verbose documentation get the GNU Privacy Handbook (GPH) or one of the other documents at http://www.gnupg.org/documentation/ ...
[ { "code": null, "e": 10785, "s": 10713, "text": "gpg [--homedir name] [--options file] [options] command [args] \n" }, { "code": null, "e": 10833, "s": 10785, "text": "\ngpg is the main program for the GnuPG system.\n" }, { "code": null, "e": 11036, "s": 10...
How to Apply Different Styles to a Cell in a Spreadsheet using Java?
27 Apr, 2021 Apache POI is a powerful API that enables the user to create, manipulate, and display various file formats based on Microsoft Office using java programs. Using POI, one should be able to perform create, modify, and display/read operations on the following file formats. For Example, Java doesn’t provide bui...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 825, "s": 28, "text": "Apache POI is a powerful API that enables the user to create, manipulate, and display various file formats based on Microsoft Office using java programs. Using POI, one should...
MoviePy – Creating Composite Video Clips
21 May, 2021 In this article, we will see how we can composite video file in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Meaning of composite is combining different elements, composite video is the combination of different video clips unlike stackin...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2021" }, { "code": null, "e": 573, "s": 28, "text": "In this article, we will see how we can composite video file in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF...
Maximum possible difference of two subsets of an array
30 May, 2022 Given an array of n-integers. The array may contain repetitive elements but the highest frequency of any elements must not exceed two. You have to make two subsets such that the difference of the sum of their elements is maximum and both of them jointly contain all elements of the given array along with th...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 May, 2022" }, { "code": null, "e": 446, "s": 54, "text": "Given an array of n-integers. The array may contain repetitive elements but the highest frequency of any elements must not exceed two. You have to make two subsets such that ...
Print Doubly Linked list in Reverse Order
08 Jul, 2022 Given a doubly-linked list of positive integers. The task is to print the given doubly linked list data in reverse order. Examples: Input: List = 1 <=> 2 <=> 3 <=> 4 <=> 5 Output: 5 4 3 2 1 Input: 10 <=> 20 <=> 30 <=> 40 Output: 40 30 20 10 Approach: Take a pointer to point to head of the dou...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jul, 2022" }, { "code": null, "e": 151, "s": 28, "text": "Given a doubly-linked list of positive integers. The task is to print the given doubly linked list data in reverse order. " }, { "code": null, "e": 162, "s": 1...
Change Axis Labels, Set Title and Figure Size to Plots with Seaborn
26 Nov, 2020 Seaborn is Python’s visualization library built as an extension to Matplotlib. Seaborn has Axes-level functions (scatterplot, regplot, boxplot, kdeplot, etc.) as well as Figure-level functions (lmplot, factorplot, jointplot, relplot etc.). Axes-level functions return Matplotlib axes objects with the plot d...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Nov, 2020" }, { "code": null, "e": 705, "s": 28, "text": "Seaborn is Python’s visualization library built as an extension to Matplotlib. Seaborn has Axes-level functions (scatterplot, regplot, boxplot, kdeplot, etc.) as well as Figur...
Sort array of objects by object fields in PHP
04 Jan, 2019 Given an array of objects and the task is to sort the array by object by given fields. Approach:The usort() function is an inbuilt function in PHP which is used to sort the array of elements conditionally with a given comparator function. The usort() function can also be used to sort an array of objects by...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jan, 2019" }, { "code": null, "e": 139, "s": 52, "text": "Given an array of objects and the task is to sort the array by object by given fields." }, { "code": null, "e": 562, "s": 139, "text": "Approach:The usort...
Containerizing Java applications | Creating a Spring Boot App using Dockerfile
22 Oct, 2021 The goal of this article is to containerize a Java application easily, by creating a Spring Boot App using Dockerfile. The steps will be as follows:- Setting up a spring-boot appCreating a dockerfileBuilding project jarBuilding docker image by using dockerfileRunning image Setting up a spring-boot app Crea...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Oct, 2021" }, { "code": null, "e": 147, "s": 28, "text": "The goal of this article is to containerize a Java application easily, by creating a Spring Boot App using Dockerfile." }, { "code": null, "e": 178, "s": 147, ...
PySpark – GroupBy and sort DataFrame in descending order
23 May, 2021 In this article, we will discuss how to groupby PySpark DataFrame and then sort it in descending order. groupBy(): The groupBy() function in pyspark is used for identical grouping data on DataFrame while performing an aggregate function on the grouped data. Syntax: DataFrame.groupBy(*cols) Parameters: cols...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 132, "s": 28, "text": "In this article, we will discuss how to groupby PySpark DataFrame and then sort it in descending order." }, { "code": null, "e": 286, "s": 132, "text": "gr...
Angular 2 - Custom Pipes
Angular 2 also has the facility to create custom pipes. The general way to define a custom pipe is as follows. import { Pipe, PipeTransform } from '@angular/core'; @Pipe({name: 'Pipename'}) export class Pipeclass implements PipeTransform { transform(parameters): returntype { } } Where, 'Pipename' − This is th...
[ { "code": null, "e": 2542, "s": 2431, "text": "Angular 2 also has the facility to create custom pipes. The general way to define a custom pipe is as follows." }, { "code": null, "e": 2721, "s": 2542, "text": "import { Pipe, PipeTransform } from '@angular/core'; \n@Pipe({name: 'P...
How to Upload Image into Database and Display it using PHP ?
03 Jun, 2022 Uploading the image/videos into the database and displaying it using PHP is the way of uploading the image into the database and fetching it from the database. Using the PHP code, the user uploads the image or videos they are safely getting entry into the database and the images should be saved into a part...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jun, 2022" }, { "code": null, "e": 767, "s": 52, "text": "Uploading the image/videos into the database and displaying it using PHP is the way of uploading the image into the database and fetching it from the database. Using the PHP ...
NumPy - Sort, Search & Counting Functions
A variety of sorting related functions are available in NumPy. These sorting functions implement different sorting algorithms, each of them characterized by the speed of execution, worst case performance, the workspace required and the stability of algorithms. Following table shows the comparison of three sorting algor...
[ { "code": null, "e": 2704, "s": 2377, "text": "A variety of sorting related functions are available in NumPy. These sorting functions implement different sorting algorithms, each of them characterized by the speed of execution, worst case performance, the workspace required and the stability of algo...
Lodash | _.differenceWith() Method - GeeksforGeeks
08 May, 2020 The _.differenceWith() method is similar to _.difference() method that returns the array containing the values that are in the first array not in the second array but in _.differenceWith() all the elements of the first array are compared with the second array by applying comparison provided in third. It ma...
[ { "code": null, "e": 37356, "s": 37328, "text": "\n08 May, 2020" }, { "code": null, "e": 37767, "s": 37356, "text": "The _.differenceWith() method is similar to _.difference() method that returns the array containing the values that are in the first array not in the second array ...
C++ Program to Make a Simple Calculator to Add, Subtract, Multiply or Divide Using switch...case
Let us see a program to create a simple calculator in C++, with Add, Subtract, Multiply and Divide operations. Live Demo #include <iostream> using namespace std; void calculator(int a, int b, char op) { switch (op) { case '+': { cout<<"Sum of "<<a<<" and "<<b<<" is "<<a+b<<endl; break; ...
[ { "code": null, "e": 1173, "s": 1062, "text": "Let us see a program to create a simple calculator in C++, with Add, Subtract, Multiply and Divide operations." }, { "code": null, "e": 1184, "s": 1173, "text": " Live Demo" }, { "code": null, "e": 1914, "s": 1184, ...
A Beginners Guide to Match Any Pattern Using Regular Expressions in R | by Rashida Nasrin Sucky | Towards Data Science
The regular expression is nothing but a sequence of characters that matches a pattern in a piece of text or a text file. It is used in text mining in a lot of programming languages. The characters of the regular expression are pretty similar in all the languages. But the functions of extracting, locating, detecting, an...
[ { "code": null, "e": 545, "s": 172, "text": "The regular expression is nothing but a sequence of characters that matches a pattern in a piece of text or a text file. It is used in text mining in a lot of programming languages. The characters of the regular expression are pretty similar in all the la...
Difference Between For and Foreach in PHP
In this post, we will understand the differences between 'for' and 'foreach' loops in PHP − It is an iterative loop that repeats a set of code till a specified condition is reached. It is used to execute a set of code for a specific number of times. Here, the number of times is the iterator variable. Syntax: for( initi...
[ { "code": null, "e": 1154, "s": 1062, "text": "In this post, we will understand the differences between 'for' and 'foreach' loops in PHP −" }, { "code": null, "e": 1364, "s": 1154, "text": "It is an iterative loop that repeats a set of code till a specified condition is reached. ...
Iterate over lines from multiple input streams in Python
Python’s built-in open() function opens one file in read/write mode and read/write operations on it. To perform processing on multiple files in a batch, one has to use fileinput module of Python’s standard library. This module provides a Fileinput class with functionality of iterating over files. The module also define...
[ { "code": null, "e": 1423, "s": 1062, "text": "Python’s built-in open() function opens one file in read/write mode and read/write operations on it. To perform processing on multiple files in a batch, one has to use fileinput module of Python’s standard library. This module provides a Fileinput class...
ASP.NET Core - Action Results
In this chapter, we will discuss the Action Results. In the previous chapters, we have been using plain simple C# classes as controllers. These classes don't derive from a base class, and you can use this approach with MVC, but it is more common to derive a controller from a controller base class provided in the Micros...
[ { "code": null, "e": 2807, "s": 2461, "text": "In this chapter, we will discuss the Action Results. In the previous chapters, we have been using plain simple C# classes as controllers. These classes don't derive from a base class, and you can use this approach with MVC, but it is more common to deri...
The Most Complete Guide to PyTorch for Data Scientists | by Rahul Agarwal | Towards Data Science
PyTorch has sort of became one of the de facto standards for creating Neural Networks now, and I love its interface. Yet, it is somehow a little difficult for beginners to get a hold of. I remember picking PyTorch up only after some extensive experimentation a couple of years back. To tell you the truth, it took me a l...
[ { "code": null, "e": 358, "s": 171, "text": "PyTorch has sort of became one of the de facto standards for creating Neural Networks now, and I love its interface. Yet, it is somehow a little difficult for beginners to get a hold of." }, { "code": null, "e": 743, "s": 358, "text": ...
Minimum Spanning Tree | Practice | GeeksforGeeks
Given a weighted, undirected and connected graph of V vertices and E edges. The task is to find the sum of weights of the edges of the Minimum Spanning Tree. Example 1: Input: Output: 4 Explanation: The Spanning Tree resulting in a weight of 4 is shown above. Example 2: Input: Output: 5 Explanation: Only one Span...
[ { "code": null, "e": 396, "s": 238, "text": "Given a weighted, undirected and connected graph of V vertices and E edges. The task is to find the sum of weights of the edges of the Minimum Spanning Tree." }, { "code": null, "e": 409, "s": 398, "text": "Example 1:" }, { "co...
Draw Cube and Cuboid in Python using Turtle
22 Jun, 2020 Prerequisite: Turtle Programming Basics Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move the turtle, there are some functions i.e forward(), backward(), etc. Following steps are...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2020" }, { "code": null, "e": 92, "s": 52, "text": "Prerequisite: Turtle Programming Basics" }, { "code": null, "e": 340, "s": 92, "text": "Turtle is an inbuilt module in Python. It provides drawing using a ...
What are the differences between HTTP module and Express.js module ?
05 Jul, 2022 HTTP and Express both are used in NodeJS for development. In this article, we’ll go through HTTP and express modules separately HTTP: It is an in-build module which is pre-installed along with NodeJS. It is used to create server and set up connections. Using this connection, data sending and receiving can ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jul, 2022" }, { "code": null, "e": 156, "s": 28, "text": "HTTP and Express both are used in NodeJS for development. In this article, we’ll go through HTTP and express modules separately" }, { "code": null, "e": 401, "...
Iterative Method to find Height of Binary Tree
21 Jun, 2022 There are two conventions to define the height of a Binary Tree Number of nodes on the longest path from the root to the deepest node. Number of edges on the longest path from the root to the deepest node. Number of nodes on the longest path from the root to the deepest node. Number of edges on the longe...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 117, "s": 52, "text": "There are two conventions to define the height of a Binary Tree " }, { "code": null, "e": 259, "s": 117, "text": "Number of nodes on the longest path from...
Conversion of J-K Flip-Flop into T Flip-Flop
17 Jun, 2022 Prerequisite – Flip-flop 1. J-K Flip-Flop: JK flip-flop shares the initials of Jack Kilby, who won a Nobel prize for his fabrication of the world’s first integrated circuit, some people speculate that this type of flip flop was named after him because a flip-flop was the first device that Kilby build whe...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2022" }, { "code": null, "e": 80, "s": 54, "text": "Prerequisite – Flip-flop " }, { "code": null, "e": 586, "s": 80, "text": "1. J-K Flip-Flop: JK flip-flop shares the initials of Jack Kilby, who won a Nobel...
goto statement in C/C++
26 Aug, 2019 The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere within a function.Syntax: Syntax1 | Syntax2 ---------------------------- goto label; | label: . | . . ...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Aug, 2019" }, { "code": null, "e": 251, "s": 52, "text": "The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere w...
C# | SortedDictionary.Remove() Method
01 Feb, 2019 This method is used to remove the value with the specified key from the SortedDictionary<TKey, TValue>. Syntax: public bool Remove (TKey key); Return Value: This method returns true if the element is successfully found and removed; otherwise it returns false. This method returns false if key is not found ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2019" }, { "code": null, "e": 132, "s": 28, "text": "This method is used to remove the value with the specified key from the SortedDictionary<TKey, TValue>." }, { "code": null, "e": 140, "s": 132, "text": "Sy...
Keyboard Events in ElectronJS
22 Jun, 2020 ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime. In web ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2020" }, { "code": null, "e": 328, "s": 28, "text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable ...
Parallel vs Sequential Stream in Java
15 Oct, 2020 Prerequisite: Streams in Java A stream in Java is a sequence of objects which operates on a data source such as an array or a collection and supports various methods. It was introduced in Java 8’s java.util.stream package. Stream supports many aggregate operations like filter, map, limit, reduce, find, an...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Oct, 2020" }, { "code": null, "e": 83, "s": 53, "text": "Prerequisite: Streams in Java" }, { "code": null, "e": 654, "s": 83, "text": "A stream in Java is a sequence of objects which operates on a data source suc...
Find maximum element of each row in a matrix
10 Jun, 2022 Given a matrix, the task is to find the maximum element of each row.Examples: Input : [1, 2, 3] [1, 4, 9] [76, 34, 21] Output : 3 9 76 Input : [1, 2, 3, 21] [12, 1, 65, 9] [1, 56, 34, 2] Output : 21 65 56 Approach : Approach is very simple. The idea is to run the lo...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 Jun, 2022" }, { "code": null, "e": 133, "s": 53, "text": "Given a matrix, the task is to find the maximum element of each row.Examples: " }, { "code": null, "e": 297, "s": 133, "text": "Input : [1, 2, 3]\n ...
How to count number of NULLs in a row with MySQL?
Use ISNULL() from MySQL. Let us first create a table − mysql> create table DemoTable -> ( -> Number1 int, -> Number2 int -> ); Query OK, 0 rows affected (0.59 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(10,NULL); Query OK, 1 row affected (0.17 sec) mysql...
[ { "code": null, "e": 1117, "s": 1062, "text": "Use ISNULL() from MySQL. Let us first create a table −" }, { "code": null, "e": 1238, "s": 1117, "text": "mysql> create table DemoTable\n -> (\n -> Number1 int,\n -> Number2 int\n -> );\nQuery OK, 0 rows affected (0.59 sec)" ...
Monte Carlo Integration and Sampling Methods | by Mengsay Loem | Towards Data Science
Integration is a critical calculation used frequently in problem solving. With a probability task, an expectation value of a continuous random variable x is defined by the following integration where p(x) is a probability density function of x. However, to calculate this value is not an easy process with a computer. To...
[ { "code": null, "e": 417, "s": 172, "text": "Integration is a critical calculation used frequently in problem solving. With a probability task, an expectation value of a continuous random variable x is defined by the following integration where p(x) is a probability density function of x." }, { ...
What is tri state checkBox, How to create a tri state checkBox in JavaFX?
A checkbox is a type of selection control, which is square in shape with a tick mark int it. Generally, a checkbox has two states checked and unchecked. Depending on the GUI (technology) we can also have a third state named undefined/undetermined, which indicates the state of the current checkbox is neither checked nor...
[ { "code": null, "e": 1215, "s": 1062, "text": "A checkbox is a type of selection control, which is square in shape with a tick mark int it. Generally, a checkbox has two states checked and unchecked." }, { "code": null, "e": 1394, "s": 1215, "text": "Depending on the GUI (technol...
How to check an array is associative or sequential in PHP? - GeeksforGeeks
24 Sep, 2018 In PHP there is no need to write the variable type before the variable because it is loosely-typed. It takes datatype from user defined values that are stored in it. Arrays in PHP is a type of data structure that allows to store multiple elements of similar data type under a single variable thereby saving ...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n24 Sep, 2018" }, { "code": null, "e": 26633, "s": 26217, "text": "In PHP there is no need to write the variable type before the variable because it is loosely-typed. It takes datatype from user defined values that are stored in i...
Access the elements of a Series in Pandas - GeeksforGeeks
06 Dec, 2018 Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). Labels need not be unique but must be a hashable type. Let’s discuss different ways to access the elements of given Pandas Series. First create a Pandas Series. # importing p...
[ { "code": null, "e": 26311, "s": 26283, "text": "\n06 Dec, 2018" }, { "code": null, "e": 26499, "s": 26311, "text": "Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). Labels need not be unique but ...
Largest subarray with 0 sum | Practice | GeeksforGeeks
Given an array having both positive and negative integers. The task is to compute the length of the largest subarray with sum 0. Example 1: Input: N = 8 A[] = {15,-2,2,-8,1,7,10,23} Output: 5 Explanation: The largest subarray with sum 0 will be -2 2 -8 1 7. Your Task: You just have to complete the function maxLen() whi...
[ { "code": null, "e": 367, "s": 238, "text": "Given an array having both positive and negative integers. The task is to compute the length of the largest subarray with sum 0." }, { "code": null, "e": 378, "s": 367, "text": "Example 1:" }, { "code": null, "e": 496, ...
Node.js cipher.update() Method - GeeksforGeeks
16 Sep, 2021 The cipher.update() method is an inbuilt application programming interface of class Cipher within crypto module which is used to update the cipher with data according to the given encoding format. Syntax: const cipher.update(data[, inputEncoding][, outputEncoding]) Parameters: This method takes the followi...
[ { "code": null, "e": 38611, "s": 38583, "text": "\n16 Sep, 2021" }, { "code": null, "e": 38808, "s": 38611, "text": "The cipher.update() method is an inbuilt application programming interface of class Cipher within crypto module which is used to update the cipher with data accord...
Sorting Algorithms - GeeksQuiz
06 Sep, 2021 Selection sort makes O(n) swaps which is minimum among all sorting algorithms mentioned above. 2 5 1 7 9 12 11 10 Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here. Python Program for Breadth First Search or BFS for a Graph Best Time to Buy and Sell St...
[ { "code": null, "e": 35847, "s": 35819, "text": "\n06 Sep, 2021" }, { "code": null, "e": 35942, "s": 35847, "text": "Selection sort makes O(n) swaps which is minimum among all sorting algorithms mentioned above." }, { "code": null, "e": 35969, "s": 35942, "tex...
Check the Version of the Python Interpreter - GeeksforGeeks
24 Jan, 2021 Under this article, we will get to know the current version of python interpreter in the system. Getting the version of the interpreter is really important as the python interpreter is widely used throughout the industries for computer programming and source coding. It takes an interactive command and exec...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n24 Jan, 2021" }, { "code": null, "e": 24609, "s": 24292, "text": "Under this article, we will get to know the current version of python interpreter in the system. Getting the version of the interpreter is really important as the ...
Get row numbers of NumPy array having element larger than X
11 Oct, 2020 Let’s see how to getting the row numbers of a numpy array that have at least one item is larger than a specified value X. So, for doing this task we will use numpy.where() and numpy.any() functions together. Syntax: numpy.where(condition[, x, y]) Return: [ndarray or tuple of ndarrays] If both x and y are s...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2020" }, { "code": null, "e": 236, "s": 28, "text": "Let’s see how to getting the row numbers of a numpy array that have at least one item is larger than a specified value X. So, for doing this task we will use numpy.where() and...
Rock, Paper, Scissor game – Python Project
08 Aug, 2021 In this article, we will see how we can create a rock paper and scissor game using Tkinter. Rock paper scissor is a hand game usually played between two people, in which each player simultaneously forms one of the three shapes with an outstretched hand. These shapes are “rock”, “paper”, and “scissors”. Let...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Aug, 2021" }, { "code": null, "e": 356, "s": 52, "text": "In this article, we will see how we can create a rock paper and scissor game using Tkinter. Rock paper scissor is a hand game usually played between two people, in which each...
Generating Strong Password using Python
27 Jan, 2022 Having a weak password is not good for a system that demands high confidentiality and security of user credentials. It turns out that people find it difficult to make up a strong password that is strong enough to prevent unauthorized users from memorizing it. This article uses a mixture of numbers, alpha...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jan, 2022" }, { "code": null, "e": 314, "s": 52, "text": "Having a weak password is not good for a system that demands high confidentiality and security of user credentials. It turns out that people find it difficult to make up a st...
JavaScript | ‘===’ vs ‘==’Comparison Operator
25 May, 2022 In Javascript(ES6), there are four ways to test equality which are listed below: Using ‘==’ operator Using ‘===’ operator SameValueZero: used mainly in sets, maps and arrays. SameValue: used elsewhere Now, our main concern is getting to know the difference between the ‘==’ and ‘===’ operators that the java...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 May, 2022" }, { "code": null, "e": 135, "s": 54, "text": "In Javascript(ES6), there are four ways to test equality which are listed below:" }, { "code": null, "e": 155, "s": 135, "text": "Using ‘==’ operator" }...
How to setup cron jobs in Ubuntu
27 Feb, 2020 The Cron software utility is a time-based job scheduler in Unix-like operating systems. Cron allows Linux and Unix users to run commands or scripts at a given time and date. Once can schedule scripts to be executed periodically. It is usually used for system admin jobs such as backups or cleaning/tmp/ dire...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Feb, 2020" }, { "code": null, "e": 353, "s": 28, "text": "The Cron software utility is a time-based job scheduler in Unix-like operating systems. Cron allows Linux and Unix users to run commands or scripts at a given time and date. O...
SQL Server – PATINDEX() Function
23 Sep, 2021 The PATINDEX() function in the SQL server is used to return the starting index of the first occurrence of a pattern in a string or a specified expression. It returns zero if the pattern is not found. It returns NULL if either pattern or expression is NULL. Starting index is 1. PATINDEX ( '%pattern%' , exp...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Sep, 2021" }, { "code": null, "e": 208, "s": 52, "text": "The PATINDEX() function in the SQL server is used to return the starting index of the first occurrence of a pattern in a string or a specified expression. " }, { "cod...
PHP strpos() and stripos() Functions
09 May, 2022 In this article, we will see how to find the position of the first occurrence of a string in another string using strpos() and stripos() Functions in PHP, & will see their implementation through the examples. Both the strpos() and stripos() Functions in PHP are binary-safe which means the function will han...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 May, 2022" }, { "code": null, "e": 237, "s": 28, "text": "In this article, we will see how to find the position of the first occurrence of a string in another string using strpos() and stripos() Functions in PHP, & will see their imp...
Maximum Product Subarray
06 Jul, 2022 Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only O(1) extra space can be used. Examples: Input: arr[] = {6, -3, -10, 0, 2} Output: 180 // The subarray is {6, -3, -10} Input: arr[] = {-1, -3, -10...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 240, "s": 52, "text": "Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only O(1) extra space...
Virtual Functions and Runtime Polymorphism in C++
22 Jun, 2022 A virtual function is a member function that is declared in the base class using the keyword virtual and is re-defined (Overriden) in the derived class. It tells the compiler to perform late binding where the compiler matches the object with the right called function and executes it during the runtime. Thi...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 410, "s": 54, "text": "A virtual function is a member function that is declared in the base class using the keyword virtual and is re-defined (Overriden) in the derived class. It tells the compiler...
Search an element in a sorted and rotated array with duplicates
27 May, 2022 Given an array arr[] which is sorted and rotated, the task is to find an element in the rotated array (with duplicates) in O(log n) time. Note: Print the index where the key exists. In case of multiple answer print any of them Examples: Input: arr[] = {3, 3, 3, 1, 2, 3}, key = 3 Output: 0 arr[0] = 3 Input...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 May, 2022" }, { "code": null, "e": 279, "s": 52, "text": "Given an array arr[] which is sorted and rotated, the task is to find an element in the rotated array (with duplicates) in O(log n) time. Note: Print the index where the key ...
C++ Program to Implement Hash Tables with Linear Probing
A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched. Linear probing is a collision resolving technique in Open Addressed Hash tables. In this method, each cell of a hash table stor...
[ { "code": null, "e": 1380, "s": 1187, "text": "A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched." }, { "code": null, "e": 1754, "s": 1380, ...
compgen command in Linux with Examples
22 Jun, 2020 compgen is a bash built-in command which is used to list all the commands that could be executed in the Linux system. This command could also be used to count the total number of commands present in the terminal or even to look for a command with the specific keyword. This command is even used to print the...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2020" }, { "code": null, "e": 412, "s": 52, "text": "compgen is a bash built-in command which is used to list all the commands that could be executed in the Linux system. This command could also be used to count the total numbe...
Python – Find Index containing String in List
04 Jul, 2022 Given a list, the task is to write a Python Program to find the Index containing String. Example: Input: [‘sravan’, 98, ‘harsha’, ‘jyothika’, ‘deepika’, 78, 90, ‘ramya’] Output: 0 2 3 4 7 Explanation: Index 0 2 3 4 7 contains only string. By using type() operator we can get the string elements indexes from...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Jul, 2022" }, { "code": null, "e": 142, "s": 53, "text": "Given a list, the task is to write a Python Program to find the Index containing String." }, { "code": null, "e": 151, "s": 142, "text": "Example:" }, ...
C# | Byte.CompareTo(Byte) Method
07 Dec, 2021 This method is used to compare this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.Syntax: public int CompareTo (byte value); Here, the value is an 8-bit unsigned integer to compare.Return Value: This method returns a signed integer that indicates the rela...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Dec, 2021" }, { "code": null, "e": 170, "s": 28, "text": "This method is used to compare this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.Syntax:" }, { "code": null, "...
Simple and fast Question Answering system using HuggingFace DistilBERT — single & batch inference examples provided. | by Ramsri Goutham | Towards Data Science
Question Answering systems have many use cases like automatically responding to a customer’s query by reading through the company’s documents and finding a perfect answer. In this blog post, we will see how we can implement a state-of-the-art, super-fast, and lightweight question answering system using DistilBERT from ...
[ { "code": null, "e": 343, "s": 171, "text": "Question Answering systems have many use cases like automatically responding to a customer’s query by reading through the company’s documents and finding a perfect answer." }, { "code": null, "e": 525, "s": 343, "text": "In this blog p...
Tryit Editor v3.7 - Show Java
static void Main() { // Full name string name = "John Doe"; // Location of the letter D int charPos = name.IndexOf("D"); // Get last name string lastName = name.Substring(charPos); // Print the result
[]
React useContext Hook
React Context is a way to manage state globally. It can be used together with the useState Hook to share state between deeply nested components more easily than with useState alone. State should be held by the highest parent component in the stack that requires access to the state. To illustrate, we have many nested co...
[ { "code": null, "e": 49, "s": 0, "text": "React Context is a way to manage state globally." }, { "code": null, "e": 182, "s": 49, "text": "It can be used together with the useState Hook to share state between\ndeeply nested components more easily than with useState alone." }, ...
IsNullOrEmpty() Method in C#
The IsNullOrEmpty() method in C# is used to indicate whether the specified string is null or an empty string (""). The syntax is as follows− public static bool IsNullOrEmpty (string val); Above, the value val is the string to test. Let us now see an example − Live Demo using System; public class Demo { public stati...
[ { "code": null, "e": 1177, "s": 1062, "text": "The IsNullOrEmpty() method in C# is used to indicate whether the specified string is null or an empty string (\"\")." }, { "code": null, "e": 1203, "s": 1177, "text": "The syntax is as follows−" }, { "code": null, "e": 12...
Shop in Candy Store | Practice | GeeksforGeeks
In a candy store, there are N different types of candies available and the prices of all the N different types of candies are provided to you. You are now provided with an attractive offer. You can buy a single candy from the store and get at most K other candies ( all are different types ) for free. Now you have to an...
[ { "code": null, "e": 913, "s": 238, "text": "In a candy store, there are N different types of candies available and the prices of all the N different types of candies are provided to you.\nYou are now provided with an attractive offer.\nYou can buy a single candy from the store and get at most K oth...
Cutting a Rod | DP-13 - GeeksforGeeks
28 Mar, 2022 Given a rod of length n inches and an array of prices that includes prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if the length of the rod is 8 and the values of different pieces are given as the following, the...
[ { "code": null, "e": 24534, "s": 24506, "text": "\n28 Mar, 2022" }, { "code": null, "e": 24925, "s": 24534, "text": "Given a rod of length n inches and an array of prices that includes prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting ...
FileInputStream finalize() Method in Java with Examples - GeeksforGeeks
01 Dec, 2021 Java.io.FileInputStream.finalize() method is a part of Java.io.FileInputStream class. It ensures that the close method of the fileInputStream is called whenever no more references of fileInputStream exist. finalize() method is annotated @Deprecated. finalize() method is used to perform a cleanup act when ...
[ { "code": null, "e": 23974, "s": 23946, "text": "\n01 Dec, 2021" }, { "code": null, "e": 24181, "s": 23974, "text": "Java.io.FileInputStream.finalize() method is a part of Java.io.FileInputStream class. It ensures that the close method of the fileInputStream is called whenever n...
Count permutations of given array that generates the same Binary Search Tree (BST) - GeeksforGeeks
18 Aug, 2021 Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted into a Binary Search Tree, the task is to count the number of ways to rearrange the given array to get the same BST. Examples: Input: arr[ ] ={3, 4, 5, 1, 2}Output: 6E...
[ { "code": null, "e": 24990, "s": 24962, "text": "\n18 Aug, 2021" }, { "code": null, "e": 25247, "s": 24990, "text": "Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted into a Binary Search Tr...
How to generate Narrowband and Wideband FM signal using GNU-Octave? - GeeksforGeeks
09 Jul, 2021 In this article, we are going to discuss how to generate the Narrowband and Wideband FM signal using MATLAB. Frequency Modulation popularly known as FM is a kind of analog modulation technique in which the frequency of the high-frequency carrier signal is varied according to the amplitude of the modulatin...
[ { "code": null, "e": 24255, "s": 24227, "text": "\n09 Jul, 2021" }, { "code": null, "e": 24365, "s": 24255, "text": "In this article, we are going to discuss how to generate the Narrowband and Wideband FM signal using MATLAB." }, { "code": null, "e": 24667, "s": ...
Transpose a matrix in C#
Transpose of a matrix flips the matrix over its diagonal and this brings the row elements on the column and column elements on the row. For example − Matrix before Transpose: 123 456 789 Matrix after Transpose: 147 258 369 Let us see an example in C# to achieve transpose of a matrix − using System; public class Demo ...
[ { "code": null, "e": 1198, "s": 1062, "text": "Transpose of a matrix flips the matrix over its diagonal and this brings the row elements on the column and column elements on the row." }, { "code": null, "e": 1212, "s": 1198, "text": "For example −" }, { "code": null, ...
Productionize a Machine Learning Model with a Django API | by GreekDataGuy | Towards Data Science
Previously, I wrote a tutorial on productionizing an ML model with flask. Flask is lighter weight, but if we needed more functionality, django comes with that included. I built an API that makes a prediction via sklearn model. Below is my step-by-step code. This tutorial contains 3 parts:1. Training the ML model2. Buil...
[ { "code": null, "e": 246, "s": 172, "text": "Previously, I wrote a tutorial on productionizing an ML model with flask." }, { "code": null, "e": 341, "s": 246, "text": "Flask is lighter weight, but if we needed more functionality, django comes with that included." }, { "co...
C++ Numeric Library - accumulate
It returns the result of accumulating all the values in the range [first,last) to init. Following is the declaration for std::accumulate. template <class InputIterator, class T> T accumulate (InputIterator first, InputIterator last, T init); template <class InputIterator, class T, class BinaryOperation> T accum...
[ { "code": null, "e": 2691, "s": 2603, "text": "It returns the result of accumulating all the values in the range [first,last) to init." }, { "code": null, "e": 2741, "s": 2691, "text": "Following is the declaration for std::accumulate." }, { "code": null, "e": 3024, ...
GATE | GATE-CS-2003 | Question 20 - GeeksforGeeks
28 Jun, 2021 Consider the following three claims 1. (n + k)m = Θ(nm), where k and m are constants 2. 2n + 1 = O(2n) 3. 22n + 1 = O(2n) Which of these claims are correct ? (A) 1 and 2(B) 1 and 3(C) 2 and 3(D) 1, 2, and 3Answer: (A)Explanation: (n + k)m and Θ(nm) are asymptotically same as theta notation can always be w...
[ { "code": null, "e": 24043, "s": 24015, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24079, "s": 24043, "text": "Consider the following three claims" }, { "code": null, "e": 24166, "s": 24079, "text": "1. (n + k)m = Θ(nm), where k and m are constants\n2. 2...
MySQL trigger to insert row into another table?
Let us first create a table. The CREATE command is used to create a table. mysql> create table Table1 -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.62 sec) Let us now create another table. mysql> create table Table2 -> ( -> id int, -> name varchar(100) -> ); Query OK, 0...
[ { "code": null, "e": 1137, "s": 1062, "text": "Let us first create a table. The CREATE command is used to create a table." }, { "code": null, "e": 1256, "s": 1137, "text": "mysql> create table Table1\n -> (\n -> id int,\n -> name varchar(100)\n -> );\nQuery OK, 0 rows aff...
HashMap clone() Method in Java
01 Nov, 2021 Let us do clear out the foundation concept of shallow copy and deep copy in java. Shallow repetition is quicker. However, it’s “lazy” it handles pointers and references. Rather than creating a contemporary copy of the particular knowledge the pointer points to, it simply copies over the pointer price. So, ...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Nov, 2021" }, { "code": null, "e": 601, "s": 53, "text": "Let us do clear out the foundation concept of shallow copy and deep copy in java. Shallow repetition is quicker. However, it’s “lazy” it handles pointers and references. Rath...
Print the following pyramid pattern
29 Apr, 2021 Given a positive integer n. The problem is to print the pyramid pattern as described in the examples below. Examples: Input : n = 4 Output : 1 3*2 4*5*6 10*9*8*7 Input : n = 5 Output : 1 3*2 4*5*6 10*9*8*7 11*12*13*14*15 Source: Amdocs Interview Experience | Set 1 Approach: For odd number row, values a...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Apr, 2021" }, { "code": null, "e": 162, "s": 54, "text": "Given a positive integer n. The problem is to print the pyramid pattern as described in the examples below." }, { "code": null, "e": 173, "s": 162, "text"...
NPDA for accepting the language L = {anbm | n,m ≥ 1 and n ≠ m}
05 Jul, 2022 Prerequisite – Pushdown automata, Pushdown automata acceptance by final state Problem – Design a non deterministic PDA for accepting the language , i.e., L = {aab, abb, aaab, abbb, aaaab, aaabb, aabbb, abbbb ......} In each of the string, the number of a’s are followed by unequal number of b’s. Explanatio...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jul, 2022" }, { "code": null, "e": 132, "s": 54, "text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final state" }, { "code": null, "e": 208, "s": 132, "text": "Problem – Design a non dete...
Flutter – Scrollable Text
15 Jan, 2021 In this article, we are going to make a Flutter application in which we will add a Text Widget that can be scrolled horizontally or vertically. These can have a wide range of applications depending upon the needs of the users. Here we will be implementing the simplest form of scrollable text. We can make t...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jan, 2021" }, { "code": null, "e": 348, "s": 54, "text": "In this article, we are going to make a Flutter application in which we will add a Text Widget that can be scrolled horizontally or vertically. These can have a wide range of...
Find the k most frequent words from data set in Python
10 Dec, 2017 Given the data set, we can find k number of most frequent words. The solution of this problem already present as Find the k most frequent words from a file. But we can solve this problem very efficiently in Python with the help of some high performance modules. In order to do this, we’ll use a high perform...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Dec, 2017" }, { "code": null, "e": 117, "s": 52, "text": "Given the data set, we can find k number of most frequent words." }, { "code": null, "e": 314, "s": 117, "text": "The solution of this problem already pre...
ML | Implement Face recognition using k-NN with scikit-learn
15 Mar, 2019 k-Nearest Neighbors: k-NN is one of the most basic classification algorithms in machine learning. It belongs to the supervised learning category of machine learning. k-NN is often used in search applications where you are looking for “similar” items. The way we measure similarity is by creating a vector re...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Mar, 2019" }, { "code": null, "e": 75, "s": 54, "text": "k-Nearest Neighbors:" }, { "code": null, "e": 498, "s": 75, "text": "k-NN is one of the most basic classification algorithms in machine learning. It belong...
numpy.sort() in Python
29 Nov, 2018 numpy.sort() : This function returns a sorted copy of an array. Parameters : arr : Array to be sorted.axis : Axis along which we need array to be started.order : This argument specifies which fields to compare first.kind : [‘quicksort’{default}, ‘mergesort’, ‘heapsort’]Sorting algorithm. Return : Sorted Ar...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 92, "s": 28, "text": "numpy.sort() : This function returns a sorted copy of an array." }, { "code": null, "e": 105, "s": 92, "text": "Parameters :" }, { "code": null, ...
Vector removeElement() method in Java with Example
24 Dec, 2018 The java.util.Vector.removeElement() method is used to remove first occurrence of particular object. If object is not found then it returns false else it returns true.If a particular object is present inside vector and removeElement() method call on that vector element then this method reduces vector size ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2018" }, { "code": null, "e": 341, "s": 28, "text": "The java.util.Vector.removeElement() method is used to remove first occurrence of particular object. If object is not found then it returns false else it returns true.If a par...
Google Kick Round-D Question (2020)
05 Dec, 2021 Isyana is given the number of visitors at her local theme park on N consecutive days. The number of visitors on the i-th day is VI. A day is record-breaking if it satisfies both of the following conditions: The number of visitors on the day is strictly larger than the number of visitors on each of the prev...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Dec, 2021" }, { "code": null, "e": 259, "s": 52, "text": "Isyana is given the number of visitors at her local theme park on N consecutive days. The number of visitors on the i-th day is VI. A day is record-breaking if it satisfies b...
How to create a transparent histogram using ggplot2 in R?
When we create a histogram using ggplot2 package, the area covered by the histogram is filled with grey color but we can remove that color to make the histogram look transparent. This can be done by using fill="transparent" and color="black" arguments in geom_histogram, we need to use color argument because if we don’t...
[ { "code": null, "e": 1501, "s": 1062, "text": "When we create a histogram using ggplot2 package, the area covered by the histogram is filled with grey color but we can remove that color to make the histogram look transparent. This can be done by using fill=\"transparent\" and color=\"black\" argumen...
How to change column names to capital letters from lower case or vice versa in R?
Mostly, we get data that contain column names in lowercase or just first letter is in upper case. If we want to convert those column names to all capital letter words or uppercase then toupper function can be used to the names of the columns. This can be done by using the below syntax − names(“data_frame_name”)<-touppe...
[ { "code": null, "e": 1350, "s": 1062, "text": "Mostly, we get data that contain column names in lowercase or just first letter is in upper case. If we want to convert those column names to all capital letter words or uppercase then toupper function can be used to the names of the columns. This can b...
Autocmplete ComboBox in Python-Tkinter - GeeksforGeeks
26 Mar, 2020 Prerequisites: Python GUI – tkinter The Listbox widget is used to display a list of items from which a user can select a number of items. But have you ever wondered, how to return the list of possible results when a key is pressed? Let’s see the following approach towards the same. Working of Program List ...
[ { "code": null, "e": 24380, "s": 24352, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24416, "s": 24380, "text": "Prerequisites: Python GUI – tkinter" }, { "code": null, "e": 24663, "s": 24416, "text": "The Listbox widget is used to display a list of items ...
Getting equal or greater than number from the list of numbers in JavaScript
We are required to write a JavaScript function that takes in an array of numbers as the first argument and a single number as the second argument. The function should return an array of all the elements from the input array that are greater than or equal to the number taken as the second argument. Following is the code...
[ { "code": null, "e": 1361, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of numbers as the first argument and a single number as the second argument. The function should return an array of all the elements from the input array that are greater than or equa...
Python Tweepy – Getting the number of times a tweet has been retweeted - GeeksforGeeks
18 Jun, 2020 In this article we will see how we can get the number of times a tweet/status has been retweeted. The retweet_count attribute of the Status object provides us with the number of times a tweet has been retweeted . Identifying the number of times a tweet has been retweeted in the GUI : The above mentioned st...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n18 Jun, 2020" }, { "code": null, "e": 25860, "s": 25647, "text": "In this article we will see how we can get the number of times a tweet/status has been retweeted. The retweet_count attribute of the Status object provides us with...