title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How can we read inputs as integers in Python? | Python 3.x has an in-built input() function to accept user input. This input() function returns a string data and it can be stored in string variable.
It must be converted to integer using built-in function int()
>>> var=int(input("enter age"))
enter age21
>>> var
21
>>> type(var)
<class 'int'>
Here, if user input con... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Python 3.x has an in-built input() function to accept user input. This input() function returns a string data and it can be stored in string variable."
},
{
"code": null,
"e": 1275,
"s": 1213,
"text": "It must be converted to integer... |
What are lambda expressions in C#? | A lambda expression in C# describes a pattern. It has the token => in an expression context. This is read as “goes to” operator and used when a lambda expression is declared.
The following is an example showing how to use lambda expressions in C# −
Live Demo
using System;
using System.Collections.Generic;
class Demo ... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "A lambda expression in C# describes a pattern. It has the token => in an expression context. This is read as “goes to” operator and used when a lambda expression is declared."
},
{
"code": null,
"e": 1311,
"s": 1237,
"text": "The fol... |
Python PIL Attributes | Image.height method - GeeksforGeeks | 27 Sep, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 24539,
"s": 24212,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which... |
Scrape Reddit data using Python and Google BigQuery | by Akhilesh Narapareddy | Towards Data Science | Reddit is one of the oldest social media platforms which is still going strong in terms of its users and content generated every year.Behind that age old user interface, is the treasure trove of information that millions of users are creating on a daily basis in the form of questions and comments.
In this post, we will... | [
{
"code": null,
"e": 471,
"s": 172,
"text": "Reddit is one of the oldest social media platforms which is still going strong in terms of its users and content generated every year.Behind that age old user interface, is the treasure trove of information that millions of users are creating on a daily b... |
C++ Stack Library - pop() Function | The C++ function std::stack::pop() removes top element from the stack and reduces size of stack by one. This function calls destructor on removed element.
Following is the declaration for std::stack::pop() function form std::stack header.
void pop();
None
None
Depends upon underlying container.
Constant i.e. O(1)
The ... | [
{
"code": null,
"e": 2758,
"s": 2603,
"text": "The C++ function std::stack::pop() removes top element from the stack and reduces size of stack by one. This function calls destructor on removed element."
},
{
"code": null,
"e": 2842,
"s": 2758,
"text": "Following is the declaratio... |
An Introduction to Unity ML-Agents | by Thomas Simonini | Towards Data Science | This article is part of a new free course on Deep Reinforcement Learning with Unity. Where we’ll create agents with TensorFlow that learn to play video games using the Unity game engine 🕹. Check the syllabus here.
If you never study Deep Reinforcement Learning before, you need to check the free course Deep Reinforceme... | [
{
"code": null,
"e": 386,
"s": 172,
"text": "This article is part of a new free course on Deep Reinforcement Learning with Unity. Where we’ll create agents with TensorFlow that learn to play video games using the Unity game engine 🕹. Check the syllabus here."
},
{
"code": null,
"e": 520... |
JavaScript isNaN() Function - GeeksforGeeks | 02 Dec, 2021
The isNaN() function is used to check whether a given value is an illegal number or not. It returns true if value is a NaN else returns false. It is different from the Number.isNaN() Method.
Syntax:
isNaN( value )
Parameter Values: This method accepts single parameter as mentioned above and described below... | [
{
"code": null,
"e": 25220,
"s": 25192,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 25411,
"s": 25220,
"text": "The isNaN() function is used to check whether a given value is an illegal number or not. It returns true if value is a NaN else returns false. It is different from... |
Functional Programming - Lambda Calculus | Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions.
Function creation − Church introduced the notation λx.E to denote a function in which ‘x’ is a formal argument and ‘E’ is the functional body. These functions can be of without names and single arguments.
Function c... | [
{
"code": null,
"e": 1926,
"s": 1821,
"text": "Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions."
},
{
"code": null,
"e": 2131,
"s": 1926,
"text": "Function creation − Church introduced the notation λx.E to denote a function ... |
Express.js app.engine() Function - GeeksforGeeks | 03 Jul, 2020
The app.engine() function is used to register the given template engine callback as ext. By default the Express itself will require() the engine based on the file extension.
Syntax:
app.engine(ext, callback)
Parameters: The ext parameter is the extension type like ejs, hbs, etc and callback is the function... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25176,
"s": 25002,
"text": "The app.engine() function is used to register the given template engine callback as ext. By default the Express itself will require() the engine based on the file ... |
Querying the Data with AQL | In this chapter, we will discuss how to query the data with AQL. We have already discussed in our previous chapters that ArangoDB has developed its own query language and that it goes by the name AQL.
Let us now start interacting with AQL. As shown in the image below, in the web interface, press the AQL Editor tab plac... | [
{
"code": null,
"e": 2181,
"s": 1980,
"text": "In this chapter, we will discuss how to query the data with AQL. We have already discussed in our previous chapters that ArangoDB has developed its own query language and that it goes by the name AQL."
},
{
"code": null,
"e": 2371,
"s": ... |
How to remove items from a list in C#? | Firstly, set a list and add elements.
List<string> myList = new List<string>();
myList.Add("Jennings");
myList.Add("James");
myList.Add("Chris");
Let’s say you need to delete the element “James” now. For that, use the Remove() method.
myList.Remove("James");
Here is the complete code.
Live Demo
using System.Collection... | [
{
"code": null,
"e": 1100,
"s": 1062,
"text": "Firstly, set a list and add elements."
},
{
"code": null,
"e": 1208,
"s": 1100,
"text": "List<string> myList = new List<string>();\nmyList.Add(\"Jennings\");\nmyList.Add(\"James\");\nmyList.Add(\"Chris\");"
},
{
"code": null,... |
Dequeue and Priority Queue in C++ | As we know that the queue data structure is First in First Out data structure. The queue has some variations also. These are the Dequeue and the Priority Queue.
The Dequeue is basically double ended queue. So there are two front and two rear pairs. One pair of front and rear pointer is used to describe the queue from l... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "As we know that the queue data structure is First in First Out data structure. The queue has some variations also. These are the Dequeue and the Priority Queue."
},
{
"code": null,
"e": 1601,
"s": 1223,
"text": "The Dequeue is basica... |
Affimer Proteins: Next Generation Sequencing Data Analysis (Part 1) | by Rob Harrand | Towards Data Science | In this blog series, I’ll describe a specific data analysis problem using the R programming language. Namely, the analysis of biological data from a Next Generation Sequencing machine, relating to a specific type of molecule called an Affimer protein. A reasonable working knowledge of R is beneficial to understanding t... | [
{
"code": null,
"e": 557,
"s": 172,
"text": "In this blog series, I’ll describe a specific data analysis problem using the R programming language. Namely, the analysis of biological data from a Next Generation Sequencing machine, relating to a specific type of molecule called an Affimer protein. A r... |
Python 3 - Assignment Operators Example | Assume variable a holds the value 10 and variable b holds the value 20, then −
Assume variable a holds the value 10 and variable b holds the value 20, then −
#!/usr/bin/python3
a = 21
b = 10
c = 0
c = a + b
print ("Line 1 - Value of c is ", c)
c += a
print ("Line 2 - Value of c is ", c )
c *= a
print ("Line 3 - Val... | [
{
"code": null,
"e": 2419,
"s": 2340,
"text": "Assume variable a holds the value 10 and variable b holds the value 20, then −"
},
{
"code": null,
"e": 2498,
"s": 2419,
"text": "Assume variable a holds the value 10 and variable b holds the value 20, then −"
},
{
"code": nu... |
2's complement notation | This is one of the methods of representing signed integers in the computer. In this method, the most significant digit (MSD) takes on extra meaning.
If the MSD is a 0, we can evaluate the number just as we would any normal unsigned integer.
If the MSD is a 1, this indicates that the number is negative.
The other bits i... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "This is one of the methods of representing signed integers in the computer. In this method, the most significant digit (MSD) takes on extra meaning."
},
{
"code": null,
"e": 1303,
"s": 1211,
"text": "If the MSD is a 0, we can evaluat... |
Using scispaCy for Named-Entity Recognition (Part 1) | by Akash Kaul | Towards Data Science | In 2019, the Allen Institute for Artificial Intelligence (AI2) developed scispaCy, a full, open-source spaCy pipeline for Python designed for analyzing biomedical and scientific text using natural language processing (NLP). scispaCy is a powerful tool, especially for named entity recognition (NER), or identifying keywo... | [
{
"code": null,
"e": 688,
"s": 172,
"text": "In 2019, the Allen Institute for Artificial Intelligence (AI2) developed scispaCy, a full, open-source spaCy pipeline for Python designed for analyzing biomedical and scientific text using natural language processing (NLP). scispaCy is a powerful tool, es... |
Leaflet package in R - GeeksforGeeks | 05 Nov, 2021
The leaflet is one of the most popular open-source JavaScript libraries for mobile-friendly interactive maps. It’s used widely by many top organizations in the world. To use this same functionality in the R Language, we have the leaflet package library. The leaflet R package is an easy-to-use library that ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 26862,
"s": 26487,
"text": "The leaflet is one of the most popular open-source JavaScript libraries for mobile-friendly interactive maps. It’s used widely by many top organizations in the wor... |
How to Create a Nested For Loop in R? - GeeksforGeeks | 02 Feb, 2022
A loop in a programming language is a sequence of instructions executed one after the other unless a final condition is met. Using loops is quite frequent in a program.
Let us consider a scenario where we want to print natural numbers from 1 to 3. We can simply print them one by one. But suppose the range ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n02 Feb, 2022"
},
{
"code": null,
"e": 26656,
"s": 26487,
"text": "A loop in a programming language is a sequence of instructions executed one after the other unless a final condition is met. Using loops is quite frequent in a pro... |
Draw Black Spiral Pattern Using Turtle in Python - GeeksforGeeks | 01 Oct, 2020
Prerequisite: Turtle Programming in Python
“Turtle” is a Python feature like a drawing board, which lets us command a turtle to draw all over it. This module comes packed with the standard Python package and need not be installed externally.
forward(value): It moves the turtle in forward direction.
speed(v... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 25580,
"s": 25537,
"text": "Prerequisite: Turtle Programming in Python"
},
{
"code": null,
"e": 25779,
"s": 25580,
"text": "“Turtle” is a Python feature like a drawing boa... |
Java Program to Sort 2D Array Across Columns - GeeksforGeeks | 18 Mar, 2022
The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in the java.util package and implements the List interface, so we can use all the methods of List interface here. This program is used to Sort the 2... | [
{
"code": null,
"e": 26119,
"s": 26091,
"text": "\n18 Mar, 2022"
},
{
"code": null,
"e": 26505,
"s": 26119,
"text": "The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in t... |
Z-test - GeeksforGeeks | 20 Jul, 2021
Z-test is a statistical method to determine whether the distribution of the test statistics can be approximated by a normal distribution. It is the method to determine whether two sample means are approximately the same or different when their variance is known and the sample size is large (should be >= 30... | [
{
"code": null,
"e": 26239,
"s": 26211,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 26549,
"s": 26239,
"text": "Z-test is a statistical method to determine whether the distribution of the test statistics can be approximated by a normal distribution. It is the method to deter... |
Instant isBefore() method in Java with Examples - GeeksforGeeks | 27 Nov, 2018
isBefore() method of an Instant class checks if this instant timeline position is before the instant passed as parameter or not. If this instant timeline position is before the instant passed as a parameter then the method will return true else false. The comparison is based on the time-line position of th... | [
{
"code": null,
"e": 25265,
"s": 25237,
"text": "\n27 Nov, 2018"
},
{
"code": null,
"e": 25584,
"s": 25265,
"text": "isBefore() method of an Instant class checks if this instant timeline position is before the instant passed as parameter or not. If this instant timeline position ... |
Python - Convert Dictionary values to Absolute Magnitude - GeeksforGeeks | 13 Dec, 2021
Given a dictionary, convert its values to absolute.
Input : test_dict = {“Gfg” : -5, “is” : -7, “Best” : -2} Output : {“Gfg” : 5, “is” : 7, “Best” : 2} Explanation : All negative elements changed to positive with same magnitude
Input : test_dict = {“Gfg” : -8, “is” : 7, “Best” : -2} Output : {“Gfg” : 8, “i... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 25589,
"s": 25537,
"text": "Given a dictionary, convert its values to absolute."
},
{
"code": null,
"e": 25765,
"s": 25589,
"text": "Input : test_dict = {“Gfg” : -5, “is” ... |
Arrays copyOf() in Java with examples - GeeksforGeeks | 07 Dec, 2018
java.util.Arrays.copyOf() method is in java.util.Arrays class. It copies the specified array, truncating or padding with false (if necessary) so the copy has the specified length.
Syntax:
copyOf(int[] original, int newLength)
original – original array
newLength – copy of original array
// Java program to... | [
{
"code": null,
"e": 26177,
"s": 26149,
"text": "\n07 Dec, 2018"
},
{
"code": null,
"e": 26357,
"s": 26177,
"text": "java.util.Arrays.copyOf() method is in java.util.Arrays class. It copies the specified array, truncating or padding with false (if necessary) so the copy has the s... |
Create a drop-down list that options fetched from a MySQL database in PHP - GeeksforGeeks | 22 Jul, 2021
In many scenarios, we may need to create a dropdown input that can display all the options consistent with the current state of the database. This form of input is used many times in real life and the following examples may help to understand the same.
A set of students who have unique registration numbers... | [
{
"code": null,
"e": 26374,
"s": 26346,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 26627,
"s": 26374,
"text": "In many scenarios, we may need to create a dropdown input that can display all the options consistent with the current state of the database. This form of input is... |
Find an element in array such that sum of left array is equal to sum of right array - GeeksforGeeks | 21 Apr, 2022
Given, an array of size n. Find an element that divides the array into two sub-arrays with equal sums.Examples:
Input: 1 4 2 5
Output: 2
Explanation: If 2 is the partition,
subarrays are : {1, 4} and {5}
Input: 2 3 4 1 4 5
Output: 1
Explanation: If 1 is the partition,
Subarrays are : {2, 3, 4} a... | [
{
"code": null,
"e": 26581,
"s": 26553,
"text": "\n21 Apr, 2022"
},
{
"code": null,
"e": 26694,
"s": 26581,
"text": "Given, an array of size n. Find an element that divides the array into two sub-arrays with equal sums.Examples: "
},
{
"code": null,
"e": 26898,
"s... |
Time Delay in AVR Microcontroller - GeeksforGeeks | 21 Dec, 2020
In this article, we will see how to create delays for the AVR. Also, we will discuss the instruction pipeline.
Delay Calculation for AVR :In Assembly Language instructions, to create a time delay one must consider two important factors.
The crystal frequency –The frequency of the crystal oscillator connect... | [
{
"code": null,
"e": 26025,
"s": 25997,
"text": "\n21 Dec, 2020"
},
{
"code": null,
"e": 26136,
"s": 26025,
"text": "In this article, we will see how to create delays for the AVR. Also, we will discuss the instruction pipeline."
},
{
"code": null,
"e": 26262,
"s":... |
Getting a Month Name Using Month Number in C# | 26 Oct, 2020
Given a number N (1<= N <=12), the task is to get a month name from a month number in C#.
Examples:
Input: N = 2
Output: February
Input: N = 5
Output: May
Method 1: Using DateTime.ToString() Method: This method can be used to get the both full and abbreviated name of the month.
Step 1: Get the Number ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Oct, 2020"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "Given a number N (1<= N <=12), the task is to get a month name from a month number in C#."
},
{
"code": null,
"e": 128,
"s": 118,
"text": "Examples:"
},
... |
How to store a key=> value array in JavaScript ? | 26 Jul, 2021
We have given two arrays containing keys and values and the task is to store it as a single entity in the form key => value in JavaScript. In JavaScript, the array is a single variable that is used to store different elements. It is usually used once we need to store a list of parts and access them by one ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 429,
"s": 28,
"text": "We have given two arrays containing keys and values and the task is to store it as a single entity in the form key => value in JavaScript. In JavaScript, the array is a single... |
Find the maximum subset XOR of a given set | 04 Nov, 2021
Given an set of positive integers. find the maximum XOR subset value in the given set. Expected time complexity O(n).Examples:
Input: set[] = {2, 4, 5}
Output: 7
The subset {2, 5} has maximum XOR value
Input: set[] = {9, 8, 5}
Output: 13
The subset {8, 5} has maximum XOR value
Input: set[] = {8, 1, 2, 12... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Nov, 2021"
},
{
"code": null,
"e": 181,
"s": 54,
"text": "Given an set of positive integers. find the maximum XOR subset value in the given set. Expected time complexity O(n).Examples:"
},
{
"code": null,
"e": 494,
"... |
Find n-th node of inorder traversal | 29 Jan, 2022
Given the binary tree and you have to find out the n-th node of inorder traversal.
Examples:
Input : n = 4
10
/ \
20 30
/ \
40 50
Output : 10
Inorder Traversal is : 40 20 50 10 30
Input : n = 3
7
/ \
2 ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jan, 2022"
},
{
"code": null,
"e": 136,
"s": 53,
"text": "Given the binary tree and you have to find out the n-th node of inorder traversal."
},
{
"code": null,
"e": 147,
"s": 136,
"text": "Examples: "
},
{
... |
Reading and writing in the array using threads | 18 May, 2021
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (gen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 568,
"s": 28,
"text": "An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the p... |
Speech To Text using IBM Watson Studio | 19 Feb, 2020
IBM Watson Studio is an integrated environment designed to develop, train, manage models, and deploy AI-powered applications and is a Software as a Service (SaaS) solution delivered on the IBM Cloud. The IBM Cloud provides lots of services like Speech To Text, Text To Speech, Visual Recognition, Natural La... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 406,
"s": 54,
"text": "IBM Watson Studio is an integrated environment designed to develop, train, manage models, and deploy AI-powered applications and is a Software as a Service (SaaS) solution de... |
Check Mirror in N-ary tree | Practice | GeeksforGeeks | Given two n-ary trees. Check if they are mirror images of each other or not. You are also given e denoting the number of edges in both trees, and two arrays, A[] and B[]. Each array has 2*e space separated values u,v denoting an edge from u to v for the both trees.
Example 1:
Input:
n = 3, e = 2
A[] = {1, 2, 1, 3}
B[... | [
{
"code": null,
"e": 505,
"s": 238,
"text": "Given two n-ary trees. Check if they are mirror images of each other or not. You are also given e denoting the number of edges in both trees, and two arrays, A[] and B[]. Each array has 2*e space separated values u,v denoting an edge from u to v for the ... |
MySQL - BIT_AND() Function | In general, aggregation is a consideration of a collection of objects that are bound together as a single entity.
MySQL provides a set of aggregate functions that perform operations on all the entities of the column of a table considering them as a single unit.
The MySQL BIT_AND() function is used to calculate the bit-... | [
{
"code": null,
"e": 2447,
"s": 2333,
"text": "In general, aggregation is a consideration of a collection of objects that are bound together as a single entity."
},
{
"code": null,
"e": 2595,
"s": 2447,
"text": "MySQL provides a set of aggregate functions that perform operations ... |
Linear Regression basics in Python | by Philip Wilkinson | Towards Data Science | This year, as Head of Science for the UCL Data Science Society, the society is aiming to present a series of 20 workshops covering topics such as introduction to Python, a Data Scientists toolkit and Machine learning methods, throughout the academic year. For each of these the aim is to create a series of small blogpos... | [
{
"code": null,
"e": 722,
"s": 166,
"text": "This year, as Head of Science for the UCL Data Science Society, the society is aiming to present a series of 20 workshops covering topics such as introduction to Python, a Data Scientists toolkit and Machine learning methods, throughout the academic year.... |
Python Program for Coin Change | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given N coins and we want to make a change of those coins such that, there is an infinite supply of each value in S. we need to display that in how many ways we can make the change irrespective of order.
W... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1381,
"s": 1150,
"text": "Problem statement − We are given N coins and we want to make a change of those coins such that... |
How to convert JSON object to Hashtable format using PowerShell? | PowerShell 7 supports the -AsHashtable parameter in the ConvertFrom−JSON command to convert the JSON to hashtable directly and that is a great feature. Consider we have the below JSON file,
We can use the pipeline command ConvertFrom−JSON to convert the JSON file to the custom table format and with the −AsHashtable par... | [
{
"code": null,
"e": 1252,
"s": 1062,
"text": "PowerShell 7 supports the -AsHashtable parameter in the ConvertFrom−JSON command to convert the JSON to hashtable directly and that is a great feature. Consider we have the below JSON file,"
},
{
"code": null,
"e": 1436,
"s": 1252,
"... |
Count of unique digits in a given number N - GeeksforGeeks | 01 Mar, 2021
Given a number N, the task is to count the number of unique digits in the given number.
Examples:
Input: N = 22342 Output: 2 Explanation:The digits 3 and 4 occurs only once. Hence, the output is 2.
Input: N = 99677 Output: 1Explanation:The digit 6 occurs only once. Hence, the output is 1.
Naive Approach: ... | [
{
"code": null,
"e": 24922,
"s": 24894,
"text": "\n01 Mar, 2021"
},
{
"code": null,
"e": 25010,
"s": 24922,
"text": "Given a number N, the task is to count the number of unique digits in the given number."
},
{
"code": null,
"e": 25020,
"s": 25010,
"text": "Ex... |
Swap two variables in one line using C# | To swap two variables in a single line using the Bitwise XOR Operator.
val1 = val1 ^ val2 ^ (val2 = val1);
Above, we have set the values −
int val1 = 30;
int val2 = 60;
The following is the example to swap both the variable in one line using C# −
using System;
class Demo {
public static void Main(String[] args) {
... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "To swap two variables in a single line using the Bitwise XOR Operator."
},
{
"code": null,
"e": 1169,
"s": 1133,
"text": "val1 = val1 ^ val2 ^ (val2 = val1);"
},
{
"code": null,
"e": 1201,
"s": 1169,
"text": "Abov... |
GATE | GATE CS 2011 | Question 46 - GeeksforGeeks | 15 Oct, 2019
Database table by name Loan_Records is given below.
Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00
What is the output of the following SQL query?
SELECT Count(*)
FROM ( ( SELECT Borrower, Bank_Manager
... | [
{
"code": null,
"e": 23985,
"s": 23957,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 24037,
"s": 23985,
"text": "Database table by name Loan_Records is given below."
},
{
"code": null,
"e": 24185,
"s": 24037,
"text": "Borrower Bank_Manager Loan_Amount... |
Why is the Main() method use in C# static? | The Main method states what the class does when executed and instantiates other objects and variables.
A main method is static since it is available to run when the C# program starts. It is the entry point of the program and runs without even creating an instance of the class.
The following shows how to add a Main() me... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "The Main method states what the class does when executed and instantiates other objects and variables."
},
{
"code": null,
"e": 1340,
"s": 1165,
"text": "A main method is static since it is available to run when the C# program starts... |
WebSockets - Handling Errors | Once a connection has been established between the client and the server, an open event is fired from the Web Socket instance. Error are generated for mistakes, which take place during the communication. It is marked with the help of onerror event. Onerror is always followed by termination of connection.
The onerror ev... | [
{
"code": null,
"e": 2425,
"s": 2119,
"text": "Once a connection has been established between the client and the server, an open event is fired from the Web Socket instance. Error are generated for mistakes, which take place during the communication. It is marked with the help of onerror event. Oner... |
How to create and use Global Variable in swift | As per the Apple document – “Global variables are variables that are defined outside of any function, method, closure, or type context
Before we learn how to create global variables, first let us understand completely what are they.
Consider “W” which is inside the inner circle, can access everything which will be insi... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "As per the Apple document – “Global variables are variables that are defined outside of any function, method, closure, or type context"
},
{
"code": null,
"e": 1295,
"s": 1197,
"text": "Before we learn how to create global variables,... |
SQL Query to Rename Stored Procedure - GeeksforGeeks | 28 Oct, 2021
Stored Procedure is a saved SQL code. It is created to save time as we can use it again and again without writing the whole query. In this article, we will see how to Rename a Stored Procedure.
Syntax:
CREATE PROCEDURE procedure_name AS
SELECT * FROM table_name;
SQL query whose procedure needs to be crea... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 24072,
"s": 23877,
"text": "Stored Procedure is a saved SQL code. It is created to save time as we can use it again and again without writing the whole query. In this article, we will see how... |
domainname Command in Linux With Examples - GeeksforGeeks | 24 Jun, 2019
domainname command in Linux is used to return the Network Information System (NIS) domain name of the host. You can use hostname -d command as well to get the host domainname. If the domain name is not set up in your host then the response will be “none”.In the networking terminology, the domain name is th... | [
{
"code": null,
"e": 24202,
"s": 24174,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 24728,
"s": 24202,
"text": "domainname command in Linux is used to return the Network Information System (NIS) domain name of the host. You can use hostname -d command as well to get the host... |
Machine Learning —Fundamentals. Basic theory underlying the field of... | by Javaid Nabi | Towards Data Science | This article introduces the basics of machine learning theory, laying down the common concepts and techniques involved. This post is intended for the people starting with machine learning, making it easy to follow the core concepts and get comfortable with machine learning basics.
In 1959, Arthur Samuel, a computer sci... | [
{
"code": null,
"e": 454,
"s": 172,
"text": "This article introduces the basics of machine learning theory, laying down the common concepts and techniques involved. This post is intended for the people starting with machine learning, making it easy to follow the core concepts and get comfortable wit... |
Data Structures | Queue | Question 1 - GeeksforGeeks | 08 Jan, 2013
Following is C like pseudo code of a function that takes a Queue as an argument, and uses a stack S to do processing.
void fun(Queue *Q){ Stack S; // Say it creates an empty stack S // Run while Q is not empty while (!isEmpty(Q)) { // deQueue an item from Q and push the dequeued item ... | [
{
"code": null,
"e": 24542,
"s": 24514,
"text": "\n08 Jan, 2013"
},
{
"code": null,
"e": 24660,
"s": 24542,
"text": "Following is C like pseudo code of a function that takes a Queue as an argument, and uses a stack S to do processing."
},
{
"code": "void fun(Queue *Q){ ... |
Introduction to Ant colony optimization(ACO) | by Awan-Ur-Rahman | Towards Data Science | Optimization problems are very important in the field of both scientific and industrial. Some real-life examples of these optimization problems are time table scheduling, nursing time distribution scheduling, train scheduling, capacity planning, traveling salesman problems, vehicle routing problems, Group-shop scheduli... | [
{
"code": null,
"e": 842,
"s": 172,
"text": "Optimization problems are very important in the field of both scientific and industrial. Some real-life examples of these optimization problems are time table scheduling, nursing time distribution scheduling, train scheduling, capacity planning, traveling... |
Lodash _.extend() Method - GeeksforGeeks | 18 Sep, 2020
The _.extend() method is like the _.assign() method except that it iterates over its own and inherited source properties.
Syntax:
_.extend(object, sources)
Parameters: This method accepts two parameters as mentioned above and described below:
object: This parameter holds the destination object.
sources: ... | [
{
"code": null,
"e": 37532,
"s": 37504,
"text": "\n18 Sep, 2020"
},
{
"code": null,
"e": 37655,
"s": 37532,
"text": "The _.extend() method is like the _.assign() method except that it iterates over its own and inherited source properties. "
},
{
"code": null,
"e": 376... |
How (dis)similar are my train and test data? | by Shikhar Gupta | Towards Data Science | They always say that don’t compare apples to oranges. But how about if we’re comparing one mix of apples and oranges with another mix of apples and oranges, but the distribution is different. Can you still compare ? And how will you go about it ?
In most of the cases in the real world, you’ll come across the latter.
Th... | [
{
"code": null,
"e": 294,
"s": 47,
"text": "They always say that don’t compare apples to oranges. But how about if we’re comparing one mix of apples and oranges with another mix of apples and oranges, but the distribution is different. Can you still compare ? And how will you go about it ?"
},
{... |
Difference between HashMap and HashSet - GeeksforGeeks | 20 Apr, 2022
HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet must override equals() for check for equality, and hashCode() methods for no duplicate value are stored in our set. HashMap is an implementation of Map Interface, which ... | [
{
"code": null,
"e": 23828,
"s": 23800,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 24448,
"s": 23828,
"text": "HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet must override equals() fo... |
Laravel | Installation and Configuration - GeeksforGeeks | 05 Oct, 2021
Laravel is a PHP framework that makes building complex web applications a cakewalk. In this guide you are going to learn how to Install and Configure Laravel and get your first Laravel project running in your computer.
Prerequisites:
Basic knowledge of PHP
PHP Installation
Basic knowledge of Terminal/Com... | [
{
"code": null,
"e": 24491,
"s": 24463,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 24711,
"s": 24491,
"text": "Laravel is a PHP framework that makes building complex web applications a cakewalk. In this guide you are going to learn how to Install and Configure Laravel and g... |
Web Scraping in Flutter - GeeksforGeeks | 28 Jul, 2021
The process of extracting required data/information from a web page by accessing the HTML of the web page is called Web Scraping or Web Harvesting or Web Data Extraction.
This article discusses the steps involved in Web Scraping by using Flutter’s html and http packages.
Step 1: Set up a new Flutter App
Cr... | [
{
"code": null,
"e": 23643,
"s": 23615,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 23814,
"s": 23643,
"text": "The process of extracting required data/information from a web page by accessing the HTML of the web page is called Web Scraping or Web Harvesting or Web Data Extr... |
Three Concepts to Become a Better Python Programmer | by Luay Matalka | Towards Data Science | Python is an extremely versatile and fun language to learn. However, due to the vast amount of tools it provides, it can be difficult to navigate through what’s actually useful to know and what’s just nice to know.
In this tutorial, we will focus on three things that, in my opinion, are incredibly useful to know in Pyt... | [
{
"code": null,
"e": 387,
"s": 172,
"text": "Python is an extremely versatile and fun language to learn. However, due to the vast amount of tools it provides, it can be difficult to navigate through what’s actually useful to know and what’s just nice to know."
},
{
"code": null,
"e": 807... |
How to use ComboBox in ReactJS? | 18 Jan, 2021
A Combo Box is a graphical user interface widget that is commonly used. The application requires a Combo box from which the user can select the options. Material UI for React has this component available for us and it is very easy to integrate.
Creating React Application And Installing Module:
Step 1: Crea... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 273,
"s": 28,
"text": "A Combo Box is a graphical user interface widget that is commonly used. The application requires a Combo box from which the user can select the options. Material UI for React ... |
XOR Linked List – A Memory Efficient Doubly Linked List | Set 1 | 24 Jun, 2022
An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. It is represented as follows in the image below. From the below image, it can be depicted out that the address of the previous node is retained and carried over for computation by the pre... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 433,
"s": 54,
"text": "An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. It is represented as follows in the image below. From ... |
Kotlin Data Types | 01 May, 2022
The most fundamental data type in Kotlin is the Primitive data type and all others are reference types like array and string. Java needs to use wrappers (java.lang.Integer) for primitive data types to behave like objects but Kotlin already has all data types as objects.
There are different data types in Ko... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 May, 2022"
},
{
"code": null,
"e": 324,
"s": 53,
"text": "The most fundamental data type in Kotlin is the Primitive data type and all others are reference types like array and string. Java needs to use wrappers (java.lang.Integer) f... |
PHP | random_bytes () Function | 14 Apr, 2022
The random_bytes()is an inbuilt function in PHP. The main function is to generate cryptographically secure pseudo-random bytes. It generates cryptographic random bytes of arbitrary string length. The different sources of randomness used in this function, they are as follows:-
Window : CryptGenRandom() func... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Apr, 2022"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "The random_bytes()is an inbuilt function in PHP. The main function is to generate cryptographically secure pseudo-random bytes. It generates cryptographic random bytes of arbi... |
Python | sympy.Float() method | 14 Jul, 2019
With the help of sympy.Float() method, we can convert the integer values to floating point values and by using this method we can also set the values of precision. By default value of precision is 15.
Syntax : sympy.Float()Return : Return the floating point number.
Example #1 :In this example we can see th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2019"
},
{
"code": null,
"e": 229,
"s": 28,
"text": "With the help of sympy.Float() method, we can convert the integer values to floating point values and by using this method we can also set the values of precision. By default ... |
How to Implement Google’s Places AutocompleteBar in Android? | 26 May, 2021
If you ever used Google Maps on mobile or accessed from a desktop, you must have definitely typed in some location into the search bar and selected one of its results. The result might have had fields such as an address, phone numbers, ratings, timings, etc. Moreover, if you ever searched for a place on go... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 648,
"s": 28,
"text": "If you ever used Google Maps on mobile or accessed from a desktop, you must have definitely typed in some location into the search bar and selected one of its results. The res... |
Shiny Package in R Programming | 11 Feb, 2022
The package is an appropriate way to organize the work and share it with others. Packages in the R Programming language are a collection of R functions, compiled code, and sample data. They are stored under a directory called “library” in the R environment. By default, R installs a set of packages during i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 688,
"s": 28,
"text": "The package is an appropriate way to organize the work and share it with others. Packages in the R Programming language are a collection of R functions, compiled code, and sam... |
How to Install Selenium in Python? | 28 Jan, 2022
Selenium Scripts are built to do some tedious tasks which can be automated using headless web browsers.For example, Searching for some Questions on Different Search engines and storing results in a file by visiting each link. This task can take a long for a normal human being but with the help of selenium ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 760,
"s": 28,
"text": "Selenium Scripts are built to do some tedious tasks which can be automated using headless web browsers.For example, Searching for some Questions on Different Search engines an... |
Puzzle 51| Cheryl’s Birthday Puzzle and Solution - GeeksforGeeks | 30 May, 2018
(Wiki) Cheryl’s Birthday is the unofficial name given to a mathematics brain teaser that was asked in the Singapore and Asian Schools Math Olympiad, and was posted online on 10 April 2015 by Singapore TV presenter. It is an interesting problem and might be asked in the interviews. It is based on logical de... | [
{
"code": null,
"e": 24057,
"s": 24029,
"text": "\n30 May, 2018"
},
{
"code": null,
"e": 24770,
"s": 24057,
"text": "(Wiki) Cheryl’s Birthday is the unofficial name given to a mathematics brain teaser that was asked in the Singapore and Asian Schools Math Olympiad, and was posted... |
Visualizing and Preprocessing Image Dataset | by Himanshu Sharma | Towards Data Science | When creating computer vision projects or models, we usually work with large datasets. Not only are image datasets larger in size than text datasets, but there are more images used so that our model does not overfit and has a high performance.
Where can we find new, fresh datasets? Is downloading possible, given their ... | [
{
"code": null,
"e": 415,
"s": 171,
"text": "When creating computer vision projects or models, we usually work with large datasets. Not only are image datasets larger in size than text datasets, but there are more images used so that our model does not overfit and has a high performance."
},
{
... |
How Banks Manage Risk. A look at Value-at-Risk, Expected... | by Jeppe Andersen | Towards Data Science | Roughly, there are three types of risk that financial institutions are exposed against and that regulators try to regulate. First there is market risk, which includes stock prices, interests, FX, volatility etc. Then there is credit risk/counterparty risk or funding risk and lastly operational risk. The risk measures w... | [
{
"code": null,
"e": 659,
"s": 171,
"text": "Roughly, there are three types of risk that financial institutions are exposed against and that regulators try to regulate. First there is market risk, which includes stock prices, interests, FX, volatility etc. Then there is credit risk/counterparty risk... |
SQL Stored Procedure in Spring | The SimpleJdbcCall class can be used to call a stored procedure with IN and OUT parameters. You can use this approach while working with either of the RDBMS like Apache Derby, DB2, MySQL, Microsoft SQL Server, Oracle, and Sybase.
To understand the approach, let us take our Student table which can be created in MySQL TE... | [
{
"code": null,
"e": 2522,
"s": 2292,
"text": "The SimpleJdbcCall class can be used to call a stored procedure with IN and OUT parameters. You can use this approach while working with either of the RDBMS like Apache Derby, DB2, MySQL, Microsoft SQL Server, Oracle, and Sybase."
},
{
"code": n... |
How To Build & Deploy a React + Flask App | by Ran (Reine) | Towards Data Science | I managed to find various tutorials online when I was trying to figure out how to build and then deploy my React + Flask App. What I did was, I first Googled and figured out how to build the React+Flask App, then I tried searching around for how to deploy it.
Unfortunately, most tutorials I managed to find were TOO com... | [
{
"code": null,
"e": 432,
"s": 172,
"text": "I managed to find various tutorials online when I was trying to figure out how to build and then deploy my React + Flask App. What I did was, I first Googled and figured out how to build the React+Flask App, then I tried searching around for how to deploy... |
C# Interface | Another way to achieve abstraction in C#, is with interfaces.
An interface is a completely "abstract class",
which can only contain abstract methods and properties (with empty bodies):
// interface
interface Animal
{
void animalSound(); // interface method (does not have a body)
void run(); // interface method (d... | [
{
"code": null,
"e": 62,
"s": 0,
"text": "Another way to achieve abstraction in C#, is with interfaces."
},
{
"code": null,
"e": 186,
"s": 62,
"text": "An interface is a completely \"abstract class\", \nwhich can only contain abstract methods and properties (with empty bodies):"
... |
Genetic Algorithm — explained step by step with example | by Niranjan Pramanik, Ph.D. | Towards Data Science | In this article, I am going to explain how genetic algorithm (GA) works by solving a very simple optimization problem. The idea of this note is to understand the concept of the algorithm by solving an optimization problem step by step.
Let us estimate the optimal values of a and b using GA which satisfy below expressio... | [
{
"code": null,
"e": 407,
"s": 171,
"text": "In this article, I am going to explain how genetic algorithm (GA) works by solving a very simple optimization problem. The idea of this note is to understand the concept of the algorithm by solving an optimization problem step by step."
},
{
"code... |
Top 6 Python Tips for Data Scientists | by Kat Li | Towards Data Science | Coding is, and will remain to be an essential part of data science! It’s said that close to 70% of data scientists’ time is spent on coding, and I’m no exception. In this article, I will share 6 most useful and practical Python snippets that I have compiled from solving real analytics problems in my day-to-day work.
No... | [
{
"code": null,
"e": 490,
"s": 172,
"text": "Coding is, and will remain to be an essential part of data science! It’s said that close to 70% of data scientists’ time is spent on coding, and I’m no exception. In this article, I will share 6 most useful and practical Python snippets that I have compil... |
Scala - Function with Variable Arguments | Scala allows you to indicate that the last parameter to a function may be repeated. This allows clients to pass variable length argument lists to the function. Here, the type of args inside the print Strings function, which is declared as type "String*" is actually Array[String].
Try the following program, it is a simp... | [
{
"code": null,
"e": 2279,
"s": 1998,
"text": "Scala allows you to indicate that the last parameter to a function may be repeated. This allows clients to pass variable length argument lists to the function. Here, the type of args inside the print Strings function, which is declared as type \"String*... |
Get class from an object in Java | The runtime class of an object can be obtained using the java.lang.Object.getClass(). Also, the getName() method is used to get the name of the class.
A program that demonstrates getting the class of an object using the getClass() method is given as follows −
Live Demo
public class Demo {
public static void main (S... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "The runtime class of an object can be obtained using the java.lang.Object.getClass(). Also, the getName() method is used to get the name of the class."
},
{
"code": null,
"e": 1322,
"s": 1213,
"text": "A program that demonstrates get... |
open() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
Median and Mode using Counting Sort - GeeksforGeeks | 12 Feb, 2022
Given an n sized unsorted array, find median and mode using counting sort technique. This can be useful when array elements are in limited range.
Examples:
Input : array a[] = {1, 1, 1, 2, 7, 1}
Output : Mode = 1
Median = 1
Note: Median is average of middle two numbers (1 and 1)
Input : array a[]... | [
{
"code": null,
"e": 23438,
"s": 23410,
"text": "\n12 Feb, 2022"
},
{
"code": null,
"e": 23584,
"s": 23438,
"text": "Given an n sized unsorted array, find median and mode using counting sort technique. This can be useful when array elements are in limited range."
},
{
"co... |
How to change current directory using Python? | You can change directory or cd in Python using the os module. It takes as input the relative/absolute path of the directory you want to switch to.
>>> import os
>>> os.chdir('my_folder') | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "You can change directory or cd in Python using the os module. It takes as input the relative/absolute path of the directory you want to switch to."
},
{
"code": null,
"e": 1249,
"s": 1209,
"text": ">>> import os\n>>> os.chdir('my_fol... |
JavaScript code for adding new elements in a dynamic way - GeeksforGeeks | 21 Sep, 2021
Javascript is a very important language when it comes to learning how the browser works. Often there are times we would like to add dynamic elements/content to our web pages. This post deals with all of that.
Creation of new element: New elements can be created in JS by using the createElement() method.
... | [
{
"code": null,
"e": 24425,
"s": 24397,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 24634,
"s": 24425,
"text": "Javascript is a very important language when it comes to learning how the browser works. Often there are times we would like to add dynamic elements/content to our... |
Flutter - Working with Animations - GeeksforGeeks | 08 Feb, 2021
Whenever building an app animation plays a vital role in designing the experience of the user. People tend to like an app that has a smooth flow and a slick design. The Flutter Package provides a variety of methods to create and use animation in our app. We will be discussing the inbuilt Flutter widgets to... | [
{
"code": null,
"e": 23619,
"s": 23591,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 23945,
"s": 23619,
"text": "Whenever building an app animation plays a vital role in designing the experience of the user. People tend to like an app that has a smooth flow and a slick design... |
Count ways to split a Binary String into three substrings having equal count of zeros - GeeksforGeeks | 14 Jun, 2021
Given binary string str, the task is to count the total number of ways to split the given string into three non-overlapping substrings having the same number of 0s.
Examples:
Input: str = “01010” Output: 4 Explanation: The possible splits are: [0, 10, 10], [01, 01, 0], [01, 0, 10], [0, 101, 0]
Input: str =... | [
{
"code": null,
"e": 25140,
"s": 25112,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 25305,
"s": 25140,
"text": "Given binary string str, the task is to count the total number of ways to split the given string into three non-overlapping substrings having the same number of 0s... |
Python Data Persistence - CSV Module | CSV stands for comma separated values. This file format is a commonly used data format while exporting/importing data to/from spreadsheets and data tables in databases. The csv module was incorporated in Python’s standard library as a result of PEP 305. It presents classes and methods to perform read/write operations o... | [
{
"code": null,
"e": 2721,
"s": 2355,
"text": "CSV stands for comma separated values. This file format is a commonly used data format while exporting/importing data to/from spreadsheets and data tables in databases. The csv module was incorporated in Python’s standard library as a result of PEP 305.... |
Program to check if first and the last characters of string are equal - GeeksforGeeks | 04 May, 2021
We are given a string, we need to check whether the first and last characters of the string str are equal or not. Case sensitivity is to be considered. Examples :
Input : university
Output : Not Equal
Explanation: In the string "university", the first character is 'u'
and the last character is 'y', as... | [
{
"code": null,
"e": 23839,
"s": 23811,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 24004,
"s": 23839,
"text": "We are given a string, we need to check whether the first and last characters of the string str are equal or not. Case sensitivity is to be considered. Examples : ... |
How to Configure AWS Lambda? - GeeksforGeeks | 28 Jul, 2020
AWS Lambda is a responsive cloud service that examines the steps followed within any application and responds to them by compiling the codes that have been defined by the users, also known as functions. The service automatically computes and manages the resources across multiple availability zones and func... | [
{
"code": null,
"e": 24230,
"s": 24202,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24791,
"s": 24230,
"text": "AWS Lambda is a responsive cloud service that examines the steps followed within any application and responds to them by compiling the codes that have been defined... |
Python program to find number of local variables in a function - GeeksforGeeks | 10 Jan, 2019
Given a Python program, task is to find the number of local variables present in a function.
Examples:
Input : a = 1
b = 2.1
str = 'GeeksForGeeks'
Output : 3
We can use the co_nlocals() function which returns the number of local variables used by the function to get the desired result... | [
{
"code": null,
"e": 23926,
"s": 23898,
"text": "\n10 Jan, 2019"
},
{
"code": null,
"e": 24019,
"s": 23926,
"text": "Given a Python program, task is to find the number of local variables present in a function."
},
{
"code": null,
"e": 24029,
"s": 24019,
"text"... |
How to get the id after INSERT into MySQL database using Python? | The data is inserted into the table in Mysql using the INSERT statement. While inserting the data into the table, either the data must be provided in the same order as the column definition in the database or the column names must be provided along with the data while using INSERT statement.
To get and print the ID of ... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "The data is inserted into the table in Mysql using the INSERT statement. While inserting the data into the table, either the data must be provided in the same order as the column definition in the database or the column names must be provided along with... |
Python Pandas - How to Sort MultiIndex at a specific level | To create a MultiIndex, use the from_arrays() method. However, to sort MultiIndex at a specific level, use the multiIndex.sortlevel() method in Pandas. Set the level as an argument.
At first, import the required libraries −
import pandas as pd
MultiIndex is a multi-level, or hierarchical, index object for pandas object... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "To create a MultiIndex, use the from_arrays() method. However, to sort MultiIndex at a specific level, use the multiIndex.sortlevel() method in Pandas. Set the level as an argument."
},
{
"code": null,
"e": 1286,
"s": 1244,
"text": "... |
How to access a DOM element in React ? - GeeksforGeeks | 19 Feb, 2021
In React we can access the DOM element using Refs. Refs provide a way to access DOM nodes or React elements created in the render method.
Creating Refs: Refs are created using React.createRef() and attached to React elements via the ref attribute.
class App extends React.Component {
constructor(props) {
... | [
{
"code": null,
"e": 24296,
"s": 24268,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 24434,
"s": 24296,
"text": "In React we can access the DOM element using Refs. Refs provide a way to access DOM nodes or React elements created in the render method."
},
{
"code": nul... |
Convert given Decimal number into an irreducible Fraction - GeeksforGeeks | 12 May, 2021
Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction.
An irreducible fraction is a fraction in which numerator and denominator are co-primes i.e., they have no other common divisor other than 1.
Examples:
Input: N = 4.50Output: 9/2 Explanation:9/2 in decimal is wri... | [
{
"code": null,
"e": 24662,
"s": 24634,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 24757,
"s": 24662,
"text": "Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction."
},
{
"code": null,
"e": 24899,
"s": 24757,
"tex... |
How to create Image Slider in ReactJS? - GeeksforGeeks | 27 Sep, 2021
Image Slider means showing image collection with next button so that user can move to next pictures with that button. It is the most common feature to show image collection in Web Applications or mobile apps. Material UI for React has this component available for us and it is very easy to integrate. We can... | [
{
"code": null,
"e": 23991,
"s": 23963,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 24368,
"s": 23991,
"text": "Image Slider means showing image collection with next button so that user can move to next pictures with that button. It is the most common feature to show image c... |
5 Python GUI Frameworks to Create Desktop, Web, and Even Mobile Apps. | Towards Data Science | No solution is complete without a great UI.
Python has been successful in a wide variety of use cases. But few understand and appreciate its abilities in creating graphical user interfaces (GUI.) Indeed we have a handful of extraordinary python GUI frameworks that helps developers quickly put up an interface to interac... | [
{
"code": null,
"e": 215,
"s": 171,
"text": "No solution is complete without a great UI."
},
{
"code": null,
"e": 513,
"s": 215,
"text": "Python has been successful in a wide variety of use cases. But few understand and appreciate its abilities in creating graphical user interfac... |
Space format specifiers in Java | For format specifier, import the following package −
import java.util.Formatter;
Create a formatter object and set space format specifier −
Formatter f = new Formatter();
f.format("% d", -50);
System.out.println(f);
f = new Formatter();
f.format("% d", 90);
System.out.println(f);
f = new Formatter();
f.format("%10d", -... | [
{
"code": null,
"e": 1115,
"s": 1062,
"text": "For format specifier, import the following package −"
},
{
"code": null,
"e": 1143,
"s": 1115,
"text": "import java.util.Formatter;"
},
{
"code": null,
"e": 1202,
"s": 1143,
"text": "Create a formatter object and ... |
C Program to count vowels, digits, spaces, consonants using the string concepts | An array of characters (or) collection of characters is called a string.
Refer the declaration given below −
char stringname [size];
For example − char a[50]; string of length 50 characters.
The initialization is as follows −
Using single character constant −
char a[10] = { ‘H’, ‘e’, ‘l’, ‘l’, ‘o’ ,‘\0’}
Using string c... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "An array of characters (or) collection of characters is called a string."
},
{
"code": null,
"e": 1171,
"s": 1135,
"text": "Refer the declaration given below −"
},
{
"code": null,
"e": 1195,
"s": 1171,
"text": "ch... |
Stream Your Cosmos DB Changes To Databricks with Spark 3 | by Christopher Tao | Towards Data Science | Cosmos DB is becoming more and more popular because of its low latency response, which makes it more suitable as a transactional database solution. However, the data in the Cosmos DB may also need to be utilised for data analysis and reporting. In that case, we need to use a better-suited tool. Spark is usually conside... | [
{
"code": null,
"e": 534,
"s": 171,
"text": "Cosmos DB is becoming more and more popular because of its low latency response, which makes it more suitable as a transactional database solution. However, the data in the Cosmos DB may also need to be utilised for data analysis and reporting. In that ca... |
6 Best Projects For Image Processing With Useful Resources | by Bharath K | Towards Data Science | We are surrounded by beautiful visuals and colorful images all around us. Looking at the natural environment and capturing pictures results in a fun time. While our eyes can visualize the colors and various notions of an image with ease, it is a complex process for computers to recognize these same images. For the anal... | [
{
"code": null,
"e": 638,
"s": 171,
"text": "We are surrounded by beautiful visuals and colorful images all around us. Looking at the natural environment and capturing pictures results in a fun time. While our eyes can visualize the colors and various notions of an image with ease, it is a complex p... |
Python 3 - String max() Method | The max() method returns the max alphabetical character from the string str.
Following is the syntax for max() method −
max(str)
str − This is the string from which max alphabetical character needs to be returned.
This method returns the max alphabetical character from the string str.
The following example shows the u... | [
{
"code": null,
"e": 2417,
"s": 2340,
"text": "The max() method returns the max alphabetical character from the string str."
},
{
"code": null,
"e": 2460,
"s": 2417,
"text": "Following is the syntax for max() method −"
},
{
"code": null,
"e": 2470,
"s": 2460,
... |
MongoDB to fetch documents with $or Operator | The $or operator performs a logical OR operation on an array of two or more expressions. Let us create a collection with documents −
> db.demo674.insertOne({Name:"Chris",Age:21});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ea3f33604263e90dac943eb")
}
> db.demo674.insertOne({Name:"David",Age:23});
{
"ac... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "The $or operator performs a logical OR operation on an array of two or more expressions. Let us create a collection with documents −"
},
{
"code": null,
"e": 1720,
"s": 1195,
"text": "> db.demo674.insertOne({Name:\"Chris\",Age:21});\... |
Program for Decimal to Binary Conversion in C++ | Given with a decimal number as an input, the task is to convert the given decimal number into a binary number.
Decimal number in computers is represented with base 10 and binary number is represented with base 2 as it has only two binary digits 0 and 1 whereas decimal numbers can be any numeric digit starting from 0 – ... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "Given with a decimal number as an input, the task is to convert the given decimal number into a binary number."
},
{
"code": null,
"e": 1385,
"s": 1173,
"text": "Decimal number in computers is represented with base 10 and binary numb... |
Apex - Strings | String in Apex, as in any other programming language, is any set of characters with no character limit.
Example
String companyName = 'Abc International';
System.debug('Value companyName variable'+companyName);
String class in Salesforce has many methods. We will take a look at some of the most important and frequently ... | [
{
"code": null,
"e": 2156,
"s": 2052,
"text": "String in Apex, as in any other programming language, is any set of characters with no character limit."
},
{
"code": null,
"e": 2164,
"s": 2156,
"text": "Example"
},
{
"code": null,
"e": 2262,
"s": 2164,
"text": ... |
Checking all tables and schema in SAP HANA | When you add a HANA system in HANA Studio, you can see different tabs under system pane. Each pane has different object types of HANA system.
To see the list of all schema and tables, you need to navigate to Catalog tab.
Other available tabs in HANA Studio includes:
Backup
Catalog
Provisioning
Content
Security
You can ... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "When you add a HANA system in HANA Studio, you can see different tabs under system pane. Each pane has different object types of HANA system."
},
{
"code": null,
"e": 1283,
"s": 1204,
"text": "To see the list of all schema and tables... |
java.time.LocalTime.parse() Method Example | The java.time.LocalTime.parse(CharSequence text, DateTimeFormatter formatter) method obtains an instance of LocalTime from a text string using a specific formatter.
Following is the declaration for java.time.LocalTime.parse(CharSequence text, DateTimeFormatter formatter) method.
public static LocalTime parse(CharSequen... | [
{
"code": null,
"e": 2080,
"s": 1915,
"text": "The java.time.LocalTime.parse(CharSequence text, DateTimeFormatter formatter) method obtains an instance of LocalTime from a text string using a specific formatter."
},
{
"code": null,
"e": 2195,
"s": 2080,
"text": "Following is the ... |
Python - PoS Tagging and Lemmatization using spaCy | spaCy is one of the best text analysis library. spaCy excels at large-scale information extraction tasks and is one of the fastest in the world. It is also the best way to prepare text for deep learning. spaCy is much faster and accurate than NLTKTagger and TextBlob.
pip install spacy
python -m spacy download en_core_w... | [
{
"code": null,
"e": 1330,
"s": 1062,
"text": "spaCy is one of the best text analysis library. spaCy excels at large-scale information extraction tasks and is one of the fastest in the world. It is also the best way to prepare text for deep learning. spaCy is much faster and accurate than NLTKTagger... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.