title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
C++ program to find the smallest element among three elements
In this tutorial, we will be discussing a program to find the smallest element among the provided three elements. We will be provided with three elements/ integers and our task is to compare them and find the smallest element/ integer among them. #include <bits/stdc++.h> using namespace std; int main() { int a = 45,...
[ { "code": null, "e": 1176, "s": 1062, "text": "In this tutorial, we will be discussing a program to find the smallest element among the provided three elements." }, { "code": null, "e": 1309, "s": 1176, "text": "We will be provided with three elements/ integers and our task is to...
Frequency of each character in a String using unordered_map in C++ - GeeksforGeeks
26 Oct, 2020 Given a string str, the task is to find the frequency of each character of a string using an unordered_map in C++ STL. Examples: Input: str = “geeksforgeeks” Output: r 1 e 4 s 2 g 2 k 2 f 1 o 1 Input: str = “programming” Output: n 1 i 1 p 1 o 1 r 2 a 1 g 2 m 2 Approach: Traverse each character of the gi...
[ { "code": null, "e": 24124, "s": 24096, "text": "\n26 Oct, 2020" }, { "code": null, "e": 24243, "s": 24124, "text": "Given a string str, the task is to find the frequency of each character of a string using an unordered_map in C++ STL." }, { "code": null, "e": 24254, ...
How to hide a soft keyboard on android after clicking outside EditText using Kotlin?
This example demonstrates how to hide a soft keyboard on android after clicking outside EditText using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="...
[ { "code": null, "e": 1173, "s": 1062, "text": "This example demonstrates how to hide a soft keyboard on android after clicking outside EditText using Kotlin." }, { "code": null, "e": 1302, "s": 1173, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Proje...
ConcurrentHashMap get() Method in Java - GeeksforGeeks
14 Sep, 2018 The get() method of java.util.concurrent.ConcurrentHashMap is an in-built function in Java which accepts a key as parameter and returns the value mapped to it. It returns null if no mapping exists for the key passed as parameter. Syntax: Concurrent.get(Object key_element) Parameters: The method accepts a s...
[ { "code": null, "e": 24088, "s": 24060, "text": "\n14 Sep, 2018" }, { "code": null, "e": 24318, "s": 24088, "text": "The get() method of java.util.concurrent.ConcurrentHashMap is an in-built function in Java which accepts a key as parameter and returns the value mapped to it. It ...
ASP.NET Core - Setup MVC
In this chapter, we will set up the MVC framework in our FirstAppDemo application. We will proceed by building a web application on top of the ASP.NET Core, and more specifically, the ASP.NET Core MVC framework. We can technically build an entire application using only middleware, but ASP.NET Core MVC gives us the feat...
[ { "code": null, "e": 2851, "s": 2461, "text": "In this chapter, we will set up the MVC framework in our FirstAppDemo application. We will proceed by building a web application on top of the ASP.NET Core, and more specifically, the ASP.NET Core MVC framework. We can technically build an entire applic...
Number of Ways to Paint N × 3 Grid in C++
Suppose we have grid of size n x 3 and we want to paint each cell of the grid with exactly one of the three colors. The colors are Red, Yellow or Green. Now there is a constraint that is no two adjacent cells have the same color. We have n the number of rows of the grid. We have to find the number of ways we can paint ...
[ { "code": null, "e": 1452, "s": 1062, "text": "Suppose we have grid of size n x 3 and we want to paint each cell of the grid with exactly one of the three colors. The colors are Red, Yellow or Green. Now there is a constraint that is no two adjacent cells have the same color. We have n the number of...
SharePoint - REST APIs
In this chapter, we will be covering the REST APIs. This is not a traditional API, where we have a set of libraries that contain types and those types contain properties and methods. The REST API is implemented as Data-centric web service based on the Open Data Protocol or OData. The way these web services work, use ea...
[ { "code": null, "e": 2498, "s": 2315, "text": "In this chapter, we will be covering the REST APIs. This is not a traditional API, where we have a set of libraries that contain types and those types contain properties and methods." }, { "code": null, "e": 2727, "s": 2498, "text": ...
Alternate casing a string in JavaScript
We are required to write a JavaScript function that takes in a string and constructs a new string with all the uppercase characters from the original string converted to lowercase and all the lowercase characters converted to uppercase from the original string. For example: If the string is − const str = 'The Case OF t...
[ { "code": null, "e": 1324, "s": 1062, "text": "We are required to write a JavaScript function that takes in a string and constructs a new string with all the uppercase characters from the original string converted to lowercase and all the lowercase characters converted to uppercase from the original...
How to Visualize Multivariate Trajectory Confidence Intervals using Plotly R | by Marcus Richards Ph.D. | Towards Data Science
Any probabilistic regression approach in statistics or machine learning will result in a line chart together with associated confidence intervals, usually defined as two standard deviations around the mean. Although Plotly has many powerful charting tools for rendering charts in 2 or 3 dimensions, and can draw error ba...
[ { "code": null, "e": 630, "s": 172, "text": "Any probabilistic regression approach in statistics or machine learning will result in a line chart together with associated confidence intervals, usually defined as two standard deviations around the mean. Although Plotly has many powerful charting tools...
Tryit Editor v3.7
Tryit: HTML base element
[]
Get value for key from nested JSON object in JavaScript
Suppose, we have a nested JSON object like this − const obj = { "prop": [ { "key": "FOO", "value": "Foo is wonderfull, foo is great" }, { "key": "BAR", "value": "Bar is bad, really bad" } ] }; We are required to write a JavaScript function that takes in ...
[ { "code": null, "e": 1112, "s": 1062, "text": "Suppose, we have a nested JSON object like this −" }, { "code": null, "e": 1321, "s": 1112, "text": "const obj = {\n \"prop\": [\n {\n \"key\": \"FOO\",\n \"value\": \"Foo is wonderfull, foo is great\"\n }...
Spring Boot JdbcTemplate CRUD Operations Mysql - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorials I am going to show you how ...
[ { "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, ...
Create a fully fledged, professional API with Flask in Python — Part 1 | by Mike Huls | Towards Data Science
An application without an API is much like a restaurant without waiters. In restaurants you don’t have to communicate with the kitchen and wait for your order to enjoy a meal. In the same way a website doesn’t have to know how to communicate with your database for example. Like a waiter, our API receives an order from ...
[ { "code": null, "e": 782, "s": 172, "text": "An application without an API is much like a restaurant without waiters. In restaurants you don’t have to communicate with the kitchen and wait for your order to enjoy a meal. In the same way a website doesn’t have to know how to communicate with your dat...
Count Inversions in an array
The inversions of an array indicate; how many changes are required to convert the array into its sorted form. When an array is already sorted, it needs 0 inversions, and in another case, the number of inversions will be maximum, if the array is reversed. To solve this problem, we will follow the Merge sort approach to ...
[ { "code": null, "e": 1317, "s": 1062, "text": "The inversions of an array indicate; how many changes are required to convert the array into its sorted form. When an array is already sorted, it needs 0 inversions, and in another case, the number of inversions will be maximum, if the array is reversed...
How to get the nth percentile of a Pandas series?
A percentile is a term used in statistics to express how a score compares to other scores in the same set. In this program, we have to find nth percentile of a Pandas series. Step 1: Define a Pandas series. Step 2: Input percentile value. Step 3: Calculate the percentile. Step 4: Print the percentile. import pandas as ...
[ { "code": null, "e": 1237, "s": 1062, "text": "A percentile is a term used in statistics to express how a score compares to other scores in the same set. In this program, we have to find nth percentile of a Pandas series." }, { "code": null, "e": 1365, "s": 1237, "text": "Step 1:...
Quick and Easy Explanation of Logistic Regression | by Renu Khandelwal | Towards Data Science
It is a predictive algorithm using independent variables to predict the dependent variable, just like Linear Regression, but with a difference that the dependent variable should be categorical variable. Independent variables can be numeric or categorical variables, but the dependent variable will always be categorical ...
[ { "code": null, "e": 374, "s": 171, "text": "It is a predictive algorithm using independent variables to predict the dependent variable, just like Linear Regression, but with a difference that the dependent variable should be categorical variable." }, { "code": null, "e": 491, "s": 3...
Count of subarrays of size K with average at least M - GeeksforGeeks
14 Sep, 2021 Given an array arr[] consisting of N integers and two positive integers K and M, the task is to find the number of subarrays of size K whose average is at least M. Examples: Input: arr[] = {2, 3, 3, 4, 4, 4, 5, 6, 6}, K = 3, M = 4Output: 4Explanation:Below are the subarrays of size K(= 3) whose average is ...
[ { "code": null, "e": 24429, "s": 24401, "text": "\n14 Sep, 2021" }, { "code": null, "e": 24593, "s": 24429, "text": "Given an array arr[] consisting of N integers and two positive integers K and M, the task is to find the number of subarrays of size K whose average is at least M....
Ideal Python environment setup for Data Science | by Harshit Tyagi | Towards Data Science
Got a data science project at hand to start off? Not sure what would be the right Python establishment to smooth the process? You need not go any further as this post will resolve all the hiccups around the data science environment to work locally. We’ll cover the tools, packages or software you might need to install b...
[ { "code": null, "e": 543, "s": 172, "text": "Got a data science project at hand to start off? Not sure what would be the right Python establishment to smooth the process? You need not go any further as this post will resolve all the hiccups around the data science environment to work locally. We’ll ...
How to change the tick size using ggplot2 in R?
To change the tick size using ggplot2, we can use theme function with argument axis.ticks.length. For example, if we have a data frame called df that contains two columns say x and y then the scatterplot between x and y with larger size of tick marks can be created by using the below command − ggplot(df,aes(x,y))+geom_...
[ { "code": null, "e": 1357, "s": 1062, "text": "To change the tick size using ggplot2, we can use theme function with argument axis.ticks.length. For example, if we have a data frame called df that contains two columns say x and y then the scatterplot between x and y with larger size of tick marks ca...
Bit Algorithms - GeeksforGeeks
01 Jun, 2021 # include <iostream> using namespace std; int fun(int arr[], int n) { int x = arr[0]; for (int i = 1; i < n; i++) x = x ^ arr[i]; return x; } int main() { int arr[] = {9, 12, 2, 11, 10, 9, 12, 10, 9, 11, 2}; int n = sizeof(arr)/sizeof(arr[0]); cout << fun(arr, n) << endl; retu...
[ { "code": null, "e": 27530, "s": 27502, "text": "\n01 Jun, 2021" }, { "code": null, "e": 27845, "s": 27530, "text": "# include <iostream>\nusing namespace std;\n\nint fun(int arr[], int n)\n{\n int x = arr[0];\n for (int i = 1; i < n; i++)\n x = x ^ arr[i];\n retu...
How to toggle text with JavaScript?
To toggle text with JavaScript, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .textDiv { font-size: 20px; background-color:...
[ { "code": null, "e": 1119, "s": 1062, "text": "To toggle text with JavaScript, the code is as follows −" }, { "code": null, "e": 1130, "s": 1119, "text": " Live Demo" }, { "code": null, "e": 2141, "s": 1130, "text": "<!DOCTYPE html>\n<html>\n<head>\n<meta name...
Print Pattern | Practice | GeeksforGeeks
Print a sequence of numbers starting with N where A[0] = N, without using loop, in which A[i+1] = A[i] - 5, until A[i] > 0. After that A[i+1] = A[i] + 5 repeat it until A[i] = N. Example 1: Input: N = 16 Output: 16 11 6 1 -4 1 6 11 16 Explaination: The value decreses until it is greater than 0. After that it increa...
[ { "code": null, "e": 408, "s": 226, "text": "Print a sequence of numbers starting with N where A[0] = N, without using loop, in which A[i+1] = A[i] - 5, until A[i] > 0. After that A[i+1] = A[i] + 5 repeat it until A[i] = N." }, { "code": null, "e": 419, "s": 408, "text": "Exam...
Cross Validation: A Beginner’s Guide | by Caleb Neale | Towards Data Science
By: Caleb Neale, Demetri Workman, Abhinay Dommalapati In beginning your journey into the world of machine learning and data science, there is often a temptation to jump into algorithms and model creation, without gaining an understanding of how to test the effectiveness of a generated model on real world data. Cross va...
[ { "code": null, "e": 226, "s": 172, "text": "By: Caleb Neale, Demetri Workman, Abhinay Dommalapati" }, { "code": null, "e": 856, "s": 226, "text": "In beginning your journey into the world of machine learning and data science, there is often a temptation to jump into algorithms a...
C++ Atomic Library - Compare Exchange
It atomically compares the value of the atomic object with non-atomic argument and performs atomic exchange if equal or atomic load if not. Following is the declaration for std::atomic_compare_exchange_weak. template< class T > bool atomic_compare_exchange_weak( volatile std::atomic<T>* obj, ...
[ { "code": null, "e": 2743, "s": 2603, "text": "It atomically compares the value of the atomic object with non-atomic argument and performs atomic exchange if equal or atomic load if not." }, { "code": null, "e": 2811, "s": 2743, "text": "Following is the declaration for std::atom...
Converting images to a Base64 data URL using Javascript
To convert image from an Html page tag to a data URI using javascript, you first need to create a canvas element, set its width and height equal to that of the image, draw the image on it and finally call the toDataURL method on it. This will return the base64 encoded data URI of the image. For example, if you have an ...
[ { "code": null, "e": 1295, "s": 1062, "text": "To convert image from an Html page tag to a data URI using javascript, you first need to create a canvas element, set its width and height equal to that of the image, draw the image on it and finally call the toDataURL method on it." }, { "code"...
ctype_upper() function in PHP
The ctype_upper() function in PHP check for uppercase character(s). It returns TRUE if every character in text is an uppercase letter in the current locale. ctype_upper(str) str − The tested string str − The tested string The ctype_upper() function returns TRUE if every character in text is an uppercase letter in the c...
[ { "code": null, "e": 1219, "s": 1062, "text": "The ctype_upper() function in PHP check for uppercase character(s). It returns TRUE if every character in text is an uppercase letter in the current locale." }, { "code": null, "e": 1236, "s": 1219, "text": "ctype_upper(str)" }, ...
How to get the list of all versions of the object from S3 present in AWS Resource
In this article, we will see how to get the list of all versions of the object from S3 those are present in AWS Resource. List out all the versions of test.zip from Bucket_1/testfolder of S3. Problem Statement: Use boto3 library in Python to get list of all versions of the object from S3. Step 1: Import boto3 and botoc...
[ { "code": null, "e": 1184, "s": 1062, "text": "In this article, we will see how to get the list of all versions of the object from S3 those are present in AWS Resource." }, { "code": null, "e": 1254, "s": 1184, "text": "List out all the versions of test.zip from Bucket_1/testfold...
Format Date and Time in Perl
You can use localtime() function in Perl to get a list of 9-elements and later you can use the printf() function to format date and time based on your requirements as follows − Live Demo #!/usr/local/bin/perl ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); printf("Time Format - HH:MM:SS\n"); print...
[ { "code": null, "e": 1239, "s": 1062, "text": "You can use localtime() function in Perl to get a list of 9-elements and later you can use the printf() function to format date and time based on your requirements as follows −" }, { "code": null, "e": 1250, "s": 1239, "text": " Live...
HTML | Div Tag - GeeksforGeeks
17 Mar, 2022 The div tag is known as Division tag. The div tag is used in HTML to make divisions of content in the web page like (text, images, header, footer, navigation bar, etc). Div tag has both open(<div>) and closing (</div>) tag and it is mandatory to close the tag. The Div is the most usable tag in web developm...
[ { "code": null, "e": 23150, "s": 23122, "text": "\n17 Mar, 2022" }, { "code": null, "e": 23607, "s": 23150, "text": "The div tag is known as Division tag. The div tag is used in HTML to make divisions of content in the web page like (text, images, header, footer, navigation bar, ...
HTML - Fonts Reference
Fonts are specific to platform. You will have different look and feel of a web page on different machines running different operating systems like Windows, Linux or Mac iOS. Here we are giving a list of fonts which are available in various operating systems. HTML <font> tag is deprecated in version 4.0 onwards and now ...
[ { "code": null, "e": 2633, "s": 2374, "text": "Fonts are specific to platform. You will have different look and feel of a web page on different machines running different operating systems like Windows, Linux or Mac iOS. Here we are giving a list of fonts which are available in various operating sys...
MongoDB - Java
In this chapter, we will learn how to set up MongoDB CLIENT. Before you start using MongoDB in your Java programs, you need to make sure that you have MongoDB CLIENT and Java set up on the machine. You can check Java tutorial for Java installation on your machine. Now, let us check how to set up MongoDB CLIENT. You nee...
[ { "code": null, "e": 2614, "s": 2553, "text": "In this chapter, we will learn how to set up MongoDB CLIENT." }, { "code": null, "e": 2866, "s": 2614, "text": "Before you start using MongoDB in your Java programs, you need to make sure that you have MongoDB CLIENT and Java set up ...
Load CSV Data into MySQL Server Using PHP - GeeksforGeeks
14 Dec, 2020 In this article, we are going to store data present in CSV file into MySQL database using PHP in XAMPP server and display the data on web browser. Comma Separated Value (CSV) is a text file containing data contents. It facilitates the storage of data in a table like structure. CSV files are stored with a C...
[ { "code": null, "e": 25104, "s": 25076, "text": "\n14 Dec, 2020" }, { "code": null, "e": 25251, "s": 25104, "text": "In this article, we are going to store data present in CSV file into MySQL database using PHP in XAMPP server and display the data on web browser." }, { "c...
How to set JAVA_HOME on Linux | export JAVA_HOME
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 We can set JAVA_HOME on Linux in different wa...
[ { "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, ...
Bitwise AND of Numbers Range in C++
Suppose we have a range [m, n] where 0 <= m <= n <= 2147483647. We have to find the bitwise AND of all numbers in this range, inclusive. So if the range is [5, 7], then the result will be 4. To solve this, we will follow these steps − i := 0 i := 0 while m is not n, thenm := m/2, n := n / 2, increase i by 1 while m is ...
[ { "code": null, "e": 1253, "s": 1062, "text": "Suppose we have a range [m, n] where 0 <= m <= n <= 2147483647. We have to find the bitwise AND of all numbers in this range, inclusive. So if the range is [5, 7], then the result will be 4." }, { "code": null, "e": 1297, "s": 1253, ...
\wedge - Tex Command
\wedge - Used to create wedge symbol. { \wedge} \wedge command draws wedge symbol. \wedge ∧ \wedge ∧ \wedge 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lectures 1 hours Emenwa Global, Ejike IfeanyiChukwu 29 Lectures 2.5 hours Mohammad ...
[ { "code": null, "e": 8024, "s": 7986, "text": "\\wedge - Used to create wedge symbol." }, { "code": null, "e": 8034, "s": 8024, "text": "{ \\wedge}" }, { "code": null, "e": 8069, "s": 8034, "text": "\\wedge command draws wedge symbol." }, { "code": nul...
How to create a System Tray icon of a Tkinter application?
A System Tray icon is used for showing the application’s running state in the taskbar. It typically shows which application is currently running. The system tray icon is visible in the taskbar. To create a System Tray icon of a tkinter application, we can use pystray module in Python. It has many inbuilt functions and ...
[ { "code": null, "e": 1256, "s": 1062, "text": "A System Tray icon is used for showing the application’s running state in the taskbar. It typically shows which application is currently running. The system tray icon is visible in the taskbar." }, { "code": null, "e": 1461, "s": 1256, ...
Python - Tkinter Text
Text widgets provide advanced capabilities that allow you to edit a multiline text and format the way it has to be displayed, such as changing its color and font. You can also use elegant structures like tabs and marks to locate specific sections of the text, and apply changes to those areas. Moreover, you can embed wi...
[ { "code": null, "e": 2407, "s": 2244, "text": "Text widgets provide advanced capabilities that allow you to edit a multiline text and format the way it has to be displayed, such as changing its color and font." }, { "code": null, "e": 2667, "s": 2407, "text": "You can also use el...
String Formatting in Java using %
Followimg is the code to implement String formatting in Java using % − Live Demo public class Demo { public static void main(String args[]){ String my_str = " sample."; String concat_Str = String.format("This is a" + "%s", my_str); String format_str_1 = String.format("The value is %.4f", 78.92367)...
[ { "code": null, "e": 1133, "s": 1062, "text": "Followimg is the code to implement String formatting in Java using % −" }, { "code": null, "e": 1144, "s": 1133, "text": " Live Demo" }, { "code": null, "e": 1469, "s": 1144, "text": "public class Demo {\n publi...
Instruction set of 8051
The instructions of 8051 Microcontroller can be classified into five different groups. These groups are like below Data Transfer Group Data Transfer Group Arithmetic Group Arithmetic Group Logical Group Logical Group Program Branch Group Program Branch Group Bit Processing Group Bit Processing Group This Bit-Processing...
[ { "code": null, "e": 1177, "s": 1062, "text": "The instructions of 8051 Microcontroller can be classified into five different groups. These groups are like below" }, { "code": null, "e": 1197, "s": 1177, "text": "Data Transfer Group" }, { "code": null, "e": 1217, ...
Selenium - Synchronization
To synchronize between script execution and application, we need to wait after performing appropriate actions. Let us look at the ways to achieve the same. Thread.Sleep is a static wait and it is not a good way to use in scripts as it is sleep without condition. Thread.Sleep(1000); //Will wait for 1 second. An 'explici...
[ { "code": null, "e": 2031, "s": 1875, "text": "To synchronize between script execution and application, we need to wait after performing appropriate actions. Let us look at the ways to achieve the same." }, { "code": null, "e": 2138, "s": 2031, "text": "Thread.Sleep is a static w...
Perl scalar Function
This function forces the evaluation of EXPR to be in scalar context, even if it would normally work in list context. Following is the simple syntax for this function − scalar EXPR This function returns Scalar. Following is the example code showing its basic usage − #!/usr/bin/perl -w @a = (1,2,3,4); @b = (10,20,30,40...
[ { "code": null, "e": 2337, "s": 2220, "text": "This function forces the evaluation of EXPR to be in scalar context, even if it would normally work in list context." }, { "code": null, "e": 2388, "s": 2337, "text": "Following is the simple syntax for this function −" }, { ...
XAML - TimePicker
A TimePicker is a control that allows a user to pick a time value. The hierarchical inheritance of TimePicker class is as follows − ClockIdentifier Gets or sets the clock system to use. ClockIdentifierProperty Gets the identifier for the ClockIdentifier dependency property. Header Gets or sets the content for the contr...
[ { "code": null, "e": 2055, "s": 1923, "text": "A TimePicker is a control that allows a user to pick a time value. The hierarchical inheritance of TimePicker class is as follows −" }, { "code": null, "e": 2071, "s": 2055, "text": "ClockIdentifier" }, { "code": null, "e...
Google Guice - @Provides Annotation
Guice provides a way to create bindings with complex objects using @provides method. @Provides public SpellChecker provideSpellChecker() { String dbUrl = "jdbc:mysql://localhost:5326/emp"; String user = "user"; int timeout = 100; SpellChecker SpellChecker = new SpellCheckerImpl(dbUrl, user, timeout); ret...
[ { "code": null, "e": 2187, "s": 2102, "text": "Guice provides a way to create bindings with complex objects using @provides method." }, { "code": null, "e": 2442, "s": 2187, "text": "@Provides\npublic SpellChecker provideSpellChecker() {\n String dbUrl = \"jdbc:mysql://localhos...
Predicting Tweet Sentiment With Word2Vec Embeddings | by Kurtis Pykes | Towards Data Science
As the year comes to a close, I’ve been revisiting previous work mainly for fun and to have things in order for the beginning of the new year. Previously, I did an introduction to sentiment analysis then started a project where I used Machine Learning to predict the sentiment of a tweet, and lastly used that same proje...
[ { "code": null, "e": 442, "s": 47, "text": "As the year comes to a close, I’ve been revisiting previous work mainly for fun and to have things in order for the beginning of the new year. Previously, I did an introduction to sentiment analysis then started a project where I used Machine Learning to p...
Installing Tensorflow with CUDA, cuDNN and GPU support on Windows 10 | by Dr. Joanne Kitson | Towards Data Science
In Part 1 of this series, I discussed how you can upgrade your PC hardware to incorporate a CUDA Toolkit compatible graphics processing card, such as an Nvidia GPU. This Part 2 covers the installation of CUDA, cuDNN and Tensorflow on Windows 10. This article below assumes that you have a CUDA-compatible GPU already ins...
[ { "code": null, "e": 632, "s": 171, "text": "In Part 1 of this series, I discussed how you can upgrade your PC hardware to incorporate a CUDA Toolkit compatible graphics processing card, such as an Nvidia GPU. This Part 2 covers the installation of CUDA, cuDNN and Tensorflow on Windows 10. This arti...
Explain asynchronous functions in JavaScript with an example
The asynchronous functions are defined with async keyword and were introduced in ES 2015. These functions were introduced to define a better way to write consice promises than callback. The await keyword is used inside an async function to pause the flow of control and it waits for promise. Following is the code for as...
[ { "code": null, "e": 1354, "s": 1062, "text": "The asynchronous functions are defined with async keyword and were introduced in ES 2015. These functions were introduced to define a better way to write consice promises than callback. The await keyword is used inside an async function to pause the flo...
Highcharts - Configuration Syntax
In this chapter, we will showcase the configuration required to draw a chart using the Highcharts API. Create an HTML page with the jQuery and Highcharts javascript libraries. HighchartsTestHarness.htm <html> <head> <title>Highcharts Tutorial</title> <script src = "https://ajax.googleapis.com/ajax/libs/j...
[ { "code": null, "e": 2120, "s": 2017, "text": "In this chapter, we will showcase the configuration required to draw a chart using the Highcharts API." }, { "code": null, "e": 2193, "s": 2120, "text": "Create an HTML page with the jQuery and Highcharts javascript libraries." }, ...
SymPy - Solvers
Since the symbols = and == are defined as assignment and equality operators in Python, they cannot be used to formulate symbolic equations. SymPy provides Eq() function to set up an equation. >>> from sympy import * >>> x,y=symbols('x y') >>> Eq(x,y) The above code snippet gives an output equivalent to the below exp...
[ { "code": null, "e": 2211, "s": 2019, "text": "Since the symbols = and == are defined as assignment and equality operators in Python, they cannot be used to formulate symbolic equations. SymPy provides Eq() function to set up an equation." }, { "code": null, "e": 2273, "s": 2211, ...
Concurrency and Parallelism in Python | by Anna Astori | Towards Data Science
If you’re about to start a big data project you will be either retrieving a lot of information or crunching big numbers on your machine, or both. However, if the code is sequential or synchronous your application may start struggling. Let’s see which concepts and Python libraries can improve your application’s performa...
[ { "code": null, "e": 407, "s": 172, "text": "If you’re about to start a big data project you will be either retrieving a lot of information or crunching big numbers on your machine, or both. However, if the code is sequential or synchronous your application may start struggling." }, { "code"...
Python SQLite - Delete Data
To delete records from a SQLite table, you need to use the DELETE FROM statement. To remove specific records, you need to use WHERE clause along with it. Following is the syntax of the DELETE query in SQLite − DELETE FROM table_name [WHERE Clause] Assume we have created a table with name CRICKETERS using the following...
[ { "code": null, "e": 2136, "s": 1982, "text": "To delete records from a SQLite table, you need to use the DELETE FROM statement. To remove specific records, you need to use WHERE clause along with it." }, { "code": null, "e": 2192, "s": 2136, "text": "Following is the syntax of t...
Lexicographically next permutation in C++
Here we will see how to generate lexicographically next permutation of a string in C++. The lexicographically next permutation is basically the greater permutation. For example, the next of “ACB” will be “BAC”. In some cases, the lexicographically next permutation is not present, like “BBB” or “DCBA” etc. In C++ we can...
[ { "code": null, "e": 1369, "s": 1062, "text": "Here we will see how to generate lexicographically next permutation of a string in C++. The lexicographically next permutation is basically the greater permutation. For example, the next of “ACB” will be “BAC”. In some cases, the lexicographically next ...
Recycler view item animate when scrolling in Android
Before getting into Item animation for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items. card view is extended by frame layout and it...
[ { "code": null, "e": 1338, "s": 1062, "text": "Before getting into Item animation for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show gr...
A Hands-on Tutorial For Creating Matplotlib Animations | by Shuai Guo | Towards Data Science
Animations are great data visualization tools to convey complicated insights engagingly. In this article, we will walk through the steps of creating an animation with Matplotlib and Celluloid. This is what we will make: it simulates various projectile motion trajectories and updates the associated histogram of the proj...
[ { "code": null, "e": 365, "s": 172, "text": "Animations are great data visualization tools to convey complicated insights engagingly. In this article, we will walk through the steps of creating an animation with Matplotlib and Celluloid." }, { "code": null, "e": 515, "s": 365, "t...
fread() function in C++
The C/C++ library function size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) reads data from the given stream into the array pointed to, by ptr. Following is the declaration for fread() function. size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) The Following table contains the fread() par...
[ { "code": null, "e": 1273, "s": 1062, "text": "The C/C++ library function size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) reads data from the given stream into the array pointed to, by ptr. Following is the declaration for fread() function." }, { "code": null, "e": 1338,...
Variations in different Sorting techniques in Python - GeeksforGeeks
17 Nov, 2020 These are all different types for sorting techniques that behave very differently. Let’s study which technique works how and which one to use. Let ‘a’ be a numpy array a.sort()(i) Sorts the array in-place & returns None(ii) Return type is None(iii) Occupies less space. No copy created as it directly sorts ...
[ { "code": null, "e": 23845, "s": 23817, "text": "\n17 Nov, 2020" }, { "code": null, "e": 23988, "s": 23845, "text": "These are all different types for sorting techniques that behave very differently. Let’s study which technique works how and which one to use." }, { "code"...
Understand your data with principal component analysis (PCA) and discover underlying patterns | by Philipp Schmalen | Towards Data Science
Save time, resources and stay healthy with data exploration that goes beyond means, distributions and correlations: Leverage PCA to see through the surface of variables. It saves time and resources, because it uncovers data issues before an hour-long model training and is good for a programmer’s health, since she trade...
[ { "code": null, "e": 790, "s": 172, "text": "Save time, resources and stay healthy with data exploration that goes beyond means, distributions and correlations: Leverage PCA to see through the surface of variables. It saves time and resources, because it uncovers data issues before an hour-long mode...
Compiler Design - Symbol Table
Symbol table is an important data structure created and maintained by compilers in order to store information about the occurrence of various entities such as variable names, function names, objects, classes, interfaces, etc. Symbol table is used by both the analysis and the synthesis parts of a compiler. A symbol tabl...
[ { "code": null, "e": 2500, "s": 2193, "text": "Symbol table is an important data structure created and maintained by compilers in order to store information about the occurrence of various entities such as variable names, function names, objects, classes, interfaces, etc. Symbol table is used by bot...
C/C++ program for Armstrong Numbers - GeeksforGeeks
11 Jul, 2020 Given a number N, the task is to check whether the given number is Armstrong number or not. If the given number is Armstrong Number then print “Yes” else print “No”. A positive integer of D digits is called an armstrong-numbers of order D (order is the number of digits) ifWhere D is number of digit in numb...
[ { "code": null, "e": 25122, "s": 25094, "text": "\n11 Jul, 2020" }, { "code": null, "e": 25288, "s": 25122, "text": "Given a number N, the task is to check whether the given number is Armstrong number or not. If the given number is Armstrong Number then print “Yes” else print “No...
Matplotlib Styles for Scientific Plotting | by Rizky Maulana N | Towards Data Science
There are at least two inspirations in writing this story. The first inspiration is coming from my participation in Summer School on Galaxies and Cosmology (SSGC 2020). It has three parts: Public Lecture, Lectures, and Workshops. One of the Workshops analyzed the weak gravitational lensing using Oguri et al. (2012) as ...
[ { "code": null, "e": 633, "s": 47, "text": "There are at least two inspirations in writing this story. The first inspiration is coming from my participation in Summer School on Galaxies and Cosmology (SSGC 2020). It has three parts: Public Lecture, Lectures, and Workshops. One of the Workshops analy...
Working with Page Break – Python .docx Module
03 Jan, 2021 Prerequisites: docx Word documents contain formatted text wrapped within three object levels. Lowest level- run objects, middle level- paragraph objects and highest level- document object. So, we cannot work with these documents using normal text editors. But, we can manipulate these word documents in pyth...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Jan, 2021" }, { "code": null, "e": 48, "s": 28, "text": "Prerequisites: docx" }, { "code": null, "e": 369, "s": 48, "text": "Word documents contain formatted text wrapped within three object levels. Lowest level- ...
Top Hat and Black Hat Transform using Python-OpenCV
08 Jun, 2020 In morphology and digital image processing, top-hat and black-hat transform are operations that are used to extract small elements and details from given images. These two types of transforms in which, the top-hat transform is defined as the difference between the input image and its opening by some struct...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 596, "s": 28, "text": "In morphology and digital image processing, top-hat and black-hat transform are operations that are used to extract small elements and details from given images. These two typ...
RTTI (Run-Time Type Information) in C++
18 May, 2022 In C++, RTTI (Run-time type information) is a mechanism that exposes information about an object’s data type at runtime and is available only for the classes which have at least one virtual function. It allows the type of an object to be determined during program execution. Runtime Casts The runtime cast, ...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 May, 2022" }, { "code": null, "e": 329, "s": 54, "text": "In C++, RTTI (Run-time type information) is a mechanism that exposes information about an object’s data type at runtime and is available only for the classes which have at le...
What is the Python Global Interpreter Lock (GIL)
06 Jan, 2019 Python Global Interpreter Lock (GIL) is a type of process lock which is used by python whenever it deals with processes. Generally, Python only uses only one thread to execute the set of written statements. This means that in python only one thread will be executed at a time. The performance of the single-...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jan, 2019" }, { "code": null, "e": 614, "s": 52, "text": "Python Global Interpreter Lock (GIL) is a type of process lock which is used by python whenever it deals with processes. Generally, Python only uses only one thread to execut...
Output of C++ programs | Set 43 (Decision and Control Statements)
05 Sep, 2017 Decision and Loops & Control StatementsQUE.1 What is the output of this program ? #include <iostream>using namespace std;int main (){ int n; for (n = 5; n > 0; n--) { cout << n; if (n == 3) break; } return 0;} OPTIONa) 543b) 54c) 5432d) 53 Answer: a Explanation : In ...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Sep, 2017" }, { "code": null, "e": 136, "s": 54, "text": "Decision and Loops & Control StatementsQUE.1 What is the output of this program ?" }, { "code": "#include <iostream>using namespace std;int main (){ int n; for ...
Python program to convert unix timestamp string to readable date
31 Oct, 2021 In this article, we are going to see the conversion of the Unix timestamp string to a readable date. This can be done with the help of fromtimestamp() and strftime() functions. fromtimestamp(): The fromtimestamp() function is used to return the date and time corresponding to a specified timestamp. Note: He...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2021" }, { "code": null, "e": 205, "s": 28, "text": "In this article, we are going to see the conversion of the Unix timestamp string to a readable date. This can be done with the help of fromtimestamp() and strftime() functions...
Second Normal Form (2NF)
25 Nov, 2019 First Normal Form (1NF) does not eliminate redundancy, but rather, it’s that it eliminates repeating groups. Instead of having multiple columns of the same kind of data in a record, (0NF or Unnormalized form) you remove the repeated information into a separate relation and represent them as rows. This is w...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Nov, 2019" }, { "code": null, "e": 163, "s": 54, "text": "First Normal Form (1NF) does not eliminate redundancy, but rather, it’s that it eliminates repeating groups." }, { "code": null, "e": 382, "s": 163, "text...
Find cells in Matrix that are not visited by Robot for given movements
27 Oct, 2021 Given an integer N, which denotes the size of the matrix that is N*N. There is a robot placed over the top-left corner (0, 0) of the matrix, the direction of movement of the robot are given as (N, S, W, E, NE, NW, SE, SW which denotes North, South, West, East, North-East, North-west, South-east, South-west...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Oct, 2021" }, { "code": null, "e": 548, "s": 28, "text": "Given an integer N, which denotes the size of the matrix that is N*N. There is a robot placed over the top-left corner (0, 0) of the matrix, the direction of movement of the r...
How to Switch Themes in Android Using RadioButtons?
22 Mar, 2021 We have seen android app comes with two different types of mode or theme which are dark mode or light mode or we also called them as night and morning mode. In this article, we will implement the light and dark mode in android using RadioButton. We will be building a simple application in which we will be...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Mar, 2021" }, { "code": null, "e": 275, "s": 28, "text": "We have seen android app comes with two different types of mode or theme which are dark mode or light mode or we also called them as night and morning mode. In this article, w...
How to detect the browser language preference using JavaScript ?
23 Sep, 2020 Detecting the language preference of users can be very important for Websites or Web Apps for increasing user interaction. By using JavaScript, this task can be easily done by using: Languages property is available for the navigator interface, which returns the most preferred / user preferred language set ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2020" }, { "code": null, "e": 211, "s": 28, "text": "Detecting the language preference of users can be very important for Websites or Web Apps for increasing user interaction. By using JavaScript, this task can be easily done by...
Maximum cost of splitting given Binary Tree into two halves
21 Jun, 2021 Given a Binary Tree with N nodes valued 0 to N – 1 and N-1 edges and an array arr[] consisting of values of edges, the task is to find the maximum cost of splitting the tree into two halves. The cost of splitting a tree is equal to the product of sum of node values of the splitted subtrees. Examples: Inp...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2021" }, { "code": null, "e": 247, "s": 54, "text": "Given a Binary Tree with N nodes valued 0 to N – 1 and N-1 edges and an array arr[] consisting of values of edges, the task is to find the maximum cost of splitting the tree ...
How to read a JSON response from a link in Python?
24 Feb, 2021 There is a huge amount of data available on the web and most of them are in form of (JavaScript Object Notation) JSON. But it is difficult for humans to directly read and use it. To resolve this problem in python we have different libraries which help us to read the JSON data fetched from the web. These li...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Feb, 2021" }, { "code": null, "e": 454, "s": 52, "text": "There is a huge amount of data available on the web and most of them are in form of (JavaScript Object Notation) JSON. But it is difficult for humans to directly read and use...
Java 8 | Collectors averagingInt() with Examples
06 Dec, 2018 Collectors averagingInt(ToIntFunction<? super T> mapper) method is used to find the mean of the integers passed in the parameters. This method returns a Collector that produces the arithmetic mean of an integer-valued function applied to the input elements. If no elements are passed as the input elements, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2018" }, { "code": null, "e": 363, "s": 28, "text": "Collectors averagingInt(ToIntFunction<? super T> mapper) method is used to find the mean of the integers passed in the parameters. This method returns a Collector that produce...
Tarjan’s off-line lowest common ancestors algorithm
02 Mar, 2022 Prerequisite : LCA basics, Disjoint Set Union by Rank and Path CompressionWe are given a tree(can be extended to a DAG) and we have many queries of form LCA(u, v), i.e., find LCA of nodes ‘u’ and ‘v’.We can perform those queries in O(N + QlogN) time using RMQ, where O(N) time for pre-processing and O(log N...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Mar, 2022" }, { "code": null, "e": 1156, "s": 54, "text": "Prerequisite : LCA basics, Disjoint Set Union by Rank and Path CompressionWe are given a tree(can be extended to a DAG) and we have many queries of form LCA(u, v), i.e., fin...
Strings in Julia
20 Apr, 2020 Strings in Julia are a set of characters or a single character that is enclosed within double quotes(” “). It is a finite sequence of characters. Julia allows extracting elements of a string to form multiple substrings with the use of square brackets([ ]). Strings in Julia can be created using double quote...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Apr, 2020" }, { "code": null, "e": 285, "s": 28, "text": "Strings in Julia are a set of characters or a single character that is enclosed within double quotes(” “). It is a finite sequence of characters. Julia allows extracting eleme...
Breadth First Search or BFS for a Graph
27 Jun, 2022 Breadth-First Traversal (or Search) for a graph is similar to Breadth-First Traversal of a tree (See method 2 of this post). The only catch here is, that, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited arra...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jun, 2022" }, { "code": null, "e": 497, "s": 52, "text": "Breadth-First Traversal (or Search) for a graph is similar to Breadth-First Traversal of a tree (See method 2 of this post). The only catch here is, that, unlike trees, graph...
R – Keywords
22 Jun, 2020 R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is available across widely used platforms like Windows, Linux, and macOS. Also, the R programming language is the latest cutting-edge tool. Key...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2020" }, { "code": null, "e": 358, "s": 54, "text": "R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is availab...
Python Program for n-th Fibonacci number
12 Jan, 2022 In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn-1 + Fn-2 With seed values F0 = 0 and F1 = 1. Method 1 ( Use recursion ) : Python3 # Function for nth Fibonacci number def Fibonacci(n): if n<= 0: print("Incorrect input") # First Fibonac...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Jan, 2022" }, { "code": null, "e": 151, "s": 52, "text": "In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation " }, { "code": null, "e": 168, "s": 151, "text": "Fn = F...
Creating Pandas dataframe using list of lists
22 Jun, 2021 Pandas DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. It is generally the most commonly used pandas object.Pandas DataFrame can be created in multiple ways. Let’s discuss how to create Pandas dataframe using list of lists. Code #1: Python3 # Import pandas ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2021" }, { "code": null, "e": 301, "s": 28, "text": "Pandas DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. It is generally the most commonly used pandas object.Pandas DataFrame c...
primary_key – Django Built-in Field Validation
19 Feb, 2021 Built-in Field Validations in Django models are the default validations that come predefined to all Django fields. Every field comes in with built-in validations from Django validators. One can also add more built-in field validations for applying or removing certain constraints on a particular field. prim...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Feb, 2021" }, { "code": null, "e": 708, "s": 28, "text": "Built-in Field Validations in Django models are the default validations that come predefined to all Django fields. Every field comes in with built-in validations from Django v...
turtle.mode() function in Python
06 Aug, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This function is used to set turtle-mode (‘standard’, ‘logo’ or ‘world’) and perform reset...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Aug, 2020" }, { "code": null, "e": 245, "s": 28, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver...
Pizza Problem
13 Jul, 2021 Given an integer N and a pizza which can be cut into pieces, each cut should be a straight line going from the center of the pizza to its border. Also, the angle between any two cuts must be a positive integer. Two pieces are equal if their appropriate angles are equal. The given pizza can be cut in follow...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jul, 2021" }, { "code": null, "e": 353, "s": 28, "text": "Given an integer N and a pizza which can be cut into pieces, each cut should be a straight line going from the center of the pizza to its border. Also, the angle between any t...
Word Break Problem
In the input of this problem, one sentence is given without spaces, another dictionary is also provided of some valid English words. We have to find the possible ways to break the sentence in individual dictionary words. We will try to search from the left of the string to find a valid word when a valid word is found, ...
[ { "code": null, "e": 1408, "s": 1187, "text": "In the input of this problem, one sentence is given without spaces, another dictionary is also provided of some valid English words. We have to find the possible ways to break the sentence in individual dictionary words." }, { "code": null, ...
Python – Sum elements matching condition
17 Dec, 2021 Checking a number/element by a condition is a common problem one faces and is done in almost every program. Sometimes we also require to get the totals sum that match the particular condition to have a distinguish which to not match for further utilization. Lets discuss certain ways in which this task can ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2021" }, { "code": null, "e": 348, "s": 28, "text": "Checking a number/element by a condition is a common problem one faces and is done in almost every program. Sometimes we also require to get the totals sum that match the part...
Modulo or Remainder Operator in Java
23 Feb, 2022 Modulo or Remainder Operator returns the remainder of the two numbers after division. If you are provided with two numbers, say A and B, A is the dividend and B is the divisor, A mod B is there a remainder of the division of A and B. Modulo operator is an arithmetical operator which is denoted by %. NOTE: ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Feb, 2022" }, { "code": null, "e": 353, "s": 52, "text": "Modulo or Remainder Operator returns the remainder of the two numbers after division. If you are provided with two numbers, say A and B, A is the dividend and B is the diviso...
What is the use of let & const in JavaScript ?
25 May, 2022 In this article, we are going to discuss the usage of let and const in JavaScript. let: It is a keyword to declare variables in JavaScript that are block-scoped i.e. it allows to declare a variable within a block or within an expression rather than in the whole document. Syntax: let variable_name = value; ...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 May, 2022" }, { "code": null, "e": 136, "s": 53, "text": "In this article, we are going to discuss the usage of let and const in JavaScript." }, { "code": null, "e": 325, "s": 136, "text": "let: It is a keyword t...
Node.js fs.renameSync() Method
12 Oct, 2021 The fs.renameSync() method is used to synchronously rename a file at the given old path to the given new path. It will overwrite the destination file if it already exists. Syntax: fs.renameSync( oldPath, newPath ) Property Values: oldPath: It holds the path of the file that has to be renamed. It can be a s...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Oct, 2021" }, { "code": null, "e": 200, "s": 28, "text": "The fs.renameSync() method is used to synchronously rename a file at the given old path to the given new path. It will overwrite the destination file if it already exists." ...
How to make a Tkinter widget invisible?
To make a tkinter widget invisible, we can use the pack_forget() method. It is generally used to unmap the widgets from the window. In the following example, we will create a label text and a button that can be used to trigger the invisible event on the label text widget. #Import the required libraries from tkinter imp...
[ { "code": null, "e": 1319, "s": 1187, "text": "To make a tkinter widget invisible, we can use the pack_forget() method. It is generally used to unmap the widgets from the window." }, { "code": null, "e": 1460, "s": 1319, "text": "In the following example, we will create a label t...
Output of Java Program | Set 1
22 Apr, 2022 Difficulty Level: Rookie Predict the output of the following Java Programs. Program 1: Java // filename Main.javaclass Test { protected int x, y;} class Main { public static void main(String args[]) { Test t = new Test(); System.out.println(t.x + " " + t.y); }} Output: 0 0 In Java, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Apr, 2022" }, { "code": null, "e": 78, "s": 52, "text": "Difficulty Level: Rookie " }, { "code": null, "e": 129, "s": 78, "text": "Predict the output of the following Java Programs." }, { "code": null, ...
Minimum operations to make two numbers equal
22 Feb, 2022 Given two numbers n and m, the task is to find the minimum number of operations required to make them equal if the following operations can be performed on them. During the first operation, any of the two numbers can be increased by one. During the second operation, any of the two numbers can be increase...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Feb, 2022" }, { "code": null, "e": 218, "s": 54, "text": "Given two numbers n and m, the task is to find the minimum number of operations required to make them equal if the following operations can be performed on them. " }, { ...
Linear Search
23 Jun, 2022 Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. Examples : Input : arr[] = {10, 20, 80, 30, 60, 50, 110, 100, 130, 170} x = 110; Output : 6 Element x is present at index 6 Input : arr[] = {10, 20, 80, 30, 60, 50, ...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Jun, 2022" }, { "code": null, "e": 153, "s": 53, "text": "Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]." }, { "code": null, "e": 166, "s": 153, "text": "Examp...
StDev() and StDevP() Function in MS Access
15 Sep, 2020 1. StDev() Function :StDev() Function in MS Access is used to estimate the standard deviation for a population sample. Syntax : StDev (expr) Parameter : This method accept one parameter as mentioned above and described below : expr : It represents a string expression identifying the field that contains the...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Sep, 2020" }, { "code": null, "e": 147, "s": 28, "text": "1. StDev() Function :StDev() Function in MS Access is used to estimate the standard deviation for a population sample." }, { "code": null, "e": 156, "s": 147, ...
turtle.towards() function in Python
26 Jul, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This function is used to return the angle, between the line from turtle-position to the po...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2020" }, { "code": null, "e": 245, "s": 28, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a ver...
Python | sys.setrecursionlimit() method
07 Aug, 2019 This sys module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It provides information about constants, functions and methods of python interpreter. It can be used for manipulating Python runtime environment. sys.setrecu...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Aug, 2019" }, { "code": null, "e": 349, "s": 53, "text": "This sys module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It provides information ...
Program for Decimal to Octal Conversion
11 Jul, 2022 Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent octal number. i.e convert the number with base value 10 to base value 8. The base value of a number system determines the number of digits used to represent a numeric value. For example, the b...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jul, 2022" }, { "code": null, "e": 532, "s": 52, "text": "Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent octal number. i.e convert the number with base value 10 to ...
C++ program to overload addition operator to add two complex numbers
Suppose we have a complex number class with real and imaginary part. We shall have to overload the addition (+) operator to add two complex number. We also have to define a function to return complex number in proper representation. So, if the input is like c1 = 8 - 5i, c2 = 2 + 3i, then the output will be 10 - 2i. To ...
[ { "code": null, "e": 1295, "s": 1062, "text": "Suppose we have a complex number class with real and imaginary part. We shall have to overload the addition (+) operator to add two complex number. We also have to define a function to return complex number in proper representation." }, { "code"...
How to Install Python Scrapy on Windows? - GeeksforGeeks
09 Sep, 2021 Scrapy is a web scraping library that is used to scrape, parse and collect web data. Now once our spider has scraped the data then it decides whether to: Keep the data. Drop the data or items. stop and store the processed data items. In this article, we will look into the process of installing the Scrapy m...
[ { "code": null, "e": 24421, "s": 24393, "text": "\n09 Sep, 2021" }, { "code": null, "e": 24575, "s": 24421, "text": "Scrapy is a web scraping library that is used to scrape, parse and collect web data. Now once our spider has scraped the data then it decides whether to:" }, {...
Difference between pointer to an array and array of pointers - GeeksforGeeks
13 Jun, 2019 Pointer to an array: Pointer to an array is also known as array pointer. We are using the pointer to access the components of the array. int a[3] = {3, 4, 5 }; int *ptr = a; We have a pointer ptr that focuses to the 0th component of the array. We can likewise declare a pointer that can point to whol...
[ { "code": null, "e": 24388, "s": 24360, "text": "\n13 Jun, 2019" }, { "code": null, "e": 24409, "s": 24388, "text": "Pointer to an array:" }, { "code": null, "e": 24525, "s": 24409, "text": "Pointer to an array is also known as array pointer. We are using the ...
How to Send Mail Spring Boot Example - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, I am going to show how to s...
[ { "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, ...
MongoDB - Insert Document
In this chapter, we will learn how to insert document in MongoDB collection. To insert data into MongoDB collection, you need to use MongoDB's insert() or save() method. The basic syntax of insert() command is as follows − >db.COLLECTION_NAME.insert(document) > db.users.insert({ ... _id : ObjectId("507f191e810c19729de...
[ { "code": null, "e": 2630, "s": 2553, "text": "In this chapter, we will learn how to insert document in MongoDB collection." }, { "code": null, "e": 2723, "s": 2630, "text": "To insert data into MongoDB collection, you need to use MongoDB's insert() or save() method." }, { ...
The User-Agent — That Crazy String Underpinning a Bunch of Analytics | by Randy Au | Towards Data Science
Work in web analytics for any amount of time, even less than a week I’d bet, and you’re going to hear about this thing called the “User-Agent”. It’s this string that we get from users, and it’s supposed to tell us various things about them. If we’re supposed to be using this thing to count and analyze users somehow, we...
[ { "code": null, "e": 400, "s": 46, "text": "Work in web analytics for any amount of time, even less than a week I’d bet, and you’re going to hear about this thing called the “User-Agent”. It’s this string that we get from users, and it’s supposed to tell us various things about them. If we’re suppos...