title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
SQL Tryit Editor v1.6 | CREATE VIEW [Products Above Average Price] AS
SELECT ProductName, Price
FROM Products
WHERE Price > (SELECT AVG(Price) FROM Products);
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version... | [
{
"code": null,
"e": 46,
"s": 0,
"text": "CREATE VIEW [Products Above Average Price] AS"
},
{
"code": null,
"e": 72,
"s": 46,
"text": "SELECT ProductName, Price"
},
{
"code": null,
"e": 86,
"s": 72,
"text": "FROM Products"
},
{
"code": null,
"e": 1... |
MySQL query to get a substring from a string except the last three characters? | For this, you can use SUBSTR along with length().
Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstName varchar(20)
);
Query OK, 0 rows affected (1.31 sec)
Following is the query to insert some records in the table using insert command −
mysql> i... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "For this, you can use SUBSTR along with length()."
},
{
"code": null,
"e": 1142,
"s": 1112,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1292,
"s": 1142,
"text": "mysql> create table DemoTable\n... |
Program to find the maximum element in a Matrix in C++ | In this problem, we are given a matrix of size nXm. Our task is to create a
program to find the maximum element in a Matrix in C++.
Problem Description − Here, we need to simply find the largest element of matrix.
Let’s take an example to understand the problem,
mat[3][3] = {{4, 1, 6},
{5, 2, 9},
{7, 3, 0}}
9
The solut... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "In this problem, we are given a matrix of size nXm. Our task is to create a\nprogram to find the maximum element in a Matrix in C++."
},
{
"code": null,
"e": 1276,
"s": 1194,
"text": "Problem Description − Here, we need to simply fin... |
Class Instances in Python. String Representations of Class... | by Sadrach Pierre, Ph.D. | Towards Data Science | Customizing how class instances are represented is a good way to simplify debugging and instance output. In this post, we will discuss how defining ‘__repr__’ and ‘__str__’ methods allows us to change the string representation of an instance.
Let’s get started!
To begin, let’s define a class that describes a YouTube ch... | [
{
"code": null,
"e": 415,
"s": 172,
"text": "Customizing how class instances are represented is a good way to simplify debugging and instance output. In this post, we will discuss how defining ‘__repr__’ and ‘__str__’ methods allows us to change the string representation of an instance."
},
{
... |
The Top 1̶0̶ 15 Places to Find Datasets 📊 | Towards Data Science | Without further ado, here are the best places to find data, with some helpful information about each. Folks keep pointing me to new sources, so the list is expanding! If you have a favorite, please send it my way! 😀
Awesome Data is a GitHub repository with a seriously impressive list of datasets separated by category.... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "Without further ado, here are the best places to find data, with some helpful information about each. Folks keep pointing me to new sources, so the list is expanding! If you have a favorite, please send it my way! 😀"
},
{
"code": null,
"e": 5... |
Microsoft Interview Experience | 4+ Years Experienced - GeeksforGeeks | 11 May, 2021
Round 1:-
Started with an introduction about projects and Education.
Then he asks me a question about my project which I had done previously(questions related to the synchronization of the transaction, if multiple transactions on multiple servers happen same time how do you handle it)
Then he asks me a que... | [
{
"code": null,
"e": 25241,
"s": 25213,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 25251,
"s": 25241,
"text": "Round 1:-"
},
{
"code": null,
"e": 25310,
"s": 25251,
"text": "Started with an introduction about projects and Education."
},
{
"code":... |
What are predefined attributes in C#? | The following are the predefined attributes in C# −
AttributeUsage
Conditional
Obsolete
The pre-defined attribute AttributeUsage describes how a custom attribute class can be used. Here is the syntax −
[AttributeUsage (
validon,
AllowMultiple = allowmultiple,
Inherited = inherited
)]
This predefined attribute ... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "The following are the predefined attributes in C# −"
},
{
"code": null,
"e": 1129,
"s": 1114,
"text": "AttributeUsage"
},
{
"code": null,
"e": 1141,
"s": 1129,
"text": "Conditional"
},
{
"code": null,
... |
How to make a Country field in Django? | If you need to add a location field in your form or database, you can do that using charfield but it is still not that good idea. In Django, we have a third-party package called 'django-countries' that provides the country field. In this article, let's see how to use django-countries to add a Country field in Django.
F... | [
{
"code": null,
"e": 1381,
"s": 1062,
"text": "If you need to add a location field in your form or database, you can do that using charfield but it is still not that good idea. In Django, we have a third-party package called 'django-countries' that provides the country field. In this article, let's ... |
HTML checked Attribute | The checked attribute in HTML is used to set that an <input> element is pre-selected when the page loads.
This works for input type radio and checkbox.
Let us work on the checked attribute for checkbox i.e. input type checkbox. Following is the syntax −
<input type=”checkbox” checked>
Above, we have set it checked sinc... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "The checked attribute in HTML is used to set that an <input> element is pre-selected when the page loads."
},
{
"code": null,
"e": 1214,
"s": 1168,
"text": "This works for input type radio and checkbox."
},
{
"code": null,
... |
Tryit Editor v3.7 | Tryit: The text-align-last property | [] |
map::begin() and end() in C++ STL | In this article we will be discussing the working, syntax and examples of map::begin() and map::end() functions in C++ STL.
Maps are the associative container, which facilitates to store the elements formed by a combination of key value and mapped value in a specific order. In a map container the data is internally alw... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "In this article we will be discussing the working, syntax and examples of map::begin() and map::end() functions in C++ STL."
},
{
"code": null,
"e": 1496,
"s": 1186,
"text": "Maps are the associative container, which facilitates to s... |
How to call a virtual function inside constructors in C++? | Calling virtual functions from a constructor or destructor is dangerous and should be avoided whenever possible. This is because the virtual function you call is called from the Base class and not the derived class.
In C++ every class builds its version of the virtual method table prior to entering its own construction... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "Calling virtual functions from a constructor or destructor is dangerous and should be avoided whenever possible. This is because the virtual function you call is called from the Base class and not the derived class."
},
{
"code": null,
"e": ... |
Render Interactive plots with Matplotlib | by Parul Pandey | Towards Data Science | Good charts effectively convey information. Great charts enable, inform, and improve decision making.” — Dante Vitagliano
Interactive charts are loved by all as they can tell a story more effectively. The same is true in data science and allied fields. Exploratory data analysis is an essential step in the data preproce... | [
{
"code": null,
"e": 294,
"s": 172,
"text": "Good charts effectively convey information. Great charts enable, inform, and improve decision making.” — Dante Vitagliano"
},
{
"code": null,
"e": 639,
"s": 294,
"text": "Interactive charts are loved by all as they can tell a story mor... |
Convert Binary fraction to Decimal - GeeksforGeeks | 14 May, 2021
Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent.
Examples:
Input: n = 110.101
Output: 6.625
Input: n = 101.1101
Output: 5.8125
Following are the steps of converting binary fractional to decimal.
A) Convert the integral part of binary to decimal equivalent
Multi... | [
{
"code": null,
"e": 24806,
"s": 24778,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 24900,
"s": 24806,
"text": "Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent."
},
{
"code": null,
"e": 24910,
"s": 24900,
"text... |
Check if a given pattern exists in a given string or not - GeeksforGeeks | 11 Jun, 2021
Given two strings text and pattern of length M and N respectively, the task is to check if the pattern matches the text or not. If found to be true, then print “Yes”. Otherwise, print “No”.
Note: pattern can include the characters ‘*’ and ‘•’
‘*’ matches zero or more occurrences of character right before t... | [
{
"code": null,
"e": 24696,
"s": 24668,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 24886,
"s": 24696,
"text": "Given two strings text and pattern of length M and N respectively, the task is to check if the pattern matches the text or not. If found to be true, then print “Ye... |
Flutter - Positioned Widget - GeeksforGeeks | 10 Aug, 2021
Positioned is a widget that comes built-in with flutter SDK. Postioned does exactly what it sounds like, which is it arbitrarily positioned widgets on top of each other. It is usually used to position child widgets in Stack widget or similar. It only works for Stateless and Stateful widgets.
It is responsi... | [
{
"code": null,
"e": 23906,
"s": 23878,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 24199,
"s": 23906,
"text": "Positioned is a widget that comes built-in with flutter SDK. Postioned does exactly what it sounds like, which is it arbitrarily positioned widgets on top of each ... |
Spatial Autocorrelation: Neighbors Affecting Neighbors | by Mahbubul Alam | Towards Data Science | The purpose of this article is to introduce an important concept in geospatial analysis — “Spatial Autocorrelation” with a focus on the following things: (i) key concepts of autocorrelation; (ii) industry applications and (iii) an implementation in R
“Everything is related to everything else. But near things are more r... | [
{
"code": null,
"e": 422,
"s": 171,
"text": "The purpose of this article is to introduce an important concept in geospatial analysis — “Spatial Autocorrelation” with a focus on the following things: (i) key concepts of autocorrelation; (ii) industry applications and (iii) an implementation in R"
}... |
A Complete Logistic Regression Algorithm From Scratch in Python: Step by Step | by Rashida Nasrin Sucky | Towards Data Science | Logistic regression is a popular method since the last century. It establishes the relationship between a categorical variable and one or more independent variables. This relationship is used in machine learning to predict the outcome of a categorical variable. It is widely used in many different fields such as the med... | [
{
"code": null,
"e": 553,
"s": 172,
"text": "Logistic regression is a popular method since the last century. It establishes the relationship between a categorical variable and one or more independent variables. This relationship is used in machine learning to predict the outcome of a categorical var... |
Yen's k-Shortest Path Algorithm in Data Structure | Instead of giving a single shortest path, Yen’s k-shortest path algorithm gives k shortest paths so that we can get the second shortest path and the third shortest path and so on.
Let us consider a scenario that we have to travel from place A to place B and there are multiple routes available between place A and place ... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "Instead of giving a single shortest path, Yen’s k-shortest path algorithm gives k shortest paths so that we can get the second shortest path and the third shortest path and so on."
},
{
"code": null,
"e": 1541,
"s": 1242,
"text": "Le... |
LeafletJS - Vector Layers | In the previous chapter, we learned how to use markers in Leaflet. Along with markers, we can also add various shapes such as circles, polygons, rectangles, polylines, etc. In this chapter, we will discuss how to use the shapes provided by Google Maps.
To draw polyline overlay on a map using Leaflet JavaScript library,... | [
{
"code": null,
"e": 2051,
"s": 1798,
"text": "In the previous chapter, we learned how to use markers in Leaflet. Along with markers, we can also add various shapes such as circles, polygons, rectangles, polylines, etc. In this chapter, we will discuss how to use the shapes provided by Google Maps."... |
Java Program to subtract year from current date | Firstly, you need to import the following package for Calendar class in Java
import java.util.Calendar;
Create a Calendar object and display the current date and time
Calendar calendar = Calendar.getInstance();
System.out.println("Current Date and Time = " + calendar.getTime());
Now, let us decrement the year using the... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Firstly, you need to import the following package for Calendar class in Java"
},
{
"code": null,
"e": 1166,
"s": 1139,
"text": "import java.util.Calendar;"
},
{
"code": null,
"e": 1229,
"s": 1166,
"text": "Create ... |
Python | Intersection of two String | 27 Nov, 2018
One of the string operations can be computing the intersection of two strings i.e, output the common values that appear in both the strings.
There are various ways in Python, through which we can perform the Intersection of two strings.
Method #1 : Naive MethodCreate an empty string and check for new occur... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Nov, 2018"
},
{
"code": null,
"e": 169,
"s": 28,
"text": "One of the string operations can be computing the intersection of two strings i.e, output the common values that appear in both the strings."
},
{
"code": null,
"e... |
Java Competitive Programming Setup in VS Code with Fast I/O and Snippets | 10 May, 2022
Though C++ is the dominating language in the competitive programming universe, there is a fair share of users who still continue to use Java as it has been there seen in the development arena and at the same time can be used competitive programming being fast as it can be toggled to and fro where python be... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 698,
"s": 53,
"text": "Though C++ is the dominating language in the competitive programming universe, there is a fair share of users who still continue to use Java as it has been there seen in the ... |
Java program to expand a String if range is given? | 29 Sep, 2021
Suppose we have given a string in which some ranges as specified and we have to place the numbers which is between the given range in the specified place as provided and depicted in the illustration below as follows for a better understanding.
Illustration:
Input : string x = "1-5, 8, 11-14, 18, 20, 26-2... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 296,
"s": 52,
"text": "Suppose we have given a string in which some ranges as specified and we have to place the numbers which is between the given range in the specified place as provided and depi... |
isspace() in C/C++ and its application to count whitespace characters | 15 Jun, 2022
isspace() function In C++, isspace is a predefined function used for string and character handling.cstring is the header file required for string functions and cctype is the headerfile required for character functions. This function is used to check if the argument contains any whitespace characters. There... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 416,
"s": 52,
"text": "isspace() function In C++, isspace is a predefined function used for string and character handling.cstring is the header file required for string functions and cctype is the ... |
How to Make Java Regular Expression Case Insensitive in Java? | 09 Mar, 2021
In this article, we will learn how to make Java Regular Expression case-insensitive in Java. Java Regular Expression is used to find, match, and extract data from character sequences. Java Regular Expressions are case-sensitive by default. But with the help of Regular Expression, we can make the Java Regul... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 431,
"s": 28,
"text": "In this article, we will learn how to make Java Regular Expression case-insensitive in Java. Java Regular Expression is used to find, match, and extract data from character se... |
Combinational Sum | 23 Jun, 2022
Given an array of positive integers arr[] and a sum x, find all unique combinations in arr[] where the sum is equal to x. The same repeated number may be chosen from arr[] unlimited number of times. Elements in a combination (a1, a2, ..., ak) must be printed in non-descending order. (ie, a1 <= a2 <= ... <=... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 577,
"s": 54,
"text": "Given an array of positive integers arr[] and a sum x, find all unique combinations in arr[] where the sum is equal to x. The same repeated number may be chosen from arr[] un... |
Types of Schedules in DBMS | 04 Feb, 2020
Schedule, as the name suggests, is a process of lining the transactions and executing them one by one. When there are multiple transactions that are running in a concurrent manner and the order of operation is needed to be set so that the operations do not overlap each other, Scheduling is brought into pla... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Feb, 2020"
},
{
"code": null,
"e": 600,
"s": 54,
"text": "Schedule, as the name suggests, is a process of lining the transactions and executing them one by one. When there are multiple transactions that are running in a concurrent m... |
ReactJS Evergreen Toaster Component | 11 Jun, 2021
React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly. Toaster Component allows the user to show an ephemeral message as an overlay. We can use the following approach in ReactJS to use ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 368,
"s": 28,
"text": "React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly... |
Python | Sort JSON by value | 12 Feb, 2019
Let’s see the different ways to sort the JSON data using Python.
What is JSON ?JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data exchange format that is easy for humans and machines to read and write. JSON can represent two structured types: objects and arrays. An ob... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Feb, 2019"
},
{
"code": null,
"e": 93,
"s": 28,
"text": "Let’s see the different ways to sort the JSON data using Python."
},
{
"code": null,
"e": 541,
"s": 93,
"text": "What is JSON ?JSON (JavaScript Object Notat... |
Java Program to Print the Smallest Element in an Array | 27 Nov, 2020
Java provides a data structure, the array, which stores the collection of data of the same type. It is a fixed-size sequential collection of elements of the same type.
Example:
arr1[] = {2 , -1 , 9 , 10}
output : -1
arr2[] = {0, -10, -13, 5}
output : -13
We need to find and print the smallest value eleme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "Java provides a data structure, the array, which stores the collection of data of the same type. It is a fixed-size sequential collection of elements of the same type. "
},
... |
C# | Getting the unique identifier for the current managed thread | 01 Feb, 2019
A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as ManagedThreadId to check the unique identifier for the current managed thread. Or in other words, the value of ManagedThreadId property of a thread defines uniquely that thread with... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 426,
"s": 28,
"text": "A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as ManagedThreadId to check the unique identifier fo... |
HTML | <select> size Attribute | 09 May, 2019
The HTML size Attribute is used to specifies the number of visible options in a drop-down list.
Note: If the value of the size attribute is greater than 1 but lower that the number of options in a DropDown List. so the Browser will automatically add the scrollbar for specifying that there are more options ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2019"
},
{
"code": null,
"e": 124,
"s": 28,
"text": "The HTML size Attribute is used to specifies the number of visible options in a drop-down list."
},
{
"code": null,
"e": 344,
"s": 124,
"text": "Note: If t... |
Node.js process.env Property | 11 Apr, 2022
The process.env property is an inbuilt application programming interface of the process module which is used to get the user environment. Syntax:
process.env
Return Value: This property returns an object containing the user environment. Below examples illustrate the use of process.env property in Node.js: ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 198,
"s": 52,
"text": "The process.env property is an inbuilt application programming interface of the process module which is used to get the user environment. Syntax:"
},
{
"code": null,
... |
Python | Padding a string upto fixed length | 20 Mar, 2019
Given a string, the task is to pad string up to given specific length with whitespaces. Let’s discuss few methods to solve the given task.
Method #1: Using ljust()
# Python code to demonstrate# pad spaces in string# upto fixed length # initialising stringini_string = "123abcjw"padding_size = 15 # printin... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 191,
"s": 52,
"text": "Given a string, the task is to pad string up to given specific length with whitespaces. Let’s discuss few methods to solve the given task."
},
{
"code": null,
"e"... |
Check if given number is Emirp Number or not | 08 Jun, 2022
An Emirp Number (prime spelled backwards) is a prime number that results in a different prime when its decimal digits are reversed. This definition excludes the related palindromic primes. Examples :
Input : n = 13
Output : 13 is Emirp!
Explanation :
13 and 31 are both prime numbers.
Thus, 13 is an Emir... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 254,
"s": 52,
"text": "An Emirp Number (prime spelled backwards) is a prime number that results in a different prime when its decimal digits are reversed. This definition excludes the related palin... |
How to Color Scatterplot by a variable in Matplotlib? - GeeksforGeeks | 24 Jan, 2021
In this article, we are going to see how to color scatterplot by variable in Matplotlib. Here we will use matplotlib.pyplot.scatter() methods matplotlib library is used to draw a scatter plot. Scatter plots are widely used to represent relations among variables and how change in one affects the other.
Syn... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 24205,
"s": 23901,
"text": "In this article, we are going to see how to color scatterplot by variable in Matplotlib. Here we will use matplotlib.pyplot.scatter() methods matplotlib library is... |
Make multiple directories based on a List using Python - GeeksforGeeks | 16 May, 2021
In this article, we are going to learn how to make directories based on a list using Python. Python has the module named os which forms the core part of the python ecosystem. The os module helps us to work with operating system folders and other related functionalities. Although we can make folders/directo... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 24362,
"s": 23927,
"text": "In this article, we are going to learn how to make directories based on a list using Python. Python has the module named os which forms the core part of the python... |
Reshape pandas dataframe | Towards Data Science | There are many different ways to reshape a pandas dataframe from long to wide form. But the pivot_table() method is the most flexible and probably the only one you need to use once you learn it well, just like how you only need to learn one method melt to reshape from wide to long (see my other post below).
towardsdata... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "There are many different ways to reshape a pandas dataframe from long to wide form. But the pivot_table() method is the most flexible and probably the only one you need to use once you learn it well, just like how you only need to learn one method melt to... |
Evaluation Metrics for Clustering Models | by Soner Yıldırım | Towards Data Science | Clustering is a fundamental task in machine learning. Clustering algorithms group data points in clusters in a way that similar data points are grouped together.
The ultimate goal of a clustering algorithm is to achieve high intra-cluster similarity and low inter-cluster similarity. In other words, we want data points ... | [
{
"code": null,
"e": 334,
"s": 172,
"text": "Clustering is a fundamental task in machine learning. Clustering algorithms group data points in clusters in a way that similar data points are grouped together."
},
{
"code": null,
"e": 627,
"s": 334,
"text": "The ultimate goal of a c... |
Mongoose Virtuals - GeeksforGeeks | 24 May, 2021
Virtuals are document properties that do not persist or get stored in the MongoDB database, they only exist logically and are not written to the document’s collection.
With the get method of virtual property, we can set the value of the virtual property from existing document field values, and it returns t... | [
{
"code": null,
"e": 24454,
"s": 24426,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 24622,
"s": 24454,
"text": "Virtuals are document properties that do not persist or get stored in the MongoDB database, they only exist logically and are not written to the document’s collect... |
How to install install mariadb 10 2 centos 7 | In this article we shall learn about – how to install MariaDB 10.2 on Centos 7 / RHEL. This can be used as a guide for beginners or as a reference. Please note that, this can also be used as an alternative replacement of MySQL.
MariaDB is an open-source and an alternative relational database management software.
MariaD... | [
{
"code": null,
"e": 1290,
"s": 1062,
"text": "In this article we shall learn about – how to install MariaDB 10.2 on Centos 7 / RHEL. This can be used as a guide for beginners or as a reference. Please note that, this can also be used as an alternative replacement of MySQL."
},
{
"code": nul... |
PHP Form Handling | The PHP superglobals $_GET and $_POST are used to collect form-data.
The example below displays a simple HTML form with two input fields and a submit button:
When the user fills out the form above and clicks the submit button, the form data is sent
for processing to a PHP file named "welcome.php". The form data is sen... | [
{
"code": null,
"e": 69,
"s": 0,
"text": "The PHP superglobals $_GET and $_POST are used to collect form-data."
},
{
"code": null,
"e": 158,
"s": 69,
"text": "The example below displays a simple HTML form with two input fields and a submit button:"
},
{
"code": null,
... |
Colouring the edges by weight in networkx (Matplotlib) | To color the edges by weight in networkx, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Initialize a graph with edges, name, or graph attributes.
Add nodes to the current graph.
Add edges to the current graph's nodes.
Iterate the given graph's edges and se... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To color the edges by weight in networkx, we can take the following steps −"
},
{
"code": null,
"e": 1214,
"s": 1138,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
... |
Python 3 - dictionary setdefault() Method | The method setdefault() is similar to get(), but will set dict[key] = default if key is not already in dict.
Following is the syntax for setdefault() method −
dict.setdefault(key, default = None)
key − This is the key to be searched.
key − This is the key to be searched.
default − This is the Value to be returned in... | [
{
"code": null,
"e": 2449,
"s": 2340,
"text": "The method setdefault() is similar to get(), but will set dict[key] = default if key is not already in dict."
},
{
"code": null,
"e": 2499,
"s": 2449,
"text": "Following is the syntax for setdefault() method −"
},
{
"code": n... |
Macros and Preprocessors in C | The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. We'll refer to the C Preprocessor as CPP.
All preprocessor co... | [
{
"code": null,
"e": 1363,
"s": 1062,
"text": "The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compila... |
How to use the Subprocess Module in Python? | When you code and execute a program on Windows, MAC or Linux, your Operating System creates a process(single).It uses system resources like CPU, RAM, Disk space and also data structures in the operating system’s kernel. A process is isolated from other processes—it can’t see what other processes are doing or interfere ... | [
{
"code": null,
"e": 1393,
"s": 1062,
"text": "When you code and execute a program on Windows, MAC or Linux, your Operating System creates a process(single).It uses system resources like CPU, RAM, Disk space and also data structures in the operating system’s kernel. A process is isolated from other ... |
How can we check the list of all triggers in a database? | With the help of the SHOW TRIGGERS statement, we can list all the triggers in a particular database. It can be illustrated with the help of the following example −
mysql> Show Triggers\G
*************************** 1. row ***************************
Trigger: trigger_before_delete_sample
Event: DELETE
Table: s... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "With the help of the SHOW TRIGGERS statement, we can list all the triggers in a particular database. It can be illustrated with the help of the following example −"
},
{
"code": null,
"e": 2416,
"s": 1226,
"text": "mysql> Show Trigge... |
Teaching Cars To Drive Using Deep Learning — Steering Angle Prediction | by Eddie Forson | Towards Data Science | This is project 3 of Term 1 of the Udacity Self-Driving Car Engineer Nanodegree. You can find all code related to this project on github. You can also read my posts on previous projects:
project 1: Detecting Lane Lines Using Computer Vision
project 2: Traffic Sign Classification Using Deep Learning
Over the recent year... | [
{
"code": null,
"e": 359,
"s": 172,
"text": "This is project 3 of Term 1 of the Udacity Self-Driving Car Engineer Nanodegree. You can find all code related to this project on github. You can also read my posts on previous projects:"
},
{
"code": null,
"e": 413,
"s": 359,
"text": ... |
Queries to check if a number lies in N ranges of L-R - GeeksforGeeks | 22 Jul, 2021
Given N ranges and Q queries consisting of numbers. Every range consists of L and R. The task is to check if the given number lies in any of the given ranges or not for every query.Note: There is no overlapping range.Examples:
Input: range[] = { {5, 6}, {1, 3}, {8, 10} Q = 4 1st query: 2 2nd query: 3 3rd... | [
{
"code": null,
"e": 24615,
"s": 24587,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24844,
"s": 24615,
"text": "Given N ranges and Q queries consisting of numbers. Every range consists of L and R. The task is to check if the given number lies in any of the given ranges or no... |
How to set the page-break behavior inside an element with JavaScript? | Use the pageBreakInside property in JavaScript to set the page-break behavior inside an element. Use the auto property to insert page break inside an element. Use auto or avoid property value to automatically insert page break inside an element, if needed, or avoid a page break, respectively.
Note − The changes would b... | [
{
"code": null,
"e": 1356,
"s": 1062,
"text": "Use the pageBreakInside property in JavaScript to set the page-break behavior inside an element. Use the auto property to insert page break inside an element. Use auto or avoid property value to automatically insert page break inside an element, if need... |
Matlab-Matrix - Create a Matrix | In MATLAB, you can create a matrix by entering the elements in each row as comma. You can also create a matrix with space delimited numbers and by using the semicolons to mark the end of each row.
Let us create a simple matrix in MATLAB that has a single row and three elements. Each element should have a space or comma... | [
{
"code": null,
"e": 2196,
"s": 1999,
"text": "In MATLAB, you can create a matrix by entering the elements in each row as comma. You can also create a matrix with space delimited numbers and by using the semicolons to mark the end of each row."
},
{
"code": null,
"e": 2321,
"s": 2196... |
Sum from array values with similar key in JavaScript | Let’s say, here is an array that contains some data about the stocks sold and purchased by
some company over a period of time.
const transactions = [
['AAPL', 'buy', 100],
['WMT', 'sell', 75],
['MCD', 'buy', 125],
['GOOG', 'sell', 10],
['AAPL', 'buy', 100],
['AAPL', 'sell', 100],
['AAPL', 'sell', 2... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "Let’s say, here is an array that contains some data about the stocks sold and purchased by\nsome company over a period of time."
},
{
"code": null,
"e": 1481,
"s": 1189,
"text": "const transactions = [\n ['AAPL', 'buy', 100],\n [... |
Speeding Up and Perfecting Your Work Using Parallel Computing | by Yitong Ren | Towards Data Science | In science, behind every achievement is grinding, rigorous work. And success is unlikely to happen with one attempt. As a data scientist, you probably deal with huge amount of data and computations, perform repeated tests and experiments on your day-to-day work. Though you don’t want to turn your rewarding, stimulating... | [
{
"code": null,
"e": 612,
"s": 172,
"text": "In science, behind every achievement is grinding, rigorous work. And success is unlikely to happen with one attempt. As a data scientist, you probably deal with huge amount of data and computations, perform repeated tests and experiments on your day-to-da... |
Adding an image to SAP Adobe form from MIME repository | Note that Image must be uploaded from system to MIME beforehand.
Run Transaction SE78 → Upload (F5).
You have to declare 2 variables in the interface - global data with types string and xstring, You need to change the data declaration as below −
data: gv_bmp_watermark type xstring.
constants: gc_url_watermark type stri... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "Note that Image must be uploaded from system to MIME beforehand."
},
{
"code": null,
"e": 1163,
"s": 1127,
"text": "Run Transaction SE78 → Upload (F5)."
},
{
"code": null,
"e": 1308,
"s": 1163,
"text": "You have t... |
FOCL Algorithm - GeeksforGeeks | 26 Nov, 2020
Prerequisite : FOIL Algorithm
The First Order Combined Learner (FOCL) Algorithm is an extension of the purely inductive, FOIL Algorithm. It uses domain theory to further improve the search for the best-rule and greatly improves accuracy. It incorporates the methods of Explanation-Based learning (EBL) into ... | [
{
"code": null,
"e": 24264,
"s": 24236,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 24294,
"s": 24264,
"text": "Prerequisite : FOIL Algorithm"
},
{
"code": null,
"e": 24685,
"s": 24294,
"text": "The First Order Combined Learner (FOCL) Algorithm is an exte... |
Setup Sending Email in Django Project - GeeksforGeeks | 11 May, 2020
Haven’t you observed, when you register on some websites, you get a mail from that company or institution? The email would be, verification email or welcome email, account creation successful email or thanks-regard email, etc. For example, when you create a Google account, the first mail you get would be s... | [
{
"code": null,
"e": 25723,
"s": 25695,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 26369,
"s": 25723,
"text": "Haven’t you observed, when you register on some websites, you get a mail from that company or institution? The email would be, verification email or welcome email,... |
Object Compression in Java with Examples - GeeksforGeeks | 13 May, 2022
Object Compression is the process of reducing the size of the object with the help of various classes and methods. The receiver then retrieves full information by decompressing the object which is compressed by the sender. Take a look at below figure to distinguish the size of the file before compressing a... | [
{
"code": null,
"e": 25619,
"s": 25591,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 25967,
"s": 25619,
"text": "Object Compression is the process of reducing the size of the object with the help of various classes and methods. The receiver then retrieves full information by ... |
MongoDB: An introduction - GeeksforGeeks | 15 Dec, 2021
MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based on the table-like relational database structure but provides an altogether different mechanism for storage and retrieval of data. This format of... | [
{
"code": null,
"e": 25244,
"s": 25216,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 25603,
"s": 25244,
"text": "MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based ... |
Introduction of General Register based CPU Organization - GeeksforGeeks | 24 Feb, 2022
When we are using multiple general-purpose registers, instead of a single accumulator register, in the CPU Organization then this type of organization is known as General register-based CPU Organization. In this type of organization, the computer uses two or three address fields in their instruction format... | [
{
"code": null,
"e": 28707,
"s": 28679,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 29298,
"s": 28707,
"text": "When we are using multiple general-purpose registers, instead of a single accumulator register, in the CPU Organization then this type of organization is known as ... |
Operators in C / C++ - GeeksforGeeks | 23 Nov, 2021
Operators are the foundation of any programming language. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands. For example, ‘+’ is an operator used for addition, as shown bel... | [
{
"code": null,
"e": 28283,
"s": 28255,
"text": "\n23 Nov, 2021"
},
{
"code": null,
"e": 28596,
"s": 28283,
"text": "Operators are the foundation of any programming language. We can define operators as symbols that help us to perform specific mathematical and logical computations... |
Python program to print all positive numbers in a range - GeeksforGeeks | 26 Oct, 2018
Given start and end of a range, write a Python program to print all positive numbers in given range.
Example:
Input: start = -4, end = 5
Output: 0, 1, 2, 3, 4, 5
Input: start = -3, end = 4
Output: 0, 1, 2, 3, 4
Example #1: Print all positive numbers from given list using for loop
Define start and end lim... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n26 Oct, 2018"
},
{
"code": null,
"e": 25662,
"s": 25561,
"text": "Given start and end of a range, write a Python program to print all positive numbers in given range."
},
{
"code": null,
"e": 25671,
"s": 25662,
... |
Python Program to Reverse the Content of a File using Stack - GeeksforGeeks | 04 Feb, 2022
Given a file, the task is to print as well as store the lines of that file in reverse order using Stack.Examples:
Input :
I am
new to this
world of
Python.
Output :
Python.
world of
new to this
I am
Input :
1
2
3
4
5
Output :
5
4
3
2
1
Approach:
Create an empty stack.
One by one push every line of... | [
{
"code": null,
"e": 25562,
"s": 25534,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 25678,
"s": 25562,
"text": "Given a file, the task is to print as well as store the lines of that file in reverse order using Stack.Examples: "
},
{
"code": null,
"e": 25803,
... |
Perl | Boolean Values - GeeksforGeeks | 21 Aug, 2021
In most of the programming language True and False are considered as the boolean values. But Perl does not provide the type boolean for True and False. In general, a programmer can use the term “boolean” when a function returns either True or False. Like conditional statements(if, while, etc.) will return ... | [
{
"code": null,
"e": 26551,
"s": 26523,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 26902,
"s": 26551,
"text": "In most of the programming language True and False are considered as the boolean values. But Perl does not provide the type boolean for True and False. In general,... |
Queries to find kth smallest element and point update : Ordered Set in C++ - GeeksforGeeks | 14 Apr, 2020
Given an array arr[] of size N and a set Q[][] containing M queries, the task is to execute the queries on the given array such that there can be two types of queries:
Type 1: [i, x] – Update the element at ith index to x.
Type 2: [k] – Find the kth smallest element in the array.
Examples:
Input: arr[] = {... | [
{
"code": null,
"e": 25731,
"s": 25703,
"text": "\n14 Apr, 2020"
},
{
"code": null,
"e": 25899,
"s": 25731,
"text": "Given an array arr[] of size N and a set Q[][] containing M queries, the task is to execute the queries on the given array such that there can be two types of quer... |
Perfect Cubes in a Range | Practice | GeeksforGeeks | Given two given numbers a and b where 1<= a <= b, find the perfect cubes between a and b (a and b inclusive).
Example 1:
Input: a = 1, b = 100
Output: 1 8 27 64
Explaination: These are the proper cubes between
1 and 100.
Example 2:
Input: a = 24, b = 576
Output: 27 64 125 216 343 512
Explaination: These are the proper... | [
{
"code": null,
"e": 348,
"s": 238,
"text": "Given two given numbers a and b where 1<= a <= b, find the perfect cubes between a and b (a and b inclusive)."
},
{
"code": null,
"e": 359,
"s": 348,
"text": "Example 1:"
},
{
"code": null,
"e": 460,
"s": 359,
"text... |
Charset defaultCharset() method in Java with Examples - GeeksforGeeks | 29 Mar, 2019
The defaultCharset() method is a built-in method of the java.nio.charset which returns the charset object for the default charset. The default charset is basically determined by the Java virtual machine and it basically depends on the charset which is in the underlying operating system of the machine. In s... | [
{
"code": null,
"e": 26293,
"s": 26265,
"text": "\n29 Mar, 2019"
},
{
"code": null,
"e": 26652,
"s": 26293,
"text": "The defaultCharset() method is a built-in method of the java.nio.charset which returns the charset object for the default charset. The default charset is basically... |
Java Program to Create blank Excel Sheet - GeeksforGeeks | 04 Mar, 2022
ApachePOI stands for poor obfuscation Implementation which is a Java API for reading and writing Microsoft documents. It contains classes and interfaces namely Wordbook, Sheet, Row, and Cell. Apache POI can be used to access ‘xlsx’ extension files and as well as ‘xlsx’ extension files
Concept: ApachePOI, j... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 25933,
"s": 25647,
"text": "ApachePOI stands for poor obfuscation Implementation which is a Java API for reading and writing Microsoft documents. It contains classes and interfaces namely Wor... |
Moore Machines implementation in C++ - GeeksforGeeks | 20 Aug, 2021
Moore Machines: A Moore Machine is basically a DFA with an output associated with every state. These machines can be used for a wide variety of tasks such as counting occurrences of a particular substring in a given string, finding 2’s complement of a binary number, etc.
Working of Moore Machine:
It has an... | [
{
"code": null,
"e": 25627,
"s": 25599,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 25899,
"s": 25627,
"text": "Moore Machines: A Moore Machine is basically a DFA with an output associated with every state. These machines can be used for a wide variety of tasks such as count... |
Program for Picard's iterative method | Computational Mathematics - GeeksforGeeks | 28 Jun, 2019
The Picard’s method is an iterative method and is primarily used for approximating solutions to differential equations.
This method of solving a differential equation approximately is one of successive approximation; that is, it is an iterative method in which the numerical results become more and more acc... | [
{
"code": null,
"e": 26333,
"s": 26305,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 26453,
"s": 26333,
"text": "The Picard’s method is an iterative method and is primarily used for approximating solutions to differential equations."
},
{
"code": null,
"e": 26674,... |
Python | Numpy matrix.max() - GeeksforGeeks | 15 Apr, 2019
With the help of Numpy matrix.max() method, we can get the maximum value from given matrix.
Syntax : matrix.max()
Return : Return maximum value from given matrix
Example #1 :In this example we can see that we are able to get the maximum value from a given matrix with the help of method matrix.max().
# impo... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 25629,
"s": 25537,
"text": "With the help of Numpy matrix.max() method, we can get the maximum value from given matrix."
},
{
"code": null,
"e": 25651,
"s": 25629,
"text":... |
Up and running with Milvus. A Vector Similarity Search Engine... | by David Shvimer | Towards Data Science | A vector similarity search engine that seems to be production ready. According to the website:
It offers a variety of similarity metrics and index types.
Scales horizontally.
Reading and writing happens in near real time, this means we can insert records while the engine is online.
Exposes a REST interface.
Sounds pret... | [
{
"code": null,
"e": 267,
"s": 172,
"text": "A vector similarity search engine that seems to be production ready. According to the website:"
},
{
"code": null,
"e": 326,
"s": 267,
"text": "It offers a variety of similarity metrics and index types."
},
{
"code": null,
... |
Spring Cloud - Circuit Breaker using Hystrix | In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. When services communicate synchronously, there can be multiple reasons where things can break. For example −
Callee service unavailable − The service which is being called is ... | [
{
"code": null,
"e": 2132,
"s": 1878,
"text": "In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. When services communicate synchronously, there can be multiple reasons where things can break. For example −... |
How to call an activity method from a fragment in Android App? | This example demonstrates how do I call an activity method from a fragment 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="1.0" encoding="utf-8"?>
... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "This example demonstrates how do I call an activity method from a fragment in android."
},
{
"code": null,
"e": 1278,
"s": 1149,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required... |
DivideByZeroException Class in C# | C# exceptions are represented by classes. The exception classes in C# are mainly directly or indirectly derived from the System.Exception class. Some of the exception classes derived from the System.Exception class are the System.ApplicationException and System.SystemException classes.
System.DivideByZeroException is a... | [
{
"code": null,
"e": 1349,
"s": 1062,
"text": "C# exceptions are represented by classes. The exception classes in C# are mainly directly or indirectly derived from the System.Exception class. Some of the exception classes derived from the System.Exception class are the System.ApplicationException an... |
Python Program to accept string ending with alphanumeric character | When it is required to check if a string ends with an alphanumeric character or not, the regular expression is used. A method is defined that checks to see an alphanumeric characters, and returns the string as output.
Below is a demonstration of the same
import re
regex_expression = '[a-zA-z0-9]$'
def check_string(my... | [
{
"code": null,
"e": 1280,
"s": 1062,
"text": "When it is required to check if a string ends with an alphanumeric character or not, the regular expression is used. A method is defined that checks to see an alphanumeric characters, and returns the string as output."
},
{
"code": null,
"e"... |
One Shot Learning with Siamese Networks using Keras | by Harshall Lamba | Towards Data Science | IntroductionPrerequisitesClassification vs One Shot LearningApplicationsOmniglot DatasetLoading the datasetMapping the problem to binary classification taskModel Architecture and TrainingValidating the ModelBaseline 1 — Nearest Neighbor ModelBaseline 2 — Random ModelTest Results and InferenceConclusionReferences
Introd... | [
{
"code": null,
"e": 486,
"s": 172,
"text": "IntroductionPrerequisitesClassification vs One Shot LearningApplicationsOmniglot DatasetLoading the datasetMapping the problem to binary classification taskModel Architecture and TrainingValidating the ModelBaseline 1 — Nearest Neighbor ModelBaseline 2 — ... |
How to create chart using bootstrap ? - GeeksforGeeks | 09 Jul, 2021
A chart in bootstrap is a graphical representation for data visualization, in which the data is represented by symbols. The various types of charts like a bar chart, line chart, pie chart, donut chart, etc are created with the help of Bootstrap. In other words, we can say that chart is a type of diagram or... | [
{
"code": null,
"e": 25620,
"s": 25592,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 26005,
"s": 25620,
"text": "A chart in bootstrap is a graphical representation for data visualization, in which the data is represented by symbols. The various types of charts like a bar char... |
What is the difference between = and: = assignment operators? | Actually, they both are assignment operator and used to assign values but the significant difference between them is as follows −
= operator assigns a value either as a part of the SET statement or as a part of the SET clause in an UPDATE statement, in any other case = operator is interpreted as a comparison operator. ... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "Actually, they both are assignment operator and used to assign values but the significant difference between them is as follows −"
},
{
"code": null,
"e": 1483,
"s": 1192,
"text": "= operator assigns a value either as a part of the S... |
Getting started with PyTorch. Learn the basics through examples | by André Ribeiro | Towards Data Science | In my previous post “Getting started with Tensorflow” I mentioned that both Tensorflow and PyTorch are great choices if you want to build small or large scale deep learning solutions. Both platforms are widely used in academia and industry, are well maintained and open-source, provide simple APIs and high-level functio... | [
{
"code": null,
"e": 500,
"s": 172,
"text": "In my previous post “Getting started with Tensorflow” I mentioned that both Tensorflow and PyTorch are great choices if you want to build small or large scale deep learning solutions. Both platforms are widely used in academia and industry, are well maint... |
Add dictionary to tuple in Python | When it is required to add a dictionary to a tuple, the 'list' method, the 'append', and the 'tuple' method can be used.
A list can be used to store heterogeneous values (i.e data of any data type like integer, floating point, strings, and so on).
The 'append' method adds elements to the end of the list.
Below is a dem... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "When it is required to add a dictionary to a tuple, the 'list' method, the 'append', and the 'tuple' method can be used."
},
{
"code": null,
"e": 1310,
"s": 1183,
"text": "A list can be used to store heterogeneous values (i.e data of... |
What are Forward declarations in C++ - GeeksforGeeks | 28 Nov, 2019
Forward Declaration refers to the beforehand declaration of the syntax or signature of an identifier, variable, function, class, etc. prior to its usage (done later in the program).Example:
// Forward Declaration of the sum()
void sum(int, int);
// Usage of the sum
void sum(int a, int b)
{
// Body
}
... | [
{
"code": null,
"e": 24175,
"s": 24147,
"text": "\n28 Nov, 2019"
},
{
"code": null,
"e": 24365,
"s": 24175,
"text": "Forward Declaration refers to the beforehand declaration of the syntax or signature of an identifier, variable, function, class, etc. prior to its usage (done late... |
GATE | GATE-CS-2015 (Set 2) | Question 29 - GeeksforGeeks | 07 Sep, 2021
Match the following:
List-I List-II
A. Lexical analysis 1. Graph coloring
B. Parsing 2. DFA minimization
C. Register allocation 3. Post-order traversal
D. Expression evaluation 4. Production tree
Codes:
A B C D
(a) 2 3 1 4
(b) 2 1 4 3
(c) 2 4 1 3
(d) 2 3 ... | [
{
"code": null,
"e": 24536,
"s": 24508,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 24557,
"s": 24536,
"text": "Match the following:"
},
{
"code": null,
"e": 24780,
"s": 24557,
"text": " List-I List-II\nA. Lexical analysis 1. G... |
Interrupts in Arduino | As the name suggests, interrupts are routines that interrupt the normal code flow. An interrupt routine contains a piece of code that the microcontroller on your board should execute whenever an event occurs. Take the air-conditioner example. Suppose it has the following temperature control settings: Switch off cooling... | [
{
"code": null,
"e": 1703,
"s": 1062,
"text": "As the name suggests, interrupts are routines that interrupt the normal code flow. An interrupt routine contains a piece of code that the microcontroller on your board should execute whenever an event occurs. Take the air-conditioner example. Suppose it... |
Count of all possible combinations of K numbers that sums to N - GeeksforGeeks | 03 Jan, 2022
Given a number N, the task is to count the combinations of K numbers from 1 to N having a sum equal to N, with duplicates allowed.
Example:
Input: N = 7, K = 3Output:15Explanation:The combinations which lead to the sum N = 7 are: {1, 1, 5}, {1, 5, 1}, {5, 1, 1}, {2, 1, 4}, {1, 2, 4}, {1, 4, 2}, {2, 4, 1}, ... | [
{
"code": null,
"e": 25088,
"s": 25060,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 25219,
"s": 25088,
"text": "Given a number N, the task is to count the combinations of K numbers from 1 to N having a sum equal to N, with duplicates allowed."
},
{
"code": null,
... |
Classify Toxic Online Comments with LSTM and GloVe | by Susan Li | Towards Data Science | This article shows how to use a simple LSTM and one of the pre-trained GloVe files to create a strong baseline for the toxic comments classification problem.
The article consist of 4 main sections:
Preparing the data
Implementing a simple LSTM (RNN) model
Training the model
Evaluating the model
In the following steps, ... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "This article shows how to use a simple LSTM and one of the pre-trained GloVe files to create a strong baseline for the toxic comments classification problem."
},
{
"code": null,
"e": 370,
"s": 330,
"text": "The article consist of 4 mai... |
Custom fonts in Power BI — everything you wanted to know! | by Nikola Ilic | Towards Data Science | I like Power BI, I really do! If you follow my articles carefully, you would have realized that I truly consider Power BI as an awesome tool — because it gives you an infinite number of possibilities to tell your data story. And, I’m not referring only to out-of-the-box solutions, but also custom-made ones.
However, I’... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "I like Power BI, I really do! If you follow my articles carefully, you would have realized that I truly consider Power BI as an awesome tool — because it gives you an infinite number of possibilities to tell your data story. And, I’m not referring only to... |
How to use PowerShell Break with the Label. | When the break statement is mentioned with the Label, PowerShell exits to the label instead of exiting the current loop.
$i = 1
while ($i -lt 10) {
Write-Output "i = $i"
if($i -eq 5){
Write-Output "Break statement executed"
Break :mylable
}
$i++
}
Write-Output "Entering to another loop"
$j = 1
:... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "When the break statement is mentioned with the Label, PowerShell exits to the label instead of exiting the current loop."
},
{
"code": null,
"e": 1442,
"s": 1183,
"text": "$i = 1\nwhile ($i -lt 10) {\n Write-Output \"i = $i\"\n i... |
How to use Python Numpy to generate Random Numbers? | The random module in Numpy package contains many functions for generation of random numbers
numpy.random.rand() − Create an array of the given shape and populate it with random samples
>>> import numpy as np
>>> np.random.rand(3,2)
array([[0.10339983, 0.54395499],
[0.31719352, 0.51220189],
[0.98935914, 0.8240609 ]])
nu... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "The random module in Numpy package contains many functions for generation of random numbers"
},
{
"code": null,
"e": 1247,
"s": 1154,
"text": "numpy.random.rand() − Create an array of the given shape and populate it with random sampl... |
DAX Time Intelligence - TOTALMTD function | Evaluates the value of the expression for the month to date, in the current context.
TOTALMTD (<expression>, <dates>, [<filter>])
expression
An expression that returns a scalar value.
dates
A column that contains dates.
filter
Optional.
An expression that specifies a filter to apply to the current context.
A scalar v... | [
{
"code": null,
"e": 2086,
"s": 2001,
"text": "Evaluates the value of the expression for the month to date, in the current context."
},
{
"code": null,
"e": 2133,
"s": 2086,
"text": "TOTALMTD (<expression>, <dates>, [<filter>]) \n"
},
{
"code": null,
"e": 2144,
"s... |
Return pointer from functions in C | We have seen in the last chapter how C programming allows to return an array from a function. Similarly, C also allows to return a pointer from a function. To do so, you would have to declare a function returning a pointer as in the following example −
int * myFunction() {
.
.
.
}
Second point to remember is t... | [
{
"code": null,
"e": 2337,
"s": 2084,
"text": "We have seen in the last chapter how C programming allows to return an array from a function. Similarly, C also allows to return a pointer from a function. To do so, you would have to declare a function returning a pointer as in the following example −"... |
CSV file management using C++ - GeeksforGeeks | 25 Jun, 2020
CSV is a simple file format used to store tabular data such as a spreadsheet or a database. CSV stands for Comma Separated Values. The data fields in a CSV file are separated/delimited by a comma (‘, ‘) and the individual rows are separated by a newline (‘\n’). CSV File management in C++ is similar to text... | [
{
"code": null,
"e": 26960,
"s": 26932,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 27322,
"s": 26960,
"text": "CSV is a simple file format used to store tabular data such as a spreadsheet or a database. CSV stands for Comma Separated Values. The data fields in a CSV file ar... |
Check if there exists any sub-sequence in a string which is not palindrome - GeeksforGeeks | 10 Aug, 2021
Given a string of lowercase English alphabets. The task is to check if there exists any subsequence in the string which is not a palindrome. If there is at least 1 subsequence that is not a palindrome then print YES, otherwise print NO.Examples:
Input : str = "abaab"
Output : YES
Subsequences "ab" or "ab... | [
{
"code": null,
"e": 25028,
"s": 25000,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 25276,
"s": 25028,
"text": "Given a string of lowercase English alphabets. The task is to check if there exists any subsequence in the string which is not a palindrome. If there is at least 1... |
How to check if multiple strings exist in another string in Python? | To check if any of the strings in an array exists in another string, you can use the any function.
arr = ['a', 'e', 'i', 'o', 'u']
str = "hello people"
if any(c in str for c in arr):
print "Found a match"
This will give you the output:
Found a match
Though an overkill, you can also use regex to match the array. Fo... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To check if any of the strings in an array exists in another string, you can use the any function. "
},
{
"code": null,
"e": 1272,
"s": 1162,
"text": "arr = ['a', 'e', 'i', 'o', 'u']\nstr = \"hello people\"\nif any(c in str for c in ... |
How to set background color of a view in Android App | This example demonstrates about How do I change the color of Button in Android when clicked.
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="1.0" encoding="utf... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrates about How do I change the color of Button in Android when clicked."
},
{
"code": null,
"e": 1284,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 23 Dec, 2020
Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in t... | [
{
"code": null,
"e": 24506,
"s": 24478,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 24942,
"s": 24506,
"text": "Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined pro... |
RSpec - Expectations | When you learn RSpec, you may read a lot about expectations and it can be a bit confusing at first. There are two main details you should keep in mind when you see the term Expectation −
An Expectation is simply a statement in an it block that uses the expect() method. That’s it. It’s no more complicated than that. Whe... | [
{
"code": null,
"e": 1981,
"s": 1794,
"text": "When you learn RSpec, you may read a lot about expectations and it can be a bit confusing at first. There are two main details you should keep in mind when you see the term Expectation −"
},
{
"code": null,
"e": 2569,
"s": 1981,
"tex... |
RxJS - Transformation Operator groupBy | In groupBy operator, the output is grouped based on a specific condition and these group items are emitted as GroupedObservable.
groupBy(keySelector_func: (value: T) => K):GroupedObservables
keySelector_func − A function that gives the key for each item from the source observable.
The return value is an Observable tha... | [
{
"code": null,
"e": 1953,
"s": 1824,
"text": "In groupBy operator, the output is grouped based on a specific condition and these group items are emitted as GroupedObservable."
},
{
"code": null,
"e": 2016,
"s": 1953,
"text": "groupBy(keySelector_func: (value: T) => K):GroupedObs... |
5 Levels of Generating Weighted Random Numbers in Python | by Yang Zhou | Towards Data Science | To get a random number in Python is simple, since there is a built-in module called random. But how about weighted random numbers?
Let’s see a real interview question:
There is a dictionary as following:
my_nums = {'A': 5, 'B': 2, 'C': 2, 'D': 1}
The keys are four letters and the values are their weights.
Please design... | [
{
"code": null,
"e": 177,
"s": 46,
"text": "To get a random number in Python is simple, since there is a built-in module called random. But how about weighted random numbers?"
},
{
"code": null,
"e": 214,
"s": 177,
"text": "Let’s see a real interview question:"
},
{
"code... |
Using Python and Monte Carlo to predict my Student Loan Repayment | by Luke Vassor | Towards Data Science | I became frustrated with the numbers not making sense on my Student Loan statements and speculative opinions about why you should not try to pay it off quicker if you are able to. I wanted to gauge my likelihood of paying off the full loan and practice my Data Science skills, so I simulated my earnings using Monte Carl... | [
{
"code": null,
"e": 446,
"s": 46,
"text": "I became frustrated with the numbers not making sense on my Student Loan statements and speculative opinions about why you should not try to pay it off quicker if you are able to. I wanted to gauge my likelihood of paying off the full loan and practice my ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.