title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Program to print multiplication table of any number in PHP - GeeksforGeeks | 27 Oct, 2021
In this article, we will see how to print the multiplication table of any given number using PHP. To make the multiplication table, first, we get a number input from the user and then use for loop to display the multiplication table.
We use HTML and PHP to display the multiplication table. The HTML part is... | [
{
"code": null,
"e": 26035,
"s": 26007,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 26269,
"s": 26035,
"text": "In this article, we will see how to print the multiplication table of any given number using PHP. To make the multiplication table, first, we get a number input fr... |
Python PIL | ImageChops.screen() and ImageChops.offset() method - GeeksforGeeks | 22 Jun, 2021
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities.
This method is used to superimpose two inverted images on top of each other.
Syntax: ImageChops.screen(image1, image2)
Parameters:
image1 first image
image2 second image
Return Value: An Image
Pyt... | [
{
"code": null,
"e": 25771,
"s": 25743,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 25877,
"s": 25771,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. "
},
{
"code": null,
"e": 25955,
"s": 2587... |
CSS transform Property - GeeksforGeeks | 01 Nov, 2021
The transform property in CSS is used to change the coordinate space of the visual formatting model. This is used to add effects like skew, rotate, translate, etc on elements.
Syntax:
transform: none|transform-functions|initial|inherit;
Note: The transformations can be of 2-D or 3-D type.
Values:
none: No ... | [
{
"code": null,
"e": 24955,
"s": 24927,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 25131,
"s": 24955,
"text": "The transform property in CSS is used to change the coordinate space of the visual formatting model. This is used to add effects like skew, rotate, translate, etc ... |
Merge Sort - GeeksforGeeks | 22 Apr, 2022
Like QuickSort, Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then it merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is a key process that assumes that arr[l..m] and ... | [
{
"code": null,
"e": 25399,
"s": 25371,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 25824,
"s": 25399,
"text": "Like QuickSort, Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then it merges the t... |
Index Mapping (or Trivial Hashing) with negatives allowed - GeeksforGeeks | 20 Jul, 2021
Given a limited range array contains both positive and non-positive numbers, i.e., elements are in the range from -MAX to +MAX. Our task is to search if some number is present in the array or not in O(1) time.Since range is limited, we can use index mapping (or trivial hashing). We use values as the index ... | [
{
"code": null,
"e": 39003,
"s": 38975,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 39385,
"s": 39003,
"text": "Given a limited range array contains both positive and non-positive numbers, i.e., elements are in the range from -MAX to +MAX. Our task is to search if some numbe... |
How to find the length of an Array in C# - GeeksforGeeks | 11 Oct, 2019
Array.Length Property is used to get the total number of elements in all the dimensions of the Array. Basically, the length of an array is the total number of the elements which is contained by all the dimensions of that array.
Syntax:
public int Length { get; }
Property Value: This property returns the to... | [
{
"code": null,
"e": 26337,
"s": 26309,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 26565,
"s": 26337,
"text": "Array.Length Property is used to get the total number of elements in all the dimensions of the Array. Basically, the length of an array is the total number of the ... |
Perl | References - GeeksforGeeks | 10 Oct, 2018
In Perl, we use variables to access data stored in a memory location(all data and functions are stored in memory). Variables are assigned with data values which are used in various operations. Perl Reference is a way to access the same data but with a different variable. A reference in Perl is a scalar dat... | [
{
"code": null,
"e": 25315,
"s": 25287,
"text": "\n10 Oct, 2018"
},
{
"code": null,
"e": 25933,
"s": 25315,
"text": "In Perl, we use variables to access data stored in a memory location(all data and functions are stored in memory). Variables are assigned with data values which ar... |
Find single Movement in a Matrix - GeeksforGeeks | 24 May, 2021
Given four integers x1, y1 and x2, y2 which represent two locations in an infinite 2D-Matrix, the task is to find whether it is possible to move from (x1, y1) to (x2, y2) in a single move, either left, right, up or down. Note that the move will be repeated until the destination is reached. If it is impossi... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 26492,
"s": 26141,
"text": "Given four integers x1, y1 and x2, y2 which represent two locations in an infinite 2D-Matrix, the task is to find whether it is possible to move from (x1, y1) to (... |
Excel Cell References - GeeksforGeeks | 20 May, 2021
A cell reference, also known as a cell address, is a mechanism that defines a cell on a worksheet by combining a column letter and a row number. We can refer to any cell (in Excel formulas) in the worksheet by using the cell references.
For example :
Here we refer to the cell in column A & row 2 by A2 & ce... | [
{
"code": null,
"e": 26289,
"s": 26261,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 26526,
"s": 26289,
"text": "A cell reference, also known as a cell address, is a mechanism that defines a cell on a worksheet by combining a column letter and a row number. We can refer to an... |
How to convert JSON string to array of JSON objects using JavaScript ? - GeeksforGeeks | 30 Jul, 2021
Given a JSON string and the task is to convert the JSON string to the array of JSON objects. This array contains the values of JavaScript object obtained from the JSON string with the help of JavaScript. There are two approaches to solve this problem which are discussed below:
Approach 1: First convert the... | [
{
"code": null,
"e": 26747,
"s": 26719,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 27025,
"s": 26747,
"text": "Given a JSON string and the task is to convert the JSON string to the array of JSON objects. This array contains the values of JavaScript object obtained from the ... |
NumberFormat getNumberInstance() method in Java with Examples - GeeksforGeeks | 01 Apr, 2019
The getNumberInstance() method is a built-in method of the java.text.NumberFormat returns an general purpose number format for the current default FORMAT locale.Syntax:public static final NumberFormat getNumberInstance()Parameters: The function does not accepts any parameter.Return Value: The function retu... | [
{
"code": null,
"e": 25797,
"s": 25769,
"text": "\n01 Apr, 2019"
},
{
"code": null,
"e": 28768,
"s": 25797,
"text": "The getNumberInstance() method is a built-in method of the java.text.NumberFormat returns an general purpose number format for the current default FORMAT locale.Sy... |
Longest set of Palindrome Numbers from the range [L, R] with at most K difference between its maximum and minimum - GeeksforGeeks | 26 Jul, 2021
Given three positive integers L, R, and K, the task is to find the largest group of palindromic numbers from the range [L, R] such that the difference between the maximum and the minimum element present in the group is less than K.
Examples:
Input: L = 50, R = 78, K = 12Output: 2Explanation:All palindromic... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 26169,
"s": 25937,
"text": "Given three positive integers L, R, and K, the task is to find the largest group of palindromic numbers from the range [L, R] such that the difference between the ... |
How to Post Data to API using Volley in Android? - GeeksforGeeks | 14 Apr, 2022
We have seen reading the data from API using Volley request with the help of GET request in Android. With the help of GET Request, we can display data from API in JSON format and use that data inside our application. In this article, we will take a look at posting our data to API using the POST request wit... | [
{
"code": null,
"e": 26406,
"s": 26378,
"text": "\n14 Apr, 2022"
},
{
"code": null,
"e": 26747,
"s": 26406,
"text": "We have seen reading the data from API using Volley request with the help of GET request in Android. With the help of GET Request, we can display data from API in ... |
Browser Automation Using Selenium - GeeksforGeeks | 01 Dec, 2020
Selenium is a powerful tool for controlling a web browser through the program. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C#, etc, we will be working with Python.
Mastering Selenium will help you automate your day to day tasks... | [
{
"code": null,
"e": 26317,
"s": 26289,
"text": "\n01 Dec, 2020"
},
{
"code": null,
"e": 26561,
"s": 26317,
"text": "Selenium is a powerful tool for controlling a web browser through the program. It is functional for all browsers, works on all major OS and its scripts are written... |
Prefix matching in Python using pytrie module - GeeksforGeeks | 23 Nov, 2020
Given a list of strings and a prefix value sub-string, find all strings from given list of strings which contains given value as prefix ?
Examples:
Input : arr = ['geeksforgeeks', 'forgeeks',
'geeks', 'eeksfor'],
prefix = 'geek'
Output : ['geeksforgeeks','geeks']
A Simple approach ... | [
{
"code": null,
"e": 25579,
"s": 25551,
"text": "\n23 Nov, 2020"
},
{
"code": null,
"e": 25717,
"s": 25579,
"text": "Given a list of strings and a prefix value sub-string, find all strings from given list of strings which contains given value as prefix ?"
},
{
"code": nul... |
Multiplication Table Generator using Python - GeeksforGeeks | 25 Feb, 2021
Prerequisites: Python GUI- Tkinter
We all know that Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications. In this article, we will learn How to create a Times-table using Tkinter.
Approach:
Import Tkinter Library
Create Fu... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 25598,
"s": 25563,
"text": "Prerequisites: Python GUI- Tkinter"
},
{
"code": null,
"e": 25828,
"s": 25598,
"text": "We all know that Tkinter is the standard GUI library fo... |
How to detect user pressing Home Key in an Activity on Android? | This example demonstrates how do I detect user pressing home key in an activity on android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "This example demonstrates how do I detect user pressing home key in an activity on android."
},
{
"code": null,
"e": 1283,
"s": 1154,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all req... |
wprintf() and wscanf in C Library | Here we will see the wprintf() and wscanf() functions in C. These are the printf() and scanf() functions for wide characters. These functions are present in the wchar.h
The wprintf() function is used to print the wide character to the standard output. The wide string format may contain the format specifiers which is st... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "Here we will see the wprintf() and wscanf() functions in C. These are the printf() and scanf() functions for wide characters. These functions are present in the wchar.h"
},
{
"code": null,
"e": 1483,
"s": 1231,
"text": "The wprintf()... |
Schemafull streaming data processing in ML pipelines | by Ivan Senilov | Towards Data Science | In one of my previous articles on Machine Learning pipelines, message queues were touched as an alternative to HTTP client-server architecture which is the most common way to serve ML models nowadays.
Just to refresh, here are the advantages of using queues like Apache Kafka in ML pipelines:
Naturally asynchronous proc... | [
{
"code": null,
"e": 373,
"s": 172,
"text": "In one of my previous articles on Machine Learning pipelines, message queues were touched as an alternative to HTTP client-server architecture which is the most common way to serve ML models nowadays."
},
{
"code": null,
"e": 465,
"s": 373... |
Lodash _.isNaN() Method - GeeksforGeeks | 16 Sep, 2020
The Lodash _.isNaN() Method checks the given value is NaN or not. This method is not the same as the JavaScript isNaN() method which returns true for undefined and other non-number values.
Syntax:
_.isNaN( value )
Parameters: This method accepts a single parameter as mentioned above and described below:
v... | [
{
"code": null,
"e": 24461,
"s": 24433,
"text": "\n16 Sep, 2020"
},
{
"code": null,
"e": 24650,
"s": 24461,
"text": "The Lodash _.isNaN() Method checks the given value is NaN or not. This method is not the same as the JavaScript isNaN() method which returns true for undefined and... |
Python List count() Method | Python list method count() returns count of how many times obj occurs in list.
Following is the syntax for count() method −
list.count(obj)
obj − This is the object to be counted in the list.
obj − This is the object to be counted in the list.
This method returns count of how many times obj occurs in list.
The followi... | [
{
"code": null,
"e": 2323,
"s": 2244,
"text": "Python list method count() returns count of how many times obj occurs in list."
},
{
"code": null,
"e": 2368,
"s": 2323,
"text": "Following is the syntax for count() method −"
},
{
"code": null,
"e": 2385,
"s": 2368,
... |
Difference Between Arrays.toString() and Arrays.deepToString() in Java - GeeksforGeeks | 28 Jan, 2021
The deepToString() method of the Arrays class returns the string representation of the deep contents of the specified Object array. Unlike Arrays. toString(), if the array contains other arrays as elements, the string representation includes their contents, and so on.
Arrays.toString(): Returns a string re... | [
{
"code": null,
"e": 24467,
"s": 24439,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 24736,
"s": 24467,
"text": "The deepToString() method of the Arrays class returns the string representation of the deep contents of the specified Object array. Unlike Arrays. toString(), if t... |
Resolve MySQL ERROR 1064 (42000): You have an error in your syntax? | This error occurs if let’s say you used var_char instead of varchar type. To remove this type of error, use, for example, varchar(100) instead of var_char(100).
Let us now see how this error occurs −
mysql> create table removeErrorDemo
-> (
-> StudentId int,
-> StudentName var_char(50)
-> );
The following i... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "This error occurs if let’s say you used var_char instead of varchar type. To remove this type of error, use, for example, varchar(100) instead of var_char(100)."
},
{
"code": null,
"e": 1262,
"s": 1223,
"text": "Let us now see how th... |
Reverse a String | Practice | GeeksforGeeks | You are given a string s. You need to reverse the string.
Example 1:
Input:
s = Geeks
Output: skeeG
Example 2:
Input:
s = for
Output: rof
Your Task:
You only need to complete the function reverseWord() that takes s as parameter and returns the reversed string.
Expected Time Complexity: O(|S|).
Expected Auxiliary Space... | [
{
"code": null,
"e": 284,
"s": 226,
"text": "You are given a string s. You need to reverse the string."
},
{
"code": null,
"e": 295,
"s": 284,
"text": "Example 1:"
},
{
"code": null,
"e": 327,
"s": 295,
"text": "Input:\ns = Geeks\nOutput: skeeG\n"
},
{
... |
Java Program to Find Reverse of a Number Using Recursion | 10 Jun, 2022
Recursion is a process by which a function calls itself repeatedly till it falls under the base condition and our motive is achieved.
To solve any problem using recursion, we should simply follow the below steps:
Assume the smaller problem from the problem which is similar to the bigger/original problem.De... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 186,
"s": 52,
"text": "Recursion is a process by which a function calls itself repeatedly till it falls under the base condition and our motive is achieved."
},
{
"code": null,
"e": 265... |
SQL Server Identity | 21 Mar, 2018
Identity column of a table is a column whose value increases automatically. The value in an identity column is created by the server. A user generally cannot insert a value into an identity column. Identity column can be used to uniquely identify the rows in the table.
Syntax:
IDENTITY [( seed, increment)]... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 323,
"s": 53,
"text": "Identity column of a table is a column whose value increases automatically. The value in an identity column is created by the server. A user generally cannot insert a value i... |
Turing Machine as Comparator | 23 Aug, 2021
Prerequisite – Turing Machine
Problem : Draw a turing machine which compare two numbers. Using unary format to represent the number. For example, 4 is represented by
4 = 1 1 1 1 or 0 0 0 0
Lets use one’s for representation.
Example:
Approach:
Comparing two numbers by comparing number of ‘1’s.Comp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 82,
"s": 52,
"text": "Prerequisite – Turing Machine"
},
{
"code": null,
"e": 220,
"s": 82,
"text": "Problem : Draw a turing machine which compare two numbers. Using unary format... |
File.WriteAllLines(String, IEnumerable<String>) Method in C# with Examples | 01 Jun, 2020
File.WriteAllLines(String, IEnumerable<String>) is an inbuilt File class method that is used to create a new file, writes a collection of strings to the file, and then closes the file.
Syntax:
public static void WriteAllLines (string path, System.Collections.Generic.IEnumerable<String>contents);
Parameter:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 213,
"s": 28,
"text": "File.WriteAllLines(String, IEnumerable<String>) is an inbuilt File class method that is used to create a new file, writes a collection of strings to the file, and then closes ... |
Scala List concatenation with example | 29 Jul, 2019
In order to concatenate two lists we need to utilize concat() method in Scala.Syntax:
List.concat(l1, l2)
In above syntax, l1 is list1 and l2 is list2.Below is the example to concat two lists in scala.Example #1:
// Scala program of concat()// method // Creating objectobject GfG{ // Main method d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "In order to concatenate two lists we need to utilize concat() method in Scala.Syntax:"
},
{
"code": null,
"e": 134,
"s": 114,
"text": "List.concat(l1, l2)"... |
HTML | Window alert( ) Method | 26 Jul, 2019
The Window alert() method is used to display an alert box. It displays a specified message along with an OK button and is generally used to make sure that the information comes through the user.It returns a string which represents the text to display in the alert box.
Syntax:
alert(message)
Below program i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 297,
"s": 28,
"text": "The Window alert() method is used to display an alert box. It displays a specified message along with an OK button and is generally used to make sure that the information come... |
Python Counter to find the size of largest subset of anagram words | 27 Dec, 2017
Given an array of n string containing lowercase letters. Find the size of largest subset of string which are anagram of each others. An anagram of a string is another string that contains same characters, only the order of characters can be different. For example, “abcd” and “dabc” are anagram of each othe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Dec, 2017"
},
{
"code": null,
"e": 364,
"s": 54,
"text": "Given an array of n string containing lowercase letters. Find the size of largest subset of string which are anagram of each others. An anagram of a string is another string ... |
Implementation of Affine Cipher | 07 Jul, 2022
The Affine cipher is a type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using a simple mathematical function, and converted back to a letter. The formula used means that each letter encrypts to one other letter, and back again, me... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 671,
"s": 54,
"text": "The Affine cipher is a type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using a simple mathematic... |
Materialize CSS Icons | 16 May, 2022
Materialize CSS provides a rich set of material icons of google which can be downloaded from Material Design specs. Icon libraries that are supported by materialize css are Google Material Icons, Font Awesome Icons and Bootstrap Icons. Different icons can be selected from Material Icons.
Library and Usage:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2022"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "Materialize CSS provides a rich set of material icons of google which can be downloaded from Material Design specs. Icon libraries that are supported by materialize css are Go... |
How to convert unstructured data to structured data using Python ? | 21 Apr, 2022
Prerequisite: What is Unstructured Data?
Sometimes machine generates data in an unstructured way which is less interpretable. For example, Biometric Data, where an employee does Punch – IN or OUT several times with mistakes. We can not analyze the data and identify the mistakes unless it’s in a tabular for... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2022"
},
{
"code": null,
"e": 69,
"s": 28,
"text": "Prerequisite: What is Unstructured Data?"
},
{
"code": null,
"e": 456,
"s": 69,
"text": "Sometimes machine generates data in an unstructured way which is le... |
equals() on String and StringBuffer objects in Java | 08 Jul, 2021
Consider the following codes in java:
Java
// This program prints falseclass GFG { public static void main(String[] args) { StringBuffer sb1 = new StringBuffer("GFG"); StringBuffer sb2 = new StringBuffer("GFG"); System.out.println(sb1.equals(sb2)); }}
false
Java
// This program prints truec... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 93,
"s": 53,
"text": "Consider the following codes in java: "
},
{
"code": null,
"e": 98,
"s": 93,
"text": "Java"
},
{
"code": "// This program prints falseclass GFG { ... |
Batch Script - Quick Guide | Batch Script is incorporated to automate command sequences which are repetitive in nature. Scripting is a way by which one can alleviate this necessity by automating these command sequences in order to make one’s life at the shell easier and more productive. In most organizations, Batch Script is incorporated in some w... | [
{
"code": null,
"e": 2524,
"s": 2169,
"text": "Batch Script is incorporated to automate command sequences which are repetitive in nature. Scripting is a way by which one can alleviate this necessity by automating these command sequences in order to make one’s life at the shell easier and more produc... |
Stock Price Prediction Based on Deep Learning | by Abhijit Roy | Towards Data Science | The stock market is known as a place where people can make a fortune if they can crack the mantra to successfully predict stock prices. Though it’s impossible to predict a stock price correctly most the time. So, the question arises, if humans can estimate and consider all factors to predict a movement or a future valu... | [
{
"code": null,
"e": 735,
"s": 172,
"text": "The stock market is known as a place where people can make a fortune if they can crack the mantra to successfully predict stock prices. Though it’s impossible to predict a stock price correctly most the time. So, the question arises, if humans can estimat... |
Count of substrings of a binary string containing K ones in C++ | We are given a string of binary numbers i.e. combination of 0’s and 1’s and an integer value k and the task is to calculate the count of substrings formed with the given binary string having given k 1’s.
Input − string str = ‘10000100000’, k = 2
Output − Count of substrings of a binary string containing K ones are − 6
... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "We are given a string of binary numbers i.e. combination of 0’s and 1’s and an integer value k and the task is to calculate the count of substrings formed with the given binary string having given k 1’s."
},
{
"code": null,
"e": 1308,
"s... |
Hadoop - Streaming | Hadoop streaming is a utility that comes with the Hadoop distribution. This utility allows you to create and run Map/Reduce jobs with any executable or script as the mapper and/or the reducer.
For Hadoop streaming, we are considering the word-count problem. Any job in Hadoop must have two phases: mapper and reducer. We... | [
{
"code": null,
"e": 2044,
"s": 1851,
"text": "Hadoop streaming is a utility that comes with the Hadoop distribution. This utility allows you to create and run Map/Reduce jobs with any executable or script as the mapper and/or the reducer."
},
{
"code": null,
"e": 2309,
"s": 2044,
... |
How to remove all the elements from a set in javascript? | The Set class in JavaScript provides a clear method to remove all elements from a given set object. This method can be used as follows −
let mySet = new Set();
mySet.add(1);
mySet.add(2);
mySet.add(1);
mySet.add(3);
mySet.add("a");
console.log(mySet)
mySet.clear();
console.log(mySet)
Set { 1, 2, 3, 'a' }
Set { }
You ca... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "The Set class in JavaScript provides a clear method to remove all elements from a given set object. This method can be used as follows −"
},
{
"code": null,
"e": 1347,
"s": 1199,
"text": "let mySet = new Set();\nmySet.add(1);\nmySet.... |
How to handle Null values while working with JDBC? | SQL's use of NULL values and Java's use of null are different concepts. So, to handle SQL NULL values in Java, there are three tactics you can use:
Avoid using getXXX( ) methods that return primitive data types.
Avoid using getXXX( ) methods that return primitive data types.
Use wrapper classes for primitive data types... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "SQL's use of NULL values and Java's use of null are different concepts. So, to handle SQL NULL values in Java, there are three tactics you can use:"
},
{
"code": null,
"e": 1274,
"s": 1210,
"text": "Avoid using getXXX( ) methods that... |
Matplotlib.dates.epoch2num() in Python - GeeksforGeeks | 19 Apr, 2020
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.dates.epoch2num() function is used to convert an epoch or a sequence of epochs t... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 24542,
"s": 24330,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays an... |
GATE | GATE-CS-2000 | Question 49 - GeeksforGeeks | 28 Jun, 2021
Let m[0]...m[4] be mutexes (binary semaphores) and P[0] .... P[4] be processes.Suppose each process P[i] executes the following:
wait (m[i]); wait(m[(i+1) mode 4]);
------
release (m[i]); release (m[(i+1)mod 4]);
This could cause:(A) Thrashing(B) Deadlock(C) Starvation, but not deadlock(D) None of... | [
{
"code": null,
"e": 24386,
"s": 24358,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24515,
"s": 24386,
"text": "Let m[0]...m[4] be mutexes (binary semaphores) and P[0] .... P[4] be processes.Suppose each process P[i] executes the following:"
},
{
"code": null,
"e... |
Python - Find the number of prime numbers within a given range of numbers | When it is required to find the prime numbers within a given range of numbers, the range is entered and it is iterated over. The ‘%’ modulus operator is used to find the prime numbers.
Below is a demonstration of the same
lower_range = 670
upper_range = 699
print("The lower and upper range are :")
print(lower_range, up... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "When it is required to find the prime numbers within a given range of numbers, the range is entered and it is iterated over. The ‘%’ modulus operator is used to find the prime numbers."
},
{
"code": null,
"e": 1284,
"s": 1247,
"text"... |
Create a directory in Java | A directory can be created with the required abstract path name using the method java.io.File.mkdir(). This method requires no parameters and it returns true on the success of the directory creation or false otherwise.
A program that demonstrates this is given as follows −
Live Demo
import java.io.File;
public class D... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "A directory can be created with the required abstract path name using the method java.io.File.mkdir(). This method requires no parameters and it returns true on the success of the directory creation or false otherwise."
},
{
"code": null,
"e... |
Deep Learning for Self-Driving Cars | by Manajit Pal | Towards Data Science | Thanks a lot to Valohai for using my rusty tutorial as an intro to their awesome machine learning platform 😍. I would suggest you all to check out their example on how to train the network on the cloud with full version control by using the Valohai machine learning platform (www.valohai.com).
We all know self-driving ... | [
{
"code": null,
"e": 465,
"s": 171,
"text": "Thanks a lot to Valohai for using my rusty tutorial as an intro to their awesome machine learning platform 😍. I would suggest you all to check out their example on how to train the network on the cloud with full version control by using the Valohai machi... |
GATE | GATE CS 2010 | Question 65 - GeeksforGeeks | 28 Jun, 2021
In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child?(A) 0(B) 1(C) (n-1)/2(D) n-1Answer: (A)Explanation: It is mentioned that each node has odd number of descendants... | [
{
"code": null,
"e": 24446,
"s": 24418,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24958,
"s": 24446,
"text": "In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the t... |
Using Docopt in python, the most user-friendly command-line parsing library | by Jonathan Leban | Towards Data Science | When you work on file which deals with many arguments, it is time consuming and not user friendly to always change those arguments inside the python file. Some libraries have been implemented to solve this problem, known as command line parsing library. In python, they are three different solutions: Docopt, Argparse an... | [
{
"code": null,
"e": 501,
"s": 172,
"text": "When you work on file which deals with many arguments, it is time consuming and not user friendly to always change those arguments inside the python file. Some libraries have been implemented to solve this problem, known as command line parsing library. I... |
C Program to find transpose of a matrix - GeeksforGeeks | 07 Nov, 2018
Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i].
For Square Matrix :
The below program finds transpose of A[][] and stores the result in B[][], we can change N for different dimension.
#include ... | [
{
"code": null,
"e": 24604,
"s": 24576,
"text": "\n07 Nov, 2018"
},
{
"code": null,
"e": 24766,
"s": 24604,
"text": "Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i]."
... |
Residual blocks — Building blocks of ResNet | by Sabyasachi Sahoo | Towards Data Science | Understanding a residual block is quite easy. In traditional neural networks, each layer feeds into the next layer. In a network with residual blocks, each layer feeds into the next layer and directly into the layers about 2–3 hops away. That’s it. But understanding the intuition behind why it was required in the first... | [
{
"code": null,
"e": 933,
"s": 172,
"text": "Understanding a residual block is quite easy. In traditional neural networks, each layer feeds into the next layer. In a network with residual blocks, each layer feeds into the next layer and directly into the layers about 2–3 hops away. That’s it. But un... |
Batch Script - RD | This batch command removes directories, but the directories need to be empty before they can be removed.
rd [directoryname]
The following example shows the different variants of the rd command.
@echo off
Rem removes the directory called newdir
rd C:\newdir
Rem removes 2 directories
rd Dir1 Dir2
Rem Removes directory... | [
{
"code": null,
"e": 2274,
"s": 2169,
"text": "This batch command removes directories, but the directories need to be empty before they can be removed."
},
{
"code": null,
"e": 2294,
"s": 2274,
"text": "rd [directoryname]\n"
},
{
"code": null,
"e": 2364,
"s": 2294... |
Jackson Annotations - @JsonCreator | @JsonCreator is used to fine tune the constructor or factory method used in deserialization. We'll be using @JsonProperty as well to achieve the same. In the example below, we are matching an json with different format to our class by defining the required property names.
import java.io.IOException;
import java.text.P... | [
{
"code": null,
"e": 2748,
"s": 2475,
"text": "@JsonCreator is used to fine tune the constructor or factory method used in deserialization. We'll be using @JsonProperty as well to achieve the same. In the example below, we are matching an json with different format to our class by defining the requi... |
Python program for addition and subtraction of complex numbers - GeeksforGeeks | 13 Dec, 2021
Given two complex numbers z1 and z2. The task is to add and subtract the given complex numbers.Addition of complex number: In Python, complex numbers can be added using + operator.Examples:
Input: 2+3i, 4+5i
Output: Addition is : 6+8i
Input: 2+3i, 1+2i
Output: Addition is : 3+5i
Example :
Python3
# Py... | [
{
"code": null,
"e": 24819,
"s": 24791,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 25011,
"s": 24819,
"text": "Given two complex numbers z1 and z2. The task is to add and subtract the given complex numbers.Addition of complex number: In Python, complex numbers can be added ... |
Difference between Abstract Class and Interface in Java | Following are the notable differences between interface and abstract class in Java.
public class Tester {
public static void main(String[] args) {
Car car = new Car();
car.setFuel();
car.run();
Truck truck = new Truck();
truck.setFuel();
truck.run();
}
}
interface Vehicle {
... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "Following are the notable differences between interface and abstract class in Java."
},
{
"code": null,
"e": 1876,
"s": 1146,
"text": "public class Tester {\n public static void main(String[] args) {\n\n Car car = new Car();\n... |
Python | Remove last element from each row in Matrix - GeeksforGeeks | 30 Dec, 2020
Sometimes, while working with Matrix data, we can have a stray element attached at rear end of each row of matrix. This can be undesired at times and wished to be removed. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using loop + del + list slicingThe combination of above fun... | [
{
"code": null,
"e": 24099,
"s": 24071,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 24335,
"s": 24099,
"text": "Sometimes, while working with Matrix data, we can have a stray element attached at rear end of each row of matrix. This can be undesired at times and wished to be ... |
Machine Learning Classification Project: Finding Donors | by Victor Roman | Towards Data Science | In this project, we will use a number of different supervised algorithms to precisely predict individuals’ income using data collected from the 1994 U.S. Census.
We will then choose the best candidate algorithm from preliminary results and further optimize this algorithm to best model the data. Our goal with this imple... | [
{
"code": null,
"e": 334,
"s": 172,
"text": "In this project, we will use a number of different supervised algorithms to precisely predict individuals’ income using data collected from the 1994 U.S. Census."
},
{
"code": null,
"e": 594,
"s": 334,
"text": "We will then choose the ... |
How to convert data.table object into a matrix in R? | A data.table object is very similar to a data frame in R, therefore, converting a data.table object to a matrix is not a difficult job. We just need to use as.matrix function and store the data.table object into a new object that will belong to the matrix, otherwise R will not be able to convert the data.object to a ma... | [
{
"code": null,
"e": 1508,
"s": 1062,
"text": "A data.table object is very similar to a data frame in R, therefore, converting a data.table object to a matrix is not a difficult job. We just need to use as.matrix function and store the data.table object into a new object that will belong to the matr... |
Free base-maps for static maps using Geopandas and Contextily | by Wathela Hamed | Towards Data Science | Contextily is a package for contextual tiles in Python. In this quick tutorial, I am going to show you how to use contextily along with Geopandas in Jupyter Notebook to produce some nice maps. First of all, we need to make sure these packages are installed, go to your anaconda prompt and type:
conda install -c conda-fo... | [
{
"code": null,
"e": 466,
"s": 171,
"text": "Contextily is a package for contextual tiles in Python. In this quick tutorial, I am going to show you how to use contextily along with Geopandas in Jupyter Notebook to produce some nice maps. First of all, we need to make sure these packages are installe... |
Anonymous classes in C++ | Anonymous entity is anything that is defined without a name. A class with no name provided is known as an anonymous class in c++. An anonymous class is a special class with one basic property.
As there is no name given to the class there is no constructor allocated to it, though a destructor is there for deallocating t... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "Anonymous entity is anything that is defined without a name. A class with no name provided is known as an anonymous class in c++. An anonymous class is a special class with one basic property."
},
{
"code": null,
"e": 1399,
"s": 1255,
... |
Finding Position | Practice | GeeksforGeeks | Some people(n) are standing in a queue. A selection process follows a rule where people standing on even positions are selected. Of the selected people a queue is formed and again out of these only people on even position are selected. This continues until we are left with one person. Find out the position of that pers... | [
{
"code": null,
"e": 596,
"s": 238,
"text": "Some people(n) are standing in a queue. A selection process follows a rule where people standing on even positions are selected. Of the selected people a queue is formed and again out of these only people on even position are selected. This continues unti... |
Use Environment Variable in your next Golang Project | by Shubham Chadokar | Towards Data Science | When it comes to creating a production-grade application, using the environment variable in the application is de facto.
Read my Latest articles here.
Suppose you have an application with many features and each feature need to access the Database. You configured all the DB information like DBURL, DBNAME, USERNAME and P... | [
{
"code": null,
"e": 293,
"s": 172,
"text": "When it comes to creating a production-grade application, using the environment variable in the application is de facto."
},
{
"code": null,
"e": 323,
"s": 293,
"text": "Read my Latest articles here."
},
{
"code": null,
"e"... |
How to use Boto3 to start a crawler in AWS Glue Data Catalog | In this article, we will see how a user can start a crawler in AWS Glue Data Catalog.
Problem Statement: Use boto3 library in Python to start a crawler.
Step 1: Import boto3 and botocore exceptions to handle exceptions
Step 1: Import boto3 and botocore exceptions to handle exceptions
Step 2:
crawler_name is the paramet... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "In this article, we will see how a user can start a crawler in AWS Glue Data Catalog."
},
{
"code": null,
"e": 1215,
"s": 1148,
"text": "Problem Statement: Use boto3 library in Python to start a crawler."
},
{
"code": null,
... |
How to resize an Entry Box by height in Tkinter? | An Entry widget in a Tkinter application supports singleline user inputs. You can configure the size of an Entry widget such as its width using the width property. However, tkinter has no height property to set the height of an Entry widget. To set the height, you can use the font('font_name', font-size) property. The ... | [
{
"code": null,
"e": 1469,
"s": 1062,
"text": "An Entry widget in a Tkinter application supports singleline user inputs. You can configure the size of an Entry widget such as its width using the width property. However, tkinter has no height property to set the height of an Entry widget. To set the ... |
Clean Up Data Noise with Fourier Transform in Python | by Andrew Zhu | Towards Data Science | Fourier Transform is a powerful way to view data from a completely different perspective: From the time-domain to the frequency-domain. But this powerful operation looks scary with its math equations.
Transform time-domain wave to frequency-domain:
The image below is a good one to illustrate the Fourier Transform: deco... | [
{
"code": null,
"e": 372,
"s": 171,
"text": "Fourier Transform is a powerful way to view data from a completely different perspective: From the time-domain to the frequency-domain. But this powerful operation looks scary with its math equations."
},
{
"code": null,
"e": 420,
"s": 372... |
Count the number of threads in a process on linux | Linux process can be visualized as a running instance of a program where each thread in the Linux is nothing but a flow of execution of the processes. Do you know how to see the number of threads per process on Linux environment? There are several ways to count the number of threads. This article deals with, how to rea... | [
{
"code": null,
"e": 1478,
"s": 1062,
"text": "Linux process can be visualized as a running instance of a program where each thread in the Linux is nothing but a flow of execution of the processes. Do you know how to see the number of threads per process on Linux environment? There are several ways ... |
Count total set bits in all numbers from 1 to n | Set 2 - GeeksforGeeks | 18 Nov, 2021
Given a positive integer N, the task is to count the sum of the number of set bits in the binary representation of all the numbers from 1 to N.Examples:
Input: N = 3 Output: 4
1 + 1 + 2 = 4Input: N = 16 Output: 33
Approach: Some other approaches to solve this problem has been discussed here. In thi... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 25064,
"s": 24909,
"text": "Given a positive integer N, the task is to count the sum of the number of set bits in the binary representation of all the numbers from 1 to N.Examples: "
},
... |
How to Create a Random Graph Using Random Edge Generation in Java? - GeeksforGeeks | 08 Dec, 2020
We know that Graph is a data structure that consists of a finite set of vertices and edges(that connect the vertices with each other). A graph can be directed(edges having a direction) or undirected(edges with no directions). However, a Random graph is a graph data structure that is generated randomly. Ran... | [
{
"code": null,
"e": 24259,
"s": 24231,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 24808,
"s": 24259,
"text": "We know that Graph is a data structure that consists of a finite set of vertices and edges(that connect the vertices with each other). A graph can be directed(edge... |
Basic Calculator in C++ | Suppose we want to create one basic calculator that will find the basic expression result. The expression can hold opening and closing parentheses, plus or minus symbol and empty spaces.
So if the string is like “5 + 2 - 3”, then the result will be 7
To solve this, we will follow these steps −
ret := 0, sign := 1, num ... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "Suppose we want to create one basic calculator that will find the basic expression result. The expression can hold opening and closing parentheses, plus or minus symbol and empty spaces."
},
{
"code": null,
"e": 1313,
"s": 1249,
"tex... |
How to create an array for JSON using PHP? - GeeksforGeeks | 03 Dec, 2021
In this article, we will see how to create an array for the JSON in PHP, & will see its implementation through examples.
Array: Arrays in PHP is a type of data structure that allows us to store multiple elements of similar data type under a single variable thereby saving us the effort of creating a differe... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 24702,
"s": 24581,
"text": "In this article, we will see how to create an array for the JSON in PHP, & will see its implementation through examples."
},
{
"code": null,
"e": 25145... |
How to detect page zoom level in all modern browsers using JavaScript ? - GeeksforGeeks | 15 Jul, 2020
In this article, we will discuss how the current amount of zoom can be found on a webpage.
Method 1: Using outerWidth and innerWidth Property: It is easier to detect the zoom level in webkit browsers like Chrome and Microsoft Edge. This method uses the outerWidth and innerWidthproperties, which are the inb... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 26822,
"s": 26731,
"text": "In this article, we will discuss how the current amount of zoom can be found on a webpage."
},
{
"code": null,
"e": 27198,
"s": 26822,
"text": ... |
ReactJS Reactstrap Progress 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 Progress component allows the user to display the current progress of an operation flow. We can use the following approach in ReactJS to use ... | [
{
"code": null,
"e": 26557,
"s": 26529,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 26907,
"s": 26557,
"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... |
BufferedWriter close() method in Java with Examples - GeeksforGeeks | 28 May, 2020
The close() method of BufferedWriter class in Java is used to flush the characters from the buffer stream and then close it. Once the stream is closed further calling the methods like write() and append() will throw the exception.
Syntax:
public void close()
Parameters: This method does not accept any par... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 25578,
"s": 25347,
"text": "The close() method of BufferedWriter class in Java is used to flush the characters from the buffer stream and then close it. Once the stream is closed further call... |
Matplotlib - Working With Text | Matplotlib has extensive text support, including support for mathematical expressions, TrueType support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. Matplotlib includes its own matplotlib.font_manager which implements a cross platform, W3C compliant font finding a... | [
{
"code": null,
"e": 2846,
"s": 2516,
"text": "Matplotlib has extensive text support, including support for mathematical expressions, TrueType support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. Matplotlib includes its own matplotlib.font_mana... |
Interfacing ESP32 with Analog Sensors | Another important category of sensors that you need to interface with ESP32 is analog sensors. There are many types of analog sensors, LDRs (Light Dependent Resistors), current and voltage sensors being popular examples. Now,
if you are familiar with how analogRead works on any Arduino board, like Arduino Uno, then th... | [
{
"code": null,
"e": 2672,
"s": 2183,
"text": "Another important category of sensors that you need to interface with ESP32 is analog sensors. There are many types of analog sensors, LDRs (Light Dependent Resistors), current and voltage sensors being popular examples. Now, \nif you are familiar with ... |
K nearest neighbors, it’s purpose and how to use it | by Robert Miller | Towards Data Science | For those of you who don’t know what k nearest neighbors is, it is a predictive model. Whats its purpose, why use it? Those are the questions we will delve into in this post.
In order for this model to work the data must have a notion of distance. In laymens terms, we need to be able to graph our data.
This model will ... | [
{
"code": null,
"e": 221,
"s": 46,
"text": "For those of you who don’t know what k nearest neighbors is, it is a predictive model. Whats its purpose, why use it? Those are the questions we will delve into in this post."
},
{
"code": null,
"e": 350,
"s": 221,
"text": "In order for... |
numpy.char.split() | This function returns a list of words in the input string. By default, a whitespace is used as a separator. Otherwise the specified separator character is used to spilt the string.
import numpy as np
print np.char.split ('hello how are you?')
print np.char.split ('TutorialsPoint,Hyderabad,Telangana', sep = ',')
Its o... | [
{
"code": null,
"e": 2424,
"s": 2243,
"text": "This function returns a list of words in the input string. By default, a whitespace is used as a separator. Otherwise the specified separator character is used to spilt the string."
},
{
"code": null,
"e": 2558,
"s": 2424,
"text": "i... |
sigaction() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
SQL | Query to select NAME from table using different options - GeeksforGeeks | 19 Aug, 2020
Let us consider the following table named “Geeks” :
SQL query to write “FIRSTNAME” from Geeks table using the alias name as NAME.
Select FIRSTNAME AS NAME
from Geeks;
Output –
SQL query to write “FIRSTNAME” from Geeks table in upper case.
Select upper(FIRSTNAME)
from Geeks;
Output –
SQL query to find the... | [
{
"code": null,
"e": 23891,
"s": 23863,
"text": "\n19 Aug, 2020"
},
{
"code": null,
"e": 23943,
"s": 23891,
"text": "Let us consider the following table named “Geeks” :"
},
{
"code": null,
"e": 24021,
"s": 23943,
"text": "SQL query to write “FIRSTNAME” from Ge... |
Check which column names contain a specific string in R data frame. | If we have a data frame that contains columns having names with some commong
strings then we might want to find those column names. For this purpose, we can use
grepl function for subsetting along with colnames function.
Check out the Examples given below to understand how it can be done.
Following snippet creates a sa... | [
{
"code": null,
"e": 1283,
"s": 1062,
"text": "If we have a data frame that contains columns having names with some commong\nstrings then we might want to find those column names. For this purpose, we can use\ngrepl function for subsetting along with colnames function."
},
{
"code": null,
... |
Heterogeneous Arrays in Data Sturcture | As we know the arrays are homogeneous by definition. So we have to put data of same type in an array. But if we want to store data of different type, then what will be the trick? In C like old languages, we can use unions to artificially coalesce the different types into one type. Then we can define an array on this ne... | [
{
"code": null,
"e": 1515,
"s": 1062,
"text": "As we know the arrays are homogeneous by definition. So we have to put data of same type in an array. But if we want to store data of different type, then what will be the trick? In C like old languages, we can use unions to artificially coalesce the di... |
How to identify the difference between Kolmogorov Smirnov test and Chi Square Goodness of fit test in R? | The Chi Square Goodness of fit test is used to test whether the distribution of nominal variables is same or not as well as for other distribution matches and on the other hand the Kolmogorov Smirnov test is only used to test to the goodness of fit for a continuous data. The difference is not about the programming tool... | [
{
"code": null,
"e": 1415,
"s": 1062,
"text": "The Chi Square Goodness of fit test is used to test whether the distribution of nominal variables is same or not as well as for other distribution matches and on the other hand the Kolmogorov Smirnov test is only used to test to the goodness of fit for ... |
How to use CSS style in PowerShell HTML Output? | Cascading Style Sheets (CSS) in general used for formatting HTML with styles. It describes how the HTML elements should be displayed.
Once we get the output from the Convertto-HTML command, we can use the CSS style to make the output more stylish.
Consider we have the below example for converting the services output ta... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Cascading Style Sheets (CSS) in general used for formatting HTML with styles. It describes how the HTML elements should be displayed."
},
{
"code": null,
"e": 1310,
"s": 1196,
"text": "Once we get the output from the Convertto-HTML c... |
How do I put a border around an Android textview? | If you wants to see text view as 3D view as we seen in Microsoft power point 3d texts. This example demonstrate
about how do I put a border around an Android text view.
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 follo... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "If you wants to see text view as 3D view as we seen in Microsoft power point 3d texts. This example demonstrate\nabout how do I put a border around an Android text view."
},
{
"code": null,
"e": 1360,
"s": 1231,
"text": "Step 1 − Cre... |
PyTorch [Tabular] — Binary Classification | by Akshaj Verma | Towards Data Science | We will use the lower back pain symptoms dataset available on Kaggle. This dataset has 13 columns where the first 12 are the features and the last column is the target column. The data set has 300 rows.
import numpy as npimport pandas as pdimport seaborn as snsimport matplotlib.pyplot as pltimport torchimport torch.nn ... | [
{
"code": null,
"e": 250,
"s": 47,
"text": "We will use the lower back pain symptoms dataset available on Kaggle. This dataset has 13 columns where the first 12 are the features and the last column is the target column. The data set has 300 rows."
},
{
"code": null,
"e": 619,
"s": 25... |
Count Distinct Non-Negative Integer Pairs (x, y) that Satisfy the Inequality x*x + y*y < n - GeeksforGeeks | 03 Nov, 2021
Given a positive number n, count all distinct Non-Negative Integer pairs (x, y) that satisfy the inequality x*x + y*y < n.
Examples:
Input: n = 5
Output: 6
The pairs are (0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (0, 2)
Input: n = 6
Output: 8
The pairs are (0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (0, 2),
... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 26195,
"s": 26071,
"text": "Given a positive number n, count all distinct Non-Negative Integer pairs (x, y) that satisfy the inequality x*x + y*y < n. "
},
{
"code": null,
"e": 26... |
Create empty DataFrame with only column names in R - GeeksforGeeks | 05 Apr, 2021
In this article, we are going to create an empty data frame with column names in the R programming language.
The basic syntax for creating a data frame is using data.frame().
Syntax: data.frame(input_data,nrow,ncol)
Parameter:
input_data may be values ot list or vector.
nrow specifies the number of rows
nc... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 25351,
"s": 25242,
"text": "In this article, we are going to create an empty data frame with column names in the R programming language."
},
{
"code": null,
"e": 25417,
"s": 2... |
How to create a collapsible section using CSS and JavaScript ? - GeeksforGeeks | 30 Jun, 2020
Collapsible sections are sections of content that can shrink and expand by clicking on them. They are a popular way to organize content in such a manner that the user will be able to see the content of a section only if he wishes. In this article, we will learn how to create a simple collapsible section us... | [
{
"code": null,
"e": 27085,
"s": 27057,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 27416,
"s": 27085,
"text": "Collapsible sections are sections of content that can shrink and expand by clicking on them. They are a popular way to organize content in such a manner that the u... |
Explain the visibility of global variables in imported modules in Python? | Globals in Python are global to a module, not across all modules. (Unlike C, where a global is the same across all implementation files unless you explicitly make it static.). If you need truly global variables from imported modules, you can set those at an attribute of the module where you're importing it.
import modu... | [
{
"code": null,
"e": 1371,
"s": 1062,
"text": "Globals in Python are global to a module, not across all modules. (Unlike C, where a global is the same across all implementation files unless you explicitly make it static.). If you need truly global variables from imported modules, you can set those a... |
AWK - Control Flow | Like other programming languages, AWK provides conditional statements to control the flow of a program. This chapter explains AWK's control statements with suitable examples.
It simply tests the condition and performs certain actions depending upon the condition. Given below is the syntax of if statement −
if (conditio... | [
{
"code": null,
"e": 2032,
"s": 1857,
"text": "Like other programming languages, AWK provides conditional statements to control the flow of a program. This chapter explains AWK's control statements with suitable examples."
},
{
"code": null,
"e": 2165,
"s": 2032,
"text": "It simp... |
Difference between Java and JavaScript - GeeksforGeeks | 26 Nov, 2021
In this article, we will know about Java & Javascript, & also see the significant distinction between Java & Javascript.
JavaScript:JavaScript is a lightweight programming language(“scripting language”) and is used to make web pages interactive. It can insert dynamic text into HTML. JavaScript is also know... | [
{
"code": null,
"e": 24714,
"s": 24686,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 24835,
"s": 24714,
"text": "In this article, we will know about Java & Javascript, & also see the significant distinction between Java & Javascript."
},
{
"code": null,
"e": 25246... |
jQuery - filter( fn ) Method | The filter( fn ) method filters all elements from the set of matched elements that do not match the specified function.
Here is the simple syntax to use this method −
selector.filter( selector )
Here is the description of all the parameters used by this method −
fn − The function is called with a context equal to the ... | [
{
"code": null,
"e": 2442,
"s": 2322,
"text": "The filter( fn ) method filters all elements from the set of matched elements that do not match the specified function."
},
{
"code": null,
"e": 2489,
"s": 2442,
"text": "Here is the simple syntax to use this method −"
},
{
"... |
Email Template using HTML and CSS - GeeksforGeeks | 30 Aug, 2019
Have you ever wondered how one can send creative colorful email templates? In this article, we will create a basic email template using HTML and CSS. These email templates are generally designed for marketing purpose and are circulated through email campaigns.The main purpose of sending an email template i... | [
{
"code": null,
"e": 25158,
"s": 25130,
"text": "\n30 Aug, 2019"
},
{
"code": null,
"e": 25625,
"s": 25158,
"text": "Have you ever wondered how one can send creative colorful email templates? In this article, we will create a basic email template using HTML and CSS. These email t... |
How to change the Entry Widget Value with a Scale in Tkinter? | Tkinter Entry widget is an input widget that supports only single-line user input. It accepts all the characters in the text field unless or until there are no restrictions set for the input. We can change the value of the Entry widget with the help of the Scale widget. The Scale widget contains a lower value and a thr... | [
{
"code": null,
"e": 1453,
"s": 1062,
"text": "Tkinter Entry widget is an input widget that supports only single-line user input. It accepts all the characters in the text field unless or until there are no restrictions set for the input. We can change the value of the Entry widget with the help of ... |
How to make a 4D plot with Matplotlib using arbitrary data? | To make a 4D plot, we can create x, y, z and c standard data points. Create a new figure or activate an existing figure.
Use figure() method to create a figure or activate an existing figure.
Use figure() method to create a figure or activate an existing figure.
Add a figure as part of a subplot arrangement.
Add a figu... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "To make a 4D plot, we can create x, y, z and c standard data points. Create a new figure or activate an existing figure."
},
{
"code": null,
"e": 1254,
"s": 1183,
"text": "Use figure() method to create a figure or activate an existin... |
GATE | GATE CS 2011 | Question 65 - GeeksforGeeks | 22 Jul, 2021
Consider the following table of arrival time and burst time for three processes P0, P1 and P2.
Process Arrival time Burst Time
P0 0 ms 9 ms
P1 1 ms 4 ms
P2 2 ms 9 ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling i... | [
{
"code": null,
"e": 24218,
"s": 24190,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24313,
"s": 24218,
"text": "Consider the following table of arrival time and burst time for three processes P0, P1 and P2."
},
{
"code": null,
"e": 24448,
"s": 24313,
"tex... |
How to Change or Set System Locales in Linux? - GeeksforGeeks | 26 Mar, 2021
Locale is basically a set of environmental variables that defines the user’s language, region, and any special variant preferences that the user wants to see in their Linux interface. System libraries and locale-aware applications on the system use these environmental variables.
Locale settings usually con... | [
{
"code": null,
"e": 26748,
"s": 26720,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 27028,
"s": 26748,
"text": "Locale is basically a set of environmental variables that defines the user’s language, region, and any special variant preferences that the user wants to see in th... |
Python | Set Background Template in kivy - GeeksforGeeks | 10 Feb, 2020
Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications.
Setting a good background template is a good thing to make your app loo... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n10 Feb, 2020"
},
{
"code": null,
"e": 25883,
"s": 25647,
"text": "Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android applicatio... |
Find last digit in factorial - GeeksforGeeks | 26 Feb, 2021
Given a number n, we need to find the last digit in factorial n.
Input : n = 4Output : 44! = 4 * 3 * 2 * 1. = 24. Last digit of 24 is 4.
Input : n = 5Output : 55! = 5*4 * 3 * 2 * 1. = 120. Last digit of 120 is 0.
A Naive Solution is to first compute fact = n!, then return the last digit of the result b... | [
{
"code": null,
"e": 25070,
"s": 25042,
"text": "\n26 Feb, 2021"
},
{
"code": null,
"e": 25135,
"s": 25070,
"text": "Given a number n, we need to find the last digit in factorial n."
},
{
"code": null,
"e": 25209,
"s": 25135,
"text": "Input : n = 4Output : 44!... |
JavaScript SyntaxError - Missing ; before statement - GeeksforGeeks | 24 Jul, 2020
This JavaScript exception missing ; before statement occurs if there is a semicolon (;) missing in script.
Message:
SyntaxError: Expected ';' (Edge)
SyntaxError: missing ; before statement (Firefox)
Error Type:
SyntaxError
Cause of Error: Somewhere in code, there is a missing semicolon (;). You need to p... | [
{
"code": null,
"e": 26655,
"s": 26627,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 26762,
"s": 26655,
"text": "This JavaScript exception missing ; before statement occurs if there is a semicolon (;) missing in script."
},
{
"code": null,
"e": 26771,
"s": 267... |
What is the difference between break and continue statements in JavaScript? | The break statement is used to exit a loop early, breaking out of the enclosing curly braces. The break statement exits out of a loop.
Let’s see an example of break statement in JavaScript. The following example illustrates the use of a break statement with a while loop. Notice how the loop breaks out early once x r... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "The break statement is used to exit a loop early, breaking out of the enclosing curly braces. The break statement exits out of a loop. "
},
{
"code": null,
"e": 1475,
"s": 1200,
"text": "Let’s see an example of break statement in J... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.