title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Java – Lambda Expressions Parameters | 24 Jun, 2022
Lambda Expressions are anonymous functions. These functions do not need a name or a class to be used. Lambda expressions are added in Java 8. Lambda expressions basically express instances of functional interfaces An interface with a single abstract method is called a functional interface. One example is j... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 379,
"s": 53,
"text": "Lambda Expressions are anonymous functions. These functions do not need a name or a class to be used. Lambda expressions are added in Java 8. Lambda expressions basically exp... |
Python datetime module | 17 Nov, 2021
In Python, date and time are not a data type of their own, but a module named datetime can be imported to work with the date as well as time. Python Datetime module comes built into Python, so there is no need to install it externally.
Python Datetime module supplies classes to work with date and time. Th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 291,
"s": 54,
"text": "In Python, date and time are not a data type of their own, but a module named datetime can be imported to work with the date as well as time. Python Datetime module comes bui... |
How to access the JSON fields, arrays and nested objects of JsonNode in Java?
| A JsonNode is Jackson's tree model for JSON and it can read JSON into a JsonNode instance and write a JsonNode out to JSON. To read JSON into a JsonNode with Jackson by creating ObjectMapper instance and call the readValue() method. We can access a field, array or nested object using the get() method of JsonNode class.... | [
{
"code": null,
"e": 1670,
"s": 1187,
"text": "A JsonNode is Jackson's tree model for JSON and it can read JSON into a JsonNode instance and write a JsonNode out to JSON. To read JSON into a JsonNode with Jackson by creating ObjectMapper instance and call the readValue() method. We can access a fiel... |
Python String Concatenation | 24 Aug, 2021
In Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets [] can be used to access elements of the string.Example:
Python3
# Python program to demonstrate# strings ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 310,
"s": 52,
"text": "In Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have a character data type, a single character is simply a string with a leng... |
Java Program to check if two dates are equal | Let us first declare objects of LocalDate −
LocalDate dateOne = LocalDate.now();
LocalDate dateTwo = LocalDate.of(dateOne.getYear(), dateOne.getMonth(), dateOne.getDayOfMonth());
Let us now use the equals () method to check if both the dates are same or not −
if (dateOne.equals(dateTwo)) {
System.out.printf("\nBoth ... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "Let us first declare objects of LocalDate −"
},
{
"code": null,
"e": 1143,
"s": 1106,
"text": "LocalDate dateOne = LocalDate.now();"
},
{
"code": null,
"e": 1241,
"s": 1143,
"text": "LocalDate dateTwo = LocalDate.... |
How to find the longest word within the string in JavaScript ? - GeeksforGeeks | 07 Apr, 2021
Given a string and the task is to find the largest word from the string using JavaScript.
Example:
Input: "This is a demo String find the largest word from it"
Output: "largest"
Input: "Hello guys this is geeksforgeeks where students learn programming"
Output: "geeksforgeeks"
To achieve this we use the f... | [
{
"code": null,
"e": 37970,
"s": 37942,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 38060,
"s": 37970,
"text": "Given a string and the task is to find the largest word from the string using JavaScript."
},
{
"code": null,
"e": 38069,
"s": 38060,
"text": "... |
How to set only numeric value for edittext in Android? | This example demonstrates how do I set only numeric value for editText in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<Rel... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrates how do I set only numeric value for editText in Android."
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
Marimekko Charts with Plotly Express | by Darío Weitz | Towards Data Science | Suppose you are involved in a business plan competition. You need to present a compelling business case because investors make their decisions based on your storytelling.
You must include visually interesting graphics and images. But this is where we can make a double mistake: 1) that the audience will see our figures ... | [
{
"code": null,
"e": 218,
"s": 47,
"text": "Suppose you are involved in a business plan competition. You need to present a compelling business case because investors make their decisions based on your storytelling."
},
{
"code": null,
"e": 657,
"s": 218,
"text": "You must include... |
Python 3 - os.mkfifo() Method | The method mkfifo() create a FIFO named path with numeric mode. The default mode is 0666 (octal).The current umask value is first masked out.
FIFOs are pipes that can be accessed like regular files. FIFOs exist until they are deleted
Following is the syntax for mkfifo() method −
os.mkfifo(path[, mode])
path − This is ... | [
{
"code": null,
"e": 2482,
"s": 2340,
"text": "The method mkfifo() create a FIFO named path with numeric mode. The default mode is 0666 (octal).The current umask value is first masked out."
},
{
"code": null,
"e": 2574,
"s": 2482,
"text": "FIFOs are pipes that can be accessed lik... |
What does Integer.parseInt() method do in Java? | This is a static method of the class named Integer it accepts an integer parameter and Parses it as a signed decimal integer.
Live Demo
public class IntegerDemo {
public static void main(String[] args) {
// parses the string argument
int a = Integer.parseInt("12");
int b = Integer.parseInt("26");
... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "This is a static method of the class named Integer it accepts an integer parameter and Parses it as a signed decimal integer."
},
{
"code": null,
"e": 1199,
"s": 1188,
"text": " Live Demo"
},
{
"code": null,
"e": 1517,
... |
How to get Day, Month and Year from Date in Java - GeeksforGeeks | 12 Jul, 2021
Given a date in the form of a string, the task is to write a Java Program to get the day, month, and year from the given date.
Examples:
Input: date = “2020-07-18”Output:Day: 18Month: JulyYear: 2020Explanation: The given date is ‘2020-07-18’, so the day is: 18, the month is: July, and the year is: 2020.
In... | [
{
"code": null,
"e": 24680,
"s": 24652,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 24807,
"s": 24680,
"text": "Given a date in the form of a string, the task is to write a Java Program to get the day, month, and year from the given date."
},
{
"code": null,
"e":... |
A Step by Step Guide to Web Scraping in Python | by Sara A. Metwalli | Towards Data Science | As data scientists, we are always on the look for new data and information to analyze and manipulate. One of the main approaches to find data right now is scraping the web for a particular inquiry.
When we browse the internet, we come across a massive number of websites, these websites display various data on the brows... | [
{
"code": null,
"e": 245,
"s": 47,
"text": "As data scientists, we are always on the look for new data and information to analyze and manipulate. One of the main approaches to find data right now is scraping the web for a particular inquiry."
},
{
"code": null,
"e": 577,
"s": 245,
... |
Merge two sorted linked lists - GeeksforGeeks | 12 Apr, 2022
Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing order. SortedMerge() should return the new list. The new list should be made by splicing together the nodes of the first two lists.
For example ... | [
{
"code": null,
"e": 24233,
"s": 24205,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 24528,
"s": 24233,
"text": "Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing ... |
Tryit Editor v3.7 | Tryit: HTML image map - circle area | [] |
Sentence Palindrome (Palindrome after removing spaces, dots, .. etc) - GeeksforGeeks | 14 Mar, 2022
Write a program to check if a sentence is a palindrome or not. You can ignore white spaces and other characters to consider sentences as palindrome.Examples:
Input : str = "Too hot to hoot."
Output : Sentence is palindrome.
Input : str = "Abc def ghi jklm."
Output : Sentence is not palindrome.
Note that ... | [
{
"code": null,
"e": 24607,
"s": 24579,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 24766,
"s": 24607,
"text": "Write a program to check if a sentence is a palindrome or not. You can ignore white spaces and other characters to consider sentences as palindrome.Examples: "
}... |
Bootstrap 4 .card-img-top class | Use the card-img-top class in Bootstrap to set the image at the top inside a card −
<img class="card-img-top" src="Image-Source" alt="ALT-TEXT" style="width:100%">
After that add the card and card body −
<div class="card-body">
<h4 class="card-title">Swift 4</h4>
<p class="card-text">Learn Swift 4</p>
<a href="#"... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "Use the card-img-top class in Bootstrap to set the image at the top inside a card −"
},
{
"code": null,
"e": 1226,
"s": 1146,
"text": "<img class=\"card-img-top\" src=\"Image-Source\" alt=\"ALT-TEXT\" style=\"width:100%\">"
},
{
... |
Difference between find() and findOne() methods in MongoDB? | The findOne() returns first document if query matches otherwise returns null. The find() method does not return null, it returns a cursor.
Let us implement the concept of find() and findOne() and create a collection with documents −
> db.createCollection('emptyCollection');
{ "ok" : 1 }
Let us count how many documents ... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "The findOne() returns first document if query matches otherwise returns null. The find() method does not return null, it returns a cursor."
},
{
"code": null,
"e": 1295,
"s": 1201,
"text": "Let us implement the concept of find() and ... |
MATLAB - Polynomials | MATLAB represents polynomials as row vectors containing coefficients ordered by descending powers. For example, the equation P(x) = x4 + 7x3 - 5x + 9 could be represented as −
p = [1 7 0 -5 9];
The polyval function is used for evaluating a polynomial at a specified value. For example, to evaluate our previous polynomi... | [
{
"code": null,
"e": 2317,
"s": 2141,
"text": "MATLAB represents polynomials as row vectors containing coefficients ordered by descending powers. For example, the equation P(x) = x4 + 7x3 - 5x + 9 could be represented as −"
},
{
"code": null,
"e": 2336,
"s": 2317,
"text": "p = [1... |
Find sum of factorials in an array - GeeksforGeeks | 15 Apr, 2021
Given an array arr[] of N integers. The task is to find the sum of factorials of each element of the array.
Examples:
Input: arr[] = {7, 3, 5, 4, 8} Output: 45510 7! + 3! + 5! + 4! + 8! = 5040 + 6 + 120 + 24 + 40320 = 45510
Input: arr[] = {2, 1, 3} Output: 9
Approach: Implement a function factorial(n) t... | [
{
"code": null,
"e": 25388,
"s": 25360,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25496,
"s": 25388,
"text": "Given an array arr[] of N integers. The task is to find the sum of factorials of each element of the array."
},
{
"code": null,
"e": 25507,
"s": 25... |
HTML contenteditable Attribute | The contenteditable attribute in HTML is used to set whether the content is editable or not using boolean values true or false. This attribute can be used with any element since it is a Global Attribute.
Following is the syntax −
<element contenteditable =”true|false”>
Above, set true if you want the element to be edit... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "The contenteditable attribute in HTML is used to set whether the content is editable or not using boolean values true or false. This attribute can be used with any element since it is a Global Attribute."
},
{
"code": null,
"e": 1292,
"s... |
How to Insert Rows with NULL Values in SQL? - GeeksforGeeks | 09 Nov, 2021
In SQL, due to lack of data, we sometimes need to insert rows with NULL values in the tables. Here, the keyword NULL(without quotes) is used to represent no data. There are some key points of Null value:
NULL value is different from a zero value.
A NULL value is used to represent a missing value, but that... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 24082,
"s": 23877,
"text": "In SQL, due to lack of data, we sometimes need to insert rows with NULL values in the tables. Here, the keyword NULL(without quotes) is used to represent no data. ... |
How to precompile a COBOL-DB2 program? | Precompilation is the process through which the SQL statements used in the COBOL-DB2 program are replaced by appropriate COBOL calls. The precompilation is necessary before the actual compilation because the COBOL compiler cannot recognize the DB2 SQL statements and will throw errors due to them.
DB2 utility DSNHPC is ... | [
{
"code": null,
"e": 1360,
"s": 1062,
"text": "Precompilation is the process through which the SQL statements used in the COBOL-DB2 program are replaced by appropriate COBOL calls. The precompilation is necessary before the actual compilation because the COBOL compiler cannot recognize the DB2 SQL s... |
Convert list of string to list of list in Python | In this article we will see how to create a list of lists which contain string data types. The inner list themselves or of string data type and they may contain numeric or strings as their elements.
We use these two methods which will first separate out the lists and then convert each element of the list to a string.
... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "In this article we will see how to create a list of lists which contain string data types. The inner list themselves or of string data type and they may contain numeric or strings as their elements."
},
{
"code": null,
"e": 1381,
"s": 12... |
C# | Math Class - GeeksforGeeks | 05 Mar, 2021
In C#, Math class comes under the System namespace. It is used to provide static methods and constants for logarithmic, trigonometric, and other useful mathematical functions. It is a static class and inherits the object class.
public static class Math
A field is a variable that is declared in a class or s... | [
{
"code": null,
"e": 24452,
"s": 24424,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 24680,
"s": 24452,
"text": "In C#, Math class comes under the System namespace. It is used to provide static methods and constants for logarithmic, trigonometric, and other useful mathematica... |
Heart arrhythmia detection using Deep Learning | by Cristiano Aguiar | Towards Data Science | A common problem that Deep Learning is helping to solve lately involves time series classification. A classic approach to this kind of problem is generating features from the signals we have and training a machine learning model.
The process of handcrafting features might take a great chunk of your project schedule. Fo... | [
{
"code": null,
"e": 402,
"s": 172,
"text": "A common problem that Deep Learning is helping to solve lately involves time series classification. A classic approach to this kind of problem is generating features from the signals we have and training a machine learning model."
},
{
"code": nul... |
How to insert spaces/tabs in text using HTML/CSS? - GeeksforGeeks | 30 Jul, 2021
Spacing can be added using HTML and CSS by 3 approaches:
Method 1: Using the special characters designated for different spaces
The character entity used to denote a non-breaking space which is a fixed space. This may be perceived as twice the space of a normal space. It is used to create a space in... | [
{
"code": null,
"e": 26144,
"s": 26116,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 26201,
"s": 26144,
"text": "Spacing can be added using HTML and CSS by 3 approaches:"
},
{
"code": null,
"e": 26272,
"s": 26201,
"text": "Method 1: Using the special chara... |
Python calendar module | itermonthdates() method | 12 May, 2021
Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. itermonthdates() method returns an ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 539,
"s": 28,
"text": "Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use... |
Program to check diagonal matrix and scalar matrix | 13 Jul, 2022
A square matrix is said to be a diagonal matrix if the elements of the matrix except the main diagonal are zero. A square null matrix is also a diagonal matrix whose main diagonal elements are zero.
Examples:
Input:
Mat[4][4] = {{4, 0, 0, 0},
{0, 5, 0, 0},
{0, 0, 2, 0},
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 252,
"s": 52,
"text": "A square matrix is said to be a diagonal matrix if the elements of the matrix except the main diagonal are zero. A square null matrix is also a diagonal matrix whose main dia... |
Boundary elements of a Matrix - GeeksforGeeks | 28 Apr, 2022
Printing Boundary Elements of a Matrix.
Given a matrix of size n x m. Print the boundary elements of the matrix. Boundary elements are those elements which are not surrounded by elements on all four directions, i.e. elements in first row, first column, last row and last column.
Examples:
Input :
... | [
{
"code": null,
"e": 25015,
"s": 24987,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 25055,
"s": 25015,
"text": "Printing Boundary Elements of a Matrix."
},
{
"code": null,
"e": 25295,
"s": 25055,
"text": "Given a matrix of size n x m. Print the boundary e... |
How to create a custom callback in JavaScript? - GeeksforGeeks | 07 Aug, 2019
A callback is a function that is invoked after a function has finished its execution. As JavaScript is an event-driven language, it does not wait for a function to finish its execution before moving on to the next one. Callbacks make it possible to make a function execute only after another function has fi... | [
{
"code": null,
"e": 25653,
"s": 25625,
"text": "\n07 Aug, 2019"
},
{
"code": null,
"e": 25978,
"s": 25653,
"text": "A callback is a function that is invoked after a function has finished its execution. As JavaScript is an event-driven language, it does not wait for a function to... |
How to get values of an NumPy array at certain index positions? - GeeksforGeeks | 25 Oct, 2020
Sometimes we need to remove values from the source Numpy array and add them at specific indices in the target array. In NumPy, we have this flexibility, we can remove values from one array and add them to another array. We can perform this operation using numpy.put() function and it can be applied to all f... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n25 Oct, 2020"
},
{
"code": null,
"e": 26007,
"s": 25665,
"text": "Sometimes we need to remove values from the source Numpy array and add them at specific indices in the target array. In NumPy, we have this flexibility, we can rem... |
Numpy | String Operations - GeeksforGeeks | 19 Apr, 2020
This module is used to perform vectorized string operations for arrays of dtype numpy.string_ or numpy.unicode_. All of them are based on the standard string functions in Python’s built-in library.
String Operations –numpy.lower() : This function returns the lowercase string from the given string. It conve... | [
{
"code": null,
"e": 42909,
"s": 42881,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 43107,
"s": 42909,
"text": "This module is used to perform vectorized string operations for arrays of dtype numpy.string_ or numpy.unicode_. All of them are based on the standard string funct... |
Building modular javascript applications in ES6 with React, Webpack and Babel | by Tim Ermilov | Towards Data Science | So, you have decided to build your new javascript application using React and you also want to use that new fancy ES6 syntax in it. In addition you want to create reusable components and publish them to NPM. How exactly can you do this today? How do you publish ES6 to NPM and use it in your project later? It took me a ... | [
{
"code": null,
"e": 572,
"s": 171,
"text": "So, you have decided to build your new javascript application using React and you also want to use that new fancy ES6 syntax in it. In addition you want to create reusable components and publish them to NPM. How exactly can you do this today? How do you p... |
Model selection 101, using R. Quick and dirty markup of simple model... | by Peter Nistrup | Towards Data Science | Since this is a very introductory look at model selection we assume the data you’ve acquired has already been cleaned, scrubbed and ready to go. Data cleaning is a whole subject in and of itself and is actually the primary time-sink of any Data Scientist. Go to the end of this article if you want to download the data f... | [
{
"code": null,
"e": 522,
"s": 172,
"text": "Since this is a very introductory look at model selection we assume the data you’ve acquired has already been cleaned, scrubbed and ready to go. Data cleaning is a whole subject in and of itself and is actually the primary time-sink of any Data Scientist.... |
How to use Pandas to analyze numeric data? | by WY Fok | Towards Data Science | Python already becomes a popular programming language in the data science area. Pandas, one of many popular libraries in data science, provides lots of great functions that help us transform, analyze and interpret data. I am sure that there are already too many tutorials and materials to teach you how to use Pandas. Ho... | [
{
"code": null,
"e": 695,
"s": 172,
"text": "Python already becomes a popular programming language in the data science area. Pandas, one of many popular libraries in data science, provides lots of great functions that help us transform, analyze and interpret data. I am sure that there are already to... |
Creating an Interactive Data app using Plotly’s Dash | by Kyle | Towards Data Science | Let’s make an app to automatically plot data files. This is a walkthrough of creating a web app in python using plotly’s Dash, with an example we created at Kyso — the live version can be found here:
dash-app-dx9g2r0la6-8000.cloud.kyso.io
It’s an app for uploading any file with xy, xyyy, etc. coordinates and then autom... | [
{
"code": null,
"e": 371,
"s": 171,
"text": "Let’s make an app to automatically plot data files. This is a walkthrough of creating a web app in python using plotly’s Dash, with an example we created at Kyso — the live version can be found here:"
},
{
"code": null,
"e": 410,
"s": 371,... |
Vectors in Julia - GeeksforGeeks | 12 Oct, 2021
Vectors in Julia are a collection of elements just like other collections like Array, Sets, Dictionaries, etc. Vector are different from Sets because vectors are ordered collection of elements, and can hold duplicate values, unlike sets which require all the elements to be unique. Vectors are one-dimension... | [
{
"code": null,
"e": 24430,
"s": 24402,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 24828,
"s": 24430,
"text": "Vectors in Julia are a collection of elements just like other collections like Array, Sets, Dictionaries, etc. Vector are different from Sets because vectors are o... |
PyQt5 - setCheckState() method for Check Box - GeeksforGeeks | 22 Apr, 2020
When we create a check box it has only two states that are checked and un-checked, although we can add an intermediate state using setTristate method. We can set check box to be checked or un-checked using setChecked but with this method we are unable to set check box to intermediate state.
setCheckState m... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24193,
"s": 23901,
"text": "When we create a check box it has only two states that are checked and un-checked, although we can add an intermediate state using setTristate method. We can set c... |
Python program to search an element in a doubly linked list | When it is required to search for an element in a doubly linked list, a ‘Node’ class needs to be created. In this class, there are three attributes, the data that is present in the node, the access to the next node of the linked list, and the access to the previous node of the linked list.
Another class needs to be cre... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "When it is required to search for an element in a doubly linked list, a ‘Node’ class needs to be created. In this class, there are three attributes, the data that is present in the node, the access to the next node of the linked list, and the access to ... |
Sum of Two or Multiple DataFrame Columns in R - GeeksforGeeks | 23 Sep, 2021
In this article, we will discuss how to perform some of two and multiple dataframes columns in R programming language.
Database in use:
The columns whose sum has to be calculated can be called through the $ operator and then we can perform the sum of two dataframe columns by using “+” operator.
Syntax:
dat... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 24970,
"s": 24851,
"text": "In this article, we will discuss how to perform some of two and multiple dataframes columns in R programming language."
},
{
"code": null,
"e": 24987,
... |
How do I get the background color of a Tkinter Canvas widget? | Tkinter canvas widget is used for many different purposes such as adding objects, drawing shapes, images and complex visuals to a graphical interface in an application. We can also configure its style such as background color, foreground color, and other properties using the configure properties or passing attributes.
... | [
{
"code": null,
"e": 1382,
"s": 1062,
"text": "Tkinter canvas widget is used for many different purposes such as adding objects, drawing shapes, images and complex visuals to a graphical interface in an application. We can also configure its style such as background color, foreground color, and othe... |
How do I convert a char to an int in C and C++? | In C language, there are three methods to convert a char type variable to an int. These are given as follows −
sscanf()
atoi()
Typecasting
Here is an example of converting char to int in C language,
Live Demo
#include<stdio.h>
#include<stdlib.h>
int main() {
const char *str = "12345";
char c = 's';
int x, y, ... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "In C language, there are three methods to convert a char type variable to an int. These are given as follows −"
},
{
"code": null,
"e": 1182,
"s": 1173,
"text": "sscanf()"
},
{
"code": null,
"e": 1189,
"s": 1182,
... |
How to get the size of a Directory in Python ? | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Let’s see how to get the size of a directory ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Converting a string to a date in JavaScript | The best format to represent a date is yyyy-mm-dd as this causes no
confusion and is pretty straight forward. In order to parse dates from
this string format to Date objects in JS, all you need to do is pass this
string to the Date constructor. For example,
let a = '2019-08-10';
console.log(new Date(a))
This will give ... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "The best format to represent a date is yyyy-mm-dd as this causes no\nconfusion and is pretty straight forward. In order to parse dates from\nthis string format to Date objects in JS, all you need to do is pass this\nstring to the Date constructor. For e... |
How to create text file and insert data to that file on Android? | This example demonstrates how to create text file and insert data to that file 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-8... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "This example demonstrates how to create text file and insert data to that file on Android."
},
{
"code": null,
"e": 1282,
"s": 1153,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ... |
Chef - Cookbooks | Cookbooks are fundamental working units of Chef, which consists of all the details related to working units, having the capability to modify configuration and the state of any system configured as a node on Chef infrastructure. Cookbooks can perform multiple tasks. Cookbooks contain values about the desired state of no... | [
{
"code": null,
"e": 2770,
"s": 2380,
"text": "Cookbooks are fundamental working units of Chef, which consists of all the details related to working units, having the capability to modify configuration and the state of any system configured as a node on Chef infrastructure. Cookbooks can perform mul... |
Auto-Keras, or How You can Create a Deep Learning Model in 4 Lines of Code | by Favio Vázquez | Towards Data Science | Before starting, a great quote by Matthew Mayo about what AutoML is not:
AutoML is not automated data science. While there is undoubtedly overlap, machine learning is but one of many tools in the data science toolkit, and its use does not actually factor in to all data science tasks. For example, if prediction will be ... | [
{
"code": null,
"e": 244,
"s": 171,
"text": "Before starting, a great quote by Matthew Mayo about what AutoML is not:"
},
{
"code": null,
"e": 653,
"s": 244,
"text": "AutoML is not automated data science. While there is undoubtedly overlap, machine learning is but one of many too... |
XPath - Wildcard | XPath defines the following wildcards on nodes to be used with the XPath expressions.
*
used to match any node.
.
used to match the current node in context.
@*
used to match any attribute
node()
used to match node of any type
This example creates a table of <student> element with their details, by iterating over each s... | [
{
"code": null,
"e": 1815,
"s": 1729,
"text": "XPath defines the following wildcards on nodes to be used with the XPath expressions."
},
{
"code": null,
"e": 1817,
"s": 1815,
"text": "*"
},
{
"code": null,
"e": 1841,
"s": 1817,
"text": "used to match any node.... |
Apache Derby - Retrieve Data | The SELECT statement is used to retrieve data from a table. This returns the data in the form of a table known as result set.
Following is the syntax of the SELECT statement −
ij> SELECT column_name, column_name, ... FROM table_name;
Or,
Ij>SELECT * from table_name
Let us suppose we have a table named Employees in the... | [
{
"code": null,
"e": 2306,
"s": 2180,
"text": "The SELECT statement is used to retrieve data from a table. This returns the data in the form of a table known as result set."
},
{
"code": null,
"e": 2356,
"s": 2306,
"text": "Following is the syntax of the SELECT statement −"
},
... |
Java Robot Class | Get the pixel Color of a given point - GeeksforGeeks | 14 Apr, 2021
Robot is part of java.awt package . Robot class is basically used to generate native system input events for the purposes of self- running demos, test automation, and other application where control over mouse and keyboard is used. Robot class generates events that can be used to control mouse, keyboard an... | [
{
"code": null,
"e": 24536,
"s": 24508,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 25015,
"s": 24536,
"text": "Robot is part of java.awt package . Robot class is basically used to generate native system input events for the purposes of self- running demos, test automation, ... |
VB.Net - Data Types | Data types refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.
VB.Net provides a wide range of data types. The following table shows all the data types available ... | [
{
"code": null,
"e": 2521,
"s": 2300,
"text": "Data types refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted."
},
{
"code": null,
... |
How to rotate tick labels in a subplot in Matplotlib? | To rotate tick labels in a subplot, we can use set_xticklabels() or set_yticklabels() with rotation argument in the method.
Create a list of numbers (x) that can be used to tick the axes.
Create a list of numbers (x) that can be used to tick the axes.
Get the axis using subplot() that helps to add a subplot to the curr... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "To rotate tick labels in a subplot, we can use set_xticklabels() or set_yticklabels() with rotation argument in the method."
},
{
"code": null,
"e": 1250,
"s": 1186,
"text": "Create a list of numbers (x) that can be used to tick the ... |
How to add PDF in Tkinter GUI Python ? - GeeksforGeeks | 13 Jan, 2021
In this article, We are going to see how to add a PDF file Tkinter GUI, For that, we don’t have a direct widget to do this. For that, We need to have python version 2.7 or more. And you need to install the ‘tkPDFViewer‘ library. This library allows you to embed the PDF file in your Tkinter GUI.
Installatio... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 24588,
"s": 24292,
"text": "In this article, We are going to see how to add a PDF file Tkinter GUI, For that, we don’t have a direct widget to do this. For that, We need to have python versio... |
Java program to Print Odd and Even Number from an Array | In the loop check, the result of I %2 operation on each element, if 0 the element is even else the element is odd.
Live Demo
public class OddNumbersInAnArray {
public static void main(String args[]){
int[] myArray = {23, 93, 56, 92, 39};
System.out.println("Even numbers in the given array are:: ");
... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "In the loop check, the result of I %2 operation on each element, if 0 the element is even else the element is odd."
},
{
"code": null,
"e": 1187,
"s": 1177,
"text": "Live Demo"
},
{
"code": null,
"e": 1731,
"s": 1187,... |
What is the use of ‘new’ keyword in C#? | Use the new keyword to create an instance of the array −
int [] a = new int[5];
The new operator is used to create an object or instantiate an object. Here in the example, an object is created for the class using the new −
Live Demo
using System;
namespace CalculatorApplication {
class NumberManipulator {
pu... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Use the new keyword to create an instance of the array −"
},
{
"code": null,
"e": 1142,
"s": 1119,
"text": "int [] a = new int[5];"
},
{
"code": null,
"e": 1285,
"s": 1142,
"text": "The new operator is used to cre... |
HTML - <article> Tag | The HTML <article> tag is used in a blog post, forum post, newspaper article etc. It specifies self-contained composition in a site, document, page or application.
<!DOCTYPE html>
<html>
<head>
<title>HTML Article Tag</title>
</head>
<body>
<article>
<h2>PHP</h2>
<p>PHP is PHP ... | [
{
"code": null,
"e": 2538,
"s": 2374,
"text": "The HTML <article> tag is used in a blog post, forum post, newspaper article etc. It specifies self-contained composition in a site, document, page or application."
},
{
"code": null,
"e": 2758,
"s": 2538,
"text": "<!DOCTYPE html>\n<... |
HTML | DOM Style backgroundColor Property - GeeksforGeeks | 10 Jan, 2022
The backgroundColor property in HTML DOM is used to set or return the background-color of an element.Syntax:
object.style.backgroundColor
It returns the background color of an element.
object.style.backgroundColor = "color|transparent|initial|
inherit"
It is used to set the background color of an element.... | [
{
"code": null,
"e": 24751,
"s": 24723,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 24861,
"s": 24751,
"text": "The backgroundColor property in HTML DOM is used to set or return the background-color of an element.Syntax: "
},
{
"code": null,
"e": 24890,
"s": ... |
How to calculate absolute value in Python? | The abs() function of Python's standard library returns the absolute value of the given number. Absolute value of a number is the value without considering its sign. Hence absolute of 10 is 10, -10 is also 10. If the number is a complex number, abs() returns its magnitude.
>>> abs(11.11)
11.11
>>> abs(-11.11)
11.11
>>>... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "The abs() function of Python's standard library returns the absolute value of the given number. Absolute value of a number is the value without considering its sign. Hence absolute of 10 is 10, -10 is also 10. If the number is a complex number, abs() re... |
Neural ODEs: breakdown of another deep learning breakthrough | by Alexandr Honchar | Towards Data Science | Hi everyone! If you’re reading this article, most probably you’re catching up with the recent advances that happen in the AI world. The topic we will review today comes from NIPS 2018, and it will be about the best paper award from there: Neural Ordinary Differential Equations (Neural ODEs). In this article, I will try... | [
{
"code": null,
"e": 829,
"s": 172,
"text": "Hi everyone! If you’re reading this article, most probably you’re catching up with the recent advances that happen in the AI world. The topic we will review today comes from NIPS 2018, and it will be about the best paper award from there: Neural Ordinary ... |
Git Pull from GitHub | When working as a team on a project, it is important that everyone stays up to date.
Any time you start working on a project, you should get the most recent
changes to your local copy.
With Git, you can do that with pull.
pull is a combination of 2 different commands:
fetch
merge
Let's take a closer look into how fetc... | [
{
"code": null,
"e": 85,
"s": 0,
"text": "When working as a team on a project, it is important that everyone stays up to date."
},
{
"code": null,
"e": 186,
"s": 85,
"text": "Any time you start working on a project, you should get the most recent \nchanges to your local copy."
... |
Convert boolean result into number/integer in JavaScript - GeeksforGeeks | 02 Jul, 2019
A JavaScript boolean represents one of two values: true or false.However, if one wants to convert a variable that stores boolean value, into integer “0” or “1”, they can do so using multiple approaches. We will look into some of them in this article.The most popular methods are:Using ternary or conditional... | [
{
"code": null,
"e": 26653,
"s": 26625,
"text": "\n02 Jul, 2019"
},
{
"code": null,
"e": 27101,
"s": 26653,
"text": "A JavaScript boolean represents one of two values: true or false.However, if one wants to convert a variable that stores boolean value, into integer “0” or “1”, th... |
COVID-19 Peak Prediction using Logistic Function - GeeksforGeeks | 05 Aug, 2021
Making fast and accurate decisions are vital these days and especially now when the world is facing such a phenomenon as COVID-19, therefore, counting on current as well as projected information is decisive for this process. In this matter, we have applied a model in which is possible to observe the peak i... | [
{
"code": null,
"e": 25973,
"s": 25945,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 26559,
"s": 25973,
"text": "Making fast and accurate decisions are vital these days and especially now when the world is facing such a phenomenon as COVID-19, therefore, counting on current a... |
How to send row data when clicking button using javascript? | 15 Sep, 2020
In this article we will learn how to send and access row data when clicking a button using JavaScript.
The below example contains a simple Bootstrap table. Each table row (<tr>) has an id and a submit button. When the button corresponding to a row is clicked, the row’s data is displayed using alert.
Appr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Sep, 2020"
},
{
"code": null,
"e": 131,
"s": 28,
"text": "In this article we will learn how to send and access row data when clicking a button using JavaScript."
},
{
"code": null,
"e": 331,
"s": 131,
"text": "The... |
C# | Type.GetFields() Method | 05 Dec, 2019
Type.GetFields() Method is used to get the fields of the current Type. There are 2 methods in the overload list of this method as follows:
GetFields() Method
GetFields(BindingFlags) Method
This method is used to return all the public fields of the current Type.
Syntax: public System.Reflection.FieldInfo[] ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "Type.GetFields() Method is used to get the fields of the current Type. There are 2 methods in the overload list of this method as follows:"
},
{
"code": null,
"e":... |
Stack clear() method in Java with Example | 24 Dec, 2018
The Java.util.Stack.clear() method is used to remove all the elements from a Stack. Using the clear() method only clears all the element from the Stack and does not delete the Stack. In other words, we can say that the clear() method is used to only empty an existing Stack.
Syntax:
Stack.clear()
Parameters... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 303,
"s": 28,
"text": "The Java.util.Stack.clear() method is used to remove all the elements from a Stack. Using the clear() method only clears all the element from the Stack and does not delete the... |
C++ Program to Check if a Matrix is Invertible | The determinant of a matrix can be used to find if it is invertible or not. The matrix is invertible if the determinant is non-zero. So if the determinant comes out to be zero, the matrix is not invertible. For example −
The given matrix is:
4 2 1
2 1 1
9 3 2
The determinant of the above matrix is: 3
So the matrix is ... | [
{
"code": null,
"e": 1408,
"s": 1187,
"text": "The determinant of a matrix can be used to find if it is invertible or not. The matrix is invertible if the determinant is non-zero. So if the determinant comes out to be zero, the matrix is not invertible. For example −"
},
{
"code": null,
... |
Find numbers with n-divisors in a given range | 23 Jun, 2022
Given three integers a, b, n .Your task is to print number of numbers between a and b including them also which have n-divisors. A number is called n-divisor if it has total n divisors including 1 and itself. Examples:
Input : a = 1, b = 7, n = 2
Output : 4
There are four numbers with 2 divisors in
ran... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 275,
"s": 54,
"text": "Given three integers a, b, n .Your task is to print number of numbers between a and b including them also which have n-divisors. A number is called n-divisor if it has total ... |
Compress a matrix into a single number using given operations | 27 Oct, 2021
Given a matrix mat[][] of dimension M * N, the task is to first compress it to obtain an array and, then compress it again to obtain a single integer using following operations:
When a matrix is compressed, its value’s binary representation gets compressed.
Therefore, each bit is considered, and if a posit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "Given a matrix mat[][] of dimension M * N, the task is to first compress it to obtain an array and, then compress it again to obtain a single integer using following operation... |
SQL | MINUS Operator - GeeksforGeeks | 09 Nov, 2020
The Minus Operator in SQL is used with two SELECT statements. The MINUS operator is used to subtract the result set obtained by first SELECT query from the result set obtained by second SELECT query. In simple words, we can say that MINUS operator will return only those rows which are unique in only first ... | [
{
"code": null,
"e": 23421,
"s": 23393,
"text": "\n09 Nov, 2020"
},
{
"code": null,
"e": 23818,
"s": 23421,
"text": "The Minus Operator in SQL is used with two SELECT statements. The MINUS operator is used to subtract the result set obtained by first SELECT query from the result ... |
WordPress - Quick Guide | WordPress is an open source Content Management System (CMS), which allows the users to build dynamic websites and blogs. WordPress is the most popular blogging system on the web and allows updating, customizing and managing the website from its back-end CMS and components.
The Content Management System (CMS) is a softw... | [
{
"code": null,
"e": 3519,
"s": 3245,
"text": "WordPress is an open source Content Management System (CMS), which allows the users to build dynamic websites and blogs. WordPress is the most popular blogging system on the web and allows updating, customizing and managing the website from its back-end... |
How to add space between two widgets placed in a grid in tkinter? | Let us assume that we are creating a tkinter application where two or more widgets are placed using a grid property. We have to add some space between the widgets in order to style their appearance. To provide space in the widgets, we can use padding property, as padding adds space to the outermost part of the widget. ... | [
{
"code": null,
"e": 1443,
"s": 1062,
"text": "Let us assume that we are creating a tkinter application where two or more widgets are placed using a grid property. We have to add some space between the widgets in order to style their appearance. To provide space in the widgets, we can use padding pr... |
JavaScript Arrays | An array is a special variable, which can hold more than one value:
If you have a list of items (a list of car names, for example), storing the
cars in single variables could look like this:
However, what if you want to loop through the cars and find a specific one?
And what if you had not 3 cars, but 300?
The soluti... | [
{
"code": null,
"e": 68,
"s": 0,
"text": "An array is a special variable, which can hold more than one value:"
},
{
"code": null,
"e": 192,
"s": 68,
"text": "If you have a list of items (a list of car names, for example), storing the \ncars in single variables could look like thi... |
Add column names to dataframe in Pandas - GeeksforGeeks | 01 Aug, 2020
Let us how to add names to DataFrame columns in Pandas.
Creating the DataFrame :
# importing the pandas libraryimport pandas as pd # creating listsl1 =["Amar", "Barsha", "Carlos", "Tanmay", "Misbah"]l2 =["Alpha", "Bravo", "Charlie", "Tango", "Mike"]l3 =[23, 25, 22, 27, 29]l4 =[69, 54, 73, 70, 74] # creat... | [
{
"code": null,
"e": 24511,
"s": 24483,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 24567,
"s": 24511,
"text": "Let us how to add names to DataFrame columns in Pandas."
},
{
"code": null,
"e": 24592,
"s": 24567,
"text": "Creating the DataFrame :"
},
{... |
Longest Arithmetic Sequence in C++ | Suppose we have an array A of integers, we have to return the length of the longest arithmetic subsequence in A. As you know that a subsequence of A is a list A[i_1], A[i_2], ..., A[i_k] with 0 <= i_1 < i_2 < ... < i_k <= A.length - 1, and that a sequence B is arithmetic when B[i+1] - B[i] are all the same value (for 0... | [
{
"code": null,
"e": 1510,
"s": 1062,
"text": "Suppose we have an array A of integers, we have to return the length of the longest arithmetic subsequence in A. As you know that a subsequence of A is a list A[i_1], A[i_2], ..., A[i_k] with 0 <= i_1 < i_2 < ... < i_k <= A.length - 1, and that a sequen... |
How to append list to second list (concatenate lists) in Python? | This can be done in different ways −
l1=[1,2,3]
l2=[2,3,4]
l3=l1+l2
print ('new list', l3)
This will print
new list [1, 2, 3, 2, 3, 4]
l1=[1,2,3]
l1=[3,4,5]
l1.append(l2)
print ('appended list', l1)
Here’s the result
appended list [3, 4, 5, [2, 3, 4]]
l1=[1,2,3]
l1=[3,4,5]
l1.extend(l2)
print ('extended list', l1)
The ... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "This can be done in different ways −"
},
{
"code": null,
"e": 1153,
"s": 1099,
"text": "l1=[1,2,3]\nl2=[2,3,4]\nl3=l1+l2\nprint ('new list', l3)"
},
{
"code": null,
"e": 1169,
"s": 1153,
"text": "This will print"
... |
Converting digits to word format using switch case in C language | Is it possible to convert the given one or two-digit numbers into English words by using the C Programming language?
We can easily convert the given two-digit number into English word format with the help of a switch case. Not only two digits, but any number can also convert into English like a statement in C.
In this ... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "Is it possible to convert the given one or two-digit numbers into English words by using the C Programming language?"
},
{
"code": null,
"e": 1374,
"s": 1179,
"text": "We can easily convert the given two-digit number into English wor... |
Logistic Regression. A gentle introduction to Logistic... | by Sangeet Aggarwal | Towards Data Science | Logistic Regression is one of the fundamental models used in Machine Learning. It is a classification technique and is best suited for predicting the categorical response variable.
While linear regression works well with a continuous or quantitative output variable, the Logistic Regression is used to predict a categori... | [
{
"code": null,
"e": 353,
"s": 172,
"text": "Logistic Regression is one of the fundamental models used in Machine Learning. It is a classification technique and is best suited for predicting the categorical response variable."
},
{
"code": null,
"e": 528,
"s": 353,
"text": "While... |
Converting string to date in MongoDB? | To convert the string to date in MongoDB, use the following syntax:
db.yourCollectionName.aggregate(
[
{
$project:
{
anyVariableName:
{
$dateFromString:
{
dateString: '$yourFieldName’
}
}
... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To convert the string to date in MongoDB, use the following syntax:"
},
{
"code": null,
"e": 1403,
"s": 1130,
"text": "db.yourCollectionName.aggregate(\n [\n {\n $project:\n {\n anyVariableName:\n ... |
Inverse t-distribution in R - GeeksforGeeks | 06 Jun, 2021
In probability and statistics, Student’s t-distribution (or simply the t-distribution) is any member of a family of continuous probability distributions. It comes to the picture when estimating the mean of a normally distributed population, where the sample size is small and the standard deviation (S.D) is... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 25244,
"s": 24851,
"text": "In probability and statistics, Student’s t-distribution (or simply the t-distribution) is any member of a family of continuous probability distributions. It comes ... |
SQL Tryit Editor v1.6 | SELECT * FROM Customers
WHERE City LIKE '[bsp]%';
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of t... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "SELECT * FROM Customers"
},
{
"code": null,
"e": 50,
"s": 24,
"text": "WHERE City LIKE '[bsp]%';"
},
{
"code": null,
"e": 52,
"s": 50,
"text": ""
},
{
"code": null,
"e": 115,
"s": 52,
"text": "Edit... |
Check if value exists for a field in a MongoDB document? | To check if value exists for a field in a MongoDB document, you can use find() along with $exists operator. Let us first create a collection with documents −
> db.checkIfValueDemo.insertOne({"PlayerName":"John Smith","PlayerScores":[5000,98595858,554343]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cc6f5... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "To check if value exists for a field in a MongoDB document, you can use find() along with $exists operator. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1920,
"s": 1220,
"text": "> db.checkIfValueDemo.in... |
How to Integrate Salesforce with Python | by hotglue | Towards Data Science | If you’re a B2B developer building a product, one of the earliest product development phases is creating a data integration pipeline to import customer data.
In this article, I’ll show you how to leverage Singer’s tap-salesforce to extract data from Salesforce. From there I’ll walk you through how to parse the JSON out... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "If you’re a B2B developer building a product, one of the earliest product development phases is creating a data integration pipeline to import customer data."
},
{
"code": null,
"e": 579,
"s": 330,
"text": "In this article, I’ll show y... |
Simple Transformers — Named Entity Recognition with Transformer Models | by Thilina Rajapakse | Towards Data Science | The Simple Transformers library was conceived to make Transformer models easy to use. Transformers are incredibly powerful (not to mention huge) deep learning models which have been hugely successful at tackling a wide variety of Natural Language Processing tasks. Simple Transformers enabled the application of Transfor... | [
{
"code": null,
"e": 654,
"s": 172,
"text": "The Simple Transformers library was conceived to make Transformer models easy to use. Transformers are incredibly powerful (not to mention huge) deep learning models which have been hugely successful at tackling a wide variety of Natural Language Processi... |
Touch Control and Events in Android - GeeksforGeeks | 20 Dec, 2021
Almost all Android phones today are touch-controlled. There are very few phones that do not have a touchscreen. In this article, we will discuss how to handle touch events in Android. Understanding how to work around touch controls and touch events when we tap on our screen is an example of this. We’ll go ... | [
{
"code": null,
"e": 26491,
"s": 26463,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 27069,
"s": 26491,
"text": "Almost all Android phones today are touch-controlled. There are very few phones that do not have a touchscreen. In this article, we will discuss how to handle touc... |
Class cast() method in Java with Examples - GeeksforGeeks | 27 Dec, 2019
The cast() method of java.lang.Class class is used to cast the specified object to the object of this class. The method returns the object after casting in the form of an object.
Syntax:
public T[] cast(Object obj)
Parameter: This method accepts a parameter obj which is the object to be cast upon
Return V... | [
{
"code": null,
"e": 24214,
"s": 24186,
"text": "\n27 Dec, 2019"
},
{
"code": null,
"e": 24393,
"s": 24214,
"text": "The cast() method of java.lang.Class class is used to cast the specified object to the object of this class. The method returns the object after casting in the for... |
Sorted insert for circular linked list | Practice | GeeksforGeeks | Given a sorted circular linked list, the task is to insert a new node in this circular list so that it remains a sorted circular linked list.
Example 1:
Input:
LinkedList = 1->2->4
(the first and last node is connected,
i.e. 4 --> 1)
data = 2
Output: 1 2 2 4
Example 2:
Input:
LinkedList = 1->4->7->9
(the first and las... | [
{
"code": null,
"e": 380,
"s": 238,
"text": "Given a sorted circular linked list, the task is to insert a new node in this circular list so that it remains a sorted circular linked list."
},
{
"code": null,
"e": 391,
"s": 380,
"text": "Example 1:"
},
{
"code": null,
"... |
Find original numbers from gcd() every pair - GeeksforGeeks | 06 Jun, 2021
Given an array arr[] containing GCD of every possible pair of elements of another array. The task is to find the original numbers which are used to calculate the GCD array. For example, if original numbers are {4, 6, 8} then the given array will be {4, 2, 4, 2, 6, 2, 4, 2, 8}.
Examples:
Input: arr[] = {5... | [
{
"code": null,
"e": 26357,
"s": 26329,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 26636,
"s": 26357,
"text": "Given an array arr[] containing GCD of every possible pair of elements of another array. The task is to find the original numbers which are used to calculate the G... |
How to make a div center align in HTML? | To center div element center ,you can use "div style="text-align:center" " and to center the div ,use "div style="margin: 0 auto" "
In your code, the above css will be written as −
<div style="text-align:center;width: 300px;margin: 0 auto;border-style: dotted;">
<p>hi</p>
</div> | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "To center div element center ,you can use \"div style=\"text-align:center\" \" and to center the div ,use \"div style=\"margin: 0 auto\" \""
},
{
"code": null,
"e": 1243,
"s": 1194,
"text": "In your code, the above css will be writte... |
What is onmouseover event in JavaScript? | The onmouseover event triggers when the mouse pointer moves over an element.
You can try to run the following code to learn how to work with onmouseover event in JavaScript −
<html>
<head>
<script>
<!--
function sayHello() {
alert("Mouse Over")
}
//-->
... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "The onmouseover event triggers when the mouse pointer moves over an element."
},
{
"code": null,
"e": 1237,
"s": 1139,
"text": "You can try to run the following code to learn how to work with onmouseover event in JavaScript −"
},
... |
How to derive summary statistics using PostgreSQL | by KSV Muralidhar | Towards Data Science | In this article, we’ll discuss how to derive summary statistics of numerical and categorical columns/fields using SQL. We’ll use the Netflix Movies and TV Shows dataset that’s downloaded from Tableau Public sample datasets (https://public.tableau.com/en-us/s/resources and go to Sample Data). This dataset consists of TV... | [
{
"code": null,
"e": 938,
"s": 171,
"text": "In this article, we’ll discuss how to derive summary statistics of numerical and categorical columns/fields using SQL. We’ll use the Netflix Movies and TV Shows dataset that’s downloaded from Tableau Public sample datasets (https://public.tableau.com/en-u... |
Prototype - AJAX Response() Method | This AJAX Ajax.Response is the object passed as the first argument of all Ajax requests callbacks.
This is a wrapper around the native xmlHttpRequest object. It normalizes cross-browser issues while adding support for JSON via the responseJSON and headerJSON properties.
document Object
or null
Object, Array
or null
Obj... | [
{
"code": null,
"e": 2160,
"s": 2061,
"text": "This AJAX Ajax.Response is the object passed as the first argument of all Ajax requests callbacks."
},
{
"code": null,
"e": 2332,
"s": 2160,
"text": "This is a wrapper around the native xmlHttpRequest object. It normalizes cross-brow... |
Display strikethrough text in HTML | The HTML <strike> tag specifies strikethrough text. This tag is deprecated now, use <del> instead. The HTML <del> tag is used for markup of deleted text i.e. strikethrough text.
You can try to run the following code to display strikethrough text in HTML −
<!DOCTYPE html>
<html>
<head>
<title>HTML strike Tag</t... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "The HTML <strike> tag specifies strikethrough text. This tag is deprecated now, use <del> instead. The HTML <del> tag is used for markup of deleted text i.e. strikethrough text."
},
{
"code": null,
"e": 1318,
"s": 1240,
"text": "You ... |
How do JavaScript primitive/object types passed in functions? | Following is the code to pass JavaScript primitive and object types to function −
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>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, ... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Following is the code to pass JavaScript primitive and object types to function −"
},
{
"code": null,
"e": 1155,
"s": 1144,
"text": " Live Demo"
},
{
"code": null,
"e": 2325,
"s": 1155,
"text": "<!DOCTYPE html>\n<... |
Modeling Functions. From linear to logistic regression | by Shinichi Okada | Towards Data Science | Table of ContentsIntroduction1. Linear models2. Quadratic models3. Cubic models4. Exponential models5. Logarithmic models6. Sinusoidal models7. Logistic modelsConclusion
We are going to draw a scatter graph and model a regression line from linear to logistic with Jupyter Notebook.
The first one is a linear model. A lin... | [
{
"code": null,
"e": 217,
"s": 47,
"text": "Table of ContentsIntroduction1. Linear models2. Quadratic models3. Cubic models4. Exponential models5. Logarithmic models6. Sinusoidal models7. Logistic modelsConclusion"
},
{
"code": null,
"e": 329,
"s": 217,
"text": "We are going to d... |
Check if it is possible to create a polygon with given n sides - GeeksforGeeks | 30 Apr, 2021
Given an array arr[] that contains the lengths of n sides that may or may not form a polygon. The task is to determine whether it is possible to form a polygon with all the given sides. Print Yes if possible else print No.Examples:
Input: arr[] = {2, 3, 4} Output: YesInput: arr[] = {3, 4, 9, 2} Output: N... | [
{
"code": null,
"e": 25500,
"s": 25472,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25734,
"s": 25500,
"text": "Given an array arr[] that contains the lengths of n sides that may or may not form a polygon. The task is to determine whether it is possible to form a polygon wit... |
Abstract Base Class (abc) in Python - GeeksforGeeks | 29 Aug, 2020
Have you ever thought about checking whether the objects you are using adheres to a particular specification? It is necessary to verify whether an object implements a given method or property, especially while creating a library where other developers make use of it. A developer can use hasattr or isinstan... | [
{
"code": null,
"e": 24128,
"s": 24100,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24621,
"s": 24128,
"text": "Have you ever thought about checking whether the objects you are using adheres to a particular specification? It is necessary to verify whether an object implement... |
Hashing by Division in Data Structure | Here we will discuss about the hashing with division. For this we use the hash function −
h(x) = x mod m
To use this hash function we maintain an array A[0, ... m – 1]. Where each element of the array is a pointer to the head of the linked list. The linked list Li is pointed to array element A[i] holds all elements x s... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "Here we will discuss about the hashing with division. For this we use the hash function −"
},
{
"code": null,
"e": 1167,
"s": 1152,
"text": "h(x) = x mod m"
},
{
"code": null,
"e": 1449,
"s": 1167,
"text": "To use... |
Boxing and Unboxing in C# | Boxing is the implicit conversion of a value type to a reference type.
Unboxing is the explicit conversion of the reference type created by boxing, back to a value type.
Let us see an example code snippet −
// int
int myVal = 12;
// Boxing
object myBoxed = myVal;
// Unboxing
int myUnBoxed = (int) myBoxed;
Let us see an... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "Boxing is the implicit conversion of a value type to a reference type."
},
{
"code": null,
"e": 1232,
"s": 1133,
"text": "Unboxing is the explicit conversion of the reference type created by boxing, back to a value type."
},
{
... |
How to mark strikethrough text in HTML? | To mark strikethrough text in HTML, use the <strike>...</strike> tag. It renders a strikethrough text. HTML deprecated this tag and it shouldn’t be used in HTML5. As an alternative, use the CSS text-decoration property.
To use the CSS property, use the style attribute. The style attribute specifies an inline style for ... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "To mark strikethrough text in HTML, use the <strike>...</strike> tag. It renders a strikethrough text. HTML deprecated this tag and it shouldn’t be used in HTML5. As an alternative, use the CSS text-decoration property."
},
{
"code": null,
"... |
Fine-Tuning Transformer Model for Invoice Recognition | by Walid Amamou | Towards Data Science | Building on my recent tutorial on how to annotate PDFs and scanned images for NLP applications, we will attempt to fine-tune the recently released Microsoft’s Layout LM model on an annotated custom dataset that includes French and English invoices. While the previous tutorials focused on using the publicly available FU... | [
{
"code": null,
"e": 636,
"s": 172,
"text": "Building on my recent tutorial on how to annotate PDFs and scanned images for NLP applications, we will attempt to fine-tune the recently released Microsoft’s Layout LM model on an annotated custom dataset that includes French and English invoices. While ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.