title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to pass Checkbox Data to Python CGI script?
| Checkboxes are used when more than one option is required to be selected.
Here is example HTML code for a form with two checkboxes −
<form action = "/cgi-bin/checkbox.cgi" method = "POST" target = "_blank">
<input type = "checkbox" name = "maths" value = "on" /> Maths
<input type = "checkbox" name = "physics" value = "... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "Checkboxes are used when more than one option is required to be selected."
},
{
"code": null,
"e": 1195,
"s": 1136,
"text": "Here is example HTML code for a form with two checkboxes −"
},
{
"code": null,
"e": 1456,
"s... |
jQuery Mobile - Multi-Page Template | Multiple pages can be included in the single jQuery mobile document which loads together by adding multiple divs with the attribute data-role = "page". The div with data-role = "page" should consist unique id to link internally between the pages.
Following example demonstrates the use of multi page in the jQuery Mobile... | [
{
"code": null,
"e": 2195,
"s": 1948,
"text": "Multiple pages can be included in the single jQuery mobile document which loads together by adding multiple divs with the attribute data-role = \"page\". The div with data-role = \"page\" should consist unique id to link internally between the pages."
... |
Neural Networks from scratch with Numpy — Part 2: Linear Regression | by Suraj Donthi | Towards Data Science | In the previous tutorial, you got a very brief overview of a perceptron.
towardsdatascience.com
In this tutorial, you will dig deep into implementing a Linear Perceptron (Linear Regression) from which you’ll be able to predict the outcome of a problem!
This tutorial will apparently include a bit more of math as it is i... | [
{
"code": null,
"e": 245,
"s": 172,
"text": "In the previous tutorial, you got a very brief overview of a perceptron."
},
{
"code": null,
"e": 268,
"s": 245,
"text": "towardsdatascience.com"
},
{
"code": null,
"e": 425,
"s": 268,
"text": "In this tutorial, you... |
Explain the binary operations in relational algebra (DBMS)? | Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.
Query language is divided into two types −
Procedural language
Procedural language
Non-procedural language
Non-procedural language
Information is retrieved from the database by specifying t... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "Query is a question or requesting information. Query language is a language which is used to retrieve information from a database."
},
{
"code": null,
"e": 1236,
"s": 1193,
"text": "Query language is divided into two types −"
},
... |
Python - Convert String to unicode characters - GeeksforGeeks | 02 Sep, 2020
Given a String, convert its characters to unicode characters.
Input : test_str = ‘gfg’Output : \u0067\u0066\u0067Explanation : Result changed to unicoded string.
Input : test_str = ‘himani’Output : \u0068\u0069\u006D\u0061\u006E\u0069Explanation : Result changed to unicoded string.
Method #1 : Using re.sub... | [
{
"code": null,
"e": 25672,
"s": 25644,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 25734,
"s": 25672,
"text": "Given a String, convert its characters to unicode characters."
},
{
"code": null,
"e": 25834,
"s": 25734,
"text": "Input : test_str = ‘gfg’Outp... |
Swap Kth nodes from ends | Practice | GeeksforGeeks | Given a singly linked list of size N, and an integer K. You need to swap the Kth node from the beginning and Kth node from the end of the linked list. Swap the nodes through the links. Do not change the content of the nodes.
Example 1:
Input:
N = 4, K = 1
value[] = {1,2,3,4}
Output: 1
Explanation: Here K = 1, hence ... | [
{
"code": null,
"e": 463,
"s": 238,
"text": "Given a singly linked list of size N, and an integer K. You need to swap the Kth node from the beginning and Kth node from the end of the linked list. Swap the nodes through the links. Do not change the content of the nodes."
},
{
"code": null,
... |
Fixing Two nodes of a BST | Practice | GeeksforGeeks | By swapping nodes 11 and 10, the BST
can be fixed.
Your Task:
You don't need to take any input. Just complete the function correctBst() that takes root node as parameter. The function should not return anything, all the changes must be done in the existing tree only. BST will then be checked by driver code and 0 or ... | [
{
"code": null,
"e": 487,
"s": 332,
"text": "\nBy swapping nodes 11 and 10, the BST \ncan be fixed.\n"
},
{
"code": null,
"e": 773,
"s": 487,
"text": "\nYour Task:\nYou don't need to take any input. Just complete the function correctBst() that takes root node as parameter. The fu... |
Algebra with Numpy and Scipy | by Andrea Castiglioni | Towards Data Science | In this tutorial I want to revise some basics concepts of linear algebra, least square minimization and curve fitting which are useful tools for any scientist working his way trough data analysis in python. These tools can be applied to a big variety of problems, from linear regression to ODE (ordinary differential equ... | [
{
"code": null,
"e": 499,
"s": 171,
"text": "In this tutorial I want to revise some basics concepts of linear algebra, least square minimization and curve fitting which are useful tools for any scientist working his way trough data analysis in python. These tools can be applied to a big variety of p... |
Autoincrement in MySQL begins from 1? How can we begin it from another number? | The autoincrement in MySQL gives a unique number every time. By default, it starts at 1. If you want to start from another number, then you need to change the auto-increment value with the help of ALTER command or you can give value at the time of table creation.
Let us first create a table −
mysql> create table DemoTa... | [
{
"code": null,
"e": 1326,
"s": 1062,
"text": "The autoincrement in MySQL gives a unique number every time. By default, it starts at 1. If you want to start from another number, then you need to change the auto-increment value with the help of ALTER command or you can give value at the time of table... |
Python Tricks for Keeping Track of Your Data | by Khuyen Tran | Towards Data Science | In your data science projects, sometimes you want to keep track of the information in your data or have the flexibility of updating the new input of data quickly and easily. Knowing how to use some of Python’s data objects will keep you stay organized and avoid mistakes while dealing with a huge amount of data in your ... | [
{
"code": null,
"e": 512,
"s": 171,
"text": "In your data science projects, sometimes you want to keep track of the information in your data or have the flexibility of updating the new input of data quickly and easily. Knowing how to use some of Python’s data objects will keep you stay organized and... |
CICS - Abend | Abend command is used to terminate the task intentionally. Using Abend command, we can set a user-defined abend code. Following is the syntax of Abend command −
EXEC CICS ABEND
ABCODE(name)
END-EXEC.
The following example shows how to use the Abend command in a program. It will abend when the program reaches this p... | [
{
"code": null,
"e": 2087,
"s": 1926,
"text": "Abend command is used to terminate the task intentionally. Using Abend command, we can set a user-defined abend code. Following is the syntax of Abend command −"
},
{
"code": null,
"e": 2130,
"s": 2087,
"text": "EXEC CICS ABEND\n A... |
How to Add Color Bars in Bokeh? - GeeksforGeeks | 26 Jan, 2022
Bokeh is one of the promising libraries of Python in recent times. It provides high performance and efficiency in data visualizations. One of the big advantages of bokeh is that we can get the output file in various formats such as HTML, notebooks etc. In this article, we will be learning about how to add ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n26 Jan, 2022"
},
{
"code": null,
"e": 24540,
"s": 24212,
"text": "Bokeh is one of the promising libraries of Python in recent times. It provides high performance and efficiency in data visualizations. One of the big advantages of... |
Create a white image using NumPy in Python - GeeksforGeeks | 02 Sep, 2020
Let us see how to create a white image using NumPy and cv2. A white image has all its pixels as 255.
Method 1: Using np.full() method :
Python3
# importing the librariesimport cv2import numpy as np # creating an array using np.full # 255 is code for white colorarray_created = np.full((500, 500, 3), ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 24002,
"s": 23901,
"text": "Let us see how to create a white image using NumPy and cv2. A white image has all its pixels as 255."
},
{
"code": null,
"e": 24039,
"s": 24002,
... |
How to Get Data on Every NBA Player Using R | by Josh Gonzales, M.A. | Towards Data Science | In this article you'll learn how to:- install and load nbastatR- get every NBA player loaded into R- get a player's career statistics
The NBA season is on hold. Which, you could look at as a negative and just watch “The Last Dance” on repeat.
Or, you could look at this as an opportunity to finally learn how to do some ... | [
{
"code": null,
"e": 306,
"s": 172,
"text": "In this article you'll learn how to:- install and load nbastatR- get every NBA player loaded into R- get a player's career statistics"
},
{
"code": null,
"e": 415,
"s": 306,
"text": "The NBA season is on hold. Which, you could look at ... |
java.lang.reflect.Array.newInstance() Method Example | The java.lang.reflect.Array.newInstance(Class<?> componentType, int length) method creates a new array with the specified component type and length.
Following is the declaration for java.lang.reflect.Array.newInstance(Class<?> componentType, int length) method.
public static Object newInstance(Class<?> componentType, i... | [
{
"code": null,
"e": 1603,
"s": 1454,
"text": "The java.lang.reflect.Array.newInstance(Class<?> componentType, int length) method creates a new array with the specified component type and length."
},
{
"code": null,
"e": 1716,
"s": 1603,
"text": "Following is the declaration for ... |
How to Change the Mac Address in Kali Linux Using Macchanger? - GeeksforGeeks | 08 Jun, 2020
When you are anonymizing your system for penetration testing there are a number of steps you follow. At some point, you also change or fake your mac address so your original device network card’s hardware MAC address is hidden. To do so you can use a tool macchanger which is already present in Kali Linux.
... | [
{
"code": null,
"e": 24449,
"s": 24421,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 24756,
"s": 24449,
"text": "When you are anonymizing your system for penetration testing there are a number of steps you follow. At some point, you also change or fake your mac address so you... |
How to install third party packages using npm | Now, so far we saw how to create a node project with npm init command and also adding scripts to run application.
We used core modules of node.js like http, fs etc which are available by default with node.js but working only with these core modules does not simplify our work. To add more useful functionality and simple... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "Now, so far we saw how to create a node project with npm init command and also adding scripts to run application."
},
{
"code": null,
"e": 1465,
"s": 1176,
"text": "We used core modules of node.js like http, fs etc which are availabl... |
Algebra - GeeksforGeeks | 13 Oct, 2021
x3+y3 = (x + y) × (x2 − xy + y2)
Putting given values of x3+y3 and (x + y)
9 = 3 × ((x+y)2 − 3xy)
= 3 × (9 − 3xy)
= 27 − 9xy
9xy = 18
xy = 2
x4 + y4 = (x2 + y2)2 - 2x2y2
= (x2 + y2)2 - 2*4
[Putting value of xy]
= ((x + y)2 - 2xy)2 - 2*4
... | [
{
"code": null,
"e": 27530,
"s": 27502,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 27907,
"s": 27530,
"text": "x3+y3 = (x + y) × (x2 − xy + y2)\n\nPutting given values of x3+y3 and (x + y)\n9 = 3 × ((x+y)2 − 3xy)\n = 3 × (9 − 3xy) \n = 27 − 9xy\n\n9xy = 18\nxy = 2\n\nx4 +... |
How to clear an ImageView in Android? | This example demonstrates how do I clear an imageview in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "This example demonstrates how do I clear an imageview in android."
},
{
"code": null,
"e": 1257,
"s": 1128,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a ... |
Cryptocurrency Price Prediction Using Deep Learning | by Abhinav Sagar | Towards Data Science | Stuck behind the paywall? Click here to read the full story with my Friend Link!
The popularity of cryptocurrencies skyrocketed in 2017 due to several consecutive months of exponential growth of their market capitalization. The prices peaked at more than $800 billion in January 2018.
Although machine learning has been ... | [
{
"code": null,
"e": 252,
"s": 171,
"text": "Stuck behind the paywall? Click here to read the full story with my Friend Link!"
},
{
"code": null,
"e": 456,
"s": 252,
"text": "The popularity of cryptocurrencies skyrocketed in 2017 due to several consecutive months of exponential g... |
Comparing ascii scores of strings - JavaScript | ASCII is a 7-bit character code where every single bit represents a unique character.
Every English alphabet has a unique decimal ascii code.
We are required to write a function that takes in two strings and calculates their ascii scores (i.e., the sum of ascii decimal of each character of string) and returns the diffe... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "ASCII is a 7-bit character code where every single bit represents a unique character."
},
{
"code": null,
"e": 1204,
"s": 1148,
"text": "Every English alphabet has a unique decimal ascii code."
},
{
"code": null,
"e": 138... |
What Makes Great Wine... Great?. Using Machine Learning and Partial... | by Travis Tang | Towards Data Science | I don’t know about you, but I’m sure in the mood for some wine right now. But not just any wine — but good wine. Wine that tastes balanced, complex and long. It’s hard to say what each of those actually means, and these guys from Buzzfeed sure have a hard time describing good wine in words.
Sure, the concepts of the wi... | [
{
"code": null,
"e": 464,
"s": 172,
"text": "I don’t know about you, but I’m sure in the mood for some wine right now. But not just any wine — but good wine. Wine that tastes balanced, complex and long. It’s hard to say what each of those actually means, and these guys from Buzzfeed sure have a hard... |
Significance testing survey data with Python | by Geir Freysson | Towards Data Science | Most of the world will make decisions by either guessing or using their gut. They will either be lucky or wrong. — Mixpanel
The opening line of Mixpanel’s $65 million investors’s pitch is arresting. Either you’re using data or you’re a fool. I’d like to add to that catch phrase.
Most of the world don’t think about stat... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "Most of the world will make decisions by either guessing or using their gut. They will either be lucky or wrong. — Mixpanel"
},
{
"code": null,
"e": 452,
"s": 296,
"text": "The opening line of Mixpanel’s $65 million investors’s pitch i... |
Hamming code Implementation in C/C++ - GeeksforGeeks | 26 Jul, 2021
Pre-requisite: Hamming Code
Given a message bit in the form of an array msgBit[], the task is to find the Hamming Code of the given message bit.
Examples:
Input: S = “0101”Output:Generated codeword:r1 r2 m1 r4 m2 m3 m40 1 0 0 1 0 1Explanation:Initially r1, r2, r4 is set to ‘0’.r1 = Bitwise XO... | [
{
"code": null,
"e": 24621,
"s": 24593,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 24649,
"s": 24621,
"text": "Pre-requisite: Hamming Code"
},
{
"code": null,
"e": 24766,
"s": 24649,
"text": "Given a message bit in the form of an array msgBit[], the task... |
C++ IOS Library - imbue | Associates loc to both the stream and its associated stream buffer (if any) as the new locale object to be used with locale-sensitive operations.
This function calls its inherited homonym ios_base::imbue(loc) and, if the stream is associated with a stream buffer, it also calls rdbuf()->pubimbue(loc).
Following is the d... | [
{
"code": null,
"e": 2749,
"s": 2603,
"text": "Associates loc to both the stream and its associated stream buffer (if any) as the new locale object to be used with locale-sensitive operations."
},
{
"code": null,
"e": 2905,
"s": 2749,
"text": "This function calls its inherited ho... |
Learn Python Data Analytics by Example — Airline Arrival Delays | by Nick Cox | Towards Data Science | While working towards my Master’s in Business Analytics, I found that learning by example is the best way for me to learn Python data analytics. Being given a dataset and a set of coding tasks is much more beneficial than reading a textbook or listening to a professor.
I want to share this method of learning with other... | [
{
"code": null,
"e": 442,
"s": 172,
"text": "While working towards my Master’s in Business Analytics, I found that learning by example is the best way for me to learn Python data analytics. Being given a dataset and a set of coding tasks is much more beneficial than reading a textbook or listening t... |
Image Processing in MATLAB | Fundamental Operations - GeeksforGeeks | 06 Aug, 2021
1. Reading Images
Images are read into the MATLAB Environment using imread() function which takes filename with applicable extension as the argument
For Example:
>> I=imread('nature.jpg');
This will read JPEG image ‘nature’ into the image array.
Note: The semicolon(;) at the end of command line is used... | [
{
"code": null,
"e": 25583,
"s": 25555,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 25602,
"s": 25583,
"text": "1. Reading Images "
},
{
"code": null,
"e": 25734,
"s": 25602,
"text": "Images are read into the MATLAB Environment using imread() function whi... |
Find two numbers whose sum and GCD are given - GeeksforGeeks | 19 May, 2021
Given sum and gcd of two numbers and . The task is to find both the numbers a and b. If the numbers do not exist then print .Examples:
Input: sum = 6, gcd = 2 Output: a = 4, b = 2 4 + 2 = 6 and GCD(4, 2) = 2Input: sum = 7, gcd = 2 Output: -1 There are no such numbers whose sum is 7 and GCD is 2
Appro... | [
{
"code": null,
"e": 26537,
"s": 26509,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 26674,
"s": 26537,
"text": "Given sum and gcd of two numbers and . The task is to find both the numbers a and b. If the numbers do not exist then print .Examples: "
},
{
"code": null... |
How to secure Azure Functions with Azure AD, Key Vault and VNETs | by René Bremer | Towards Data Science | Secure Azure Functions with Azure AD, Key Vault and VNETs. Then connect to Azure SQL using firewall rules and Managed Identity of Function.
Azure Functions is a popular tool to create small snippets of code that can execute simple tasks. Azure Functions can be triggered using queue triggers, HTTP triggers or time trigg... | [
{
"code": null,
"e": 312,
"s": 172,
"text": "Secure Azure Functions with Azure AD, Key Vault and VNETs. Then connect to Azure SQL using firewall rules and Managed Identity of Function."
},
{
"code": null,
"e": 551,
"s": 312,
"text": "Azure Functions is a popular tool to create sm... |
Construction of Longest Increasing Subsequence (N log N) - GeeksforGeeks | 10 Nov, 2021
In my previous post, I have explained about longest increasing sub-sequence (LIS) problem in detail. However, the post only covered code related to querying size of LIS, but not the construction of LIS. I left it as an exercise. If you have solved, cheers. If not, you are not alone, here is code.If you hav... | [
{
"code": null,
"e": 26607,
"s": 26579,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 27126,
"s": 26607,
"text": "In my previous post, I have explained about longest increasing sub-sequence (LIS) problem in detail. However, the post only covered code related to querying size o... |
Matplotlib.pyplot.table() function in Python - GeeksforGeeks | 10 Oct, 2021
Matplotlib.pyplot.table() is a subpart of matplotlib library in which a table is generated using the plotted graph for analysis. This method makes analysis easier and more efficient as tables give a precise detail than graphs. The matplotlib.pyplot.table creates tables that often hang beneath stacked bar c... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 25921,
"s": 25537,
"text": "Matplotlib.pyplot.table() is a subpart of matplotlib library in which a table is generated using the plotted graph for analysis. This method makes analysis easier ... |
PyQt5 QDial - Slider's Value Changed Signal - GeeksforGeeks | 07 Jul, 2020
In this article we will see how we can get slider’s value changed signal of the QDial. User can change the value with the help of mouse although we can change it programmatically with the help of setValue method. This signal is emitted when the slider value gets changed.
In order to do this we use valueCha... | [
{
"code": null,
"e": 25497,
"s": 25469,
"text": "\n07 Jul, 2020"
},
{
"code": null,
"e": 25769,
"s": 25497,
"text": "In this article we will see how we can get slider’s value changed signal of the QDial. User can change the value with the help of mouse although we can change it p... |
Heapq with custom predicate in Python - GeeksforGeeks | 09 May, 2022
Prerequisite: heapq module
The heapq module has several functions that take the list as a parameter and arranges it in a min-heap order. The problem with these functions is they expect either a list or a list of tuples as a parameter. They do not support comparisons between any other iterable or objects. F... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 25564,
"s": 25537,
"text": "Prerequisite: heapq module"
},
{
"code": null,
"e": 25913,
"s": 25564,
"text": "The heapq module has several functions that take the list as a ... |
Mentor Graphics (Siemen EDA) Interview Experience | 2 Years Experienced - GeeksforGeeks | 06 Aug, 2021
For Noida Location
F2F Round 1(2hrs):
What are virtual functions and virtual destructors?What do mean by static keyword?Difference between pointers and memory reference?When some elements at the beginning of an array are moved to the end, it becomes a rotation of the original array. Please implement a func... | [
{
"code": null,
"e": 26869,
"s": 26841,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 26888,
"s": 26869,
"text": "For Noida Location"
},
{
"code": null,
"e": 26907,
"s": 26888,
"text": "F2F Round 1(2hrs):"
},
{
"code": null,
"e": 28257,
"s":... |
Count frequency of digit K in given Array - GeeksforGeeks | 07 Dec, 2021
Given an array arr[] of integers of size N and a single digit integer K. The task is to find the total count of occurrences of the digit K in the array
Examples:
Input: arr[] = {15, 66, 26, 91}, K = 6Output: 3Explanation: Occurrences of 6 in each array elements are: 0, 2, 1, 0 respectively.Therefore, total... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 26193,
"s": 26041,
"text": "Given an array arr[] of integers of size N and a single digit integer K. The task is to find the total count of occurrences of the digit K in the array"
},
{
... |
Java.util.BitSet class in Java with Examples | Set 1 - GeeksforGeeks | 31 Jul, 2021
BitSet is a class defined in the java.util package. It creates an array of bits represented by boolean values.
Constructors:
BitSet class Constructors
/ \
BitSet() BitSet(int no_Of_Bits)
BitSet() : A no-argument constructor to create an empty BitSet object.
BitSet(int no... | [
{
"code": null,
"e": 25661,
"s": 25633,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 25772,
"s": 25661,
"text": "BitSet is a class defined in the java.util package. It creates an array of bits represented by boolean values."
},
{
"code": null,
"e": 25787,
"s":... |
PHP | DOMDocument getElementById() Function - GeeksforGeeks | 20 Feb, 2020
The DOMDocument::getElementById() function is an inbuilt function in PHP which is used to search for an element with a certain id.
Syntax:
DOMElement DOMDocument::getElementById( string $elementId )
Parameters:This function accepts a single parameter $elementId which holds the id to search for.
Return Valu... | [
{
"code": null,
"e": 25845,
"s": 25817,
"text": "\n20 Feb, 2020"
},
{
"code": null,
"e": 25976,
"s": 25845,
"text": "The DOMDocument::getElementById() function is an inbuilt function in PHP which is used to search for an element with a certain id."
},
{
"code": null,
... |
Branch Instructions in AVR Microcontroller - GeeksforGeeks | 14 Dec, 2020
In this article, we will be discussing looping in AVR and branch instructions, both Conditional and Unconditional.
Looping in AVR :A repeated operation or a set of instructions is known as a loop in programming. It is one of the most fundamental techniques which comes in very handy in writing code. One way... | [
{
"code": null,
"e": 26025,
"s": 25997,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 26140,
"s": 26025,
"text": "In this article, we will be discussing looping in AVR and branch instructions, both Conditional and Unconditional."
},
{
"code": null,
"e": 26404,
... |
Mongoose | update() Function - GeeksforGeeks | 20 May, 2020
The update() function is used to update one document in the database without returning it.
Installation of mongoose module:
You can visit the link to Install mongoose module. You can install this package by using this command.npm install mongooseAfter installing mongoose module, you can check your mongoose... | [
{
"code": null,
"e": 25398,
"s": 25370,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 25489,
"s": 25398,
"text": "The update() function is used to update one document in the database without returning it."
},
{
"code": null,
"e": 25522,
"s": 25489,
"text": ... |
Differences between ES6 class and ES5 function constructors - GeeksforGeeks | 28 Jul, 2021
In this article, we will discuss the difference between the ES6 class and ES5 function constructors. Both serve the purpose of creating new objects, still, they have some differences between them.
ES6 Class constructors: ES6 class constructors work quite the same as class constructors in other object-orien... | [
{
"code": null,
"e": 26105,
"s": 26077,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 26302,
"s": 26105,
"text": "In this article, we will discuss the difference between the ES6 class and ES5 function constructors. Both serve the purpose of creating new objects, still, they ha... |
Minimum size of the array with MEX as A and XOR of the array elements as B - GeeksforGeeks | 24 Feb, 2022
Given two integers A and B, the task is to find the minimum possible size of the array whose MEX of the array is A and Bitwise XOR of all array elements is B.
Examples:
Input: A = 1, B = 1Output: 3Explanation: The array which can satisfy the given condition is {0, 3, 2} which is of minimum possible size i.... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 26226,
"s": 26067,
"text": "Given two integers A and B, the task is to find the minimum possible size of the array whose MEX of the array is A and Bitwise XOR of all array elements is B."
}... |
Tkinter - Read only Entry Widget - GeeksforGeeks | 09 Dec, 2021
Python has a number of frameworks to develop GUI applications like PyQT, Kivy, Jython, WxPython, PyGUI, and Tkinter. Python tkinter module offers a variety of options to develop GUI based applications. Tkinter is an open-source and available under Python license. Tkinter provides the simplest and fastest w... | [
{
"code": null,
"e": 25535,
"s": 25507,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26189,
"s": 25535,
"text": "Python has a number of frameworks to develop GUI applications like PyQT, Kivy, Jython, WxPython, PyGUI, and Tkinter. Python tkinter module offers a variety of opti... |
How to get the value in an input text box using jQuery ? - GeeksforGeeks | 03 Aug, 2021
jQuery val() method is used to get the value of an element. This function is used to set or return the value. Return value gives the value attribute of the first element. In case of the set value, it sets the value of the attribute for all elements. This element is mostly used with HTML forms.
Syntax:
$(se... | [
{
"code": null,
"e": 26248,
"s": 26220,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 26543,
"s": 26248,
"text": "jQuery val() method is used to get the value of an element. This function is used to set or return the value. Return value gives the value attribute of the first e... |
What is Class Loading and Static Blocks in Java? - GeeksforGeeks | 13 Jan, 2021
Class Loading is the process of storing the class-specific information in the memory. Class-specific information means, information about the class members, i.e., variables and methods. It is just like that before firing a bullet, first, we need to load the bullet into the pistol. Similarly, to use a class... | [
{
"code": null,
"e": 25250,
"s": 25222,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 25727,
"s": 25250,
"text": "Class Loading is the process of storing the class-specific information in the memory. Class-specific information means, information about the class members, i.e., ... |
Comma in C and C++ - GeeksforGeeks | 24 Sep, 2021
In C and C++, comma (, ) can be used in two contexts: 1) Comma as an operator: The comma operator (represented by the token, ) is a binary operator that evaluates its first operand and discards the result, it then evaluates the second operand and returns this value (and type). The comma operator has the lo... | [
{
"code": null,
"e": 25693,
"s": 25665,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 26067,
"s": 25693,
"text": "In C and C++, comma (, ) can be used in two contexts: 1) Comma as an operator: The comma operator (represented by the token, ) is a binary operator that evaluates ... |
JSONField in serializers - Django REST Framework - GeeksforGeeks | 22 Mar, 2022
In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) which are going to be processed. For example if you have a class with name Employee and its fields as Employee_id, Employee_name, is... | [
{
"code": null,
"e": 25631,
"s": 25603,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 26246,
"s": 25631,
"text": "In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some field... |
Filter array based on another array in JavaScript | Suppose we have two arrays of literals like these −
const arr1 = [4, 23, 7, 6, 3, 6, 4, 3, 56, 4];
const arr2 = [4, 56, 23];
We are required to write a JavaScript function that takes in these two arrays and filters the first to contain only those elements that are not present in the second array. And then return the fi... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "Suppose we have two arrays of literals like these −"
},
{
"code": null,
"e": 1187,
"s": 1114,
"text": "const arr1 = [4, 23, 7, 6, 3, 6, 4, 3, 56, 4];\nconst arr2 = [4, 56, 23];"
},
{
"code": null,
"e": 1396,
"s": 1187... |
Working with Input box/Test Box in Selenium with Python - GeeksforGeeks | 01 Oct, 2020
Selenium is an effective device for controlling an internet browser thru the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we can be running with Python.
Requirement: You need to install chromedriver and ... | [
{
"code": null,
"e": 24487,
"s": 24459,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24744,
"s": 24487,
"text": "Selenium is an effective device for controlling an internet browser thru the program. It is purposeful for all browsers, works on all fundamental OS and its script... |
Get the path of the file selected in the JFileChooser component with Java | To get the path of the selected file, at first get the selected file −
java.io.File f = file.getSelectedFile();
Now, get the path of the selected file which we will get using the above method −
System.err.println(f.getPath());
The following is an example to get the path of the file selected in the JFileChooser componen... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "To get the path of the selected file, at first get the selected file −"
},
{
"code": null,
"e": 1174,
"s": 1133,
"text": "java.io.File f = file.getSelectedFile();"
},
{
"code": null,
"e": 1256,
"s": 1174,
"text": ... |
Swift - Sets | Swift 4 sets are used to store distinct values of same types but they don’t have definite ordering as arrays have.
You can use sets instead of arrays if ordering of elements is not an issue, or if you want to ensure that there are no duplicate values. (sets allow only distinct values.)
A type must be hashable to be sto... | [
{
"code": null,
"e": 2368,
"s": 2253,
"text": "Swift 4 sets are used to store distinct values of same types but they don’t have definite ordering as arrays have."
},
{
"code": null,
"e": 2540,
"s": 2368,
"text": "You can use sets instead of arrays if ordering of elements is not a... |
Selenium - Remote Control | Selenium Remote Control (RC) was the main Selenium project that sustained for a long time before Selenium WebDriver(Selenium 2.0) came into existence. Now Selenium RC is hardly in use, as WebDriver offers more powerful features, however users can still continue to develop scripts using RC.
It allows us to write automat... | [
{
"code": null,
"e": 2166,
"s": 1875,
"text": "Selenium Remote Control (RC) was the main Selenium project that sustained for a long time before Selenium WebDriver(Selenium 2.0) came into existence. Now Selenium RC is hardly in use, as WebDriver offers more powerful features, however users can still ... |
How to convert string to JSON using Python? | To convert a JSON string to a dictionary using json.loads(). This method accepts a valid json string and returns a dictionary in which you can access all elements. For example,
>>> import json
>>> s = '{"success": "true", "status": 200, "message": "Hello"}'
>>> d = json.loads(s)
>>> print d["success"], d["status"]
true... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "To convert a JSON string to a dictionary using json.loads(). This method accepts a valid json string and returns a dictionary in which you can access all elements. For example,"
},
{
"code": null,
"e": 1387,
"s": 1239,
"text": ">>> i... |
Quick Sort Program in C | Quick sort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays. A large array is partitioned into two arrays one of which holds values smaller than the specified value, say pivot, based on which the partition is made and another array holds values greater than the p... | [
{
"code": null,
"e": 2912,
"s": 2580,
"text": "Quick sort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays. A large array is partitioned into two arrays one of which holds values smaller than the specified value, say pivot, based on which the ... |
D3.js selection.on() Function - GeeksforGeeks | 13 Aug, 2020
The d3.selection.on() function in D3.js is used to add a particular event listener to an element. An event may be a string of event type click, mouseover, etc.
Syntax:
selection.on(typenames[, listener[, options]])
Parameters: This function accepts two parameters as mentioned above and described below:
Ty... | [
{
"code": null,
"e": 24204,
"s": 24176,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 24364,
"s": 24204,
"text": "The d3.selection.on() function in D3.js is used to add a particular event listener to an element. An event may be a string of event type click, mouseover, etc."
... |
C program to check syntax of 'for' loop - GeeksforGeeks | 26 Nov, 2019
As defined by C standards, the for loop syntax is:
for (initialisation; condition; increment/decrement)
...
Syntactically, there should be two semicolons, one opening parenthesis, one closing parenthesis, and correct spelling of “for”. Hence, to check only the syntax of for loop, what a compiler d... | [
{
"code": null,
"e": 24445,
"s": 24417,
"text": "\n26 Nov, 2019"
},
{
"code": null,
"e": 24496,
"s": 24445,
"text": "As defined by C standards, the for loop syntax is:"
},
{
"code": null,
"e": 24562,
"s": 24496,
"text": "for (initialisation; condition; increme... |
JavaScript: take every nth Element of Array and display a fixed number of values? | For this, you can use for loop along with if condition. Let’s say the following is our array −
var numbers = [1, 2, 34, 56, 78, 90, 100, 110, 40, 70, 67, 77, 34, 68, 89, 91, 94];
We have set a counter to set a value. This value is set to display a fixed number of values −
var counter = 6;
The above shows the result wil... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "For this, you can use for loop along with if condition. Let’s say the following is our array −"
},
{
"code": null,
"e": 1241,
"s": 1157,
"text": "var numbers = [1, 2, 34, 56, 78, 90, 100, 110, 40, 70, 67, 77, 34, 68, 89, 91, 94];"
... |
Case-specific Sorting of Strings - GeeksforGeeks | 28 May, 2021
Given string str consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith place in the original string had an uppercase character, then it should not have a lowercase character after being sorted and vice versa.
Examples:
Inp... | [
{
"code": null,
"e": 24426,
"s": 24398,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 24719,
"s": 24426,
"text": "Given string str consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith place in ... |
Powershell - Miscellaneous Operators Examples | The following scripts demonstrates the miscellaneous operators.
> $location = Get-Location
> $location -is 'System.Management.Automation.PathInfo'
True
> $location -isNot 'System.Management.Automation.PathInfo'
True
> $i = 1
> $i++
> $i
2
15 Lectures
3.5 hours
Fabrice Chrzanowski
35 Lect... | [
{
"code": null,
"e": 2098,
"s": 2034,
"text": "The following scripts demonstrates the miscellaneous operators."
},
{
"code": null,
"e": 2286,
"s": 2098,
"text": "> $location = Get-Location\n \n> $location -is 'System.Management.Automation.PathInfo'\n True\n \n> $location -isNot '... |
How to Create a Candlestick Chart in Matplotlib? - GeeksforGeeks | 28 Nov, 2021
A candlestick chart, often known as a Japanese candlestick chart, is a financial chart that shows the price movement of stocks, derivatives, and other financial instruments in real-time, there are simply four essential components that must be examined. The open, high, low, and close are the four key elemen... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24679,
"s": 24292,
"text": "A candlestick chart, often known as a Japanese candlestick chart, is a financial chart that shows the price movement of stocks, derivatives, and other financial in... |
D Programming - Strings | D provides following two types of string representations −
Character array
Core language string
We can represent the character array in one of the two forms as shown below. The first form provides the size directly and the second form uses the dup method which creates a writable copy of the string "Good morning".
char[... | [
{
"code": null,
"e": 2663,
"s": 2604,
"text": "D provides following two types of string representations −"
},
{
"code": null,
"e": 2679,
"s": 2663,
"text": "Character array"
},
{
"code": null,
"e": 2700,
"s": 2679,
"text": "Core language string"
},
{
"... |
The unless & die Function in Perl | The unless function in Perl is the logical opposite to if: statements can completely bypass the success status and only be executed if the expression returns false. For example −
unless(chdir("/etc")) {
die "Error: Can't change directory - $!";
}
The unless statement is best used when you want to raise an error or a... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "The unless function in Perl is the logical opposite to if: statements can completely bypass the success status and only be executed if the expression returns false. For example −"
},
{
"code": null,
"e": 1312,
"s": 1241,
"text": "unl... |
Blender 2.8 Grease Pencil Scripting and Generative Art | by 5agado | Towards Data Science | What: learning the basics of scripting for Blender Grease-Pencil tool, with focus on generative art as a concrete playground. Less talking, more code (commented) and many examples.
Why: mostly because we can. Also because Blender is a very rich ecosystem, and Grease-Pencil in version 2.8 is a powerful and versatile too... | [
{
"code": null,
"e": 352,
"s": 171,
"text": "What: learning the basics of scripting for Blender Grease-Pencil tool, with focus on generative art as a concrete playground. Less talking, more code (commented) and many examples."
},
{
"code": null,
"e": 725,
"s": 352,
"text": "Why: ... |
Ethical Hacking with Python - GeeksforGeeks | 07 Jul, 2021
As a Computer Science Engineer who encrypts the world, one should know how Hacking activities are done. And we must stand front in protecting our world from cybercriminals.
Being able to gain access to a system that you’re not supposed to have access to is known as Hacking. For example, login into an email... | [
{
"code": null,
"e": 24690,
"s": 24662,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 24863,
"s": 24690,
"text": "As a Computer Science Engineer who encrypts the world, one should know how Hacking activities are done. And we must stand front in protecting our world from cyberc... |
Apache Drill - NULLIF(x,y) | The following program shows the query for this function −
0: jdbc:drill:zk = local> select NULLIF(3,3) from (values(1));
+---------+
| EXPR$0 |
+---------+
| null |
+---------+
Here both the arguments are same, so the result is NULL.
46 Lectures
3.5 hours
Arnab Chakraborty
23 Lectures
1.5 ... | [
{
"code": null,
"e": 2127,
"s": 2069,
"text": "The following program shows the query for this function −"
},
{
"code": null,
"e": 2190,
"s": 2127,
"text": "0: jdbc:drill:zk = local> select NULLIF(3,3) from (values(1));"
},
{
"code": null,
"e": 2251,
"s": 2190,
... |
C program to convert centimeter to meter and kilometer | Here, the user has to enter the length in centimeters (cm), and then, convert the length into meters (m), and kilometer (km).
1 Meter = 100 Centimeters
1 Kilometer = 100000 Centimeters
Refer an algorithm given below to convert centimeter into meter and kilometer respectively.
Step 1: Declare variables.
Step 2: Enter le... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "Here, the user has to enter the length in centimeters (cm), and then, convert the length into meters (m), and kilometer (km)."
},
{
"code": null,
"e": 1247,
"s": 1188,
"text": "1 Meter = 100 Centimeters\n1 Kilometer = 100000 Centimet... |
How to change the color of a Tkinter label programmatically? | Tkinter Label widgets are used to add text or images to the application. We can even configure the basic properties of labels using the config(options) method. Generally, in order to configure the widgets property dynamically, we use callback functions where we modify the value of attributes.
In this example, we will m... | [
{
"code": null,
"e": 1356,
"s": 1062,
"text": "Tkinter Label widgets are used to add text or images to the application. We can even configure the basic properties of labels using the config(options) method. Generally, in order to configure the widgets property dynamically, we use callback functions ... |
Python - Command Line Arguments | Python provides a getopt module that helps you parse command-line options and arguments.
$ python test.py arg1 arg2 arg3
The Python sys module provides access to any command-line arguments via the sys.argv. This serves two purposes −
sys.argv is the list of command-line arguments.
sys.argv is the list of command-line a... | [
{
"code": null,
"e": 2333,
"s": 2244,
"text": "Python provides a getopt module that helps you parse command-line options and arguments."
},
{
"code": null,
"e": 2365,
"s": 2333,
"text": "$ python test.py arg1 arg2 arg3"
},
{
"code": null,
"e": 2478,
"s": 2365,
... |
jQuery - noConflict() | Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all the functionality is available without using $.
Run $.noConflict() method to give control of the $ variable back to whichever library first implemented it. This helps us to make s... | [
{
"code": null,
"e": 2511,
"s": 2322,
"text": "Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all the functionality is available without using $."
},
{
"code": null,
"e": 2713,
"s": 2511,
"t... |
PyQt - Quick Guide | PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.com
PyQt API is a set of modules containing a large... | [
{
"code": null,
"e": 2199,
"s": 1926,
"text": "PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riv... |
BigQuery truncate table and dynamic SQL | Towards Data Science | We were excited to see the power of BigQuery receive a further boost this week with the release of 12 new BigQuery SQL features. Google Cloud describes these as “user-friendly SQL capabilities”. So, let’s take a look at what’s now possible.
New to BigQuery is the ability to add new columns via the ALTER TABLE DDL state... | [
{
"code": null,
"e": 413,
"s": 172,
"text": "We were excited to see the power of BigQuery receive a further boost this week with the release of 12 new BigQuery SQL features. Google Cloud describes these as “user-friendly SQL capabilities”. So, let’s take a look at what’s now possible."
},
{
... |
D3.js style() Function - GeeksforGeeks | 09 Aug, 2020
The d3.style() function in D3.js is used to style the specified node(attribute) with the specified name(Value). In this, if the node has an inline style with the specified name, its value is returned and if the node has not an inline style, the calculated value is returned.
Syntax:
d3.style(node, name)
P... | [
{
"code": null,
"e": 24093,
"s": 24065,
"text": "\n09 Aug, 2020"
},
{
"code": null,
"e": 24368,
"s": 24093,
"text": "The d3.style() function in D3.js is used to style the specified node(attribute) with the specified name(Value). In this, if the node has an inline style with the s... |
5 Must-Know Dimensionality Reduction Techniques via Prince | by Cornellius Yudha Wijaya | Towards Data Science | According to Wikipedia, Dimensionality Reduction is a transformation of High-Dimensionality space data into a Low-dimensionality space.
In other words, Dimensionality Reduction transforms data from a high number of features into a lower number of features. Let’s say from one hundred features into two features.
But why ... | [
{
"code": null,
"e": 307,
"s": 171,
"text": "According to Wikipedia, Dimensionality Reduction is a transformation of High-Dimensionality space data into a Low-dimensionality space."
},
{
"code": null,
"e": 483,
"s": 307,
"text": "In other words, Dimensionality Reduction transform... |
How to animate a Seaborn heatmap or correlation matrix(Matplotlib)? | To animate a Seaborn heatmap or correlation matrix, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure.
Make a dimension tuple.
Make a Seaborn heatmap.
Create an init() method for the first heatmap.
Use FuncAni... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "To animate a Seaborn heatmap or correlation matrix, we can take the following steps −"
},
{
"code": null,
"e": 1224,
"s": 1148,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code"... |
How to Print Hard Copy using Tkinter? | Tkinter allows developers to interact with the files inside the local system. In this article, we will see how to print a hardcopy of a file using Tkinter packages such as filedialog and win32api module.
In order to import these packages, we have to first install these modules in our environment. To install win32api, w... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "Tkinter allows developers to interact with the files inside the local system. In this article, we will see how to print a hardcopy of a file using Tkinter packages such as filedialog and win32api module."
},
{
"code": null,
"e": 1413,
"s... |
PHP func_get_arg() Function - GeeksforGeeks | 09 Jul, 2020
The func_get_arg() function is an inbuilt function in PHP which is used to get a mentioned value from the argument passed as the parameters.
Syntax:
mixed func_get_arg( int $arg )
Parameters: This function accepts a single parameter as mentioned above and described below.
$arg: This parameter holds the arg... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n09 Jul, 2020"
},
{
"code": null,
"e": 26358,
"s": 26217,
"text": "The func_get_arg() function is an inbuilt function in PHP which is used to get a mentioned value from the argument passed as the parameters."
},
{
"code": ... |
How to use matTooltip in Angular Material ? - GeeksforGeeks | 08 Feb, 2021
Angular Material is a UI component library developed by Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have done it you can enter the below command and can download it. matTooltip is used wh... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 26735,
"s": 26354,
"text": "Angular Material is a UI component library developed by Angular team to build design components for desktop and mobile web applications. In order to install it, we... |
Guess Game using rand() and srand() in C - GeeksforGeeks | 12 Dec, 2017
Using srand() and rand() function in C, a simple but interesting game can be made. This game is called “Guess Game” .
Rules of the Game :
There are three holes . A rat is hidden in one of those three holes.
The Rat shuffles its position every time.
You have to guess the hole in which the Rat is hidden amon... | [
{
"code": null,
"e": 26155,
"s": 26127,
"text": "\n12 Dec, 2017"
},
{
"code": null,
"e": 26273,
"s": 26155,
"text": "Using srand() and rand() function in C, a simple but interesting game can be made. This game is called “Guess Game” ."
},
{
"code": null,
"e": 26293,
... |
Pyspark Data Manipulation Tutorial | by Armando Rivero | Towards Data Science | This tutorial is meant for data people with some Python experience that are absolute Spark beginners. It will help you installing Pyspark and launching your first script. You’ll learn about Resilient Distributed Datasets (RDDs) and dataframes, the main data structures in Pyspark. We discuss some foundational concepts c... | [
{
"code": null,
"e": 504,
"s": 46,
"text": "This tutorial is meant for data people with some Python experience that are absolute Spark beginners. It will help you installing Pyspark and launching your first script. You’ll learn about Resilient Distributed Datasets (RDDs) and dataframes, the main dat... |
Quick Guide to Run your Python Scripts on Google Colaboratory | by Eden Au | Towards Data Science | If you are looking for an interactive way to run your Python script, say you want to start a machine learning project with a couple of friends, look no further — Google Colab is the best solution for you. You can work online and save your code on your local Google Drive, and it allows you to
Run your scripts with free ... | [
{
"code": null,
"e": 465,
"s": 172,
"text": "If you are looking for an interactive way to run your Python script, say you want to start a machine learning project with a couple of friends, look no further — Google Colab is the best solution for you. You can work online and save your code on your loc... |
How to watch service variables ? - GeeksforGeeks | 10 Sep, 2020
$scope acts as a built-in object in AngularJs.
It consists of application data and methods. The $scope is acts as a link between a controller and view (HTML).
$scope is used to transfer the data.
$watch:
Scope in AngularJs object has $watch event which comes into picture when the model property gets change... | [
{
"code": null,
"e": 24718,
"s": 24690,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 24765,
"s": 24718,
"text": "$scope acts as a built-in object in AngularJs."
},
{
"code": null,
"e": 24877,
"s": 24765,
"text": "It consists of application data and methods... |
Rust - Loop | There may be instances, where a block of code needs to be executed repeatedly. In general, programming instructions are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.
Programming languages provide various control structures that allow for more complicated ... | [
{
"code": null,
"e": 2318,
"s": 2087,
"text": "There may be instances, where a block of code needs to be executed repeatedly. In general, programming instructions are executed sequentially: The first statement in a function is executed first, followed by the second, and so on."
},
{
"code": ... |
How to check if a float value is a whole number in Python? | To check if a float value is a whole number, use the float.is_integer() method. For example,
print((10.0).is_integer())
print((15.23).is_integer())
This will give the output
True
False | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To check if a float value is a whole number, use the float.is_integer() method. For example,"
},
{
"code": null,
"e": 1210,
"s": 1155,
"text": "print((10.0).is_integer())\nprint((15.23).is_integer())"
},
{
"code": null,
"... |
How do I plot hatched bars using Pandas and Matplotlib? | To plot hatches bars using Pandas, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Make a dataframe using Pandas with two columns.
Make a dataframe using Pandas with two columns.
Add... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To plot hatches bars using Pandas, we can take the following steps −"
},
{
"code": null,
"e": 1207,
"s": 1131,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
"e": ... |
VBA - If Elseif - Else statement | An If statement followed by one or more ElseIf statements that consists of boolean expressions and then followed by a default else statement, which executes when all the condition becomes false.
Following is the syntax of an If Elseif - Else statement in VBScript.
If(boolean_expression) Then
Statement 1
.....
... | [
{
"code": null,
"e": 2130,
"s": 1935,
"text": "An If statement followed by one or more ElseIf statements that consists of boolean expressions and then followed by a default else statement, which executes when all the condition becomes false."
},
{
"code": null,
"e": 2200,
"s": 2130,
... |
Explain rebasing in Git | Rebasing alters a sequence of commits. It moves or relocates a sequence of commits from current branch to the target branch. By default, the commits from the current branch that are not already on the other branch are rebased. Rebasing technique allows us to keep a linear history.
Let us understand from this from the d... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Rebasing alters a sequence of commits. It moves or relocates a sequence of commits from current branch to the target branch. By default, the commits from the current branch that are not already on the other branch are rebased. Rebasing technique allows ... |
How to Visually Explain any CNN based Models | by Renu Khandelwal | Towards Data Science | CNN Deep Learning Models — Why it interpreted what it interpreted?
Deep Learning models are now able to give very high accuracy. The most critical piece for adopting computer vision algorithms at scale for Image Classification, Object Detection, Semantic Segmentation, Image Captioning, or Visual Question-Answer is unde... | [
{
"code": null,
"e": 239,
"s": 172,
"text": "CNN Deep Learning Models — Why it interpreted what it interpreted?"
},
{
"code": null,
"e": 555,
"s": 239,
"text": "Deep Learning models are now able to give very high accuracy. The most critical piece for adopting computer vision algo... |
How to write a text file in Selenium with python? | We can write a text file in Selenium with python by first creating a txt file and having a content on it.
First of all, we need to open the file in write mode and mention the path of the location of the text file as an argument. There are multiple reading methods to perform these operations.
write() – It writes the str... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "We can write a text file in Selenium with python by first creating a txt file and having a content on it."
},
{
"code": null,
"e": 1355,
"s": 1168,
"text": "First of all, we need to open the file in write mode and mention the path of... |
DFA based division - GeeksforGeeks | 12 Apr, 2022
Deterministic Finite Automaton (DFA) can be used to check whether a number “num” is divisible by “k” or not. If the number is not divisible, remainder can also be obtained using DFA.We consider the binary representation of ‘num’ and build a DFA with k states. The DFA has transition function for both 0 and ... | [
{
"code": null,
"e": 25146,
"s": 25118,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 26211,
"s": 25146,
"text": "Deterministic Finite Automaton (DFA) can be used to check whether a number “num” is divisible by “k” or not. If the number is not divisible, remainder can also be ... |
Operating Procedures in Software Engineering - GeeksforGeeks | 16 Jun, 2020
Prerequisite – Software ProcessesSoftware consist of the following components-
1. Program code
2. Documentation
3. Operating Procedures
The operating procedures is a set of step-by-step instructions compiled by an organization to help workers carry out complex routine operations. It consists of all the in... | [
{
"code": null,
"e": 24557,
"s": 24529,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 24636,
"s": 24557,
"text": "Prerequisite – Software ProcessesSoftware consist of the following components-"
},
{
"code": null,
"e": 24694,
"s": 24636,
"text": "1. Program ... |
What are enumerations in Java? How to retrieve values from an enum? | 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": 1235,
"s": 1062,
"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": 1333,
"s": 1235,
"text": "You can d... |
Making Plots in Jupyter Notebook Beautiful & More Meaningful | by Bipin P. | Towards Data Science | As our world has become more and more data-driven, important decisions of the people who could make a tremendous impact on the world we live in, like the governments, big corporates, politicians, business tycoons(you name it) are all influenced by the data in an unprecedented manner. Consequently, data visualization st... | [
{
"code": null,
"e": 625,
"s": 172,
"text": "As our world has become more and more data-driven, important decisions of the people who could make a tremendous impact on the world we live in, like the governments, big corporates, politicians, business tycoons(you name it) are all influenced by the dat... |
How to get a value more than a particular value from varchar column in MySQL? | Since the column wherein you want to get the value more than a particular value is VARCHAR, use the CAST() function. For example, to fetch the value more than 999 from a column with varchar values.
Let us first create a table −
mysql> create table DemoTable
(
Value varchar(100)
);
Query OK, 0 rows affected (1.02 sec... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "Since the column wherein you want to get the value more than a particular value is VARCHAR, use the CAST() function. For example, to fetch the value more than 999 from a column with varchar values."
},
{
"code": null,
"e": 1290,
"s": 126... |
Looking Inside Mahalanobis Metric Matching | by Bowen Chen, PhD | Towards Data Science | My previous post shows how the propensity score matching can be implemented using 13 lines of R codes. Though those codes, you can see that matching is much about data pre-processing. The idea is to find control units that are comparable to the treated units, so we can attribute the differences in the outcome between t... | [
{
"code": null,
"e": 645,
"s": 172,
"text": "My previous post shows how the propensity score matching can be implemented using 13 lines of R codes. Though those codes, you can see that matching is much about data pre-processing. The idea is to find control units that are comparable to the treated un... |
Binary Search Tree Iterator in C++ | Suppose we want to make one iterator for binary tree. There will be two methods. The next() method to return the next element, and hasNext() method to return Boolean value, that will indicate that the next element is present or not. So if the tree is like −
And the sequence of function calls are [next(), next(), hasNex... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "Suppose we want to make one iterator for binary tree. There will be two methods. The next() method to return the next element, and hasNext() method to return Boolean value, that will indicate that the next element is present or not. So if the tree is li... |
Bubble Chart with Data Labels | Following is an example of a Bubble Chart with Labels.
We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a Bubble Chart with Data Labels.
We've used BubbleChart class to show a Bubble Chart with Data Labels.
type = 'BubbleChart';
a... | [
{
"code": null,
"e": 1851,
"s": 1796,
"text": "Following is an example of a Bubble Chart with Labels."
},
{
"code": null,
"e": 2022,
"s": 1851,
"text": "We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an ... |
Matplotlib.axes.Axes.get_xaxis() in Python - GeeksforGeeks | 19 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 24190,
"s": 24162,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 24490,
"s": 24190,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ... |
vars() function in Python | vars() function belongs to the collection of inbuilt functions provided by the Python standard library. It returns the __dic__ attribute of an associated object to the console.
vars(object)
<Dictionary Type>
vars() function accepts only one parameter. It takes an object as its parameter which can be any module, class o... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "vars() function belongs to the collection of inbuilt functions provided by the Python standard library. It returns the __dic__ attribute of an associated object to the console."
},
{
"code": null,
"e": 1252,
"s": 1239,
"text": "vars(... |
Additive Congruence method for generating Pseudo Random Numbers - GeeksforGeeks | 20 Oct, 2021
Additive Congruential Method is a type of linear congruential generator for generating pseudorandom numbers in a specific range. This method can be defined as:
where,
X, the sequence of pseudo-random numbersm ( > 0), the modulusc [0, m), the incrementX0 [0, m), initial value of the sequence – termed as ... | [
{
"code": null,
"e": 24735,
"s": 24707,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 24896,
"s": 24735,
"text": "Additive Congruential Method is a type of linear congruential generator for generating pseudorandom numbers in a specific range. This method can be defined as: "
... |
Detecting Deforestation from Satellite Imagery | by Nick Condo | Towards Data Science | For my Capstone Project as part of Udacity’s Machine Learning Engineer Nanodegree, I was tasked with solving a problem of my choosing by applying machine learning algorithms and techniques learned throughout the course. I decided to choose an area which I am adamantly passionate about: saving the environment. I learned... | [
{
"code": null,
"e": 806,
"s": 172,
"text": "For my Capstone Project as part of Udacity’s Machine Learning Engineer Nanodegree, I was tasked with solving a problem of my choosing by applying machine learning algorithms and techniques learned throughout the course. I decided to choose an area which I... |
Python | Test for nested list - GeeksforGeeks | 05 Sep, 2019
Sometimes, while working with Python list, we might have a problem in which we need to find that a list is a Matrix or a list contains list as it’s element. This problem can come in Data Science domain as it involves use of Matrices more than often. Let’s discuss certain way in which this task can be perfo... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 24214,
"s": 23901,
"text": "Sometimes, while working with Python list, we might have a problem in which we need to find that a list is a Matrix or a list contains list as it’s element. This p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.