title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
touch command in Linux with Examples
19 Feb, 2021 The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file. Basically, there are two different commands to create a file in the Linux system which is as follows: cat command: It is used to create the file with content. touch c...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Feb, 2021" }, { "code": null, "e": 295, "s": 52, "text": "The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file. Basically, there are two differen...
Sum of Arithmetic Geometric Sequence
11 Jul, 2022 In mathematics, an arithmetico–geometric sequence is the result of the term-by-term multiplication of a geometric progression with the corresponding terms of an arithmetic progression. is an arithmetico–geometric sequence.Given the value of a(First term of AP), n(Number of terms), d(Common Difference), b...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jul, 2022" }, { "code": null, "e": 239, "s": 52, "text": "In mathematics, an arithmetico–geometric sequence is the result of the term-by-term multiplication of a geometric progression with the corresponding terms of an arithmetic pr...
Parsing DateTime strings containing nanoseconds in Python
23 Aug, 2021 Most of the applications require a precision of up to seconds but there are also some critical applications that require nanosecond precision, especially the ones which can perform extremely fast computations. It can help provide insights on certain factors related to time space for the application. Let us...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 576, "s": 28, "text": "Most of the applications require a precision of up to seconds but there are also some critical applications that require nanosecond precision, especially the ones which can pe...
Java Program to Print Stack Trace
15 Jul, 2021 Consider a bookshelf in which books are placed one over another. Now if the person wants to read the book which he placed first, in order to do so all books over the first book are needed to be removed to reach out to the desired book. That is the book that was placed first at the beginning itself. The met...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2021" }, { "code": null, "e": 428, "s": 28, "text": "Consider a bookshelf in which books are placed one over another. Now if the person wants to read the book which he placed first, in order to do so all books over the first boo...
How to Create a basic API using Django Rest Framework ?
17 Jun, 2021 Django REST Framework is a wrapper over default Django Framework, basically used to create APIs of various kinds. There are three stages before creating a API through REST framework, Converting a Model’s data to JSON/XML format (Serialization), Rendering this data to the view, Creating a URL for mapping to...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2021" }, { "code": null, "e": 677, "s": 54, "text": "Django REST Framework is a wrapper over default Django Framework, basically used to create APIs of various kinds. There are three stages before creating a API through REST fr...
Image Processing with Python — Unsupervised Learning for Image Segmentation | by Tonichi Edeza | Towards Data Science
So far most of the techniques we’ve gone over have required us to manually segment the image via its features. But we can actually use unsupervised clustering algorithms to do this for us. In this article we shall go over how to do just that. Let’s begin! As always, we start by importing the required Python libraries. ...
[ { "code": null, "e": 415, "s": 172, "text": "So far most of the techniques we’ve gone over have required us to manually segment the image via its features. But we can actually use unsupervised clustering algorithms to do this for us. In this article we shall go over how to do just that." }, { ...
Apply a Gauss filter to an image with Python - GeeksforGeeks
26 Dec, 2020 A Gaussian Filter is a low pass filter used for reducing noise (high frequency components) and blurring regions of an image. The filter is implemented as an Odd sized Symmetric Kernel (DIP version of a Matrix) which is passed through each pixel of the Region of Interest to get the desired effect. The kerne...
[ { "code": null, "e": 23925, "s": 23897, "text": "\n26 Dec, 2020" }, { "code": null, "e": 24630, "s": 23925, "text": "A Gaussian Filter is a low pass filter used for reducing noise (high frequency components) and blurring regions of an image. The filter is implemented as an Odd si...
AtomicReference toString() method in Java with Examples - GeeksforGeeks
27 Dec, 2019 The toString() method of a AtomicReference class is used to return the String representation of the current value of AtomicReference object. Syntax: public String toString() Parameters: This method accepts nothing. Return value: This method returns the String representation of the current value. Below pro...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n27 Dec, 2019" }, { "code": null, "e": 23698, "s": 23557, "text": "The toString() method of a AtomicReference class is used to return the String representation of the current value of AtomicReference object." }, { "code": ...
RegEx matching | Practice | GeeksforGeeks
Given a pattern string and a test string, If the pattern is preceded by a ^, the pattern(excluding the ^) will be matched with the starting position of the text string. Similarly, if it is preceded by a $, the pattern(excluding the ^) will be matched with the ending position of the text string. If no such markers are p...
[ { "code": null, "e": 625, "s": 238, "text": "Given a pattern string and a test string, If the pattern is preceded by a ^, the pattern(excluding the ^) will be matched with the starting position of the text string. Similarly, if it is preceded by a $, the pattern(excluding the ^) will be matched with...
GATE | GATE CS 2008 | Question 70 - GeeksforGeeks
14 Feb, 2018 Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary ...
[ { "code": null, "e": 24308, "s": 24280, "text": "\n14 Feb, 2018" }, { "code": null, "e": 25123, "s": 24308, "text": "Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organizat...
How can we import only specific columns from the text file, into MySQL table?
Suppose if we have the values for some specific columns in the text file and MySQL table, in which we want to import the data, is having an extra column(s) then by mentioning the names of the columns in the query we can upload the values of those specific columns only. It can be understood with the help of the followin...
[ { "code": null, "e": 1394, "s": 1062, "text": "Suppose if we have the values for some specific columns in the text file and MySQL table, in which we want to import the data, is having an extra column(s) then by mentioning the names of the columns in the query we can upload the values of those specif...
Java Program To Reverse Words In A Given String
15 Dec, 2021 Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i” Examples: Input: s = “geeks quiz practice code” Output: s = “code practice quiz geeks” Input: s = “getting good at coding needs a lot of practice” Output: s = “practic...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Dec, 2021" }, { "code": null, "e": 167, "s": 28, "text": "Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”" }, { "code": null, "e":...
splice() - 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": 1600, "s": 1588, "text": "Unix - Home" }, { "code": null, "e": 1623, "s": 1600, "text": "Unix - Getting Started" }, { "code": null, "e": 1646, "s": 1623, "text": "Unix - File Management" }, { "code": null, "e": 1665, "s": 1...
Find the sum of non-prime elements in the given array
13 Apr, 2021 Given an array arr[] and the task is to print the sum of the non-prime elements from the array.Examples: Input: arr[] = {1, 3, 7, 4, 9, 8} Output: 22 Non-prime elements are {1, 4, 9, 8} and 1 + 4 + 9 + 8 = 22Input: arr[] = {11, 4, 10, 7} Output: 14 Approach: Initialize sum = 0 and start traversing th...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Apr, 2021" }, { "code": null, "e": 159, "s": 52, "text": "Given an array arr[] and the task is to print the sum of the non-prime elements from the array.Examples: " }, { "code": null, "e": 305, "s": 159, "text":...
Extract text from PDF File using Python
16 Jul, 2020 All of you must be familiar with what PDFs are. In fact, they are one of the most important and widely used digital media. PDF stands for Portable Document Format. It uses .pdf extension. It is used to present and exchange documents reliably, independent of software, hardware, or operating system. Python p...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jul, 2020" }, { "code": null, "e": 351, "s": 52, "text": "All of you must be familiar with what PDFs are. In fact, they are one of the most important and widely used digital media. PDF stands for Portable Document Format. It uses .p...
Python | Pandas dataframe.mul()
06 Aug, 2021 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Pandas dataframe.mul() function return multiplication of dataframe and other element- wise. Th...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Aug, 2021" }, { "code": null, "e": 517, "s": 54, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im...
time.Time.Location() Function in Golang with Examples
19 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Location() function in Go language is used to check the data of the time zone that is associated with “t”. Moreover, this function is defined under the time package. Here, you need to import the “time” pa...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 374, "s": 28, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Location() function in Go language is used to check the data of the time...
How to check any script is running in linux using Python?
03 Mar, 2021 Python is a strong and exponentially growing programming language in the present day. There is a multiple-way to check which script is running in the background of a Linux environment. One of them is using the subprocess module in python. Subprocess is used to run new programs through Python code by creati...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Mar, 2021" }, { "code": null, "e": 463, "s": 28, "text": "Python is a strong and exponentially growing programming language in the present day. There is a multiple-way to check which script is running in the background of a Linux env...
Querying and selecting specific column in SQLAlchemy
22 Jun, 2022 In this article, we will see how to query and select specific columns using SQLAlchemy in Python. For our examples, we have already created a Students table which we will be using: Syntax: sqlalchemy.select(*entities) Where: Entities to SELECT from. This is typically a series of ColumnElement for Core usag...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2022" }, { "code": null, "e": 126, "s": 28, "text": "In this article, we will see how to query and select specific columns using SQLAlchemy in Python." }, { "code": null, "e": 209, "s": 126, "text": "For our ...
strcmpi() function in C
04 Oct, 2018 The strcmpi() function is a built-in function in C and is defined in the “string.h” header file. The strcmpi() function is same as that of the strcmp() function but the only difference is that strcmpi() function is not case sensitive and on the other hand strcmp() function is the case sensitive. Syntax: in...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Oct, 2018" }, { "code": null, "e": 325, "s": 28, "text": "The strcmpi() function is a built-in function in C and is defined in the “string.h” header file. The strcmpi() function is same as that of the strcmp() function but the only d...
numpy.interp() function – Python
11 Jun, 2020 numpy.interp() function returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x. Syntax : numpy.interp(x, xp, fp, left = None, right = None, period = None) Parameters :x : [array_like] The x-coordinates at which to evaluate the interpo...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jun, 2020" }, { "code": null, "e": 205, "s": 52, "text": "numpy.interp() function returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x." }, { "code":...
Can we use % operator on floating point numbers?
02 Jun, 2017 Predict the output of following program: Can % be used with floating point numbers in C++? #include <iostream>int main(){ float f = 9.9f, m = 3.3f; float c = f % m; // LINE 5 std::cout << c; return 0;} The above program fails in compilation and compiler report the following error in line 5:Out...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Jun, 2017" }, { "code": null, "e": 94, "s": 53, "text": "Predict the output of following program:" }, { "code": null, "e": 144, "s": 94, "text": "Can % be used with floating point numbers in C++?" }, { "c...
Python | Plotting column charts in excel sheet using XlsxWriter module
19 May, 2021 Prerequisite: Create and Write on an excel file.XlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmetic operations and plotting graphs. Let’s see how to plot different type of Column charts using realtime data. Charts are composed of ...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 May, 2021" }, { "code": null, "e": 885, "s": 28, "text": "Prerequisite: Create and Write on an excel file.XlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmeti...
Inline HTML Helper – HTML Helpers in ASP.NET MVC
23 Jun, 2020 HTML Helpers are methods that returns HTML strings. These are used in the view. In simple terms, these are C# methods that are used to return HTML. Using HTML helpers you can render a text box, an area, image tag, etc. In MVC we have many built-in HTML helpers and we can create custom helpers too. Using HT...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Jun, 2020" }, { "code": null, "e": 458, "s": 53, "text": "HTML Helpers are methods that returns HTML strings. These are used in the view. In simple terms, these are C# methods that are used to return HTML. Using HTML helpers you can...
ZIP command in Linux with examples
19 Feb, 2021 ZIP is a compression and file packaging utility for Unix. Each file is stored in single .zip {.zip-filename} file with the extension .zip. zip is used to compress the files to reduce file size and also used as file package utility. zip is available in many operating systems like unix, linux, windows etc. I...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Feb, 2021" }, { "code": null, "e": 167, "s": 28, "text": "ZIP is a compression and file packaging utility for Unix. Each file is stored in single .zip {.zip-filename} file with the extension .zip." }, { "code": null, "e":...
Java.lang.Long.valueOf() method with examples
05 Dec, 2018 Java.lang.Long.valueOf() is a built-in method in Java of lang class that returns a Long object holding the value extracted from a specified String S when parsed with the radix that is given in the second argument. The first argument is interpreted as representing a signed long in the radix specified by the...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Dec, 2018" }, { "code": null, "e": 538, "s": 28, "text": "Java.lang.Long.valueOf() is a built-in method in Java of lang class that returns a Long object holding the value extracted from a specified String S when parsed with the radix...
Calendar setLenient() Method in Java with Examples - GeeksforGeeks
21 Feb, 2019 The setLenient(boolean leniency) method in Calendar class is used to specify whether the interpretation of the date and time is to be lenient or not. Syntax: public void setLenient(boolean leniency) Parameters: The method takes one parameter leniency of the boolean type that refers to the mode of the calen...
[ { "code": null, "e": 25863, "s": 25835, "text": "\n21 Feb, 2019" }, { "code": null, "e": 26013, "s": 25863, "text": "The setLenient(boolean leniency) method in Calendar class is used to specify whether the interpretation of the date and time is to be lenient or not." }, { ...
Finding Fibonacci sequence in an array using JavaScript
A sequence X_1, X_2, ..., X_n is fibonacci if: n >= 3 n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 <= n X_i + X_{i+1} = X_{i+2} for all i + 2 <= n We are required to write a JavaScript function that takes in an array of numbers, arr, as the first and the only argument. Our function should find and return the length of ...
[ { "code": null, "e": 1109, "s": 1062, "text": "A sequence X_1, X_2, ..., X_n is fibonacci if:" }, { "code": null, "e": 1116, "s": 1109, "text": "n >= 3" }, { "code": null, "e": 1123, "s": 1116, "text": "n >= 3" }, { "code": null, "e": 1166, "s"...
How to validate a credit card number in ReactJS ? - GeeksforGeeks
16 Dec, 2020 Credit card validation is an important step in every application in order to authenticate the user’s credit card number so that the application can proceed to the payment process if needed. It can be achieved using the validator module in ReactJS. The following example shows how to validate the user entere...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n16 Dec, 2020" }, { "code": null, "e": 26959, "s": 26545, "text": "Credit card validation is an important step in every application in order to authenticate the user’s credit card number so that the application can proceed to the ...
Disjoint Set Data Structures - GeeksforGeeks
02 Mar, 2022 Consider a situation with a number of persons and following tasks to be performed on them. Add a new friendship relation, i.e., a person x becomes friend of another person y.Find whether individual x is a friend of individual y (direct or indirect friend) Add a new friendship relation, i.e., a person x be...
[ { "code": null, "e": 25382, "s": 25354, "text": "\n02 Mar, 2022" }, { "code": null, "e": 25474, "s": 25382, "text": "Consider a situation with a number of persons and following tasks to be performed on them. " }, { "code": null, "e": 25639, "s": 25474, "text":...
Find Element and FindElements by XPath in Selenium
The findElement(By.xpath) method is used to identify an element which matches with the xpath locator passed as a parameter to this method. The findElements(By.xpath) method is used to identify a collection of elements which match with xpath locator passed as a parameter to that method. The method findElement(By.xpath) ...
[ { "code": null, "e": 1349, "s": 1062, "text": "The findElement(By.xpath) method is used to identify an element which matches with the xpath locator passed as a parameter to this method. The findElements(By.xpath) method is used to identify a collection of elements which match with xpath locator pass...
Stacked area chart with R - GeeksforGeeks
16 Mar, 2021 Area Charts are defined as the filled regions between two series that share common areas. A stacked area chart is easily understandable if you know the area chart. This plot display evolution of cost/value of several groups on the same plot. The values of each group are displayed on top of every other. Usi...
[ { "code": null, "e": 26597, "s": 26569, "text": "\n16 Mar, 2021" }, { "code": null, "e": 27041, "s": 26597, "text": "Area Charts are defined as the filled regions between two series that share common areas. A stacked area chart is easily understandable if you know the area chart....
Path toAbsolutePath() method in Java with Examples - GeeksforGeeks
03 Dec, 2019 The Java Path interface was added to Java NIO in Java 7. toAbsolutePath() method of java.nio.file.Path used to return a Path object representing the absolute path of this path object. If the path is already absolute then the method returns path else this method resolves this path in an implementation-depen...
[ { "code": null, "e": 23868, "s": 23840, "text": "\n03 Dec, 2019" }, { "code": null, "e": 24356, "s": 23868, "text": "The Java Path interface was added to Java NIO in Java 7. toAbsolutePath() method of java.nio.file.Path used to return a Path object representing the absolute path ...
Print a Binary Tree in Vertical Order | Set 3 (Using Level Order Traversal) - GeeksforGeeks
28 Feb, 2022 Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5 6 7 \ \ 8 9 The output of print this tree vertically w...
[ { "code": null, "e": 26587, "s": 26559, "text": "\n28 Feb, 2022" }, { "code": null, "e": 26690, "s": 26587, "text": "Given a binary tree, print it vertically. The following example illustrates vertical order traversal. " }, { "code": null, "e": 26920, "s": 26690, ...
YEAR() Function in MySQL - GeeksforGeeks
29 Sep, 2020 YEAR() function in MySQL is used to find year from the given date. If the date is NULL, the YEAR() function will return NULL. Otherwise, it returns value range from 1000 to 9999. Syntax : YEAR(date) Parameter : This method accepts one parameter as mentioned above and described below : date : The date or...
[ { "code": null, "e": 25623, "s": 25595, "text": "\n29 Sep, 2020" }, { "code": null, "e": 25802, "s": 25623, "text": "YEAR() function in MySQL is used to find year from the given date. If the date is NULL, the YEAR() function will return NULL. Otherwise, it returns value range fro...
Python | Check if element is present in tuple - GeeksforGeeks
26 Nov, 2019 Sometimes, while working with data, we can have a problem in which we need to check if data we are working with has a particular element. Let’s discuss certain ways in which this task can be performed. Method #1 : Using loopThis is brute force method to perform this task. In this, we iterate through the tu...
[ { "code": null, "e": 26215, "s": 26187, "text": "\n26 Nov, 2019" }, { "code": null, "e": 26417, "s": 26215, "text": "Sometimes, while working with data, we can have a problem in which we need to check if data we are working with has a particular element. Let’s discuss certain way...
How to Handle Missing Data with Python and KNN | by Dario Radečić | Towards Data Science
Missing value imputation isn’t that difficult of a task to do. Methods range from simple mean imputation and complete removing of the observation to more advanced techniques like MICE. Nowadays, the more challenging task is to choose which method to use. Today we’ll explore one simple but highly effective way to impute...
[ { "code": null, "e": 527, "s": 172, "text": "Missing value imputation isn’t that difficult of a task to do. Methods range from simple mean imputation and complete removing of the observation to more advanced techniques like MICE. Nowadays, the more challenging task is to choose which method to use. ...
Dart - Types of Exceptions - GeeksforGeeks
23 Feb, 2021 Exception is a runtime unwanted event that disrupts the flow of code execution. It can be occurred because of a programmer’s mistake or by wrong user input. To handle such events at runtime is called Exception Handling. For example:- when we try to access the elements from the empty list. Dart Exceptions a...
[ { "code": null, "e": 23619, "s": 23591, "text": "\n23 Feb, 2021" }, { "code": null, "e": 23997, "s": 23619, "text": "Exception is a runtime unwanted event that disrupts the flow of code execution. It can be occurred because of a programmer’s mistake or by wrong user input. To han...
HTTP headers | Accept-CH - GeeksforGeeks
22 Nov, 2019 The HTTP Accept-CH header is a response-type header that indicates the client hints that the server can support and should include in further requests. Syntax: Accept-CH: client hints Note: The client hints can be more than one and are to be separated by commas. Directives: The HTTP Accept-CH header accept...
[ { "code": null, "e": 25022, "s": 24994, "text": "\n22 Nov, 2019" }, { "code": null, "e": 25174, "s": 25022, "text": "The HTTP Accept-CH header is a response-type header that indicates the client hints that the server can support and should include in further requests." }, { ...
Smart Mirror using the concept of IoT
14 May, 2020 A Smart Mirror may be a two-way mirror with an inbuilt display behind the glass.The device was to look like a regular mirror but would have a screen inside and you would be able to interact with it using voice commands, hand gestures and smartphone. The raspberry pi is programmed using python and connects ...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 May, 2020" }, { "code": null, "e": 447, "s": 54, "text": "A Smart Mirror may be a two-way mirror with an inbuilt display behind the glass.The device was to look like a regular mirror but would have a screen inside and you would be a...
How to print the content of current window using JavaScript ?
20 Jan, 2022 The task is to print the content of the current window by using the window.print() method in the document. It is used to open the Print Dialog Box to print the current document. It does not have any parameter value. Syntax: window.print() Example: This example representing how to print the content of cur...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Jan, 2022" }, { "code": null, "e": 254, "s": 28, "text": "The task is to print the content of the current window by using the window.print() method in the document. It is used to open the Print Dialog Box to print the current documen...
Sort a linked list of 0s, 1s and 2s by changing links
23 Jun, 2022 Given a linked list of 0s, 1s and 2s, sort it.Examples: Input : 2->1->2->1->1->2->0->1->0 Output : 0->0->1->1->1->1->2->2->2 The sorted Array is 0, 0, 1, 1, 1, 1, 2, 2, 2. Input : 2->1->0 Output : 0->1->2 The sorted Array is 0, 1, 2 Method 1: There is a solution discussed in below post that works by chan...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 110, "s": 54, "text": "Given a linked list of 0s, 1s and 2s, sort it.Examples:" }, { "code": null, "e": 289, "s": 110, "text": "Input : 2->1->2->1->1->2->0->1->0\nOutput : 0->0...
Grouping Categorical Variables in Pandas Dataframe
17 Aug, 2020 Firstly, we have to understand what are Categorical variables in pandas. Categorical are the datatype available in pandas library of python. A categorical variable takes only a fixed category (usually fixed number) of values. Some examples of Categorical variables are gender, blood group, language etc. One...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Aug, 2020" }, { "code": null, "e": 446, "s": 28, "text": "Firstly, we have to understand what are Categorical variables in pandas. Categorical are the datatype available in pandas library of python. A categorical variable takes only ...
Parse Tree in Compiler Design
14 Jul, 2022 Here we will study the concept and uses of Parse Tree in Compiler Design. First, let us check out two terms : Parse : It means to resolve (a sentence) into its component parts and describe their syntactic roles or simply it is an act of parsing a string or a text. Tree: A tree may be a widely used abstract...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jul, 2022" }, { "code": null, "e": 162, "s": 52, "text": "Here we will study the concept and uses of Parse Tree in Compiler Design. First, let us check out two terms :" }, { "code": null, "e": 317, "s": 162, "tex...
PHP | file_exists( ) Function
31 Jul, 2021 The file_exists() function in PHP is an inbuilt function which is used to check whether a file or directory exists or not. The path of the file or directory you want to check is passed as a parameter to the file_exists() function which returns True on success and False on failure. Syntax: file_exists($path...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 151, "s": 28, "text": "The file_exists() function in PHP is an inbuilt function which is used to check whether a file or directory exists or not." }, { "code": null, "e": 310, "s": 1...
Turn Pandas Multi-Index into column
06 Oct, 2021 Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). A multi-index dataframe has multi-level, or hierarchical indexing. We can easily convert the multi-level index into the column by the reset_index() method. DataFrame.re...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 323, "s": 28, "text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). A multi-index dataframe has multi-le...
React-Bootstrap Carousel Component
30 Apr, 2021 React-Bootstrap is a front-end framework that was designed keeping react in mind. Carousel Component provides a way to create a slideshow for our images or text slides with a present full manner in a cyclic way. We can use the following approach in ReactJS to use the react-bootstrap Carousel Component. Car...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2021" }, { "code": null, "e": 332, "s": 28, "text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Carousel Component provides a way to create a slideshow for our images or text slides with a ...
SQL Query To Show Top 5 Selling Products - GeeksforGeeks
08 Oct, 2021 To display the top 5 selling products ORDER BY can be used with the SELECT TOP clause. So let us see the SQL Query for Showing Top 5 Selling Products using ORDER BY and SELECT TOP clause using MSSQL as the server. Step 1: We are creating a Database. For this use the below command to create a database name...
[ { "code": null, "e": 24366, "s": 24338, "text": "\n08 Oct, 2021" }, { "code": null, "e": 24581, "s": 24366, "text": "To display the top 5 selling products ORDER BY can be used with the SELECT TOP clause. So let us see the SQL Query for Showing Top 5 Selling Products using ORDER ...
How to create a JAR file?
You can create a JAR file using the following command. jar cf jar-file input-file(s) You can also create JAR files using IDE’s. To create a JAR file using eclipse follow the procedure given below. The Jar File wizard can be used to export the content of a project into a jar file. To bring up the Jar File wizard − In ...
[ { "code": null, "e": 1117, "s": 1062, "text": "You can create a JAR file using the following command." }, { "code": null, "e": 1149, "s": 1117, "text": "jar cf jar-file input-file(s) " }, { "code": null, "e": 1261, "s": 1149, "text": "You can also create JAR ...
Find whether a given integer is a power of 3 or not - GeeksforGeeks
18 Nov, 2021 Given a positive integer, write a function to find if it is a power of three or not. Examples: Input : 3 Output :Yes Input :6 Output :No Recursive approach : Check if the number is divisible by 3, if yes then keep checking the same for number/3 recursively. If the number can be reduced to 1, then the num...
[ { "code": null, "e": 26840, "s": 26812, "text": "\n18 Nov, 2021" }, { "code": null, "e": 26936, "s": 26840, "text": "Given a positive integer, write a function to find if it is a power of three or not. Examples: " }, { "code": null, "e": 26979, "s": 26936, "te...
Finding patterns with rules, using Knowledge Graphs and Semantic Reasoning | by Peter Crocker | Towards Data Science
Machine learning algorithms are now synonymous with finding patterns in data but not all patterns are suitable for statistics based data-driven techniques, for example when these patterns don’t have explicitly labelled targets to learn from. In some cases, these patterns can be expressed precisely as a rule. Reasoning ...
[ { "code": null, "e": 414, "s": 172, "text": "Machine learning algorithms are now synonymous with finding patterns in data but not all patterns are suitable for statistics based data-driven techniques, for example when these patterns don’t have explicitly labelled targets to learn from." }, { ...
Find the first natural number whose factorial is divisible by x - GeeksforGeeks
09 Jul, 2021 Given a number x, the task is to find first natural number i whose factorial is divisible by x.Examples : Input : x = 10 Output : 5 5 is the smallest number such that (5!) % 10 = 0 Input : x = 16 Output : 6 6 is the smallest number such that (6!) % 16 = 0 A simple solution is to iterate from 1 to ...
[ { "code": null, "e": 26815, "s": 26787, "text": "\n09 Jul, 2021" }, { "code": null, "e": 26923, "s": 26815, "text": "Given a number x, the task is to find first natural number i whose factorial is divisible by x.Examples : " }, { "code": null, "e": 27078, "s": 26...
Python Group tuples in list with same first value
In this tutorial, we are going to write a program that groups all the tuples with the same first element. Let's see an example to understand it clearly. [(1, 2, 3), (1, 4, 5), (3, 4, 1), (3, 4, 2)] [(1, 2, 3, 4, 5), (3, 4, 1, 4, 2)] Let's see the steps to solve the problem. Initialize the list. Initialize an empty dict...
[ { "code": null, "e": 1215, "s": 1062, "text": "In this tutorial, we are going to write a program that groups all the tuples with the same first element. Let's see an example to understand it clearly." }, { "code": null, "e": 1260, "s": 1215, "text": "[(1, 2, 3), (1, 4, 5), (3, 4,...
How to Setup Logging for your Python Notebooks in under 2 Minutes | by Dr. Gregor Scheithauer | Towards Data Science
Gregor is a data scientist who loves to solve data riddles. One day, he is given a new project and wants to jump into this new task immediately. He is prepared and a master of his favorite coding tool of choice, knows which packages to use, and already he forms an idea of how to structure the data project. Logging is n...
[ { "code": null, "e": 829, "s": 172, "text": "Gregor is a data scientist who loves to solve data riddles. One day, he is given a new project and wants to jump into this new task immediately. He is prepared and a master of his favorite coding tool of choice, knows which packages to use, and already he...
Get the maximum of two numbers using Math.max in Java
To obtain the maximum of two numbers using Math.max in Java, we use the java.lang.Math.max() method. The Math.max() accepts two numbers and returns the greater of the two. The result is closer to positive infinity on the number line. Even if one of the values is not a number(NaN), the result is NaN. Declaration - The j...
[ { "code": null, "e": 1363, "s": 1062, "text": "To obtain the maximum of two numbers using Math.max in Java, we use the java.lang.Math.max() method. The Math.max() accepts two numbers and returns the greater of the two. The result is closer to positive infinity on the number line. Even if one of the ...
static keyword in C#
We can define class members as static using the static keyword. When we declare a member of a class as static, it means no matter how many objects of the class are created, there is only one copy of the static member. The keyword static implies that only one instance of the member exists for a class. Static variables a...
[ { "code": null, "e": 1280, "s": 1062, "text": "We can define class members as static using the static keyword. When we declare a member of a class as static, it means no matter how many objects of the class are created, there is only one copy of the static member." }, { "code": null, "e"...
How to validate if input in input field has decimal number only using express-validator ? - GeeksforGeeks
07 Apr, 2022 In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only decimal numbers are allowed i.e. there not allowed any s...
[ { "code": null, "e": 24735, "s": 24707, "text": "\n07 Apr, 2022" }, { "code": null, "e": 25218, "s": 24735, "text": "In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow onl...
GATE CS 2020 - GeeksforGeeks
29 Oct, 2021 We use 'since' to refer back to a previous point in time. We use 'since' as a preposition with a date, a time or a noun phrase. We use 'for' with a period of time to refer to duration (how long something lasts). Cook : Cook :: Fly : _______ Verb : Noun The dawn of the 21st century witnessed the melting g...
[ { "code": null, "e": 27219, "s": 27191, "text": "\n29 Oct, 2021" }, { "code": null, "e": 27347, "s": 27219, "text": "We use 'since' to refer back to a previous point in time. We use 'since' as a preposition with a date, a time or a noun phrase." }, { "code": null, "e"...
Get Date and Time in different Formats in R Programming - date(), Sys.Date(), Sys.time() and Sys.timezone() Function - GeeksforGeeks
12 Jun, 2020 date() function in R Language is used to return the current date and time. Syntax: date() Parameters:Does not accept any parameters Example: # R program to illustrate# date function # Calling date() function to # return current date and timedate() Output: [1] "Thu Jun 11 04:29:39 2020" Sys.Date() functio...
[ { "code": null, "e": 25004, "s": 24976, "text": "\n12 Jun, 2020" }, { "code": null, "e": 25079, "s": 25004, "text": "date() function in R Language is used to return the current date and time." }, { "code": null, "e": 25094, "s": 25079, "text": "Syntax: date()"...
All elements in an array are Same or not? - GeeksforGeeks
29 Jan, 2022 Given an array, check whether all elements in an array are the same or not. Examples: Input : "Geeks", "for", "Geeks" Output : Not all Elements are Same Input : 1, 1, 1, 1, 1 Output : All Elements are Same Method 1 (Hashing) We create an empty HashSet, insert all elements into it, then we finally see if ...
[ { "code": null, "e": 24629, "s": 24601, "text": "\n29 Jan, 2022" }, { "code": null, "e": 24705, "s": 24629, "text": "Given an array, check whether all elements in an array are the same or not." }, { "code": null, "e": 24716, "s": 24705, "text": "Examples: " ...
Max length chain | Practice | GeeksforGeeks
You are given N pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can follow another pair (a, b) if b < c. Chain of pairs can be formed in this fashion. You have to find the longest chain which can be formed from the given set of pairs. Example 1: Input: N = 5 ...
[ { "code": null, "e": 534, "s": 238, "text": "You are given N pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can follow another pair (a, b) if b < c. Chain of pairs can be formed in this fashion. You have to find the longest chain which can b...
How to Use Selenium and Docker to Scrape and Test Websites | by Jesse Kerr | Towards Data Science
Do you want to access vast amounts of data and test your website without lifting a finger? Do you have a mountain of online grunt work that a computer program could handle? Then you need browser automation with the Selenium WebDriver. Selenium is the premier tool for testing and scraping Javascript-rendered web pages, ...
[ { "code": null, "e": 928, "s": 47, "text": "Do you want to access vast amounts of data and test your website without lifting a finger? Do you have a mountain of online grunt work that a computer program could handle? Then you need browser automation with the Selenium WebDriver. Selenium is the premi...
JavaScript - Date toDateString() Method
Javascript date toDateString() method returns the date portion of a Date object in human readable form. Its syntax is as follows − Date.toDateString() Returns the date portion of a Date object in human readable form. Try the following example. <html> <head> <title>JavaScript toDateString Method</title> ...
[ { "code": null, "e": 2570, "s": 2466, "text": "Javascript date toDateString() method returns the date portion of a Date object in human readable form." }, { "code": null, "e": 2597, "s": 2570, "text": "Its syntax is as follows −" }, { "code": null, "e": 2618, "s":...
How to limit the number of documents in a MongoDB request in Node.js ? - GeeksforGeeks
20 Oct, 2021 Say you are working on a quiz API, with which anybody on the web can fetch random questions based on the defined category. You are done with your API and it has passed all test parameters, now for sake of users you want to add a feature that will let users decide how many questions they want to address and...
[ { "code": null, "e": 24141, "s": 24113, "text": "\n20 Oct, 2021" }, { "code": null, "e": 24552, "s": 24141, "text": "Say you are working on a quiz API, with which anybody on the web can fetch random questions based on the defined category. You are done with your API and it has pa...
Python String upper() Method
Python string method upper() returns a copy of the string in which all case-based characters have been uppercased. Following is the syntax for upper() method − str.upper() NA NA This method returns a copy of the string in which all case-based characters have been uppercased. The following example shows the usage of u...
[ { "code": null, "e": 2360, "s": 2244, "text": "Python string method upper() returns a copy of the string in which all case-based characters have been uppercased." }, { "code": null, "e": 2405, "s": 2360, "text": "Following is the syntax for upper() method −" }, { "code":...
Mathematics for Machine Learning : Linear Regression & Least Square Regression | by Deepak K Gupta (DAKSH) | Towards Data Science
Machine learning is all about Mathematics, though many libraries are available today which can apply the complex formulas with a function call, it’s any way desirable to learn at least the basics about it to understand it in better. Let’s try to understand the Linear Regression and Least Square Regression in simple way...
[ { "code": null, "e": 405, "s": 172, "text": "Machine learning is all about Mathematics, though many libraries are available today which can apply the complex formulas with a function call, it’s any way desirable to learn at least the basics about it to understand it in better." }, { "code": ...
Angular 2 - User Input
In Angular 2, you can make the use of DOM element structure of HTML to change the values of the elements at run time. Let’s look at some in detail. In the app.component.ts file place the following code. import { Component } from '@angular/core'; @Component ({ selector: 'my-app', template: ' <div>...
[ { "code": null, "e": 2445, "s": 2297, "text": "In Angular 2, you can make the use of DOM element structure of HTML to change the values of the elements at run time. Let’s look at some in detail." }, { "code": null, "e": 2500, "s": 2445, "text": "In the app.component.ts file place...
Python | Plotting charts in excel sheet using openpyxl module | Set – 2 - GeeksforGeeks
16 Aug, 2018 Prerequisite: Python | Plotting charts in excel sheet using openpyxl module | Set – 1 Openpyxl is a Python library using which one can perform multiple operations on excel files like reading, writing, arithmatic operations and plotting graphs. Charts are composed of at least one series of one or more data ...
[ { "code": null, "e": 24766, "s": 24738, "text": "\n16 Aug, 2018" }, { "code": null, "e": 24852, "s": 24766, "text": "Prerequisite: Python | Plotting charts in excel sheet using openpyxl module | Set – 1" }, { "code": null, "e": 25010, "s": 24852, "text": "Open...
Skip method in C#
Use the Skip() method in C# to skip number of elements in an array. Let’s say the following is our array − int[] arr = { 10, 20, 30, 40, 50 }; To skip the first two elements, use the Skip() method and add argument as 2 − arr.Skip(2); Let us see an example − Live Demo using System.IO; using System; using System.Linq; p...
[ { "code": null, "e": 1130, "s": 1062, "text": "Use the Skip() method in C# to skip number of elements in an array." }, { "code": null, "e": 1169, "s": 1130, "text": "Let’s say the following is our array −" }, { "code": null, "e": 1205, "s": 1169, "text": "int[...
Python – Reshape the data in a Pandas DataFrame
We can easily reshape the data by categorizing a specific column. Here, we will categorize the “Result”column i.e. Pass and Fail values in numbers form. Import the required library − import pandas as pd Create a DataFrame with 2 columns − dataFrame = pd.DataFrame( { "Student": ['Jack', 'Robin', 'Ted', 'Scarlet...
[ { "code": null, "e": 1215, "s": 1062, "text": "We can easily reshape the data by categorizing a specific column. Here, we will categorize the “Result”column i.e. Pass and Fail values in numbers form." }, { "code": null, "e": 1245, "s": 1215, "text": "Import the required library −...
grep - Unix, Linux Command
grep - print lines matching a pattern grep [OPTIONS] PATTERN [FILE...] grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...] Example-1: To Search for the given string in a single file test.sh $ cat test.sh#!/bin/bashfun() echo "This is a test." # Terminate our shell script with success message exit 1fun(...
[ { "code": null, "e": 10615, "s": 10577, "text": "grep - print lines matching a pattern" }, { "code": null, "e": 10696, "s": 10615, "text": "grep [OPTIONS] PATTERN [FILE...]\ngrep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]" }, { "code": null, "e": 10707, "s": 10696...
C++ Program to Access Elements of an Array Using Pointer
Pointers store the memory location or address of variables. In other words, pointers reference a memory location and obtaining the value stored at that memory location is known as dereferencing the pointer. A program that uses pointers to access a single element of an array is given as follows − Live Demo #include <io...
[ { "code": null, "e": 1269, "s": 1062, "text": "Pointers store the memory location or address of variables. In other words, pointers reference a memory location and obtaining the value stored at that memory location is known as dereferencing the pointer." }, { "code": null, "e": 1359, ...
PHP Date and Time
The PHP date() function is used to format a date and/or a time. The PHP date() function formats a timestamp to a more readable date and time. A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occurred. The required format parameter of the date() function specifies how to...
[ { "code": null, "e": 64, "s": 0, "text": "The PHP date() function is used to format a date and/or a time." }, { "code": null, "e": 142, "s": 64, "text": "The PHP date() function formats a timestamp to a more readable date and time." }, { "code": null, "e": 251, "s...
Dog Years Calculator using PyQt5 - GeeksforGeeks
01 Aug, 2020 In this article, we will see how we can create a dog year calculator using PyQt5. Dog year calculator will tell the age of a dog if the dog was human, the dog grew a lot faster than humans. Below is how the calculator will look like : PyQt5 is a cross-platform GUI toolkit, a set of python bindings for Qt ...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n01 Aug, 2020" }, { "code": null, "e": 24448, "s": 24212, "text": "In this article, we will see how we can create a dog year calculator using PyQt5. Dog year calculator will tell the age of a dog if the dog was human, the dog grew...
Singular Value Decomposition with Example in R | by Kshitiz Sirohi | Towards Data Science
If you are familiar with matrix and vectors then it would not take much time for you to understand what SVD is, however, if you are not familiar with matrix, I would suggest you to first get the grasp of that. SVD is the method in which we represent data in form of matrix and then we reduce the number of columns it has...
[ { "code": null, "e": 382, "s": 172, "text": "If you are familiar with matrix and vectors then it would not take much time for you to understand what SVD is, however, if you are not familiar with matrix, I would suggest you to first get the grasp of that." }, { "code": null, "e": 664, ...
Step by Step: Twitter Sentiment Analysis in Python | by Yalin Yener | Towards Data Science
It is no longer difficult to understand what people think about a topic by analysing the tweets shared by people. Sentiment analysis is one of the most popular use cases for NLP (Natural Language Processing). In this post, I am going to use “Tweepy,” which is an easy-to-use Python library for accessing the Twitter API....
[ { "code": null, "e": 380, "s": 171, "text": "It is no longer difficult to understand what people think about a topic by analysing the tweets shared by people. Sentiment analysis is one of the most popular use cases for NLP (Natural Language Processing)." }, { "code": null, "e": 639, ...
Explain try, except and finally statements in Python.
In exception handling in Python, we use the try and except statements to catch and handle exceptions. The code within the try clause is executed statement by statement. If an exception occurs, the rest of the try block is skipped and the except clause is executed. try: 'apple' + 6 except Exception: print "Cannot concat...
[ { "code": null, "e": 1231, "s": 1062, "text": "In exception handling in Python, we use the try and except statements to catch and handle exceptions. The code within the try clause is executed statement by statement." }, { "code": null, "e": 1327, "s": 1231, "text": "If an excepti...
Explain try and catch statements in JavaScript with examples.
The try statement allows us execute a block of code and test for errors. Those errors are then caught and handle by the catch statement. Following is the code for try and catch statement in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=devi...
[ { "code": null, "e": 1199, "s": 1062, "text": "The try statement allows us execute a block of code and test for errors. Those errors are then caught and handle by the catch statement." }, { "code": null, "e": 1265, "s": 1199, "text": "Following is the code for try and catch state...
SQL for Data Analysis: Subquery vs. CTE | by Aaron Zhu | Towards Data Science
SQL is an essential skill for data science professionals. Many companies store their data in a relational database system, such as MySQL, PostgreSQL, MS SQL Server, SQLite. SQL is the programming language we need to interact with them. We can write a SQL query to select, filter, transform, insert, update, and delete th...
[ { "code": null, "e": 527, "s": 172, "text": "SQL is an essential skill for data science professionals. Many companies store their data in a relational database system, such as MySQL, PostgreSQL, MS SQL Server, SQLite. SQL is the programming language we need to interact with them. We can write a SQL ...
Using Python to Scrape NFL Stats and Compare Quarterback Efficiencies | by Naveen Venkatesan | Towards Data Science
I have always been apprehensive about trying to scrape my own data, and the fact that websites like Kaggle aggregate such high quality datasets has made learning this skill less of a need. However, the abundance of educational articles on data science on this platform have helped me make progress towards collecting my ...
[ { "code": null, "e": 577, "s": 172, "text": "I have always been apprehensive about trying to scrape my own data, and the fact that websites like Kaggle aggregate such high quality datasets has made learning this skill less of a need. However, the abundance of educational articles on data science on ...
Logic Programming and the Design of Humanistic AI using Python | by Rahulraj Singh | Towards Data Science
Since its inception, Artificial Intelligence has been a means of replicating human thoughts and behavior, and give these attributes to machines. The success of AI is measured as the degree to which a machine can act astutely. The smarter the machine gets, the better that AI code is considered. As the advent of creating...
[ { "code": null, "e": 317, "s": 172, "text": "Since its inception, Artificial Intelligence has been a means of replicating human thoughts and behavior, and give these attributes to machines." }, { "code": null, "e": 467, "s": 317, "text": "The success of AI is measured as the degr...
HTML - Summary Tag
The HTML <summary> tag specifies a summary, caption or legend for a given details. <!DOCTYPE html> <html> <head> <title>HTML Summary Tag</title> </head> <body> <details> <summary>Some details</summary> <p>Provide more info about the details here.</p> </details> </body> ...
[ { "code": null, "e": 2457, "s": 2374, "text": "The HTML <summary> tag specifies a summary, caption or legend for a given details." }, { "code": null, "e": 2703, "s": 2457, "text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML Summary Tag</title>\n </head>\n\n <body...
Tryit Editor v3.6 - Show React
import { useState } from "react"; import ReactDOM from "react-dom/client"; function MyForm() { const [inputs, setInputs] = useState({}); const handleChange = (event) => { const name = event.target.name; const value = event.target.value; setInputs(values => ({...values, [name]: value})) } const ha...
[ { "code": null, "e": 1067, "s": 0, "text": "\nimport { useState } from \"react\";\nimport ReactDOM from \"react-dom/client\";\n\nfunction MyForm() {\n const [inputs, setInputs] = useState({});\n\n const handleChange = (event) => {\n const name = event.target.name;\n const value = event.targe...
Find Strings greater than a particular length in MongoDB?
To find the string which has a length greater than a particular value in MongoDB, use the $where operator. The syntax is as follows − db.yourCollectionName.find({$where:'this.yourStringFieldName.length > yourIntegerValue'}).pretty(); To understand the above concept, let us create a collection with the document. The que...
[ { "code": null, "e": 1196, "s": 1062, "text": "To find the string which has a length greater than a particular value in MongoDB, use the $where operator. The syntax is as follows −" }, { "code": null, "e": 1296, "s": 1196, "text": "db.yourCollectionName.find({$where:'this.yourStr...
How to undo a faulty merge with reset command in Git?
Let us say we performed a merge commit and later found out that the code is not compiling or our application is not working. This happens if we make mistakes while merging. In situations like these we need to undo the merge using either − reset command; OR revert command The git reset command can be used to undo local ...
[ { "code": null, "e": 1301, "s": 1062, "text": "Let us say we performed a merge commit and later found out that the code is not compiling or our application is not working. This happens if we make mistakes while merging. In situations like these we need to undo the merge using either −" }, { ...
Typer: Build Powerful CLIs in One Line of Code using Python | by Khuyen Tran | Towards Data Science
Have you ever wanted to quickly add arguments to a Python script on the command line like below? Being able to insert arguments to the Python script from a terminal allows you and your users to experiment with different parameters easily without looking at the source code. argparse allows you to write command-line inte...
[ { "code": null, "e": 268, "s": 171, "text": "Have you ever wanted to quickly add arguments to a Python script on the command line like below?" }, { "code": null, "e": 445, "s": 268, "text": "Being able to insert arguments to the Python script from a terminal allows you and your u...
Kotlin - Keywords
Kotlin keywords are predefined, reserved words used in Kotlin programming that have special meanings to the compiler. These words cannot be used as an identifier (variables names, package names, function names etc.) and if used then compiler will raise an exception. Kotlin uses fun keyword to define a function, so if w...
[ { "code": null, "e": 2692, "s": 2425, "text": "Kotlin keywords are predefined, reserved words used in Kotlin programming that have special meanings to the compiler. These words cannot be used as an identifier (variables names, package names, function names etc.) and if used then compiler will raise ...
Onelinepy - Python Obfuscator To Generate One-Liners And FUD Payloads - GeeksforGeeks
18 Jul, 2021 Onelinepy is a free and open-source tool available on GitHub. Onelinepy is used to Generate One-Liners And FUD Payloads. Devploit is used to generate FUD Payloads in websites and webapps. This tool can be used to get information about our target(domain). We can target any domain using Onelinepy. The inter...
[ { "code": null, "e": 24326, "s": 24298, "text": "\n18 Jul, 2021" }, { "code": null, "e": 25029, "s": 24326, "text": "Onelinepy is a free and open-source tool available on GitHub. Onelinepy is used to Generate One-Liners And FUD Payloads. Devploit is used to generate FUD Payloads...
SAP ABAP - Deleting Internal Tables
The DELETE statement is used to delete one or more records from an internal table. The records of an internal table are deleted either by specifying a table key or condition or by finding duplicate entries. If an internal table has a non-unique key and contains duplicate entries, the first entry from the table is delet...
[ { "code": null, "e": 3222, "s": 2898, "text": "The DELETE statement is used to delete one or more records from an internal table. The records of an internal table are deleted either by specifying a table key or condition or by finding duplicate entries. If an internal table has a non-unique key and ...
Cognizant Interview Experience | On-Campus 2020 - GeeksforGeeks
08 Jan, 2021 I would love to share my on-campus placement experience with Cognizant. Cognizant conducted an online exam on the Amcat platform for our college Jadavpur University on the 18th and 19th of November. Round 1 (Written Test): In round 1 there was a written test that consisted of 4 sections. Logical section: ...
[ { "code": null, "e": 25052, "s": 25024, "text": "\n08 Jan, 2021" }, { "code": null, "e": 25251, "s": 25052, "text": "I would love to share my on-campus placement experience with Cognizant. Cognizant conducted an online exam on the Amcat platform for our college Jadavpur Universit...
Find out the GCD of two numbers using while loop in C language
Generate the greatest common divisor for any two numbers using C programming language. Let the user enter any two numbers from the console. For those two numbers, let’s find the greatest common divisor. The GCD of two numbers is the largest number that exactly divides both of them without a remainder. The logic we use ...
[ { "code": null, "e": 1149, "s": 1062, "text": "Generate the greatest common divisor for any two numbers using C programming language." }, { "code": null, "e": 1265, "s": 1149, "text": "Let the user enter any two numbers from the console. For those two numbers, let’s find the grea...
Concatenate multiIndex into single index in Pandas Series - GeeksforGeeks
14 Sep, 2021 In this article, we will see how to concatenate multi-index to a single index in Pandas Series. Multi-index refers to having more than one index with the same name. Create a sample series: Python3 # importing pandas moduleimport pandas as pdimport numpy as np # Creating series data for address detailsindex...
[ { "code": null, "e": 24872, "s": 24844, "text": "\n14 Sep, 2021" }, { "code": null, "e": 25037, "s": 24872, "text": "In this article, we will see how to concatenate multi-index to a single index in Pandas Series. Multi-index refers to having more than one index with the same name...
How to copy files from host to Docker container?
If you have a Docker container running and you want to copy files from the host machine to the Docker container, there are several ways to do it. One way to do this is by using the ADD or COPY instructions inside a Dockerfile and passing the paths of the files that you want to be in your container when you start it. Bu...
[ { "code": null, "e": 1540, "s": 1062, "text": "If you have a Docker container running and you want to copy files from the host machine to the Docker container, there are several ways to do it. One way to do this is by using the ADD or COPY instructions inside a Dockerfile and passing the paths of th...
C# - Windows File System
C# allows you to work with the directories and files using various directory and file related classes such as the DirectoryInfo class and the FileInfo class. The DirectoryInfo class is derived from the FileSystemInfo class. It has various methods for creating, moving, and browsing through directories and subdirectories...
[ { "code": null, "e": 2428, "s": 2270, "text": "C# allows you to work with the directories and files using various directory and file related classes such as the DirectoryInfo class and the FileInfo class." }, { "code": null, "e": 2624, "s": 2428, "text": "The DirectoryInfo class ...
XAML - CanvasPanel
Canvas panel is the basic layout panel in which child elements can be positioned explicitly using coordinates that are relative to the Canvas any side such as left, right, top, and bottom. A Canvas is typically used for 2D graphic elements (such as Ellipse, Rectangle, etc.), but not for UI elements because specifying a...
[ { "code": null, "e": 2112, "s": 1923, "text": "Canvas panel is the basic layout panel in which child elements can be positioned explicitly using coordinates that are relative to the Canvas any side such as left, right, top, and bottom." }, { "code": null, "e": 2340, "s": 2112, "t...
Spotiscience: A Tool for Data Scientists and Music Lovers | by Cristóbal Veas | Towards Data Science
Who doesn’t like to work with music? Many of us work all day with Spotify running in the background processes of our computers, while the random music from the playlists and artists that we like are generating a magical atmosphere with their melodies. they deliver that energy necessary to work with full productivity. I...
[ { "code": null, "e": 490, "s": 171, "text": "Who doesn’t like to work with music? Many of us work all day with Spotify running in the background processes of our computers, while the random music from the playlists and artists that we like are generating a magical atmosphere with their melodies. the...
Block of PL/SQL in Oracle DBMS
PL/SQL is a block structured language i.e the code of PL./SQL is written in the form of blocks. PL/SQL also contains the robustness, security and portability of the Oracle database. Each block of PL/SQL contains the following subparts − Declarations - This section contains all the items that needs to be declared befor...
[ { "code": null, "e": 1244, "s": 1062, "text": "PL/SQL is a block structured language i.e the code of PL./SQL is written in the form of blocks. PL/SQL also contains the robustness, security and portability of the Oracle database." }, { "code": null, "e": 1299, "s": 1244, "text": "...
Aptitude Mock Test
This section presents you various set of Mock Tests related to Aptitude. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself. Q 1 - The entire surface range of a cuboi...
[ { "code": null, "e": 4171, "s": 3892, "text": "This section presents you various set of Mock Tests related to Aptitude. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final ...
How to change border-color of a canvas text using Fabric.js ? - GeeksforGeeks
11 Feb, 2022 In this article, we are going to see how to change the border-color of a canvas-like text using FabricJS. The canvas means text written is movable and can be stretched according to requirement. Further, the text itself cannot be edited like a textbox.Approach: To make it possible we are going to use a Java...
[ { "code": null, "e": 24970, "s": 24942, "text": "\n11 Feb, 2022" }, { "code": null, "e": 25728, "s": 24970, "text": "In this article, we are going to see how to change the border-color of a canvas-like text using FabricJS. The canvas means text written is movable and can be stret...
curl - Unix, Linux Command
curl - Transfers data from or to a server, using one of the protocols: HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE. (To transfer multiple files use wget or FTP.) curl [options] [URL...] Curl transfers data from or to a server, using one of the protocols: HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, ...
[ { "code": null, "e": 10897, "s": 10711, "text": "curl - Transfers data from or to a server, using one of the protocols: HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE. (To transfer multiple files use wget or FTP.)" }, { "code": null, "e": 10921, "s": 10897, "...