title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Introduction to Keras, Part Two: Data Preprocessing | by Samhita Alla | Towards Data Science | In the first part of this series, you’ve implemented various data loading techniques. You’ve seen how to load images, text, CSV files, and NumPy arrays into your Keras workspace.
Now to enable the model to make a rightful usage of your data, you’d have to convert it into an understandable format which could then be int... | [
{
"code": null,
"e": 351,
"s": 172,
"text": "In the first part of this series, you’ve implemented various data loading techniques. You’ve seen how to load images, text, CSV files, and NumPy arrays into your Keras workspace."
},
{
"code": null,
"e": 579,
"s": 351,
"text": "Now to ... |
Using Genetic Algorithms to Train Neural Networks | by Victor Sim | Towards Data Science | Many people use genetic algorithms as unsupervised algorithms, to optimize agents in certain environments, but do not realize that the implementation of neural networks into the agents as a possibility.
Genetic Algorithms are a type of learning algorithm, that uses the idea that crossing over the weights of two good ne... | [
{
"code": null,
"e": 374,
"s": 171,
"text": "Many people use genetic algorithms as unsupervised algorithms, to optimize agents in certain environments, but do not realize that the implementation of neural networks into the agents as a possibility."
},
{
"code": null,
"e": 547,
"s": 3... |
Calculating New and Returning Customers in R | by Hamza Rafiq | Towards Data Science | I recently came across an issue in which I wanted to calculate new and returning customers. So, I naturally googled about it and was surprised to see that I could not find any solutions on it in R. This has generally been the issue with most blogs/tutorials on R, that they are not very business orientated.
Since I coul... | [
{
"code": null,
"e": 480,
"s": 172,
"text": "I recently came across an issue in which I wanted to calculate new and returning customers. So, I naturally googled about it and was surprised to see that I could not find any solutions on it in R. This has generally been the issue with most blogs/tutoria... |
Check if a number is positive, negative or zero using bit operators - GeeksforGeeks | 23 Feb, 2021
Given a number N, check if it is positive, negative or zero without using conditional statements.Examples:
Input : 30
Output : 30 is positive
Input : -20
Output : -20 is negative
Input: 0
Output: 0 is zero
The signed shift n>>31 converts every negative number into -1 and every other into 0. When we d... | [
{
"code": null,
"e": 25108,
"s": 25080,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25217,
"s": 25108,
"text": "Given a number N, check if it is positive, negative or zero without using conditional statements.Examples: "
},
{
"code": null,
"e": 25318,
"s": 2... |
Difference between mouseover, mouseenter and mousemove events in JavaScript - GeeksforGeeks | 19 Feb, 2020
Events in JavaScript provide a dynamic interface to the webpage. There are wide variety of events such as user clicking, moving the mouse over an element, etc. Events that occur when the mouse interacts with the HTML document falls under the category of MouseEvent property.
mouseover: The onmouseover event... | [
{
"code": null,
"e": 24730,
"s": 24702,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 25005,
"s": 24730,
"text": "Events in JavaScript provide a dynamic interface to the webpage. There are wide variety of events such as user clicking, moving the mouse over an element, etc. Eve... |
Emotion Detection using Bidirectional LSTM - GeeksforGeeks | 30 Sep, 2021
Emotion Detection is one of the hottest topics in research nowadays. Emotion sensing technology can facilitate communication between machines and humans. It will also help to improve the decision-making process. Many Machine Learning Models have been proposed to recognize emotions from the text. But, in th... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 25122,
"s": 24344,
"text": "Emotion Detection is one of the hottest topics in research nowadays. Emotion sensing technology can facilitate communication between machines and humans. It will a... |
Clojure - Variables | In Clojure, variables are defined by the ‘def’ keyword. It’s a bit different wherein the concept of variables has more to do with binding. In Clojure, a value is bound to a variable. One key thing to note in Clojure is that variables are immutable, which means that in order for the value of the variable to change, it n... | [
{
"code": null,
"e": 2736,
"s": 2374,
"text": "In Clojure, variables are defined by the ‘def’ keyword. It’s a bit different wherein the concept of variables has more to do with binding. In Clojure, a value is bound to a variable. One key thing to note in Clojure is that variables are immutable, whic... |
MongoDB - Database References | As seen in the last chapter of MongoDB relationships, to implement a normalized database structure in MongoDB, we use the concept of Referenced Relationships also referred to as Manual References in which we manually store the referenced document's id inside other document. However, in cases where a document contains r... | [
{
"code": null,
"e": 2938,
"s": 2553,
"text": "As seen in the last chapter of MongoDB relationships, to implement a normalized database structure in MongoDB, we use the concept of Referenced Relationships also referred to as Manual References in which we manually store the referenced document's id i... |
Python Data Types | In programming, data type is an important concept.
Variables can store data of different types, and different types can do
different things.
Python has the following data types built-in by default, in these categories:
You can get the data type of any object by using the type() function:
Print the data type of the var... | [
{
"code": null,
"e": 51,
"s": 0,
"text": "In programming, data type is an important concept."
},
{
"code": null,
"e": 142,
"s": 51,
"text": "Variables can store data of different types, and different types can do \ndifferent things."
},
{
"code": null,
"e": 220,
"... |
What does the method size() do in java? | The size() method of the class java.util.ArrayList returns the number of elements in this list i.e. the size of the list.
import java.util.ArrayList;
public class ArrayListDemo {
public static void main(String[] args) {
ArrayList<Integer> arrlist = new ArrayList<Integer>(5);
arrlist.add(15);
arrli... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "The size() method of the class java.util.ArrayList returns the number of elements in this list i.e. the size of the list."
},
{
"code": null,
"e": 1634,
"s": 1184,
"text": "import java.util.ArrayList;\n\npublic class ArrayListDemo {\... |
Binary Search a String - GeeksforGeeks | 28 Jun, 2021
Given a sorted array of Strings and a String x, find an index of x if it is present in the array.
Examples:
Input : arr[] = {"contribute", "geeks", "ide", "practice"}, x = "ide"
Output : 2
The String x is present at index 2.
Input : arr[] = {"contribute", "geeks", "ide", "practice"}, x = "zz"
Output : ... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24320,
"s": 24222,
"text": "Given a sorted array of Strings and a String x, find an index of x if it is present in the array."
},
{
"code": null,
"e": 24330,
"s": 24320,
"... |
MySQL query to extract last word from a field? | To extract last word from a field, use in-built SUBSTRING_INDEX() function. The syntax is as follows −
SELECT SUBSTRING_INDEX(yourColumnName,’ ‘,-1) as anyVariableName from yourTableName;
To understand the above concept, let us create a table. The following is the query to create a table −
mysql> create table FirstWord... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "To extract last word from a field, use in-built SUBSTRING_INDEX() function. The syntax is as follows −"
},
{
"code": null,
"e": 1250,
"s": 1165,
"text": "SELECT SUBSTRING_INDEX(yourColumnName,’ ‘,-1) as anyVariableName from yourTable... |
Output in C++ - GeeksforGeeks | 01 Feb, 2021
In this article, we will discuss the very basic and most common I/O operations required for C++ programming. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc. This is the most basic method for handling output in C++.The cout is used very often for printing outputs i.e.., on the monitor. Th... | [
{
"code": null,
"e": 23731,
"s": 23703,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 24239,
"s": 23731,
"text": "In this article, we will discuss the very basic and most common I/O operations required for C++ programming. C++ runs on lots of platforms like Windows, Linux, Uni... |
How to create a working slider using HTML and CSS ? - GeeksforGeeks | 03 Dec, 2020
A slider is a set of frames in a sequence that can be traversed respectively. This article exhibits the approach to build a slideshow with the use of only HTML and CSS.
At first, enter the basic HTML code and then add the radio buttons for the frames using type as radio. After that, implement the designs o... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 25154,
"s": 24985,
"text": "A slider is a set of frames in a sequence that can be traversed respectively. This article exhibits the approach to build a slideshow with the use of only HTML and... |
Add values of two columns considering NULL values as zero in MySQL | For this, use COALESCE() function from MySQL. Let us first create a table −
mysql> create table DemoTable
-> (
-> Value1 int,
-> Value2 int
-> );
Query OK, 0 rows affected (0.51 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(100,200);
Query OK, 1 row affected (0.27 sec)... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "For this, use COALESCE() function from MySQL. Let us first create a table −"
},
{
"code": null,
"e": 1245,
"s": 1138,
"text": "mysql> create table DemoTable\n-> (\n-> Value1 int,\n-> Value2 int\n-> );\nQuery OK, 0 rows affected (0.51... |
HSBC interview Experience | Set 2 (On-Campus) - GeeksforGeeks | 21 Aug, 2016
Interview experience:2 profiles , one for legacy technologies one for new age technologies(big data, cloud computing,data analytics)
Round 1:Written round consisting of 5 sections verbal(passage / article consisting of 20 blanks),analytical/aptitude(very basic questions),attention(very easy),C&Data Structu... | [
{
"code": null,
"e": 24695,
"s": 24667,
"text": "\n21 Aug, 2016"
},
{
"code": null,
"e": 24828,
"s": 24695,
"text": "Interview experience:2 profiles , one for legacy technologies one for new age technologies(big data, cloud computing,data analytics)"
},
{
"code": null,
... |
Path getRoot() method in Java with Examples - GeeksforGeeks | 16 Jul, 2019
The Java Path interface was added to Java NIO in Java 7. The Path interface is located in the java.nio.file package, so the fully qualified name of the Java Path interface is java.nio.file.Path. A Java Path instance represents a path in the file system. A path can use to locate either a file or a directory... | [
{
"code": null,
"e": 24902,
"s": 24874,
"text": "\n16 Jul, 2019"
},
{
"code": null,
"e": 25460,
"s": 24902,
"text": "The Java Path interface was added to Java NIO in Java 7. The Path interface is located in the java.nio.file package, so the fully qualified name of the Java Path i... |
std::list::sort in C++ STL - GeeksforGeeks | 17 Jan, 2018
Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and deletion operations are costlier as compared to the insertion and deletion option in Lists.
sort() function is used to sort the elements of the cont... | [
{
"code": null,
"e": 25732,
"s": 25704,
"text": "\n17 Jan, 2018"
},
{
"code": null,
"e": 25983,
"s": 25732,
"text": "Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and dele... |
How to access nested json objects in JavaScript? | Accessing nested json objects is just like accessing nested arrays. Nested objects are the objects that are inside an another object.
In the following example 'vehicles' is a object which is inside a main object called 'person'. Using dot notation the nested objects' property(car) is accessed.
Live Demo
<html>
<body>
<... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Accessing nested json objects is just like accessing nested arrays. Nested objects are the objects that are inside an another object."
},
{
"code": null,
"e": 1357,
"s": 1196,
"text": "In the following example 'vehicles' is a object ... |
How to disable dragging an image from an HTML page using JavaScript/jQuery ? - GeeksforGeeks | 12 Sep, 2019
Drag and Drop is a very interactive and user-friendly concept which makes it easier to move an object to a different location by dragging it. It allows the user to click and hold the mouse button over an element, drag it to another location, and release the mouse button to drop the element there. In HTML 5... | [
{
"code": null,
"e": 25890,
"s": 25862,
"text": "\n12 Sep, 2019"
},
{
"code": null,
"e": 26508,
"s": 25890,
"text": "Drag and Drop is a very interactive and user-friendly concept which makes it easier to move an object to a different location by dragging it. It allows the user to... |
How to set cookies to expire in 1 hour in JavaScript? | You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time.
You can try to run the following example to set cookies to expire in 1 hour −
<html>
<head>
... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time."
},
{
"code": null,
"e... |
How to get the attribute value of a web element in Selenium (using Java or Python)? | We can get the attribute value of a web element with Selenium webdriver using the method getAttribute and then pass the attribute for which we want to get the value as a parameter to that method.
In an html code, an element is defined with attributes and its values in a key-value pair. Let try to get the class – headin... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "We can get the attribute value of a web element with Selenium webdriver using the method getAttribute and then pass the attribute for which we want to get the value as a parameter to that method."
},
{
"code": null,
"e": 1421,
"s": 1258,... |
Tk - Treeview Widget | Treeview widget is used to choose a numeric value through sliders. The syntax for treeview widget is shown below.
treeview treeviewName options
The options available for the treeview widget are listed below in table.
-columns columnNames
An array of column names for widget.
-displaycolumns columns
An array of column n... | [
{
"code": null,
"e": 2315,
"s": 2201,
"text": "Treeview widget is used to choose a numeric value through sliders. The syntax for treeview widget is shown below."
},
{
"code": null,
"e": 2346,
"s": 2315,
"text": "treeview treeviewName options\n"
},
{
"code": null,
"e":... |
Sort the Array of Strings on the basis of given substring range - GeeksforGeeks | 09 Sep, 2021
Given two positive integers I and X and an array of strings arr[], the task is to sort the given array of strings on the basis of substrings starting from index I of size X.
Examples:
Input: I = 2, X = 2, arr[] = { “baqwer”, “zacaeaz”, “aaqzzaa”, “aacaap”, “abbatyo”, “bbbacztr”, “bbbdaaa” } Output: abbaty... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 24970,
"s": 24796,
"text": "Given two positive integers I and X and an array of strings arr[], the task is to sort the given array of strings on the basis of substrings starting from index I ... |
Class method vs Static method in Python - GeeksforGeeks | 24 Aug, 2021
The @classmethod decorator is a built-in function decorator that is an expression that gets evaluated after your function is defined. The result of that evaluation shadows your function definition. A class method receives the class as an implicit first argument, just like an instance method receives the in... | [
{
"code": null,
"e": 41163,
"s": 41135,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 41486,
"s": 41163,
"text": "The @classmethod decorator is a built-in function decorator that is an expression that gets evaluated after your function is defined. The result of that evaluation... |
PHP program to check if a string has a special character | To check if a string has a special character, the PHP code is as follows;
Live Demo
<?php
function check_string($my_string){
$regex = preg_match('[@_!#$%^&*()<>?/|}{~:]', $my_string);
if($regex)
print("String has been accepted");
else
print("String has not been accepted");
}
... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "To check if a string has a special character, the PHP code is as follows;"
},
{
"code": null,
"e": 1147,
"s": 1136,
"text": " Live Demo"
},
{
"code": null,
"e": 1450,
"s": 1147,
"text": "<?php\n function check_s... |
Kotlin Tutorial | This Kotlin Tutorial has been prepared by well experienced Kotlin Programmers for the beginners to help them understand the basics of Kotlin Programming Language. After completing this tutorial, you will find yourself at a moderate level of expertise in Kotlin, from where you can take yourself to the next levels.
Kotli... | [
{
"code": null,
"e": 2740,
"s": 2425,
"text": "This Kotlin Tutorial has been prepared by well experienced Kotlin Programmers for the beginners to help them understand the basics of Kotlin Programming Language. After completing this tutorial, you will find yourself at a moderate level of expertise in... |
How to set the Visibility of the Button in C#? - GeeksforGeeks | 26 Jun, 2019
A Button is an essential part of an application, or software, or webpage. It allows the user to interact with the application or software. In Button, you are allowed to set a value which represents the button and its child buttons are displayed by using the Visible Property. It is provided by Button class.... | [
{
"code": null,
"e": 23663,
"s": 23635,
"text": "\n26 Jun, 2019"
},
{
"code": null,
"e": 24199,
"s": 23663,
"text": "A Button is an essential part of an application, or software, or webpage. It allows the user to interact with the application or software. In Button, you are allow... |
A Guide to Word Embedding. What are they? How are they more useful... | by Shraddha Anala | Towards Data Science | Reading, comprehending, communicating and ultimately producing new content is something we all do regardless of who we are in our professional lives.
When it comes to extracting useful features from a given body of text, the processes involved are fundamentally different when compared to, say a vector of continuous int... | [
{
"code": null,
"e": 322,
"s": 172,
"text": "Reading, comprehending, communicating and ultimately producing new content is something we all do regardless of who we are in our professional lives."
},
{
"code": null,
"e": 672,
"s": 322,
"text": "When it comes to extracting useful f... |
VBA - Variables | Variable is a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable.
You must use a letter as the first character.
You must use a letter as the first character.
You can't use a space, period (.), exclamation mark (!), or the chara... | [
{
"code": null,
"e": 2094,
"s": 1935,
"text": "Variable is a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable."
},
{
"code": null,
"e": 2140,
"s": 2094,
"text": "You must use a letter a... |
Google Charts - Histogram Chart Colors | Following is an example of a histogram chart with custom color. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example.
We've used color configuration to change default color of histogram chart.
// Set chart options
var options = {c... | [
{
"code": null,
"e": 2469,
"s": 2261,
"text": "Following is an example of a histogram chart with custom color. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example."
},
{
"code": null,
"e": 2544,
... |
Ruby | Hash each_key function - GeeksforGeeks | 07 Jan, 2020
Hash#each_key() is a Hash class method which finds the nested value which calls block once for each_key pair in the hash by passing the key as parameters.
Syntax: Hash.each_key()
Parameter: Hash values
Return: calls block once for key_value pair in hash with key as a parameter otherwise, Enumerator if no a... | [
{
"code": null,
"e": 23595,
"s": 23567,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 23750,
"s": 23595,
"text": "Hash#each_key() is a Hash class method which finds the nested value which calls block once for each_key pair in the hash by passing the key as parameters."
},
... |
Microsoft Azure - Introduction to Azure Digital Twins - GeeksforGeeks | 01 Jun, 2021
In this article, we will learn how to get started with Azure Digital Twins. With Azure Digital Twins, you can model your real-world environment, including buildings, IoT sensors, and people to keep track of it, monitor it, and design it.
Let’s see how that works. First, we need to create an Azure Digital ... | [
{
"code": null,
"e": 25836,
"s": 25808,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 26075,
"s": 25836,
"text": "In this article, we will learn how to get started with Azure Digital Twins. With Azure Digital Twins, you can model your real-world environment, including building... |
eval in Python - GeeksforGeeks | 12 Oct, 2021
Python eval() function parse the expression argument and evaluate it as a python expression and runs python expression(code) within the program.
eval(expression, globals=None, locals=None)
expression: this string is parsed and evaluated as a Python expression
globals (optional): a dictionary to specify the... | [
{
"code": null,
"e": 24578,
"s": 24550,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 24723,
"s": 24578,
"text": "Python eval() function parse the expression argument and evaluate it as a python expression and runs python expression(code) within the program."
},
{
"cod... |
What are object data types in C#? | The object types can be assigned values of any other types, value types, reference types, predefined or user-defined types. However, before assigning values, it needs type conversion.
The Object Type is the ultimate base class for all data types in C# Common Type System (CTS). Object is an alias for System.Object class... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "The object types can be assigned values of any other types, value types, reference types, predefined or user-defined types. However, before assigning values, it needs type conversion."
},
{
"code": null,
"e": 1384,
"s": 1246,
"text":... |
Build a Genre-Based Story Generator | Pranav Vadrevu | Towards Data Science | After discovering time travel, the Earth’s inhabitants now live in futuristic cities, which are controlled by the government, for the duration of a decade. The government plans to send two elite teams of scientists to the city, in order to investigate the origin of these machines and discover the existence of the “God”... | [
{
"code": null,
"e": 494,
"s": 172,
"text": "After discovering time travel, the Earth’s inhabitants now live in futuristic cities, which are controlled by the government, for the duration of a decade. The government plans to send two elite teams of scientists to the city, in order to investigate the... |
Matplotlib - Radio Buttons - GeeksforGeeks | 03 Jul, 2021
Radio buttons let the user choose only one option between multiple options. These buttons are arranged in groups of two or more with a list of circular dots. For the radio buttons to remain responsive you must keep a reference to this object. We connect the RadioButtons with the on_clicked method to make... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n03 Jul, 2021"
},
{
"code": null,
"e": 24615,
"s": 24292,
"text": "Radio buttons let the user choose only one option between multiple options. These buttons are arranged in groups of two or more with a list of circular dots. For ... |
How to make a voice assistant for E-mail in Python? - GeeksforGeeks | 05 Apr, 2021
As we know, emails are very important for communication as each professional communication can be done by emails and the best service for sending and receiving mails is as we all know GMAIL. Gmail is a free email service developed by Google. Users can access Gmail on the web and using third-party programs ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 24662,
"s": 24292,
"text": "As we know, emails are very important for communication as each professional communication can be done by emails and the best service for sending and receiving mai... |
Gradle - Multi-Project Build | Gradle can handle smallest and largest projects easily. Small projects have a single build file and a source tree. It is very easy to digest and understand a project that has been split into smaller, inter-dependent modules. Gradle perfectly supports this scenario that is multi-project build.
Such builds come in all sh... | [
{
"code": null,
"e": 2176,
"s": 1882,
"text": "Gradle can handle smallest and largest projects easily. Small projects have a single build file and a source tree. It is very easy to digest and understand a project that has been split into smaller, inter-dependent modules. Gradle perfectly supports th... |
5 Advanced Visualisation for Exploratory data analysis (EDA) | by Kaushik Choudhury | Towards Data Science | Early morning, a lady comes to meet Sherlock Holmes and Watson. Even before the lady opens her mouth and starts telling the reason for her visit, Sherlock can tell a lot about a person by his sheer power of observation and deduction. Similarly, we can deduce a lot about the data and relationship among the features befo... | [
{
"code": null,
"e": 549,
"s": 172,
"text": "Early morning, a lady comes to meet Sherlock Holmes and Watson. Even before the lady opens her mouth and starts telling the reason for her visit, Sherlock can tell a lot about a person by his sheer power of observation and deduction. Similarly, we can ded... |
Design a Tip Calculator using HTML, CSS and JavaScript - GeeksforGeeks | 21 Sep, 2021
The tip is the money given as a gift for good service, to the person who serves you in a restaurant. In this project, a simple tip calculator is made which takes billing amount, type of service, and a number of persons as input. As per the three inputs it generates a tip for the serving person.
Approach:
T... | [
{
"code": null,
"e": 25326,
"s": 25298,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 25622,
"s": 25326,
"text": "The tip is the money given as a gift for good service, to the person who serves you in a restaurant. In this project, a simple tip calculator is made which takes b... |
JavaScript: Sort Object of Objects | Suppose we have an Object of Objects like this −
const obj = {
"CAB": {
name: 'CBSSP',
position: 2
},
"NSG": {
name: 'NNSSP',
position: 3
},
"EQU": {
name: 'SSP',
position: 1
}
};
We are required to write a JavaScript function that takes in one such array and sorts ... | [
{
"code": null,
"e": 1111,
"s": 1062,
"text": "Suppose we have an Object of Objects like this −"
},
{
"code": null,
"e": 1296,
"s": 1111,
"text": "const obj = {\n \"CAB\": {\n name: 'CBSSP',\n position: 2\n },\n \"NSG\": {\n name: 'NNSSP',\n position: 3\... |
Interleaving String in C++ | Suppose we have three strings s1, s2 and s3. Then check whether s3 is formed by interleaving s1 and s2 or not. So if the strings are “aabcc”, s2 = “dbbca”, and s3 is “aadbbcbcac”, then the result will be true.
To solve this, we will follow these steps −
Define one method called solve(), this will take s1, s2, s3 and on... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "Suppose we have three strings s1, s2 and s3. Then check whether s3 is formed by interleaving s1 and s2 or not. So if the strings are “aabcc”, s2 = “dbbca”, and s3 is “aadbbcbcac”, then the result will be true."
},
{
"code": null,
"e": 1316,
... |
C Program to add two fractions | Given with the input as fraction i.e. a/b and c/d where a, b, c and d can be any integer values other than 0 and the task is to add these two fraction to generate their final sum.
Fractions are represented by −
a / b, where a is known as numerator and b is known as denominator.
a and b can have any numeric values but b... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "Given with the input as fraction i.e. a/b and c/d where a, b, c and d can be any integer values other than 0 and the task is to add these two fraction to generate their final sum."
},
{
"code": null,
"e": 1273,
"s": 1242,
"text": "Fr... |
Neo4j CQL - CREATE Label | Label is a name or identifier to a Node or a Relationship in Neo4j Database.
We can say this Label name to a Relationship as "Relationship Type".
We can use CQL CREATE command to create a single label to a Node or a Relationship and multiple labels to a Node. That means Neo4j supports only single Relationship Type betw... | [
{
"code": null,
"e": 2416,
"s": 2339,
"text": "Label is a name or identifier to a Node or a Relationship in Neo4j Database."
},
{
"code": null,
"e": 2485,
"s": 2416,
"text": "We can say this Label name to a Relationship as \"Relationship Type\"."
},
{
"code": null,
"e... |
Insert row at given position in Pandas Dataframe - GeeksforGeeks | 08 Sep, 2021
Inserting a row in Pandas DataFrame is a very straight forward process and we have already discussed approaches in how insert rows at the start of the Dataframe. Now, let’s discuss the ways in which we can insert a row at any position in the dataframe having integer based index.Solution #1 : There does not... | [
{
"code": null,
"e": 24593,
"s": 24565,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25220,
"s": 24593,
"text": "Inserting a row in Pandas DataFrame is a very straight forward process and we have already discussed approaches in how insert rows at the start of the Dataframe. N... |
Google Interview Experience for SDE - GeeksforGeeks | 21 Sep, 2021
A google interview consists of 1 Phone screening(15 mins), 1 Technical screening(45 mins), 4/5 onsite rounds(45 mins) mine was held 4(3 technical and 1 behavioral)
Tips for technical interviews :
Make a time schedule(Time is restricted in most interviews from 45 mins to 1 hour, at Google really strict)My t... | [
{
"code": null,
"e": 24807,
"s": 24779,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 24971,
"s": 24807,
"text": "A google interview consists of 1 Phone screening(15 mins), 1 Technical screening(45 mins), 4/5 onsite rounds(45 mins) mine was held 4(3 technical and 1 behavioral)... |
How to convert the first character to uppercase using PHP ? - GeeksforGeeks | 21 May, 2021
A string is a combination of words combined together. The first character of the string can be converted to an upper case in case it is a lower case alphabetic character.
Approach 1 : Using chr() method
Step 1: The first character of a string can be extracted using the first index, str[0] returns the firs... | [
{
"code": null,
"e": 24972,
"s": 24944,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 25144,
"s": 24972,
"text": "A string is a combination of words combined together. The first character of the string can be converted to an upper case in case it is a lower case alphabetic cha... |
What is a class in JavaScript? | A class is a type of function, but instead of using the keyword 'function', keyword 'class' is used to initiate it, and the properties are assigned inside a constructor() method. The constructor() method is called each time the class object is initialized.
In the following example, a class called 'company' is created a... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "A class is a type of function, but instead of using the keyword 'function', keyword 'class' is used to initiate it, and the properties are assigned inside a constructor() method. The constructor() method is called each time the class object is initializ... |
Convert a floating point number to string in C | In this section we will see how to convert a number (integer or float or any other numeric type data) to a string.
The logic is very simple. Here we will use the sprintf() function. This function is used to print some value or line into a string, but not in the console. This is the only difference between printf() and ... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "In this section we will see how to convert a number (integer or float or any other numeric type data) to a string."
},
{
"code": null,
"e": 1471,
"s": 1177,
"text": "The logic is very simple. Here we will use the sprintf() function. ... |
How can we remove composite PRIMARY KEY constraint applied on multiple columns of an existing MySQL table? | We can remove composite PRIMARY KEY constraint from multiple columns of an existing table by using DROP keyword along with ALTER TABLE statement.
Suppose we have a table ‘Room_allotment’ having a composite PRIMARY KEY constraint on columns ‘ID’ and ‘RoomNo’ as follows −
mysql> describe room_allotment;
+--------+-------... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "We can remove composite PRIMARY KEY constraint from multiple columns of an existing table by using DROP keyword along with ALTER TABLE statement."
},
{
"code": null,
"e": 1333,
"s": 1208,
"text": "Suppose we have a table ‘Room_allotm... |
How to draw a line in HTML5 SVG? | SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.
To draw a line in HTML SVG, use the SVG <line> element.
You can try... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG."... |
Four Useful Functions For Exploring Data in Python | by Sadrach Pierre, Ph.D. | Towards Data Science | During the process of exploring data I often find myself repeatedly defining similar python logic in order to carry out simple analytical tasks. For example, I often calculate the mean and standard deviation of a numerical column for specific categories within data. I also often analyze the frequency of categorical val... | [
{
"code": null,
"e": 510,
"s": 46,
"text": "During the process of exploring data I often find myself repeatedly defining similar python logic in order to carry out simple analytical tasks. For example, I often calculate the mean and standard deviation of a numerical column for specific categories wi... |
How to Clean Your Text Data with Python | Towards Data Science | IntroductionCleaning Text DataSummaryReferences
Introduction
Cleaning Text Data
Summary
References
It should be no surprise that data is most of the time, messy, unorganized, and difficult to deal with. As you work your way into data science from educational practice, you will see that most data is obtained from multip... | [
{
"code": null,
"e": 94,
"s": 46,
"text": "IntroductionCleaning Text DataSummaryReferences"
},
{
"code": null,
"e": 107,
"s": 94,
"text": "Introduction"
},
{
"code": null,
"e": 126,
"s": 107,
"text": "Cleaning Text Data"
},
{
"code": null,
"e": 134... |
LocalTime get() method in Java with Examples - GeeksforGeeks | 04 Sep, 2021
The get() method of a LocalTime class helps to get the value for the specified field passed as a parameter from this LocalTime as an integer value. This method queries this time for the value of the field and the returned value will always be within the valid range of values for the field. When the field i... | [
{
"code": null,
"e": 24540,
"s": 24512,
"text": "\n04 Sep, 2021"
},
{
"code": null,
"e": 24934,
"s": 24540,
"text": "The get() method of a LocalTime class helps to get the value for the specified field passed as a parameter from this LocalTime as an integer value. This method que... |
Barnsley Fern in Python - GeeksforGeeks | 22 Oct, 2018
Barnsley fern is a fractal shape created by mathematician Michael Barnsley. The geometric features of this fractal resemble a natural fern and hence it gets its name. Barnsley fern is created by iterating over a large number of times on four mathematical equations, introduced by Barnsley, known as Iterated... | [
{
"code": null,
"e": 25010,
"s": 24982,
"text": "\n22 Oct, 2018"
},
{
"code": null,
"e": 25341,
"s": 25010,
"text": "Barnsley fern is a fractal shape created by mathematician Michael Barnsley. The geometric features of this fractal resemble a natural fern and hence it gets its na... |
PyQt5 QScrollBar – Getting Slider Position | 04 Aug, 2021
In this article we will see how we can get position of slider in QScrollBar. QScrollBar is a control that enables the user to access parts of a document that is larger than the widget used to display it. Slider is the scroll-able object inside the bar. We can change its position with the help of mouse and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "In this article we will see how we can get position of slider in QScrollBar. QScrollBar is a control that enables the user to access parts of a document that is larger than th... |
<mat-progress-bar> in Angular Material | 17 Feb, 2021
Introduction:
Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it you can enter the below command and can download it. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 42,
"s": 28,
"text": "Introduction:"
},
{
"code": null,
"e": 467,
"s": 42,
"text": "Angular Material is a UI component library that is developed by the Angular team to build desi... |
Mathematics | Sum of squares of even and odd natural numbers | 04 Apr, 2019
We know sum squares of first n natural numbers is .
How to compute sum of squares of first n even natural numbers?We need to compute 22 + 42 + 62 + .... + (2n)2
EvenSum = 22 + 42 + 62 + .... + (2n)2
= 4 x (12 + 22 + 32 + .... + (n)2)
= 4n(n+1)(2n+1)/6
= 2n(n+1)(2n+1)/3
Example:
Su... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 104,
"s": 52,
"text": "We know sum squares of first n natural numbers is ."
},
{
"code": null,
"e": 213,
"s": 104,
"text": "How to compute sum of squares of first n even natural... |
Generating Random Integers in Pandas Dataframe | 10 Jul, 2020
Pandas is the most popular Python library that is used for data analysis. It provides highly optimized performance with back-end source code that is purely written in C or Python.
Here we will see how to generate random integers in the Pandas datagram. We will be using the numpy.random.randint() method to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "Pandas is the most popular Python library that is used for data analysis. It provides highly optimized performance with back-end source code that is purely written in C or Pyt... |
Difference between DAS and NAS | 22 Jun, 2020
1. Directly Attached Storage (DAS) :The storage device which is permanently attached to a desktop computer. DAS is for a single user (Hard drive attached to a computer). DAS is well suited for a small-to-medium sized business where sufficient amounts of storage can be configured at a low startup cost. The ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 427,
"s": 28,
"text": "1. Directly Attached Storage (DAS) :The storage device which is permanently attached to a desktop computer. DAS is for a single user (Hard drive attached to a computer). DAS i... |
Difference between String and Character array in Java. | On technical groud, we can say that both a character array and string contain the sequence of characters and used as a collection of characters. But there are significant differences between both which we would discuss below.
The following are the important differences between String and Character array.
Live Demo
Jav... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "On technical groud, we can say that both a character array and string contain the sequence of characters and used as a collection of characters. But there are significant differences between both which we would discuss below."
},
{
"code": null,... |
Java Program to count letters in a String | Let’s say we have the following string, that has some letters and numbers.
String str = "9as78";
Now loop through the length of this string and use the Character.isLetter() method. Within that, use the charAt() method to check for each character/ number in the string.
for (int i = 0; i < str.length(); i++) {
if (Cha... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "Let’s say we have the following string, that has some letters and numbers."
},
{
"code": null,
"e": 1159,
"s": 1137,
"text": "String str = \"9as78\";"
},
{
"code": null,
"e": 1331,
"s": 1159,
"text": "Now loop thr... |
Regular expressions in C - GeeksforGeeks | 03 May, 2022
Prerequisite: How to write Regular Expressions?A regular expression is a sequence of characters that is used to search pattern. It is mainly used for pattern matching with strings, or string matching, etc. They are a generalized way to match patterns with sequences of characters. It is used in every progra... | [
{
"code": null,
"e": 24616,
"s": 24588,
"text": "\n03 May, 2022"
},
{
"code": null,
"e": 24997,
"s": 24616,
"text": "Prerequisite: How to write Regular Expressions?A regular expression is a sequence of characters that is used to search pattern. It is mainly used for pattern match... |
GATE | GATE-CS-2003 | Question 59 - GeeksforGeeks | 28 Jun, 2021
Consider the syntax directed definition shown below.
S → id : = E {gen (id.place = E.place;);}
E → E1 + E2 {t = newtemp ( ); gen (t = El.place + E2.place;); E.place = t}
E → id {E.place = id.place;}
Here, gen is a function that generates the output code, and newtemp is a function that returns the n... | [
{
"code": null,
"e": 25805,
"s": 25777,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25858,
"s": 25805,
"text": "Consider the syntax directed definition shown below."
},
{
"code": null,
"e": 26012,
"s": 25858,
"text": "S → id : = E {gen (id.place = E.plac... |
Baby Steps Towards Data Science: Decision Tree Regression in Python | by Tharun Peddisetty | Towards Data Science | Decision trees are majorly used in classification problems however, let us try to understand its implications in regression and also, try to understand why using it in regression isn’t a great idea.
Decision tree regression enables one to divide the data into multiple splits. These splits typically answer a simple if-e... | [
{
"code": null,
"e": 371,
"s": 172,
"text": "Decision trees are majorly used in classification problems however, let us try to understand its implications in regression and also, try to understand why using it in regression isn’t a great idea."
},
{
"code": null,
"e": 759,
"s": 371,
... |
Find the median | Practice | GeeksforGeeks | Given an array arr[] of N integers, calculate the median
Example 1:
Input: N = 5
arr[] = 90 100 78 89 67
Output: 89
Explanation: After sorting the array
middle element is the median
Example 2:
Input: N = 4
arr[] = 56 67 30 79
Output: 61
Explanation: In case of even number of
elements, average of two middle eleme... | [
{
"code": null,
"e": 285,
"s": 226,
"text": "Given an array arr[] of N integers, calculate the median\n "
},
{
"code": null,
"e": 296,
"s": 285,
"text": "Example 1:"
},
{
"code": null,
"e": 414,
"s": 296,
"text": "Input: N = 5\narr[] = 90 100 78 89 67\nOutput:... |
p5.js | createSelect() Function - GeeksforGeeks | 03 Dec, 2021
The createSelect() function in p5.js is used to create a dropdown menu element in the DOM (Document Object Model) for taking input. The .value() method is used to get the selected option. This function includes the p5.dom library. Add the following syntax in the head section.
Note: This function requires t... | [
{
"code": null,
"e": 43692,
"s": 43664,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 43969,
"s": 43692,
"text": "The createSelect() function in p5.js is used to create a dropdown menu element in the DOM (Document Object Model) for taking input. The .value() method is used to ... |
Image Segmentation: Part 1. Mathematical and practical... | by Mrinal Tyagi | Towards Data Science | Image segmentation is a method in which a digital image is broken down into various subgroups called Image segments which helps in reducing the complexity of the image to make further processing or analysis of the image simpler. Segmentation in easy words is assigning labels to pixels. All picture elements or pixels be... | [
{
"code": null,
"e": 878,
"s": 172,
"text": "Image segmentation is a method in which a digital image is broken down into various subgroups called Image segments which helps in reducing the complexity of the image to make further processing or analysis of the image simpler. Segmentation in easy words... |
What is a base class in C#? | When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to as the derived class.
A class can be derived from mo... | [
{
"code": null,
"e": 1352,
"s": 1062,
"text": "When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class ... |
Ruby | Hash each() function - GeeksforGeeks | 07 Jan, 2020
Hash#each() is a Hash class method which finds the nested value which calls block once for each key in hash by passing the key-value pair as parameters.
Syntax: Hash.each()
Parameter: Hash values
Return: calls block once for each key in hash otherwise Enumerator if no argument is passed.
Example #1 :
# Rub... | [
{
"code": null,
"e": 23736,
"s": 23708,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 23889,
"s": 23736,
"text": "Hash#each() is a Hash class method which finds the nested value which calls block once for each key in hash by passing the key-value pair as parameters."
},
{
... |
How to Secure hash and salt for PHP passwords ? - GeeksforGeeks | 24 Oct, 2019
Salting and hashing is a technique to store the password in a database. In cryptography, salting means to add some content along with the password and then hashing it. So salt and hash provide two levels of security. Salting always makes unique passwords i.e if there are two same passwords, after salting, ... | [
{
"code": null,
"e": 31015,
"s": 30987,
"text": "\n24 Oct, 2019"
},
{
"code": null,
"e": 31438,
"s": 31015,
"text": "Salting and hashing is a technique to store the password in a database. In cryptography, salting means to add some content along with the password and then hashing... |
How to create a custom object in JavaScript? | To create a custom object in JavaScript, try the following code
Live Demo
<!DOCTYPE html>
<html>
<body>
<p id="test"></p>
<script>
var dept = new Object();
dept.employee = "Amit";
dept.department = "Technical";
dept.technology ="Java";
document.getElementById... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "To create a custom object in JavaScript, try the following code"
},
{
"code": null,
"e": 1136,
"s": 1126,
"text": "Live Demo"
},
{
"code": null,
"e": 1517,
"s": 1136,
"text": "<!DOCTYPE html>\n<html>\n <body>\n ... |
Visualizing How Filters Work in Convolutional Neural Networks (CNNs) | by Wei-Meng Lee | Towards Data Science | In Deep Learning, a Convolutional Neural Network (CNN) is a special type of neural network that is designed to process data through multiple layers of arrays. A CNN is well suited for applications like image recognition, and in particular is often used in face recognition software.
In CNN, convolutional layers are the ... | [
{
"code": null,
"e": 455,
"s": 172,
"text": "In Deep Learning, a Convolutional Neural Network (CNN) is a special type of neural network that is designed to process data through multiple layers of arrays. A CNN is well suited for applications like image recognition, and in particular is often used in... |
CSS Selector to Select Elements Not Having Certain Class / Attribute / Type | Using the CSS :not() pseudo-class, we can refine our styling by selecting those elements which do not have a specific value or does not match a selector.
The following examples illustrate CSS :not pseudo-class.
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
p {
background-color: cornflowerblue;
color: white;
}
... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "Using the CSS :not() pseudo-class, we can refine our styling by selecting those elements which do not have a specific value or does not match a selector."
},
{
"code": null,
"e": 1273,
"s": 1216,
"text": "The following examples illus... |
How to return JSON using Node.js ? | 07 Oct, 2021
JSON stands for JavaScript Object Notation. It is one of the most widely used formats for exchanging information across applications. Node.js Supports various frameworks that help to make the processes smoother. The following ways cover how to return JSON data in our application from Node.js.
Method 1 (Usi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "JSON stands for JavaScript Object Notation. It is one of the most widely used formats for exchanging information across applications. Node.js Supports various frameworks that ... |
Given a matrix of ‘O’ and ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’ | 24 Jun, 2022
Given a matrix where every element is either ‘O’ or ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’. A ‘O’ (or a set of ‘O’) is considered to be by surrounded by ‘X’ if there are ‘X’ at locations just below, just above, just left and just right of it.
Examples:
Input: mat[M][N] = {{'X', 'O', 'X', 'X', 'X... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 306,
"s": 54,
"text": "Given a matrix where every element is either ‘O’ or ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’. A ‘O’ (or a set of ‘O’) is considered to be by surrounded by ‘X’ if there ... |
How to Post Data to API using Retrofit in Android? | 22 Feb, 2021
We have seen reading data from API in our Android app in Android Studio. For reading data from API, we use GET request to read our data which is in JSON format. In this article, we will take a look at adding data to REST API in our Android App in Android Studio.
We will be building a simple application in... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 318,
"s": 54,
"text": "We have seen reading data from API in our Android app in Android Studio. For reading data from API, we use GET request to read our data which is in JSON format. In this artic... |
Python – Split strings ignoring the space formatting characters | 12 Oct, 2021
Given a String, Split into words ignoring space formatting characters like \n, \t etc.
Input : test_str = ‘geeksforgeeks\n\r\\nt\t\n\t\tbest\r\tfor\f\vgeeks’ Output : [‘geeksforgeeks’, ‘best’, ‘for’, ‘geeks’] Explanation : All space characters are used as parameter to join.
Input : test_str = ‘geeksforgeek... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "Given a String, Split into words ignoring space formatting characters like \\n, \\t etc."
},
{
"code": null,
"e": 303,
"s": 115,
"text": "Input : test_str ... |
Python Program To Check For Balanced Brackets In An Expression (Well-Formedness) Using Stack | 19 May, 2022
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp.
Example:
Input: exp = “[()]{}{[()()]()}” Output: Balanced
Input: exp = “[(])” Output: Not Balanced
Algorithm:
Declare a character stack S.
Now traverse the expr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2022"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp."
},
{
"code": null,
... |
Implementing own Hash Table with Open Addressing Linear Probing | 18 Aug, 2021
Prerequisite – Hashing Introduction, Implementing our Own Hash Table with Separate Chaining in JavaIn Open Addressing, all elements are stored in the hash table itself. So at any point, size of table must be greater than or equal to total number of keys (Note that we can increase table size by copying old ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 379,
"s": 54,
"text": "Prerequisite – Hashing Introduction, Implementing our Own Hash Table with Separate Chaining in JavaIn Open Addressing, all elements are stored in the hash table itself. So at... |
Working of Bottom up parser | 12 Oct, 2021
In this article, we are going to cover working of the bottom-up parser and will see how we can take input and parse it and also cover some basics of bottom-up parser.
Pre-requisite – Parsing
Bottom-up parser :
It will start from string and proceed to start.
In Bottom-up parser, Identifying the correct... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "In this article, we are going to cover working of the bottom-up parser and will see how we can take input and parse it and also cover some basics of bottom-up parser. "
},
... |
Regex in Python to put spaces between words starting with capital letters | 20 Jun, 2022
Given an array of characters, which is basically a sentence. However, there is no space between different words and the first letter of every word is in uppercase. You need to print this sentence after the following amendments:
Put a single space between these words. Convert the uppercase letters to lower... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 257,
"s": 28,
"text": "Given an array of characters, which is basically a sentence. However, there is no space between different words and the first letter of every word is in uppercase. You need to... |
SQL | String functions | 30 Dec, 2019
String functionsare used to perform an operation on input string and return an output string.Following are the string functions defined in SQL:
ASCII(): This function is used to find the ASCII value of a character.Syntax: SELECT ascii('t');
Output: 116CHAR_LENGTH(): Doesn’t work for SQL Server. Use LEN() f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Dec, 2019"
},
{
"code": null,
"e": 196,
"s": 52,
"text": "String functionsare used to perform an operation on input string and return an output string.Following are the string functions defined in SQL:"
},
{
"code": null,
... |
Inorder Tree Traversal without Recursion | 04 Jun, 2022
Using Stack is the obvious way to traverse tree without recursion. Below is an algorithm for traversing binary tree using stack. See this for step wise step execution of the algorithm.
1) Create an empty stack S.
2) Initialize current node as root
3) Push the current node to S and set current = current->l... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jun, 2022"
},
{
"code": null,
"e": 240,
"s": 54,
"text": "Using Stack is the obvious way to traverse tree without recursion. Below is an algorithm for traversing binary tree using stack. See this for step wise step execution of the ... |
Express.js req.ip Property | 08 Jul, 2020
The req.ip property contains the remote IP address of the request. It is useful when the user wants the IP address of the incoming request made to the application.
Syntax:
req.ip
Parameter: No parameter.
Return Value: String
Installation of express module:
You can visit the link to Install express module. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "The req.ip property contains the remote IP address of the request. It is useful when the user wants the IP address of the incoming request made to the application."
},
{
... |
Perl | CGI Programming | 01 May, 2019
In Perl, CGI(Common Gateway Interface) is a protocol for executing scripts via web requests. It is a set of rules and standards that define how the information is exchanged between the web server and custom scripts. Earlier, scripting languages like Perl were used for writing the CGI applications. And, CGI... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 1008,
"s": 54,
"text": "In Perl, CGI(Common Gateway Interface) is a protocol for executing scripts via web requests. It is a set of rules and standards that define how the information is exchanged ... |
How to Hack WPA/WPA2 WiFi Using Kali Linux? | 30 Jun, 2020
“Hacking Wifi” sounds really cool and interesting. But actually hacking wifi practically is much easier with a good wordlist. But this world list is of no use until we don’t have any idea of how to actually use that word list in order to crack a hash. And before cracking the hash we actually need to genera... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 449,
"s": 52,
"text": "“Hacking Wifi” sounds really cool and interesting. But actually hacking wifi practically is much easier with a good wordlist. But this world list is of no use until we don’t ... |
SQL Query to Find the Highest Purchase Amount Ordered by the Each Customer | 08 Oct, 2021
In order to find the highest purchase amount of each customer, we can use the GROUP BY clause which is very useful with aggregate functions. We use MAX() function with GROUP BY to find the highest purchase of each customer.
In this article let us see SQL Query to Find the Highest Purchase Amount Ordered b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 253,
"s": 28,
"text": "In order to find the highest purchase amount of each customer, we can use the GROUP BY clause which is very useful with aggregate functions. We use MAX() function with GROUP B... |
How to Change Background Image by Button Clicking Event in Android? | 23 Feb, 2021
Background Images play an important role in the beautification of any application. Hence, most social media applications like WhatsApp, Messenger provides this as a part of their feature to their users. So, keeping this in mind we will be going to develop an android application in which background images w... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 397,
"s": 54,
"text": "Background Images play an important role in the beautification of any application. Hence, most social media applications like WhatsApp, Messenger provides this as a part of t... |
Requests - Handling GET Requests | This chapter will concentrate more on the GET requests, which is the most common and used very often. The working of GET in the requests module is very easy. Here is a simple example about working with the URL using the GET method.
import requests
getdata = requests.get('https://jsonplaceholder.typicode.com/users')
pri... | [
{
"code": null,
"e": 2554,
"s": 2322,
"text": "This chapter will concentrate more on the GET requests, which is the most common and used very often. The working of GET in the requests module is very easy. Here is a simple example about working with the URL using the GET method."
},
{
"code":... |
How to compare time in R? | 15 Dec, 2021
R programming Language supports both date and DateTime objects using various different formats and specifiers. The built-in framework as.Date function is responsible for the handling of dates alone, the library chron in R Programming handles both dates and times, without any support for time zones; whereas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 526,
"s": 28,
"text": "R programming Language supports both date and DateTime objects using various different formats and specifiers. The built-in framework as.Date function is responsible for the h... |
HTML <col> Tag | 17 Mar, 2022
The <col> tag in HTML is used to set the column properties for each column within a <colgroup> tag. This tag is used to set the style property to each column. This tag does not contain closing tags.
Syntax:
<col attribute = "value">
Attributes: The various attributes that can be used with the col tag are ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "The <col> tag in HTML is used to set the column properties for each column within a <colgroup> tag. This tag is used to set the style property to each column. This tag does no... |
Error Bars using ggplot2 in R | 28 Jul, 2021
Error bars are bars that show the mean score. The error bars stick out from the bar like a whisker. The error bars show how precise the measurement is. It shows how much variation is expected by how much value we got. Error bars can be plated both horizontally and vertically. The horizontal error bar plot ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 403,
"s": 28,
"text": "Error bars are bars that show the mean score. The error bars stick out from the bar like a whisker. The error bars show how precise the measurement is. It shows how much varia... |
How to validate if input in input field is a valid date using express-validator ? | 08 Apr, 2022
In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only a valid date is allowed i.e. there is not allowed any st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 482,
"s": 28,
"text": "In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer in... |
Number of possible Functions | 25 Nov, 2019
In the below articles, we are going to calculate the number of functions possible from given two sets of the element.
Statement:Suppose there are two sets ‘A’ and ‘B’ containing ‘n’ and ‘m’ number of elements respectively, i.e., Sets,
'A' = {1, 2, 3, 4, ............, n},
'B' = {1, 2, 3, 4, ............, m}... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Nov, 2019"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "In the below articles, we are going to calculate the number of functions possible from given two sets of the element."
},
{
"code": null,
"e": 263,
"s": 146,
... |
Angular 2 - Dependency Injection | Dependency injection is the ability to add the functionality of components at runtime. Let’s take a look at an example and the steps used to implement dependency injection.
Step 1 − Create a separate class which has the injectable decorator. The injectable decorator allows the functionality of this class to be injected... | [
{
"code": null,
"e": 2470,
"s": 2297,
"text": "Dependency injection is the ability to add the functionality of components at runtime. Let’s take a look at an example and the steps used to implement dependency injection."
},
{
"code": null,
"e": 2653,
"s": 2470,
"text": "Step 1 − ... |
File I/O Operations | We need files to store the output of a program when the program terminates. Using files, we can access related information using various commands in different languages.
Here is a list of some operations that can be carried out on a file −
Creating a new file
Opening an existing file
Reading file contents
Searching dat... | [
{
"code": null,
"e": 1991,
"s": 1821,
"text": "We need files to store the output of a program when the program terminates. Using files, we can access related information using various commands in different languages."
},
{
"code": null,
"e": 2061,
"s": 1991,
"text": "Here is a li... |
Change command Method for Tkinter Button in Python | The significance of Button widget is that it is used for handling events to perform certain operations in the application. In order to handle such events, we generally define a method which contains certain operations.
Let us suppose we want to change the event method after initializing the button. We can configure the... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "The significance of Button widget is that it is used for handling events to perform certain operations in the application. In order to handle such events, we generally define a method which contains certain operations."
},
{
"code": null,
"e... |
How to use AWS Lambda and CloudWatch for beginners | by Denny Asarias Palinggi | Towards Data Science | I found a cool website (https://covid19api.com/) where we can easily access COVID19 data using free API. This gave me an idea to create simple function to grab the data using AWS Lambda and save it to S3. The script will be executed daily automatically using CloudWatch.
Below is the list of tasks that I needed to follo... | [
{
"code": null,
"e": 442,
"s": 171,
"text": "I found a cool website (https://covid19api.com/) where we can easily access COVID19 data using free API. This gave me an idea to create simple function to grab the data using AWS Lambda and save it to S3. The script will be executed daily automatically us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.