title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Gaussian Process Regression using GPyTorch | by Richard Cornelius Suwandi | Towards Data Science | Gaussian Process, or GP for short, is an underappreciated yet powerful algorithm for machine learning tasks. It is a non-parametric, Bayesian approach to machine learning that can be applied to supervised learning problems like regression and classification. Compared to other supervised learning algorithms, GP has seve... | [
{
"code": null,
"e": 629,
"s": 172,
"text": "Gaussian Process, or GP for short, is an underappreciated yet powerful algorithm for machine learning tasks. It is a non-parametric, Bayesian approach to machine learning that can be applied to supervised learning problems like regression and classificati... |
ResultSetHandler interface | The org.apache.commons.dbutils.ResultSetHandler interface is responsible to convert ResultSets into objects.
Following is the declaration for org.apache.commons.dbutils.ResultSetHandler class −
public interface ResultSetHandler<T>
Step 1 − Create a connection object.
Step 1 − Create a connection object.
Step 2 − Creat... | [
{
"code": null,
"e": 2261,
"s": 2152,
"text": "The org.apache.commons.dbutils.ResultSetHandler interface is responsible to convert ResultSets into objects."
},
{
"code": null,
"e": 2346,
"s": 2261,
"text": "Following is the declaration for org.apache.commons.dbutils.ResultSetHand... |
Database - Third Normal Form (3NF) | A table is in a third normal form when the following conditions are met −
It is in second normal form.
All nonprimary fields are dependent on the primary key.
The dependency of these non-primary fields is between the data. For example, in the following table – the street name, city and the state are unbreakably bound t... | [
{
"code": null,
"e": 2527,
"s": 2453,
"text": "A table is in a third normal form when the following conditions are met −"
},
{
"code": null,
"e": 2556,
"s": 2527,
"text": "It is in second normal form."
},
{
"code": null,
"e": 2612,
"s": 2556,
"text": "All nonp... |
C++ Program For Selecting A Random Node From A Singly Linked List - GeeksforGeeks | 28 Dec, 2021
Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are given a random number generator.Below is a Simple Solution:
Count the number of nodes by traversing the list.Traverse the list again and select e... | [
{
"code": null,
"e": 24215,
"s": 24187,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 24437,
"s": 24215,
"text": "Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are g... |
SAP BODS - Quick Guide | A Data warehouse is known as a central repository to store the data from one or multiple heterogeneous data sources. Data warehouse is used for reporting and analyzing of information and stores both historical and current data. The data in DW system is used for Analytical reporting, which is later used by Business Anal... | [
{
"code": null,
"e": 3244,
"s": 2861,
"text": "A Data warehouse is known as a central repository to store the data from one or multiple heterogeneous data sources. Data warehouse is used for reporting and analyzing of information and stores both historical and current data. The data in DW system is ... |
CherryPy - A Working Application | Full stack applications provide a facility to create a new application via some command or execution of the file.
Consider the Python applications like web2py framework; the entire project/application is created in terms of MVC framework. Likewise, CherryPy allows the user to set up and configure the layout of the code... | [
{
"code": null,
"e": 1999,
"s": 1885,
"text": "Full stack applications provide a facility to create a new application via some command or execution of the file."
},
{
"code": null,
"e": 2233,
"s": 1999,
"text": "Consider the Python applications like web2py framework; the entire p... |
How to Render OpenAI-Gym on Windows | by Jian Xu | Towards Data Science | OpenAI Gym is a great place to study and develop reinforced learning algorithms. It provides lots of interesting games (so called “environments”) that you can put your strategy to test. For example, it has simple games like balancing a vertical pole on a little cart (“CartPole-v1”), swinging up a pendulum to upright po... | [
{
"code": null,
"e": 590,
"s": 172,
"text": "OpenAI Gym is a great place to study and develop reinforced learning algorithms. It provides lots of interesting games (so called “environments”) that you can put your strategy to test. For example, it has simple games like balancing a vertical pole on a ... |
Tree-Based Algorithms Approach on Predicting Customer Satisfaction | by Zikry Adjie Nugraha | Towards Data Science | Customer satisfaction is one of the methods that businesses can use to effectively manage and monitor their operations. Every product can survive in the marketplace for a long time as long as the customer satisfaction level remains high. Good quality of the product is not the only factor that can make a product can hav... | [
{
"code": null,
"e": 1057,
"s": 171,
"text": "Customer satisfaction is one of the methods that businesses can use to effectively manage and monitor their operations. Every product can survive in the marketplace for a long time as long as the customer satisfaction level remains high. Good quality of ... |
How to get the list of data sets available in base R or in a package in R? | There are many data sets available in base R and in different packages of R. The characteristics of these data sets are very different, for example, some data sets are time series data, some have only numerical columns, some have numerical as well as factor columns, some includes character columns with other type of co... | [
{
"code": null,
"e": 1766,
"s": 1062,
"text": "There are many data sets available in base R and in different packages of R. The characteristics of these data sets are very different, for example, some data sets are time series data, some have only numerical columns, some have numerical as well as fa... |
How to select an element with multiple classes using jQuery ? - GeeksforGeeks | 20 Mar, 2020
There are two procedures to select an element with multiple classes by using jQuery. Both the procedures are described below with the proper example.
Using filter() Method: By using filter() method we can filter out all the elements that do not match the selected criteria and those matches will be returned... | [
{
"code": null,
"e": 40723,
"s": 40695,
"text": "\n20 Mar, 2020"
},
{
"code": null,
"e": 40873,
"s": 40723,
"text": "There are two procedures to select an element with multiple classes by using jQuery. Both the procedures are described below with the proper example."
},
{
... |
Working With JSON in SQL - GeeksforGeeks | 23 Jun, 2021
JSON stands for Javascript Object Notation. It is mainly used in storing and transporting data. Mostly all NoSQL databases like MongoDB, CouchDB, etc., use JSON format data. Whenever your data from one server has to be transferred to a web page, JSON format is the preferred format as front-end applications... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 24783,
"s": 24268,
"text": "JSON stands for Javascript Object Notation. It is mainly used in storing and transporting data. Mostly all NoSQL databases like MongoDB, CouchDB, etc., use JSON fo... |
C++ | Exception Handling | Question 10 - GeeksforGeeks | 28 Jun, 2021
Which of the following is true about exception handling in C++?
1) There is a standard exception class like Exception class in Java.2) All exceptions are unchecked in C++, i.e., compiler doesn’t check if the exceptions are caught or not.3) In C++, a function can specify the list of exceptions that it can t... | [
{
"code": null,
"e": 24782,
"s": 24754,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24846,
"s": 24782,
"text": "Which of the following is true about exception handling in C++?"
},
{
"code": null,
"e": 25137,
"s": 24846,
"text": "1) There is a standard exc... |
Spring MVC - RadioButton Example | The following example show how to use RadioButton in forms using the Spring Web MVC framework. To start with it, let us have a working Eclipse IDE in place and stick to the following steps to develop a Dynamic Form based Web Application using Spring Web Framework −
package com.tutorialspoint;
public class User {
... | [
{
"code": null,
"e": 3057,
"s": 2791,
"text": "The following example show how to use RadioButton in forms using the Spring Web MVC framework. To start with it, let us have a working Eclipse IDE in place and stick to the following steps to develop a Dynamic Form based Web Application using Spring Web... |
Shortest Path in Binary Matrix in C++ | Suppose we have an N by N square grid, there each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and only if it is composed of cells C_1, C_2, ..., C_k such that −
Adjacent cells C_i and C_{i+1} are connected 8-directionally (So they are different and share an edge o... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "Suppose we have an N by N square grid, there each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and only if it is composed of cells C_1, C_2, ..., C_k such that −"
},
{
"code": null,
"e":... |
Experiment tracking in machine learning | by Dipam Vasani | Towards Data Science | As machine learning matures, we come across newer problems, and then we come up with sophisticated solutions for these problems. For example, in the beginning, it was hard to train a neural network itself. Then came GPUs and frameworks that made this task really easy. After that came Tensorboard for easy metric trackin... | [
{
"code": null,
"e": 643,
"s": 172,
"text": "As machine learning matures, we come across newer problems, and then we come up with sophisticated solutions for these problems. For example, in the beginning, it was hard to train a neural network itself. Then came GPUs and frameworks that made this task... |
Nodes at given distance in binary tree | Practice | GeeksforGeeks | Given a binary tree, a target node in the binary tree, and an integer value k, find all the nodes that are at distance k from the given target node. No parent pointers are available.
Example 1:
Input:
20
/ \
8 22
/ \
4 12
/ \
10 14
Target Node = 8
K... | [
{
"code": null,
"e": 421,
"s": 238,
"text": "Given a binary tree, a target node in the binary tree, and an integer value k, find all the nodes that are at distance k from the given target node. No parent pointers are available."
},
{
"code": null,
"e": 432,
"s": 421,
"text": "Exa... |
Matplotlib histogram with multiple legend entries | To plot a histogram with multiple legend entries, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create random data using numpy
Plot a histogram using hist() method.
Make a list of colors to color the face of each patch.
Iterate the patches and set face col... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To plot a histogram with multiple legend entries, we can take the following steps −"
},
{
"code": null,
"e": 1222,
"s": 1146,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": ... |
Combine two Pandas series into a DataFrame - GeeksforGeeks | 28 Jul, 2020
In this post, we will learn how to combine two series into a DataFrame? Before starting let’s see what a series is?Pandas Series is a one-dimensional labeled array capable of holding any data type. In other terms, Pandas Series is nothing but a column in an excel sheet.
There are several ways to concatenat... | [
{
"code": null,
"e": 24882,
"s": 24854,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 25153,
"s": 24882,
"text": "In this post, we will learn how to combine two series into a DataFrame? Before starting let’s see what a series is?Pandas Series is a one-dimensional labeled array... |
Keep your code clean using Black & Pylint & Git Hooks & Pre-commit | by Ismail Mebsout | Towards Data Science | Coding can be a very hard task especially when working on a project with different developers. Each member of the team has his/her own way of coding leading to very heterogeneous scripts. This is why it is important to have a similar code formatter and code linter in order to make your git commits cleaner. This can be ... | [
{
"code": null,
"e": 579,
"s": 172,
"text": "Coding can be a very hard task especially when working on a project with different developers. Each member of the team has his/her own way of coding leading to very heterogeneous scripts. This is why it is important to have a similar code formatter and co... |
Get Data from Multiple Tables Questions | 1.Which of the following is not related to a Relational Database?
Selection
Projection
Joining
None of the above
Selection
Projection
Joining
None of the above
Answer: D. The options A, B and C are the major capabilities of the Oracle Relational Database.
2.Which of the following methods is used for writing a query ... | [
{
"code": null,
"e": 2530,
"s": 2463,
"text": "1.Which of the following is not related to a Relational Database? "
},
{
"code": null,
"e": 2579,
"s": 2530,
"text": "\nSelection\nProjection\nJoining\nNone of the above\n"
},
{
"code": null,
"e": 2589,
"s": 2579,
... |
Comments in Perl | Comments in any programming language are friends of developers. Comments can be used to make program user-friendly and they are simply skipped by the interpreter without impacting the core functionality. For example, in the above program, a line starting with hash # is a comment.
Simply saying comments in Perl start wi... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "Comments in any programming language are friends of developers. Comments can be used to make program user-friendly and they are simply skipped by the interpreter without impacting the core functionality. For example, in the above program, a line startin... |
An Upgraded Marketing Mix Modeling in Python | by Dr. Robert Kübler | Towards Data Science | In my last article, I introduced you to the world of marketing mix modeling. If you have not read it so far, please do before you proceed.
towardsdatascience.com
There, we have a created a linear regression model that is able to predict sales based on raw advertising spends in several advertising channels, such as TV, ... | [
{
"code": null,
"e": 311,
"s": 172,
"text": "In my last article, I introduced you to the world of marketing mix modeling. If you have not read it so far, please do before you proceed."
},
{
"code": null,
"e": 334,
"s": 311,
"text": "towardsdatascience.com"
},
{
"code": nu... |
Node.js vm.runInContext() Method - GeeksforGeeks | 11 Oct, 2021
The vm.runInContext() method is used to compile the code. It runs the code inside the context of the contextifiedObject and then returns the output. Moreover, the running code have no access to the local scope and, the contextifiedObject object be contextified formerly using vm.createContext() method.
Synt... | [
{
"code": null,
"e": 37354,
"s": 37326,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 37657,
"s": 37354,
"text": "The vm.runInContext() method is used to compile the code. It runs the code inside the context of the contextifiedObject and then returns the output. Moreover, the ... |
bar() function in C graphics - GeeksforGeeks | 30 Jan, 2018
The header file graphics.h contains bar() function which is used to draw a 2-dimensional, rectangular filled in bar.Syntax :
void bar(int left, int top, int right, int bottom);
where,
left specifies the X-coordinate of top left corner,
top specifies the Y-coordinate of top left corner,
right specifies the... | [
{
"code": null,
"e": 25799,
"s": 25771,
"text": "\n30 Jan, 2018"
},
{
"code": null,
"e": 25924,
"s": 25799,
"text": "The header file graphics.h contains bar() function which is used to draw a 2-dimensional, rectangular filled in bar.Syntax :"
},
{
"code": null,
"e": 2... |
HTML | <source> src Attribute - GeeksforGeeks | 28 Jun, 2019
The HTML <source> src attribute is used to specify the URL of the media resource. The source element is used as a child element of the <audio> and <video> element.
Syntax:
<source src="URL">
Attribute Values: It contains single value URL which specifies the URL of the media resource. There are two types of... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 26303,
"s": 26139,
"text": "The HTML <source> src attribute is used to specify the URL of the media resource. The source element is used as a child element of the <audio> and <video> element.... |
How to Add Hyperlink to TextView in Android? - GeeksforGeeks | 06 Jun, 2021
Hello geeks, today we are going to make an application where we will see that how we can add a link to a TextView in Android, and using this concept we will add portals – home and practice (of GeeksforGeeks) in our application. So that, user can directly go to these portals from our application.
We will be... | [
{
"code": null,
"e": 26932,
"s": 26904,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 27229,
"s": 26932,
"text": "Hello geeks, today we are going to make an application where we will see that how we can add a link to a TextView in Android, and using this concept we will add po... |
Java do-while loop with Examples - GeeksforGeeks | 01 Apr, 2022
Loops in Java come into use when we need to repeatedly execute a block of statements. Java do-while loop is an Exit control loop. Therefore, unlike for or while loop, a do-while check for the condition after executing the statements of the loop body.
Syntax:
do
{
// Loop Body
Update_expression
}
... | [
{
"code": null,
"e": 30746,
"s": 30718,
"text": "\n01 Apr, 2022"
},
{
"code": null,
"e": 30997,
"s": 30746,
"text": "Loops in Java come into use when we need to repeatedly execute a block of statements. Java do-while loop is an Exit control loop. Therefore, unlike for or while lo... |
What is onkeypress event in JavaScript? | The onkeypress event triggers when a key is pressed and released. You can try to run the following code to learn how to work with onkeypress event in JavaScript −
<html>
<head>
<script>
<!--
function sayHello() {
alert("A key is pressed.")
}
//-->
... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "The onkeypress event triggers when a key is pressed and released. You can try to run the following code to learn how to work with onkeypress event in JavaScript −"
},
{
"code": null,
"e": 1486,
"s": 1225,
"text": "<html>\n <head>\n... |
LinearLayout and its Important Attributes with Examples in Android - GeeksforGeeks | 14 Oct, 2020
LinearLayout is the most basic layout in android studio, that aligns all the children sequentially either in a horizontal manner or a vertical manner by specifying the android:orientation attribute. If one applies android:orientation=”vertical” then elements will be arranged one after another in a vertical... | [
{
"code": null,
"e": 24996,
"s": 24968,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 25434,
"s": 24996,
"text": "LinearLayout is the most basic layout in android studio, that aligns all the children sequentially either in a horizontal manner or a vertical manner by specifying... |
Process Creation & Termination | Till now we know that whenever we execute a program then a process is created and would be terminated after the completion of the execution. What if we need to create a process within the program and may be wanted to schedule a different task for it. Can this be achieved? Yes, obviously through process creation. Of cou... | [
{
"code": null,
"e": 2291,
"s": 1871,
"text": "Till now we know that whenever we execute a program then a process is created and would be terminated after the completion of the execution. What if we need to create a process within the program and may be wanted to schedule a different task for it. Ca... |
CSS | 4 Digit Hex Color - GeeksforGeeks | 22 Aug, 2019
The Four Digit Hex Color can be used as the shorthand of 8 Digit Hex Color. Four Digit Hex color can be used to define the color of your elements with the CSS like 8 Digit Hex Color. There are 8 character in 8 digit hex color that shrinks to 4 in 4 digit hex color but performance is the same as the color. ... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n22 Aug, 2019"
},
{
"code": null,
"e": 27263,
"s": 26731,
"text": "The Four Digit Hex Color can be used as the shorthand of 8 Digit Hex Color. Four Digit Hex color can be used to define the color of your elements with the CSS like... |
Apache CXF - Quick Guide | In today's environment, you can create a web service application using several options. You can use one or more of the several standard and widely accepted protocols for communication. For example SOAP, XML/HTTP, RESTful HTTP, and CORBA (Common Object Request Broker Architecture, which was very popular in olden days bu... | [
{
"code": null,
"e": 2113,
"s": 1763,
"text": "In today's environment, you can create a web service application using several options. You can use one or more of the several standard and widely accepted protocols for communication. For example SOAP, XML/HTTP, RESTful HTTP, and CORBA (Common Object R... |
How many parameters can a lambda expression have in Java? | The lambda expressions are easy and contain three parts like parameters (method arguments), arrow operator (->) and expressions (method body). The lambda expressions can be categorized into three types: no parameter lambda expressions, single parameter lambda expressions and multiple parameters lambda expressions.
We n... | [
{
"code": null,
"e": 1378,
"s": 1062,
"text": "The lambda expressions are easy and contain three parts like parameters (method arguments), arrow operator (->) and expressions (method body). The lambda expressions can be categorized into three types: no parameter lambda expressions, single parameter ... |
TypeScript - Number toExponential() | This method returns a string representing the number object in exponential notation.
number.toExponential( [fractionDigits] )
fractionDigits − An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.
A string representing a Number object in expo... | [
{
"code": null,
"e": 2133,
"s": 2048,
"text": "This method returns a string representing the number object in exponential notation."
},
{
"code": null,
"e": 2175,
"s": 2133,
"text": "number.toExponential( [fractionDigits] )\n"
},
{
"code": null,
"e": 2323,
"s": 21... |
pandas.DataFrame.T() function in Python | 11 Oct, 2020
pandas.DataFrame.T property is used to transpose index and columns of the data frame. The property T is somehow related to method transpose(). The main function of this property is to create a reflection of the data frame overs the main diagonal by making rows as columns and vice versa.
Syntax: DataFrame.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2020"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "pandas.DataFrame.T property is used to transpose index and columns of the data frame. The property T is somehow related to method transpose(). The main function of this prope... |
How to draw Horizontal and Vertical lines in an Android App using XML | 18 Feb, 2021
This article demonstrates how to draw a horizontal and a vertical line in an Android app.
Although we have countless XML tags to meet almost all of our needs, unfortunately, we don’t have any tag such as <line> tag to draw the line. However, <view> tag can be used in XML as a workaround.
NOTE: The “view” t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "This article demonstrates how to draw a horizontal and a vertical line in an Android app."
},
{
"code": null,
"e": 317,
"s": 118,
"text": "Although we have... |
How to validate SSN (Social Security Number) using Regular Expression | 27 Jan, 2021
Given string str, the task is to check whether the given string is valid SSN (Social Security Number) or not by using Regular Expression. The valid SSN (Social Security Number) must satisfy the following conditions:
It should have 9 digits.It should be divided into 3 parts by hyphen (-).The first part sho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "Given string str, the task is to check whether the given string is valid SSN (Social Security Number) or not by using Regular Expression. The valid SSN (Social Security Number... |
List of all Java Keywords | 09 Mar, 2022
Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects. If we do we will get a compile-time error as shown below as follows:
Illustration:
Java
// Java Pro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 329,
"s": 52,
"text": "Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to ... |
Python | Pandas DataFrame.to_string | 21 Feb, 2019
Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 342,
"s": 28,
"text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both ... |
What is the role of src and dist folders in JavaScript/jQuery ? | 15 Apr, 2020
Using a standard folder structure is not an absolute requirement, but it is highly recommended based on what the JavaScript/jQuery community has been following by convention.
Some common directories are lib/, src/, build/, dist/, bin/, test/, unit/, integration/, env/
src: It stands for source and is the r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2020"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "Using a standard folder structure is not an absolute requirement, but it is highly recommended based on what the JavaScript/jQuery community has been following by convention."... |
Method References in Java with examples | 24 Feb, 2022
Functional Interfaces in Java and Lambda Function are prerequisites required in order to grasp grip over method references in Java. As we all know that a method is a collection of statements that perform some specific task and return the result to the caller. A method can perform some specific task without... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 503,
"s": 54,
"text": "Functional Interfaces in Java and Lambda Function are prerequisites required in order to grasp grip over method references in Java. As we all know that a method is a collecti... |
Replace null values with default value in Java Map | 11 Dec, 2018
Given a Map with null values in it, the task is to replace all the null values with a default value.
Examples:
Input: map = {1=1, 2=2, 3=null, 4=4, 5=null, 6=null}, defaultValue = 0Output: {1=1, 2=2, 3=0, 4=4, 5=0, 6=0}
Input: map = {1=A, 2=B, 3=null, 4=D, 5=null, 6=null}, defaultValue = ‘Z’Output: {1=A, 2... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 154,
"s": 53,
"text": "Given a Map with null values in it, the task is to replace all the null values with a default value."
},
{
"code": null,
"e": 164,
"s": 154,
"text": "Exam... |
Using CX_Freeze in Python | 07 Jul, 2017
We have created many interesting projects and programs in Python.There may come a time when we’ve created something very exciting, and we want to share it. Usually, in order to share our Python program, the recipient is going to need to have the same version of Python installed, along with all of the modul... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jul, 2017"
},
{
"code": null,
"e": 578,
"s": 28,
"text": "We have created many interesting projects and programs in Python.There may come a time when we’ve created something very exciting, and we want to share it. Usually, in order t... |
Set MIN and MAX Selectable Dates in DatePicker Dialog in Android | 09 Dec, 2021
Applications like ticket booking for traveling, theatres, movies, plays, appointments, reminders, etc., require the user to pick a specific day or time for confirming a slot or a booking. In most of these applications, a service is to be picked and then the user has to pick up a slot to further proceed. At... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 1022,
"s": 28,
"text": "Applications like ticket booking for traveling, theatres, movies, plays, appointments, reminders, etc., require the user to pick a specific day or time for confirming a slot ... |
Puzzle | River Crossing | 18 Apr, 2019
Aside from the river, there is 1 policeman, 1 robber, 1 blond haired woman, and her 2 children and 1 red-haired woman and her 2 children. There is a boat having a carrying capacity of a maximum of 2 people. Only adults can sail but not the kids. Please help all people to move across the river, knowing that... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Apr, 2019"
},
{
"code": null,
"e": 547,
"s": 52,
"text": "Aside from the river, there is 1 policeman, 1 robber, 1 blond haired woman, and her 2 children and 1 red-haired woman and her 2 children. There is a boat having a carrying ca... |
How to draw text on Image in Android? | This example demonstrates how do I draw text on imagein 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"?>
<RelativeLayout xmlns:... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "This example demonstrates how do I draw text on imagein android."
},
{
"code": null,
"e": 1256,
"s": 1127,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a n... |
How to Install Multiple R Packages? - GeeksforGeeks | 25 Mar, 2022
In this article, we will see how to install multiple packages in R Programming Language. Installation can be done in two ways.
Step 1: Open R Studio
Step 2: Navigate to Tools and select the Install packages option
Step 3: In the Text box packages, enter the package names.
Step 4: Click... | [
{
"code": null,
"e": 24952,
"s": 24924,
"text": "\n25 Mar, 2022"
},
{
"code": null,
"e": 25079,
"s": 24952,
"text": "In this article, we will see how to install multiple packages in R Programming Language. Installation can be done in two ways."
},
{
"code": null,
"e":... |
What does %s mean in a Python format string? - GeeksforGeeks | 02 Feb, 2021
The % symbol is used in Python with a large variety of data types and configurations. %s specifically is used to perform concatenation of strings together. It allows us to format a value inside a string. It is used to incorporate another string within a string. It automatically provides type conversion fro... | [
{
"code": null,
"e": 24316,
"s": 24288,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 24643,
"s": 24316,
"text": "The % symbol is used in Python with a large variety of data types and configurations. %s specifically is used to perform concatenation of strings together. It allo... |
Deep Learning on Dataframes with PyTorch | by Mike Chaykowsky | Towards Data Science | The goal of this post is to lay out a framework that could get you up and running with deep learning predictions on any dataframe using PyTorch and Pandas. By any dataframe I mean any combination of: categorical features, continuous features, datetime features, regression, binary classification, or multi-classification... | [
{
"code": null,
"e": 494,
"s": 172,
"text": "The goal of this post is to lay out a framework that could get you up and running with deep learning predictions on any dataframe using PyTorch and Pandas. By any dataframe I mean any combination of: categorical features, continuous features, datetime fea... |
MySQL SELECT Statement | The SELECT statement is used to select data from a database.
The data returned is stored in a result table, called the result-set.
Here, column1, column2, ... are the field names of the table you want to
select data from. If you
want to select all the fields available in the table, use the following syntax:
In this t... | [
{
"code": null,
"e": 61,
"s": 0,
"text": "The SELECT statement is used to select data from a database."
},
{
"code": null,
"e": 131,
"s": 61,
"text": "The data returned is stored in a result table, called the result-set."
},
{
"code": null,
"e": 311,
"s": 131,
... |
Tryit Editor v3.7 | HTML Form attributes
Tryit: The formmethod attribute | [
{
"code": null,
"e": 31,
"s": 10,
"text": "HTML Form attributes"
}
] |
tone() and noTone() in Arduino | The tone function can be used to generate a square wave (50% duty cycle) of a specific frequency on a pin.
The syntax is −
tone(pin, frequency)
pin is the pin number on which to generate the tone. The frequency is specified in Hz.
This function can also take in a third optional argument − the millisecond duration for w... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "The tone function can be used to generate a square wave (50% duty cycle) of a specific frequency on a pin."
},
{
"code": null,
"e": 1185,
"s": 1169,
"text": "The syntax is −"
},
{
"code": null,
"e": 1206,
"s": 1185,
... |
How to make a div vertically scrollable without content using CSS ? - GeeksforGeeks | 12 Aug, 2021
In this article, we will see how we can create a vertical scrollable section using CSS. HTML code is used to create the basic structure of the sections and CSS code is used to set the style,
HTML Code:
Create an HTML div element with the class container.
Created three more nested div with class box
Write s... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 25176,
"s": 24985,
"text": "In this article, we will see how we can create a vertical scrollable section using CSS. HTML code is used to create the basic structure of the sections and CSS cod... |
Apache HttpClient - Http Get Request | The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
The HttpClient API provides a class named HttpGet which represents the get request method.
Follow the steps given below to send a get request ... | [
{
"code": null,
"e": 2005,
"s": 1827,
"text": "The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data."
},
{
"code": null,
"e": 2096,
"s": 2005,
"text": "The ... |
How to create button dynamically with click event in Angular ? - GeeksforGeeks | 07 Nov, 2019
The task is to create a button dynamically with click event using angular. In these examples when someone clicks on the button then a new button gets created.
The easiest way to create a button in AngularJS is to use the ng-repeat directive. We can easily hook up a repeat logic inside a button click event.... | [
{
"code": null,
"e": 27880,
"s": 27852,
"text": "\n07 Nov, 2019"
},
{
"code": null,
"e": 28039,
"s": 27880,
"text": "The task is to create a button dynamically with click event using angular. In these examples when someone clicks on the button then a new button gets created."
}... |
How do I position the buttons on a Tkinter window? | To set the position of a button, we use the place method of button widget. The place method takes the x and y coordinates of the button.
Import the required libraries and create an instance of tkinter frame.
Import the required libraries and create an instance of tkinter frame.
Set the size of the frame using win.geome... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "To set the position of a button, we use the place method of button widget. The place method takes the x and y coordinates of the button."
},
{
"code": null,
"e": 1270,
"s": 1199,
"text": "Import the required libraries and create an i... |
Find element using minimum segments in Seven Segment Display - GeeksforGeeks | 08 Jun, 2021
A Seven Segment Display can be used to display numbers. Given an array of n natural numbers. The task is to find the number in the array which is using minimum segments to display number. If multiple numbers have a minimum number of segments, output the number having the smallest index.
Examples :
Input ... | [
{
"code": null,
"e": 25318,
"s": 25290,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 25606,
"s": 25318,
"text": "A Seven Segment Display can be used to display numbers. Given an array of n natural numbers. The task is to find the number in the array which is using minimum seg... |
What is the difference between a float, double and a decimal in C#? | Float , double and a decimal are all Value Types in C#.
Value type variables can be assigned a value directly. They are derived from the class System.ValueType. The value types directly contain data.
Float is a 32-bit single-precision floating point type with range 3.4 x 1038 to + 3.4 x 1038
Memory Size is 4 bytes.
fl... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Float , double and a decimal are all Value Types in C#. "
},
{
"code": null,
"e": 1263,
"s": 1119,
"text": "Value type variables can be assigned a value directly. They are derived from the class System.ValueType. The value types dire... |
How to find if a string is a palindrome using Java? | StringBuffer provides a method with name reverse() one way to check for a palindrome is
Create a StringBuffer object by passing the required string as a parameter to the constructor.Reverse the contents of the object using the reverse() method.Convert the StringBuffer object to Sting using the toString() method.Now, co... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "StringBuffer provides a method with name reverse() one way to check for a palindrome is"
},
{
"code": null,
"e": 1464,
"s": 1150,
"text": "Create a StringBuffer object by passing the required string as a parameter to the constructor.... |
C program for pipe in Linux | Here, we will create a C program for pipe in Linux. In this program, we will read some text from the input stream and then print it to the output screen.
First, let’s learn basics about pipe in Linux
Pipe is used to transfer data, it can be used for communication between process/ command/ program for transferring stand... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "Here, we will create a C program for pipe in Linux. In this program, we will read some text from the input stream and then print it to the output screen."
},
{
"code": null,
"e": 1262,
"s": 1216,
"text": "First, let’s learn basics ab... |
Equity Factor Models - Build one in R with a few lines of codes | by Charles Malafosse | Towards Data Science | Multi-factor models are a must-have for investors looking to understand their portfolio’s performance drivers. It helps explain the actual return of factors such as countries, sectors, and styles, independent of other factors’ effects.
In this article, we will focus on the mechanics of such models, and how to code them... | [
{
"code": null,
"e": 407,
"s": 171,
"text": "Multi-factor models are a must-have for investors looking to understand their portfolio’s performance drivers. It helps explain the actual return of factors such as countries, sectors, and styles, independent of other factors’ effects."
},
{
"code... |
Build an Application to extract news from Google News Feed Using Python - GeeksforGeeks | 04 Dec, 2021
Prerequisite– Python tkinter
In this article, we are going to write a python script to extract news articles from Google News Feed by using gnewsclient module and bind it with a GUI application. gnewsclient is a python client for Google News Feed. This API has to installed explicitly first in order to be u... | [
{
"code": null,
"e": 24316,
"s": 24288,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 24345,
"s": 24316,
"text": "Prerequisite– Python tkinter"
},
{
"code": null,
"e": 24628,
"s": 24345,
"text": "In this article, we are going to write a python script to ext... |
How to delete the Organizational Unit (OU) from the active directory using PowerShell? | To delete the OU from the Active Directory using PowerShell, we need to use the command Remove-ADOrganizationUnit
Remove-ADOrganizationalUnit -Identity "OU=LabUsers,DC=Labdomain,DC=Local"
If the OU is protected from the accidental delete, you will receive an Access is Denied error as shown below.
Remove-ADOrganizationa... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "To delete the OU from the Active Directory using PowerShell, we need to use the command Remove-ADOrganizationUnit"
},
{
"code": null,
"e": 1250,
"s": 1176,
"text": "Remove-ADOrganizationalUnit -Identity \"OU=LabUsers,DC=Labdomain,DC=... |
jQuery.getJSON() Method | The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.
The method returns XMLHttpRequest object.
Here is the simple syntax to use this method −
$.getJSON( url, [data], [callback] )
Here is the description of all the parameters used by this method −
url − A string... | [
{
"code": null,
"e": 2433,
"s": 2322,
"text": "The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request."
},
{
"code": null,
"e": 2475,
"s": 2433,
"text": "The method returns XMLHttpRequest object."
},
{
"code": null,
... |
React Native - Running Android | We can run the React Native app on Android platform by running the following code in the terminal.
react-native run-android
Before you can run your app on Android device, you need to enable USB Debugging inside the Developer Options.
When USB Debugging is enabled, you can plug in your device and run the code snippet g... | [
{
"code": null,
"e": 2443,
"s": 2344,
"text": "We can run the React Native app on Android platform by running the following code in the terminal."
},
{
"code": null,
"e": 2469,
"s": 2443,
"text": "react-native run-android\n"
},
{
"code": null,
"e": 2579,
"s": 2469... |
Convert Adjacency Matrix to Adjacency List representation of Graph - GeeksforGeeks | 26 Nov, 2021
Prerequisite: Graph and its representations Given a adjacency matrix representation of a Graph. The task is to convert the given Adjacency Matrix to Adjacency List representation. Examples:
Input: arr[][] = [ [0, 0, 1], [0, 0, 1], [1, 1, 0] ] Output: The adjacency list is: 0 -> 2 1 -> 2 2 -> 0 -> 1Input:... | [
{
"code": null,
"e": 25524,
"s": 25496,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 25716,
"s": 25524,
"text": "Prerequisite: Graph and its representations Given a adjacency matrix representation of a Graph. The task is to convert the given Adjacency Matrix to Adjacency List... |
LIME vs. SHAP: Which is Better for Explaining Machine Learning Models? | by Dario Radečić | Towards Data Science | Do you want to use machine learning in production? Good luck explaining predictions to non-technical folks. LIME and SHAP can help.
Explainable machine learning is a term any modern-day data scientist should know. Today you’ll see how the two most popular options compare — LIME and SHAP.
If acronyms LIME and SHAP sound... | [
{
"code": null,
"e": 304,
"s": 172,
"text": "Do you want to use machine learning in production? Good luck explaining predictions to non-technical folks. LIME and SHAP can help."
},
{
"code": null,
"e": 461,
"s": 304,
"text": "Explainable machine learning is a term any modern-day ... |
Java program to find the factorial of a given number using recursion | Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function.
Following is an example to find the factorial of a given number using a recursive function.
import java.ut... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function."
},
{
"code": null,
"e": 13... |
Kth smallest element | Practice | GeeksforGeeks | Given an array arr[] and an integer K where K is smaller than size of array, the task is to find the Kth smallest element in the given array. It is given that all array elements are distinct.
Example 1:
Input:
N = 6
arr[] = 7 10 4 3 20 15
K = 3
Output : 7
Explanation :
3rd smallest element in the given
array is 7.
Ex... | [
{
"code": null,
"e": 430,
"s": 238,
"text": "Given an array arr[] and an integer K where K is smaller than size of array, the task is to find the Kth smallest element in the given array. It is given that all array elements are distinct."
},
{
"code": null,
"e": 441,
"s": 430,
"te... |
Returning distinct rows in SQLAlchemy with SQLite | 22 Nov, 2021
In this article, we are going to see how to return distinct rows in SQLAlchemy with SQLite in Python.
SQLAlchemy is available via pip install package.
pip install sqlalchemy
However, if you are using flask you can make use of its own implementation of SQLAlchemy. It can be installed using –
pip install fla... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "In this article, we are going to see how to return distinct rows in SQLAlchemy with SQLite in Python."
},
{
"code": null,
"e": 179,
"s": 130,
"text": "SQLA... |
An Overview for Text Representations in NLP | by jiawei hu | Towards Data Science | Writing is always a good choice when it comes to clarifying one’s understandings of a given topic. By putting thoughts on papers, ideas will be clarified and confusions exposed. Though it might not be the most comfortable thing to do it’s indeed an efficient way to learn and improve.
If you ever find yourself having a ... | [
{
"code": null,
"e": 456,
"s": 171,
"text": "Writing is always a good choice when it comes to clarifying one’s understandings of a given topic. By putting thoughts on papers, ideas will be clarified and confusions exposed. Though it might not be the most comfortable thing to do it’s indeed an effici... |
Can a method return multiple values in Java? | You can return only one value in Java. If needed you can return multiple values using array or an object.
In the example given below the calculate() method accepts two integer variables performs the addition subtraction, multiplication and, division operations on them stores the results in an array and returns the arra... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "You can return only one value in Java. If needed you can return multiple values using array or an object."
},
{
"code": null,
"e": 1385,
"s": 1168,
"text": "In the example given below the calculate() method accepts two integer variab... |
Java - The HashSet Class | HashSet extends AbstractSet and implements the Set interface. It creates a collection that uses a hash table for storage.
A hash table stores information by using a mechanism called hashing. In hashing, the informational content of a key is used to determine a unique value, called its hash code.
The hash code is then u... | [
{
"code": null,
"e": 2499,
"s": 2377,
"text": "HashSet extends AbstractSet and implements the Set interface. It creates a collection that uses a hash table for storage."
},
{
"code": null,
"e": 2674,
"s": 2499,
"text": "A hash table stores information by using a mechanism called ... |
Program to find area of a triangle - GeeksforGeeks | 20 Jan, 2022
Finding area using given sides:
Examples :
Input : a = 5, b = 7, c = 8
Output : Area of a triangle is 17.320508
Input : a = 3, b = 4, c = 5
Output : Area of a triangle is 6.000000
Area of a triangle can simply be evaluated using following formula.
Area = sqrt(s*(s-a)*(s-b)*(s-c))
where a, b and c are l... | [
{
"code": null,
"e": 26238,
"s": 26210,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 26270,
"s": 26238,
"text": "Finding area using given sides:"
},
{
"code": null,
"e": 26282,
"s": 26270,
"text": "Examples : "
},
{
"code": null,
"e": 26421,
... |
Set the height and width of an image using percent with CSS | To set the height and width of an image using %, you can try to run the following code −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
img {
height: 50%;
width: 50%;
}
</style>
</head>
<body>
<p>Sized image in %</p>
<img src = "https://www.tut... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To set the height and width of an image using %, you can try to run the following code −"
},
{
"code": null,
"e": 1161,
"s": 1151,
"text": "Live Demo"
},
{
"code": null,
"e": 1529,
"s": 1161,
"text": "<!DOCTYPE ht... |
Go Comments | A comment is a text that is ignored upon execution.
Comments can be used to explain the code, and to make it more readable.
Comments can also be used to prevent code execution when testing an alternative code.
Go supports single-line or multi-line comments.
Single-line comments start with two forward slashes (//).
Any ... | [
{
"code": null,
"e": 52,
"s": 0,
"text": "A comment is a text that is ignored upon execution."
},
{
"code": null,
"e": 124,
"s": 52,
"text": "Comments can be used to explain the code, and to make it more readable."
},
{
"code": null,
"e": 210,
"s": 124,
"text"... |
How to create a chat message with CSS? | To create a chat message with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0 auto;
max-width: 800px;
padding: 0 20px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-se... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To create a chat message with CSS, the code is as follows −"
},
{
"code": null,
"e": 1133,
"s": 1122,
"text": " Live Demo"
},
{
"code": null,
"e": 3130,
"s": 1133,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<meta n... |
PyQt5 – How to set minimum size of window | setMinimumSize method | 26 Mar, 2020
We know that we can resize the window of PyQt5 application, but while shrinking the window size we can set minimum size so that it can’t be shrank any more. In this article, we will see how to do this.
In order to do this we will use setMinimumSize() method.
Syntax : self.setMinimumSize(width, height)
Argu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "We know that we can resize the window of PyQt5 application, but while shrinking the window size we can set minimum size so that it can’t be shrank any more. In this article, w... |
Lookup and Reference - LOOKUP Function | Use LOOKUP function when you need to look in a single row or column and find a value from the same position in a second row or column. Use the LOOKUP Function to search one row or one column.
Use VLOOKUP Function to search one row or column, or to search multiple rows and columns (like a table). It is a much improved v... | [
{
"code": null,
"e": 2180,
"s": 1988,
"text": "Use LOOKUP function when you need to look in a single row or column and find a value from the same position in a second row or column. Use the LOOKUP Function to search one row or one column."
},
{
"code": null,
"e": 2326,
"s": 2180,
... |
Count the number of unique characters in a given String | 17 Jan, 2022
Given a string, str consisting of lowercase English alphabets, the task is to find the number of unique characters present in the string.
Examples:
Input: str = “geeksforgeeks”Output: 7Explanation: The given string “geeksforgeeks” contains 7 unique characters {‘g’, ‘e’, ‘k’, ‘s’, ‘f’, ‘o’, ‘r’}.
Input: str... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 191,
"s": 53,
"text": "Given a string, str consisting of lowercase English alphabets, the task is to find the number of unique characters present in the string."
},
{
"code": null,
"e":... |
Python | Pandas MultiIndex.from_tuples() | 24 Dec, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas MultiIndex.from_tuples() function is used to convert list of tuples to MultiIndex. It ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Python | Extending and customizing django-allauth | 24 Aug, 2021
Prerequisite: Django-allauth setup and Configuration
Let’s deal with customizing django-allauth signup forms, intervening in registration flow to add custom processes and validations.
Extending Signup Form or adding custom fields in django-allauth:
One of the most common queries about allauth is about ad... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 105,
"s": 52,
"text": "Prerequisite: Django-allauth setup and Configuration"
},
{
"code": null,
"e": 237,
"s": 105,
"text": "Let’s deal with customizing django-allauth signup fo... |
Number of wins for each player in a series of Rock-Paper-Scissor game | 02 Aug, 2021
Two players are playing a series of games of Rock–paper–scissors. There are a total of K games played. Player 1 has a sequence of moves denoted by string A and similarly player 2 has string B. If any player reaches the end of their string, they move back to the start of the string. The task is to count the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 442,
"s": 53,
"text": "Two players are playing a series of games of Rock–paper–scissors. There are a total of K games played. Player 1 has a sequence of moves denoted by string A and similarly play... |
Program to print Spiral Pattern | 22 Apr, 2021
Given a number n as the size of the matrix, the task is to print a spiral pattern in 2D array of size n.
Examples:
Input: n = 5
Output: 1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
Preview of the Spiral Pattern:
Approa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 157,
"s": 52,
"text": "Given a number n as the size of the matrix, the task is to print a spiral pattern in 2D array of size n."
},
{
"code": null,
"e": 168,
"s": 157,
"text": "... |
What are glyphicons in Bootstrap ? | 26 Sep, 2021
Bootstrap provides set of graphic icons, symbols and fonts called Glyphicons. Some Glyphicons like Home icon, User icon, Lock icon, etc. Generally, Glyphicons are icon fonts which you can use in your web projects. Bootstrap includes 260 glyphicons. These glyphicons used for web project from Bootstrap Gly... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 509,
"s": 52,
"text": "Bootstrap provides set of graphic icons, symbols and fonts called Glyphicons. Some Glyphicons like Home icon, User icon, Lock icon, etc. Generally, Glyphicons are icon fonts ... |
JavaScript | Uint32Array from() Method | 06 Oct, 2021
The Uint32Array array represents an array of 32-bit unsigned integers in the platform byte order. By default, the contents of Uint32Array are initialized to 0. from() function of Uint32Array used to creates a new Uint32Array from an array-like or iterable object. So when you want to convert an arrayLike or... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 517,
"s": 28,
"text": "The Uint32Array array represents an array of 32-bit unsigned integers in the platform byte order. By default, the contents of Uint32Array are initialized to 0. from() function... |
Java string length without using length() method. | To calculate the length of the string convert the string to a character array and count the number of elements in the array.
Live Demo
public class StringLength {
public static void main(String args[]) throws Exception {
String str = "sampleString";
int i = 0;
for(char c: str.toCharArray()) {
... | [
{
"code": null,
"e": 1312,
"s": 1187,
"text": "To calculate the length of the string convert the string to a character array and count the number of elements in the array."
},
{
"code": null,
"e": 1322,
"s": 1312,
"text": "Live Demo"
},
{
"code": null,
"e": 1592,
... |
Python | Get unique tuples from list | 27 Aug, 2019
Sometimes, while working with Python list, we can come across a problem in which we require to find the unique occurrences of list. Having elementary data types is easy to handle, but sometime, we might have complex data types and the problem becomes new in that cases. Let’s discuss certain ways in which t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Aug, 2019"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "Sometimes, while working with Python list, we can come across a problem in which we require to find the unique occurrences of list. Having elementary data types is easy to han... |
Lex program to check whether a given number is even or odd | 30 Apr, 2019
Given a number n, the task is to check whether the given n is even or odd using Lex program.
Examples:
Input : 10
Output : Even
Input : 5
Output : Odd
Prerequisite: FLEX (Fast Lexical Analyzer Generator)
An even number is an integer which is “evenly divisible” by 2. This means that if the integer is div... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 121,
"s": 28,
"text": "Given a number n, the task is to check whether the given n is even or odd using Lex program."
},
{
"code": null,
"e": 131,
"s": 121,
"text": "Examples:"
... |
Difference between block elements and inline elements | 26 Jul, 2021
The inline and block elements of HTML are one of the important areas where web developers often get confused because they were unable to know which are inline and block elements which may cause clumsiness in a webpage in case he assumes some element to be a block but it is an inline element which causes ne... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 389,
"s": 53,
"text": "The inline and block elements of HTML are one of the important areas where web developers often get confused because they were unable to know which are inline and block eleme... |
PHP mysqli_fetch_assoc() Function | A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries.
The mysqli_fetch_assoc() function accepts a result object as a parameter and, retrieves the contents of current row in the given result object, and returns them as an associative array.... | [
{
"code": null,
"e": 2892,
"s": 2757,
"text": "A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries."
},
{
"code": null,
"e": 3078,
"s": 2892,
"text": "The mysqli_fetch_assoc() function accepts a res... |
Decryption of Simple Substitution Cipher | In this chapter, you can learn about simple implementation of substitution cipher which displays the encrypted and decrypted message as per the logic used in simple substitution cipher technique. This can be considered as an alternative approach of coding.
You can use the following code to perform decryption using simp... | [
{
"code": null,
"e": 2549,
"s": 2292,
"text": "In this chapter, you can learn about simple implementation of substitution cipher which displays the encrypted and decrypted message as per the logic used in simple substitution cipher technique. This can be considered as an alternative approach of codi... |
Minimum Word Break - GeeksforGeeks | 09 Jul, 2021
Given a string s, break s such that every substring of the partition can be found in the dictionary. Return the minimum break needed. Examples:
Given a dictionary ["Cat", "Mat", "Ca",
"tM", "at", "C", "Dog", "og", "Do"]
Input : Pattern "CatMat"
Output : 1
Explanation: we can break the sentences
... | [
{
"code": null,
"e": 24956,
"s": 24928,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 25102,
"s": 24956,
"text": "Given a string s, break s such that every substring of the partition can be found in the dictionary. Return the minimum break needed. Examples: "
},
{
"co... |
Print Longest Palindromic Subsequence - GeeksforGeeks | 31 May, 2021
Given a sequence, print a longest palindromic subsequence of it. Examples :
Input : BBABCBCAB
Output : BABCBAB
The above output is the longest
palindromic subsequence of given
sequence. "BBBBB" and "BBCBB" are
also palindromic subsequences of
the given sequence, but not the
longest ones.
Input : GEEKS... | [
{
"code": null,
"e": 24862,
"s": 24834,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24940,
"s": 24862,
"text": "Given a sequence, print a longest palindromic subsequence of it. Examples : "
},
{
"code": null,
"e": 25245,
"s": 24940,
"text": "Input : BBAB... |
Python Virtual Environments & Jupyter Notebook | by Anne Bode | Towards Data Science | conda create -n myenv python=3.8conda activate myenvconda install jupyterconda install -n base nb_conda_kernelsjupyter notebook
Note, I am running Python 3.8 (installed with Anaconda) on Windows
I recently decided to clean up my Python installation because mine had become a mess. I uninstalled/reinstalled Python with A... | [
{
"code": null,
"e": 299,
"s": 171,
"text": "conda create -n myenv python=3.8conda activate myenvconda install jupyterconda install -n base nb_conda_kernelsjupyter notebook"
},
{
"code": null,
"e": 366,
"s": 299,
"text": "Note, I am running Python 3.8 (installed with Anaconda) on... |
A Beginners Guide To Streamlit - GeeksforGeeks | 16 Dec, 2021
The trend of Data Science and Analytics is increasing day by day. From the data science pipeline, one of the most important steps is model deployment. We have a lot of options in python for deploying our model. Some popular frameworks are Flask and Django. But the issue with using these frameworks is that ... | [
{
"code": null,
"e": 24369,
"s": 24341,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 25014,
"s": 24369,
"text": "The trend of Data Science and Analytics is increasing day by day. From the data science pipeline, one of the most important steps is model deployment. We have a lo... |
How to Play YouTube Video in Android Using YouTube API? - GeeksforGeeks | 30 Apr, 2021
YouTube Android Player API lets you play any YouTube video or playlist inside your app that too without leaving your app. A sample video is given below to get an idea about what we are going to do in this article. Note that we are going to implement this project using both Java and Kotlin language.
Step 1:... | [
{
"code": null,
"e": 25522,
"s": 25494,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25822,
"s": 25522,
"text": "YouTube Android Player API lets you play any YouTube video or playlist inside your app that too without leaving your app. A sample video is given below to get an i... |
Dancing Keys Effect using HTML and CSS - GeeksforGeeks | 01 Sep, 2021
The dancing keys effect is a type of text-animation effect that can be implemented using CSS. In this effect, each letter is given the form of a keyboard key and then animations are applied to move it along either X-axis or Y-axis. This effect is also known as the Jumping Key effect or Piano Key effect. It... | [
{
"code": null,
"e": 24644,
"s": 24616,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 25041,
"s": 24644,
"text": "The dancing keys effect is a type of text-animation effect that can be implemented using CSS. In this effect, each letter is given the form of a keyboard key and t... |
Why use static_cast<int>(x) instead of (int)x in C++? | The (int)x is C style typecasting where static_cast<int>(x) is used in C++. This static_cast<>() gives compile time checking facility, but the C style casting does not support that. This static_cast<>() can be spotted anywhere inside a C++ code. And using this C++ cast the intensions are conveyed much better.
In C like... | [
{
"code": null,
"e": 1373,
"s": 1062,
"text": "The (int)x is C style typecasting where static_cast<int>(x) is used in C++. This static_cast<>() gives compile time checking facility, but the C style casting does not support that. This static_cast<>() can be spotted anywhere inside a C++ code. And usi... |
Count pairs with Bitwise-AND as even number - GeeksforGeeks | 22 Apr, 2021
Given an array of integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is even.
Examples:
Input: N = 4, A[] = { 5, 1, 3, 2 }
Output: 3
Since pair of A[] are:
( 5, 1 ), ( 5, 3 ), ( 5, 2 ), ( 1, 3 ), ( 1, 2 ), ( 3, 2 )
5 AND 1 = 1, 5 AND 3 = 1, 5 AND 2 = 0,
1 AND 3 = 1, 1 AND 2 = 0... | [
{
"code": null,
"e": 25142,
"s": 25114,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 25248,
"s": 25142,
"text": "Given an array of integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is even."
},
{
"code": null,
"e": 25259,
"s": 2524... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.