title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Custom Keras Generators. A short intro to writing Keras... | by Nilesh | Towards Data Science
The idea behind using a Keras generator is to get batches of input and corresponding output on the fly during training process, e.g. reading in 100 images, getting corresponding 100 label vectors and then feeding this set to the gpu for training step. The problem I faced was memory requirement for the standard Keras ge...
[ { "code": null, "e": 423, "s": 171, "text": "The idea behind using a Keras generator is to get batches of input and corresponding output on the fly during training process, e.g. reading in 100 images, getting corresponding 100 label vectors and then feeding this set to the gpu for training step." ...
How to dynamically update a listView in Android?
This example demonstrates how do I dynamically update a ListView 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"?> <RelativeL...
[ { "code": null, "e": 1139, "s": 1062, "text": "This example demonstrates how do I dynamically update a ListView in android." }, { "code": null, "e": 1268, "s": 1139, "text": "Step 1 βˆ’ Create a new project in Android Studio, go to File β‡’ New Project and fill all required details t...
H2O - Installation
H2O can be configured and used with five different options as listed below βˆ’ Install in Python Install in Python Install in R Install in R Web-based Flow GUI Web-based Flow GUI Hadoop Hadoop Anaconda Cloud Anaconda Cloud In our subsequent sections, you will see the instructions for installation of H2O based on the opti...
[ { "code": null, "e": 1729, "s": 1652, "text": "H2O can be configured and used with five different options as listed below βˆ’" }, { "code": null, "e": 1747, "s": 1729, "text": "Install in Python" }, { "code": null, "e": 1765, "s": 1747, "text": "Install in Pytho...
How to set X-axis values in Matplotlib Python?
To set X-axis values in matplotlib in Python, we can take the following steps βˆ’ Create two lists for x and y data points. Create two lists for x and y data points. Get the xticks range value. Get the xticks range value. Plot a line using plot() method with xtick range value and y data points. Plot a line using plot() m...
[ { "code": null, "e": 1142, "s": 1062, "text": "To set X-axis values in matplotlib in Python, we can take the following steps βˆ’" }, { "code": null, "e": 1184, "s": 1142, "text": "Create two lists for x and y data points." }, { "code": null, "e": 1226, "s": 1184, ...
Controlling a DC Motor with Arduino
A DC Motor is the simplest kind of motor. It has two terminals or leads. When connected with a battery the motor will rotate, and if the connections are reversed, the motor will rotate in the opposite direction. If the voltage across the terminals is reduced, the motor speed will reduce accordingly. In this article, we...
[ { "code": null, "e": 1363, "s": 1062, "text": "A DC Motor is the simplest kind of motor. It has two terminals or leads. When connected with a battery the motor will rotate, and if the connections are reversed, the motor will rotate in the opposite direction. If the voltage across the terminals is re...
Golang program to create an integer array that takes inputs from users.
Approach Ask the user to enter the size of array. Ask the user to enter the size of array. Make an integer array of given size. Make an integer array of given size. Ask the user to enter elements. Ask the user to enter elements. At the end, print the array. At the end, print the array. Live Demo package main import ( ...
[ { "code": null, "e": 1071, "s": 1062, "text": "Approach" }, { "code": null, "e": 1112, "s": 1071, "text": "Ask the user to enter the size of array." }, { "code": null, "e": 1153, "s": 1112, "text": "Ask the user to enter the size of array." }, { "code"...
Generating your own Images with NVIDIA StyleGAN2-ADA for PyTorch on the Ampere Architecture | by Jeff Heaton | Towards Data Science
StyleGAN2 ADA allows you to train a neural network to generate high-resolution images based on a training set of images. The most classic example of this is the made-up faces that StyleGAN2 is often used to generate. Until the latest release, in February 2021, you had to install an old 1.x version of TensorFlow and uti...
[ { "code": null, "e": 753, "s": 171, "text": "StyleGAN2 ADA allows you to train a neural network to generate high-resolution images based on a training set of images. The most classic example of this is the made-up faces that StyleGAN2 is often used to generate. Until the latest release, in February ...
Banker's Algorithm in Operating System - GeeksforGeeks
15 Jun, 2021 Prerequisite – Resource Allocation Graph (RAG), Banker’s Algorithm, Program for Banker’s Algorithm Banker’s Algorithm is a resource allocation and deadlock avoidance algorithm. This algorithm test for safety simulating the allocation for predetermined maximum possible amounts of all resources, then makes a...
[ { "code": null, "e": 23745, "s": 23717, "text": "\n15 Jun, 2021" }, { "code": null, "e": 24169, "s": 23745, "text": "Prerequisite – Resource Allocation Graph (RAG), Banker’s Algorithm, Program for Banker’s Algorithm Banker’s Algorithm is a resource allocation and deadlock avoidan...
Volume Calculation - Solved Examples
Q 1 - The diagonal of a cube is 12√6m .Find its surface area. A - 1624 m2 B - 1728 m2 C - 2564 m2 D - 1254√2m2 Answer - B Explanation Let the edge of the cube be X. √(3 )X=12√(6) β‡’ X=12√(2) Surface area = 6X2 = (6 x 12√(2) x12√(2)) m2 ≑ 1728 m2. Q 2 - The surface area of a cube is 1728 cm2. Find its volume. A - 345...
[ { "code": null, "e": 3955, "s": 3892, "text": "Q 1 - The diagonal of a cube is 12√6m .Find its surface area.\t" }, { "code": null, "e": 3967, "s": 3955, "text": "A - 1624 m2" }, { "code": null, "e": 3979, "s": 3967, "text": "B - 1728 m2" }, { "code": n...
C++ Program to Find Factorial of Large Numbers
The following is an example to find the factorial. #include <iostream> using namespace std; int fact(unsigned long long int n) { if (n == 0 || n == 1) return 1; else return n * fact(n - 1); } int main() { unsigned long long int n; cout<<"Enter number : "; cin>>n; cout<< β€œ\nThe factorial : β€œ << f...
[ { "code": null, "e": 1113, "s": 1062, "text": "The following is an example to find the factorial." }, { "code": null, "e": 1405, "s": 1113, "text": "#include <iostream>\nusing namespace std;\nint fact(unsigned long long int n) {\n if (n == 0 || n == 1)\n return 1;\n else\n ...
How to decrease the density of x-ticks in Seaborn?
To decrease the density of x-ticks in Seaborn, we can use set_visible=False for odd positions. Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Create a dataframe with X-axis and Y-axis keys. Create a dataframe with X...
[ { "code": null, "e": 1157, "s": 1062, "text": "To decrease the density of x-ticks in Seaborn, we can use set_visible=False for odd positions." }, { "code": null, "e": 1233, "s": 1157, "text": "Set the figure size and adjust the padding between and around the subplots." }, { ...
How to test if a letter in a string is uppercase or lowercase using javascript?
To test if a letter in a string is uppercase or lowercase using javascript, you can simply convert the char to its respective case and see the result. function checkCase(ch) { if (!isNaN(ch * 1)){ return 'ch is numeric'; } else { if (ch == ch.toUpperCase()) { return 'upper case'; } ...
[ { "code": null, "e": 1213, "s": 1062, "text": "To test if a letter in a string is uppercase or lowercase using javascript, you can simply convert the char to its respective case and see the result." }, { "code": null, "e": 1546, "s": 1213, "text": "function checkCase(ch) {\n if...
Fundamental Techniques of Feature Engineering for Machine Learning | by Emre Rençberoğlu | Towards Data Science
What is a feature and why we need the engineering of it? Basically, all machine learning algorithms use some input data to create outputs. This input data comprise features, which are usually in the form of structured columns. Algorithms require features with some specific characteristic to work properly. Here, the nee...
[ { "code": null, "e": 584, "s": 171, "text": "What is a feature and why we need the engineering of it? Basically, all machine learning algorithms use some input data to create outputs. This input data comprise features, which are usually in the form of structured columns. Algorithms require features ...
Left pad a string in Java
To left pad a string, use the String.format and set the spaces. String.format("|%20s|", "demotext") If you add 30 above, it will display the first string after 30 spaces from the beginning. String.format("|%30s|", "demotext") Live Demo public class Demo { public static void main(String []args) { System.out.pr...
[ { "code": null, "e": 1126, "s": 1062, "text": "To left pad a string, use the String.format and set the spaces." }, { "code": null, "e": 1162, "s": 1126, "text": "String.format(\"|%20s|\", \"demotext\")" }, { "code": null, "e": 1252, "s": 1162, "text": "If you ...
How to add footer in Android ListView?
This example demonstrates how do I add footer in Android ListView. 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. <RelativeLayout xmlns:android="http://schemas.android.com/a...
[ { "code": null, "e": 1129, "s": 1062, "text": "This example demonstrates how do I add footer in Android ListView." }, { "code": null, "e": 1258, "s": 1129, "text": "Step 1 βˆ’ Create a new project in Android Studio, go to File β‡’ New Project and fill all required details to create a...
Explain aggregate functions with the help of SQL queries
Aggregate functions perform Calculation on a set of values and return a single value. They ignore NULL values except COUNT and are used with GROUP BY clause of SELECT statement. The different types of aggregate functions are βˆ’ AVG MAX MIN SUM COUNT() COUNT(*) Let’s consider an employee table. We will perform the calcul...
[ { "code": null, "e": 1240, "s": 1062, "text": "Aggregate functions perform Calculation on a set of values and return a single value. They ignore NULL values except COUNT and are used with GROUP BY clause of SELECT statement." }, { "code": null, "e": 1289, "s": 1240, "text": "The ...
Pima Indians Diabetes - Prediction & KNN Visualization | by Hardik Deshmukh | Towards Data Science
In India, diabetes is a major issue. Between 1971 and 2000, the incidence of diabetes rose ten times, from 1.2% to 12.1%. 61.3 million people 20–79 years of age in India are estimated living with diabetes (Expectations of 2011). It is expected that by 2030 this number will rise to 101,2 million. In India there are repo...
[ { "code": null, "e": 1147, "s": 172, "text": "In India, diabetes is a major issue. Between 1971 and 2000, the incidence of diabetes rose ten times, from 1.2% to 12.1%. 61.3 million people 20–79 years of age in India are estimated living with diabetes (Expectations of 2011). It is expected that by 20...
6 Amazing TensorFlow.js Projects to Kickstart Machine Learning on Web | by Anupam Chugh | Towards Data Science
As machine learning continues to accelerate, more and more languages are joining the bandwagon. JavaScript which has been the leader of the web ecosystem for a while now has slowly gained pace in machine learning as well. An encouraging number of JavaScript libraries, specifically for machine learning have released ove...
[ { "code": null, "e": 394, "s": 172, "text": "As machine learning continues to accelerate, more and more languages are joining the bandwagon. JavaScript which has been the leader of the web ecosystem for a while now has slowly gained pace in machine learning as well." }, { "code": null, "...
LISP - Constants
In LISP, constants are variables that never change their values during program execution. Constants are declared using the defconstant construct. The following example shows declaring a global constant PI and later using this value inside a function named area-circle that calculates the area of a circle. The defun cons...
[ { "code": null, "e": 2206, "s": 2060, "text": "In LISP, constants are variables that never change their values during program execution. Constants are declared using the defconstant construct." }, { "code": null, "e": 2366, "s": 2206, "text": "The following example shows declarin...
Create a Plotly Data Visualization App Using One Line of JS | by Edward Krueger | Towards Data Science
By: Edward Krueger and Douglas Franklin Here we discuss a Plotly data visualization application created using Python and a single line of JavaScript code. This pattern allows developers to code logic and visualizations almost completely into the backend of your application. You don’t need to know javascript to do what ...
[ { "code": null, "e": 211, "s": 171, "text": "By: Edward Krueger and Douglas Franklin" }, { "code": null, "e": 506, "s": 211, "text": "Here we discuss a Plotly data visualization application created using Python and a single line of JavaScript code. This pattern allows developers ...
How to get primary key of a table in MySQL?
To get the primary key of a table, you can use the show command. The syntax is as follows βˆ’ SHOW INDEX FROM yourDatebaseName.yourTableName WHERE Key_name = 'PRIMARY'; Suppose, we have a table with two primary keys; one of them is β€œId” and second is β€œRollNum". The query for a table is as follows βˆ’ mysql> create table Tw...
[ { "code": null, "e": 1154, "s": 1062, "text": "To get the primary key of a table, you can use the show command. The syntax is as follows βˆ’" }, { "code": null, "e": 1229, "s": 1154, "text": "SHOW INDEX FROM yourDatebaseName.yourTableName WHERE Key_name = 'PRIMARY';" }, { "...
Stop making form to reload a page in JavaScript
Let’s say what we need to achieve is when the user submits this HTML form, we handle the submit event on client side and prevent the browser to reload as soon as the form is submitted HTML form <form name="formcontact1" action="#"> <input type='text' name='email' size="36" placeholder="Your e-mail :)"/> <input type=...
[ { "code": null, "e": 1246, "s": 1062, "text": "Let’s say what we need to achieve is when the user submits this HTML form, we handle the\nsubmit event on client side and prevent the browser to reload as soon as the form is submitted" }, { "code": null, "e": 1256, "s": 1246, "text"...
Find combined mean and variance of two series - GeeksforGeeks
11 May, 2021 Given two different series arr1[n] and arr2[m] of size n and m. The task is to find the mean and variance of combined series.Examples : Input : arr1[] = {3, 5, 1, 7, 8, 5} arr2[] = {5, 9, 7, 1, 5, 4, 7, 3} Output : Mean1: 4.83333 mean2: 5.125 StandardDeviation1: 5.47222 Sta...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n11 May, 2021" }, { "code": null, "e": 24830, "s": 24692, "text": "Given two different series arr1[n] and arr2[m] of size n and m. The task is to find the mean and variance of combined series.Examples : " }, { "code": nul...
Spring - Bean Life Cycle
The life cycle of a Spring bean is easy to understand. When a bean is instantiated, it may be required to perform some initialization to get it into a usable state. Similarly, when the bean is no longer required and is removed from the container, some cleanup may be required. Though, there are lists of the activities t...
[ { "code": null, "e": 2569, "s": 2292, "text": "The life cycle of a Spring bean is easy to understand. When a bean is instantiated, it may be required to perform some initialization to get it into a usable state. Similarly, when the bean is no longer required and is removed from the container, some c...
F# - Basic I/O
Basic Input Output includes βˆ’ Reading from and writing into console. Reading from and writing into file. We have used the printf and the printfn functions for writing into the console. In this section, we will look into the details of the Printf module of F#. Apart from the above functions, the Core.Printf module of F#...
[ { "code": null, "e": 2191, "s": 2161, "text": "Basic Input Output includes βˆ’" }, { "code": null, "e": 2230, "s": 2191, "text": "Reading from and writing into console." }, { "code": null, "e": 2266, "s": 2230, "text": "Reading from and writing into file." }, ...
Clone() method in C#
The Clone() method in C# is used to create a similar copy of the array. Let us see an example to clone an array using the Clone() method βˆ’ Live Demo using System; class Program { static void Main() { string[] arr = { "one", "two", "three", "four", "five" }; string[] arrCloned = arr.Clone() as string[]; ...
[ { "code": null, "e": 1134, "s": 1062, "text": "The Clone() method in C# is used to create a similar copy of the array." }, { "code": null, "e": 1201, "s": 1134, "text": "Let us see an example to clone an array using the Clone() method βˆ’" }, { "code": null, "e": 1212, ...
Shifting values of rows in MySQL to change the existing id values for existing rows?
Let us first create a table βˆ’ mysql> create table DemoTable -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20) -> ); Query OK, 0 rows affected (1.07 sec) Insert some records in the table using insert command βˆ’ mysql> insert into DemoTable(StudentName) values('Chris'); Quer...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table βˆ’" }, { "code": null, "e": 1263, "s": 1092, "text": "mysql> create table DemoTable\n -> (\n -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> StudentName varchar(20)\n -> );\nQuery OK, 0 r...
Comparison of the Logistic Regression, Decision Tree, and Random Forest Models to Predict Red Wine Quality in R | by Claudia Cartaya | Towards Data Science
In the following project, I applied three different machine learning algorithms to predict the quality of a wine. The dataset I used for the project is called Wine Quality Data Set (specifically the β€œwinequality-red.csv” file), taken from the UCI Machine Learning Repository. The dataset contains 1,599 observations and ...
[ { "code": null, "e": 448, "s": 172, "text": "In the following project, I applied three different machine learning algorithms to predict the quality of a wine. The dataset I used for the project is called Wine Quality Data Set (specifically the β€œwinequality-red.csv” file), taken from the UCI Machine ...
How to handle right to left swipe gestures?
This example demonstrate about How to handle right to left swipe gestures 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"?> <LinearLa...
[ { "code": null, "e": 1136, "s": 1062, "text": "This example demonstrate about How to handle right to left swipe gestures" }, { "code": null, "e": 1265, "s": 1136, "text": "Step 1 βˆ’ Create a new project in Android Studio, go to File β‡’ New Project and fill all required details to c...
Git Security SSH
Up to this point, we have used HTTPS to connect to our remote repository. HTTPS will usually work just fine, but you should use SSH if you work with unsecured networks. And sometimes, a project will require that you use SSH. SSH is a secure shell network protocol that is used for network management, remote file transf...
[ { "code": null, "e": 74, "s": 0, "text": "Up to this point, we have used HTTPS to connect to our remote repository." }, { "code": null, "e": 225, "s": 74, "text": "HTTPS will usually work just fine, but you should use SSH if you work with unsecured networks. And sometimes, a proj...
Code Formatting in Kotlin using ktlint - GeeksforGeeks
04 Jan, 2022 As we all know about the kotlin language which is recommended by google particularly for android app development, and of course, it made the life of android app developers easier. But if you are a beginner in this field then you may not know that you need to write the codes in the desired format. and it is...
[ { "code": null, "e": 25142, "s": 25114, "text": "\n04 Jan, 2022" }, { "code": null, "e": 25690, "s": 25142, "text": "As we all know about the kotlin language which is recommended by google particularly for android app development, and of course, it made the life of android app de...
Listing out directories and files in Python?
There are several ways to list the directories and files in python. One of the easiest ways to get all the files or directories from a particular path is by using os.listdir() method. Live Demo import os for x in os.listdir('.'): print(x) .pytest_cache 4forces.json annotation1.py asyncWrite.txt attribute_access.py ...
[ { "code": null, "e": 1130, "s": 1062, "text": "There are several ways to list the directories and files in python." }, { "code": null, "e": 1246, "s": 1130, "text": "One of the easiest ways to get all the files or directories from a particular path is by using os.listdir() method...
Byte Struct in C# - GeeksforGeeks
03 Jan, 2020 In C#, Byte Struct is used to represent 8-bit unsigned integers. The Byte is an immutable value type and the range of Byte is from 0 to 255. This class allows you to create Byte data types and you can perform mathematical and bitwise operations on them like addition, subtraction, multiplication, division, ...
[ { "code": null, "e": 23874, "s": 23846, "text": "\n03 Jan, 2020" }, { "code": null, "e": 24195, "s": 23874, "text": "In C#, Byte Struct is used to represent 8-bit unsigned integers. The Byte is an immutable value type and the range of Byte is from 0 to 255. This class allows you ...
Merge JavaScript objects with the same key value and count them
Suppose, we have an array of objects like this βˆ’ const arr = [{ "value": 10, "id": "111", "name": "BlackCat", }, { "value": 10, "id": "111", "name": "BlackCat", }, { "value": 15, "id": "777", "name": "WhiteCat", }]; We are required to write a JavaScript function that takes in one such arra...
[ { "code": null, "e": 1111, "s": 1062, "text": "Suppose, we have an array of objects like this βˆ’" }, { "code": null, "e": 1308, "s": 1111, "text": "const arr = [{\n \"value\": 10,\n \"id\": \"111\",\n \"name\": \"BlackCat\",\n}, {\n \"value\": 10,\n \"id\": \"111\",\n ...
How to make hollow square marks with Matplotlib in Python?
To make hollow square marks with matplotlib, we can use marker 'ks', markerfacecolor='none', markersize=15, and markeredgecolor=red. Creat x and y data points using numpy. Creat x and y data points using numpy. Create a figure or activate an existing figure, add an axes to the figure as part of a subplot arrangement. C...
[ { "code": null, "e": 1195, "s": 1062, "text": "To make hollow square marks with matplotlib, we can use marker 'ks', markerfacecolor='none', markersize=15, and markeredgecolor=red." }, { "code": null, "e": 1234, "s": 1195, "text": "Creat x and y data points using numpy." }, { ...
Django - Form Processing
Creating forms in Django, is really similar to creating a model. Here again, we just need to inherit from Django class and the class attributes will be the form fields. Let's add a forms.py file in myapp folder to contain our app forms. We will create a login form. myapp/forms.py #-*- coding: utf-8 -*- from django impo...
[ { "code": null, "e": 2311, "s": 2045, "text": "Creating forms in Django, is really similar to creating a model. Here again, we just need to inherit from Django class and the class attributes will be the form fields. Let's add a forms.py file in myapp folder to contain our app forms. We will create a...
Deep Q reinforcement learning (DQN) | Towards Data Science
Q learning is a method that has already existed for a long time in the reinforcement learning community. However, huge progress in this field was achieved recently by using Neural networks in combination with Q learning. This was the birth of so-called Deep Q learning. The full potential of this method was seen in 2013...
[ { "code": null, "e": 657, "s": 171, "text": "Q learning is a method that has already existed for a long time in the reinforcement learning community. However, huge progress in this field was achieved recently by using Neural networks in combination with Q learning. This was the birth of so-called De...
Can QuickSort be implemented in O(nLogn) worst case time complexity? - GeeksforGeeks
08 Jan, 2021 The worst case time complexity of a typical implementation of QuickSort is O(n2). The worst case occurs when the picked pivot is always an extreme (smallest or largest) element. This happens when input array is sorted or reverse sorted and either first or last element is picked as pivot. Although randomize...
[ { "code": null, "e": 23685, "s": 23657, "text": "\n08 Jan, 2021" }, { "code": null, "e": 23974, "s": 23685, "text": "The worst case time complexity of a typical implementation of QuickSort is O(n2). The worst case occurs when the picked pivot is always an extreme (smallest or lar...
Jackson - ObjectMapper Class
ObjectMapper is the main actor class of Jackson library. ObjectMapper class ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Plain Old Java Objects), or to and from a general-purpose JSON Tree Model (JsonNode), as well as related functionality for performing conversions....
[ { "code": null, "e": 2337, "s": 1753, "text": "ObjectMapper is the main actor class of Jackson library. ObjectMapper class ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Plain Old Java Objects), or to and from a general-purpose JSON Tree Model (Json...
C# | Uri.EscapeDataString(String) Method - GeeksforGeeks
01 May, 2019 Uri.EscapeDataString(String) Method is used to convert a string to its escaped representation. Syntax: public static string EscapeDataString (string stringToEscape);Here, it takes the string to escape. Return Value: This method returns a string which contains the escaped representation of stringToEscape. E...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n01 May, 2019" }, { "code": null, "e": 25642, "s": 25547, "text": "Uri.EscapeDataString(String) Method is used to convert a string to its escaped representation." }, { "code": null, "e": 25749, "s": 25642, "tex...
Laravel - Action URL
Laravel 5.7 introduces a new feature called β€œcallable action URL”. This feature is similar to the one in Laravel 5.6 which accepts string in action method. The main purpose of the new syntax introduced Laravel 5.7 is to directly enable you access the controller. The syntax used in Laravel 5.6 version is as shown βˆ’ <?ph...
[ { "code": null, "e": 2735, "s": 2472, "text": "Laravel 5.7 introduces a new feature called β€œcallable action URL”. This feature is similar to the one in Laravel 5.6 which accepts string in action method. The main purpose of the new syntax introduced Laravel 5.7 is to directly enable you access the co...
DateTimeOffset.Add() Method in C# - GeeksforGeeks
14 Jan, 2022 This method is used to return a new DateTimeOffset object that adds a specified time interval to the value of this instance. Syntax: public DateTimeOffset Add (TimeSpan timeSpan); Here, it takes a TimeSpan object that represents a positive or a negative time interval.Return Value: This method returns an o...
[ { "code": null, "e": 23910, "s": 23882, "text": "\n14 Jan, 2022" }, { "code": null, "e": 24036, "s": 23910, "text": "This method is used to return a new DateTimeOffset object that adds a specified time interval to the value of this instance. " }, { "code": null, "e": ...
Python | Assertion Error - GeeksforGeeks
16 Aug, 2021 Assertion Error Assertion is a programming concept used while writing a code where the user declares a condition to be true using assert statement prior to running the module. If the condition is True, the control simply moves to the next line of code. In case if it is False the program stops running and r...
[ { "code": null, "e": 24532, "s": 24504, "text": "\n16 Aug, 2021" }, { "code": null, "e": 24873, "s": 24532, "text": "Assertion Error Assertion is a programming concept used while writing a code where the user declares a condition to be true using assert statement prior to running...
Change the label size and tick label size of colorbar using Matplotlib in Python - GeeksforGeeks
05 Nov, 2021 In this article, we will learn how to change the label size and tick label size of colorbar in Matplotlib using Python. Labels are a kind of assigning name that can be applied to any node in the graph. They are a name only and so labels are either present or absent. To properly label a graph, helps to iden...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n05 Nov, 2021" }, { "code": null, "e": 24412, "s": 24292, "text": "In this article, we will learn how to change the label size and tick label size of colorbar in Matplotlib using Python." }, { "code": null, "e": 24803,...
Guessing the Number Game using Android Studio - GeeksforGeeks
09 Jul, 2020 A Simple Guess the number application in which application generates the random number between 1 to 100 and the user has to guess that Number. It is a simple and basic application that uses basic widgets and libraries.Approach: Step1: Creating a new project Click on File option at topmost corner in left. T...
[ { "code": null, "e": 25757, "s": 25729, "text": "\n09 Jul, 2020" }, { "code": null, "e": 25985, "s": 25757, "text": "A Simple Guess the number application in which application generates the random number between 1 to 100 and the user has to guess that Number. It is a simple and b...
Neo4j - Max Function
It takes a set of rows and a <property-name> of a node or relationship as an input and finds the maximum value from the given <property-name> column of the given rows. Following is the syntax of the MAX() function. MAX(<property-name>) Following is a sample Cypher query, which demonstrates the usage of the function M...
[ { "code": null, "e": 2507, "s": 2339, "text": "It takes a set of rows and a <property-name> of a node or relationship as an input and finds the maximum value from the given <property-name> column of the given rows." }, { "code": null, "e": 2554, "s": 2507, "text": "Following is t...
Ceiling in right side for every element in an array - GeeksforGeeks
04 Feb, 2022 Given an array of integers, find the closest greater element for every element. If there is no greater element then print -1Examples: Input : arr[] = {10, 5, 11, 10, 20, 12} Output : 10 10 12 12 -1 -1Input : arr[] = {50, 20, 200, 100, 30} Output : 100 30 -1 -1 -1 A simple solution is to run two neste...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n04 Feb, 2022" }, { "code": null, "e": 26201, "s": 26065, "text": "Given an array of integers, find the closest greater element for every element. If there is no greater element then print -1Examples: " }, { "code": null,...
How to extract the p-value and F-statistic from aov output in R?
The analysis of variance technique helps us to identify whether there exists a significant mean difference in more than two variables or not. To detect this difference, we either use F-statistic value or p-value. If the F-statistic value is greater than the critical value of F or if p-value is less than the level of si...
[ { "code": null, "e": 1580, "s": 1062, "text": "The analysis of variance technique helps us to identify whether there exists a significant mean difference in more than two variables or not. To detect this difference, we either use F-statistic value or p-value. If the F-statistic value is greater than...
Indexing and Selecting Data with Pandas - GeeksforGeeks
13 Apr, 2022 Indexing in Pandas :Indexing in pandas means simply selecting particular rows and columns of data from a DataFrame. Indexing could mean selecting all the rows and some of the columns, some of the rows and all of the columns, or some of each of the rows and columns. Indexing can also be known as Subset Sele...
[ { "code": null, "e": 42935, "s": 42907, "text": "\n13 Apr, 2022" }, { "code": null, "e": 43249, "s": 42935, "text": "Indexing in Pandas :Indexing in pandas means simply selecting particular rows and columns of data from a DataFrame. Indexing could mean selecting all the rows and ...
How can Tensorflow be used to evaluate a CNN model using Python?
A convolutional neural network can be evaluated using the β€˜evaluate’ method. This method takes the test data as its parameters. Before this, the data is plotted on the console using β€˜matplotlib’ library and β€˜imshow’ methods. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? Con...
[ { "code": null, "e": 1287, "s": 1062, "text": "A convolutional neural network can be evaluated using the β€˜evaluate’ method. This method takes the test data as its parameters. Before this, the data is plotted on the console using β€˜matplotlib’ library and β€˜imshow’ methods." }, { "code": null, ...
Adding Lottie animation in React JS
Lottie is an open source animation file format that’s tiny, high quality, interactive, and can be manipulated at runtime. Let us learn how to implement Lottie animation in React.js. Lottie animations are mainly used for loader screen or as a start screen. It is written and implemented in JSON format in our React projec...
[ { "code": null, "e": 1386, "s": 1062, "text": "Lottie is an open source animation file format that’s tiny, high quality,\ninteractive, and can be manipulated at runtime. Let us learn how to\nimplement Lottie animation in React.js. Lottie animations are mainly\nused for loader screen or as a start sc...
Automated Machine Learning Hyperparameter Tuning in Python | by Will Koehrsen | Towards Data Science
Tuning machine learning hyperparameters is a tedious yet crucial task, as the performance of an algorithm can be highly dependent on the choice of hyperparameters. Manual tuning takes time away from important steps of the machine learning pipeline like feature engineering and interpreting results. Grid and random searc...
[ { "code": null, "e": 812, "s": 171, "text": "Tuning machine learning hyperparameters is a tedious yet crucial task, as the performance of an algorithm can be highly dependent on the choice of hyperparameters. Manual tuning takes time away from important steps of the machine learning pipeline like fe...
Find other two sides of a right angle triangle in C++
In this problem, we are given an integer a denoting one side of a right angle triangle. We need to check whether it is possible to have a right angle triangle with side a. If it is possible, then find the other two sides of a right angle triangle. Let’s take an example to understand the problem, a = 5 Sides : 5, 12, 13...
[ { "code": null, "e": 1310, "s": 1062, "text": "In this problem, we are given an integer a denoting one side of a right angle\ntriangle. We need to check whether it is possible to have a right angle triangle with side a. If it is possible, then find the other two sides of a right angle triangle." }...
8085 program to convert gray to binary
Now let us see a program of Intel 8085 Microprocessor. This program will convert gray code to binary code. Write an assembly language program for 8085 to convert gray code to binary code. The data is stored at address 8200H & store the result at memory location 8201H. Here we are loading the number from memory and in e...
[ { "code": null, "e": 1169, "s": 1062, "text": "Now let us see a program of Intel 8085 Microprocessor. This program will convert gray code to binary code." }, { "code": null, "e": 1331, "s": 1169, "text": "Write an assembly language program for 8085 to convert gray code to binary ...
C | Advanced Pointer | Question 7 - GeeksforGeeks
28 Jun, 2021 Assume that the size of int is 4. #include <stdio.h>void f(char**);int main(){ char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(argv); return 0;}void f(char **p){ char *t; t = (p += sizeof(int))[-1]; printf("%s\n", t);} (A) ab(B) cd(C) ef(D) ghAnswer: (D)Explanation: The expressio...
[ { "code": null, "e": 24466, "s": 24438, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24500, "s": 24466, "text": "Assume that the size of int is 4." }, { "code": "#include <stdio.h>void f(char**);int main(){ char *argv[] = { \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \...
Installing CUDA on Google Cloud Platform in 10 minutes | by Shruti | Towards Data Science
Recently, I spent *quite* some time setting up my CUDA instance on Google Cloud Platform (GCP). After a lot of errors and articles, I figured that it could have been done pretty quick, had I stumbled upon the correct setup process in the first go! So I decided to write this post to get your CUDA enabled instance runnin...
[ { "code": null, "e": 419, "s": 171, "text": "Recently, I spent *quite* some time setting up my CUDA instance on Google Cloud Platform (GCP). After a lot of errors and articles, I figured that it could have been done pretty quick, had I stumbled upon the correct setup process in the first go!" }, ...
How to generate all permutations of a list in Python?
You can use the itertools package's permutations method to find all permutations of a list in Python. You can use it as follows βˆ’ import itertools perms = list(itertools.permutations([1, 2, 3])) print(perms) This will give the output βˆ’ [(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]
[ { "code": null, "e": 1192, "s": 1062, "text": "You can use the itertools package's permutations method to find all permutations of a list in Python. You can use it as follows βˆ’" }, { "code": null, "e": 1270, "s": 1192, "text": "import itertools\nperms = list(itertools.permutation...
Add line for average per group using ggplot2 package in R - GeeksforGeeks
03 Dec, 2021 In this article, we will discuss how to add a line for average per group in a scatter plot in the R Programming Language. In the R Language, we can do so by creating a mean vector by using the group_by() and summarise() function. Then we can use that mean vector along with the geom_hline() function of the ...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n03 Dec, 2021" }, { "code": null, "e": 24973, "s": 24851, "text": "In this article, we will discuss how to add a line for average per group in a scatter plot in the R Programming Language." }, { "code": null, "e": 2523...
Multi-Agent Deep Reinforcement Learning in 13 Lines of Code Using PettingZoo | by J K Terry | Towards Data Science
This tutorial provides a simple introduction to using multi-agent reinforcement learning, assuming a little experience in machine learning and knowledge of Python. Reinforcement stems from using machine learning to optimally control an agent in an environment. It works by learning a policy, a function that maps an obse...
[ { "code": null, "e": 336, "s": 172, "text": "This tutorial provides a simple introduction to using multi-agent reinforcement learning, assuming a little experience in machine learning and knowledge of Python." }, { "code": null, "e": 657, "s": 336, "text": "Reinforcement stems fr...
Accessing HTML source code using Python Selenium.
We can access HTML source code with Selenium webdriver. We can take the help of the page_source method and print the value obtained from it in the console. src = driver.page_source We can also access the HTML source code with the help of Javascript commands in Selenium. We shall take the help of execute_script method a...
[ { "code": null, "e": 1218, "s": 1062, "text": "We can access HTML source code with Selenium webdriver. We can take the help of the page_source method and print the value obtained from it in the console." }, { "code": null, "e": 1243, "s": 1218, "text": "src = driver.page_source" ...
How to Convert CSV to JSON file and vice-versa in JavaScript ? - GeeksforGeeks
22 Apr, 2021 CSV files are a common file format used to store data in a table-like manner. They can be particularly useful when a user intends to download structured information in a way that they can easily open and read on their local machine. CSV files are ideal for this because of their portability and universality...
[ { "code": null, "e": 37915, "s": 37887, "text": "\n22 Apr, 2021" }, { "code": null, "e": 38224, "s": 37915, "text": "CSV files are a common file format used to store data in a table-like manner. They can be particularly useful when a user intends to download structured informatio...
4 pre-commit Plugins to Automate Code Reviewing and Formatting in Python | by Khuyen Tran | Towards Data Science
When committing your Python code to Git, you need to make sure your code: looks nice is organized conforms to the PEP 8 style guide includes docstrings However, it can be overwhelming to check all of these criteria before committing your code. Wouldn’t it be nice if you can automatically check and format your code ever...
[ { "code": null, "e": 246, "s": 172, "text": "When committing your Python code to Git, you need to make sure your code:" }, { "code": null, "e": 257, "s": 246, "text": "looks nice" }, { "code": null, "e": 270, "s": 257, "text": "is organized" }, { "code...
Linux Admin - more and less Command
Both more and less commands allow pagination of large text files. When perusing large files, it is not always possible to use grep unless we know an exact string to search. So we would want to use either more or less. Typically, less is the preferred choice, as it allows both forward and backward perusal of paginated t...
[ { "code": null, "e": 2475, "s": 2257, "text": "Both more and less commands allow pagination of large text files. When perusing large files, it is not always possible to use grep unless we know an exact string to search. So we would want to use either more or less." }, { "code": null, "e"...
How to Install Pandas-Profiling on Windows? - GeeksforGeeks
09 Sep, 2021 In this article, we will look into ways of installing the Pandas Profiling package in Python. Python PIP or Conda (Depending upon preference) Pip users can just open up the command prompt and use the below command to install the Pandas profiling package in python: pip install pandas-profiling The following...
[ { "code": null, "e": 24732, "s": 24704, "text": "\n09 Sep, 2021" }, { "code": null, "e": 24826, "s": 24732, "text": "In this article, we will look into ways of installing the Pandas Profiling package in Python." }, { "code": null, "e": 24833, "s": 24826, "text...
How to Calculate Poker Probabilities in Python | by Thársis Souza, PhD | Towards Data Science
In this article, we show how to represent basic poker elements in Python, e.g., Hands and Combos, and how to calculate poker odds, i.e., likelihood of win/tie/lose in No-Limit Texas Hold’em. We provide a practical analysis based on a real story in a Night at the Venetian in Las Vegas. We will use the package poker to r...
[ { "code": null, "e": 362, "s": 171, "text": "In this article, we show how to represent basic poker elements in Python, e.g., Hands and Combos, and how to calculate poker odds, i.e., likelihood of win/tie/lose in No-Limit Texas Hold’em." }, { "code": null, "e": 457, "s": 362, "tex...
How to convert List to Map in Java 8 | Java 8 List to Map | Online Tutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to learn about...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
DSA using Java - Hash Table
HashTable is a datastructure in which insertion and search operations are very fast irrespective of size of the hashtable. It is nearly a constant or O(1). Hash Table uses array as a storage medium and uses hash technique to generate index where an element is to be inserted or to be located from. Hashing is a technique...
[ { "code": null, "e": 2466, "s": 2168, "text": "HashTable is a datastructure in which insertion and search operations are very fast irrespective of size of the hashtable. It is nearly a constant or O(1). Hash Table uses array as a storage medium and uses hash technique to generate index where an elem...
How to get the day of the month in JavaScript?
To get the day of the month, use the getDate() method. JavaScript date getDate() method returns the day of the month for the specified date according to local time. The value returned by getDate() is an integer between 1 and 31. You can try to run the following code to learn how to get a day of the month in JavaScript ...
[ { "code": null, "e": 1291, "s": 1062, "text": "To get the day of the month, use the getDate() method. JavaScript date getDate() method returns the day of the month for the specified date according to local time. The value returned by getDate() is an integer between 1 and 31." }, { "code": nu...
Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*.. in C++
Given an integer num as input. The goal is to find the number of trailing zeroes in the product 11 X 22 X 33 X...X numnum. For Example num=5 Count of number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*.. are: 5 The number of 2s and 5s in the product will be: 11 * 22* 33* 44* 55=11 * 22* 33* (22)4* 55. So total 10 2s a...
[ { "code": null, "e": 1185, "s": 1062, "text": "Given an integer num as input. The goal is to find the number of trailing zeroes in the product 11 X 22 X 33 X...X numnum." }, { "code": null, "e": 1197, "s": 1185, "text": "For Example" }, { "code": null, "e": 1203, ...
Program to find Lexicographically Smallest String With One Swap in Python
Suppose we have a string s, we have to find the lexicographically smallest string that can be made if we can make at most one swap between two characters in the given string s. So, if the input is like "zyzx", then the output will be "xyzz" To solve this, we will follow these steps βˆ’ temp := an array of size s and fill...
[ { "code": null, "e": 1239, "s": 1062, "text": "Suppose we have a string s, we have to find the lexicographically smallest string that can be made if we can make at most one swap between two characters in the given string s." }, { "code": null, "e": 1303, "s": 1239, "text": "So, i...
Ruby | String chop Method - GeeksforGeeks
17 Jun, 2021 chop is a String class method in Ruby which is used to return a new String with the last character removed. Both characters are removed if the string ends with \r\n, b. Applying chop to an empty string returns an empty string. Syntax:str.chopParameters: Here, str is the given string.Returns: A new string ...
[ { "code": null, "e": 23906, "s": 23878, "text": "\n17 Jun, 2021" }, { "code": null, "e": 24134, "s": 23906, "text": "chop is a String class method in Ruby which is used to return a new String with the last character removed. Both characters are removed if the string ends with \\r...
Getter and Setter in Dart Programming
Reading and writing access to objects is very important in any programming language. Getter and Setter are the exact methods that we use when we want to access the reading and writing privileges to an object's properties. A getter usually looks something like this - returnType get fieldName { // return the value } T...
[ { "code": null, "e": 1284, "s": 1062, "text": "Reading and writing access to objects is very important in any programming language. Getter and Setter are the exact methods that we use when we want to access the reading and writing privileges to an object's properties." }, { "code": null, ...
Bitwise NOT in Arduino
Unlike logical NOT, which inverts the truth value of an expression, the bitwise NOT applies to each bit of a number and inverts its value (0 to 1 and 1 to 0). The operator is ~. The syntax thus is ~a, where a is the number on which this operator has to apply. Please note, that all the leading 0s in the number’s represe...
[ { "code": null, "e": 1240, "s": 1062, "text": "Unlike logical NOT, which inverts the truth value of an expression, the bitwise NOT applies to each bit of a number and inverts its value (0 to 1 and 1 to 0). The operator is ~." }, { "code": null, "e": 1322, "s": 1240, "text": "The ...
GATE | GATE CS 2008 | Question 69 - GeeksforGeeks
24 Sep, 2021 Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price)Collection (Title, Author, Catalog_no) with in the following functional dependencies: I. Title Author --> Catalog_no II. Catalog_no --> Title, Author, Publisher, Year III. Publisher Titl...
[ { "code": null, "e": 24338, "s": 24310, "text": "\n24 Sep, 2021" }, { "code": null, "e": 24498, "s": 24338, "text": "Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price)Collection (Title, Author, Catalog_no)" ...
How to show values in boxplot in R?
The main values in a boxplot are minimum, first quartile, median, third quartile, and the maximum, and this group of values is also called five-number summary. Therefore, if we want to show values in boxplot then we can use text function and provide the five-number summary and labels with fivenum function as shown in t...
[ { "code": null, "e": 1401, "s": 1062, "text": "The main values in a boxplot are minimum, first quartile, median, third quartile, and the maximum, and this group of values is also called five-number summary. Therefore, if we want to show values in boxplot then we can use text function and provide the...
Is Python Object Oriented or Procedural?
Yes, Python support both Object Oriented and Procedural Programming language as it is a high level programming language designed for general purpose programming. Python are multi-paradigm, you can write programs or libraries that are largely procedural, object-oriented, or functional in all of these languages. It dep...
[ { "code": null, "e": 1477, "s": 1062, "text": "Yes, Python support both Object Oriented and Procedural Programming language as it is a high level programming language designed for general purpose programming. Python are multi-paradigm, you can write programs or libraries that are largely procedura...
How to insert own values into auto_increment column in MySQL?
You can achieve this with the help of INSERT statement i.e, you can simply insert it like a normal insert. The syntax is as follows βˆ’ INSERT INTO yourTableName (yourIdColumnName,yourColumnName) values(value1,'value2'); Let us first create a table: mysql> create table InsertValueInAutoIncrement -> ( -> UserId int ...
[ { "code": null, "e": 1196, "s": 1062, "text": "You can achieve this with the help of INSERT statement i.e, you can simply insert it like a normal insert. The syntax is as follows βˆ’" }, { "code": null, "e": 1492, "s": 1196, "text": "INSERT INTO yourTableName (yourIdColumnName,your...
Material Design Time Picker in Android - GeeksforGeeks
06 Jun, 2021 Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android appli...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n06 Jun, 2021" }, { "code": null, "e": 25657, "s": 24725, "text": "Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team ...
Node.js Buffer.equals() Method - GeeksforGeeks
12 Oct, 2021 The Buffer.equals() method is used to compare two buffer objects and returns True of both buffer objects are the same otherwise returns False. Syntax: buffer.equals( buf ) Parameters: This method accepts single parameter otherBuffer which holds the another buffer to compare with buffer object. Return Value...
[ { "code": null, "e": 37176, "s": 37148, "text": "\n12 Oct, 2021" }, { "code": null, "e": 37319, "s": 37176, "text": "The Buffer.equals() method is used to compare two buffer objects and returns True of both buffer objects are the same otherwise returns False." }, { "code"...
Distinct Subsequences in C++
Suppose we have strings S and T. We have to count number of distinct sequences of S which is equal to T. We know that a subsequence of a string is a new string which is formed from the original string by removing some (can be none) of the characters without disturbing the relative positions of the remaining characters....
[ { "code": null, "e": 1167, "s": 1062, "text": "Suppose we have strings S and T. We have to count number of distinct sequences of S which is equal to T." }, { "code": null, "e": 1445, "s": 1167, "text": "We know that a subsequence of a string is a new string which is formed from t...
Rearrange a linked list | Practice | GeeksforGeeks
Given a singly linked list, the task is to rearrange it in a way that all odd position nodes are together and all even positions node are together. Assume the first element to be at position 1 followed by second element at position 2 and so on. Note: You should place all odd positioned nodes first and then the even pos...
[ { "code": null, "e": 701, "s": 238, "text": "Given a singly linked list, the task is to rearrange it in a way that all odd position nodes are together and all even positions node are together.\nAssume the first element to be at position 1 followed by second element at position 2 and so on.\nNote: Yo...
Group by JavaScript Array Object
Suppose we have an array of arrays that contains the marks of some students in some subjects like this βˆ’ const arr = [ ["English", 52], ["Hindi", 154], ["Hindi", 241], ["Spanish", 10], ["French", 65], ["German", 98], ["Russian", 10] ]; We are required to write a JavaScript function that takes in one such array and retu...
[ { "code": null, "e": 1167, "s": 1062, "text": "Suppose we have an array of arrays that contains the marks of some students in some subjects like this βˆ’" }, { "code": null, "e": 1298, "s": 1167, "text": "const arr = [ [\"English\", 52], [\"Hindi\", 154], [\"Hindi\", 241], [\"Spani...
Count two different columns in a single query in MySQL?
You can use CASE statement to count two different columns in a single query. To understand the concept, let us first create a table. The query to create a table is as follows. mysql> create table CountDifferentDemo - > ( - > ProductId int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > ProductName varchar(20), - >...
[ { "code": null, "e": 1238, "s": 1062, "text": "You can use CASE statement to count two different columns in a single query. To understand the concept, let us first create a table. The query to create a table is as follows." }, { "code": null, "e": 1494, "s": 1238, "text": "mysql>...
How to set the background color of a column in a matplotlib table?
To set the background color of a column in a matplotlib table, we can take the following steps βˆ’ Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Make a tuple for columns attribute. Make a tuple for columns attribute....
[ { "code": null, "e": 1159, "s": 1062, "text": "To set the background color of a column in a matplotlib table, we can take the following steps βˆ’" }, { "code": null, "e": 1235, "s": 1159, "text": "Set the figure size and adjust the padding between and around the subplots." }, {...
Reverse Level Order Traversal | Practice | GeeksforGeeks
Given a binary tree of size N, find its reverse level order traversal. ie- the traversal must begin from the last level. Example 1: Input : 1 / \ 3 2 Output: 3 2 1 Explanation: Traversing level 1 : 3 2 Traversing level 0 : 1 Example 2: Input : 10 / \ 20 30 / \ 40 ...
[ { "code": null, "e": 360, "s": 238, "text": "Given a binary tree of size N, find its reverse level order traversal. ie- the traversal must begin from the last level. " }, { "code": null, "e": 371, "s": 360, "text": "Example 1:" }, { "code": null, "e": 490, "s": 37...
PostgreSQL – LEFT JOIN
28 Aug, 2020 The PostgreSQL LEFT JOIN returns all the rows of the table on the left side of the join and matching rows for the table on the right side of the join. The rows for which there is no matching row on the right side, the result-set will contain null. LEFT JOIN is also known as LEFT OUTER JOIN. Syntax: SELECT ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 320, "s": 28, "text": "The PostgreSQL LEFT JOIN returns all the rows of the table on the left side of the join and matching rows for the table on the right side of the join. The rows for which there...
Moment.js isBefore() Function
24 Jul, 2020 It is used to check whether a date is before a particular date in Node.js using the isBefore() function that checks if a moment is before another moment. The first argument will be parsed as a moment, if not already so. Syntax: moment().isBefore(Moment|String|Number|Date|Array); moment().isBefore(Moment|St...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jul, 2020" }, { "code": null, "e": 248, "s": 28, "text": "It is used to check whether a date is before a particular date in Node.js using the isBefore() function that checks if a moment is before another moment. The first argument wi...
Namespacing in JavaScript
22 Feb, 2021 JavaScript by default lacks namespaces however, we can use objects to create namespaces. A nested namespace is a namespace inside another namespace. In JavaScript, we can define a nested namespace by creating an object inside another object. JavaScript Namespaces: Namespace refers to the programming paradi...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2021" }, { "code": null, "e": 270, "s": 28, "text": "JavaScript by default lacks namespaces however, we can use objects to create namespaces. A nested namespace is a namespace inside another namespace. In JavaScript, we can defi...
Python | Multiply all numbers in the list (4 different ways)
14 Jun, 2022 Given a list, print the value obtained after multiplying all numbers in a list. Examples: Input : list1 = [1, 2, 3] Output : 6 Explanation: 1*2*3=6 Input : list1 = [3, 2, 4] Output : 24 Method 1: Traversal Initialize the value of the product to 1(not 0 as 0 multiplied with anything returns zer...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jun, 2022" }, { "code": null, "e": 144, "s": 52, "text": "Given a list, print the value obtained after multiplying all numbers in a list. Examples: " }, { "code": null, "e": 247, "s": 144, "text": "Input : list...
How to Set Color of Progress Bar using HTML and CSS ?
06 Sep, 2020 The progress bar is an important element on the web, the progress bar can be used for downloading, marks obtained, skill measuring unit, etc. To create a progress bar we can use HTML and CSS. The progress bar is used to represent the progress of a task. It is also defined how much work is done and how muc...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Sep, 2020" }, { "code": null, "e": 221, "s": 28, "text": "The progress bar is an important element on the web, the progress bar can be used for downloading, marks obtained, skill measuring unit, etc. To create a progress bar we can u...
Rust Basics
04 Jul, 2022 In last 2 decades the computers and the internet has made an increasing demand, and with evolution of new technologies, devices and protocols the programming languages also being updated regularly but still most of the early programming languages like C, C++ have shown some drawbacks. These drawbacks motiv...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jul, 2022" }, { "code": null, "e": 643, "s": 28, "text": "In last 2 decades the computers and the internet has made an increasing demand, and with evolution of new technologies, devices and protocols the programming languages also be...
Subset Sum Problem | DP-25
21 Jun, 2022 Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum. Example: Input: set[] = {3, 34, 4, 12, 5, 2}, sum = 9 Output: True There is a subset (4, 5) with sum 9. Input: set[] = {3, 34, 4, 12, 5, 2}, sum = 30 Output: False There ...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 187, "s": 54, "text": "Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum. " }, { "code": null, "e": 197,...
Subtract minutes from current time using Calendar.add() method in Java
Import the following package for Calendar class in Java. import java.util.Calendar; Firstly, 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 minutes using the calend...
[ { "code": null, "e": 1244, "s": 1187, "text": "Import the following package for Calendar class in Java." }, { "code": null, "e": 1271, "s": 1244, "text": "import java.util.Calendar;" }, { "code": null, "e": 1344, "s": 1271, "text": "Firstly, create a Calendar ...
Friend class and function in C++ - GeeksforGeeks
15 Mar, 2021 Friend Class A friend class can access private and protected members of other class in which it is declared as friend. It is sometimes useful to allow a particular class to access private members of other class. For example, a LinkedList class may be allowed to access private members of Node. CPP class N...
[ { "code": null, "e": 23759, "s": 23731, "text": "\n15 Mar, 2021" }, { "code": null, "e": 24055, "s": 23759, "text": "Friend Class A friend class can access private and protected members of other class in which it is declared as friend. It is sometimes useful to allow a particular...
K’th Non-repeating Character in Python using List Comprehension and OrderedDict
In this article, we will learn about K’th Non-repeating Character in Python using List Comprehension and OrderedDict. To do so we take the help of inbuilt constructs available in Python. 1. First, we form a dictionary data from the input. 2. Now we count the frequency of each character. 3. Now we extract the list of al...
[ { "code": null, "e": 1249, "s": 1062, "text": "In this article, we will learn about K’th Non-repeating Character in Python using List Comprehension and OrderedDict. To do so we take the help of inbuilt constructs available in Python." }, { "code": null, "e": 1448, "s": 1249, "tex...
Apply function to every row in a Pandas DataFrame in Python
In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one. It is used to apply a function to every row of a DataFrame. For example, if we want to multiply all the numbers from each and add it as a new column, then apply() method is beneficial...
[ { "code": null, "e": 1199, "s": 1062, "text": "In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one." }, { "code": null, "e": 1424, "s": 1199, "text": "It is used to apply a function to every row o...
How to convert DateTime to a number in MySQL?
To convert the date time to a number in MySQL, the syntax is as follows βˆ’ SELECT UNIX_TIMESTAMP(yourColumnName) as anyVariableName FROM yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows βˆ’ mysql> create table DateTimeToNumberDemo -> ( -> Id int NOT NULL...
[ { "code": null, "e": 1136, "s": 1062, "text": "To convert the date time to a number in MySQL, the syntax is as follows βˆ’" }, { "code": null, "e": 1213, "s": 1136, "text": "SELECT UNIX_TIMESTAMP(yourColumnName) as anyVariableName FROM yourTableName;" }, { "code": null, ...
Longest Bitonic Subsequence
A sequence is said to be bitonic if it is first increasing and then decreasing. In this problem, an array of all positive integers is given. We have to find a subsequence which is increasing first and then decreasing. To solve this problem, we will define two subsequences, they are the Longest Increasing Subsequence an...
[ { "code": null, "e": 1280, "s": 1062, "text": "A sequence is said to be bitonic if it is first increasing and then decreasing. In this problem, an array of all positive integers is given. We have to find a subsequence which is increasing first and then decreasing." }, { "code": null, "e"...
Apache Kafka - Integration With Spark
In this chapter, we will be discussing about how to integrate Apache Kafka with Spark Streaming API. Spark Streaming API enables scalable, high-throughput, fault-tolerant stream processing of live data streams. Data can be ingested from many sources like Kafka, Flume, Twitter, etc., and can be processed using complex a...
[ { "code": null, "e": 2068, "s": 1967, "text": "In this chapter, we will be discussing about how to integrate Apache Kafka with Spark Streaming API." }, { "code": null, "e": 2698, "s": 2068, "text": "Spark Streaming API enables scalable, high-throughput, fault-tolerant stream proc...
How to use .on and .hover in jQuery ? - GeeksforGeeks
23 Apr, 2020 jQuery .on() method: This method is used to attach an event listener to an element. This method is equivalent to the addEventListener in vanilla JavaScript. Syntax: $(element).on(event, childSelector, data, function) Parameter event: It specifies the event to attach (click, submit, etc.). childSelector: I...
[ { "code": null, "e": 25083, "s": 25055, "text": "\n23 Apr, 2020" }, { "code": null, "e": 25240, "s": 25083, "text": "jQuery .on() method: This method is used to attach an event listener to an element. This method is equivalent to the addEventListener in vanilla JavaScript." }, ...