title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Access and trunk ports - GeeksforGeeks | 19 Oct, 2021
Switch ports are Layer 2 interfaces that are used to carry layer 2 traffic. A single switch port can carry single VLAN traffic whether it is an access port or trunk port. Frames are handled differently according to the type of link they are traversing.
Note: All switch ports are assigned VLAN 1 by default... | [
{
"code": null,
"e": 25595,
"s": 25567,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 25849,
"s": 25595,
"text": "Switch ports are Layer 2 interfaces that are used to carry layer 2 traffic. A single switch port can carry single VLAN traffic whether it is an access port or trun... |
Find common elements in three sorted arrays - GeeksforGeeks | 25 Apr, 2022
Given three arrays sorted in non-decreasing order, print all common elements in these arrays.
Examples:
Input: ar1[] = {1, 5, 10, 20, 40, 80} ar2[] = {6, 7, 20, 80, 100} ar3[] = {3, 4, 15, 20, 30, 70, 80, 120} Output: 20, 80
Input: ar1[] = {1, 5, 5} ar2[] = {3, 4, 5, 5, 10} ar3[] = {5, 5, 10, 20} Output: ... | [
{
"code": null,
"e": 24818,
"s": 24790,
"text": "\n25 Apr, 2022"
},
{
"code": null,
"e": 24912,
"s": 24818,
"text": "Given three arrays sorted in non-decreasing order, print all common elements in these arrays."
},
{
"code": null,
"e": 24923,
"s": 24912,
"text... |
Custom instance creator using Gson in Java? | While parsing JSON String to or from Java object, By default Gson try to create an instance of Java class by calling the default constructor. In the case of Java class doesn’t contain default constructor or we want to do some initial configuration while creating Java objects, we need to create and register our own inst... | [
{
"code": null,
"e": 1396,
"s": 1062,
"text": "While parsing JSON String to or from Java object, By default Gson try to create an instance of Java class by calling the default constructor. In the case of Java class doesn’t contain default constructor or we want to do some initial configuration while... |
C# - continue Statement - GeeksforGeeks | 14 Oct, 2020
In C#, the continue statement is used to skip over the execution part of the loop(do, while, for, or foreach) on a certain condition, after that, it transfers the control to the beginning of the loop. Basically, it skips its given statements and continues with the next iteration of the loop. Or in other wo... | [
{
"code": null,
"e": 24327,
"s": 24299,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 24788,
"s": 24327,
"text": "In C#, the continue statement is used to skip over the execution part of the loop(do, while, for, or foreach) on a certain condition, after that, it transfers the ... |
Fermat's little theorem - GeeksforGeeks | 21 Jan, 2022
Fermat’s little theorem states that if p is a prime number, then for any integer a, the number a p – a is an integer multiple of p.
Here p is a prime number ap ≡ a (mod p).
Special Case: If a is not divisible by p, Fermat’s little theorem is equivalent to the statement that a p-1-1 is an integer multiple... | [
{
"code": null,
"e": 24558,
"s": 24530,
"text": "\n21 Jan, 2022"
},
{
"code": null,
"e": 24692,
"s": 24558,
"text": "Fermat’s little theorem states that if p is a prime number, then for any integer a, the number a p – a is an integer multiple of p. "
},
{
"code": null,
... |
Batched, Multi-Dimensional Gaussian Process Regression with GPyTorch | by Ryan Sander | Towards Data Science | Kriging [1], more generally known as Gaussian Process Regression (GPR), is a powerful, non-parametric Bayesian regression technique that can be used for applications ranging from time series forecasting to interpolation.
GPyTorch [2], a package designed for Gaussian Processes, leverages significant advancements in hard... | [
{
"code": null,
"e": 393,
"s": 172,
"text": "Kriging [1], more generally known as Gaussian Process Regression (GPR), is a powerful, non-parametric Bayesian regression technique that can be used for applications ranging from time series forecasting to interpolation."
},
{
"code": null,
"e... |
Swing Examples - Box Layout | The class BoxLayout arranges the components in stacked manner to put them on top on each other or in row. It provides flexibility over FlowLayout. Following example showcases the use of BoxLayout.
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java... | [
{
"code": null,
"e": 2236,
"s": 2039,
"text": "The class BoxLayout arranges the components in stacked manner to put them on top on each other or in row. It provides flexibility over FlowLayout. Following example showcases the use of BoxLayout."
},
{
"code": null,
"e": 3715,
"s": 2236... |
Infinity or Exception in Java when divide by 0? - GeeksforGeeks | 06 Feb, 2019
Consider the following code snippets:
public class Geeksforgeeks{ public static void main(String[] args) { double p = 1; System.out.println(p/0); }}
Output:
Infinity
public class Geeksforgeeks{ public static void main(String[] args) { int p = 1; System.out.println... | [
{
"code": null,
"e": 24430,
"s": 24402,
"text": "\n06 Feb, 2019"
},
{
"code": null,
"e": 24468,
"s": 24430,
"text": "Consider the following code snippets:"
},
{
"code": "public class Geeksforgeeks{ public static void main(String[] args) { double p = 1; ... |
Count passing car pairs - GeeksforGeeks | 27 Apr, 2021
A non-empty binary array A consisting of size N is given where,
0 represents a car traveling east,
1 represents a car traveling west.
The goal is to count passing cars. We say that a pair of cars (P, Q), where 0 <= P < Q < N, is passing when P is traveling to the east and Q is traveling to the west.Exam... | [
{
"code": null,
"e": 24335,
"s": 24307,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 24401,
"s": 24335,
"text": "A non-empty binary array A consisting of size N is given where, "
},
{
"code": null,
"e": 24472,
"s": 24401,
"text": "0 represents a car trave... |
Python | Combine two lists by maintaining duplicates in first list - GeeksforGeeks | 07 Mar, 2019
Given two lists, the task is to combine two lists and removing duplicates, without removing duplicates in original list.
Example:
Input :
list_1 = [11, 22, 22, 15]
list_2 = [22, 15, 77, 9]
Output :
OutList = [11, 22, 22, 15, 77, 9]
Code #1: using extend
# Python code to combine two lists# and removing du... | [
{
"code": null,
"e": 25260,
"s": 25232,
"text": "\n07 Mar, 2019"
},
{
"code": null,
"e": 25381,
"s": 25260,
"text": "Given two lists, the task is to combine two lists and removing duplicates, without removing duplicates in original list."
},
{
"code": null,
"e": 25390... |
Small input group with Bootstrap | To set small input group with Bootstrap, use the .input-group-sm class.
You can try to run the following code to implement the .input-group-sm class &minsu;
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "To set small input group with Bootstrap, use the .input-group-sm class."
},
{
"code": null,
"e": 1219,
"s": 1134,
"text": "You can try to run the following code to implement the .input-group-sm class &minsu;"
},
{
"code": nul... |
Program to convert Infix notation to Expression Tree - GeeksforGeeks | 27 Aug, 2021
Given a string representing infix notation. The task is to convert it to an expression tree.Expression Tree is a binary tree where the operands are represented by leaf nodes and operators are represented by intermediate nodes. No node can have a single child.
Construction of Expression tree
The algorithm f... | [
{
"code": null,
"e": 26297,
"s": 26269,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 26557,
"s": 26297,
"text": "Given a string representing infix notation. The task is to convert it to an expression tree.Expression Tree is a binary tree where the operands are represented by ... |
Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation) - GeeksforGeeks | 11 Aug, 2021
We have discussed Prim’s algorithm and its implementation for adjacency matrix representation of graphs. As discussed in the previous post, in Prim’s algorithm, two sets are maintained, one set contains list of vertices already included in MST, other set contains vertices not yet included. In every iterati... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 26733,
"s": 25943,
"text": "We have discussed Prim’s algorithm and its implementation for adjacency matrix representation of graphs. As discussed in the previous post, in Prim’s algorithm, tw... |
How to open a hyperlink in another window or tab in HTML ? - GeeksforGeeks | 13 Jul, 2021
There are various methods of opening a hyperlink in another window or tab such as using javaScript, jQuery or HTML. For opening a hyperlink in another window or tab using HTML, use target attribute and provide it value _blank in the anchor tab.Syntax:
<a target="target_name" rel="relation_name" href="lin... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 26393,
"s": 26139,
"text": "There are various methods of opening a hyperlink in another window or tab such as using javaScript, jQuery or HTML. For opening a hyperlink in another window or ta... |
Toggling k-th bit of a number - GeeksforGeeks | 24 Nov, 2021
For a given number n, if k-th bit is 0, then toggle it to 1 and if it is 1 then, toggle it to 0.Examples :
Input : n = 5, k = 1
Output : 4
5 is represented as 101 in binary
and has its first bit 1, so toggling
it will result in 100 i.e. 4.
Input : n = 2, k = 3
Output : 6
Input : n = 75, k = 4
Output :... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 26386,
"s": 26277,
"text": "For a given number n, if k-th bit is 0, then toggle it to 1 and if it is 1 then, toggle it to 0.Examples : "
},
{
"code": null,
"e": 26588,
"s": 2... |
BigInteger valueOf() Method in Java - GeeksforGeeks | 29 Nov, 2019
The java.math.BigInteger.valueOf(long value) method returns a BigInteger whose value is equal to value of long passed as parameter. This method is static method so It is not necessary to create object of BigInteger class to use this method.we can call this function by BigInteger.valueOf(long value) code.
S... | [
{
"code": null,
"e": 25621,
"s": 25593,
"text": "\n29 Nov, 2019"
},
{
"code": null,
"e": 25927,
"s": 25621,
"text": "The java.math.BigInteger.valueOf(long value) method returns a BigInteger whose value is equal to value of long passed as parameter. This method is static method so... |
Python - Get summation of numbers in string list - GeeksforGeeks | 26 Jun, 2020
Sometimes, while working with data, we can have a problem in which we receive series of lists with data in string format, which we wish to accumulate as list. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using loop + int()This is the brute force method to perform this task. I... | [
{
"code": null,
"e": 26205,
"s": 26177,
"text": "\n26 Jun, 2020"
},
{
"code": null,
"e": 26428,
"s": 26205,
"text": "Sometimes, while working with data, we can have a problem in which we receive series of lists with data in string format, which we wish to accumulate as list. Let’... |
Design a Frosted Glass Effect using HTML and CSS - GeeksforGeeks | 11 Feb, 2021
In this article, we will implement a frosted glass effect using the bootstrap 4 card class. The below image is the final output that you will get as the final result of this article.
Approach:
1. Styling the body: Let’s first set the background for your webpage. Write the below code under your head tag ins... | [
{
"code": null,
"e": 26644,
"s": 26616,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 26827,
"s": 26644,
"text": "In this article, we will implement a frosted glass effect using the bootstrap 4 card class. The below image is the final output that you will get as the final resu... |
Output of C++ programs | Set 29 (Strings) - GeeksforGeeks | 12 Dec, 2021
Prerequisite: Strings
Question What is the Output?
CPP
#include <iostream>#include <cstring>using namespace std; int main(){ char s1[] = "geeksforgeeksforgeeks"; char s2 = 'f'; char *ptr = strchr( s1, s2); cout << ptr; return 0;}
Output:
forgeeksforgeeks
Description: strchr( str, c) retu... | [
{
"code": null,
"e": 25590,
"s": 25562,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 25614,
"s": 25590,
"text": "Prerequisite: Strings "
},
{
"code": null,
"e": 25644,
"s": 25614,
"text": "Question What is the Output? "
},
{
"code": null,
"e":... |
map::clear() in C++ STL - GeeksforGeeks | 20 Jan, 2018
Map is dictionary like data structure. It is an associative array of (key, value) pair, where only single value is associated with each unique key.
map::clear()clear() function is used to remove all the elements from the map container and thus leaving it’s size 0.
Syntax:
map1.clear()
where map1 is the nam... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n20 Jan, 2018"
},
{
"code": null,
"e": 25515,
"s": 25367,
"text": "Map is dictionary like data structure. It is an associative array of (key, value) pair, where only single value is associated with each unique key."
},
{
"... |
Binary numbers of N digits - GeeksforGeeks | 13 Jan, 2022
Given a positive integer number N. The task is to generate all the binary numbers of N digits. These binary numbers should be in ascending order.
Examples:
Input: 2Output:00011011Explanation: These 4 are the only binary numbers having 2 digits.
Input: 3Output:0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1
Approa... | [
{
"code": null,
"e": 26253,
"s": 26225,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 26399,
"s": 26253,
"text": "Given a positive integer number N. The task is to generate all the binary numbers of N digits. These binary numbers should be in ascending order."
},
{
"co... |
Step by Step JDBC Program 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 this tutorial, we are going to implement t... | [
{
"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,
... |
Data Visualization using Turicreate in Python - GeeksforGeeks | 20 Aug, 2020
In Machine Learning, Data Visualization is a very important phase. In order to correctly understand the behavior and features of your data one needs to visualize it perfectly. So here I am with my post on how to efficiently and at the same time easily visualize your data to extract most out of it.
Before ... | [
{
"code": null,
"e": 24127,
"s": 24099,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 24426,
"s": 24127,
"text": "In Machine Learning, Data Visualization is a very important phase. In order to correctly understand the behavior and features of your data one needs to visualize i... |
Tryit Editor v3.7 | Tryit: Height and width properties | [] |
Templates in C++ vs Generics in Java | Templates are the foundation of generic programming, which involves writing code in a way that is independent of any particular type.
A template is a blueprint or formula for creating a generic class or a function. The library containers like iterators and algorithms are examples of generic programming and have been de... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Templates are the foundation of generic programming, which involves writing code in a way that is independent of any particular type."
},
{
"code": null,
"e": 1414,
"s": 1196,
"text": "A template is a blueprint or formula for creatin... |
How to get the home directory in Python? | To get the homedir in python, you can use os.path.expanduser('~') from the os module. This also works if its a part of a longer path like ~/Documents/my_folder/. If there is no ~ in the path, the function will return the path unchanged. You can use it like −
import os
print(os.path.expanduser('~'))
You can also query t... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "To get the homedir in python, you can use os.path.expanduser('~') from the os module. This also works if its a part of a longer path like ~/Documents/my_folder/. If there is no ~ in the path, the function will return the path unchanged. You can use it l... |
ML | Raw and Central Moments - GeeksforGeeks | 26 Jul, 2019
Moments are a set of statistical parameters which are used to describe different characteristics and feature of a frequency distribution i.e. central tendency, dispersion, symmetry, and peakedness (hump) of the frequency curve.
For Ungrouped data i.e. discrete data, observations on a variable X are obtaine... | [
{
"code": null,
"e": 23959,
"s": 23931,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 24187,
"s": 23959,
"text": "Moments are a set of statistical parameters which are used to describe different characteristics and feature of a frequency distribution i.e. central tendency, dis... |
How to Create Text Stickers in Android? - GeeksforGeeks | 23 Feb, 2021
Not only a picture is worth a thousand words but also, they are cooler than monotonous text. In this article, we will learn how to create stickers from the TextView. This will be helpful if you are creating an app in which you want to add some text overlay functionality, for example, an image editing app. ... | [
{
"code": null,
"e": 24749,
"s": 24721,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25125,
"s": 24749,
"text": "Not only a picture is worth a thousand words but also, they are cooler than monotonous text. In this article, we will learn how to create stickers from the TextVie... |
Roadmap to Natural Language Processing (NLP) | by Pier Paolo Ippolito | Towards Data Science | 1
2
3
4
5
6
7
8
9
10
Powered by Play.ht
Create audio with Play.ht
Create Audio Narrations with Play.ht
Due to the development of Big Data during the last decade. organizations are now faced with analysing large amounts of data coming from a wide variety of sources on a daily basis.
Natural Language Processing (NLP) is ... | [
{
"code": null,
"e": 174,
"s": 172,
"text": "1"
},
{
"code": null,
"e": 176,
"s": 174,
"text": "2"
},
{
"code": null,
"e": 178,
"s": 176,
"text": "3"
},
{
"code": null,
"e": 180,
"s": 178,
"text": "4"
},
{
"code": null,
"e": 182... |
Explain difference between == and is operator in Python. | == operator compares the operands by checking the equality of values of objects.
is operator compares the operands by checking the objects to be the same or not.
Following is the program in Python to showcase the difference.
Live Demo
list1 = [1]
list2 = [1]
list3 = list1
print(id(list1))
print(id(list2))
if (list1 ... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "== operator compares the operands by checking the equality of values of objects."
},
{
"code": null,
"e": 1224,
"s": 1143,
"text": "is operator compares the operands by checking the objects to be the same or not."
},
{
"code"... |
How to access elements from an array in C#? | First, define and initalize an array −
int[] p = new int[3] {99, 92, 95};
Now, display the array elements −
for (j = 0; j < 3; j++ ) {
Console.WriteLine("Price of Product[{0}] = {1}", j, p[j]);
}
To acess any element, just include the index of the element you want like this −
p[2];
The above is to acess the 3rd elem... | [
{
"code": null,
"e": 1101,
"s": 1062,
"text": "First, define and initalize an array −"
},
{
"code": null,
"e": 1136,
"s": 1101,
"text": "int[] p = new int[3] {99, 92, 95};"
},
{
"code": null,
"e": 1170,
"s": 1136,
"text": "Now, display the array elements −"
... |
Array.LastIndexOf() Method in C# | The Array.LastIndexOf() method in C# is used to search for the specified object and returns the index of the last occurrence within the entire one-dimensional Array.
public static int LastIndexOf (Array arr, object val);
Above, arr is the one-dimensional Array to search, whereas val is the object to locate in arr.
Liv... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "The Array.LastIndexOf() method in C# is used to search for the specified object and returns the index of the last occurrence within the entire one-dimensional Array."
},
{
"code": null,
"e": 1283,
"s": 1228,
"text": "public static in... |
HTML5 - Quick Guide | HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.
HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).... | [
{
"code": null,
"e": 2793,
"s": 2608,
"text": "HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web."
},
{
"code": null,
"e": 2929,
"s": 2793,
"text"... |
Print the pattern | Practice | GeeksforGeeks | Write a program that receives a number n as input and prints it in the following format as shown below.
Like for n = 2 the pattern will be:
1*2*5*6
--3*4
Example 1:
Input: n = 3
Output:
1*2*3*10*11*12
--4*5*8*9
----6*7
Explaination: If the pattern shown in question
is followed, this will be the output.
Your Task:
You... | [
{
"code": null,
"e": 380,
"s": 226,
"text": "Write a program that receives a number n as input and prints it in the following format as shown below.\nLike for n = 2 the pattern will be:\n1*2*5*6\n--3*4"
},
{
"code": null,
"e": 391,
"s": 380,
"text": "Example 1:"
},
{
"cod... |
ISRO | ISRO CS 2016 | Question 49 - GeeksforGeeks | 27 Mar, 2018
Consider the join of a relation R , with a relation S . If R has m number of tuples and S has n number of tuples then the maximum and minimum sizes of the join respectively are:(A) m + n & 0(B) mn & 0(C) m + n & | m – n |(D) mn & m + nAnswer: (B)Explanation: Consider the folloewing examples:
Case 1: Maximu... | [
{
"code": null,
"e": 24151,
"s": 24123,
"text": "\n27 Mar, 2018"
},
{
"code": null,
"e": 24444,
"s": 24151,
"text": "Consider the join of a relation R , with a relation S . If R has m number of tuples and S has n number of tuples then the maximum and minimum sizes of the join res... |
Algorithms | Recursion | Question 2 - GeeksforGeeks | 28 Jun, 2021
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)
int fun(int x, int y) { if (x == 0) return y; return fun(x - 1, x + y);}
(A) 13(B) 12(C) 9(D) 10Answer: (A)Explanation: The function fun() calculates and returns ((1 + 2 ... + x-1 + x) +y) which is x(x+1)/2 + y.Quiz ... | [
{
"code": null,
"e": 24988,
"s": 24960,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25072,
"s": 24988,
"text": "Consider the following recursive function fun(x, y). What is the value of fun(4, 3)"
},
{
"code": "int fun(int x, int y) { if (x == 0) return y; retur... |
Machine Learning and Music Classification: A Content-Based Filtering Approach | by Brian Srebrenik | Towards Data Science | In my previous blog post, Introduction to Music Recommendation and Machine Learning, I discussed the two methods for music recommender systems, Content-Based Filtering and Collaborative Filtering. The collaborative filtering approach involved recommending music based on user listening history, while the content-based a... | [
{
"code": null,
"e": 826,
"s": 172,
"text": "In my previous blog post, Introduction to Music Recommendation and Machine Learning, I discussed the two methods for music recommender systems, Content-Based Filtering and Collaborative Filtering. The collaborative filtering approach involved recommending... |
Function call by reference in Objective-C | The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. This means that changes made to the parameter affect the passed argument.
To pass the value by reference, ... | [
{
"code": null,
"e": 2848,
"s": 2560,
"text": "The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. This means that changes made to the par... |
How to check if a python module exists without importing it? | To check if you can import something in Python 2, you can use imp module with try...except. For example,
import imp
try:
imp.find_module('eggs')
found = True
except ImportError:
found = False
print found
This will give you the output:
False
You can also use iter_modules from the pkgutil module to iterate ov... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To check if you can import something in Python 2, you can use imp module with try...except. For example,"
},
{
"code": null,
"e": 1278,
"s": 1167,
"text": "import imp\ntry:\n imp.find_module('eggs')\n found = True\nexcept Impor... |
How to select a random element from a C# list? | Firstly, set a list in C#.
var list = new List<string>{ "one","two","three","four"};
Now get the count of the elements and display randomly.
int index = random.Next(list.Count);
Console.WriteLine(list[index]);
To select a random element from a list in C#, try to run the following code −
Live Demo
using System;
using S... | [
{
"code": null,
"e": 1089,
"s": 1062,
"text": "Firstly, set a list in C#."
},
{
"code": null,
"e": 1147,
"s": 1089,
"text": "var list = new List<string>{ \"one\",\"two\",\"three\",\"four\"};"
},
{
"code": null,
"e": 1203,
"s": 1147,
"text": "Now get the count ... |
Style select options with CSS | To style the options in <select>, you can try to run the following code,
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
select {
width: 100%;
padding: 10px 15px;
border: 1px dashed blue;
border-radius: 4px;
background-color: orange;
... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To style the options in <select>, you can try to run the following code,"
},
{
"code": null,
"e": 1145,
"s": 1135,
"text": "Live Demo"
},
{
"code": null,
"e": 1762,
"s": 1145,
"text": "<!DOCTYPE html>\n<html>\n ... |
Cucumber - Command Line Options | Cucumber can be used to test almost any computer system. So far we have seen how to run a test using Eclipse IDE. There is one more way through which we can run the Cucumber test that is through command line interface. So what is the advantage of doing it?
Running any test framework from the Terminal has its own advant... | [
{
"code": null,
"e": 2219,
"s": 1962,
"text": "Cucumber can be used to test almost any computer system. So far we have seen how to run a test using Eclipse IDE. There is one more way through which we can run the Cucumber test that is through command line interface. So what is the advantage of doing ... |
Count of nodes in a given N-ary tree having distance to all leaf nodes equal in their subtree - GeeksforGeeks | 11 Jan, 2022
Given an N-ary tree root, the task is to find the number of non-leaf nodes in the tree such that all the leaf nodes in the subtree of the current node are at an equal distance from the current node.
Example:
Input: Tree in the below imageOutput: 4Explanation: The nodes {10, 3, 2, 4} have the distance betwe... | [
{
"code": null,
"e": 24523,
"s": 24495,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 24722,
"s": 24523,
"text": "Given an N-ary tree root, the task is to find the number of non-leaf nodes in the tree such that all the leaf nodes in the subtree of the current node are at an eq... |
Pandas Cheat Sheet. How to us Pandas in Python | by Jason Lee | Towards Data Science | Towards Data Science | 10,000 hour rule for mastering a skill
In his famous book Outliers, Malcolm Gladwell once said that one would need to dedicate 10,000 hours to be a true master of any skill. The idea behind this was Practice makes Perfect, another popular saying that has been engraved in some people’s minds.
While I certainly agree tha... | [
{
"code": null,
"e": 210,
"s": 171,
"text": "10,000 hour rule for mastering a skill"
},
{
"code": null,
"e": 464,
"s": 210,
"text": "In his famous book Outliers, Malcolm Gladwell once said that one would need to dedicate 10,000 hours to be a true master of any skill. The idea beh... |
Tryit Editor v3.7 | Tryit: HTML header element | [] |
Bit Tricks for Competitive Programming - GeeksforGeeks | 29 Dec, 2021
In competitive programming or in general some problems seems difficult but can be solved very easily with little bit magic. We have discussed some tricks in below previous post.Bitwise Hacks for Competitive ProgrammingWe have considered below facts in this article –
0 based indexing of bits from right to... | [
{
"code": null,
"e": 26063,
"s": 26035,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 26332,
"s": 26063,
"text": "In competitive programming or in general some problems seems difficult but can be solved very easily with little bit magic. We have discussed some tricks in below ... |
\mathord - Tex Command | \mathord - forces the argument to be treated in the 'ordinary' class.
{ \mathord #1}
\mathord command is used to force the argument to be treated in the 'ordinary' class.
a+b+c
a+b+c
a\mathord{+}b\mathord{+}c
a+b+c
1,234,567
1,234,567
1\mathord{,}234{,}567
1,234,567
a+b+c
a+b+c
a+b+c
a\mathord{+}b\math... | [
{
"code": null,
"e": 8056,
"s": 7986,
"text": "\\mathord - forces the argument to be treated in the 'ordinary' class."
},
{
"code": null,
"e": 8071,
"s": 8056,
"text": "{ \\mathord #1}"
},
{
"code": null,
"e": 8157,
"s": 8071,
"text": "\\mathord command is use... |
Facial Expression Recognizer using FER - Using Deep Neural Net - GeeksforGeeks | 21 Sep, 2021
In our daily life, we knowingly or unknowingly carry out different types of Facial Expressions. These movements convey the emotional state of humans.
We can judge the mood and mental state of the next person by his Facial Expression. In the early Twentieth century, Ekman and Friesen defined `six` basic emo... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 24494,
"s": 24344,
"text": "In our daily life, we knowingly or unknowingly carry out different types of Facial Expressions. These movements convey the emotional state of humans."
},
{
... |
Java for Keyword | ❮ Java Keywords
Print the numbers 0 to 4:
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
Try it Yourself »
The for loop loops through a block of code a number of times.
From the example above:
Statement 1 sets a variable before the loop starts (int i = 0).
Statement 2 defines the condition for the loop to... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "\n❮ Java Keywords\n"
},
{
"code": null,
"e": 44,
"s": 18,
"text": "Print the numbers 0 to 4:"
},
{
"code": null,
"e": 102,
"s": 44,
"text": "for (int i = 0; i < 5; i++) {\n System.out.println(i);\n}\n"
},
{
"c... |
Tweedie Loss Function. A loss function for data with massive... | by Wenbo Shi | Towards Data Science | Nowadays, it is not uncommon to observe data with right-skewed distribution and long tail, e.g., data from e-commerce website, Ads click & purchase, insurance claim, etc.
Under this circumstance, prediction models may not be well trained if loss functions for other distributions (e.g., MSE for Gaussian distributions) a... | [
{
"code": null,
"e": 218,
"s": 47,
"text": "Nowadays, it is not uncommon to observe data with right-skewed distribution and long tail, e.g., data from e-commerce website, Ads click & purchase, insurance claim, etc."
},
{
"code": null,
"e": 518,
"s": 218,
"text": "Under this circu... |
MySQL Tryit Editor v1.0 | SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now ... | [
{
"code": null,
"e": 34,
"s": 0,
"text": "SELECT COUNT(CustomerID), Country"
},
{
"code": null,
"e": 49,
"s": 34,
"text": "FROM Customers"
},
{
"code": null,
"e": 67,
"s": 49,
"text": "GROUP BY Country;"
},
{
"code": null,
"e": 69,
"s": 67,
... |
Python Bokeh - Plotting Squares on a Graph - GeeksforGeeks | 10 Jul, 2020
Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.
Bokeh can be used to plot squares on a graph. Plotting squares on ... | [
{
"code": null,
"e": 25492,
"s": 25464,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 25733,
"s": 25492,
"text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant... |
Reading and Writing CSV File using Python | CSV (stands for comma separated values) format is a commonly used data format used by spreadsheets. The csv module in Python’s standard library presents classes and methods to perform read/write operations on CSV files.
This function in csv module returns a writer object that converts data into a delimited string and s... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "CSV (stands for comma separated values) format is a commonly used data format used by spreadsheets. The csv module in Python’s standard library presents classes and methods to perform read/write operations on CSV files."
},
{
"code": null,
"... |
Change the font size of a button with CSS | To change the font size of a button, use the font-size property.
You can try to run the following code to change the font size
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: yellow;
color: black;
text-align: center;
font-size... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "To change the font size of a button, use the font-size property."
},
{
"code": null,
"e": 1189,
"s": 1127,
"text": "You can try to run the following code to change the font size"
},
{
"code": null,
"e": 1199,
"s": 118... |
Increase and decrease the brightness of an image in MATLAB - GeeksforGeeks | 22 Sep, 2021
The degree of the illuminance of the image is called brightness. How much light is coming out of an object defines the brightness of that object. If an object is placed in a dark room then very less light will be emitted by that object thus we can’t see the object properly. Now, what do we mean by brightne... | [
{
"code": null,
"e": 25997,
"s": 25969,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 26576,
"s": 25997,
"text": "The degree of the illuminance of the image is called brightness. How much light is coming out of an object defines the brightness of that object. If an object is p... |
Delete every Kth node from circular linked list - GeeksforGeeks | 11 Feb, 2022
Delete every kth node from a circular linked list until only one node is left. Also, print the intermediate lists.
Examples:
Input : n=4, k=2, list = 1->2->3->4
Output :
1->2->3->4->1
1->2->4->1
2->4->2
2->2
Input : n=9, k=4, list = 1->2->3->4->5->6->7->8->9
Output :
1->2->3->4->5->6->7->8->9->1
1->2->... | [
{
"code": null,
"e": 26495,
"s": 26467,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 26610,
"s": 26495,
"text": "Delete every kth node from a circular linked list until only one node is left. Also, print the intermediate lists."
},
{
"code": null,
"e": 26622,
... |
Destructors in C# - GeeksforGeeks | 01 Feb, 2019
Destructors in C# are methods inside the class used to destroy instances of that class when they are no longer needed. The Destructor is called implicitly by the .NET Framework’s Garbage collector and therefore programmer has no control as when to invoke the destructor. An instance variable or an object is... | [
{
"code": null,
"e": 25700,
"s": 25672,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 26065,
"s": 25700,
"text": "Destructors in C# are methods inside the class used to destroy instances of that class when they are no longer needed. The Destructor is called implicitly by the .... |
Residual Networks (ResNet) - Deep Learning - GeeksforGeeks | 27 Jan, 2022
After the first CNN-based architecture (AlexNet) that win the ImageNet 2012 competition, Every subsequent winning architecture uses more layers in a deep neural network to reduce the error rate. This works for less number of layers, but when we increase the number of layers, there is a common problem in de... | [
{
"code": null,
"e": 24790,
"s": 24762,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 25310,
"s": 24790,
"text": "After the first CNN-based architecture (AlexNet) that win the ImageNet 2012 competition, Every subsequent winning architecture uses more layers in a deep neural ne... |
Angular Highcharts - Quick Guide | HighChart Angular Wrapper is a open source angular based component to provides an elegant and feature rich Highcharts visualizations within an Angular application and can be used along with Angular components seamlessly. There are chapters discussing all the basic components of Highcharts with suitable examples within ... | [
{
"code": null,
"e": 2378,
"s": 2035,
"text": "HighChart Angular Wrapper is a open source angular based component to provides an elegant and feature rich Highcharts visualizations within an Angular application and can be used along with Angular components seamlessly. There are chapters discussing al... |
Automated File Organizer using Tkinter in Python - GeeksforGeeks | 27 Dec, 2021
Prerequisites: Tkinter
File organization is helpful when you are trying to find a specific one in a pool of files and directories. It seems time-consuming and exhausting to check each file. In cases where the number of files are way too many and you have no idea where to find it exactly, file organization ... | [
{
"code": null,
"e": 25879,
"s": 25851,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 25902,
"s": 25879,
"text": "Prerequisites: Tkinter"
},
{
"code": null,
"e": 26200,
"s": 25902,
"text": "File organization is helpful when you are trying to find a specific... |
Fill empty column - Pandas - GeeksforGeeks | 25 Feb, 2021
Sometimes the dataframe contains an empty column and may pose a real problem in the real life scenario. Missing Data can also refer to as NA(Not Available) values in pandas. In DataFrame sometimes many datasets simply arrive with missing data, either because it exists and was not collected or it never exis... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 24604,
"s": 24212,
"text": "Sometimes the dataframe contains an empty column and may pose a real problem in the real life scenario. Missing Data can also refer to as NA(Not Available) values ... |
XOR Linked List | Practice | GeeksforGeeks | An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory efficient version of Doubly Linked List can be created using only one space for address field with every node. This memory efficient Doubly Linked List is called XOR Linked List or Memory Eff... | [
{
"code": null,
"e": 1078,
"s": 238,
"text": "An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory efficient version of Doubly Linked List can be created using only one space for address field with every node. This memory ef... |
HTML | <table> bgcolor Attribute - GeeksforGeeks | 09 Mar, 2022
The HTML <table> bgcolor Attribute is use to specify the background color of a table.Syntax:
<table bgcolor="color_name | hex_number | rgb_number">
Attribute Values:
color_name: It sets the text color by using the color name. For example “red”.
hex_number: It sets the text color by using the color hex ... | [
{
"code": null,
"e": 25609,
"s": 25581,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 25704,
"s": 25609,
"text": "The HTML <table> bgcolor Attribute is use to specify the background color of a table.Syntax: "
},
{
"code": null,
"e": 25759,
"s": 25704,
"tex... |
Go Arrays | Arrays are used to store multiple values of the same type in a single variable, instead of declaring separate variables for each value.
In Go, there are two ways to declare an array:
Note: The length specifies the number of elements
to store in the array. In Go, arrays have a fixed length. The length of the
array... | [
{
"code": null,
"e": 136,
"s": 0,
"text": "Arrays are used to store multiple values of the same type in a single variable, instead of declaring separate variables for each value."
},
{
"code": null,
"e": 183,
"s": 136,
"text": "In Go, there are two ways to declare an array:"
},... |
CSS - margin-left | The margin-left property sets the width of the margin on the left of an element.
length − Any length value.
length − Any length value.
percentage − The margin's width is calculated with respect to the width of the element's containing block.
percentage − The margin's width is calculated with respect to the width of the... | [
{
"code": null,
"e": 2707,
"s": 2626,
"text": "The margin-left property sets the width of the margin on the left of an element."
},
{
"code": null,
"e": 2734,
"s": 2707,
"text": "length − Any length value."
},
{
"code": null,
"e": 2761,
"s": 2734,
"text": "len... |
C library function - ldiv() | The C library function div_t div(long int numer, long int denom) divides numer (numerator) by denom (denominator).
Following is the declaration for ldiv() function.
div_t div(long int numer, long int denom)
numer − This is the numerator.
numer − This is the numerator.
denom − This is the denominator.
denom − This is th... | [
{
"code": null,
"e": 2122,
"s": 2007,
"text": "The C library function div_t div(long int numer, long int denom) divides numer (numerator) by denom (denominator)."
},
{
"code": null,
"e": 2172,
"s": 2122,
"text": "Following is the declaration for ldiv() function."
},
{
"co... |
Changing One Clock Time to Other Time in Minimum Number of Operations - GeeksforGeeks | 23 Oct, 2020
Given two clock times (in HH:MM:SS format), change one time to other time in minimum number of operations. Here one operation is meant by shifting the hour, minute or second clock hand by 1 unit in either directions. The program follows all the basic rules of a clock for eg.: changing second’s hand from 59... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 24642,
"s": 24232,
"text": "Given two clock times (in HH:MM:SS format), change one time to other time in minimum number of operations. Here one operation is meant by shifting the hour, minute... |
GATE | GATE CS 2013 | Question 65 - GeeksforGeeks | 11 Oct, 2021
What is the logical translation of the following statement?
"None of my friends are perfect."
(A) A(B) B(C) C(D) DAnswer: (D)Explanation:
F(x) ==> x is my friend
P(x) ==> x is perfect
D is the correct answer.
A. There exist some friends which are not perfect
B. There are some people who are not my f... | [
{
"code": null,
"e": 24414,
"s": 24386,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24474,
"s": 24414,
"text": "What is the logical translation of the following statement?"
},
{
"code": null,
"e": 24511,
"s": 24474,
"text": " \"None of my friends are per... |
C/C++ Ternary Operator | Syntax of ternary operator is −
(expression-1) ? expression-2 : expression-3
This operator returns one of two values depending on the result of an expression. If "expression-1" is evaluated to Boolean true, then expression-2 is evaluated and its value is returned as a final result otherwise expression-3 is evaluated an... | [
{
"code": null,
"e": 1094,
"s": 1062,
"text": "Syntax of ternary operator is −"
},
{
"code": null,
"e": 1139,
"s": 1094,
"text": "(expression-1) ? expression-2 : expression-3"
},
{
"code": null,
"e": 1425,
"s": 1139,
"text": "This operator returns one of two v... |
Flutter - Using Nested Models and Providers - GeeksforGeeks | 24 Jan, 2021
The provider is a simple state management technique that is used for managing a piece of data around the app. It is basically a wrapper around inherited widgets but it is easy to understand and manage.
Before going ahead we have to understand some concepts in provider –
ChangeNotifier: It is basically a si... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 24212,
"s": 24010,
"text": "The provider is a simple state management technique that is used for managing a piece of data around the app. It is basically a wrapper around inherited widgets bu... |
C Program for n-th odd number | Given a number N we have to find the N-th odd number.
Odd numbers are the numbers which are not completely divided by 2 and their remainder is not zero. Like 1, 3, 5, 7, 9,....
If we closely observe the list of even numbers we can also represent them as
(2*1)-1=1, (2*2)-1=3,( 2*3)-1=5, (2*4)-1=7,....(2*N)-1.
So, to sol... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "Given a number N we have to find the N-th odd number."
},
{
"code": null,
"e": 1239,
"s": 1116,
"text": "Odd numbers are the numbers which are not completely divided by 2 and their remainder is not zero. Like 1, 3, 5, 7, 9,...."
},... |
Swift - Arrays | Swift 4 arrays are used to store ordered lists of values of the same type. Swift 4 puts strict checking which does not allow you to enter a wrong type in an array, even by mistake.
If you assign a created array to a variable, then it is always mutable, which means you can change it by adding, removing, or changing its ... | [
{
"code": null,
"e": 2434,
"s": 2253,
"text": "Swift 4 arrays are used to store ordered lists of values of the same type. Swift 4 puts strict checking which does not allow you to enter a wrong type in an array, even by mistake."
},
{
"code": null,
"e": 2697,
"s": 2434,
"text": "I... |
Sorting a HashMap according to values in Java | As we know that Hash map in Java does not maintain insertion order either by key or by order.Also it does not maintain any other order while adding entries to it.
Now in order to sort a hash map according to the values mapped to its corresponding keys we first need to get all values of map considering that hash map has... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "As we know that Hash map in Java does not maintain insertion order either by key or by order.Also it does not maintain any other order while adding entries to it."
},
{
"code": null,
"e": 1507,
"s": 1225,
"text": "Now in order to sor... |
Python 3 - Tkinter Scrollbar | This widget provides a slide controller that is used to implement vertical scrolled widgets, such as Listbox, Text and Canvas. Note that you can also create horizontal scrollbars on Entry widgets.
Here is the simple syntax to create this widget −
w = Scrollbar ( master, option, ... )
master − This represents the pare... | [
{
"code": null,
"e": 2537,
"s": 2340,
"text": "This widget provides a slide controller that is used to implement vertical scrolled widgets, such as Listbox, Text and Canvas. Note that you can also create horizontal scrollbars on Entry widgets."
},
{
"code": null,
"e": 2587,
"s": 2537... |
How to Cluster Data!. A guide to Unsupervised Machine... | by Mubarak Ganiyu | Towards Data Science | When working on data science projects, data scientists often encounter datasets that have unlabeled data points. Therefore, making it hard to derive insightful knowledge that can be used to model the behavior of the data. In order to make sense out of senseless data, unsupervised machine learning techniques are deploye... | [
{
"code": null,
"e": 460,
"s": 46,
"text": "When working on data science projects, data scientists often encounter datasets that have unlabeled data points. Therefore, making it hard to derive insightful knowledge that can be used to model the behavior of the data. In order to make sense out of sens... |
JavaScript | RegExp g Modifier - GeeksforGeeks | 22 Apr, 2019
The RegExp g Modifier in JavaScript is used to find all the occurrences of the pattern instead of stopping after the first match i.e it performs global match.
Syntax:
/regexp/g
or
new RegExp("regexp", "g")
Example 1: This example searches the word “geeks” in the whole string.
<!DOCTYPE html><html> <head>... | [
{
"code": null,
"e": 24542,
"s": 24514,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 24701,
"s": 24542,
"text": "The RegExp g Modifier in JavaScript is used to find all the occurrences of the pattern instead of stopping after the first match i.e it performs global match."
}... |
Apply a function to single or selected columns or rows in Pandas Dataframe - GeeksforGeeks | 03 Jul, 2020
In this article, we will learn different ways to apply a function to single or selected columns or rows in Dataframe. We will use Dataframe/series.apply() method to apply a function.
Syntax: Dataframe/series.apply(func, convert_dtype=True, args=())
Parameters: This method will take following parameters :fu... | [
{
"code": null,
"e": 25188,
"s": 25160,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25371,
"s": 25188,
"text": "In this article, we will learn different ways to apply a function to single or selected columns or rows in Dataframe. We will use Dataframe/series.apply() method t... |
Find final value if we double after every successful search in array - GeeksforGeeks | 05 Apr, 2022
Given an array and an integer k, traverse the array and if the element in array is k, double the value of k and continue traversal. In the end return value of k.Examples:
Input : arr[] = { 2, 3, 4, 10, 8, 1 }, k = 2
Output: 16
Explanation:
First k = 2 is found, then we search for 4
which is also found, th... | [
{
"code": null,
"e": 26342,
"s": 26314,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 26514,
"s": 26342,
"text": "Given an array and an integer k, traverse the array and if the element in array is k, double the value of k and continue traversal. In the end return value of k.Ex... |
Deploy Python Tesseract OCR on Heroku | by Shirish Gupta | Towards Data Science | Having worked in Data Science for almost half a decade now, I have realised that many of us specialise and emphasise on improving algorithms’ accuracy rather than concentrate on its usability in real life. This generally leads to a difference in expectation management between the business and the data science teams. An... | [
{
"code": null,
"e": 727,
"s": 171,
"text": "Having worked in Data Science for almost half a decade now, I have realised that many of us specialise and emphasise on improving algorithms’ accuracy rather than concentrate on its usability in real life. This generally leads to a difference in expectati... |
DAX Text - MID function | Returns a string of characters from the middle of a text string, given a starting position and length.
MID (<text>, <start_num>, <num_chars>)
text
The text string from which you want to extract the characters, or a column that contains text.
start_num
A whole number representing the position of the first character yo... | [
{
"code": null,
"e": 2104,
"s": 2001,
"text": "Returns a string of characters from the middle of a text string, given a starting position and length."
},
{
"code": null,
"e": 2145,
"s": 2104,
"text": "MID (<text>, <start_num>, <num_chars>) \n"
},
{
"code": null,
"e": ... |
How to part DATE and TIME from DATETIME in MySQL? | To part DATE and TIME from DATETIME, you can use the DATE_FORMAT() method from MySQL. The syntax is as follows −
SELECT DATE_FORMAT(yourColumnName, '%Y-%m-%d') VariableName, DATE_FORMAT(yourColumnName,'%H:%i:%s') VariableName from yourTableName;
To understand the above method DATE_FORMAT(), let us create a table with d... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "To part DATE and TIME from DATETIME, you can use the DATE_FORMAT() method from MySQL. The syntax is as follows −"
},
{
"code": null,
"e": 1308,
"s": 1175,
"text": "SELECT DATE_FORMAT(yourColumnName, '%Y-%m-%d') VariableName, DATE_FOR... |
A quick and dirty guide to visualization in Plotly for Python | by Anup Sebastian | Towards Data Science | There are endless options to create plots in Python, but one of the libraries that I have started to gravitate towards is Plotly. It is a solid option to create beautiful and presentable plots easily within your Jupyter workflow. It has vast selection of customizable plots that you can use for your visualizations (the ... | [
{
"code": null,
"e": 528,
"s": 172,
"text": "There are endless options to create plots in Python, but one of the libraries that I have started to gravitate towards is Plotly. It is a solid option to create beautiful and presentable plots easily within your Jupyter workflow. It has vast selection of ... |
Returning multiple values from a function using Tuple and Pair in C++ | In C or C++, we cannot return more than one value from a function. To return multiple values, we have to provide output parameter with the function. Here we will see another approach to return multiple value from a function using tuple and pair STL in C++.
The Tuple is an object capable to hold a collection of elements... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "In C or C++, we cannot return more than one value from a function. To return multiple values, we have to provide output parameter with the function. Here we will see another approach to return multiple value from a function using tuple and pair STL in C... |
Part of Speech Tagging with Hidden Markov Chain Models | by Susan Li | Towards Data Science | Part of Speech Tagging (POS) is a process of tagging sentences with part of speech such as nouns, verbs, adjectives and adverbs, etc.
Hidden Markov Models (HMM) is a simple concept which can explain most complicated real time processes such as speech recognition and speech generation, machine translation, gene recognit... | [
{
"code": null,
"e": 306,
"s": 172,
"text": "Part of Speech Tagging (POS) is a process of tagging sentences with part of speech such as nouns, verbs, adjectives and adverbs, etc."
},
{
"code": null,
"e": 577,
"s": 306,
"text": "Hidden Markov Models (HMM) is a simple concept which... |
C# Program to create a Simple Thread | To create a thread, I have created a function −
public void myThread() {
for (int i = 0; i < 3; i++) {
Console.WriteLine("My Thread");
}
}
The above function is called to create a thread and a new ThreadStart delegate is created −
Demo d = new Demo();
Thread thread = new Thread(new ThreadStart(d.myThread));... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "To create a thread, I have created a function −"
},
{
"code": null,
"e": 1213,
"s": 1110,
"text": "public void myThread() {\n for (int i = 0; i < 3; i++) {\n Console.WriteLine(\"My Thread\");\n }\n}"
},
{
"code": nul... |
Predicting House Prices with Regression Machine Learning Model | Col Jung | Towards Data Science | Property valuation is an imprecise science. Individual appraisers and valuers bring their own experience, metrics and skills to a job. Consistency is difficult, with UK and Australian-based studies suggesting valuations between two professionals can differ by up to 40%. Crikey!
Perhaps a well-trained machine could perf... | [
{
"code": null,
"e": 451,
"s": 172,
"text": "Property valuation is an imprecise science. Individual appraisers and valuers bring their own experience, metrics and skills to a job. Consistency is difficult, with UK and Australian-based studies suggesting valuations between two professionals can diffe... |
How do I verify that an element does not exist in Selenium 2? | We can verify if an element does not exist in Selenium webdriver. To achieve this, we shall use the method getPageSource which gets the entire page source. So we can obtain a complete page source and check if the text of the element exists.
We also use the findElements method and utilize any locators like xpath, CSS, a... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "We can verify if an element does not exist in Selenium webdriver. To achieve this, we shall use the method getPageSource which gets the entire page source. So we can obtain a complete page source and check if the text of the element exists."
},
{
... |
Bulma | Icon - GeeksforGeeks | 04 Oct, 2021
Bulma is a free and open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design. The icon is a kind of square container that reserves space for the icon font. Bulma is compatible with all icon ... | [
{
"code": null,
"e": 26108,
"s": 26080,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 26541,
"s": 26108,
"text": "Bulma is a free and open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses c... |
Hiding Sensitive Information in Python | Drew Seewald | Towards Data Science | In a previous post, I left a Discord token in the script. This is not the ideal way to code, especially if I don’t want to regenerate my tokens every time I share code. Using credentials and API tokens in your data science and programming projects is inevitable, but leaving them exposed is avoidable. Using the dotenv p... | [
{
"code": null,
"e": 578,
"s": 172,
"text": "In a previous post, I left a Discord token in the script. This is not the ideal way to code, especially if I don’t want to regenerate my tokens every time I share code. Using credentials and API tokens in your data science and programming projects is inev... |
Python VLC Instance – Setting Application Name | 29 Aug, 2020
In this article we will see how we can set the application name from the Instance class in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Instance act as a main object of the VLC l... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 589,
"s": 28,
"text": "In this article we will see how we can set the application name from the Instance class in the python vlc module. VLC media player is a free and open-source portable cross-pla... |
What is isELIgnored Attribute in JSP? | The isELIgnored attribute gives you the ability to disable the evaluation of Expression Language (EL) expressions which has been introduced in JSP 2.0.
The default value of the attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification. If the attribute is set to false, then... | [
{
"code": null,
"e": 1339,
"s": 1187,
"text": "The isELIgnored attribute gives you the ability to disable the evaluation of Expression Language (EL) expressions which has been introduced in JSP 2.0."
},
{
"code": null,
"e": 1573,
"s": 1339,
"text": "The default value of the attri... |
Python – Remove words containing list characters | 01 Mar, 2020
Sometimes, in the process of data filtering we have a problem in which we need to remove words which are composite of certain letters. This kind of application is common in data science domain. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using all() + list comprehensionThe c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Mar, 2020"
},
{
"code": null,
"e": 310,
"s": 52,
"text": "Sometimes, in the process of data filtering we have a problem in which we need to remove words which are composite of certain letters. This kind of application is common in d... |
Multidimensional Arrays in Scala | 10 Mar, 2019
Multidimensional Array is basically an array storing the data in matrix format. For, matrices and table we need multidimensional array. We can create multidimensional array by using Array.ofDim and Array of Array method. Syntax
val arrayname = Array.ofDim[data_type](number of rows, number of cols)orvar arr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Mar, 2019"
},
{
"code": null,
"e": 256,
"s": 28,
"text": "Multidimensional Array is basically an array storing the data in matrix format. For, matrices and table we need multidimensional array. We can create multidimensional array by... |
Bokeh – grid layout of plots | 15 Nov, 2021
Bokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive dashboards or data applications. The layout functions let you build a grid of plots and widgets. You can nest as many rows, columns, or grids of plots together a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 494,
"s": 28,
"text": "Bokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive dashboards or data applicatio... |
Java Identifiers | 10 Mar, 2022
In programming languages, identifiers are used for identification purposes. In Java, an identifier can be a class name, method name, variable name, or label. For example :
public class Test
{
public static void main(String[] args)
{
int a = 20;
}
}
In the above java code, we have 5 ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 226,
"s": 52,
"text": "In programming languages, identifiers are used for identification purposes. In Java, an identifier can be a class name, method name, variable name, or label. For example : "... |
Introduction of MAC Address in Computer Network | 03 Jun, 2022
In order to communicate or transfer the data from one computer to another computer, we need some address. In Computer Network various types of addresses are introduced; each works at a different layer. Media Access Control Address is a physical address that works at the Data Link Layer. In this article, we... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 420,
"s": 54,
"text": "In order to communicate or transfer the data from one computer to another computer, we need some address. In Computer Network various types of addresses are introduced; each ... |
Throwable getCause() method in Java with Examples | 06 Feb, 2019
The getCause() method of Throwable class is the inbuilt method used to return the cause of this throwable or null if cause can’t be determined for the Exception occurred. This method help to get the cause that was supplied by one of the constructors or that was set after creation with the initCause(Throwab... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Feb, 2019"
},
{
"code": null,
"e": 581,
"s": 28,
"text": "The getCause() method of Throwable class is the inbuilt method used to return the cause of this throwable or null if cause can’t be determined for the Exception occurred. This... |
Switch Case in JavaScript | 20 Jun, 2022
We have learned about decision-making in JavaScript using if-else statements in our previous article on if-else statements in JavaScript. We have seen in our previous article that we can use the if-else statements to perform actions based on some particular condition. That is if a condition is true then pe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 1071,
"s": 52,
"text": "We have learned about decision-making in JavaScript using if-else statements in our previous article on if-else statements in JavaScript. We have seen in our previous articl... |
How to rename a username in MongoDB? | To rename a user, you need to use update() and $set to set the new username. Following is the syntax −
db.system.users.update({"user":"yourOldUserName"}, {$set:{"user":"yourNewUserName"}});
Firstly, display all the users from the MongoDB database −
> use admin;
switched to db admin
> db.getUsers();
This will produce t... | [
{
"code": null,
"e": 1290,
"s": 1187,
"text": "To rename a user, you need to use update() and $set to set the new username. Following is the syntax −"
},
{
"code": null,
"e": 1377,
"s": 1290,
"text": "db.system.users.update({\"user\":\"yourOldUserName\"}, {$set:{\"user\":\"yourNe... |
Strikethrough Text in Android | 30 Apr, 2021
In this article, we are going to implement the strike-through feature on our TextView using this method. This can be useful when we want to edit our content but also want users to see the previous content. Like on the Amazon app we all have seen that the prices are shown with strikethrough when there is a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 566,
"s": 28,
"text": "In this article, we are going to implement the strike-through feature on our TextView using this method. This can be useful when we want to edit our content but also want user... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.