title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
HTML - <frameset> Tag | The HTML <frameset> tag is used to divide the window into frames. This tag is not supported in HTML5.
<!DOCTYPE html>
<html>
<head>
<title>HTML frameset Tag</title>
</head>
<frameset cols = "200, *">
<frame src = "/html/menu.htm" name = "menu_page" />
<frame src = "/html/main.htm" name =... | [
{
"code": null,
"e": 2476,
"s": 2374,
"text": "The HTML <frameset> tag is used to divide the window into frames. This tag is not supported in HTML5."
},
{
"code": null,
"e": 2873,
"s": 2476,
"text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML frameset Tag</title>\n ... |
How to Create and Deploy a Machine Learning App to Heroku | by Chanin Nantasenamat | Towards Data Science | Deployment of a machine learning model is an important phase in the data life cycle. Such a model could be a minimum viable product (MVP) that would allow relevant stakeholders access to the model from which to test and experiment with, which could lead to valuable feedback for further model improvement.
Model deployme... | [
{
"code": null,
"e": 477,
"s": 171,
"text": "Deployment of a machine learning model is an important phase in the data life cycle. Such a model could be a minimum viable product (MVP) that would allow relevant stakeholders access to the model from which to test and experiment with, which could lead t... |
How to pass values between Fragments in Android? | This example demonstrates how do I pass values between fragments in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<RelativeLayout
xmlns:android="http://schemas.... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrates how do I pass values between fragments in android."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
C++ Program to Check if it is a Sparse Matrix | A sparse matrix is a matrix in which majority of the elements are 0. In other words, if more than half of the elements in the matrix are 0, it is known as a sparse matrix. For example −
The matrix given below contains 5 zeroes. Since the number of zeroes is more than half the elements of the matrix, it is a sparse matr... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "A sparse matrix is a matrix in which majority of the elements are 0. In other words, if more than half of the elements in the matrix are 0, it is known as a sparse matrix. For example −"
},
{
"code": null,
"e": 1386,
"s": 1248,
"text... |
7 Tips To Maximize PyTorch Performance | by William Falcon | Towards Data Science | Throughout the last 10 months, while working on PyTorch Lightning, the team and I have been exposed to many styles of structuring PyTorch code and we have identified a few key places where we see people inadvertently introducing bottlenecks.
We’ve taken great care to make sure that PyTorch Lightning does not make any o... | [
{
"code": null,
"e": 414,
"s": 172,
"text": "Throughout the last 10 months, while working on PyTorch Lightning, the team and I have been exposed to many styles of structuring PyTorch code and we have identified a few key places where we see people inadvertently introducing bottlenecks."
},
{
... |
SWING - SpringLayout Class | The class SpringLayout positions the children of its associated container according to a set of constraints.
Following is the declaration for javax.swing.SpringLayout class −
public class SpringLayout
extends Object
implements LayoutManager2
Following are the fields for javax.swing.SpringLayout class −
static... | [
{
"code": null,
"e": 1872,
"s": 1763,
"text": "The class SpringLayout positions the children of its associated container according to a set of constraints."
},
{
"code": null,
"e": 1938,
"s": 1872,
"text": "Following is the declaration for javax.swing.SpringLayout class −"
},
... |
How to search Python dictionary for matching key? | If you have the exact key you want to find, then you can simply use the [] operator or get the function to get the value associated with this key. For example,
a = {
'foo': 45,
'bar': 22
}
print(a['foo'])
print(a.get('foo'))
This will give the output:
45
45
If you have a substring that you want to search in the d... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "If you have the exact key you want to find, then you can simply use the [] operator or get the function to get the value associated with this key. For example,"
},
{
"code": null,
"e": 1293,
"s": 1222,
"text": "a = {\n 'foo': 45,\n... |
Text and File processing using sed Linux Commands | Sed is a stream editor. A stream editor is used to participate in normal textual content transformations on an enter a file. At the same time in some approaches much like an editor which allows scripted edits (comparable to ed). sed works by means of making only one cross over on the input(s) and is more efficient. Now... | [
{
"code": null,
"e": 1465,
"s": 1062,
"text": "Sed is a stream editor. A stream editor is used to participate in normal textual content transformations on an enter a file. At the same time in some approaches much like an editor which allows scripted edits (comparable to ed). sed works by means of ma... |
Object Slicing in C++ | Object slicing is used to describe the situation when you assign an object of a derived class to an instance of a base class. This causes a loss of methods and member variables for the derived class object. This is termed as information being sliced away. For example,
class Foo {
int a;
};
class Bar : public Foo {
... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "Object slicing is used to describe the situation when you assign an object of a derived class to an instance of a base class. This causes a loss of methods and member variables for the derived class object. This is termed as information being sliced awa... |
HTML - Colors | Colors are very important to give a good look and feel to your website. You can specify colors on page level using <body> tag or you can set colors for individual tags using bgcolor attribute.
The <body> tag has following attributes which can be used to set different colors −
bgcolor − sets a color for the background o... | [
{
"code": null,
"e": 2567,
"s": 2374,
"text": "Colors are very important to give a good look and feel to your website. You can specify colors on page level using <body> tag or you can set colors for individual tags using bgcolor attribute."
},
{
"code": null,
"e": 2651,
"s": 2567,
... |
What is operator binding in Python? | For expressions like −
a == b
first the python interpreter looks up the __eq__() method on the object a. If it finds that, then executes that with b as argument, ie, a.__eq__(b). If this method returns a NotImplemented, then it tries doind just the reverse, ie, it tries to call,
b.__eq__(a) | [
{
"code": null,
"e": 1085,
"s": 1062,
"text": "For expressions like −"
},
{
"code": null,
"e": 1093,
"s": 1085,
"text": "a == b\n"
},
{
"code": null,
"e": 1343,
"s": 1093,
"text": "first the python interpreter looks up the __eq__() method on the object a. If i... |
Handling Child Windows with Cypress | Sometimes on clicking a link or button, it opens to another window often known as
the child window. Cypress has a unique way of handling child windows unlike other
automation tools like Selenium and Protractor. It basically keeps no information on
the child window by shifting its focus from the parent to the child wind... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "Sometimes on clicking a link or button, it opens to another window often known as\nthe child window. Cypress has a unique way of handling child windows unlike other\nautomation tools like Selenium and Protractor. It basically keeps no information on\nth... |
Microsoft Dynamics CRM - Quick Guide | Customer Relationship Management (CRM) is a system for managing a company’s interactions with current and future customers. It often involves using technology to organize, automate, and synchronize sales, marketing, customer service, and technical support. CRM can help reduce costs and increase profitability by organiz... | [
{
"code": null,
"e": 2447,
"s": 2041,
"text": "Customer Relationship Management (CRM) is a system for managing a company’s interactions with current and future customers. It often involves using technology to organize, automate, and synchronize sales, marketing, customer service, and technical suppo... |
Run Python 3 on Sublime Text (Mac) | by Wafiq Syed | Towards Data Science | Sublime Text is one of the most widely used lightweight text editors when it comes to programming. If you’re a Python programmer, you may not be running your preferred version of Python. This tutorial explains how to get Sublime Text running Python 3.7.
If you prefer a video tutorial, here’s my accompanying YouTube vid... | [
{
"code": null,
"e": 425,
"s": 171,
"text": "Sublime Text is one of the most widely used lightweight text editors when it comes to programming. If you’re a Python programmer, you may not be running your preferred version of Python. This tutorial explains how to get Sublime Text running Python 3.7."
... |
How to Read a Text File in Android? - GeeksforGeeks | 11 Aug, 2021
A text file is a type of file that can store a sequence of characters or text. These characters can be anything that is human-readable. Such kind of files does not have any formatting for the text like Bold, Italics, Underline, Font, Font Size, etc. A Text file in Android can be used for accessing or readi... | [
{
"code": null,
"e": 26491,
"s": 26463,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 27054,
"s": 26491,
"text": "A text file is a type of file that can store a sequence of characters or text. These characters can be anything that is human-readable. Such kind of files does not... |
Dart Programming - Runes | Strings are a sequence of characters. Dart represents strings as a sequence of Unicode UTF-16 code units. Unicode is a format that defines a unique numeric value for each letter, digit, and symbol.
Since a Dart string is a sequence of UTF-16 code units, 32-bit Unicode values within a string are represented using a spe... | [
{
"code": null,
"e": 2724,
"s": 2525,
"text": "Strings are a sequence of characters. Dart represents strings as a sequence of Unicode UTF-16 code units. Unicode is a format that defines a unique numeric value for each letter, digit, and symbol."
},
{
"code": null,
"e": 2914,
"s": 27... |
WebGL - Cube Rotation | In this chapter, we will take an example to demonstrate how to draw a rotating 3D cube using WebGL.
The following program shows how to draw a rotating 3D cube −
<!doctype html>
<html>
<body>
<canvas width = "570" height = "570" id = "my_Canvas"></canvas>
<script>
/*============= Creating a canv... | [
{
"code": null,
"e": 2281,
"s": 2181,
"text": "In this chapter, we will take an example to demonstrate how to draw a rotating 3D cube using WebGL."
},
{
"code": null,
"e": 2342,
"s": 2281,
"text": "The following program shows how to draw a rotating 3D cube −"
},
{
"code":... |
C library function - calloc() | The C library function void *calloc(size_t nitems, size_t size) allocates the requested memory and returns a pointer to it. The difference in malloc and calloc is that malloc does not set the memory to zero where as calloc sets allocated memory to zero.
Following is the declaration for calloc() function.
void *calloc(s... | [
{
"code": null,
"e": 2261,
"s": 2007,
"text": "The C library function void *calloc(size_t nitems, size_t size) allocates the requested memory and returns a pointer to it. The difference in malloc and calloc is that malloc does not set the memory to zero where as calloc sets allocated memory to zero.... |
C++ Program for Products of ranges in an array - GeeksforGeeks | 20 Jan, 2022
Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime).
Examples:
Input : A[] = {1, 2, 3, 4, 5, 6}
L = 2, R = 5, P = 229
Output : 120
Input : A[] = {1, 2, 3, 4, 5, 6},
L = 2, R = 5, P = 113
Output : 7
Brute ForceFor each of ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 26156,
"s": 26041,
"text": "Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime). "
},
{
"code": null,
"e": 26168,
... |
How to apply manually created x-axis labels in a histogram created by hist function in R? | When we generate a histogram in R using hist function, the x-axis labels are automatically generated but we might want to change them to values defined by researchers or by any other authority. Therefore, firstly we need to create the histogram by ignoring the labels and then axis function can be used for new values.
C... | [
{
"code": null,
"e": 1381,
"s": 1062,
"text": "When we generate a histogram in R using hist function, the x-axis labels are automatically generated but we might want to change them to values defined by researchers or by any other authority. Therefore, firstly we need to create the histogram by ignor... |
Java Program For Finding Intersection Point Of Two Linked Lists | 11 Dec, 2021
There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked to the second list, forming an inverted Y-shaped list. Write a program to get the point where two linked lists merge.
Above diagram shows an example with two linked lists having 15 ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2021"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked to the second list, forming an inverted Y-shaped l... |
How to use unordered_map efficiently in C++ | 22 May, 2021
Pre-requisite: unordered_set, unordered_map
C++ provides std::unordered_set and std::unordered_map to be used as a hash set and hash map respectively. They perform insertion/deletion/access in constant average time.
However, the worst-case complexity is O(n2).The reason is that the unordered_map store’s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 May, 2021"
},
{
"code": null,
"e": 98,
"s": 52,
"text": "Pre-requisite: unordered_set, unordered_map "
},
{
"code": null,
"e": 271,
"s": 98,
"text": "C++ provides std::unordered_set and std::unordered_map to be ... |
Split the array and add the first part to the end | 23 Jun, 2022
There is a given array and split it from a specified position, and move the first splitted part of the array and then add to the end of array
Examples:
Input : arr[] = {12, 10, 5, 6, 52, 36}
k = 2
Output : arr[] = {5, 6, 52, 36, 12, 10}
Explanation : here k is two so first two elements are s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 195,
"s": 52,
"text": "There is a given array and split it from a specified position, and move the first splitted part of the array and then add to the end of array "
},
{
"code": null,
... |
Ruby | Hash empty? function | 15 Apr, 2021
Hash#empty?() is a Hash class method which checks whether the Hash array has any key-value pair.
Syntax: Hash.empty?()Parameter: Hash valuesReturn: true – if no key value pair otherwise return false
Example #1 :
Ruby
# Ruby code for Hash.empty?() method # declaring Hash valuea = {a:100, b:200} # decla... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "Hash#empty?() is a Hash class method which checks whether the Hash array has any key-value pair. "
},
{
"code": null,
"e": 228,
"s": 126,
"text": "Syntax: ... |
Java Relational Operators with Examples | 02 Dec, 2021
Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions, be it logical, arithmetic, relational, etc. They are classified based on the functionality they provide... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 361,
"s": 52,
"text": "Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to perform variou... |
Bitwise right shift operator in Java
| Java supports two types of right shift operators. The >> operator is a signed right shift operator and >>> is an unsigned right shift operator. The left operands value is moved right by the number of bits specified by the right operand.
The signed right shift operator '>>' uses the sign bit to fill the trailing positio... | [
{
"code": null,
"e": 1424,
"s": 1187,
"text": "Java supports two types of right shift operators. The >> operator is a signed right shift operator and >>> is an unsigned right shift operator. The left operands value is moved right by the number of bits specified by the right operand."
},
{
"c... |
Java Program To Find Largest Between Three Numbers Using Ternary Operator | 02 Nov, 2020
Java offers a lot of Operators and one such operator is the Ternary Operator. It is a linear replacement for an if-else statement. Thus, it is a very useful operator and it uses less space in comparison to an if-else statement.
Ternary Operator Syntax :
variable = condition ? expression1 : expression2 ;
T... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 282,
"s": 54,
"text": "Java offers a lot of Operators and one such operator is the Ternary Operator. It is a linear replacement for an if-else statement. Thus, it is a very useful operator and it u... |
Python | TextBlob.noun_phrases() method | 09 Sep, 2019
With the help of TextBlob.noun_phrases() method, we can get the noun phrases of the sentences by using TextBlob.noun_phrases() method.
Syntax : TextBlob.noun_phrases()Return : Return list of noun values.
Example #1 :In this example we can say that by using TextBlob.noun_phrases() method, we are able to get... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2019"
},
{
"code": null,
"e": 163,
"s": 28,
"text": "With the help of TextBlob.noun_phrases() method, we can get the noun phrases of the sentences by using TextBlob.noun_phrases() method."
},
{
"code": null,
"e": 232... |
SQL Query to Add Unique key Constraints Using ALTER Command | 29 Apr, 2021
Here we will see how to add unique key constraint to a column(s) of a MS SQL Server’s database with the help of a SQL query using ALTER clause.
For the demonstration purpose, we will be creating a demo table in a database called “geeks”.
Creating the Database :
Use the below SQL statement to create a datab... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "Here we will see how to add unique key constraint to a column(s) of a MS SQL Server’s database with the help of a SQL query using ALTER clause."
},
{
"code": null,
... |
HTML | Responsive full page image using CSS | 08 Feb, 2022
Responsive Web design (RWD), a design strategy developed to cope with the amazing popularity of mobile devices for viewing the Web. Responsive images are an important component of responsive Web design (RWD), Responsive web design is a new approach to website design that ensures users have a good viewing e... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 877,
"s": 53,
"text": "Responsive Web design (RWD), a design strategy developed to cope with the amazing popularity of mobile devices for viewing the Web. Responsive images are an important compone... |
What is the best way to read an entire file into a std::string in C++? | This is an simple way to read an entire file into std::string in C++
Begin
Take the filename as inputstream.
Declare a string variable str.
Read the file till the end by using rdbuf().
Put the data into st.
Print the data.
End.
#include<iostream>
#include<fstream>
#include<sstream>
#include<string>
using... | [
{
"code": null,
"e": 1256,
"s": 1187,
"text": "This is an simple way to read an entire file into std::string in C++"
},
{
"code": null,
"e": 1430,
"s": 1256,
"text": "Begin\n Take the filename as inputstream.\n Declare a string variable str.\n Read the file till the end by ... |
Bootstrap Collapsible list group | To create a collapsible list group, use the panel-collapse property with list-group property.
The list-group property lists items using the list-group-item property −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet... | [
{
"code": null,
"e": 1281,
"s": 1187,
"text": "To create a collapsible list group, use the panel-collapse property with list-group property."
},
{
"code": null,
"e": 1354,
"s": 1281,
"text": "The list-group property lists items using the list-group-item property −"
},
{
"... |
Display Numpy array in Fortran order | 01 Oct, 2020
Fortran order/ array is a special case in which all elements of an array are stored in column-major order. Sometimes we need to display array in fortran order, for this numpy has a function known as numpy.nditer().
Syntax: numpy.nditer(op, flags=None, op_flags=None, op_dtypes=None, order=’K’, casting=’saf... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 244,
"s": 28,
"text": "Fortran order/ array is a special case in which all elements of an array are stored in column-major order. Sometimes we need to display array in fortran order, for this numpy ... |
MongoDB – db.collection.Find() Method | 17 Feb, 2021
In MongoDB, find() method is used to select documents in a collection and return a cursor to the selected documents. Cursor means a pointer that points to a document, when we use find() method it returns a pointer on the selected documents and returns one by one. If we want to return pointer on all documen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 1101,
"s": 28,
"text": "In MongoDB, find() method is used to select documents in a collection and return a cursor to the selected documents. Cursor means a pointer that points to a document, when we... |
How to draw rectangle in Pygame? | 01 Oct, 2020
Pygame is a Python library designed to develop video games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language.
Functions Used:
pygame.display.set_mode(): This function is used to initialize a surface... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 271,
"s": 53,
"text": "Pygame is a Python library designed to develop video games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and ... |
Ishaan and Sticks | Practice | GeeksforGeeks | Ishaan has a craving for sticks. He has N sticks. He observes that some of his sticks are of the same length, and thus he can make squares out of those.
He wants to know how big a square he can make using those sticks as sides. Since the number of sticks is large, he can't do that manually. Can you tell him the maximum... | [
{
"code": null,
"e": 662,
"s": 226,
"text": "Ishaan has a craving for sticks. He has N sticks. He observes that some of his sticks are of the same length, and thus he can make squares out of those.\nHe wants to know how big a square he can make using those sticks as sides. Since the number of sticks... |
How to generate XML documents with namespaces in Python? | Currently you cannot add namespaces to XML documents directly as it is not yet supported in the in built Python xml package. So you will need to add namespace as a normal attribute to the tag. For example,
import xml.dom.minidom
doc = xml.dom.minidom.Document()
element = doc.createElementNS('http://hello.world/ns', 'ex... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "Currently you cannot add namespaces to XML documents directly as it is not yet supported in the in built Python xml package. So you will need to add namespace as a normal attribute to the tag. For example,"
},
{
"code": null,
"e": 1496,
... |
A/B Testing in R. What is A/B Testing? | by Sheenal Srivastava | Towards Data Science | A/B testing is a method used to test whether the response rate is different for two variants of the same feature. For instance, you may want to test whether a specific change to your website like moving the shopping cart button to the top right hand corner of your web page instead of on the right hand panel changes the... | [
{
"code": null,
"e": 560,
"s": 171,
"text": "A/B testing is a method used to test whether the response rate is different for two variants of the same feature. For instance, you may want to test whether a specific change to your website like moving the shopping cart button to the top right hand corne... |
DeepDiff — Recursively Find and Ignore Trivial Differences Using Python | by Khuyen Tran | Towards Data Science | When comparing two Python objects, you might not want the test to focus on some trivial differences such as the order of the values in a list.
For example, you might want the test to consider[3, 2] to be the same as [2, 3] .
However, you get an error when the order is different.
Is there a way that you can ignore the o... | [
{
"code": null,
"e": 314,
"s": 171,
"text": "When comparing two Python objects, you might not want the test to focus on some trivial differences such as the order of the values in a list."
},
{
"code": null,
"e": 396,
"s": 314,
"text": "For example, you might want the test to con... |
C# program to merge two Dictionaries | Set the two dictionaries −
Dictionary < string, int > dict1 = new Dictionary < string, int > ();
dict1.Add("laptop", 1);
dict1.Add("desktop", 2);
Dictionary < string, int > dict2 = new Dictionary < string, int > ();
dict2.Add("desktop", 3);
dict2.Add("tablet", 4);
dict2.Add("mobile", 5);
Now use HashSet and UnionWith()... | [
{
"code": null,
"e": 1089,
"s": 1062,
"text": "Set the two dictionaries −"
},
{
"code": null,
"e": 1351,
"s": 1089,
"text": "Dictionary < string, int > dict1 = new Dictionary < string, int > ();\ndict1.Add(\"laptop\", 1);\ndict1.Add(\"desktop\", 2);\nDictionary < string, int > di... |
How to create a Sandbox in Lua? | In order to create a sandbox and to be able to use it we must first understand what a sandbox is and why we need it. A sandbox is term that is used in different fields of computer science, like in case we are talking about the software testing domain, then a sandbox is a testing environment that isolates untested code ... | [
{
"code": null,
"e": 1611,
"s": 1062,
"text": "In order to create a sandbox and to be able to use it we must first understand what a sandbox is and why we need it. A sandbox is term that is used in different fields of computer science, like in case we are talking about the software testing domain, t... |
How to use PHP OPCache ? - GeeksforGeeks | 31 Dec, 2021
The OPCache is used for improving the performance of PHP as it stores the precompiled bytecode, in result deleting the need for loading and parsing the PHP scripts upon each request.
Requirements: Packages such as Zend OPCache are required for the purposeful use. The zendOPCache package contains PHP versio... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n31 Dec, 2021"
},
{
"code": null,
"e": 24764,
"s": 24581,
"text": "The OPCache is used for improving the performance of PHP as it stores the precompiled bytecode, in result deleting the need for loading and parsing the PHP scripts... |
Custom dataset in Pytorch —Part 1. Images | by Utkarsh Garg | Towards Data Science | Pytorch has a great ecosystem to load custom datasets for training machine learning models. This is the first part of the two-part series on loading Custom Datasets in Pytorch. In Part 2 we’ll explore loading a custom dataset for a Machine Translation task. In this walkthrough, we’ll learn how to load a custom image da... | [
{
"code": null,
"e": 577,
"s": 172,
"text": "Pytorch has a great ecosystem to load custom datasets for training machine learning models. This is the first part of the two-part series on loading Custom Datasets in Pytorch. In Part 2 we’ll explore loading a custom dataset for a Machine Translation tas... |
HTML5 - range | The range type is used for input fields that should contain a value from a range of numbers.
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Select Range : <input type = "range" min = "0" max = "10" step "1"
value = "5" name = "newinput" />
<in... | [
{
"code": null,
"e": 2701,
"s": 2608,
"text": "The range type is used for input fields that should contain a value from a range of numbers."
},
{
"code": null,
"e": 3002,
"s": 2701,
"text": "<!DOCTYPE HTML>\n\n<html>\n <body>\n\n <form action = \"/cgi-bin/html5.cgi\" metho... |
How to Create Animated Plots in R | by Chanin Nantasenamat | Towards Data Science | A picture is worth a thousand words and so does the insights provided by graphs and plots. Data visualization is such an important part of any data science project as it allows effective data storytelling in the form of graphs and plots. Even static plots can convey important information and provide immense value, imag... | [
{
"code": null,
"e": 568,
"s": 172,
"text": "A picture is worth a thousand words and so does the insights provided by graphs and plots. Data visualization is such an important part of any data science project as it allows effective data storytelling in the form of graphs and plots. Even static plots... |
How do you create a Button on a tkinter Canvas? - GeeksforGeeks | 03 Jan, 2021
In this article, we will see how to create a button on a Tkinter Canvas.
The Canvas widget display various graphics on the application. It can be used to draw simple shapes to complicated graphs. We can also display various kinds of custom widgets according to our needs.
It is used trigger any function wh... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 23974,
"s": 23901,
"text": "In this article, we will see how to create a button on a Tkinter Canvas."
},
{
"code": null,
"e": 24173,
"s": 23974,
"text": "The Canvas widget... |
LSTM vs BERT — a step-by-step guide for tweet sentiment analysis | by Yuki Takahashi | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
After seeing the com... | [
{
"code": null,
"e": 471,
"s": 171,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
Community detection of the countries of the world with Neo4j Graph Data Science | by Tomaz Bratanic | Towards Data Science | While I was waiting for my sourdough to rise, I thought, the best way to spend my time is to perform a network analysis with the Neo4j Graph data science library. Well, maybe also try to draw an acrylic painting, but I won’t bore you with that. If this is the first time you have heard of the GDS library, I can recommen... | [
{
"code": null,
"e": 556,
"s": 171,
"text": "While I was waiting for my sourdough to rise, I thought, the best way to spend my time is to perform a network analysis with the Neo4j Graph data science library. Well, maybe also try to draw an acrylic painting, but I won’t bore you with that. If this is... |
@Formula Annotation in Hibernate Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In hibernate, we have many annotations. Each ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
How to push an array in MongoDB? | To push an array, use $push in MongoDB. Let us first create a collection with documents −
> db.demo399.insertOne({Name:"Chris",Age:21});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e610339fac4d418a017856d")
}
> db.demo399.insertOne({Name:"David",Age:22});
{
"acknowledged" : true,
"insertedId" : Objec... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To push an array, use $push in MongoDB. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1810,
"s": 1152,
"text": "> db.demo399.insertOne({Name:\"Chris\",Age:21});\n{\n \"acknowledged\" : true,\n \"inser... |
Convert all numbers in range [L, R] to binary number - GeeksforGeeks | 24 Dec, 2021
Given two positive integer numbers L and R. The task is to convert all the numbers from L to R to binary number.
Examples:
Input: L = 1, R = 4Output: 11011100Explanation: The binary representation of the numbers 1, 2, 3 and 4 are: 1 = (1)22 = (10)23 = (11)24 = (100)2
Input: L = 2, R = 8Output:101110010111... | [
{
"code": null,
"e": 24597,
"s": 24569,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 24711,
"s": 24597,
"text": "Given two positive integer numbers L and R. The task is to convert all the numbers from L to R to binary number. "
},
{
"code": null,
"e": 24721,
"... |
Check if a Java ArrayList contains a given item or not | The java.util.ArrayList.contains() method can be used to check if a Java ArrayList contains a given item or not. This method has a single parameter i.e. the item whose presence in the ArrayList is tested. Also it returns true if the item is present in the ArrayList and false if the item is not present.
A program that d... | [
{
"code": null,
"e": 1366,
"s": 1062,
"text": "The java.util.ArrayList.contains() method can be used to check if a Java ArrayList contains a given item or not. This method has a single parameter i.e. the item whose presence in the ArrayList is tested. Also it returns true if the item is present in t... |
JavaScript String - fontsize() Method | This method causes a string to be displayed in the specified size as if it were in a <font size = "size"> tag.
Its syntax is as follows −
string.fontsize( size )
size − An integer between 1 and 7, a string representing a signed integer between 1 and 7.
Returns the string with <font size="size"> tag.
Try the following ... | [
{
"code": null,
"e": 2577,
"s": 2466,
"text": "This method causes a string to be displayed in the specified size as if it were in a <font size = \"size\"> tag."
},
{
"code": null,
"e": 2604,
"s": 2577,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": 2629,... |
How to serialize and deserialize an object in Java? | The Serialization is a process of changing the state of an object into a byte stream, an object is said to be serializable if its class or parent classes implement either the Serializable or Externalizable interface and the Deserialization is a process of converting the serialized object back into a copy of an object.
... | [
{
"code": null,
"e": 1382,
"s": 1062,
"text": "The Serialization is a process of changing the state of an object into a byte stream, an object is said to be serializable if its class or parent classes implement either the Serializable or Externalizable interface and the Deserialization is a process ... |
Getting and Cleaning Data (JHU Coursera, Course 3) | by Michael Galarnyk | Towards Data Science | The third course in the data science specialization, “Getting and Cleaning Data” is an essential course. As always the code for the quizzes and assignments is located on my github.
Week 1 Review: Reading Excel, XML and JSON files is essential. I am happy with the lecture on the data.table package since I use it for all... | [
{
"code": null,
"e": 353,
"s": 172,
"text": "The third course in the data science specialization, “Getting and Cleaning Data” is an essential course. As always the code for the quizzes and assignments is located on my github."
},
{
"code": null,
"e": 628,
"s": 353,
"text": "Week ... |
Find any pair with given GCD and LCM - GeeksforGeeks | 16 Feb, 2022
Given gcd G and lcm L. The task is to print any pair which has gcd G and lcm L.Examples:
Input: G = 3, L = 12
Output: 3, 12
Input: G = 1, L = 10
Output: 1, 10
A normal solution will be to perform iteration over all the factor pairs of g*l and check if any pair has gcd g and lcm as l. If they have, t... | [
{
"code": null,
"e": 24692,
"s": 24664,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 24783,
"s": 24692,
"text": "Given gcd G and lcm L. The task is to print any pair which has gcd G and lcm L.Examples: "
},
{
"code": null,
"e": 24856,
"s": 24783,
"text": ... |
Find the element that appears once | Practice | GeeksforGeeks | Given a sorted array A[] of N positive integers having all the numbers occurring exactly twice, except for one number which will occur only once. Find the number occurring only once.
Example 1:
Input:
N = 5
A = {1, 1, 2, 5, 5}
Output: 2
Explanation:
Since 2 occurs once, while
other numbers occur twice,
2 is the answe... | [
{
"code": null,
"e": 421,
"s": 238,
"text": "Given a sorted array A[] of N positive integers having all the numbers occurring exactly twice, except for one number which will occur only once. Find the number occurring only once."
},
{
"code": null,
"e": 432,
"s": 421,
"text": "Exa... |
Convert a number from base A to base B - GeeksforGeeks | 12 Jan, 2022
Given two positive integers A and B and a string S of size N, denoting a number in base A, the task is to convert the given string S from base A to base B.
Examples:
Input: S = “10B”, A = 16, B = 10Output: 267Explanation: 10B in hexadecimal (base =16) when converted to decimal (base =10) is 267.
Input: S ... | [
{
"code": null,
"e": 24718,
"s": 24690,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 24875,
"s": 24718,
"text": "Given two positive integers A and B and a string S of size N, denoting a number in base A, the task is to convert the given string S from base A to base B."
},
... |
MySQL error 1452 - Cannot add or a child row: a foreign key constraint fails | To understand error 1452, first we need to create a table and relate that to another table with
the help of a foreign key constraint.
Creating the first table −
mysql> CREATE table ForeignTable
-> (
-> id int,
-> name varchar(200),
-> Fk_pk int
-> );
Query OK, 0 rows affected (0.43 sec)
After creating the first table s... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "To understand error 1452, first we need to create a table and relate that to another table with\nthe help of a foreign key constraint."
},
{
"code": null,
"e": 1223,
"s": 1196,
"text": "Creating the first table −"
},
{
"code"... |
Get the aggregated result and find the count of repeated values in different MongoDB
documents | To get the count of repeated values in different documents, use aggregate(). Let us create a collection with documents −
> db.demo452.insertOne({"StudentName":"John","StudentAge":21});{
"acknowledged" : true,
"insertedId" : ObjectId("5e7b7e3371f552a0ebb0a6f3")
}
> db.demo452.insertOne({"StudentName":"John","Stude... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "To get the count of repeated values in different documents, use aggregate(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1925,
"s": 1183,
"text": "> db.demo452.insertOne({\"StudentName\":\"John\",\"StudentAge... |
Fast XML parsing using Expat in Python | Python allows XML data to be read and processed through its inbuilt module called expat. It is a non-validating XML parser. it creates an XML parser object and captures the attributes of its objects into various handler functions. In the below example we will see how the various handler functions can help us read the X... | [
{
"code": null,
"e": 1499,
"s": 1062,
"text": "Python allows XML data to be read and processed through its inbuilt module called expat. It is a non-validating XML parser. it creates an XML parser object and captures the attributes of its objects into various handler functions. In the below example w... |
How Deep Neural Networks Look for Features in Images? With Keras and Google Colab | by Saptashwa Bhattacharyya | Towards Data Science | When I first started taking steps from learning standard machine algorithms like Logistic Regression, Support Vector Machine towards deep learning and neural network, I used to often fascinate that the deep layers in the networks are kind of ‘black boxes’. Later on this false understanding went away and, once I learnt ... | [
{
"code": null,
"e": 959,
"s": 171,
"text": "When I first started taking steps from learning standard machine algorithms like Logistic Regression, Support Vector Machine towards deep learning and neural network, I used to often fascinate that the deep layers in the networks are kind of ‘black boxes’... |
Highcharts - Column Chart using HTML Table | Following is an example of a Column Chart using HTML table.
We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter. Let us now see additional configurations and also how we have added table under data.
An example of a Column Chart using the HTML table is given below.
The ... | [
{
"code": null,
"e": 2077,
"s": 2017,
"text": "Following is an example of a Column Chart using HTML table."
},
{
"code": null,
"e": 2267,
"s": 2077,
"text": "We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter. Let us now see add... |
How to Implement Sunglint Detection for Sentinel 2 Images in Python using Metadata Info | Towards Data Science | Optical Remote Sensing analysis depends on understanding the processes of absorption and scattering of solar radiance on ground objects. If we measure the solar incidence radiance and the surface’s irradiance, we will be able to estimate surface’s reflectance. Reflectance in various wavelengths is the key to understand... | [
{
"code": null,
"e": 732,
"s": 172,
"text": "Optical Remote Sensing analysis depends on understanding the processes of absorption and scattering of solar radiance on ground objects. If we measure the solar incidence radiance and the surface’s irradiance, we will be able to estimate surface’s reflect... |
Write a C program to find out the largest and smallest number in a series | Let the user enter four series of integers in the console, find out a number which is smallest and largest in a series
To calculate the small and large number, we use if conditions. The logic we use to find the largest and smallest number is −
if(minno>q) //checking 1st and 2nd number
minno=q;
else if(maxno&l;q)
... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "Let the user enter four series of integers in the console, find out a number which is smallest and largest in a series"
},
{
"code": null,
"e": 1306,
"s": 1181,
"text": "To calculate the small and large number, we use if conditions. ... |
Why do we use jQuery over JavaScript? | jQuery is a JavaScript library, so it operates on top of JavaScript. It cannot exist on its own, so you can't use one over the other. You can use just JavaScript or JavaScript and jQuery. jQuery was introduced to make development with JavaScript easier. It will reduce the development time. Use it to add animation and e... | [
{
"code": null,
"e": 1412,
"s": 1062,
"text": "jQuery is a JavaScript library, so it operates on top of JavaScript. It cannot exist on its own, so you can't use one over the other. You can use just JavaScript or JavaScript and jQuery. jQuery was introduced to make development with JavaScript easier.... |
Predict Customer Churn in Python. A step-by-step approach to predict... | by Sree | Towards Data Science | Customer attrition (a.k.a customer churn) is one of the biggest expenditures of any organization. If we could figure out why a customer leaves and when they leave with reasonable accuracy, it would immensely help the organization to strategize their retention initiatives manifold. Let’s make use of a customer transacti... | [
{
"code": null,
"e": 596,
"s": 172,
"text": "Customer attrition (a.k.a customer churn) is one of the biggest expenditures of any organization. If we could figure out why a customer leaves and when they leave with reasonable accuracy, it would immensely help the organization to strategize their reten... |
Difference between Algorithm, Pseudocode and Program - GeeksforGeeks | 07 Dec, 2021
In this post, we will discuss the most common misconception that an algorithm and a pseudocode is one of the same things. No, they are not! Let us take a look at definitions first, Algorithm : Systematic logical approach which is a well-defined, step-by-step procedure that allows a computer to solve a prob... | [
{
"code": null,
"e": 34594,
"s": 34566,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 35197,
"s": 34594,
"text": "In this post, we will discuss the most common misconception that an algorithm and a pseudocode is one of the same things. No, they are not! Let us take a look at d... |
Dart Programming - Exceptions | An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally.
Built-in Dart exceptions include −
DeferredLoadException
Thrown when a deferred library fails to load.
F... | [
{
"code": null,
"e": 2741,
"s": 2525,
"text": "An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally."
},
{
"code": null,
"e": ... |
HTML | <details> open Attribute - GeeksforGeeks | 17 Oct, 2019
The HTML <details> open attribute is used to indicate whether the details will be display on page load. It is a boolean attribute. If this attribute is present then the detail will be visible.
Syntax:
<details open> Contents... </details>
Example: This example illustrates the use of open attribute in <deta... | [
{
"code": null,
"e": 25115,
"s": 25087,
"text": "\n17 Oct, 2019"
},
{
"code": null,
"e": 25308,
"s": 25115,
"text": "The HTML <details> open attribute is used to indicate whether the details will be display on page load. It is a boolean attribute. If this attribute is present the... |
TensorFlow 2.0: tf.function and AutoGraph | by Michael Grogan | Towards Data Science | With the advent of TensorFlow (TF) 2.0, the introduction of tf.function has brought about some useful improvements to TF 1.0, most notably the introduction of AutoGraph.
Fundamentally, TensorFlow runs by means of computational graphs — i.e. a graph of nodes is used to represent a series of TensorFlow operations.
Howeve... | [
{
"code": null,
"e": 341,
"s": 171,
"text": "With the advent of TensorFlow (TF) 2.0, the introduction of tf.function has brought about some useful improvements to TF 1.0, most notably the introduction of AutoGraph."
},
{
"code": null,
"e": 485,
"s": 341,
"text": "Fundamentally, T... |
Print the corner elements and their sum in a 2-D matrix in C Program. | Given an array of size 2X2 and the challenge is to print the sum of all the corner elements stored in an array.
Assume a matrix mat[r][c], with some row “r” and column “c” starting row and column from 0, then its corner elements will be; mat[0][0], mat[0][c-1], mat[r-1][0], mat[r-1][c-1]. Now the task is to get these c... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "Given an array of size 2X2 and the challenge is to print the sum of all the corner elements stored in an array."
},
{
"code": null,
"e": 1524,
"s": 1174,
"text": "Assume a matrix mat[r][c], with some row “r” and column “c” starting r... |
MongoDB query to count the frequency of every element of the array | To count, you can also use aggregate() along with $sum. Let us create a collection with documents −
> db.demo184.insertOne({"Names":["Chris","David","Bob"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e3999fb9e4f06af55199805")
}
> db.demo184.insertOne({"Names":["Chris","Mike"]});
{
"acknowledged" : tr... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To count, you can also use aggregate() along with $sum. Let us create a collection with documents −"
},
{
"code": null,
"e": 1587,
"s": 1162,
"text": "> db.demo184.insertOne({\"Names\":[\"Chris\",\"David\",\"Bob\"]});\n{\n \"acknow... |
Get list of files and folders in Google Drive storage using Python - GeeksforGeeks | 01 Oct, 2020
In this article, we are going to have a look at how can we get a list of files (or folders) stored in our Google Drive cloud storage using Google Drive API in Python. It is a REST API that allows you to leverage Google Drive storage from within your app or program.
So, let’s create a simple Python script t... | [
{
"code": null,
"e": 24938,
"s": 24910,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 25204,
"s": 24938,
"text": "In this article, we are going to have a look at how can we get a list of files (or folders) stored in our Google Drive cloud storage using Google Drive API in Pyth... |
Android imageView Zoom-in and Zoom-Out using Kotlin? | This example demonstrates how to implement Android imageView zoom-in and Zoom out using kotlin.
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="... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "This example demonstrates how to implement Android imageView zoom-in and Zoom out using kotlin."
},
{
"code": null,
"e": 1287,
"s": 1158,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all... |
Valid Palindrome in Python | Suppose we have a string with alphanumeric values and symbols. There are lower case and uppercase letters as well. We have to check whether the string is forming a palindrome or not by considering only the lowercase letters (uppercases will be converted into lower case), other symbols like a comma, space will be ignore... | [
{
"code": null,
"e": 1385,
"s": 1062,
"text": "Suppose we have a string with alphanumeric values and symbols. There are lower case and uppercase letters as well. We have to check whether the string is forming a palindrome or not by considering only the lowercase letters (uppercases will be converted... |
How to check total space and available space in Linux using the terminal? | In the Linux/Unix system to check storage details, we use the df command.
the df command is used to report file system disk space usage using the terminal in the Linux system. It displays total space, used space, and available space.
The general syntax of the df command is as follow:
$ df [OPTION]... [FILE]...
Brief de... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "In the Linux/Unix system to check storage details, we use the df command."
},
{
"code": null,
"e": 1296,
"s": 1136,
"text": "the df command is used to report file system disk space usage using the terminal in the Linux system. It dis... |
Venn Diagrams — An Underrated Data Visualization | by Sidney Kung | Towards Data Science | The primary goal of a data visualization is to represent a point in a clear, compelling way. As Data Scientists, we’re always aiming to create the coolest, most innovative types of data visualizations. To the point where the actual message is lost. Why over complicate things? Sometimes, a simple message only requires a... | [
{
"code": null,
"e": 531,
"s": 46,
"text": "The primary goal of a data visualization is to represent a point in a clear, compelling way. As Data Scientists, we’re always aiming to create the coolest, most innovative types of data visualizations. To the point where the actual message is lost. Why ove... |
Node.js - Scaling Application | Node.js runs in a single-thread mode, but it uses an event-driven paradigm to handle concurrency. It also facilitates creation of child processes to leverage parallel processing on multi-core CPU based systems.
Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared wit... | [
{
"code": null,
"e": 2229,
"s": 2018,
"text": "Node.js runs in a single-thread mode, but it uses an event-driven paradigm to handle concurrency. It also facilitates creation of child processes to leverage parallel processing on multi-core CPU based systems."
},
{
"code": null,
"e": 2381,... |
Firebase - Read Data | In this chapter, we will show you how to read Firebase data. The following image shows the data we want to read.
We can use the on() method to retrieve data. This method is taking the event type as "value" and then retrieves the snapshot of the data. When we add val() method to the snapshot, we will get the JavaScript ... | [
{
"code": null,
"e": 2279,
"s": 2166,
"text": "In this chapter, we will show you how to read Firebase data. The following image shows the data we want to read."
},
{
"code": null,
"e": 2514,
"s": 2279,
"text": "We can use the on() method to retrieve data. This method is taking th... |
Learn Python Data Analytics By Example: NYC Parking Violations | by Nick Cox | Towards Data Science | While working towards my Master’s in Business Analytics, I found that learning by example was the best way for me to learn Python data analytics. Being given a dataset and a set of coding tasks is much more beneficial than reading a textbook or listening to a professor.
I want to share this method of learning with othe... | [
{
"code": null,
"e": 318,
"s": 47,
"text": "While working towards my Master’s in Business Analytics, I found that learning by example was the best way for me to learn Python data analytics. Being given a dataset and a set of coding tasks is much more beneficial than reading a textbook or listening t... |
Tryit Editor v3.7 | Tryit: link to stylesheet using relative url | [] |
Cypress - Test Runner | Cypress Test Runner helps to trigger the test execution. As we complete Cypress installation, there comes a suggestion from the tool on the terminal, as mentioned below −
You can open Cypress by running − node_modules/.bin/cypress open
To open the Test Runner, we have to run the below mentioned command −
node_modules/... | [
{
"code": null,
"e": 2668,
"s": 2497,
"text": "Cypress Test Runner helps to trigger the test execution. As we complete Cypress installation, there comes a suggestion from the tool on the terminal, as mentioned below −"
},
{
"code": null,
"e": 2734,
"s": 2668,
"text": "You can ope... |
What is Binary Serialization and Deserialization in C# and how to achieve Binary Serialization in C#? | Converting an Object to a Binary format which is not in a human readable format is called Binary Serialization.
Converting back the binary format to human readable format is called deserialization?
To achieve binary serialization in C# we have to make use of library System.Runtime.Serialization.Formatters.Binary Assemb... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "Converting an Object to a Binary format which is not in a human readable format is called Binary Serialization."
},
{
"code": null,
"e": 1260,
"s": 1174,
"text": "Converting back the binary format to human readable format is called d... |
How to resolve the error that occurs while using a reserved word as a table or column name in MySQL? | This error occurs when you try to use a reserved word as a table or column name. It can occur due to −
Case 1: Whenever you use reserved word as a table name −
mysql> create table insert
−> (
−> Id int
−> );
The error is as follows −
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corres... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "This error occurs when you try to use a reserved word as a table or column name. It can occur due to −"
},
{
"code": null,
"e": 1222,
"s": 1165,
"text": "Case 1: Whenever you use reserved word as a table name −"
},
{
"code": ... |
HTML novalidate Attribute | The HTML novalidate attribute define that while submitting the form the form data should not be validated in an HTML document.
Following is the syntax −
<form novalidate></form>
Let us see an example of HTML novalidate Attribute −
Live Demo
<!DOCTYPE html>
<html>
<style>
body {
color: #000;
height: 100v... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "The HTML novalidate attribute define that while submitting the form the form data should not be validated in an HTML document."
},
{
"code": null,
"e": 1215,
"s": 1189,
"text": "Following is the syntax −"
},
{
"code": null,
... |
8086 program to convert 8 bit BCD number into ASCII Code - GeeksforGeeks | 13 Jan, 2022
Problem – Write an assembly language program in 8086 microprocessor to convert 8 bit BCD number to its respective ASCII Code.
Assumption – Starting address of program: 400 Input memory location: 2000 Output memory location: 3000
Example :
Input:
DATA: 98H in memory location 2000
Output:
DATA: 38H in m... | [
{
"code": null,
"e": 24992,
"s": 24964,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 25119,
"s": 24992,
"text": "Problem – Write an assembly language program in 8086 microprocessor to convert 8 bit BCD number to its respective ASCII Code. "
},
{
"code": null,
"e":... |
Anonymous Inner Class in Java - GeeksforGeeks | 15 Dec, 2021
Nested Classes in Java is prerequisite required before adhering forward to grasp about anonymous Inner class. It is an inner class without a name and for which only a single object is created. An anonymous inner class can be useful when making an instance of an object with certain “extras” such as overridi... | [
{
"code": null,
"e": 22939,
"s": 22911,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 23327,
"s": 22939,
"text": "Nested Classes in Java is prerequisite required before adhering forward to grasp about anonymous Inner class. It is an inner class without a name and for which onl... |
C++ String Library - find_last_of | It searches the string for the last character that matches any of the characters specified in its arguments.
Following is the declaration for std::string::find_last_of.
size_t find_last_of (const string& str, size_t pos = npos) const;
size_t find_last_of (const string& str, size_t pos = npos) const noexcept;
size_t fin... | [
{
"code": null,
"e": 2712,
"s": 2603,
"text": "It searches the string for the last character that matches any of the characters specified in its arguments."
},
{
"code": null,
"e": 2772,
"s": 2712,
"text": "Following is the declaration for std::string::find_last_of."
},
{
... |
Knock - Subdomain Scanner Tool in Kali Linux - GeeksforGeeks | 18 Jul, 2021
Knock is a tool written in Python and is designed to enumerate subdomains in a target domain through a wordlist.
First clone the tool from the GitHub repository by using the below command.
git clone https://github.com/santiko/KnockPy.git
Then Change to your preferred directory.
cd KnockPy
Fig 1: Cloning to... | [
{
"code": null,
"e": 24039,
"s": 24011,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 24152,
"s": 24039,
"text": "Knock is a tool written in Python and is designed to enumerate subdomains in a target domain through a wordlist."
},
{
"code": null,
"e": 24228,
"s... |
Check if an integer can be expressed as a sum of two semi-primes in Python | Suppose we have a number n, we have to check whether n can be expressed as a sum of two semi-primes or not.
As we know the semi-prime is a number if it can be expressed as product of two primes number. First few semi-prime numbers are (1 - 100 range): 4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51,... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "Suppose we have a number n, we have to check whether n can be expressed as a sum of two semi-primes or not."
},
{
"code": null,
"e": 1447,
"s": 1170,
"text": "As we know the semi-prime is a number if it can be expressed as product of... |
Replace null values with default value in Java Map | To replace null values with default value in Java Map, the code is as follows −
Live Demo
import java.util.*;
import java.util.stream.*;
public class Demo{
public static <T, K> Map<K, T> null_vals(Map<K, T> my_map, T def_val){
my_map = my_map.entrySet().stream().map(entry -> {
if (entry.getValue() ==... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To replace null values with default value in Java Map, the code is as follows −"
},
{
"code": null,
"e": 1153,
"s": 1142,
"text": " Live Demo"
},
{
"code": null,
"e": 1985,
"s": 1153,
"text": "import java.util.*;\... |
Guide to Big Data Joins — Python, SQL, Pandas, Spark, Dask | by Doug Foo | Towards Data Science | There are many ways to spin a disk, filet a fish, or work with Big Data — here is a quick guide.
Kaggle Movies Database [8] — 26 million ratings for 45,000 movies, data split across 5 files:
To find the top average ratings for movies you need to join links to metadata to ratings:
SELECT m.title, avg(r.rating) FROM link... | [
{
"code": null,
"e": 269,
"s": 172,
"text": "There are many ways to spin a disk, filet a fish, or work with Big Data — here is a quick guide."
},
{
"code": null,
"e": 363,
"s": 269,
"text": "Kaggle Movies Database [8] — 26 million ratings for 45,000 movies, data split across 5 fi... |
Calendar getTime() Method in Java with Examples - GeeksforGeeks | 24 Jun, 2021
The getTime() method in Calendar class is used to return an object resembling the Date that is represented by this Calendar’s time value.Syntax:
public final Date getTime()
Parameters: The method does not take any parameters.Return Value: The method returns the Date, represented by this Calendar.Below pr... | [
{
"code": null,
"e": 24121,
"s": 24093,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 24268,
"s": 24121,
"text": "The getTime() method in Calendar class is used to return an object resembling the Date that is represented by this Calendar’s time value.Syntax: "
},
{
"c... |
How to delete all elements from arraylist for listview in Android? | This example demonstrate about How to delete all elements from arraylist for listview in Android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encodin... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "This example demonstrate about How to delete all elements from arraylist for listview in Android"
},
{
"code": null,
"e": 1288,
"s": 1159,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill al... |
How to Maximize window in chrome using webDriver (Python)? | We can maximize windows on Chrome with a webdriver. While working on any automated test cases, if the browser opens in maximized mode then the probability of the scripts getting failed lessens.
This is because if the element is visible, then the chances of its interaction increases. Also, if the window is maximized, th... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "We can maximize windows on Chrome with a webdriver. While working on any automated test cases, if the browser opens in maximized mode then the probability of the scripts getting failed lessens."
},
{
"code": null,
"e": 1471,
"s": 1256,
... |
Redis - Environment | In this chapter, you will learn about the environmental setup for Redis.
To install Redis on Ubuntu, go to the terminal and type the following commands −
$sudo apt-get update
$sudo apt-get install redis-server
This will install Redis on your machine.
$redis-server
$redis-cli
This will open a redis prompt.
redis 12... | [
{
"code": null,
"e": 2118,
"s": 2045,
"text": "In this chapter, you will learn about the environmental setup for Redis."
},
{
"code": null,
"e": 2199,
"s": 2118,
"text": "To install Redis on Ubuntu, go to the terminal and type the following commands −"
},
{
"code": null,
... |
Scikit Learn - Clustering Performance Evaluation | There are various functions with the help of which we can evaluate the performance of clustering algorithms.
Following are some important and mostly used functions given by the Scikit-learn for evaluating clustering performance −
Rand Index is a function that computes a similarity measure between two clustering. For th... | [
{
"code": null,
"e": 2330,
"s": 2221,
"text": "There are various functions with the help of which we can evaluate the performance of clustering algorithms."
},
{
"code": null,
"e": 2451,
"s": 2330,
"text": "Following are some important and mostly used functions given by the Sciki... |
Properties of Relational Decomposition - GeeksforGeeks | 29 Aug, 2019
When a relation in the relational model is not appropriate normal form then the decomposition of a relation is required. In a database, breaking down the table into multiple tables termed as decomposition. The properties of a relational decomposition are listed below :
Attribute Preservation:Using function... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n29 Aug, 2019"
},
{
"code": null,
"e": 24600,
"s": 24330,
"text": "When a relation in the relational model is not appropriate normal form then the decomposition of a relation is required. In a database, breaking down the table int... |
How to create a notification with NotificationCompat.Builder in Android? | Before getting into NotificationCompact.Builder, we should know what is a notification in android. Notification is just like as a message showing system on the action bar. just like missed call notification as shown below
This example demonstrates how to integrate Android Notification.
Step 1 − Create a new project in ... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "Before getting into NotificationCompact.Builder, we should know what is a notification in android. Notification is just like as a message showing system on the action bar. just like missed call notification as shown below"
},
{
"code": null,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.