title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Carousel using Materialize CSS - GeeksforGeeks | 09 Oct, 2021
Materialize CSS is a UI component library that is created and designed by Google. It is a design language that combines the classic principles of successful design along with innovation and technology.
Features:
Responsive front-end CSS framework.
It is browser-independent.
Extensible.
It is free to use.
I... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n09 Oct, 2021"
},
{
"code": null,
"e": 25187,
"s": 24985,
"text": "Materialize CSS is a UI component library that is created and designed by Google. It is a design language that combines the classic principles of successful design... |
Resolve Unknown database in JDBC error with Java-MySQL?
| This type of error occurs if you select any database that does not exist in MySQL. Let us first display the error of unknown database in JDBC.
The Java code is as follows. Here, we have set the database as ‘onlinebookstore’, which does not exist:
import java.sql.Connection;
import java.sql.DriverManager;
public class U... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "This type of error occurs if you select any database that does not exist in MySQL. Let us first display the error of unknown database in JDBC."
},
{
"code": null,
"e": 1309,
"s": 1205,
"text": "The Java code is as follows. Here, we h... |
How to Create Simple News Summarization from Scratch using Python | by Fahmi Nurfikri | Towards Data Science | If you are new to the world of machine learning, specifically Natural Language Processing (NLP) and you hear about Automatic News Summarization and you are interested in it. You must be wondering, like “How to make a good model?”, “What should I learn?” and “Where should I start?”.
Then you start searching for what met... | [
{
"code": null,
"e": 455,
"s": 172,
"text": "If you are new to the world of machine learning, specifically Natural Language Processing (NLP) and you hear about Automatic News Summarization and you are interested in it. You must be wondering, like “How to make a good model?”, “What should I learn?” a... |
How to populate XDocument from String in C#? | XML is a self-describing language and it gives the data as well as the rules to identify what information it contains. Like HTML, XML is a subset of SGML - Standard
Generalized Markup Language.
The XDocument class contains the information necessary for a valid XML document.
This includes an XML declaration, processing ... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "XML is a self-describing language and it gives the data as well as the rules to identify what information it contains. Like HTML, XML is a subset of SGML - Standard\nGeneralized Markup Language."
},
{
"code": null,
"e": 1410,
"s": 1256,
... |
time.Month.String() Function in Golang With Examples - GeeksforGeeks | 21 Apr, 2020
In Go language, time packages supplies functionality for determining as well as viewing time. The Month.String() function in Go language is used to find the English name of the month. Moreover, this function is defined under the time package. Here, you need to import the “time” package in order to use thes... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 26023,
"s": 25703,
"text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Month.String() function in Go language is used to find the Englis... |
List listIterator() Method in Java with Examples - GeeksforGeeks | 02 Jan, 2019
This method returns a list iterator over the elements in the mentioned list (in proper sequence), starting at the specified position in the list.
Syntax:
ListIterator listIterator(int index)
Parameters: This method has only argument, i.e, index – index of the first element to be returned from the list iter... | [
{
"code": null,
"e": 25373,
"s": 25345,
"text": "\n02 Jan, 2019"
},
{
"code": null,
"e": 25519,
"s": 25373,
"text": "This method returns a list iterator over the elements in the mentioned list (in proper sequence), starting at the specified position in the list."
},
{
"co... |
p5.js | orbitControl() Function - GeeksforGeeks | 13 Jan, 2022
The orbitControl() function in p5.js is used to enable the movement around a 3D sketch using a mouse or trackpad. The left mouse button can be used to rotate the camera position about the center of the scene. The right mouse button can be used to pan the camera without any rotation. The mouse scroll wheel ... | [
{
"code": null,
"e": 44937,
"s": 44909,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 45579,
"s": 44937,
"text": "The orbitControl() function in p5.js is used to enable the movement around a 3D sketch using a mouse or trackpad. The left mouse button can be used to rotate the c... |
HTML | DOM toggleAttribute() Method - GeeksforGeeks | 29 May, 2020
The toggleAttribute() method of the element interface toggles a Boolean attribute on the given element. Attributes of an element can be changed using this method.
Syntax:
Element.toggleAttribute("attribute_name");
Parameters:
Name_of_attribute: Name of the attribute to be toggled. The attribute name is a... | [
{
"code": null,
"e": 25717,
"s": 25689,
"text": "\n29 May, 2020"
},
{
"code": null,
"e": 25880,
"s": 25717,
"text": "The toggleAttribute() method of the element interface toggles a Boolean attribute on the given element. Attributes of an element can be changed using this method."... |
Month of() method in Java - GeeksforGeeks | 22 Mar, 2019
The of() method is a built-in method of the Month ENUM which is used to generate a Month instance from an integer value. The integer value should be in the range 1-12 representing any of the 12 months and the method generates a Month instance from it representing a month-of-year.
Syntax:
public static Mont... | [
{
"code": null,
"e": 25696,
"s": 25668,
"text": "\n22 Mar, 2019"
},
{
"code": null,
"e": 25977,
"s": 25696,
"text": "The of() method is a built-in method of the Month ENUM which is used to generate a Month instance from an integer value. The integer value should be in the range 1... |
ASP Full Form - GeeksforGeeks | 20 Oct, 2021
ASP stands for active server pages and it is a server-side script engine for building web pages. ASP is basically a server page that contains embedded programs in it. The programs in it are processed on the Microsoft server. The ASP server-side engine basically performs the task of reading and executing th... | [
{
"code": null,
"e": 25067,
"s": 25039,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 25869,
"s": 25067,
"text": "ASP stands for active server pages and it is a server-side script engine for building web pages. ASP is basically a server page that contains embedded programs in ... |
Expressing a fraction as a natural number under modulo 'm' - GeeksforGeeks | 13 Sep, 2021
Given two integers A and B where A is not divisible by B, the task is to express A / B as a natural number modulo m where m = 1000000007. Note: This representation is useful where we need to express Probability of an event, Area of Curves and polygons etc.Examples:
Input: A = 2, B = 6 Output: 333333336In... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 26211,
"s": 25943,
"text": "Given two integers A and B where A is not divisible by B, the task is to express A / B as a natural number modulo m where m = 1000000007. Note: This representation... |
Python | Custom List slicing Sum - GeeksforGeeks | 18 Feb, 2020
The problem of slicing a list has been dealt earlier, but sometimes we need to perform the slicing in variable lengths and its summation according to the input given in other list. This problem has its potential application in web development. Let’s discuss certain ways in which this can be done.
Method #1... | [
{
"code": null,
"e": 25915,
"s": 25887,
"text": "\n18 Feb, 2020"
},
{
"code": null,
"e": 26213,
"s": 25915,
"text": "The problem of slicing a list has been dealt earlier, but sometimes we need to perform the slicing in variable lengths and its summation according to the input giv... |
Get number of elements of array in Julia - length() Method - GeeksforGeeks | 26 Mar, 2020
The length() is an inbuilt function in julia which is used to return the number of elements present in the specified array.
Syntax: length(A::AbstractArray)
Parameters:
A: Specified array
Returns: It returns the number of elements present in the specified array.
Example 1:
# Julia program to illustrate # t... | [
{
"code": null,
"e": 25789,
"s": 25761,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25913,
"s": 25789,
"text": "The length() is an inbuilt function in julia which is used to return the number of elements present in the specified array."
},
{
"code": null,
"e": 25... |
PLSQL | RTRIM Function - GeeksforGeeks | 04 Feb, 2021
The PLSQL RTRIM function is used for removing all specified characters from the right-hand side of a string. The PLSQL RTRIM function accepts two parameters which are input_string and trim_string.
If the user does not specify trim_string, it defaults to a single blank.
If char is a character literal, the... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n04 Feb, 2021"
},
{
"code": null,
"e": 25711,
"s": 25513,
"text": "The PLSQL RTRIM function is used for removing all specified characters from the right-hand side of a string. The PLSQL RTRIM function accepts two parameters which ... |
Move all zeroes to end of array - GeeksforGeeks | 14 Dec, 2021
Given an array of random numbers, Push all the zero’s of a given array to the end of the array. For example, if the given arrays is {1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0}, it should be changed to {1, 9, 8, 4, 2, 7, 6, 0, 0, 0, 0}. The order of all other elements should be same. Expected time complexity is O(n) ... | [
{
"code": null,
"e": 26761,
"s": 26733,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 27103,
"s": 26761,
"text": "Given an array of random numbers, Push all the zero’s of a given array to the end of the array. For example, if the given arrays is {1, 9, 8, 4, 0, 0, 2, 7, 0, 6, ... |
Highway Billboard Problem - GeeksforGeeks | 05 Aug, 2021
Consider a highway of M miles. The task is to place billboards on the highway such that revenue is maximized. The possible sites for billboards are given by number x1 < x2 < ..... < xn-1 < xn, specifying positions in miles measured from one end of the road. If we place a billboard at position xi, we receiv... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 26494,
"s": 25943,
"text": "Consider a highway of M miles. The task is to place billboards on the highway such that revenue is maximized. The possible sites for billboards are given by number... |
Count number of ways to reach destination in a Maze - GeeksforGeeks | 26 Oct, 2021
Given a maze with obstacles, count the number of paths to reach the rightmost-bottommost cell from the topmost-leftmost cell. A cell in the given maze has a value of -1 if it is a blockage or dead-end, else 0.From a given cell, we are allowed to move to cells (i+1, j) and (i, j+1) only.
Examples:
Input: m... | [
{
"code": null,
"e": 26245,
"s": 26217,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 26533,
"s": 26245,
"text": "Given a maze with obstacles, count the number of paths to reach the rightmost-bottommost cell from the topmost-leftmost cell. A cell in the given maze has a value ... |
map::size() in C++ STL - GeeksforGeeks | 27 Dec, 2018
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values.
map::size()In C++, size() function is used to return the total number of elements present in the map.
Syntax:
map_name.size()
Return Valu... | [
{
"code": null,
"e": 25368,
"s": 25340,
"text": "\n27 Dec, 2018"
},
{
"code": null,
"e": 25537,
"s": 25368,
"text": "Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key va... |
numpy.lcm() in Python - GeeksforGeeks | 29 Nov, 2018
numpy.lcm(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) : This mathematical function helps user to calculate lcm value of |arr1| and |arr2| elements.
Parameters :arr1 / arr2 : [array_like]Input array.
Return : LCM of two or more numbers.
Code :
# Python program ill... | [
{
"code": null,
"e": 26203,
"s": 26175,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 26395,
"s": 26203,
"text": "numpy.lcm(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) : This mathematical function helps user to calculate lcm value of... |
Extended Knapsack Problem - GeeksforGeeks | 30 Dec, 2021
Given N items, each item having a given weight Ci and a profit value Pi, the task is to maximize the profit by selecting a maximum of K items adding up to a maximum weight W.
Examples:
Input: N = 5, P[] = {2, 7, 1, 5, 3}, C[] = {2, 5, 2, 3, 4}, W = 8, K = 2. Output: 12 Explanation: Here, the maximum possi... | [
{
"code": null,
"e": 24702,
"s": 24674,
"text": "\n30 Dec, 2021"
},
{
"code": null,
"e": 24877,
"s": 24702,
"text": "Given N items, each item having a given weight Ci and a profit value Pi, the task is to maximize the profit by selecting a maximum of K items adding up to a maximu... |
Count number of ways to divide a number in parts in C++ | We are given a positive number N. The goal is to count the number of ways in which the number N can be divided into 3 parts. The parts may or may not be equal. N lies in range [1,5000].
We will do this by using three for loops for 3 parts of the number. Check at the innermost loop that the sum of all three is equal to ... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "We are given a positive number N. The goal is to count the number of ways in which the number N can be divided into 3 parts. The parts may or may not be equal. N lies in range [1,5000]."
},
{
"code": null,
"e": 1428,
"s": 1248,
"text... |
Check if a doubly linked list of characters is palindrome or not in C++ | Here we will see how to check a string is a palindrome or not using a Doubly linked list. Here we will push each character of a string inside one doubly linked list. There will be two pointers, left and right. Then start scanning from both sides. If a left character is the same as right character, then move the left po... | [
{
"code": null,
"e": 1645,
"s": 1062,
"text": "Here we will see how to check a string is a palindrome or not using a Doubly linked list. Here we will push each character of a string inside one doubly linked list. There will be two pointers, left and right. Then start scanning from both sides. If a l... |
Machine Learning in Production. Machine Learning Models beyond Jupyter... | by asjad anis | Towards Data Science | This article focuses on deploying machine learning models using mnist handwritten digit recognition as a base example implemented in tensorflow-2. In the end, we will be cooking up a small web app in React to test our model. If you are a machine learning enthusiast then you already know that mnist digit recognition is ... | [
{
"code": null,
"e": 873,
"s": 172,
"text": "This article focuses on deploying machine learning models using mnist handwritten digit recognition as a base example implemented in tensorflow-2. In the end, we will be cooking up a small web app in React to test our model. If you are a machine learning ... |
jQuery - load() Method | The load( url, data, callback ) method loads data from the server and places the returned HTML into the matched element.
Here is the simple syntax to use this method −
[selector].load( url, [data], [callback] )
Here is the description of all the parameters used by this method −
url − A string containing the URL to whi... | [
{
"code": null,
"e": 2443,
"s": 2322,
"text": "The load( url, data, callback ) method loads data from the server and places the returned HTML into the matched element."
},
{
"code": null,
"e": 2490,
"s": 2443,
"text": "Here is the simple syntax to use this method −"
},
{
... |
Open Specific Settings Using Android Application - GeeksforGeeks | 05 Nov, 2020
In android development, the phase comes where the app needs specific settings to be modified manually by the user. So at that time developer directs the user to open specific settings and modify them. So in this article, it has been discussed how to open specific settings and make the user change them easi... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 25036,
"s": 24725,
"text": "In android development, the phase comes where the app needs specific settings to be modified manually by the user. So at that time developer directs the user to op... |
bitset::flip() in C++ STL - GeeksforGeeks | 06 Jun, 2020
bitset::flip() is a built-in STL in C++ which flips the bits. If no parameter is passed in the function, then it flips all the bit values converting zeros to ones and ones to zeros. If a parameter position is passed, it flips the bit at the position only.
Syntax:
bitset_name.flip(int pos)
Parameter: The f... | [
{
"code": null,
"e": 24098,
"s": 24070,
"text": "\n06 Jun, 2020"
},
{
"code": null,
"e": 24354,
"s": 24098,
"text": "bitset::flip() is a built-in STL in C++ which flips the bits. If no parameter is passed in the function, then it flips all the bit values converting zeros to ones ... |
Neural Machine Translation (NMT) with Attention Mechanism | by Harshil Patel | Towards Data Science | It is an undeniable truth that in this era of globalization, language translation plays a vital role in communication among the denizens of different nation’s. Moreover, in a country like India - which a multilingual nation, language difference could be observed in its states itself! Hence, considering the importance o... | [
{
"code": null,
"e": 625,
"s": 171,
"text": "It is an undeniable truth that in this era of globalization, language translation plays a vital role in communication among the denizens of different nation’s. Moreover, in a country like India - which a multilingual nation, language difference could be o... |
Struts 2 - The Set Tag | The property tag is used to get the property of a value, which will default to the top of the stack if none is specified. This example shows you the usage of three simple data tags - namely set, push and property.
For this exercise, let us reuse examples given in "Data Type Conversion" chapter but with little modificat... | [
{
"code": null,
"e": 2460,
"s": 2246,
"text": "The property tag is used to get the property of a value, which will default to the top of the stack if none is specified. This example shows you the usage of three simple data tags - namely set, push and property."
},
{
"code": null,
"e": 26... |
Remove K Digits | Practice | GeeksforGeeks | Given a non-negative integer S represented as a string, remove K digits from the number so that the new number is the smallest possible.
Note : The given num does not contain any leading zero.
Example 1:
Input:
S = "149811", K = 3
Output: 111
Explanation: Remove the three digits
4, 9, and 8 to form the new number 111
... | [
{
"code": null,
"e": 431,
"s": 238,
"text": "Given a non-negative integer S represented as a string, remove K digits from the number so that the new number is the smallest possible.\nNote : The given num does not contain any leading zero."
},
{
"code": null,
"e": 442,
"s": 431,
"... |
Bootstrap page-header class | Page header is used to add appropriate spacing around the headings on a page.
To use a page header, wrap your heading in a <div> with a class of .page-header −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "Page header is used to add appropriate spacing around the headings on a page."
},
{
"code": null,
"e": 1222,
"s": 1140,
"text": "To use a page header, wrap your heading in a <div> with a class of .page-header −"
},
{
"code": ... |
DecisionTreeRegressor — Stop Using For Future Projections! | by Kaushik Choudhury | Towards Data Science | Scikit-learn is one of the most famous machine learning library in Python. It offers several classification, regression and clustering algorithms and its key strength, in my opinion, is seamless integration with Numpy, Pandas and Scipy.
Scikit-learn is so well written by the developers, that with a couple of lines of c... | [
{
"code": null,
"e": 408,
"s": 171,
"text": "Scikit-learn is one of the most famous machine learning library in Python. It offers several classification, regression and clustering algorithms and its key strength, in my opinion, is seamless integration with Numpy, Pandas and Scipy."
},
{
"cod... |
Miscellaneous Problems of Time Complexity - GeeksforGeeks | 16 Feb, 2022
Prerequisite : Asymptotic Notations
Time Complexity :Time complexity is the time needed by an algorithm expressed as a function of the size of a problem. It can also be defined as the amount of computer time it needs to run a program to completion. When we solve a problem of time complexity then this defin... | [
{
"code": null,
"e": 24655,
"s": 24627,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 24691,
"s": 24655,
"text": "Prerequisite : Asymptotic Notations"
},
{
"code": null,
"e": 25092,
"s": 24691,
"text": "Time Complexity :Time complexity is the time needed by... |
How to embed Lua codes in Java? | Lua is probably the most commonly used embedding language that can be integrated or embedded into different major programming languages. There are different projects that does this work of embedding for us, Lua has been embedded into C, C# and Java also.
In this article, we will explore how the embedding of Lua in Java... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "Lua is probably the most commonly used embedding language that can be integrated or embedded into different major programming languages. There are different projects that does this work of embedding for us, Lua has been embedded into C, C# and Java also... |
How does the repetition operator work on a tuple in Python? | We are accustomed to using the * symbol to represent multiplication, but when the operand on the left side of the * is a tuple, it becomes the repetition operator. The repetition operator makes multiple copies of a tuple and joins them all together. Tuples can be created using the repetition operator, *.
numbers = (0,... | [
{
"code": null,
"e": 1369,
"s": 1062,
"text": "We are accustomed to using the * symbol to represent multiplication, but when the operand on the left side of the * is a tuple, it becomes the repetition operator. The repetition operator makes multiple copies of a tuple and joins them all together. Tup... |
What is ROW_NUMBER() in MySQL? | Row_NUMBER() included from MySQL version 8.0. It is a type of window function. This can be
used to assign a sequence number for rows. To understand, create a table with the help of CREATE pcommand −
mysql> CREATE table rowNumberDemo
-> (
-> FirstName varchar(100)
-> );
Query OK, 0 rows affected (0.92 sec)
mysql> INSERT... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "Row_NUMBER() included from MySQL version 8.0. It is a type of window function. This can be\nused to assign a sequence number for rows. To understand, create a table with the help of CREATE pcommand −"
},
{
"code": null,
"e": 1369,
"s": 1... |
Is there a difference between copy initialization and direct initialization in C++? | The Copy initialization can be done using the concept of copy constructor. As we know that the constructors are used to initialize the objects. We can create our copy constructor to make a copy of some other object, or in other words, initialize current object with the value of another object. On the other hand, the di... | [
{
"code": null,
"e": 1442,
"s": 1062,
"text": "The Copy initialization can be done using the concept of copy constructor. As we know that the constructors are used to initialize the objects. We can create our copy constructor to make a copy of some other object, or in other words, initialize current... |
Write a program to calculate pow(x,n) in C++ | In this problem, we are given two integers x and n. Our task is to write a program to calculate the pow(x,n).
Let’s take an example to understand the problem,
x = 5 , n = 3
125
Program to calculate the pow(x,n),
Live Demo
#include <iostream>
using namespace std;
float myPow(float x, int y) {
if(y == 0)
return... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "In this problem, we are given two integers x and n. Our task is to write a program to calculate the pow(x,n)."
},
{
"code": null,
"e": 1221,
"s": 1172,
"text": "Let’s take an example to understand the problem,"
},
{
"code": n... |
Count the number of digits of palindrome numbers in an array - GeeksforGeeks | 10 May, 2021
Given an array arr[] with N integers. The task is to count all the digits of all palindrome numbers present in the array.Examples:
Input: arr[] = {121, 56, 434} Output: 6 Only 121 and 434 are palindromes and digitCount(121) + digitCount(434) = 3 + 3 = 6Input: arr[] = {56, 455, 546, 234} Output: 0
App... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 24929,
"s": 24796,
"text": "Given an array arr[] with N integers. The task is to count all the digits of all palindrome numbers present in the array.Examples: "
},
{
"code": null,
... |
Creating start Menu in Pygame - GeeksforGeeks | 05 Sep, 2020
Pygame is a Python library that can be used specifically to design and build games. Pygame supports only 2d games that are built using different shapes or sprites. Pygame doesn’t have an in-built layout design or any in-built UI system this means there is no easy way to make UI or levels for a game. The on... | [
{
"code": null,
"e": 24031,
"s": 24003,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 24412,
"s": 24031,
"text": "Pygame is a Python library that can be used specifically to design and build games. Pygame supports only 2d games that are built using different shapes or sprites.... |
Build and Analyze Knowledge Graphs with Diffbot | by Khuyen Tran | Towards Data Science | What do you often do when you want to learn more about a person? You might decide to read about a person using websites such as Wikipedia.
However, the text can be lengthy, and it might take you a while to get the pieces of information that you need.
Since we are better at absorbing information in form of images than t... | [
{
"code": null,
"e": 311,
"s": 172,
"text": "What do you often do when you want to learn more about a person? You might decide to read about a person using websites such as Wikipedia."
},
{
"code": null,
"e": 423,
"s": 311,
"text": "However, the text can be lengthy, and it might ... |
How to add a PHP page to WordPress? - GeeksforGeeks | 05 Aug, 2020
WordPress is one of the best blogging platforms. This is the scenario, we have a custom PHP page which we want to integrate with the WordPress blog. Our PHP file which we are getting to integrate might not use any of the WordPress APIs. Integrating PHP files with WordPress is very important for the back-en... | [
{
"code": null,
"e": 24972,
"s": 24944,
"text": "\n05 Aug, 2020"
},
{
"code": null,
"e": 25308,
"s": 24972,
"text": "WordPress is one of the best blogging platforms. This is the scenario, we have a custom PHP page which we want to integrate with the WordPress blog. Our PHP file w... |
Date getTimezoneOffset() Method | Javascript date getTimezoneOffset() method returns the time-zone offset in minutes for the current locale. The time-zone offset is the minutes in difference, the Greenwich Mean Time (GMT) is relative to your local time.
For example, if your time zone is GMT+10, -600 will be returned. Daylight savings time prevents this... | [
{
"code": null,
"e": 2686,
"s": 2466,
"text": "Javascript date getTimezoneOffset() method returns the time-zone offset in minutes for the current locale. The time-zone offset is the minutes in difference, the Greenwich Mean Time (GMT) is relative to your local time."
},
{
"code": null,
"... |
Mathematics | Probability - GeeksforGeeks | 26 Mar, 2022
Probability refers to the extent of occurrence of events. When an event occurs like throwing a ball, picking a card from deck, etc., then the must be some probability associated with that event. In terms of mathematics, probability refers to the ratio of wanted outcomes to the total number of possible outc... | [
{
"code": null,
"e": 29952,
"s": 29924,
"text": "\n26 Mar, 2022"
},
{
"code": null,
"e": 30330,
"s": 29952,
"text": "Probability refers to the extent of occurrence of events. When an event occurs like throwing a ball, picking a card from deck, etc., then the must be some probabil... |
DAX Filter - RELATEDTABLE function | Evaluates a table expression in a context modified by the given filters.
RELATEDTABLE (<tableName>)
tableName
The name of an existing table.
It cannot be an expression.
A table of values.
DAX RELATEDTETABLE function changes the context in which the data is filtered, and evaluates the expression in the new context tha... | [
{
"code": null,
"e": 2074,
"s": 2001,
"text": "Evaluates a table expression in a context modified by the given filters."
},
{
"code": null,
"e": 2103,
"s": 2074,
"text": "RELATEDTABLE (<tableName>) \n"
},
{
"code": null,
"e": 2113,
"s": 2103,
"text": "tableNam... |
C# - Enums | An enumeration is a set of named integer constants. An enumerated type is declared using the enum keyword.
C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.
The general syntax for declaring an enumeration is −
enum <enum_name> {
en... | [
{
"code": null,
"e": 2377,
"s": 2270,
"text": "An enumeration is a set of named integer constants. An enumerated type is declared using the enum keyword."
},
{
"code": null,
"e": 2513,
"s": 2377,
"text": "C# enumerations are value data type. In other words, enumeration contains i... |
Web Scraping with Selenium. This is the third part of a 4 part... | by Karthikeyan P | Towards Data Science | Selenium is a portable framework for testing web applications. It is open-source software released under the Apache License 2.0 that runs on Windows, Linux and macOS. Despite serving its major purpose, Selenium is also used as a web scraping tool. Without delving into the components of Selenium, we shall focus on a sin... | [
{
"code": null,
"e": 687,
"s": 171,
"text": "Selenium is a portable framework for testing web applications. It is open-source software released under the Apache License 2.0 that runs on Windows, Linux and macOS. Despite serving its major purpose, Selenium is also used as a web scraping tool. Without... |
Python Shallow and Deep Copy operations | In Python there is a module called copy. Using this module, we can perform deep copy and shallow copy. In python the assignment statements do not copy the objects. They create a binding between the target and the main object.
To use this module, we should import it using −
import copy
This method is used to create a s... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "In Python there is a module called copy. Using this module, we can perform deep copy and shallow copy. In python the assignment statements do not copy the objects. They create a binding between the target and the main object."
},
{
"code": null,... |
MariaDB - Drop Database | Creation or deletion of databases in MariaDB requires privileges, typically, only given to root users or admins. Under these accounts, you have two options for deleting a database: the mysqladmin binary and a PHP script.
Note that deleted databases are irrecoverable, so exercise care in performing this operation. Furth... | [
{
"code": null,
"e": 2583,
"s": 2362,
"text": "Creation or deletion of databases in MariaDB requires privileges, typically, only given to root users or admins. Under these accounts, you have two options for deleting a database: the mysqladmin binary and a PHP script."
},
{
"code": null,
... |
How to Create a Checkmark / Tick with CSS | We can create a customized checkmark using CSS. The following examples illustrate this effect −
Live Demo
<!DOCTYPE html>
<html>
<style>
div {
margin: 2%;
position: relative;
width: 40px;
height: 40px;
box-shadow: inset 0 0 12px lightblue;
}
div::before {
content: "";
position: absolute;
width:... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "We can create a customized checkmark using CSS. The following examples illustrate this effect −"
},
{
"code": null,
"e": 1169,
"s": 1158,
"text": " Live Demo"
},
{
"code": null,
"e": 1875,
"s": 1169,
"text": "<!DO... |
io.LimitReader() Function in Golang with Examples - GeeksforGeeks | 03 May, 2020
In Go language, io packages supply fundamental interfaces to the I/O primitives. And its principal job is to enclose the ongoing implementations of such king of primitives. The LimitReader() function in Go language is used to return a “Reader” that reads from the stated “r” but it pauses if the EOF i.e, en... | [
{
"code": null,
"e": 24069,
"s": 24041,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 24575,
"s": 24069,
"text": "In Go language, io packages supply fundamental interfaces to the I/O primitives. And its principal job is to enclose the ongoing implementations of such king of pr... |
Chord diagrams of protein interaction networks in Python | by Ford Combs | Towards Data Science | Humans are great at interpreting graphic displays of data. We can identify patterns in visual displays quickly and easily as compared to tabular displays. There are many reasons for this, e.g., about 30% of the cortex contains neurons dedicated to visual processing. This is why data visualization is extremely important... | [
{
"code": null,
"e": 781,
"s": 172,
"text": "Humans are great at interpreting graphic displays of data. We can identify patterns in visual displays quickly and easily as compared to tabular displays. There are many reasons for this, e.g., about 30% of the cortex contains neurons dedicated to visual ... |
Display dates after NOW() + 10 days from a MySQL table? | You can use DATE_ADD() function with where clause for this. Let us first create a table −
mysql> create table DemoTable
(
ShippingDate date
);
Query OK, 0 rows affected (0.54 sec)
Note : The current date and time is as follows, we found using NOW() −
mysql> select now();
+-----------------------+
| now() ... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "You can use DATE_ADD() function with where clause for this. Let us first create a table −"
},
{
"code": null,
"e": 1251,
"s": 1152,
"text": "mysql> create table DemoTable\n (\n ShippingDate date\n );\nQuery OK, 0 rows affected ... |
Build A Text Recommendation System with Python | by Betty LD | Towards Data Science | Natural Language Processing is one of the most exciting fields of Machine Learning. It enables our computer to understand very dense corpus, analyze them, and provide us the information we are looking for.
In this article, we’ll create a recommendation system that acts like a vertical search engine [3]. It enables to s... | [
{
"code": null,
"e": 378,
"s": 172,
"text": "Natural Language Processing is one of the most exciting fields of Machine Learning. It enables our computer to understand very dense corpus, analyze them, and provide us the information we are looking for."
},
{
"code": null,
"e": 685,
"s"... |
How to display the name of the Current Thread in C#? | Use the Name property to display the name of the current thread in C#.
Firstly, use the currentThread property to display information about a thread −
Thread thread = Thread.CurrentThread;
Now use the thread.Name property to display name of the thread −
thread.Name
Let us see the complete code show current thread’s nam... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "Use the Name property to display the name of the current thread in C#."
},
{
"code": null,
"e": 1213,
"s": 1133,
"text": "Firstly, use the currentThread property to display information about a thread −"
},
{
"code": null,
... |
JasmineJS - Null Check | Jasmine provides a different variety of method to check whether the actual output is Null, defined or undefined. In this chapter, we will learn how to implement different Jasmine methods to check the above-mentioned scenarios.
This matcher is used to check whether any variable in the code is predefined or not. Let us m... | [
{
"code": null,
"e": 2277,
"s": 2050,
"text": "Jasmine provides a different variety of method to check whether the actual output is Null, defined or undefined. In this chapter, we will learn how to implement different Jasmine methods to check the above-mentioned scenarios."
},
{
"code": null... |
How to extract a particular value based on index from an R data frame column? | Sometimes we want to figure out which value lies at some position in an R data frame column, this helps us to understand the data collection or data simulation process. For example, if we have a data frame df that contain columns x, y, and z each with 5000 values then we can use df$x[[253]] to find which values lies at... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "Sometimes we want to figure out which value lies at some position in an R data frame column, this helps us to understand the data collection or data simulation process. For example, if we have a data frame df that contain columns x, y, and z each with 5... |
Arithmetic Operators in C | The following table shows all the arithmetic operators supported by the C language. Assume variable A holds 10 and variable B holds 20, then −
Try the following example to understand all the arithmetic operators available in C −
#include <stdio.h>
main() {
int a = 21;
int b = 10;
int c ;
c = a + b;
pr... | [
{
"code": null,
"e": 2227,
"s": 2084,
"text": "The following table shows all the arithmetic operators supported by the C language. Assume variable A holds 10 and variable B holds 20, then −"
},
{
"code": null,
"e": 2313,
"s": 2227,
"text": "Try the following example to understand... |
How to insert mm/dd/yyyy format dates in MySQL? | For this, use STR_TO_DATE(). Following is the syntax −
insert into yourTableName values(STR_TO_DATE(yourDateValue,yourFormatSpecifier));
Let us first create a table −
mysql> create table DemoTable
(
ShippingDate date
);
Query OK, 0 rows affected (0.81 sec)
Insert some records in the table using insert command ... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "For this, use STR_TO_DATE(). Following is the syntax −"
},
{
"code": null,
"e": 1199,
"s": 1117,
"text": "insert into yourTableName values(STR_TO_DATE(yourDateValue,yourFormatSpecifier));"
},
{
"code": null,
"e": 1229,
... |
Creating a TensorFlow CNN in C++ (Part 2) | by Benny Friedman | Towards Data Science | In the last two years, Google’s TensorFlow has been gaining popularity. It is by far the most popular deep learning framework and together with Keras it is the most dominant framework.
Now with version 2, TensorFlow includes Keras built it.
However, when it comes to the C++ API, you can’t really find much information a... | [
{
"code": null,
"e": 357,
"s": 172,
"text": "In the last two years, Google’s TensorFlow has been gaining popularity. It is by far the most popular deep learning framework and together with Keras it is the most dominant framework."
},
{
"code": null,
"e": 413,
"s": 357,
"text": "N... |
How to emit an event when a checkbox is clicked using Socket.IO? - GeeksforGeeks | 15 Dec, 2021
Problem Statement: Task is to perform an action by emitting an event from the backend whenever a particular checkbox is clicked in the frontend. This needs to be done using Socket.IO and Node.js
Prerequisite:
Node.js : It is an open-source JavaScript Back-End technology.Express.js : It is a node.js server ... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 24726,
"s": 24531,
"text": "Problem Statement: Task is to perform an action by emitting an event from the backend whenever a particular checkbox is clicked in the frontend. This needs to be d... |
MySQL query to display a substring before a special character in a string | Use the LOCATE() and SUBSTRING() method for this in MySQL. Let us first create a table −
mysql> create table DemoTable
-> (
-> Title text
-> );
Query OK, 0 rows affected (0.54 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Introduction To Java');
Query OK, 1 r... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "Use the LOCATE() and SUBSTRING() method for this in MySQL. Let us first create a table −"
},
{
"code": null,
"e": 1252,
"s": 1151,
"text": "mysql> create table DemoTable\n -> (\n -> Title text\n -> );\nQuery OK, 0 rows affected... |
Solving a Reinforcement Learning Problem Using Cross-Entropy Method | by Jordi TORRES.AI | Towards Data Science | After a parenthesis of three posts introducing basics in Deep Learning and Pytorch, in this post we put the focus back to merge Reinforcement Learning and Deep Learning.
In a previous posts we advanced that an Agent make decisions to solve complex decision-making problems under uncertainty. For this purpouse the Agent ... | [
{
"code": null,
"e": 341,
"s": 171,
"text": "After a parenthesis of three posts introducing basics in Deep Learning and Pytorch, in this post we put the focus back to merge Reinforcement Learning and Deep Learning."
},
{
"code": null,
"e": 702,
"s": 341,
"text": "In a previous po... |
ggplot2 - Marginal Plots | In this chapter, we shall discuss about Marginal Plots.
Marginal plots are used to assess relationship between two variables and examine their distributions. When we speak about creating marginal plots, they are nothing but scatter plots that has histograms, box plots or dot plots in the margins of respective x and y a... | [
{
"code": null,
"e": 2078,
"s": 2022,
"text": "In this chapter, we shall discuss about Marginal Plots."
},
{
"code": null,
"e": 2347,
"s": 2078,
"text": "Marginal plots are used to assess relationship between two variables and examine their distributions. When we speak about crea... |
C# program to check the validity of a Password | For validity of a password, you need to recall the concept when your create a password to signup to a website.
While creating a password, you may have seen the validation requirements on a website like a password should be strong and have −
Min 8 char and max 14 char
Min 8 char and max 14 char
One upper case
One upper ... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "For validity of a password, you need to recall the concept when your create a password to signup to a website."
},
{
"code": null,
"e": 1303,
"s": 1173,
"text": "While creating a password, you may have seen the validation requirement... |
DateField - Django Forms - GeeksforGeeks | 13 Feb, 2020
DateField in Django Forms is a date field, for taking input of dates from user. The default widget for this input is DateInput. It Normalizes to: A Python datetime.date object. It validates that the given value is either a datetime.date, datetime.datetime or string formatted in a particular date format.
Da... | [
{
"code": null,
"e": 24194,
"s": 24166,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 24499,
"s": 24194,
"text": "DateField in Django Forms is a date field, for taking input of dates from user. The default widget for this input is DateInput. It Normalizes to: A Python datetime... |
K-means clustering using Spotify song features | by Alejandra Vlerick | Towards Data Science | The spotify API allows us to create a simple server-side application that accesses user related data from the Spotify app. It also gives you access to information that is not available on the app, such as artist popularity, song metrics, album cover images, etc. It allows you to create, delete and modify existing playl... | [
{
"code": null,
"e": 518,
"s": 172,
"text": "The spotify API allows us to create a simple server-side application that accesses user related data from the Spotify app. It also gives you access to information that is not available on the app, such as artist popularity, song metrics, album cover image... |
How to Teach Your Panda SQL in 10 Minutes | by Andrew Cole | Towards Data Science | Managing your data in a comprehensible and organized fashion is an absolute essential skill for any data scientist or analyst. Pandas DataFrames allow for clean views and operations on very large datasets, while it also is perhaps one of the most widely used Python packages. SQL is perhaps an even more widely applicabl... | [
{
"code": null,
"e": 609,
"s": 171,
"text": "Managing your data in a comprehensible and organized fashion is an absolute essential skill for any data scientist or analyst. Pandas DataFrames allow for clean views and operations on very large datasets, while it also is perhaps one of the most widely u... |
Descendant Selectors in CSS | The CSS element selector is used to select the descendant of first element with element name matching the second selector.
The syntax for CSS descendant selector is as follows −
element element {
/*declarations*/
}
The following examples illustrate CSS descendant selector −
Live Demo
<!DOCTYPE html>
<html>
<head>
<... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "The CSS element selector is used to select the descendant of first element with element name matching the second selector."
},
{
"code": null,
"e": 1240,
"s": 1185,
"text": "The syntax for CSS descendant selector is as follows −"
}... |
A One-Bit Sliding Window Protocol | Sliding window protocols are data link layer protocols for reliable and sequential delivery of data frames. The sliding window is also used in Transmission Control Protocol. In these protocols, the sender has a buffer called the sending window and the receiver has buffer called the receiving window.
In one – bit slidin... | [
{
"code": null,
"e": 1363,
"s": 1062,
"text": "Sliding window protocols are data link layer protocols for reliable and sequential delivery of data frames. The sliding window is also used in Transmission Control Protocol. In these protocols, the sender has a buffer called the sending window and the r... |
Feature detection and matching with OpenCV-Python - GeeksforGeeks | 28 Nov, 2021
In this article, we are going to see about feature detection in computer vision with OpenCV in Python. Feature detection is the process of checking the important features of the image in this case features of the image can be edges, corners, ridges, and blobs in the images.
In OpenCV, there are a number of... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 25830,
"s": 25555,
"text": "In this article, we are going to see about feature detection in computer vision with OpenCV in Python. Feature detection is the process of checking the important f... |
GATE | GATE-CS-2009 | Question 60 - GeeksforGeeks | 28 Jun, 2021
Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if exe... | [
{
"code": null,
"e": 24538,
"s": 24510,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24866,
"s": 24538,
"text": "Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any giv... |
C# | Remove the element with the specified key from the Hashtable - GeeksforGeeks | 01 Feb, 2019
The Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. The key is used to access the items in the collection. Hashtable.Remove(Object) Method is used to remove the element with the specified key from the Hashtable.
Syntax:
public virtual voi... | [
{
"code": null,
"e": 24644,
"s": 24616,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24925,
"s": 24644,
"text": "The Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. The key is used to access the items in the... |
Bootstrap Progress Bar and Jumbotron - GeeksforGeeks | 12 Jan, 2022
BootStrap articles :
Introduction and InstallationGrid SystemButtons, Glyphicons, TablesVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive Tabs
Introduction and Installation
Grid System
Buttons, Glyphicons, Tables
Vertical Forms, Horizontal Forms, Inline Forms
DropDowns and Responsive T... | [
{
"code": null,
"e": 28384,
"s": 28356,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 28405,
"s": 28384,
"text": "BootStrap articles :"
},
{
"code": null,
"e": 28548,
"s": 28405,
"text": "Introduction and InstallationGrid SystemButtons, Glyphicons, TablesVe... |
How to log a Python exception? - GeeksforGeeks | 29 Sep, 2021
To log an exception in Python we can use logging module and through that we can log the error.
Logging module provides a set of functions for simple logging and for following purposes
DEBUG
INFO
WARNING
ERROR
CRITICAL
Logging an exception in python with an error can be done in the logging.exception() metho... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 25742,
"s": 25647,
"text": "To log an exception in Python we can use logging module and through that we can log the error."
},
{
"code": null,
"e": 25831,
"s": 25742,
"tex... |
Check if array can be sorted with one swap - GeeksforGeeks | 03 Jun, 2021
Given an array containing N elements. Find if it is possible to sort it in non-decreasing order using atmost one swap.Examples:
Input : arr[] = {1, 2, 3, 4} Output : YES The array is already sortedInput : arr[] = {3, 2, 1} Output : YES Swap 3 and 1 to get [1, 2, 3]Input : arr[] = {4, 1, 2, 3} Output :NO
... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 26305,
"s": 26175,
"text": "Given an array containing N elements. Find if it is possible to sort it in non-decreasing order using atmost one swap.Examples: "
},
{
"code": null,
"... |
Print an N x M matrix such that each row and column has all the vowels in it | 30 May, 2022
Given two integers N and M, the task is to print an N x M matrix such that each row and column contain all the vowels in it. If it is impossible to do so, then print -1. Examples:
Input: N = 5, M = 5 Output: a e i o u e i o u a i o u a e o u a e i u a e i oInput: N = 6, M = 2 Output: -1
Approach: Sin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "Given two integers N and M, the task is to print an N x M matrix such that each row and column contain all the vowels in it. If it is impossible to do so, then print -1. Examp... |
double_click method – Action Chains in Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button actions, keypress, and context menu interactions. This is useful for doing more complex actions like hover over and drag and drop. Acti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 616,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button act... |
Implementation of Artificial Neural Network for XNOR Logic Gate with 2-bit Binary Input | 06 Jan, 2022
Artificial Neural Network (ANN) is a computational model based on the biological neural networks of animal brains. ANN is modeled with three types of layers: an input layer, hidden layers (one or more), and an output layer. Each layer comprises nodes (like biological neurons) are called Artificial Neurons.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 728,
"s": 54,
"text": "Artificial Neural Network (ANN) is a computational model based on the biological neural networks of animal brains. ANN is modeled with three types of layers: an input layer, ... |
Understanding for loops in Java | 18 Oct, 2018
Suppose it is required to print numbers from 1 to 5. One possible way to do this is with the help of below code:
class GFG { public static void main(String args[]) { int a; a = 1; System.out.println(a); a=2; System.out.println(a); a=3; System.out.pri... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n18 Oct, 2018"
},
{
"code": null,
"e": 166,
"s": 53,
"text": "Suppose it is required to print numbers from 1 to 5. One possible way to do this is with the help of below code:"
},
{
"code": "class GFG { public static void main... |
Given a linked list, reverse alternate nodes and append at the end | 23 Jun, 2022
Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1)
Examples:
Input: 1->2->3->4->5->6
Output: 1->3->5->6->4->2
Explanation: Two lists are 1->3->5 and 2->4->6,
reverse the 2nd list: 6->4->2.
Merge the lists
Input: 12->14->16->18->20
Output: ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 168,
"s": 54,
"text": "Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1) "
},
{
"code": null,
"e": 179,
"s": 168,
... |
Python | Indices of numbers greater than K | 02 Apr, 2019
Many times we might have problem in which we need to find indices rather than the actual numbers and more often, the result is conditioned. First approach coming to mind can be a simple index function and get indices greater than particular number, but this approach fails in case of duplicate numbers. Let’... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Apr, 2019"
},
{
"code": null,
"e": 408,
"s": 28,
"text": "Many times we might have problem in which we need to find indices rather than the actual numbers and more often, the result is conditioned. First approach coming to mind can b... |
Sum of the series 5+55+555+.. up to n terms | 15 Jun, 2022
Find the sum up to n terms of the sequence: 5 + 55 + 555 + ... up to n. Examples :
Input : 2
Output: 60
Input : 3
Output: 595
Approach:The above problem can be solved using the following formula:
Sum = 5 + 55 + 555 + .... n terms. = 5/9[9 + 99 + 999 + .... n terms] = 5/9[(10 – 1) + (100 – 1) + (1000 ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 138,
"s": 53,
"text": "Find the sum up to n terms of the sequence: 5 + 55 + 555 + ... up to n. Examples : "
},
{
"code": null,
"e": 182,
"s": 138,
"text": "Input : 2\nOutput: 6... |
jQuery | Create a div element | 28 Mar, 2019
Creating a <div> element using jQuery can be done in following steps:
Steps:
Create a new <div> element.
Choose a parent element, where to put this newly created element.
Put the created div element into parent element.
Example 1: This example creates a <div> element and uses append() method to append the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2019"
},
{
"code": null,
"e": 98,
"s": 28,
"text": "Creating a <div> element using jQuery can be done in following steps:"
},
{
"code": null,
"e": 105,
"s": 98,
"text": "Steps:"
},
{
"code": null,
... |
Queries on count of points lie inside a circle | 22 Jun, 2022
Given n coordinate (x, y) of points on 2D plane and Q queries. Each query contains an integer r, the task is to count the number of points lying inside or on the circumference of the circle having radius r and centered at the origin.Examples :
Input : n = 5
Coordinates:
1 1
2 2
3 3
-1 -1
4 4
Query 1: 3... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 300,
"s": 54,
"text": "Given n coordinate (x, y) of points on 2D plane and Q queries. Each query contains an integer r, the task is to count the number of points lying inside or on the circumferenc... |
Spring Boot | How to consume JSON messages using Apache Kafka | 24 Jan, 2022
Apache Kafka is a stream processing system which lets you send messages between processes, applications, and servers. In this article, we will see how to publish JSON messages on the console of a Spring boot application using Apache Kafka.
In order to learn how to create a Spring boot project, refer to thi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 268,
"s": 28,
"text": "Apache Kafka is a stream processing system which lets you send messages between processes, applications, and servers. In this article, we will see how to publish JSON messages... |
JSON Formatting in Python | 06 Jun, 2018
Javascript Object Notation abbreviated as JSON is a light-weight data interchange format. It Encode Python objects as JSON strings, and decode JSON strings into Python objects .
Many of the APIs like Github. send their results in this format. JSON is probably most widely used for communicating between the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2018"
},
{
"code": null,
"e": 230,
"s": 52,
"text": "Javascript Object Notation abbreviated as JSON is a light-weight data interchange format. It Encode Python objects as JSON strings, and decode JSON strings into Python object... |
Materialize - Colors | Materialize supports a rich set of color classes. These color classes are inspired and developed considering the colors used in marketing, road signs, and sticky notes.
red
pink
purple
deep-purple
indigo
blue
light-blue
cyan
teal
green
light-green
lime
yellow
amber
orange
deep-orange
brown
grey
blue-grey
black
white
tr... | [
{
"code": null,
"e": 2356,
"s": 2187,
"text": "Materialize supports a rich set of color classes. These color classes are inspired and developed considering the colors used in marketing, road signs, and sticky notes."
},
{
"code": null,
"e": 2360,
"s": 2356,
"text": "red"
},
{... |
PostgreSQL - Functions | PostgreSQL functions, also known as Stored Procedures, allow you to carry out operations that would normally take several queries and round trips in a single function within the database. Functions allow database reuse as other applications can interact directly with your stored procedures instead of a middle-tier or d... | [
{
"code": null,
"e": 3162,
"s": 2825,
"text": "PostgreSQL functions, also known as Stored Procedures, allow you to carry out operations that would normally take several queries and round trips in a single function within the database. Functions allow database reuse as other applications can interact... |
Find three prime numbers with given sum - GeeksforGeeks | 05 Jan, 2021
Given an integer N, the task is to find three prime numbers X, Y, and Z such that the sum of these three numbers is equal to N i.e. X + Y + Z = N.
Examples:
Input: N = 20 Output: 2 5 13
Input: N = 34 Output: 2 3 29
Approach:
Generate prime numbers using Sieve of Eratosthenes
Start from the first prime... | [
{
"code": null,
"e": 25094,
"s": 25066,
"text": "\n05 Jan, 2021"
},
{
"code": null,
"e": 25241,
"s": 25094,
"text": "Given an integer N, the task is to find three prime numbers X, Y, and Z such that the sum of these three numbers is equal to N i.e. X + Y + Z = N."
},
{
"c... |
Ruby on Rails - Scaffolding | While you're developing Rails applications, especially those which are mainly providing you with a simple interface to data in a database, it can often be useful to use the scaffold method.
Scaffolding provides more than cheap demo thrills. Here are some benefits −
You can quickly get code in front of your users for fe... | [
{
"code": null,
"e": 2293,
"s": 2103,
"text": "While you're developing Rails applications, especially those which are mainly providing you with a simple interface to data in a database, it can often be useful to use the scaffold method."
},
{
"code": null,
"e": 2369,
"s": 2293,
"... |
Angular Google Charts - Combination Chart | Combination chart helps in rendering each series as a different marker type from the following list: line, area, bars, candlesticks, and stepped area. To assign a default marker type for series, use the seriesType property. Series property is to be used to specify properties of each series individually. Following is an... | [
{
"code": null,
"e": 2164,
"s": 1796,
"text": "Combination chart helps in rendering each series as a different marker type from the following list: line, area, bars, candlesticks, and stepped area. To assign a default marker type for series, use the seriesType property. Series property is to be used... |
How to create a plot of empirical distribution in R? | The empirical distribution can be found by using the function ecdf and if we want to create a plot of empirical distribution then plot function will be used.
For example, if we have a vector called X then plot of empirical distribution can be created by using the below command −
plot(ecdf(X))
To create a plot of empiri... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "The empirical distribution can be found by using the function ecdf and if we want to create a plot of empirical distribution then plot function will be used."
},
{
"code": null,
"e": 1342,
"s": 1220,
"text": "For example, if we have ... |
Maximum consecutive repeating character in string - GeeksforGeeks | 10 May, 2021
Given a string, the task is to find the maximum consecutive repeating character in a string.Note: We do not need to consider the overall count, but the count of repeating that appears in one place.Examples:
Input : str = "geeekk"
Output : e
Input : str = "aaaabbcbbb"
Output : a
The simple solution to ... | [
{
"code": null,
"e": 24797,
"s": 24769,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 25006,
"s": 24797,
"text": "Given a string, the task is to find the maximum consecutive repeating character in a string.Note: We do not need to consider the overall count, but the count of re... |
Mockito - Varying Calls | Mockito provides the following additional methods to vary the expected call counts.
atLeast (int min) − expects min calls.
atLeast (int min) − expects min calls.
atLeastOnce () − expects at least one call.
atLeastOnce () − expects at least one call.
atMost (int max) − expects max calls.
atMost (int max) − expects max... | [
{
"code": null,
"e": 2064,
"s": 1980,
"text": "Mockito provides the following additional methods to vary the expected call counts."
},
{
"code": null,
"e": 2104,
"s": 2064,
"text": "atLeast (int min) − expects min calls."
},
{
"code": null,
"e": 2144,
"s": 2104,
... |
Difference between x++ and x=x+1 in Java - GeeksforGeeks | 23 Nov, 2017
In x++, it increase the value of x by 1 and in x=x+1 it also increase the value of x by 1. But the question is that both are same or there is any difference between them. We should aware with the fact that whenever we are trying to apply any arithmetic operator between two variables a and b, the result typ... | [
{
"code": null,
"e": 24414,
"s": 24386,
"text": "\n23 Nov, 2017"
},
{
"code": null,
"e": 24819,
"s": 24414,
"text": "In x++, it increase the value of x by 1 and in x=x+1 it also increase the value of x by 1. But the question is that both are same or there is any difference betwee... |
Draw a line in C++ graphics - GeeksforGeeks | 25 Jan, 2018
graphics.h library is used to include and facilitate graphical operations in program. graphics.h functions can be used to draw different shapes, display text in different fonts, change colors and many more. Using functions of graphics.h you can make graphics programs, animations, projects and games. You ca... | [
{
"code": null,
"e": 24556,
"s": 24528,
"text": "\n25 Jan, 2018"
},
{
"code": null,
"e": 25012,
"s": 24556,
"text": "graphics.h library is used to include and facilitate graphical operations in program. graphics.h functions can be used to draw different shapes, display text in di... |
How to show numpy 2D array as grayscale image in Jupyter Notebook? | To show a 2D array as a grayscale image in Jupyter Notebook, 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.
Create a random data using numpy.
Create a random data using numpy.
Display... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To show a 2D array as a grayscale image in Jupyter Notebook, we can take the following steps"
},
{
"code": null,
"e": 1231,
"s": 1155,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
... |
How Attractive Are You in the Eyes of Deep Neural Network? | by Dima Shulga | Towards Data Science | A couple of months ago, South China University published a paper and a dataset about “Facial Beauty Prediction”. You can find it here. The data set includes 5500 people that have a score of 1 through 5 of how attractive they are. Here are some examples from the paper:
There are also several famous people in the set. Th... | [
{
"code": null,
"e": 316,
"s": 47,
"text": "A couple of months ago, South China University published a paper and a dataset about “Facial Beauty Prediction”. You can find it here. The data set includes 5500 people that have a score of 1 through 5 of how attractive they are. Here are some examples fro... |
3D Streamtube Plots using Plotly in Python - GeeksforGeeks | 05 Sep, 2020
Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
In pl... | [
{
"code": null,
"e": 24242,
"s": 24214,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 24544,
"s": 24242,
"text": "Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, sp... |
How to get the values of an object in JavaScript? | There are some methods such as Object.values() to get the values of an object. But through those methods, the process to find out the values is lengthy. To alleviate this, Underscore.js a library of javascript has provided a method called _.values(). This method requires no for loop to execute the values. It is a direc... | [
{
"code": null,
"e": 1428,
"s": 1062,
"text": "There are some methods such as Object.values() to get the values of an object. But through those methods, the process to find out the values is lengthy. To alleviate this, Underscore.js a library of javascript has provided a method called _.values(). Th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.