title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Ruby Web Applications - CGI Programming
Ruby is a general-purpose language; it can't properly be called a web language at all. Even so, web applications and web tools in general are among the most common uses of Ruby. Not only can you write your own SMTP server, FTP daemon, or Web server in Ruby, but you can also use Ruby for more usual tasks such as CGI pro...
[ { "code": null, "e": 2606, "s": 2428, "text": "Ruby is a general-purpose language; it can't properly be called a web language at all. Even so, web applications and web tools in general are among the most common uses of Ruby." }, { "code": null, "e": 2786, "s": 2606, "text": "Not ...
How to use FOR LOOP in MySQL Stored Procedure?
The following is the syntax to work with FOR LOOP in MySQL stored procedure − delimiter // CREATE procedure yourProcedureName() wholeblock:BEGIN DECLARE anyVariableName1 INT ; Declare anyVariableName3 int; DECLARE anyVariableName2 VARCHAR(255); SET anyVariableName1 =1 ; SET anyVariableName3 =10; SET a...
[ { "code": null, "e": 1265, "s": 1187, "text": "The following is the syntax to work with FOR LOOP in MySQL stored procedure −" }, { "code": null, "e": 1825, "s": 1265, "text": "delimiter //\nCREATE procedure yourProcedureName()\nwholeblock:BEGIN\n DECLARE anyVariableName1 INT ;\...
How to check if an URL is valid or not using Java?
The URL class of the java.net package represents a Uniform Resource Locator which is used to point a resource(file or, directory or a reference) in the worldwide web. This class provides various constructors one of them accepts a String parameter and constructs an object of the URL class. While passing URL to this meth...
[ { "code": null, "e": 1354, "s": 1187, "text": "The URL class of the java.net package represents a Uniform Resource Locator which is used to point a resource(file or, directory or a reference) in the worldwide web." }, { "code": null, "e": 1620, "s": 1354, "text": "This class prov...
Shell Script to Delete a File from Every Directory Above the Present Working Directory
12 Nov, 2021 In this article, we will discuss how to delete a file from every directory above the parent working directory using shell script in Linux. To delete a file from a directory we use the rm command in Linux/UNIX. Syntax: rm [OPTION]... [FILE]... Using shell script, we have to delete the input file from every...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Nov, 2021" }, { "code": null, "e": 265, "s": 54, "text": "In this article, we will discuss how to delete a file from every directory above the parent working directory using shell script in Linux. To delete a file from a directory w...
Python | Get items in sorted order from given dictionary
28 Feb, 2019 Given a dictionary, the task is to get all items from the dictionary in sorted order. Let’s discuss different ways we can do this task. Method #1: Using sorted() # Python code to demonstrate# to get sorted items from dictionary # initialising _dictionaryini_dict = {'a' : 'akshat', 'b' : 'bhuvan', 'c': 'ch...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Feb, 2019" }, { "code": null, "e": 164, "s": 28, "text": "Given a dictionary, the task is to get all items from the dictionary in sorted order. Let’s discuss different ways we can do this task." }, { "code": null, "e": 19...
SafeArea in Flutter
23 Sep, 2020 SafeArea is an important and useful widget in Flutter which makes UI dynamic and adaptive to a wide variety of devices. While designing the layout of widgets, we consider different types of devices and their pre-occupied constraints of screen like status bar, notches, navigation bar, etc. But new devices a...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Sep, 2020" }, { "code": null, "e": 565, "s": 52, "text": "SafeArea is an important and useful widget in Flutter which makes UI dynamic and adaptive to a wide variety of devices. While designing the layout of widgets, we consider dif...
Abstract Class and Interface in Java
07 Mar, 2018 Which of the following is true about interfaces in java. 1) An interface can contain following type of members. ....public, static, final fields (i.e., constants) ....default and static methods with bodies 2) An instance of interface can be created. 3) A class can implement multiple interfaces. 4) Many...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n07 Mar, 2018" }, { "code": null, "e": 29634, "s": 29577, "text": "Which of the following is true about interfaces in java." }, { "code": null, "e": 29927, "s": 29634, "text": "1) An interface can contain follo...
Moment.js moment.hour() Method
12 Mar, 2021 The moment().hour() Method is used to get the hours from the current time or to set the hours. Syntax: moment().hour(); or moment().hours(); Parameters: This method accepts a single parameter number that you want to set hours then you will require an additional parameter: Number::It ranges from 0 to 23 and...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Mar, 2021" }, { "code": null, "e": 123, "s": 28, "text": "The moment().hour() Method is used to get the hours from the current time or to set the hours." }, { "code": null, "e": 131, "s": 123, "text": "Syntax:" ...
Validate a password using HTML and JavaScript
16 Apr, 2019 The task is to validate the password using HTML and JavaScript. A password is correct if it contains: At least 1 uppercase character.At least 1 lowercase character.At least 1 digit.At least 1 special character.Minimum 8 characters. At least 1 uppercase character. At least 1 lowercase character. At least 1 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2019" }, { "code": null, "e": 92, "s": 28, "text": "The task is to validate the password using HTML and JavaScript." }, { "code": null, "e": 130, "s": 92, "text": "A password is correct if it contains:" }, ...
Running Python script on GPU.
18 May, 2022 GPU’s have more cores than CPU and hence when it comes to parallel computing of data, GPUs perform exceptionally better than CPU even though GPU has lower clock speed and it lacks several core managements features as compared to the CPU. Thus, running a python script on GPU can prove to be comparatively f...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 May, 2022" }, { "code": null, "e": 291, "s": 52, "text": "GPU’s have more cores than CPU and hence when it comes to parallel computing of data, GPUs perform exceptionally better than CPU even though GPU has lower clock speed and it ...
numpy.searchsorted() in Python
10 Dec, 2018 numpy.searchsorted() function is used to find the indices into a sorted array arr such that, if elements are inserted before the indices, the order of arr would be still preserved. Here, binary search is used to find the required insertion indices. Syntax : numpy.searchsorted(arr, num, side=’left’, sorter=...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Dec, 2018" }, { "code": null, "e": 277, "s": 28, "text": "numpy.searchsorted() function is used to find the indices into a sorted array arr such that, if elements are inserted before the indices, the order of arr would be still prese...
numpy.linalg.eig() Method in Python
10 Aug, 2020 In NumPy we can compute the eigenvalues and right eigenvectors of a given square array with the help of numpy.linalg.eig(). It will take a square array as a parameter and it will return two values first one is eigenvalues of the array and second is the right eigenvectors of a given square array. Syntax: nu...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Aug, 2020" }, { "code": null, "e": 325, "s": 28, "text": "In NumPy we can compute the eigenvalues and right eigenvectors of a given square array with the help of numpy.linalg.eig(). It will take a square array as a parameter and it w...
How to Find Prime and Palindrome Numbers using Multi-Threading in Java?
03 Aug, 2021 Multithreading in Java is a process of executing two or more threads simultaneously to maximum utilization of CPU. Multithreaded applications execute two or more threads run concurrently. Hence, it is also known as Concurrency in Java. Each thread runs parallel to each other. Multiple threads don’t allocat...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Aug, 2021" }, { "code": null, "e": 384, "s": 28, "text": "Multithreading in Java is a process of executing two or more threads simultaneously to maximum utilization of CPU. Multithreaded applications execute two or more threads run c...
How to Normalize and Standardize Data in R?
14 Jan, 2022 In this article, we will be looking at the various techniques to scale data, Min-Max Normalization, Z-Score Standardization, and Log Transformation in the R programming language. Let’s install and load the required packages. And also create a dataframe as a sample dataset. R # load packages and datainstal...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jan, 2022" }, { "code": null, "e": 208, "s": 28, "text": "In this article, we will be looking at the various techniques to scale data, Min-Max Normalization, Z-Score Standardization, and Log Transformation in the R programming langu...
HTML | DOM image naturalWidth property - GeeksforGeeks
21 Dec, 2020 naturalWidth : property is used to get the original width of an image. Since the width of an image to be displayed on the webpage can be modified using the ‘width’ attribute of the <img> tag, hence the naturalWidth property becomes useful in situations where the original width of the image is required rath...
[ { "code": null, "e": 24988, "s": 24960, "text": "\n21 Dec, 2020" }, { "code": null, "e": 25351, "s": 24988, "text": "naturalWidth : property is used to get the original width of an image. Since the width of an image to be displayed on the webpage can be modified using the ‘width’...
Backtracking: How to Approach Search Programming Interview Questions | by Andre Ye | Towards Data Science
Backtracking is an effective method for solving commonly asked programming interview algorithmic problems. Backtracking depth-searches for solutions and then backtracks to the most recent valid path as soon as an end node is reached (i.e., we can proceed no further). This method reduces the search space since any paths...
[ { "code": null, "e": 553, "s": 172, "text": "Backtracking is an effective method for solving commonly asked programming interview algorithmic problems. Backtracking depth-searches for solutions and then backtracks to the most recent valid path as soon as an end node is reached (i.e., we can proceed ...
SQL Query to Add Ranking Positions of Rows in a Database With RANK() - GeeksforGeeks
13 Apr, 2021 In this article, we will discuss the overview of SQL function RANK and then our main focus will be on Add Ranking Positions of Rows in a Database With RANK() in SQL. Let’s discuss it one by one. Overview :Generally, when max/min commands are executed, a single row is displayed as output. RANK() is an SQL f...
[ { "code": null, "e": 24294, "s": 24266, "text": "\n13 Apr, 2021" }, { "code": null, "e": 24489, "s": 24294, "text": "In this article, we will discuss the overview of SQL function RANK and then our main focus will be on Add Ranking Positions of Rows in a Database With RANK() in SQ...
Batch Script - MORE
This batch command displays the contents of a file or files, one screen at a time. More [filename] Where filename is the file whose contents need to be listed one screen at a time. @echo off More C:\tp\lists.txt Directory of C:\Program Files The above command will display the contents of the file lists.txt one screen ...
[ { "code": null, "e": 2252, "s": 2169, "text": "This batch command displays the contents of a file or files, one screen at a time." }, { "code": null, "e": 2269, "s": 2252, "text": "More [filename]\n" }, { "code": null, "e": 2351, "s": 2269, "text": "Where file...
JavaFX - Layout Panes(Containers)
After constructing all the required nodes in a scene, we will generally arrange them in order. This arrangement of the components within the container is called the Layout of the container. We can also say that we followed a layout as it includes placing all the components at a particular position within the container....
[ { "code": null, "e": 1995, "s": 1900, "text": "After constructing all the required nodes in a scene, we will generally arrange them in order." }, { "code": null, "e": 2221, "s": 1995, "text": "This arrangement of the components within the container is called the Layout of the con...
How to redirect to another webpage using JavaScript?
The window.location object contains the current location or URL information. We can redirect the users to another webpage using the properties of this object. window.location can be written without the prefix window. We use the following properties of the window.location object to redirect the users to another webpage ...
[ { "code": null, "e": 1279, "s": 1062, "text": "The window.location object contains the current location or URL information. We can redirect the users to another webpage using the properties of this object. window.location can be written without the prefix window." }, { "code": null, "e":...
Python Core Concepts for Data Science Explained (with code) | by Frank Andrade | Towards Data Science
Python offers a good number of libraries used in data science such as Pandas, Numpy, and Scikit-learn. Learning those libraries right away and skipping the basics isn’t good though. If you would like to learn Python for data science, you should master Python core concepts first. Having a solid foundation in Python will...
[ { "code": null, "e": 353, "s": 171, "text": "Python offers a good number of libraries used in data science such as Pandas, Numpy, and Scikit-learn. Learning those libraries right away and skipping the basics isn’t good though." }, { "code": null, "e": 623, "s": 353, "text": "If y...
How To Label The Values Plots With Matplotlib | by Jacob Toftgaard Rasmussen | Towards Data Science
Matplotlib can be a bit tricky to use. I have especially struggled with displaying the values of data points on my plots. Initially I though that this should be a simple task, but I have found out that it is not quite as easy as I had expected. Therefore, in this post I explain how you can do it, and I will make it as ...
[ { "code": null, "e": 526, "s": 172, "text": "Matplotlib can be a bit tricky to use. I have especially struggled with displaying the values of data points on my plots. Initially I though that this should be a simple task, but I have found out that it is not quite as easy as I had expected. Therefore,...
Python | Matching elements count - GeeksforGeeks
19 Feb, 2020 Sometimes, while working with lists we need to handle two lists and search for the matches, and return just the count of indices of the match. Querying whole list for the this process is not feasible when the size of master list is very large, hence having just the match indices helps in this cause. Let’s ...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n19 Feb, 2020" }, { "code": null, "e": 24571, "s": 24212, "text": "Sometimes, while working with lists we need to handle two lists and search for the matches, and return just the count of indices of the match. Querying whole list ...
The Ultimate Guide to Build a Competitor Price Monitor Dashboard | by Low Wei Hong | Towards Data Science
1 2 3 4 5 6 7 8 9 10 Powered by Play.ht Create audio with Play.ht Create Audio Narrations with Play.ht Feeling that your work is full of repetitive work? Why not start to think on how to automate it? Here is the thing, today I am going to introduce a tool to automate your BORING stuff — Python. Python is perhaps the ea...
[ { "code": null, "e": 174, "s": 172, "text": "1" }, { "code": null, "e": 176, "s": 174, "text": "2" }, { "code": null, "e": 178, "s": 176, "text": "3" }, { "code": null, "e": 180, "s": 178, "text": "4" }, { "code": null, "e": 182...
Data-Driven Evaluation of Football Players’ Skills | by Ofir Magdaci | Towards Data Science
By Ofir Magdaci, Data Scientist at Wix.com To truly grasp all of the concepts to be presented, a familiarity with the StatsBomb xG metric is highly recommended. This great fbref.com article can provide all the information you need. In the last two posts, I both presented and explained the two main models which allowed ...
[ { "code": null, "e": 214, "s": 171, "text": "By Ofir Magdaci, Data Scientist at Wix.com" }, { "code": null, "e": 403, "s": 214, "text": "To truly grasp all of the concepts to be presented, a familiarity with the StatsBomb xG metric is highly recommended. This great fbref.com arti...
Python 3 - os.pipe() Method
The method pipe() creates a pipe and returns a pair of file descriptors (r, w) usable for reading and writing, respectively Following is the syntax for pipe() method − os.pipe() NA This method returns a pair of file descriptors. The following example shows the usage of pipe() method. #!/usr/bin/python3 import os, sys ...
[ { "code": null, "e": 2464, "s": 2340, "text": "The method pipe() creates a pipe and returns a pair of file descriptors (r, w) usable for reading and writing, respectively" }, { "code": null, "e": 2508, "s": 2464, "text": "Following is the syntax for pipe() method −" }, { ...
How to install the latest PowerShell module version?
Although simply running Install-Module command picks up the latest version of the module, we can still use the -RequiredVersion and -MinimumVersion parameter to install the latest version manually. Below command directly installs the latest available version of the module. In this example we are using 7Zip4PowerShell m...
[ { "code": null, "e": 1336, "s": 1062, "text": "Although simply running Install-Module command picks up the latest version of the module, we can still use the -RequiredVersion and -MinimumVersion parameter to install the latest version manually. Below command directly installs the latest available ve...
How do we display the thickness of the border of an element in HTML?
Use the border attribute in HTML to display the thickness of the border. Note − This attribute is not supported in HTML5. You can try to run the following code to learn how to implement border attribute in HTML − <!DOCTYPE html> <html> <body> <h2>Cricketers</h2> <table style="width:100%" border="1"> ...
[ { "code": null, "e": 1135, "s": 1062, "text": "Use the border attribute in HTML to display the thickness of the border." }, { "code": null, "e": 1184, "s": 1135, "text": "Note − This attribute is not supported in HTML5." }, { "code": null, "e": 1275, "s": 1184, ...
Automate your Python Scripts with Task Scheduler | by Vincent Tatan | Towards Data Science
Running my Python Scripts every day is too troublesome. I need a way to run my Python Scripts periodically and automatically Imagine your manager asks you to wake up in the middle of night to run a script. This will be your biggest nightmare. You wake up prematurely, expose with the horrendous blue light, and avoid dec...
[ { "code": null, "e": 228, "s": 172, "text": "Running my Python Scripts every day is too troublesome." }, { "code": null, "e": 297, "s": 228, "text": "I need a way to run my Python Scripts periodically and automatically" }, { "code": null, "e": 519, "s": 297, "...
How to use the ‘except’ clause with multiple exceptions in Python?
It is possible to define multiple exceptions with the same except clause. It means that if the Python interpreter finds a matching exception, then it’ll execute the code written under except clause. In general, the syntax for multiple exceptions is as follows Except(Exception1, Exception2,...ExceptionN) as e: When we d...
[ { "code": null, "e": 1261, "s": 1062, "text": "It is possible to define multiple exceptions with the same except clause. It means that if the Python interpreter finds a matching exception, then it’ll execute the code written under except clause." }, { "code": null, "e": 1322, "s": 12...
How to create a table with a caption?
To create a table with caption in HTML, use the <caption> tag. Caption gets added inside the table, immediately after the <table> tag. You can try to run the following code to create a table with caption in HTML <!DOCTYPE html> <html> <head> <style> table, td, th { border: 1px solid black; } </s...
[ { "code": null, "e": 1197, "s": 1062, "text": "To create a table with caption in HTML, use the <caption> tag. Caption gets added inside the table, immediately after the <table> tag." }, { "code": null, "e": 1274, "s": 1197, "text": "You can try to run the following code to create...
Program to find Perimeter / Circumference of Square and Rectangle - GeeksforGeeks
06 Apr, 2021 The circumference of a figure is the sum of all the side lengths. To calculate the circumference of square, length of one of the side is required as all sides are equal. To calculate the circumference of rectangle, length and breadth of rectangle is required. Circumference of a Square: The circumference ...
[ { "code": null, "e": 24489, "s": 24461, "text": "\n06 Apr, 2021" }, { "code": null, "e": 24778, "s": 24489, "text": "The circumference of a figure is the sum of all the side lengths. To calculate the circumference of square, length of one of the side is required as all sides are ...
Number of occurrence | Practice | GeeksforGeeks
Given a sorted array Arr of size N and a number X, you need to find the number of occurrences of X in Arr. Example 1: Input: N = 7, X = 2 Arr[] = {1, 1, 2, 2, 2, 2, 3} Output: 4 Explanation: 2 occurs 4 times in the given array. Example 2: Input: N = 7, X = 4 Arr[] = {1, 1, 2, 2, 2, 2, 3} Output: 0 Explanation: 4 is not...
[ { "code": null, "e": 345, "s": 238, "text": "Given a sorted array Arr of size N and a number X, you need to find the number of occurrences of X in Arr." }, { "code": null, "e": 356, "s": 345, "text": "Example 1:" }, { "code": null, "e": 466, "s": 356, "text": ...
Create a Yes/No Message Box in Python using tkinter - GeeksforGeeks
26 Mar, 2020 Python offers a number Graphical User Interface(GUI) framework but Tk interface or tkinter is the most widely used framework. It is cross-platform which allows the same code to be run irrespective of the OS platform (Windows, Linux or macOS). Tkinter is lightweight, faster and simple to work with. Tkinter ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24797, "s": 24292, "text": "Python offers a number Graphical User Interface(GUI) framework but Tk interface or tkinter is the most widely used framework. It is cross-platform which allows the...
Pandas merge, concat, append: Master Advanced Joins | Towards Data Science
With each data science project or dataset, you want to perform several analyses and create plots to find insights. Often, the raw data never comes in one massive table but in many separate ones. To answer your questions, you should have the skills to join multiple tables into one and then perform operations on them. Yo...
[ { "code": null, "e": 490, "s": 172, "text": "With each data science project or dataset, you want to perform several analyses and create plots to find insights. Often, the raw data never comes in one massive table but in many separate ones. To answer your questions, you should have the skills to join...
Find the sum of the number of divisors - GeeksforGeeks
24 Nov, 2021 Given three integers A, B, C, the task is to find ΣAi=1 ΣBj=1ΣCk=1 d(i.j.k), where d(x) is the number of divisors of x. Answer can be very large, So, print answer modulo 109+7. Examples: Input: A = 2, B = 2, c = 2 Output: 20 Explanation: d(1.1.1) = d(1) = 1; d(1·1·2) = d(2) = 2; d(1·2·1) = d(2) =...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n24 Nov, 2021" }, { "code": null, "e": 24881, "s": 24692, "text": "Given three integers A, B, C, the task is to find ΣAi=1 ΣBj=1ΣCk=1 d(i.j.k), where d(x) is the number of divisors of x. Answer can be very large, So, print answer ...
How to change border color in Tkinter widget?
23 Nov, 2021 Prerequisites: Tkinter GUI, Tkinter Widgets Tkinter is Python’s standard GUI package which provides us with a variety of common GUI elements such as buttons, menus, and various kinds of entry fields and display areas which we can use to build out an interface. These elements are called Tkinter Widgets. Amo...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Nov, 2021" }, { "code": null, "e": 72, "s": 28, "text": "Prerequisites: Tkinter GUI, Tkinter Widgets" }, { "code": null, "e": 332, "s": 72, "text": "Tkinter is Python’s standard GUI package which provides us with ...
Print list items containing all characters of a given word
24 Dec, 2021 There is a list of items. Given a specific word, e.g., “sun”, print out all the items in list which contain all the characters of “sun”. For example if the given word is “sun” and the items are “sunday”, “geeksforgeeks”, “utensils”, “”just” and “sss”, then the program should print “sunday” and “utensils”. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Dec, 2021" }, { "code": null, "e": 359, "s": 52, "text": "There is a list of items. Given a specific word, e.g., “sun”, print out all the items in list which contain all the characters of “sun”. For example if the given word is “sun...
When to use PreventDefault( ) vs Return false in JavaScript?
07 Aug, 2019 In Javascript, there are two methods- preventDefault() and Return false, that are used to stop default browser behaviour but their functionalities and uses are little different. This article shows how these two are different? preventDefault() This method stops the event if it is stopable, meaning that the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Aug, 2019" }, { "code": null, "e": 278, "s": 52, "text": "In Javascript, there are two methods- preventDefault() and Return false, that are used to stop default browser behaviour but their functionalities and uses are little differe...
How to Install Dart Sass in Windows?
29 Oct, 2021 Dart is a programming language designed for client development such as for the web and mobile apps. It is developed by Google and can also be used to build server and desktop applications. Dart is an object-oriented, class-based, garbage-collected language with C-style syntax. Dart can compile to either na...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Oct, 2021" }, { "code": null, "e": 824, "s": 28, "text": "Dart is a programming language designed for client development such as for the web and mobile apps. It is developed by Google and can also be used to build server and desktop ...
How to pass values from one activity to another in Android?
For this lesson we are only concerned with passing data between activities without making them persistent so we’ll look at the two simplest ways to achieve that which are by using Static methods and Intents This example demonstrate about Passing data between activities in Android using Static methods. Step 1 − Create a...
[ { "code": null, "e": 1394, "s": 1187, "text": "For this lesson we are only concerned with passing data between activities without making them persistent so we’ll look at the two simplest ways to achieve that which are by using Static methods and Intents" }, { "code": null, "e": 1490, ...
LocalDate isAfter() method in Java with Examples
29 Nov, 2018 The isAfter() method of LocalDate class in Java checks if this date is after the specified date. Syntax: public boolean isAfter(ChronoLocalDate date2) Parameter: This method accept a single mandatory parameter date2 the other date to compare to and not null. Return Value: The function returns true if this...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 125, "s": 28, "text": "The isAfter() method of LocalDate class in Java checks if this date is after the specified date." }, { "code": null, "e": 133, "s": 125, "text": "Syntax:" ...
C++ Program To Reverse Words In A Given String
15 Dec, 2021 Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i” Examples: Input: s = “geeks quiz practice code” Output: s = “code practice quiz geeks” Input: s = “getting good at coding needs a lot of practice” Output: s = “practic...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Dec, 2021" }, { "code": null, "e": 167, "s": 28, "text": "Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”" }, { "code": null, "e":...
Python OpenCV | cv2.circle() method
07 Jun, 2022 OpenCV-Python is a library of Python bindings designed to solve computer vision problems. cv2.circle() method is used to draw a circle on any image. The syntax of cv2.circle() method is: Syntax: cv2.circle(image, center_coordinates, radius, color, thickness) Parameters: image: It is the image on which th...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jun, 2022" }, { "code": null, "e": 239, "s": 52, "text": "OpenCV-Python is a library of Python bindings designed to solve computer vision problems. cv2.circle() method is used to draw a circle on any image. The syntax of cv2.circle(...
Count substrings that contain all vowels | SET 2
31 May, 2022 Given a string str containing lowercase alphabets, the task is to count the sub-strings that contain all the vowels at-least one time and there are no consonants (non-vowel characters) present in the sub-strings. Examples: Input: str = “aeoibsddaaeiouudb” Output: 4 “aaeiouu”, “aeiouu”, “aeiou” and “aaeio...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2022" }, { "code": null, "e": 277, "s": 52, "text": "Given a string str containing lowercase alphabets, the task is to count the sub-strings that contain all the vowels at-least one time and there are no consonants (non-vowel c...
Adding and Querying the data in MongoDB - GeeksforGeeks
09 Sep, 2020 Adding Data in MongoDB: MongoDB stores document in BSON, a binary form of JSON (JavaScript Object Notation). The documents are store in collection. To insert documents in MongoDB follow the step mentioned below: Step 1: Create CollectionSyntax: use collection_name It will create a collection if it does no...
[ { "code": null, "e": 23881, "s": 23853, "text": "\n09 Sep, 2020" }, { "code": null, "e": 24029, "s": 23881, "text": "Adding Data in MongoDB: MongoDB stores document in BSON, a binary form of JSON (JavaScript Object Notation). The documents are store in collection." }, { "...
Jackson Annotations - Quick Guide
@JsonAnyGetter allows a getter method to return Map which is then used to serialize the additional properties of JSON in the similar fashion as other properties. import java.io.IOException; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.databind.ObjectMapper; public class JacksonTeste...
[ { "code": null, "e": 2637, "s": 2475, "text": "@JsonAnyGetter allows a getter method to return Map which is then used to serialize the additional properties of JSON in the similar fashion as other properties." }, { "code": null, "e": 3586, "s": 2637, "text": "import java.io.IOExc...
FileWriter Class in Java - GeeksforGeeks
10 Feb, 2022 Java FileWriter class of java.io package is used to write data in character form to file. Java FileWriter class is used to write character-oriented data to a file. It is a character-oriented class that is used for file handling in java. This class inherits from OutputStreamWriter class which in turn inheri...
[ { "code": null, "e": 23972, "s": 23944, "text": "\n10 Feb, 2022" }, { "code": null, "e": 24209, "s": 23972, "text": "Java FileWriter class of java.io package is used to write data in character form to file. Java FileWriter class is used to write character-oriented data to a file....
Linear regression: Modeling and Assumptions | by Kumar Rohit Malhotra | Towards Data Science
Regression analysis is a powerful statistical process to find the relations within a dataset, with the key focus being on relationships between the independent variables (predictors) and a dependent variable (outcome). It can be used to build models for inference or prediction. Among several methods of regression analy...
[ { "code": null, "e": 592, "s": 172, "text": "Regression analysis is a powerful statistical process to find the relations within a dataset, with the key focus being on relationships between the independent variables (predictors) and a dependent variable (outcome). It can be used to build models for i...
Gson - Null Object Support
Gson by default generates optimized Json content ignoring the NULL values. But GsonBuilder provides flags to show NULL values in the Json output using the GsonBuilder.serializeNulls() method. GsonBuilder builder = new GsonBuilder(); builder.serializeNulls(); Gson gson = builder.create(); Create a Java class file na...
[ { "code": null, "e": 2124, "s": 1932, "text": "Gson by default generates optimized Json content ignoring the NULL values. But GsonBuilder provides flags to show NULL values in the Json output using the GsonBuilder.serializeNulls() method." }, { "code": null, "e": 2225, "s": 2124, ...
C# | Type.GetField() Method - GeeksforGeeks
10 Dec, 2019 Type.GetField() Method is used to get a specific field of the current Type. There are 2 methods in the overload list of this method as follows: GetField(String) Method GetField(String, BindingFlags) Method This method is used to search for the public field with the specified name. Syntax: public System.Ref...
[ { "code": null, "e": 24450, "s": 24422, "text": "\n10 Dec, 2019" }, { "code": null, "e": 24594, "s": 24450, "text": "Type.GetField() Method is used to get a specific field of the current Type. There are 2 methods in the overload list of this method as follows:" }, { "code...
Ruby | Hash merge function - GeeksforGeeks
07 Jan, 2020 Hash#merge() is a Hash class method which combines two hash arrays and their content. Syntax: Hash.merge() Parameter: Hash values Return: combine two hash arrays Example #1 : # Ruby code for Hash.merge() method # declaring Hash valuea = {a:100, b:200} # declaring Hash valueb = {a:100, c:300, b:200} # de...
[ { "code": null, "e": 23387, "s": 23359, "text": "\n07 Jan, 2020" }, { "code": null, "e": 23473, "s": 23387, "text": "Hash#merge() is a Hash class method which combines two hash arrays and their content." }, { "code": null, "e": 23494, "s": 23473, "text": "Synt...
What does/doesn’t follow Benford’s law | by Mathieu d'Aquin | Towards Data Science
Like many others, the first time I heard about Benford’s law, I thought: “What? That’s weird! What’s the trick?” And then, there is no trick. It is just there. It is a law that applies for no apparent good reason. If you have never heard of it, let’s look at what it is: Imagine a set of numbers from some real-life phen...
[ { "code": null, "e": 386, "s": 172, "text": "Like many others, the first time I heard about Benford’s law, I thought: “What? That’s weird! What’s the trick?” And then, there is no trick. It is just there. It is a law that applies for no apparent good reason." }, { "code": null, "e": 1082...
Java RMI - Database Application
In the previous chapter, we created a sample RMI application where a client invokes a method which displays a GUI window (JavaFX). In this chapter, we will take an example to see how a client program can retrieve the records of a table in MySQL database residing on the server. Assume we have a table named student_data ...
[ { "code": null, "e": 1828, "s": 1697, "text": "In the previous chapter, we created a sample RMI application where a client invokes a method which displays a GUI window (JavaFX)." }, { "code": null, "e": 1975, "s": 1828, "text": "In this chapter, we will take an example to see how...
First non-repeating character in a stream | Practice | GeeksforGeeks
Given an input stream of A of n characters consisting only of lower case alphabets. The task is to find the first non repeating character, each time a character is inserted to the stream. If there is no such character then append '#' to the answer. Example 1: Input: A = "aabc" Output: "a#bb" Explanation: For every ch...
[ { "code": null, "e": 489, "s": 238, "text": "Given an input stream of A of n characters consisting only of lower case alphabets. The task is to find the first non repeating character, each time a character is inserted to the stream. If there is no such character then append '#' to the answer.\n " ...
UnitTest Framework - Framework
'unittest' supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework. The unittest module provides classes that make it easy to support these qualities for a set of tests. To achieve this, unittest supports t...
[ { "code": null, "e": 2280, "s": 2098, "text": "'unittest' supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework." }, { "code": null, "e": 2382, "s": 2280, "text": "...
skill - Unix, Linux Command
skill [signal to send] [options] process selection criteria snice [new priority] [options] process selection criteria The default signal for skill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways:...
[ { "code": null, "e": 10698, "s": 10579, "text": "skill [signal to send] [options] process selection criteria\nsnice [new priority] [options] process selection criteria\n" }, { "code": null, "e": 10920, "s": 10700, "text": "\nThe default signal for skill is TERM. Use -l or -L to l...
How to use image height and width attribute in HTML Page?
To add an image in an HTML page, <img> tag is used. With that, we need to use the attributes height and width to set the height and width of the image in pixels. Just keep in mind to specify both these attributes. You can try the following code to add height and width attribute to the image in an HTML page − <!DOCTYPE ...
[ { "code": null, "e": 1276, "s": 1062, "text": "To add an image in an HTML page, <img> tag is used. With that, we need to use the attributes height and width to set the height and width of the image in pixels. Just keep in mind to specify both these attributes." }, { "code": null, "e": 13...
How to Upload PDF Files in Firebase Storage in Android? - GeeksforGeeks
22 Feb, 2021 Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides secure file uploads and downloads for the Firebase application. This article explains how to build an Android application with the ability to sel...
[ { "code": null, "e": 25062, "s": 25034, "text": "\n22 Feb, 2021" }, { "code": null, "e": 25448, "s": 25062, "text": "Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides s...
GATE | GATE-CS-2014-(Set-2) | Question 65 - GeeksforGeeks
28 Jun, 2021 The ratio of male to female students in a college for five years is plotted in the following line graph. If the number of female students doubled in 2009, by what percent did the number of male students increase in 2009?(A) 120(B) 140(C) 160(D) 180Answer: (B)Explanation: Let x represent the males and y rep...
[ { "code": null, "e": 25919, "s": 25891, "text": "\n28 Jun, 2021" }, { "code": null, "e": 26191, "s": 25919, "text": "The ratio of male to female students in a college for five years is plotted in the following line graph. If the number of female students doubled in 2009, by what ...
Bash Scripting - Until Loop - GeeksforGeeks
18 Jan, 2022 The Bash has three types of looping constructs namely for, while, and until. The Until loop is used to iterate over a block of commands until the required condition is false. Syntax: until [ condition ]; do block-of-statements done Here, the flow of the above syntax will be – Checks the condition. if the ...
[ { "code": null, "e": 24530, "s": 24502, "text": "\n18 Jan, 2022" }, { "code": null, "e": 24705, "s": 24530, "text": "The Bash has three types of looping constructs namely for, while, and until. The Until loop is used to iterate over a block of commands until the required conditio...
DTD - Attributes
In this chapter we will discuss about DTD Attributes. Attribute gives more information about an element or more precisely it defines a property of an element. An XML attribute is always in the form of a name-value pair. An element can have any number of unique attributes. Attribute declaration is very much similar to e...
[ { "code": null, "e": 1939, "s": 1666, "text": "In this chapter we will discuss about DTD Attributes. Attribute gives more information about an element or more precisely it defines a property of an element. An XML attribute is always in the form of a name-value pair. An element can have any number of...
How to store query output in temp MongoDB database?
For this, in a single query, simply work with forEach() and store output in a temp db. Let us first create a collection with documents − > db.demo43.insertOne({"StudentName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5e25d4b3cfb11e5c34d898e5") } > db.demo43.insertOne({"StudentName":"Bob"}); { ...
[ { "code": null, "e": 1199, "s": 1062, "text": "For this, in a single query, simply work with forEach() and store output in a temp db. Let us first create a collection with documents −" }, { "code": null, "e": 1596, "s": 1199, "text": "> db.demo43.insertOne({\"StudentName\":\"Chri...
N-Queen Problem | Practice | GeeksforGeeks
The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other. Given an integer n, find all distinct solutions to the n-queens puzzle. Each solution contains distinct board configurations of the n-queens’ placement, where the solutions are a permutation of [1...
[ { "code": null, "e": 751, "s": 238, "text": "The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other.\nGiven an integer n, find all distinct solutions to the n-queens puzzle. Each solution contains distinct board configurations of th...
Find minimum radius such that atleast k point lie inside the circle - GeeksforGeeks
01 Sep, 2021 Given a positive integer K, a circle center at (0, 0) and coordinates of some points. The task is to find minimum radius of the circle so that at-least k points lie inside the circle. Output the square of the minimum radius. Examples: Input : (1, 1), (-1, -1), (1, -1), k = 3 Output : 2 We need...
[ { "code": null, "e": 24619, "s": 24591, "text": "\n01 Sep, 2021" }, { "code": null, "e": 24845, "s": 24619, "text": "Given a positive integer K, a circle center at (0, 0) and coordinates of some points. The task is to find minimum radius of the circle so that at-least k points li...
Encoding Categorical Features. Introduction | by Yang Liu | Towards Data Science
In machine learning projects, one important part is feature engineering. It is very common to see categorical features in a dataset. However, our machine learning algorithm can only read numerical values. It is essential to encoding categorical features into numerical values. Here we will cover three different ways of ...
[ { "code": null, "e": 449, "s": 172, "text": "In machine learning projects, one important part is feature engineering. It is very common to see categorical features in a dataset. However, our machine learning algorithm can only read numerical values. It is essential to encoding categorical features i...
CIFAR-10 Image Classification in TensorFlow
30 Nov, 2021 Image Classification Convolution Neural Networks including basic pooling, convolution layers with normalization in neural networks, and dropout. Data Augmentation. Neural Networks. Numpy arrays. In this article, we are going to discuss how to classify images using TensorFlow. Image Classification is a meth...
[ { "code": null, "e": 53, "s": 25, "text": "\n30 Nov, 2021" }, { "code": null, "e": 74, "s": 53, "text": "Image Classification" }, { "code": null, "e": 198, "s": 74, "text": "Convolution Neural Networks including basic pooling, convolution layers with normaliza...
Inorder predecessor and successor for a given key in BST | Iterative Approach
27 Jan, 2022 Given a BST and a key. The task is to find the inorder successor and predecessor of the given key. In case, if either of predecessor or successor is not present, then print -1.Examples: Input: 50 / \ / \ 30 70 / \ / \ / \...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Jan, 2022" }, { "code": null, "e": 241, "s": 54, "text": "Given a BST and a key. The task is to find the inorder successor and predecessor of the given key. In case, if either of predecessor or successor is not present, then print -...
C# Queue with Examples
22 Feb, 2019 A Queue is used to represent a first-in, first out(FIFO) collection of objects. It is used when you need first-in, first-out access of items. It is the non-generic type of collection which is defined in System.Collections namespace. It is used to create a dynamic collection which grows, according to the ne...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Feb, 2019" }, { "code": null, "e": 618, "s": 52, "text": "A Queue is used to represent a first-in, first out(FIFO) collection of objects. It is used when you need first-in, first-out access of items. It is the non-generic type of co...
How to check if something is a RDD or a DataFrame in PySpark ?
31 Aug, 2021 In this article we are going to check the data is an RDD or a DataFrame using isinstance(), type(), and dispatch methods. It is used to check particular data is RDD or dataframe. It returns the boolean value. Syntax: isinstance(data,DataFrame/RDD) where data is our input data DataFrame is the method from p...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Aug, 2021" }, { "code": null, "e": 150, "s": 28, "text": "In this article we are going to check the data is an RDD or a DataFrame using isinstance(), type(), and dispatch methods." }, { "code": null, "e": 237, "s": 15...
Sum of first n natural numbers
06 Apr, 2021 Given a positive integer n. The task is to find the sum of the sum of first n natural number.Examples: Input : n = 3 Output : 10 Sum of first natural number: 1 Sum of first and second natural number: 1 + 2 = 3 Sum of first, second and third natural number = 1 + 2 + 3 = 6 Sum of sum of first three natural...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Apr, 2021" }, { "code": null, "e": 157, "s": 52, "text": "Given a positive integer n. The task is to find the sum of the sum of first n natural number.Examples: " }, { "code": null, "e": 410, "s": 157, "text": "...
Project Idea – Object Detection and Tracking
04 Jul, 2021 Project title: Object Detection and Tracking Introduction: A lot of people go to supermarkets and retail stores and shops to idle around and window-shop instead of purchasing any products. The thought of analyzing this kind of behavior was intriguing. How does this kind of behavior affect product sales? ...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Jul, 2021" }, { "code": null, "e": 98, "s": 53, "text": "Project title: Object Detection and Tracking" }, { "code": null, "e": 307, "s": 98, "text": "Introduction: A lot of people go to supermarkets and retail st...
mv command in Linux with examples
18 Mar, 2021 mv stands for move. mv is used to move one or more files or directories from one place to another in a file system like UNIX. It has two distinct functions: (i) It renames a file or folder. (ii) It moves a group of files to a different directory. No additional space is consumed on a disk during renaming. T...
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Mar, 2021" }, { "code": null, "e": 431, "s": 53, "text": "mv stands for move. mv is used to move one or more files or directories from one place to another in a file system like UNIX. It has two distinct functions: (i) It renames a ...
Python | Initialize list with empty dictionaries
28 Aug, 2019 While working with Python, we can have a problem in which we need to initialize a list of a particular size with empty dictionaries. This task has it’s utility in web development to store records. Let’s discuss certain ways in which this task can be performed. Method #1 : Using {} + "*" operatorThis task c...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2019" }, { "code": null, "e": 289, "s": 28, "text": "While working with Python, we can have a problem in which we need to initialize a list of a particular size with empty dictionaries. This task has it’s utility in web developm...
Python | Pandas dataframe.add()
19 Feb, 2021 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Dataframe.add() method is used for addition of dataframe and other, element-wise (binary oper...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Feb, 2021" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes imp...
Numpy | ndarray - GeeksforGeeks
28 Jun, 2021 Array in Numpy is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers. In Numpy, number of dimensions of the array is called rank of the array.A tuple of integers giving the size of the array along each dimension is known as shape of the array. An array clas...
[ { "code": null, "e": 43445, "s": 43417, "text": "\n28 Jun, 2021" }, { "code": null, "e": 43901, "s": 43445, "text": "Array in Numpy is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers. In Numpy, number of dimensions of the array...
Difference between Inheritance and Polymorphism
05 Jun, 2022 Inheritance: Inheritance is one in which a new class is created that inherits the properties of the already exist class. It supports the concept of code reusability and reduces the length of the code in object-oriented programming.Types of Inheritance are: Single inheritanceMulti-level inheritanceMultipl...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jun, 2022" }, { "code": null, "e": 311, "s": 52, "text": "Inheritance: Inheritance is one in which a new class is created that inherits the properties of the already exist class. It supports the concept of code reusability and reduc...
How to make Drawer using Material UI ?
09 Dec, 2020 Material UI Drawer is the most widely used component of Material UI. Material UI Drawer is used as a navigation bar of the website which displays a list of items and then clicking on the item the user will be redirected to the specific part of the web page/website. It is seen in almost all the websites as ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Dec, 2020" }, { "code": null, "e": 445, "s": 28, "text": "Material UI Drawer is the most widely used component of Material UI. Material UI Drawer is used as a navigation bar of the website which displays a list of items and then clic...
Split Pandas Dataframe by Rows
11 Mar, 2022 We can try different approaches for splitting Dataframe to get the desired results. Let’s take an example of a dataset of diamonds. Python3 # importing librariesimport seaborn as snsimport pandas as pdimport numpy as np # data needs not to be downloaded separatelydf = sns.load_dataset('diamonds')df.head...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Mar, 2022" }, { "code": null, "e": 186, "s": 52, "text": "We can try different approaches for splitting Dataframe to get the desired results. Let’s take an example of a dataset of diamonds. " }, { "code": null, "e": 194...
Can we have integers as elements of an enum in Java?
Enumeration (enum) in Java is a datatype which stores a set of constant values. You can use enumerations to store fixed values such as days in a week, months in a year etc. You can define an enumeration using the keyword enum followed by the name of the enumeration as − enum Days { SUNDAY, MONDAY, TUESDAY, WEDNESDAY...
[ { "code": null, "e": 1360, "s": 1187, "text": "Enumeration (enum) in Java is a datatype which stores a set of constant values. You can use enumerations to store fixed values such as days in a week, months in a year etc." }, { "code": null, "e": 1458, "s": 1360, "text": "You can d...
Labels in Bokeh
20 Sep, 2021 In this article, we will be learning about Labels in Bokeh. Labels are the short words or phrases that are used in order to define something in a plot. Let us take an example that we are plotting a set of points in a graph. Now, if we’re dealing with real-life statistical data, then to plot the points in ...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2021" }, { "code": null, "e": 181, "s": 28, "text": "In this article, we will be learning about Labels in Bokeh. Labels are the short words or phrases that are used in order to define something in a plot. " }, { "code": ...
Increase border line thickness of ggplot2 plot in R
24 Jun, 2021 In this article, we are going to see how to change the borderline thickness using the ggplot2 bar plot in R Programming Language. First, you need to install the ggplot2 package if it is not previously installed in R Studio. To install and load write the below command in R Console : install.packages("ggplot...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jun, 2021" }, { "code": null, "e": 158, "s": 28, "text": "In this article, we are going to see how to change the borderline thickness using the ggplot2 bar plot in R Programming Language." }, { "code": null, "e": 311, ...
Vectorized Operations in NumPy
18 Feb, 2022 Numpy arrays are homogeneous in nature means it is an array that contains data of a single type only. Python’s lists and tuples are unrestricted in the type of data they contain. The concept of vectorized operations on NumPy allows the use of more optimal and pre-compiled functions and mathematical operati...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Feb, 2022" }, { "code": null, "e": 497, "s": 52, "text": "Numpy arrays are homogeneous in nature means it is an array that contains data of a single type only. Python’s lists and tuples are unrestricted in the type of data they cont...
Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!
02 Nov, 2021 You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!, find out the sum of the series till nth term.Examples : Input :n = 5 Output : 2.70833 Input :n = 7 Output : 2.71806 A simple solution is to one by one computer terms. For every term, find its corresponding factorial value.An effici...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Nov, 2021" }, { "code": null, "e": 182, "s": 53, "text": "You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!, find out the sum of the series till nth term.Examples : " }, { "code": null, "e": 243, ...
Interesting Facts about Macros and Preprocessors in C
25 Nov, 2021 In a C program, all lines that start with # are processed by preprocessor which is a special program invoked by the compiler. by this we mean to say that the ‘#’ symbol is used to process the functionality prior than other statements in the program, that is, which means it processes some code before run-ti...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Nov, 2021" }, { "code": null, "e": 493, "s": 52, "text": "In a C program, all lines that start with # are processed by preprocessor which is a special program invoked by the compiler. by this we mean to say that the ‘#’ symbol is us...
Maven - NetBeans
NetBeans 6.7 and newer has in-built support for Maven. In case of previous version, Maven plugin is available in plugin Manager. We are using NetBeans 6.9 in this example. Some of features of NetBeans are listed below − You can run Maven goals from NetBeans. You can run Maven goals from NetBeans. You can view the outpu...
[ { "code": null, "e": 2366, "s": 2194, "text": "NetBeans 6.7 and newer has in-built support for Maven. In case of previous version, Maven plugin is available in plugin Manager. We are using NetBeans 6.9 in this example." }, { "code": null, "e": 2414, "s": 2366, "text": "Some of fe...
Throwable toString() method in Java with Examples
06 Feb, 2019 The toString() method of Java.lang.Throwable class used to return a String representation of this Throwable which consists of the name of the class of this object, a colon and a space(“: “) and a string which is same as result of invoking this object’s getLocalizedMessage() method and If getLocalizedMessag...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Feb, 2019" }, { "code": null, "e": 389, "s": 28, "text": "The toString() method of Java.lang.Throwable class used to return a String representation of this Throwable which consists of the name of the class of this object, a colon and...
PostgreSQL – UNIQUE Index
28 Aug, 2020 In PostgreSQL, the UNIQUE index to ensure the uniqueness of values in one or more columns. To create a UNIQUE index, you can use the following syntax: Syntax: CREATE UNIQUE INDEX index_name ON table_name(column_name, [...]); Note: Only B-tree indexes can be declared as unique indexes. Example 1: The follo...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 179, "s": 28, "text": "In PostgreSQL, the UNIQUE index to ensure the uniqueness of values in one or more columns. To create a UNIQUE index, you can use the following syntax:" }, { "code": nu...
How to pass data to javascript in Django Framework ?
08 Jun, 2020 Django is a python framework for web development which works on jinja2 templating engine. When data is rendered along with the template after passing through views.py, that data becomes static on the html file along which it was rendered. As django is a backend framework, hence to use the power of python t...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 728, "s": 28, "text": "Django is a python framework for web development which works on jinja2 templating engine. When data is rendered along with the template after passing through views.py, that da...
Python 3 - Regular Expressions
A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. Regular expressions are widely used in UNIX world. The module re provides full support for Perl-like regular expressions in Python. The re module raises t...
[ { "code": null, "e": 2557, "s": 2340, "text": "A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. Regular expressions are widely used in UNIX world." }, { "code": null, "e":...
Does BERT Need Clean Data? Part 2: Classification. | by Alexander Bricken | Towards Data Science
By the end of this article, you should be able to get a top 50 score (84% accuracy) on the NLP Disaster Tweets Kaggle Competition! Remember, we are trying to classify whether a Tweet designates a disaster (such as a hurricane or forest fire) or doesn’t. The difficulty of this task is a result of the contextual meaning ...
[ { "code": null, "e": 303, "s": 172, "text": "By the end of this article, you should be able to get a top 50 score (84% accuracy) on the NLP Disaster Tweets Kaggle Competition!" }, { "code": null, "e": 568, "s": 303, "text": "Remember, we are trying to classify whether a Tweet des...
How to insert data to MySQL having auto incremented primary key?
Whenever your column has an auto incremented primary key then there is an advantage that you do not need to give value for that column in the INSERT command. This means MySQL will give the value for that column. To understand the above concept, let us first create a table. The query to create a table is as follows − my...
[ { "code": null, "e": 1274, "s": 1062, "text": "Whenever your column has an auto incremented primary key then there is an advantage that you do not need to give value for that column in the INSERT command. This means MySQL will give the value for that column." }, { "code": null, "e": 1380...
What is the difference between public, static and void keywords in C#?
All these keywords are part of the main method of any C# program. The Main method, which is the entry point for all C# programs states that what a class does when it executed. using System; class Demo { static void Main(string[] args) { Console.WriteLine("My first program in C#!"); } } public − This is the ...
[ { "code": null, "e": 1128, "s": 1062, "text": "All these keywords are part of the main method of any C# program." }, { "code": null, "e": 1238, "s": 1128, "text": "The Main method, which is the entry point for all C# programs states that what a class does when it executed." }, ...
How to fire event if CSS class is changed using jQuery ? - GeeksforGeeks
29 Nov, 2021 Given an HTML document with heading and button, jQuery should fire an event when the CSS class of the button changes. Approach: In jQuery, there is no provision to trigger an event on class change. An alternative method is to manually raise an event when you programmatically change the class using the trig...
[ { "code": null, "e": 24492, "s": 24464, "text": "\n29 Nov, 2021" }, { "code": null, "e": 24610, "s": 24492, "text": "Given an HTML document with heading and button, jQuery should fire an event when the CSS class of the button changes." }, { "code": null, "e": 24903, ...
Construct the Matrix interaction network based on the movie script | by Tomaz Bratanic | Towards Data Science
Christmas is just around the corner, and with it, comes the newest Matrix movie. I can’t think of a better way to wait till the movie is released than to perform a network analysis of the first Matrix movie. This blog post will present how to combine web scraping, OCR, and NLP techniques to construct the Matrix interac...
[ { "code": null, "e": 380, "s": 172, "text": "Christmas is just around the corner, and with it, comes the newest Matrix movie. I can’t think of a better way to wait till the movie is released than to perform a network analysis of the first Matrix movie." }, { "code": null, "e": 506, "...
How to get the length of a Number in JavaScript?
Use the toString() method to covert the Number to string, then the length() method gives you length. You can try to run the following code to learn how to get the length of a Number − Live Demo <!DOCTYPE html> <html> <body> <script> var num1 = 344; var num2 = 149856; document.write(...
[ { "code": null, "e": 1163, "s": 1062, "text": "Use the toString() method to covert the Number to string, then the length() method gives you length." }, { "code": null, "e": 1246, "s": 1163, "text": "You can try to run the following code to learn how to get the length of a Number ...
Building A Modern Batch Data Warehouse Without UPDATEs | by Daniel Mateus Pires | Towards Data Science
In this post, I will describe how to design Dimensions, Facts and the processes that feed them without performing mutable changes. For this post’s purpose, I will assume the data is on a cheap cloud storage (S3 / GCS), processed by a compute engine that operates directly on the files (Spark / Hive), and written in immu...
[ { "code": null, "e": 303, "s": 172, "text": "In this post, I will describe how to design Dimensions, Facts and the processes that feed them without performing mutable changes." }, { "code": null, "e": 523, "s": 303, "text": "For this post’s purpose, I will assume the data is on a...
numpy.linalg.inv()
We use numpy.linalg.inv() function to calculate the inverse of a matrix. The inverse of a matrix is such that if it is multiplied by the original matrix, it results in identity matrix. import numpy as np x = np.array([[1,2],[3,4]]) y = np.linalg.inv(x) print x print y print np.dot(x,y) It should produce the follo...
[ { "code": null, "e": 2428, "s": 2243, "text": "We use numpy.linalg.inv() function to calculate the inverse of a matrix. The inverse of a matrix is such that if it is multiplied by the original matrix, it results in identity matrix." }, { "code": null, "e": 2536, "s": 2428, "text"...
iBATIS - Dynamic SQL
Dynamic SQL is a very powerful feature of iBATIS. Sometimes you have to change the WHERE clause criterion based on your parameter object's state. In such situations, iBATIS provides a set of dynamic SQL tags that can be used within mapped statements to enhance the reusability and flexibility of the SQL. All the logic i...
[ { "code": null, "e": 2149, "s": 1844, "text": "Dynamic SQL is a very powerful feature of iBATIS. Sometimes you have to change the WHERE clause criterion based on your parameter object's state. In such situations, iBATIS provides a set of dynamic SQL tags that can be used within mapped statements to ...
How to insert an element into DOM using jQuery?
There may be a situation when you would like to insert new one or more DOM elements in your existing document. jQuery provides various methods to insert elements at various locations. The after( content ) method insert content after each of the matched elements whereas the method before( content ) method inserts conten...
[ { "code": null, "e": 1246, "s": 1062, "text": "There may be a situation when you would like to insert new one or more DOM elements in your existing document. jQuery provides various methods to insert elements at various locations." }, { "code": null, "e": 1421, "s": 1246, "text":...