title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Image classification from scratch in keras. Beginner friendly, intermediate exciting and expert refreshing. | by Rising Odegua | Towards Data Science | Last weekend I was thinking out loud .
what if I had a really really small data set of images that I captured myself and wanted to teach a computer to recognize or distinguish between some specified categories.
Let’s say I have a few thousand images and I want to train a model to automatically detect one class from ano... | [
{
"code": null,
"e": 211,
"s": 172,
"text": "Last weekend I was thinking out loud ."
},
{
"code": null,
"e": 383,
"s": 211,
"text": "what if I had a really really small data set of images that I captured myself and wanted to teach a computer to recognize or distinguish between so... |
How to apply hover effect over button using SASS ? - GeeksforGeeks | 14 Sep, 2021
Animation makes the user experience more beautiful and impressive. With the usage of HTML (HyperText Markup Language) elements and SASS ( Syntactically Awesome Stylesheet), we will design buttons that provide them with a colorful border and an animation effect. We will use Sass because it acts as a better ... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 25579,
"s": 24985,
"text": "Animation makes the user experience more beautiful and impressive. With the usage of HTML (HyperText Markup Language) elements and SASS ( Syntactically Awesome Sty... |
How to stop a function during its execution in JavaScript? | To stop a function during its execution, use the concept of −
document.getElementById().addEventListener().
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "To stop a function during its execution, use the concept of −"
},
{
"code": null,
"e": 1170,
"s": 1124,
"text": "document.getElementById().addEventListener()."
},
{
"code": null,
"e": 1181,
"s": 1170,
"text": " Li... |
Postman - Create Tests for CRUD | CRUD stands for Create, Retrieve, Update and Delete operations on any website opened in a browser. Whenever we launch an application, the retrieve operation is performed.
On creating data, for example, adding a new user for a website, the create operation is performed. If we are modifying the information, for example, ... | [
{
"code": null,
"e": 2279,
"s": 2108,
"text": "CRUD stands for Create, Retrieve, Update and Delete operations on any website opened in a browser. Whenever we launch an application, the retrieve operation is performed."
},
{
"code": null,
"e": 2518,
"s": 2279,
"text": "On creating... |
Tk - Label Widget | A label widget is a common widget used in almost all Tk applications that is used to display simple text. The syntax for label widget is shown below −
label labelName options
The options available for the label widget are listed below in table −
-background color
Used to set background color for widget.
-borderwidth w... | [
{
"code": null,
"e": 2352,
"s": 2201,
"text": "A label widget is a common widget used in almost all Tk applications that is used to display simple text. The syntax for label widget is shown below −"
},
{
"code": null,
"e": 2377,
"s": 2352,
"text": "label labelName options\n"
},... |
JavaScript | Replace multiple strings with multiple other strings - GeeksforGeeks | 06 Jun, 2019
Given a Sentence having multiple strings. The task is to replace multiple strings with new strings simultaneously instead of doing it one by one, using javascript.Below are the few methods to understand:
replace() methodThis method searches a string for a defined value, or a regular expression, and returns... | [
{
"code": null,
"e": 30060,
"s": 30032,
"text": "\n06 Jun, 2019"
},
{
"code": null,
"e": 30264,
"s": 30060,
"text": "Given a Sentence having multiple strings. The task is to replace multiple strings with new strings simultaneously instead of doing it one by one, using javascript.... |
Stack and Array Implementation with Python and NodeJs | by Chamal Pradeep | Towards Data Science | We were discussed basic definitions of the Data structures and algorithms in the previous article. in this article, let’s dig deeper into the Data structure world, and especially, let’s get our hands dirty with a little bit for coding as well.
Objectives of this article:
Discuss Data types, built-in, and derived data t... | [
{
"code": null,
"e": 291,
"s": 47,
"text": "We were discussed basic definitions of the Data structures and algorithms in the previous article. in this article, let’s dig deeper into the Data structure world, and especially, let’s get our hands dirty with a little bit for coding as well."
},
{
... |
Java â String getBytes() Method | This method encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array.
Here is the syntax of this method −
public byte[] getBytes()
This method returns the resultant byte array.
import java.io.*;
public class Test {
public static void main(String ar... | [
{
"code": null,
"e": 2514,
"s": 2377,
"text": "This method encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array."
},
{
"code": null,
"e": 2550,
"s": 2514,
"text": "Here is the syntax of this method −"
},
{... |
How to add/insert additional property to JSON string using Gson in Java?
| The com.google.gson.JSonElement class represents an element of Json. We can use the toJsonTree() method of Gson class to serialize an object's representation as a tree of JsonElements. We can add/ insert an additional property to JSON string by using the getAsJsonObject() method of JSonElement. This method returns to g... | [
{
"code": null,
"e": 1412,
"s": 1062,
"text": "The com.google.gson.JSonElement class represents an element of Json. We can use the toJsonTree() method of Gson class to serialize an object's representation as a tree of JsonElements. We can add/ insert an additional property to JSON string by using th... |
K-Means Clustering. A simpler intuitive explanation. | by Abhishek Kumar | Towards Data Science | K-means is one of the simplest unsupervised learning algorithms. The algorithm follows a simple and easy way to group a given data set into a certain number of coherent subsets called as clusters. The idea is to find K centres, called as cluster centroids, one for each cluster, hence the name K-means clustering. On see... | [
{
"code": null,
"e": 513,
"s": 47,
"text": "K-means is one of the simplest unsupervised learning algorithms. The algorithm follows a simple and easy way to group a given data set into a certain number of coherent subsets called as clusters. The idea is to find K centres, called as cluster centroids,... |
MNIST Dataset Python Example Using CNN | by Cory Maklin | Towards Data Science | It’s only a matter of time before self-driving cars become widespread. This tremendous feat of engineering wouldn’t be possible without convolutional neural networks. The algorithm used by convolutional neural networks is better suited for visual image processing than the one used in traditional artificial neural netwo... | [
{
"code": null,
"e": 584,
"s": 172,
"text": "It’s only a matter of time before self-driving cars become widespread. This tremendous feat of engineering wouldn’t be possible without convolutional neural networks. The algorithm used by convolutional neural networks is better suited for visual image pr... |
AWT Scrollbar Class | Scrollbar control represents a scroll bar component in order to enable user to select from range of values.
Following is the declaration for java.awt.Scrollbar class:
public class Scrollbar
extends Component
implements Adjustable, Accessible
Following are the fields for java.awt.Image class:
static int HORIZON... | [
{
"code": null,
"e": 1855,
"s": 1747,
"text": "Scrollbar control represents a scroll bar component in order to enable user to select from range of values."
},
{
"code": null,
"e": 1914,
"s": 1855,
"text": "Following is the declaration for java.awt.Scrollbar class:"
},
{
"... |
Count minimum steps to get the given desired array - GeeksforGeeks | 01 Apr, 2021
Consider an array with n elements and value of all the elements is zero. We can perform following operations on the array.
Incremental operations:Choose 1 element from the array and increment its value by 1.Doubling operation: Double the values of all the elements of array.
Incremental operations:Choose ... | [
{
"code": null,
"e": 41276,
"s": 41248,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 41401,
"s": 41276,
"text": "Consider an array with n elements and value of all the elements is zero. We can perform following operations on the array. "
},
{
"code": null,
"e": 4... |
Perl | oct() Function - GeeksforGeeks | 25 Jun, 2019
oct() function in Perl converts the octal value passed to its respective decimal value. For example, oct(‘1015’) will return ‘525’. This function returns the resultant decimal value in the form of a string which can be used as a number because Perl automatically converts a string to a number in numeric con... | [
{
"code": null,
"e": 24070,
"s": 24042,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 24458,
"s": 24070,
"text": "oct() function in Perl converts the octal value passed to its respective decimal value. For example, oct(‘1015’) will return ‘525’. This function returns the resul... |
XSLT Syntax | Let’s suppose we have the following sample XML file, students.xml, which is required to be transformed into a well-formatted HTML document.
students.xml
<?xml version = "1.0"?>
<class>
<student rollno = "393">
<firstname>Dinkar</firstname>
<lastname>Kad</lastname>
<nickname>Dinkar</nickname>
... | [
{
"code": null,
"e": 1899,
"s": 1759,
"text": "Let’s suppose we have the following sample XML file, students.xml, which is required to be transformed into a well-formatted HTML document."
},
{
"code": null,
"e": 1912,
"s": 1899,
"text": "students.xml"
},
{
"code": null,
... |
Using Python to Monitor Social Distancing in a Public Area | by Aqeel Anwar | Towards Data Science | Note: Idea credits Landing AI
Social-distancing is an important way to slow down the spread of infectious diseases. People are asked to limit their interactions with each other, reducing the chances of the disease being spread with physical or close contact.
In the past decade, AI/Deep Learning has shown promising resu... | [
{
"code": null,
"e": 202,
"s": 172,
"text": "Note: Idea credits Landing AI"
},
{
"code": null,
"e": 431,
"s": 202,
"text": "Social-distancing is an important way to slow down the spread of infectious diseases. People are asked to limit their interactions with each other, reducing... |
Java Tutorial | Java is a popular programming language.
Java is used to develop mobile apps, web apps, desktop apps, games and much
more.
Our "Try it Yourself" editor makes it easy to learn Java. You can edit Java code and view the result
in your browser.
public class Main {
public static void main(String[] args) {
System.out.... | [
{
"code": null,
"e": 40,
"s": 0,
"text": "Java is a popular programming language."
},
{
"code": null,
"e": 123,
"s": 40,
"text": "Java is used to develop mobile apps, web apps, desktop apps, games and much \nmore."
},
{
"code": null,
"e": 242,
"s": 123,
"text"... |
Deep Learning Techniques for Text Classification | by Diardano Raihan | Towards Data Science | Text classification is one of the popular tasks in NLP that allows a program to classify free-text documents based on pre-defined classes. The classes can be based on topic, genre, or sentiment. Today’s emergence of large digital documents makes the text classification task more crucial, especially for companies to max... | [
{
"code": null,
"e": 530,
"s": 172,
"text": "Text classification is one of the popular tasks in NLP that allows a program to classify free-text documents based on pre-defined classes. The classes can be based on topic, genre, or sentiment. Today’s emergence of large digital documents makes the text ... |
How to create a directory in project folder using Java? | The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories.
The mkdir() method of this class creates a directory with the path represented by the current object.
Therefore, to create a dire... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories."
},
{
"code": null,
"e": 1355,
"s": 1253,
... |
Calculating the LCM of multiple numbers in JavaScript | We are required to write a JavaScript function that takes in an array of numbers of any length and returns their LCM.
We will approach this problem in parts −
Part 1 − We will create a helper function to calculate the Greatest Common Divisor (GCD) of two numbers
Part 2 − Then using Part 1 helper function we will create... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in an array of numbers of any length and returns their LCM."
},
{
"code": null,
"e": 1221,
"s": 1180,
"text": "We will approach this problem in parts −"
},
{
"code": n... |
Passing Multiple ids to single parameter in MySQL? | To pass multiple ids to single parameter, use FIND_IN_SET(). Let us first create a table −
mysql> create table DemoTable1817
(
EmployeeName varchar(20),
CountryName varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTab... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "To pass multiple ids to single parameter, use FIND_IN_SET(). Let us first create a table −"
},
{
"code": null,
"e": 1300,
"s": 1153,
"text": "mysql> create table DemoTable1817\n (\n EmployeeName varchar(20),\n CountryNam... |
OpenCV - Drawing a Line | You can draw a line on an image using the method line() of the imgproc class. Following is the syntax of this method.
line(img, pt1, pt2, color, thickness)
This method accepts the following parameters −
mat − A Mat object representing the image on which the line is to be drawn.
mat − A Mat object representing the imag... | [
{
"code": null,
"e": 3122,
"s": 3004,
"text": "You can draw a line on an image using the method line() of the imgproc class. Following is the syntax of this method."
},
{
"code": null,
"e": 3161,
"s": 3122,
"text": "line(img, pt1, pt2, color, thickness)\n"
},
{
"code": nu... |
How to change JFrame background color in Java | At first, create a JFrame −
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setPreferredSize(new Dimension(550, 300));
Now, change the background color of the JFrame −
frame.getContentPane().setBackground(Color.BLUE);
The following is an example to change JFrame background color... | [
{
"code": null,
"e": 1090,
"s": 1062,
"text": "At first, create a JFrame −"
},
{
"code": null,
"e": 1222,
"s": 1090,
"text": "JFrame frame = new JFrame();\nframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\nframe.setPreferredSize(new Dimension(550, 300));"
},
{
"code"... |
Isolation Forest and Pyspark part 2 | by Maria Karanasou | Towards Data Science | So, after a few runs with the PySpark ml implementation of Isolation Forest presented here, I stumbled upon a couple of things and I thought I’d write about them so that you don’t waste the time I wasted troubleshooting.
In the previous article, I used VectorAssembler to gather the feature vectors. It so happened that ... | [
{
"code": null,
"e": 393,
"s": 172,
"text": "So, after a few runs with the PySpark ml implementation of Isolation Forest presented here, I stumbled upon a couple of things and I thought I’d write about them so that you don’t waste the time I wasted troubleshooting."
},
{
"code": null,
"e... |
Program to calculate the value of nCr Efficiently | 22 Mar, 2021
Given two numbers n, r ( n>=r ). The task is to find the value of C(n, r) for big value of n.
Examples:
Input: n = 30, r = 15
Output: 155117520
C(30, 15) is 155117520 by 30!/((30-15)!*15!)
Input: n = 50, r = 25
Output: 126410606437752
Approach: A simple code can be created with the following knowledge ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 148,
"s": 54,
"text": "Given two numbers n, r ( n>=r ). The task is to find the value of C(n, r) for big value of n."
},
{
"code": null,
"e": 159,
"s": 148,
"text": "Examples: "... |
Quantifiers in Java | 06 Dec, 2021
Prerequisite: Regular Expressions in Java
Quantifiers in Java allow users to specify the number of occurrences to match against. Below are some commonly used quantifiers in Java.
X* Zero or more occurrences of X
X? Zero or One occurrences of X
X+ One or More occurrences of X
X{n} ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 94,
"s": 52,
"text": "Prerequisite: Regular Expressions in Java"
},
{
"code": null,
"e": 231,
"s": 94,
"text": "Quantifiers in Java allow users to specify the number of occurren... |
SciPy - Interpolate | In this chapter, we will discuss how interpolation helps in SciPy.
Interpolation is the process of finding a value between two points on a line or a curve. To help us remember what it means, we should think of the first part of the word, 'inter,' as meaning 'enter,' which reminds us to look 'inside' the data we origina... | [
{
"code": null,
"e": 2088,
"s": 2021,
"text": "In this chapter, we will discuss how interpolation helps in SciPy."
},
{
"code": null,
"e": 2536,
"s": 2088,
"text": "Interpolation is the process of finding a value between two points on a line or a curve. To help us remember what i... |
Java.lang.Boolean Class in Java | 23 Aug, 2018
Java provides a wrapper class Boolean in java.lang package. The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field, whose type is boolean.
In addition, this class provides useful methods like to convert a boolean to a String and a Strin... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Aug, 2018"
},
{
"code": null,
"e": 262,
"s": 52,
"text": "Java provides a wrapper class Boolean in java.lang package. The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a s... |
Oracle Database Connection in Python | 25 May, 2021
Sometimes as part of programming, we required to work with the databases because we want to store a huge amount of information so we use databases, such as Oracle, MySQL, etc. So In this article, we will discuss the connectivity of Oracle database using Python. This can be done through the module name cx_O... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 369,
"s": 54,
"text": "Sometimes as part of programming, we required to work with the databases because we want to store a huge amount of information so we use databases, such as Oracle, MySQL, etc... |
Scala Map | 07 Feb, 2019
Map is a collection of key-value pairs. In other words, it is similar to dictionary. Keys are always unique while values need not be unique. Key-value pairs can have any data type. However, data type once used for any key and value must be consistent throughout. Maps are classified into two types: mutable ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Feb, 2019"
},
{
"code": null,
"e": 478,
"s": 28,
"text": "Map is a collection of key-value pairs. In other words, it is similar to dictionary. Keys are always unique while values need not be unique. Key-value pairs can have any data ... |
Powers of 2 to required sum | 26 May, 2022
Given an integer N, task is to find the numbers which when raised to the power of 2 and added finally, gives the integer N.
Example :
Input : 71307
Output : 0, 1, 3, 7, 9, 10, 12, 16
Explanation :
71307 = 2^0 + 2^1 + 2^3 + 2^7 +
2^9 + 2^10 + 2^12 + 2^16
Input : 1213
Output : 0, 2, 3, 4, 5, 7, 10
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 178,
"s": 54,
"text": "Given an integer N, task is to find the numbers which when raised to the power of 2 and added finally, gives the integer N."
},
{
"code": null,
"e": 189,
"s":... |
Python | Split a sentence into list of words | 01 Sep, 2021
Given a Sentence, write a Python program to convert the given sentence into list of words.
Examples:
Input : ['Hello World']
Output : ['Hello', 'world']
Input : ['Geeks For geeks']
Output : ['Geeks', 'for', 'geeks']
The simplest approach provided by Python to convert the given list of Sentence into word... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 146,
"s": 54,
"text": "Given a Sentence, write a Python program to convert the given sentence into list of words. "
},
{
"code": null,
"e": 157,
"s": 146,
"text": "Examples: "
... |
Python – Append Similar Values as Key | 08 May, 2020
Sometimes, while working with data, we can have problems in which we need to categorize a particular list and values to similar keys. This can be problem in counting data. Like counting votes or counting coins. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using loopThis is br... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 303,
"s": 28,
"text": "Sometimes, while working with data, we can have problems in which we need to categorize a particular list and values to similar keys. This can be problem in counting data. Lik... |
Java Swing | Simple Calculator | 16 Apr, 2021
Java Swing is a GUI (graphical user Interface) widget toolkit for Java. Java Swing is a part of Oracle’s Java foundation classes . Java Swing is an API for providing graphical user interface elements to Java Programs.Swing was created to provide more powerful and flexible components than Java AWT (Abstract... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 507,
"s": 54,
"text": "Java Swing is a GUI (graphical user Interface) widget toolkit for Java. Java Swing is a part of Oracle’s Java foundation classes . Java Swing is an API for providing graphica... |
Menu driven program for all operations on singly linked list in C | 03 Jul, 2022
A Linked List is a linear data structure that consists of two parts: one is the data part and the other is the address part. In this article, all the common operations of a singly linked list is discussed in one menu-driven program.
Operations to be performed:
createList(): To create the list with ‘n’ numb... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 285,
"s": 52,
"text": "A Linked List is a linear data structure that consists of two parts: one is the data part and the other is the address part. In this article, all the common operations of a s... |
What is a Designated Port? | 04 Oct, 2021
The switch with the best path to the root switch is set to forwarding. That switch is referred to as the designated switch, and its port is referred to as the designated port. A designated port is a port that can have the lowest path cost on a Local Area Network(LAN) segment. Each segment has a port called... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 404,
"s": 28,
"text": "The switch with the best path to the root switch is set to forwarding. That switch is referred to as the designated switch, and its port is referred to as the designated port.... |
JavaScript | exec() Method | 12 Apr, 2021
The exec() Method in JavaScript is used to test for match in a string. If there is a match this method returns the first match else it returns NULL.Syntax:
RegExpObject.exec(str)
Where str is the string to be searched. This is required field. Example-1: This example searches for the string “computer” in ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 210,
"s": 52,
"text": "The exec() Method in JavaScript is used to test for match in a string. If there is a match this method returns the first match else it returns NULL.Syntax: "
},
{
"c... |
Reduce the array to a single element with the given operation | 02 Jul, 2022
Given an integer N and an array arr containing integers from 1 to N in a sorted fashion. The task is to reduce the array to a single element by performing the following operation: All the elements in the odd positions will be removed after a single operation. This operation will be performed until only a s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Jul, 2022"
},
{
"code": null,
"e": 436,
"s": 54,
"text": "Given an integer N and an array arr containing integers from 1 to N in a sorted fashion. The task is to reduce the array to a single element by performing the following opera... |
Python | Filter Tuple Dictionary Keys | 30 Jan, 2020
Sometimes, while working with Python dictionaries, we can have it’s keys in form of tuples. A tuple can have many elements in it and sometimes, it can be essential to get them. If they are a part of a dictionary keys and we desire to get filtered tuple key elements, we need to perform certain functionaliti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 419,
"s": 28,
"text": "Sometimes, while working with Python dictionaries, we can have it’s keys in form of tuples. A tuple can have many elements in it and sometimes, it can be essential to get them... |
Find out when a download has completed using Python & Selenium | We can find when a download has completed with Selenium webdriver in Python. We shall use the ChromeOptions class for this purpose. First, we shall create an object of the ChromeOptions class.
Then apply the add_experimental_option method on the object created. We shall pass browser preferences and download.default_dir... | [
{
"code": null,
"e": 1380,
"s": 1187,
"text": "We can find when a download has completed with Selenium webdriver in Python. We shall use the ChromeOptions class for this purpose. First, we shall create an object of the ChromeOptions class."
},
{
"code": null,
"e": 1638,
"s": 1380,
... |
Python | Split given string into equal halves | 03 Jul, 2019
Sometimes, we need to simply divide the string into two equal halves. This type of application can occur in various domain ranging from simple programming to web development. Let’s discuss certain ways in which this can be performed.
Method #1 : Using list comprehension + String slicingThis is the naive me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jul, 2019"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "Sometimes, we need to simply divide the string into two equal halves. This type of application can occur in various domain ranging from simple programming to web development. ... |
ReactJS Reactstrap Table Component - GeeksforGeeks | 22 Jul, 2021
Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Table component allows the user to display rows of data. We can use the following approach in ReactJS to use the ReactJS Reactstrap Table Com... | [
{
"code": null,
"e": 24397,
"s": 24369,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24712,
"s": 24397,
"text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. T... |
Overcoming Data Preprocessing Bottlenecks with TensorFlow Data Service, NVIDIA DALI, and Other Methods | by Chaim Rand | Towards Data Science | In a previous post, I spoke about the importance of profiling the runtime performance of your DNN training sessions as a means to making the most of your training resources, accelerating your training, and saving money. I described a typical training pipeline, (see the diagram below), reviewed some of the potential per... | [
{
"code": null,
"e": 853,
"s": 171,
"text": "In a previous post, I spoke about the importance of profiling the runtime performance of your DNN training sessions as a means to making the most of your training resources, accelerating your training, and saving money. I described a typical training pipe... |
JavaScript Tutorial | JavaScript is the world's most popular programming language.
JavaScript is the programming language of the Web.
JavaScript is easy to learn.
This tutorial will teach you JavaScript from basic to advanced.
With our "Try it Yourself" editor, you can edit the source code and view
the result.
Try it Yourself »
We recomm... | [
{
"code": null,
"e": 61,
"s": 0,
"text": "JavaScript is the world's most popular programming language."
},
{
"code": null,
"e": 112,
"s": 61,
"text": "JavaScript is the programming language of the Web."
},
{
"code": null,
"e": 141,
"s": 112,
"text": "JavaScrip... |
RichFaces - Output Components | In the previous chapter, we have learned about different input fields or tags that help the user provide the inputs through the browser. In this chapter, we will learn about different output components provided by RichFaces.
In some of our previous examples, we have already come across the panel tag. <rich:panel> creat... | [
{
"code": null,
"e": 2144,
"s": 1919,
"text": "In the previous chapter, we have learned about different input fields or tags that help the user provide the inputs through the browser. In this chapter, we will learn about different output components provided by RichFaces."
},
{
"code": null,
... |
How to extract data frame columns stored in a list in R? | Suppose we have two frames each having 5 columns that are stored in a list in R and the data that belongs to same columns has some kind of inherent relationship or we want to check whether there exists a relationship between them then we might want to extract those columns. Therefore, we can use lapply function for thi... | [
{
"code": null,
"e": 1557,
"s": 1062,
"text": "Suppose we have two frames each having 5 columns that are stored in a list in R and the data that belongs to same columns has some kind of inherent relationship or we want to check whether there exists a relationship between them then we might want to e... |
A square matrix as sum of symmetric and skew-symmetric matrices - GeeksforGeeks | 27 May, 2021
Let A be a square matrix with all real number entries. Find two symmetric matrix P and skew symmetric matrix Q such that P + Q = A.Symmetric Matrix:- A square matrix is said to be symmetric matrix if the transpose of the matrix is same as the original matrix. Skew Symmetric Matrix:- A square matrix is said... | [
{
"code": null,
"e": 24327,
"s": 24299,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 24743,
"s": 24327,
"text": "Let A be a square matrix with all real number entries. Find two symmetric matrix P and skew symmetric matrix Q such that P + Q = A.Symmetric Matrix:- A square matr... |
Espresso Testing Framework - Setup Instructions | In this chapter, let us understand how to install espresso framework, configure it to write espresso tests and execute it in our android application.
Espresso is a user interface-testing framework for testing android application developed in Java / Kotlin language using Android SDK. Therefore, espresso’s only requireme... | [
{
"code": null,
"e": 2126,
"s": 1976,
"text": "In this chapter, let us understand how to install espresso framework, configure it to write espresso tests and execute it in our android application."
},
{
"code": null,
"e": 2425,
"s": 2126,
"text": "Espresso is a user interface-tes... |
How to add a margin to a tkinter window? | The margin of a tkinter window can be controlled by specifying the value of fill, expand and padding. Another way to set the margin of a tkinter window is to use grid(**options) Geometry Manager. Grid pack manager allows us to add the margin by specifying the value of row and column property.
# Import the required libr... | [
{
"code": null,
"e": 1356,
"s": 1062,
"text": "The margin of a tkinter window can be controlled by specifying the value of fill, expand and padding. Another way to set the margin of a tkinter window is to use grid(**options) Geometry Manager. Grid pack manager allows us to add the margin by specifyi... |
Ethical Hacking - Enumeration | Enumeration belongs to the first phase of Ethical Hacking, i.e., “Information Gathering”. This is a process where the attacker establishes an active connection with the victim and try to discover as much attack vectors as possible, which can be used to exploit the systems further.
Enumeration can be used to gain inform... | [
{
"code": null,
"e": 2761,
"s": 2479,
"text": "Enumeration belongs to the first phase of Ethical Hacking, i.e., “Information Gathering”. This is a process where the attacker establishes an active connection with the victim and try to discover as much attack vectors as possible, which can be used to ... |
How can I remove all empty values when I explode a string using PHP? | The array_filter() or PREG_SPLIT_NO_EMPTY option on preg_split() can be used to remove empty values from a string when it is exploded −
Live Demo
<?php
$_POST['tag'] = ",abc,defg,,,hijk,lmnop,,0,,";
echo "--- version 1: array_filter ----\n";
// note that this also filters "0" out, since (bool)"0" is FALSE in php
// ar... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "The array_filter() or PREG_SPLIT_NO_EMPTY option on preg_split() can be used to remove empty values from a string when it is exploded −"
},
{
"code": null,
"e": 1209,
"s": 1198,
"text": " Live Demo"
},
{
"code": null,
"e"... |
How do I check to see if a value is an integer in MySQL? | To check if the given value is a string or not ,we use the cast() function. If the value is not numeric then it returns 0, otherwise it will return the numeric value. In this way, we can check whether the value is an integer or not.
mysql> select cast('John123456' AS UNSIGNED);
The following is the output. It shows tha... | [
{
"code": null,
"e": 1295,
"s": 1062,
"text": "To check if the given value is a string or not ,we use the cast() function. If the value is not numeric then it returns 0, otherwise it will return the numeric value. In this way, we can check whether the value is an integer or not."
},
{
"code"... |
Having an Imbalanced Dataset? Here Is How You Can Fix It. | by Will Badr | Towards Data Science | Classification is one of the most common machine learning problems. The best way to approach any classification problem is to start by analyzing and exploring the dataset in what we call Exploratory Data Analysis (EDA). The sole purpose of this exercise is to generate as many insights and information about the data as ... | [
{
"code": null,
"e": 677,
"s": 172,
"text": "Classification is one of the most common machine learning problems. The best way to approach any classification problem is to start by analyzing and exploring the dataset in what we call Exploratory Data Analysis (EDA). The sole purpose of this exercise i... |
How to save MySQL query output to excel or .txt file? | To save MySQL query output into a text file, we can use the OUTFILE command.
Let us first create a table.
mysql> create table SaveintoTextFile
-> (
-> id int,
-> name varchar(100)
-> );
Query OK, 0 rows affected (0.55 sec)
Inserting records into the table.
mysql> insert into SaveintoTextFile values(1,'John... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To save MySQL query output into a text file, we can use the OUTFILE command.\n"
},
{
"code": null,
"e": 1169,
"s": 1140,
"text": "Let us first create a table."
},
{
"code": null,
"e": 1298,
"s": 1169,
"text": "mys... |
Program to find number of friend groups in a set of friends connections in Python | Suppose we have a a friends list, where friends[i] is a list of people i is friends with. The connection of friendships are two-way. And each person is friend with themselves and two people are in a friend group as long as there is some path of mutual friends connecting them. We have to find the total number of friend ... | [
{
"code": null,
"e": 1390,
"s": 1062,
"text": "Suppose we have a a friends list, where friends[i] is a list of people i is friends with. The connection of friendships are two-way. And each person is friend with themselves and two people are in a friend group as long as there is some path of mutual f... |
How to create an integer64 vector in R? | The integer64 vector contains vector values that represents signed integers with values that range from negative 9,223,372,036,854,775,808 to positive 9,223,372,036,854,775,807. To create an integer64 vector, we can use as.integer64 function of bit64 package. The difference between integer64 vector and others is that a... | [
{
"code": null,
"e": 1435,
"s": 1062,
"text": "The integer64 vector contains vector values that represents signed integers with values that range from negative 9,223,372,036,854,775,808 to positive 9,223,372,036,854,775,807. To create an integer64 vector, we can use as.integer64 function of bit64 pa... |
Rust - Arithmetic Operators | Assume the values in variables a and b are 10 and 5 respectively.
NOTE − The ++ and -- operators are not supported in Rust.
fn main() {
let num1 = 10 ;
let num2 = 2;
let mut res:i32;
res = num1 + num2;
println!("Sum: {} ",res);
res = num1 - num2;
println!("Difference: {} ",res) ;
res = num1*n... | [
{
"code": null,
"e": 2153,
"s": 2087,
"text": "Assume the values in variables a and b are 10 and 5 respectively."
},
{
"code": null,
"e": 2211,
"s": 2153,
"text": "NOTE − The ++ and -- operators are not supported in Rust."
},
{
"code": null,
"e": 2562,
"s": 2211,
... |
JSF - f:param | f:param tag provides the options to pass parameters to a component or pass request parameters.
Pass parameter to a UI component
<h:outputFormat value = "Hello {0}!.">
<f:param value = "World" />
</h:outputFormat>
Pass request parameter
<h:commandButton id = "submit"
value = "Show Message" action = "#{user... | [
{
"code": null,
"e": 2047,
"s": 1952,
"text": "f:param tag provides the options to pass parameters to a component or pass request parameters."
},
{
"code": null,
"e": 2080,
"s": 2047,
"text": "Pass parameter to a UI component"
},
{
"code": null,
"e": 2174,
"s": 20... |
mysqlbinlog - Unix, Linux Command | The server's binary log consists of files containing
\(lqevents\(rq
that describe modifications to database contents. The server writes these files in binary format. To display their contents in text format, use the
mysqlbinlog
utility. You can also use
mysqlbinlog
to display the contents of relay log files written by ... | [
{
"code": null,
"e": 11150,
"s": 10577,
"text": "\nThe server's binary log consists of files containing\n\\(lqevents\\(rq\nthat describe modifications to database contents. The server writes these files in binary format. To display their contents in text format, use the\nmysqlbinlog\nutility. You ca... |
CSS Animations - GeeksforGeeks | 02 Nov, 2021
CSS Animation: CSS Animations is a technique to change the appearance and behavior of various elements in web pages. It is used to control the elements by changing their motions or display. It has two parts, one which contains the CSS properties which describe the animation of the elements and the other co... | [
{
"code": null,
"e": 27680,
"s": 27652,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 28130,
"s": 27680,
"text": "CSS Animation: CSS Animations is a technique to change the appearance and behavior of various elements in web pages. It is used to control the elements by changing... |
How to create Empty Values String in JavaScript? | To create empty values string in JavaScript, you can try to run the following code −
<html>
<head>
<script>
var val;
val = "";
document.write("Value: "+val);
document.write("<br>Type: "+typeof val);
</script>
</head>
<body>
</body>
</html> | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To create empty values string in JavaScript, you can try to run the following code −"
},
{
"code": null,
"e": 1362,
"s": 1147,
"text": "<html>\n <head>\n <script>\n var val;\n val = \"\";\n document.wri... |
Report Data Sources | Datasources are structured data container. While generating the report, JasperReports engine obtains data from the datasources. Data can be obtained from the databases, XML files, arrays of objects, and collection of objects. We saw in the chapter Filling Reports, the fillReportXXX () method expects to receive a data s... | [
{
"code": null,
"e": 2760,
"s": 2254,
"text": "Datasources are structured data container. While generating the report, JasperReports engine obtains data from the datasources. Data can be obtained from the databases, XML files, arrays of objects, and collection of objects. We saw in the chapter Filli... |
XML - DOM | The Document Object Model (DOM) is the foundation of XML. XML documents have a hierarchy of informational units called nodes; DOM is a way of describing those nodes and the relationships between them.
A DOM document is a collection of nodes or pieces of information organized in a hierarchy. This hierarchy allows a deve... | [
{
"code": null,
"e": 2162,
"s": 1961,
"text": "The Document Object Model (DOM) is the foundation of XML. XML documents have a hierarchy of informational units called nodes; DOM is a way of describing those nodes and the relationships between them."
},
{
"code": null,
"e": 2435,
"s": ... |
User Similarity with Binary Data in Python | by Elise Landman | Towards Data Science | User clustering and computation of similarities has increasingly gained relevance within today’s industries. Customers are asked to give ratings on f. e. specific products, which are then compared to other customers’ ratings in order to find similarities among them.
Most user clustering applications make use of scaled ... | [
{
"code": null,
"e": 439,
"s": 172,
"text": "User clustering and computation of similarities has increasingly gained relevance within today’s industries. Customers are asked to give ratings on f. e. specific products, which are then compared to other customers’ ratings in order to find similarities ... |
BMI Calculator using Express.js - GeeksforGeeks | 13 Oct, 2021
The Body Mass Index(BMI) is represented in terms of weight and height of an individual. It is the ratio of the weight of the body to the square of the height of the body in kilograms and meters respectively.
BMI = (weight of body) / (height of body)2
Unit of weight: Kilogram(Kg);
Unit of height: Meter(m);
... | [
{
"code": null,
"e": 25028,
"s": 25000,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 25236,
"s": 25028,
"text": "The Body Mass Index(BMI) is represented in terms of weight and height of an individual. It is the ratio of the weight of the body to the square of the height of th... |
groupmod command in Linux with examples - GeeksforGeeks | 20 May, 2019
groupmod command in Linux is used to modify or change the existing group on Linux system. It can be handled by superuser or root user. Basically, it modifies a group definition on the system by modifying the right entry in the database of the group.
Syntax:
groupmod [option] GROUP
Files: The groupmod comma... | [
{
"code": null,
"e": 24644,
"s": 24616,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 24894,
"s": 24644,
"text": "groupmod command in Linux is used to modify or change the existing group on Linux system. It can be handled by superuser or root user. Basically, it modifies a gro... |
How to print integer array in android Log? | This example demonstrate about How to print integer array in android Log.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "This example demonstrate about How to print integer array in android Log."
},
{
"code": null,
"e": 1265,
"s": 1136,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to c... |
Exit Status($?) variable in Linux - GeeksforGeeks | 01 Oct, 2020
“$?” is a variable that holds the return value of the last executed command. “echo $?” displays 0 if the last command has been successfully executed and displays a non-zero value if some error has occurred. The bash sets “$?” To the exit status of the last executed process. By convention 0 is a successfu... | [
{
"code": null,
"e": 24382,
"s": 24354,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 25021,
"s": 24382,
"text": "“$?” is a variable that holds the return value of the last executed command. “echo $?” displays 0 if the last command has been successfully executed and displays ... |
How to drop duplicates and keep one in PySpark dataframe - GeeksforGeeks | 17 Jun, 2021
In this article, we will discuss how to handle duplicate values in a pyspark dataframe. A dataset may contain repeated rows or repeated data points that are not useful for our task. These repeated values in our dataframe are called duplicate values.
To handle duplicate values, we may use a strategy in whi... | [
{
"code": null,
"e": 24559,
"s": 24528,
"text": " \n17 Jun, 2021\n"
},
{
"code": null,
"e": 24809,
"s": 24559,
"text": "In this article, we will discuss how to handle duplicate values in a pyspark dataframe. A dataset may contain repeated rows or repeated data points that are not... |
How to get last day of a month from date in PHP ? | 19 May, 2020
Given a date and the task is to print the last day of the month. We will use date() and strtotime() function to get the last day of the month.
Used PHP functions:
date() function: Format a local time/date.
strtotime() function: Parse about any English textual datetime description into a Unix timestamp.
Exa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 171,
"s": 28,
"text": "Given a date and the task is to print the last day of the month. We will use date() and strtotime() function to get the last day of the month."
},
{
"code": null,
... |
Code Bloating in C++ with Examples | 31 May, 2020
Code bloat is the production of code that is perceived as unnecessarily long, slow, or otherwise wasteful of resources. It is a problem in Software Development which makes the length of the code of software long unnecessarily. So for writing the quality code, we always avoid code bloating in our program.
F... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 334,
"s": 28,
"text": "Code bloat is the production of code that is perceived as unnecessarily long, slow, or otherwise wasteful of resources. It is a problem in Software Development which makes the... |
Python program to find the first day of given year | 02 Aug, 2019
Given a year as input, write a Python to find the starting day of the given year. We will use Python datetime library in order to solve this problem.
Example:
Input : 2010
Output :Friday
Input :2019
Output :Tuesday
Below is the implementation:
# Python program to find the first day of given year # impor... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Given a year as input, write a Python to find the starting day of the given year. We will use Python datetime library in order to solve this problem."
},
{
"code": nu... |
map::begin() and end() in C++ STL | 13 Jun, 2022
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values.
begin() function is used to return an iterator pointing to the first element of the map container. begin() function returns a bidirectiona... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 221,
"s": 52,
"text": "Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values."
},... |
View Computer’s Important Network Information Using Python | 11 Oct, 2020
While working in a network, we do some troubleshooting with the network or Internet problem. This time we need to check your own system network connection information.
We can find the network connection in the Control Panel in Windows. The best way to find this information we can use ipconfig command in CM... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2020"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "While working in a network, we do some troubleshooting with the network or Internet problem. This time we need to check your own system network connection information."
},
... |
Find Recurring Sequence in a Fraction | 30 Jun, 2022
Given a fraction, find a recurring sequence of digits if it exists, otherwise, print “No recurring sequence”.
Examples:
Input : Numerator = 8, Denominator = 3
Output : Recurring sequence is 6
Explanation : 8/3 = 2.66666666.......
Input : Numerator = 50, Denominator = 22
Output : Recurring sequence is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 162,
"s": 52,
"text": "Given a fraction, find a recurring sequence of digits if it exists, otherwise, print “No recurring sequence”."
},
{
"code": null,
"e": 172,
"s": 162,
"tex... |
How to use Pagination in DataGrid Component in ReactJS ? | 26 Apr, 2021
Pagination helps in viewing a segment of data from the assigned data source. Pagination improves the user experience as users can switch between pages to see data. DataGrid Component helps in displaying the information in a grid-like format of rows and columns. We can use the following approach in ReactJS ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 376,
"s": 28,
"text": "Pagination helps in viewing a segment of data from the assigned data source. Pagination improves the user experience as users can switch between pages to see data. DataGrid Co... |
How to detect network speed using JavaScript? | 16 Jul, 2020
To detect the network speed using javascript, we will use the following approach.
Approach: Open the web page for which you want to know the connection speed. The page should be the one for which you want to add the javascript code for detecting the speed. Assign or set up the address of the image which yo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 110,
"s": 28,
"text": "To detect the network speed using javascript, we will use the following approach."
},
{
"code": null,
"e": 728,
"s": 110,
"text": "Approach: Open the web p... |
How to get file extensions using JavaScript? | 09 Aug, 2019
split() and pop() method
substring() and lastIndexOf() method
match() method with regular expression
Above methods are described below one by one with the proper example.
Using split() and pop() method:The full filename is first obtained by selecting the file input and getting its value property. This retu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Aug, 2019"
},
{
"code": null,
"e": 53,
"s": 28,
"text": "split() and pop() method"
},
{
"code": null,
"e": 90,
"s": 53,
"text": "substring() and lastIndexOf() method"
},
{
"code": null,
"e": 129,
"... |
How to create Glowing Star effect using HTML and CSS? - GeeksforGeeks | 14 Jul, 2020
The glowing star effect is one of the coolest effects that is used for dark themed websites. It is known as star effect because it has small glowing balls animated in different ways which looks like stars. This effect can be used for image slider, loader, and maybe as an showcase UI element.
Approach: The ... | [
{
"code": null,
"e": 24836,
"s": 24808,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 25129,
"s": 24836,
"text": "The glowing star effect is one of the coolest effects that is used for dark themed websites. It is known as star effect because it has small glowing balls animated... |
Solve sudokus automatically with Python and PyAutoGUI | Towards Data Science | In this article, I will introduce a walkthrough on making your very own script that solves sudoku puzzles. Furthermore, this script is enhanced with PyAutoGUI to make sudoku solving quite automatic (you only have to execute the code).
I have divided the article in the following manner:
Introduction to sudoku — this bri... | [
{
"code": null,
"e": 407,
"s": 172,
"text": "In this article, I will introduce a walkthrough on making your very own script that solves sudoku puzzles. Furthermore, this script is enhanced with PyAutoGUI to make sudoku solving quite automatic (you only have to execute the code)."
},
{
"code"... |
time.process_time() function in Python | In this tutorial, we are going to learn about the time.process_time() method.
The method time.process_time() will return a float value of time in seconds of a system and user CPU time of the current process.
Live Demo
# importing the time module
import time
# printing the current process time
print(time.process_time()... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "In this tutorial, we are going to learn about the time.process_time() method."
},
{
"code": null,
"e": 1270,
"s": 1140,
"text": "The method time.process_time() will return a float value of time in seconds of a system and user CPU tim... |
Java program to check whether the given number is an Armstrong number | An Armstrong number is a number which equals to the sum of the cubes of its individual digits. For example, 153 is an Armstrong number as −
153 = (1)3 + (5)3 + (3)3
153 1 + 125 + 27
154 153
1. Take integer variable Arms
2. Assign value to the variable
3. Split all digits of Arms
4. Find cube-value of each digits
5. Add... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "An Armstrong number is a number which equals to the sum of the cubes of its individual digits. For example, 153 is an Armstrong number as −"
},
{
"code": null,
"e": 1252,
"s": 1202,
"text": "153 = (1)3 + (5)3 + (3)3\n153 1 + 125 + 27... |
C++ Program to Implement Fermat’s Little Theorem | Fermat's little theorem is one of the fundamental results of elementary number theory and is the basis for the Fermat primality test. The theorem is named after Pierre de Fermat, who stated it in 1640. The 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,
"e": 1382,
"s": 1062,
"text": "Fermat's little theorem is one of the fundamental results of elementary number theory and is the basis for the Fermat primality test. The theorem is named after Pierre de Fermat, who stated it in 1640. The Theorem states that if p is a prime number, the... |
C++ Vector Library - push_back() Function | The C++ function std::vector::push_back() inserts new element at the end of vector and increases size of vector by one.
Following is the declaration for std::vector::push_back() function form std::vector header.
void push_back (const value_type& val);
void push_back (const value_type& val);
void push_back (value_type&... | [
{
"code": null,
"e": 2723,
"s": 2603,
"text": "The C++ function std::vector::push_back() inserts new element at the end of vector and increases size of vector by one."
},
{
"code": null,
"e": 2815,
"s": 2723,
"text": "Following is the declaration for std::vector::push_back() func... |
PL/SQL - Basic Syntax | In this chapter, we will discuss the Basic Syntax of PL/SQL which is a block-structured language; this means that the PL/SQL programs are divided and written in logical blocks of code. Each block consists of three sub-parts −
Declarations
This section starts with the keyword DECLARE. It is an optional section and defin... | [
{
"code": null,
"e": 2291,
"s": 2065,
"text": "In this chapter, we will discuss the Basic Syntax of PL/SQL which is a block-structured language; this means that the PL/SQL programs are divided and written in logical blocks of code. Each block consists of three sub-parts −"
},
{
"code": null,... |
How to define a variable in C++? | To define a variable in C++, you need to use the following syntax −
datatype variable_name;
You need to know what type of data is your variable is going to hold and what it will be called. The variable name has constraints on what you can name it. Following are the rules for naming variables −
Variable names in C++ ca... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To define a variable in C++, you need to use the following syntax −"
},
{
"code": null,
"e": 1155,
"s": 1131,
"text": "datatype variable_name;"
},
{
"code": null,
"e": 1358,
"s": 1155,
"text": "You need to know w... |
How to Create 5 Star Skills Rating Bar using CSS ? - GeeksforGeeks | 22 Oct, 2021
In this article, we will create a 5 Star Rating Bar using CSS and HTML. A 5-star rating bar is used to collect user opinions or feedback. Users can give a rating out of 5 as per their satisfaction. We will create the layout or design of the rating bar.
Approach:
For the Star Icons, we are using Font-Awesom... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 26874,
"s": 26621,
"text": "In this article, we will create a 5 Star Rating Bar using CSS and HTML. A 5-star rating bar is used to collect user opinions or feedback. Users can give a rating o... |
Find ways an Integer can be expressed as sum of n-th power of unique natural numbers - GeeksforGeeks | 17 Apr, 2022
Given two numbers x and n, find a number of ways x can be expressed as sum of n-th power of unique natural numbers.
Examples :
Input : x = 10, n = 2Output : 1Explanation: 10 = 12 + 32, Hence total 1 possibility
Input : x = 100, n = 2Output : 3Explanation: 100 = 102 OR 62 + 82 OR 12 + 32 + 42 + 52 + 72 H... | [
{
"code": null,
"e": 25234,
"s": 25206,
"text": "\n17 Apr, 2022"
},
{
"code": null,
"e": 25350,
"s": 25234,
"text": "Given two numbers x and n, find a number of ways x can be expressed as sum of n-th power of unique natural numbers."
},
{
"code": null,
"e": 25362,
... |
AngularJS - HTML DOM | The following directives are used to bind application data to the attributes of HTML DOM elements −
ng-disabled
disables a given control.
ng-show
shows a given control.
ng-hide
hides a given control.
ng-click
represents a AngularJS click event.
Add ng-disabled attribute to an HTML button and pass it a model. Bind the m... | [
{
"code": null,
"e": 2799,
"s": 2699,
"text": "The following directives are used to bind application data to the attributes of HTML DOM elements −"
},
{
"code": null,
"e": 2811,
"s": 2799,
"text": "ng-disabled"
},
{
"code": null,
"e": 2837,
"s": 2811,
"text": ... |
JSON with Java | This chapter covers how to encode and decode JSON objects using Java programming language. Let's start with preparing the environment to start our programming with Java for JSON.
Before you start with encoding and decoding JSON using Java, you need to install any of the JSON modules available. For this tutorial we have... | [
{
"code": null,
"e": 1959,
"s": 1780,
"text": "This chapter covers how to encode and decode JSON objects using Java programming language. Let's start with preparing the environment to start our programming with Java for JSON."
},
{
"code": null,
"e": 2235,
"s": 1959,
"text": "Bef... |
How to detect when cancel is clicked on file input using JavaScript ? - GeeksforGeeks | 11 Jun, 2020
This article describes the method to handle a situation when the user tries to input a file and later fails to upload the file. It gives the status to the user that the file is not uploaded. This may be useful in situations when an important file needs to be submitted or the application requires the file f... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 26469,
"s": 26139,
"text": "This article describes the method to handle a situation when the user tries to input a file and later fails to upload the file. It gives the status to the user tha... |
How do you apply PCA to Logistic Regression to remove Multicollinearity? | by Rukshan Pramoditha | Towards Data Science | Multicollinearity occurs when features (input variables) are highly correlated with one or more of the other features in the dataset. It affects the performance of regression and classification models. PCA (Principal Component Analysis) takes advantage of multicollinearity and combines the highly correlated variables i... | [
{
"code": null,
"e": 606,
"s": 172,
"text": "Multicollinearity occurs when features (input variables) are highly correlated with one or more of the other features in the dataset. It affects the performance of regression and classification models. PCA (Principal Component Analysis) takes advantage of... |
Tomohiko Sakamoto's Algorithm- Finding the day of the week - GeeksforGeeks | 07 Apr, 2021
Given any date according to the Gregorian Calendar, the task is to return the day(Monday, Tuesday...etc) on that particular day. Examples:
Input : Date: 13 July 2017 [13.07.2017]
Output : 4 i.e Thursday
Input : Date: 15 August 2012 [15.08.2012]
Output : 3 i.e Wednesday
Input : Date: 24 December 2456 [... | [
{
"code": null,
"e": 25933,
"s": 25905,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 26074,
"s": 25933,
"text": "Given any date according to the Gregorian Calendar, the task is to return the day(Monday, Tuesday...etc) on that particular day. Examples: "
},
{
"code": ... |
Deep Q Learning for the CartPole. The purpose of this post is to... | by Rita Kurban | Towards Data Science | The purpose of this post is to introduce the concept of Deel Q Learning and use it to solve the CartPole environment from the OpenAI Gym.
The post will consist of the following components:
Open AI Gym Environment IntroRandom Baseline StrategyDeep Q LearningDeep Q Learning with Replay MemoryDouble Deep Q LearningSoft Up... | [
{
"code": null,
"e": 310,
"s": 172,
"text": "The purpose of this post is to introduce the concept of Deel Q Learning and use it to solve the CartPole environment from the OpenAI Gym."
},
{
"code": null,
"e": 361,
"s": 310,
"text": "The post will consist of the following component... |
smartctl - Unix, Linux Command | smartctl is a command line utility designed to perform SMART
tasks such as printing the SMART self-test and error logs, enabling
and disabling SMART automatic testing, and initiating device
self-tests. Note: if the user issues a SMART command that is
(apparently) not implemented by the device, smartctl will print
a war... | [
{
"code": null,
"e": 11122,
"s": 10585,
"text": "\nsmartctl is a command line utility designed to perform SMART\ntasks such as printing the SMART self-test and error logs, enabling\nand disabling SMART automatic testing, and initiating device\nself-tests. Note: if the user issues a SMART command tha... |
How to append element in the list using Python? | There may arise some situations where we need to add or append an element at the end of a list. We’ll use append() method in Python which adds an item to the end of the list.
The length of the list increases by one.
list.append(item)
The single parameter item is the item to be added at the end of the list. The item can... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "There may arise some situations where we need to add or append an element at the end of a list. We’ll use append() method in Python which adds an item to the end of the list."
},
{
"code": null,
"e": 1278,
"s": 1237,
"text": "The len... |
Python Pandas - Return a new Timedelta with milliseconds ceiling resolution | To return a new Timedelta ceiled to this resolution, use the timedelta.ceil() method. For milliseconds ceiling resolution, set the freq parameter to the value ms.
At first, import the required libraries −
import pandas as pd
TimeDeltas is Python’s standard datetime library uses a different representation timedelta’s. C... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "To return a new Timedelta ceiled to this resolution, use the timedelta.ceil() method. For milliseconds ceiling resolution, set the freq parameter to the value ms."
},
{
"code": null,
"e": 1267,
"s": 1225,
"text": "At first, import th... |
Azure Machine Learning Service — Train a model | by Pankaj Jainani | Towards Data Science | So far in this series of articles, I was able to cover a brief introduction of the Azure Machine Learning Service (AML) and also able to run a simple experiment. In this post, I am going to cover the parameterization of the experiment script, different ways to configure the script environment, framework, and dependenci... | [
{
"code": null,
"e": 578,
"s": 172,
"text": "So far in this series of articles, I was able to cover a brief introduction of the Azure Machine Learning Service (AML) and also able to run a simple experiment. In this post, I am going to cover the parameterization of the experiment script, different wa... |
Check if given Sudoku board configuration is valid or not - GeeksforGeeks | 11 May, 2021
Given a Sudoku Board configuration, check whether it is valid or not.
Examples:
Input:
[5 3 - - 7 - - - -]
[6 - - 1 9 5 - - -]
[- 9 8 - - - - 6 -]
[8 - - - 6 - - - 3]
[4 - - 8 - 3 - - 1]
[7 - - - 2 - - - 6]
[- 6 - - - - 2 8 -]
[- - - 4 1 9 - - 5]
[- - - - 8 - - 7 9]
O... | [
{
"code": null,
"e": 24849,
"s": 24821,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 24919,
"s": 24849,
"text": "Given a Sudoku Board configuration, check whether it is valid or not."
},
{
"code": null,
"e": 24930,
"s": 24919,
"text": "Examples: "
},
{... |
What Is A Cumulative Distribution Function? | by Emmett Boudreau | Towards Data Science | Back in May, I took a look at a distribution function that belongs to most statistical distributions called the Probability Density Function, or PDF. The PDF is a very important part of statistical inference, likewise, so is its function brother, the Cumulative Distribution Function, or CDF. If you would like to learn ... | [
{
"code": null,
"e": 445,
"s": 46,
"text": "Back in May, I took a look at a distribution function that belongs to most statistical distributions called the Probability Density Function, or PDF. The PDF is a very important part of statistical inference, likewise, so is its function brother, the Cumul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.