title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Time delay in C - GeeksforGeeks
18 Dec, 2019 In this post, we will see how to give a time delay in C code. Basic idea is to get current clock and add the required delay to that clock, till current clock is less then required clock run an empty loop. Here is implementation with a delay function. // C function showing how to do time delay#include <stdi...
[ { "code": null, "e": 24475, "s": 24447, "text": "\n18 Dec, 2019" }, { "code": null, "e": 24680, "s": 24475, "text": "In this post, we will see how to give a time delay in C code. Basic idea is to get current clock and add the required delay to that clock, till current clock is le...
Algorithms | Analysis of Algorithms (Recurrences) | Question 1 - GeeksforGeeks
21 May, 2019 What is the value of following recurrence. T(n) = T(n/4) + T(n/2) + cn2 T(1) = c T(0) = 0 Where c is a positive constant (A) O(n3)(B) O(n2)(C) O(n2 Logn)(D) O(nLogn)Answer: (B)Explanation: Following is the initial recursion tree for the given recurrence relation. cn^2 / \ T(n...
[ { "code": null, "e": 25038, "s": 25010, "text": "\n21 May, 2019" }, { "code": null, "e": 25081, "s": 25038, "text": "What is the value of following recurrence." }, { "code": null, "e": 25129, "s": 25081, "text": "\nT(n) = T(n/4) + T(n/2) + cn2\nT(1) = c\nT(0) ...
How to display open cursors in Oracle?
Problem: You want to display open cursors in Oracle. Solution We can query the data dictionary to determine the number of cursors that are open per session. "V$SESSION" provides a more accurate number of the cursors currently open than "V$OPEN_CURSOR". select a.value ,c.username ,c.machine ,c.sid ,c.serial# from v...
[ { "code": null, "e": 1071, "s": 1062, "text": "Problem:" }, { "code": null, "e": 1115, "s": 1071, "text": "You want to display open cursors in Oracle." }, { "code": null, "e": 1124, "s": 1115, "text": "Solution" }, { "code": null, "e": 1315, "s...
Get the specified row value of a given Pandas DataFrame - GeeksforGeeks
17 Aug, 2020 Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Now let’s see how to get the specified row value of a given DataFrame. We shall be using loc[ ], iloc[ ], and [ ] for a data frame object to select rows and columns fr...
[ { "code": null, "e": 25096, "s": 25068, "text": "\n17 Aug, 2020" }, { "code": null, "e": 25236, "s": 25096, "text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). " }, { "code": n...
CSS - Bounce In Left Effect
Bounce Animation effect is used to move the element quick up, back, or away from a surface after hitting it. @keyframes bounceInLeft { 0% { opacity: 0; transform: translateX(-2000px); } 60% { opacity: 1; transform: translateX(30px); } 80% { transform: translateX(-10px); }...
[ { "code": null, "e": 2735, "s": 2626, "text": "Bounce Animation effect is used to move the element quick up, back, or away from a surface after hitting it." }, { "code": null, "e": 2997, "s": 2735, "text": "@keyframes bounceInLeft {\n 0% {\n opacity: 0;\n transform: t...
DAX Date & Time - CALENDARAUTO function
Returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is calculated automatically based on the data in the model. DAX CALENDARAUTO function is new in Excel 2016. CALENDARAUTO ([<fiscal_year_end_month>]) fiscal_year_end_month Any DAX expression that returns an in...
[ { "code": null, "e": 2171, "s": 2001, "text": "Returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is calculated automatically based on the data in the model." }, { "code": null, "e": 2219, "s": 2171, "text": "DAX CALENDAR...
Design Patterns - Builder Pattern
Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. A Builder class builds the final object step by step. This builder is independent of other objects...
[ { "code": null, "e": 2973, "s": 2751, "text": "Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object." }, { "code": null, ...
How to set your python path on Mac?
To set the PYTHONPATH on Mac OS to point Python to look in other directories for module and package imports, export the PYTHONPATH variable as follows: $ export PYTHONPATH=${PYTHONPATH}:${HOME}/foo In this case are adding the foo directory to the PYTHONPATH. Note that we are appending it and not replacing the PYTHONPA...
[ { "code": null, "e": 1214, "s": 1062, "text": "To set the PYTHONPATH on Mac OS to point Python to look in other directories for module and package imports, export the PYTHONPATH variable as follows:" }, { "code": null, "e": 1260, "s": 1214, "text": "$ export PYTHONPATH=${PYTHONPA...
Check if a given sequence of moves for a robot is circular or not - GeeksforGeeks
07 Jul, 2021 Given a sequence of moves for a robot, check if the sequence is circular or not. A sequence of moves is circular if first and last positions of robot are same. A move can be on of the following. G - Go one unit L - Turn left R - Turn right Examples: Input: path[] = "GLGLGLG" Output: Given sequence...
[ { "code": null, "e": 25146, "s": 25118, "text": "\n07 Jul, 2021" }, { "code": null, "e": 25342, "s": 25146, "text": "Given a sequence of moves for a robot, check if the sequence is circular or not. A sequence of moves is circular if first and last positions of robot are same. A m...
Using SQL to Improve Missing Values | by Robert de Graaf | Towards Data Science
For a few months now, we’ve been looking at different ways to use SQL in data science — most recently on using SQL to detect outliers (not the same as detecting anomalies, although that’s in the future). In the first post in this sporadic series of posts, we looked at how to assess missing data by counting the proporti...
[ { "code": null, "e": 251, "s": 47, "text": "For a few months now, we’ve been looking at different ways to use SQL in data science — most recently on using SQL to detect outliers (not the same as detecting anomalies, although that’s in the future)." }, { "code": null, "e": 538, "s": 2...
How to Install Face Recognition in Python on Windows? - GeeksforGeeks
26 Oct, 2021 In this article, we will learn how to install Face Recognition in Python on Windows. Recognize and manipulate faces from Python or from the command line with the world’s simplest face recognition library. Built using dlib’s state-of-the-art face recognition built with deep learning. Face Recognition module...
[ { "code": null, "e": 24561, "s": 24533, "text": "\n26 Oct, 2021" }, { "code": null, "e": 24845, "s": 24561, "text": "In this article, we will learn how to install Face Recognition in Python on Windows. Recognize and manipulate faces from Python or from the command line with the w...
How to use MySQL decimal?
MySQL decimal data type can be used to store the exact numerical value. The syntax of DECIMAL data type. yourColumnName Decimal(integerValue,intgerValue); Example of DECIMAL data type. mysql> create table EmployeeInformation -> ( -> EmpId int auto_increment primary key, -> EmpName varchar(200), -> EmpSalary...
[ { "code": null, "e": 1167, "s": 1062, "text": "MySQL decimal data type can be used to store the exact numerical value. The syntax of DECIMAL data type." }, { "code": null, "e": 1217, "s": 1167, "text": "yourColumnName Decimal(integerValue,intgerValue);" }, { "code": null,...
Count the number of nodes at a given level in a tree using DFS - GeeksforGeeks
06 Aug, 2021 Given an integer l and a tree represented as an undirected graph rooted at vertex 0. The task is to print the number of nodes present at level l. Examples: Input: l = 2 Output: 4 We have already discussed the BFS approach, in this post we will solve it using DFS. Approach: The idea is to traverse the g...
[ { "code": null, "e": 24662, "s": 24634, "text": "\n06 Aug, 2021" }, { "code": null, "e": 24808, "s": 24662, "text": "Given an integer l and a tree represented as an undirected graph rooted at vertex 0. The task is to print the number of nodes present at level l." }, { "co...
Keras - Customized Layer
Keras allows to create our own customized layer. Once a new layer is created, it can be used in any model without any restriction. Let us learn how to create new layer in this chapter. Keras provides a base layer class, Layer which can sub-classed to create our own customized layer. Let us create a simple layer which w...
[ { "code": null, "e": 2236, "s": 2051, "text": "Keras allows to create our own customized layer. Once a new layer is created, it can be used in any model without any restriction. Let us learn how to create new layer in this chapter." }, { "code": null, "e": 2531, "s": 2236, "text"...
Interactive Power BI Custom Visuals with R | by Freddie Tasker | Towards Data Science
Sometimes the right Power BI visual just isn’t there. Trying to create an executive summary of project management data recently I hit just this wall. The idea was a report page that would be a front page to users - a quick signpost before they got into the detail of the other report pages, and something that would easi...
[ { "code": null, "e": 321, "s": 171, "text": "Sometimes the right Power BI visual just isn’t there. Trying to create an executive summary of project management data recently I hit just this wall." }, { "code": null, "e": 602, "s": 321, "text": "The idea was a report page that woul...
Min Cost Climbing Stairs | Practice | GeeksforGeeks
Given an array of integers cost[] of length N, where cost[i] is the cost of the ith step on a staircase. Once the cost is paid, you can either climb one or two steps. You can either start from the step with index 0, or the step with index 1. Return the minimum cost to reach the top of the floor. Example 1: Input: N = ...
[ { "code": null, "e": 535, "s": 226, "text": "Given an array of integers cost[] of length N, where cost[i] is the cost of the ith step on a staircase. Once the cost is paid, you can either climb one or two steps.\nYou can either start from the step with index 0, or the step with index 1.\nReturn the ...
JavaScript - Date toLocaleString() Method
Javascript date toLocaleString() method converts a date to a string, using the operating system's local conventions. The toLocaleString method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is runn...
[ { "code": null, "e": 2584, "s": 2466, "text": "Javascript date toLocaleString() method converts a date to a string, using the operating system's local conventions." }, { "code": null, "e": 2937, "s": 2584, "text": "The toLocaleString method relies on the underlying operating sys...
C Program to check if two strings are same or not
Given two strings str1 and str2 we have to check whether the two strings are same or not. Like we are given two stings “hello” and “hello” so they are identical and same. Identical are the strings which seems equal but are not equal like : “Hello” and “hello”, and same are the strings which are exactly same like : “Wor...
[ { "code": null, "e": 1233, "s": 1062, "text": "Given two strings str1 and str2 we have to check whether the two strings are same or not. Like we are given two stings “hello” and “hello” so they are identical and same." }, { "code": null, "e": 1399, "s": 1233, "text": "Identical a...
pic - Unix, Linux Command
It is the user’s responsibility to provide appropriate definitions of the PS and PE macros. When the macro package being used does not supply such definitions (for example, old versions of -ms), appropriate definitions can be obtained with -mpic: these will center each picture. /usr/share/doc/groff/1.18.1.1/pic.ms ...
[ { "code": null, "e": 10858, "s": 10577, "text": "\nIt is the user’s responsibility to provide appropriate definitions of the\nPS and\nPE macros.\nWhen the macro package being used does not supply such definitions\n(for example, old versions of -ms),\nappropriate definitions can be obtained with\n-mp...
How to make Log Plots in Plotly - Python? - GeeksforGeeks
05 Sep, 2020 A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library. A l...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n05 Sep, 2020" }, { "code": null, "e": 24205, "s": 23901, "text": "A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, ...
File Handling with os Module
In addition to File object returned by open() function, file IO operations can also be performed using Python's built-in library has os module that provides useful operating system dependent functions. These functions perform low level read/write operations on file. The open() function from os module is similar to the ...
[ { "code": null, "e": 2622, "s": 2355, "text": "In addition to File object returned by open() function, file IO operations can also be performed using Python's built-in library has os module that provides useful operating system dependent functions. These functions perform low level read/write operat...
Data Visualization of Elite Swimmers’ Competition Results (Part 1 — Datasets) | by Tanyoung Kim | Towards Data Science
This post is the first part of the production notes for a data visualization project, Swimmers’ History. tany.kim Swimming is my long-time interest and I’ve been always wanting to make data visualization. Recently (read: a year ago :-)) I found a great website that provides the results of numerous swim meets and I trie...
[ { "code": null, "e": 277, "s": 172, "text": "This post is the first part of the production notes for a data visualization project, Swimmers’ History." }, { "code": null, "e": 286, "s": 277, "text": "tany.kim" }, { "code": null, "e": 1036, "s": 286, "text": "Sw...
How to get a Free Server for a Machine Learning model | by Roman Orac | Towards Data Science
Having an always-on server is a great way to show your references to your future employers or to test your Machine Learning model in the real world. Before we start I would like to disclose that I’m NOT affiliated with Amazon in any way. The approach you’ll learn in this article should be also applicable to other cloud...
[ { "code": null, "e": 321, "s": 172, "text": "Having an always-on server is a great way to show your references to your future employers or to test your Machine Learning model in the real world." }, { "code": null, "e": 549, "s": 321, "text": "Before we start I would like to discl...
React CSS Styling
There are many ways to style React with CSS, this tutorial will take a closer look at three common ways: Inline styling CSS stylesheets CSS Modules To style an element with the inline style attribute, the value must be a JavaScript object: Insert an object with the styling information: const Header = () => { return...
[ { "code": null, "e": 106, "s": 0, "text": "There are many ways to style React with CSS, this tutorial will \ntake a closer look at three common ways:" }, { "code": null, "e": 121, "s": 106, "text": "Inline styling" }, { "code": null, "e": 137, "s": 121, "text"...
RESTful Web Services - Resources
REST architecture treats every content as a resource. These resources can be Text Files, Html Pages, Images, Videos or Dynamic Business Data. REST Server simply provides access to resources and REST client accesses and modifies the resources. Here each resource is identified by URIs/ Global IDs. REST uses various repre...
[ { "code": null, "e": 2297, "s": 1855, "text": "REST architecture treats every content as a resource. These resources can be Text Files, Html Pages, Images, Videos or Dynamic Business Data. REST Server simply provides access to resources and REST client accesses and modifies the resources. Here each ...
WPF - CanvasPanel
Canvas panel is the basic layout Panel in which the child elements can be positioned explicitly using coordinates that are relative to the Canvas any side such as left, right, top and bottom. Typically, a Canvas is used for 2D graphic elements (such as Ellipse, Rectangle etc.), but not for UI elements because specifyin...
[ { "code": null, "e": 2212, "s": 2020, "text": "Canvas panel is the basic layout Panel in which the 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": 2500, "s": 2212, ...
Capturing browser logs with Selenium WebDriver using Java.
We can capture browser logs with Selenium. We have to type cast the RemoteWebDriver to driver and then initialize it. Next, we have to use the setLogLevel method. The import org.openqa.selenium.remote.RemoteWebDriver statement needs to be added in code for the RemoteWebDriver. ((RemoteWebDriver) driver).setLogLevel(Lev...
[ { "code": null, "e": 1340, "s": 1062, "text": "We can capture browser logs with Selenium. We have to type cast the RemoteWebDriver to driver and then initialize it. Next, we have to use the setLogLevel method. The import org.openqa.selenium.remote.RemoteWebDriver statement needs to be added in code ...
Setting up Sublime Text for C++ Competitive Programming Environment - GeeksforGeeks
01 Feb, 2022 Note: The following steps assume a Windows OS environment. Sublime Text is a text editor for coding. It has a smooth user interface and other exciting features. During the live contest, it is always favorable to compile the program in a local IDE instead of an online IDE’s. In this article, we will discuss...
[ { "code": null, "e": 25683, "s": 25655, "text": "\n01 Feb, 2022" }, { "code": null, "e": 25742, "s": 25683, "text": "Note: The following steps assume a Windows OS environment." }, { "code": null, "e": 25958, "s": 25742, "text": "Sublime Text is a text editor f...
Ruby Date and Time - GeeksforGeeks
06 Sep, 2019 The class Time and Date in Ruby deals with the dates and times. It helps us to get the current time and date according to our system configurations. It also gives us the components of a date and time and also to format time and date.The date is the day of a month or year that is represented by a number. Da...
[ { "code": null, "e": 24877, "s": 24849, "text": "\n06 Sep, 2019" }, { "code": null, "e": 25365, "s": 24877, "text": "The class Time and Date in Ruby deals with the dates and times. It helps us to get the current time and date according to our system configurations. It also gives ...
Different kinds of Doctype available in HTML5 - GeeksforGeeks
02 Nov, 2021 In this article, we will know the Doctype & its types in HTML5. Before learning the different kinds of Doctypes in HTML5, you should be first familiar with the term “Doctype“. When you inspect any website, you may have noticed that before the starting of <html> tag, <!DOCTYPE html> is written. Doctype: A D...
[ { "code": null, "e": 26139, "s": 26111, "text": "\n02 Nov, 2021" }, { "code": null, "e": 26434, "s": 26139, "text": "In this article, we will know the Doctype & its types in HTML5. Before learning the different kinds of Doctypes in HTML5, you should be first familiar with the ter...
Difference Between DAS and SAN - GeeksforGeeks
23 Jun, 2020 1. Directly Attached Storage (DAS) :The storage device which is permanently attached to a desktop computer. DAS is for a single user (Hard drive attached to a computer). It is well suited for a small-to-medium sized business where sufficient amounts of storage can be configured at a low startup cost. The D...
[ { "code": null, "e": 25755, "s": 25727, "text": "\n23 Jun, 2020" }, { "code": null, "e": 26149, "s": 25755, "text": "1. Directly Attached Storage (DAS) :The storage device which is permanently attached to a desktop computer. DAS is for a single user (Hard drive attached to a comp...
Python Program to Rearrange positive and negative numbers in O(n) time and O(1) extra space - GeeksforGeeks
22 Dec, 2021 An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. Number of positive and negative numbers need not be equal. If there are more positive numbers they appear at the end of the array. If there are ...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n22 Dec, 2021" }, { "code": null, "e": 27170, "s": 26041, "text": "An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. ...
Scala List forall() method with example - GeeksforGeeks
29 Jul, 2019 The forall() method is utilized to check if the given predicate satisfies all the elements of the list or not. Method Definition: def forall (p: (a) => Boolean) : Boolean Return Type: It returns true if the stated predicate holds true for all the elements of the list else it returns false. Example #1: // S...
[ { "code": null, "e": 25127, "s": 25099, "text": "\n29 Jul, 2019" }, { "code": null, "e": 25238, "s": 25127, "text": "The forall() method is utilized to check if the given predicate satisfies all the elements of the list or not." }, { "code": null, "e": 25298, "s":...
Switch Statement in C#
22 Apr, 2020 In C#, Switch statement is a multiway branch statement. It provides an efficient way to transfer the execution to different parts of a code based on the value of the expression. The switch expression is of integer type such as int, char, byte, or short, or of an enumeration type, or of string type. The exp...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Apr, 2020" }, { "code": null, "e": 429, "s": 52, "text": "In C#, Switch statement is a multiway branch statement. It provides an efficient way to transfer the execution to different parts of a code based on the value of the expressi...
Top 5 Exceptions in Java with Examples
09 Feb, 2022 An unexpected unwanted event that disturbs the program’s normal execution after getting compiled while running is called an exception. In order to deal with such abrupt execution of the program, exception handling is the expected termination of the program. Illustration: Considering a real-life example Su...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2022" }, { "code": null, "e": 287, "s": 28, "text": "An unexpected unwanted event that disturbs the program’s normal execution after getting compiled while running is called an exception. In order to deal with such abrupt execut...
Hyperparameter tuning using GridSearchCV and KerasClassifier
26 Nov, 2020 Hyperparameter tuning is done to increase the efficiency of a model by tuning the parameters of the neural network. Some scikit-learn APIs like GridSearchCV and RandomizedSearchCV are used to perform hyper parameter tuning. In this article, you’ll learn how to use GridSearchCV to tune Keras Neural Network...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Nov, 2020" }, { "code": null, "e": 253, "s": 28, "text": "Hyperparameter tuning is done to increase the efficiency of a model by tuning the parameters of the neural network. Some scikit-learn APIs like GridSearchCV and RandomizedSear...
OpenShift - Environment Setup
In this chapter, we will learn about the environment setup of OpenShift. In order to set up enterprise OpenShift, one needs to have an active Red Hat account. As OpenShift works on Kubernetes master and node architecture, we need to set up both of them on separate machines, wherein one machine acts as a master and othe...
[ { "code": null, "e": 2155, "s": 2082, "text": "In this chapter, we will learn about the environment setup of OpenShift." }, { "code": null, "e": 2487, "s": 2155, "text": "In order to set up enterprise OpenShift, one needs to have an active Red Hat account. As OpenShift works on K...
Python RegEx
06 Dec, 2020 In Python, one could easily check the presence of a text string within another string. But, in some scenarios, we may not have the exact text to match. For example, what if you want to check whether any valid email address is present. This is where regular expression plays its part. In this section, we exp...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2020" }, { "code": null, "e": 404, "s": 28, "text": "In Python, one could easily check the presence of a text string within another string. But, in some scenarios, we may not have the exact text to match. For example, what if yo...
Python | Swap tuple elements in list of tuples
27 Aug, 2019 While doing competitive programming, one can come across a question in which one requires to work with 2D plane and work with coordinates. One such subproblem can be swapping x, y coordinate elements. Let’s discuss certain ways in which this problem can be solved using tuple element swapping. Method #1 : U...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Aug, 2019" }, { "code": null, "e": 322, "s": 28, "text": "While doing competitive programming, one can come across a question in which one requires to work with 2D plane and work with coordinates. One such subproblem can be swapping ...
FETCH in SQL
19 May, 2021 FETCH is an SQL command used along with ORDER BY clause with an OFFSET(Starting point) to retrieve or fetch selected rows sequentially using a cursor that moves and processes each row one at a time till the number of rows mentioned in the query are displayed. With FETCH the OFFSET clause is mandatory. You ...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 May, 2021" }, { "code": null, "e": 312, "s": 52, "text": "FETCH is an SQL command used along with ORDER BY clause with an OFFSET(Starting point) to retrieve or fetch selected rows sequentially using a cursor that moves and processes...
How to Enable virtualization (VT-x) in Windows 10 BIOS?
29 Oct, 2021 When you install a virtual machine on your system, it is possible that the machine may not start and you may encounter an error telling you that VT-x is disabled (or referencing a problem with AMD-V if you have an AMD CPU). This means that the hardware acceleration settings required by the CPU to support v...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Oct, 2021" }, { "code": null, "e": 460, "s": 52, "text": "When you install a virtual machine on your system, it is possible that the machine may not start and you may encounter an error telling you that VT-x is disabled (or referenc...
Numpy Meshgrid function
23 Sep, 2021 The numpy.meshgrid function is used to create a rectangular grid out of two given one-dimensional arrays representing the Cartesian indexing or Matrix indexing. Meshgrid function is somewhat inspired from MATLAB.Consider the above figure with X-axis ranging from -4 to 4 and Y-axis ranging from -5 to 5. So ...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Sep, 2021" }, { "code": null, "e": 868, "s": 54, "text": "The numpy.meshgrid function is used to create a rectangular grid out of two given one-dimensional arrays representing the Cartesian indexing or Matrix indexing. Meshgrid func...
Check if Table Exists in SQLite using Python
26 Jul, 2021 In this article, we will discuss how to check if a table exists in an SQLite database using the sqlite3 module of Python. In an SQLite database, the names of all the tables are enlisted in the sqlite_master table. So in order to check if a table exists or not we need to check that if the name of the partic...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2021" }, { "code": null, "e": 150, "s": 28, "text": "In this article, we will discuss how to check if a table exists in an SQLite database using the sqlite3 module of Python." }, { "code": null, "e": 384, "s": 15...
Where to put JavaScript in an HTML Document ?
03 Jun, 2022 JavaScript in body or head: Scripts can be placed inside the body or the head section of an HTML page or inside both head and body. JavaScript in head: A JavaScript function is placed inside the head section of an HTML page and the function is invoked when a button is clicked. Examples: <!DOCTYPE html><htm...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jun, 2022" }, { "code": null, "e": 184, "s": 52, "text": "JavaScript in body or head: Scripts can be placed inside the body or the head section of an HTML page or inside both head and body." }, { "code": null, "e": 330, ...
Rust – Operators
15 Dec, 2021 Operators in general are used to perform operations on values and variables. These are standard symbols used for the purpose of logical and arithmetic operations. In this article, we will look into different types of Rust operators. Operators tell the compiler or interpreter to perform a specific mathemati...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Dec, 2021" }, { "code": null, "e": 375, "s": 28, "text": "Operators in general are used to perform operations on values and variables. These are standard symbols used for the purpose of logical and arithmetic operations. In this arti...
Stack and Queue in Python using queue Module
09 May, 2022 A simple python List can act as queue and stack as well. Queue mechanism is used widely and for many purposes in daily life. A queue follows FIFO rule(First In First Out) and is used in programming for sorting and for many more things. Python provides Class queue as a module which has to be generally creat...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 May, 2022" }, { "code": null, "e": 399, "s": 52, "text": "A simple python List can act as queue and stack as well. Queue mechanism is used widely and for many purposes in daily life. A queue follows FIFO rule(First In First Out) and...
numpy.clip() in Python
29 Nov, 2018 numpy.clip() function is used to Clip (limit) the values in an array. Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become 1. Syntax : numpy.clip(a, a_min, a_max,...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 98, "s": 28, "text": "numpy.clip() function is used to Clip (limit) the values in an array." }, { "code": null, "e": 299, "s": 98, "text": "Given an interval, values outside the ...
Maximum value of unsigned char in C++
18 Jan, 2021 In this article, we will discuss the maximum value of unsigned char data type in C++. Some properties of the unsigned char data type are: Being an unsigned data type, it can store only positive values. Unsigned char data type in C++ is used to store 8-bit characters. A maximum value that can be stored in a...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2021" }, { "code": null, "e": 114, "s": 28, "text": "In this article, we will discuss the maximum value of unsigned char data type in C++." }, { "code": null, "e": 166, "s": 114, "text": "Some properties of t...
Profit & Loss - Solved Examples
Q 1 - A vendor bought 6 oranges for Re 10 and sold them at 4 for Re 6. Find his loss or gain percent. A - 8% gain B - 10% gain C - 8% loss D - 10% loss Answer - D Explanation Suppose, number of oranges bought = LCM of 6 and 4 = 12 ∴CP = Re (10/6 * 12) = Re 20 and SP = Re (6/4 * 12) = Re 18 ∴Loss% = (2/20 * 100)% = 10% ...
[ { "code": null, "e": 4128, "s": 4026, "text": "Q 1 - A vendor bought 6 oranges for Re 10 and sold them at 4 for Re 6. Find his loss or gain percent." }, { "code": null, "e": 4140, "s": 4128, "text": "A - 8% gain" }, { "code": null, "e": 4153, "s": 4140, "text"...
Express.js | router.use() Function
17 Jun, 2020 The router.use() function uses the specified middleware function or functions. It basically mounts middleware for the routes which are being served by the specific router. Syntax: router.use( path, function ) Parameters: Path: It is the path to this middleware, like if we can have /user, now this middlewar...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Jun, 2020" }, { "code": null, "e": 225, "s": 53, "text": "The router.use() function uses the specified middleware function or functions. It basically mounts middleware for the routes which are being served by the specific router." ...
Count of buttons pressed in a keypad mobile
15 Jun, 2022 Given a string str, the task is to count how many times the keys will be pressed in total if there is a mobile like below image to form the given string. Examples: Input: str = “abcdef” Output: 12 1 for a, 2 for b, 3 for c, 1 for d, 2 for e and 3 for f Total = 1 + 2 + 3 + 1 + 2 + 3 = 12Input: str = “ss...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jun, 2022" }, { "code": null, "e": 210, "s": 54, "text": "Given a string str, the task is to count how many times the keys will be pressed in total if there is a mobile like below image to form the given string. " }, { "cod...
Rat in a Maze Problem when movement in all possible directions is allowed
08 Jun, 2022 Consider a rat placed at (0, 0) in a square matrix m[ ][ ] of order n and has to reach the destination at (n-1, n-1). The task is to find a sorted array of strings denoting all the possible directions which the rat can take to reach the destination at (n-1, n-1). The directions in which the rat can move ar...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jun, 2022" }, { "code": null, "e": 406, "s": 52, "text": "Consider a rat placed at (0, 0) in a square matrix m[ ][ ] of order n and has to reach the destination at (n-1, n-1). The task is to find a sorted array of strings denoting a...
Java Program 0-1 Knapsack Problem
23 Oct, 2019 Recursive Solution /* A Naive recursive implementation of 0-1 Knapsack problem */class Knapsack { // A utility function that returns maximum of two integers static int max(int a, int b) { return (a > b) ? a : b; } // Returns the maximum value that can // be put in a knapsack of capacity W ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Oct, 2019" }, { "code": null, "e": 47, "s": 28, "text": "Recursive Solution" }, { "code": "/* A Naive recursive implementation of 0-1 Knapsack problem */class Knapsack { // A utility function that returns maximum of two ...
Python - Convert one datatype to another in a Pandas DataFrame
Use the astype() method in Pandas to convert one datatype to another. Import the required library − import pandas as pd Create a DataFrame. Here, we have 2 columns, “Reg_Price” is a float type and “Units” int type − dataFrame = pd.DataFrame( { "Reg_Price": [7000.5057, 1500, 5000, 8000, 9000.75768, 6000], ...
[ { "code": null, "e": 1162, "s": 1062, "text": "Use the astype() method in Pandas to convert one datatype to another. Import the required library −" }, { "code": null, "e": 1182, "s": 1162, "text": "import pandas as pd" }, { "code": null, "e": 1278, "s": 1182, ...
(Obvious) Similarities Between Classes And Structures In Swift Programming Language | by Richmond Alake | Towards Data Science
This article aims to showcase the similarities between Classes and Structures, two different object type within the Swift programming language. You are not required to have substantial experience using Swift to follow the examples and similarities presented in this article. The contents in this article can be used as a...
[ { "code": null, "e": 316, "s": 172, "text": "This article aims to showcase the similarities between Classes and Structures, two different object type within the Swift programming language." }, { "code": null, "e": 447, "s": 316, "text": "You are not required to have substantial e...
Lua - Arrays
Arrays are ordered arrangement of objects, which may be a one-dimensional array containing a collection of rows or a multi-dimensional array containing multiple rows and columns. In Lua, arrays are implemented using indexing tables with integers. The size of an array is not fixed and it can grow based on our requiremen...
[ { "code": null, "e": 2282, "s": 2103, "text": "Arrays are ordered arrangement of objects, which may be a one-dimensional array containing a collection of rows or a multi-dimensional array containing multiple rows and columns." }, { "code": null, "e": 2458, "s": 2282, "text": "In ...
OpenCV - Drawing Polylines
You can draw Polylines on an image using the method polylines() of the imgproc class. Following is the syntax of this method. polylines(img, pts, isClosed, color, thickness) This method accepts the following parameters − mat − A Mat object representing the image on which the Polylines are to be drawn. mat − A Mat obje...
[ { "code": null, "e": 3130, "s": 3004, "text": "You can draw Polylines on an image using the method polylines() of the imgproc class. Following is the syntax of this method." }, { "code": null, "e": 3179, "s": 3130, "text": "polylines(img, pts, isClosed, color, thickness)\n" }, ...
C# Program to Display the Abbreviation of a Text - GeeksforGeeks
24 Oct, 2021 Given a text, we need to display the Abbreviation of the text. An abbreviation is the shortest form of any word or phrase. It contains a group of letters that takes from the full form of the word or phrase. For example, GeeksforGeeks abbreviation is GFG, or the abbreviation of Advance Data Structure is ADS...
[ { "code": null, "e": 24326, "s": 24298, "text": "\n24 Oct, 2021" }, { "code": null, "e": 24636, "s": 24326, "text": "Given a text, we need to display the Abbreviation of the text. An abbreviation is the shortest form of any word or phrase. It contains a group of letters that take...
Postmortem of Artificial Neural Networks using PyTorch | by Asad Mahmood | Towards Data Science
My first interaction with Machine Learning was when I needed to complete an assignment, and I just searched the internet for ways of using Machine learning. I ended up using scikit-learn API for ANNs. I completed the assignment but had literally no idea about what was happening on the backend. So, then I started taking...
[ { "code": null, "e": 562, "s": 172, "text": "My first interaction with Machine Learning was when I needed to complete an assignment, and I just searched the internet for ways of using Machine learning. I ended up using scikit-learn API for ANNs. I completed the assignment but had literally no idea a...
Aptitude - Decimals & Fractions Solved Examples
Q 1 - Which is the following is fraction for 0.36? A - 9/25 B - 51/25 C - 3/400 D - 2081/250 Answer - A Explanation 0.36 = 36/100 = 9/25 Q 2 - Which is the following is fraction for 2.04? A - 9/25 B - 51/25 C - 3/400 D - 2081/250 Answer - B Explanation 2.04 = 204/100 = 51/25 Q 3 - Which is the following is fractio...
[ { "code": null, "e": 3943, "s": 3892, "text": "Q 1 - Which is the following is fraction for 0.36?" }, { "code": null, "e": 3952, "s": 3943, "text": "A - 9/25" }, { "code": null, "e": 3962, "s": 3952, "text": "B - 51/25" }, { "code": null, "e": 3972...
Formalization of a Reinforcement Learning Problem | Towards Data Science
Today we start with the second post in the series “Deep Reinforcement Learning Explained”. As we announced in the first Post, one of this series’s main aspects is its orientation to practice; however, we need some theoretical knowledge before starting coding. In this post, we will explore specific assumptions and abstr...
[ { "code": null, "e": 580, "s": 172, "text": "Today we start with the second post in the series “Deep Reinforcement Learning Explained”. As we announced in the first Post, one of this series’s main aspects is its orientation to practice; however, we need some theoretical knowledge before starting cod...
Difference Between List and Set in Java - GeeksforGeeks
28 Jan, 2021 The List interface allows storing the ordered collection. It is a child interface of Collection. It is an ordered collection of objects in which duplicate values are allowed to store. List preserves the insertion order, it allows positional access and insertion of elements. Declaration: public abstract int...
[ { "code": null, "e": 24882, "s": 24854, "text": "\n28 Jan, 2021" }, { "code": null, "e": 25157, "s": 24882, "text": "The List interface allows storing the ordered collection. It is a child interface of Collection. It is an ordered collection of objects in which duplicate values a...
NLP for Indian Languages. Join me in exploring the need, the... | by Navkiran Singh | Towards Data Science
Chances are if you’re reading this article, you have a decent grasp of English. If you’re from India, it’s also likely that English is not the only language you know. Most Indians are multilingual 💬 and study more than one language in school. However, can you guess the percentage of English speakers in the country? Th...
[ { "code": null, "e": 415, "s": 172, "text": "Chances are if you’re reading this article, you have a decent grasp of English. If you’re from India, it’s also likely that English is not the only language you know. Most Indians are multilingual 💬 and study more than one language in school." }, { ...
What is volatile keyword in C++?
Here we will see what is the meaning of volatile qualifier in C++. The volatile qualifier is applied to a variable when we declare it. It is used to tell the compiler, that the value may change at any time. These are some properties of volatile. The volatile keyword cannot remove the memory assignment. It cannot cache ...
[ { "code": null, "e": 1308, "s": 1062, "text": "Here we will see what is the meaning of volatile qualifier in C++. The volatile qualifier is applied to a variable when we declare it. It is used to tell the compiler, that the value may change at any time. These are some properties of volatile." }, ...
Java methods to convert Double to String
Following are methods available in Java using which you can convert Double value to String − This method returns the String format of the current Double object. To convert Double value to String. Read the required primitive double value in to the Double class reference variable (autoboxing happens). Read the required p...
[ { "code": null, "e": 1155, "s": 1062, "text": "Following are methods available in Java using which you can convert Double value to String −" }, { "code": null, "e": 1258, "s": 1155, "text": "This method returns the String format of the current Double object. To convert Double val...
GATE | GATE-CS-2014-(Set-3) | Question 65
29 Sep, 2021 The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache and 10 nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves 1...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Sep, 2021" }, { "code": null, "e": 654, "s": 52, "text": "The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation ...
HTML | Marquee truespeed attribute
14 Jan, 2022 If the scrolldelay value less then 60 and truespeed mode is on then the value of scrolldelay is not effecting the scrolling. If the scrolldelay value more then 60 and truespeed mode is on then the truespeed is not effecting the scrolling. So, basically it is used to set scrollDelay attribute should be take...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jan, 2022" }, { "code": null, "e": 372, "s": 28, "text": "If the scrolldelay value less then 60 and truespeed mode is on then the value of scrolldelay is not effecting the scrolling. If the scrolldelay value more then 60 and truespee...
Check if each internal node of a BST has exactly one child
17 Jun, 2022 Given Preorder traversal of a BST, check if each non-leaf node has only one child. Assume that the BST contains unique entries. Examples : Chapters descriptions off, selected captions settings, opens captions settings dialog captions off, selected English This is a modal window. Beginning of dialog window....
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2022" }, { "code": null, "e": 182, "s": 54, "text": "Given Preorder traversal of a BST, check if each non-leaf node has only one child. Assume that the BST contains unique entries." }, { "code": null, "e": 193, ...
Implementation of Binary Search Tree in Javascript
14 Sep, 2021 In this article, we would be implementing the Binary Search Tree data structure in Javascript. A tree is a collection of nodes connected by some edges. A tree is a non linear data structure. A Binary Search tree is a binary tree in which nodes that have lesser value are stored on the left while the nodes w...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Sep, 2021" }, { "code": null, "e": 405, "s": 54, "text": "In this article, we would be implementing the Binary Search Tree data structure in Javascript. A tree is a collection of nodes connected by some edges. A tree is a non linear...
Reverse the values of an Object in R Programming – rev() Function
17 Jun, 2020 rev() function in R Language is used to return the reverse version of data objects. The data objects can be defined as Vectors, Data Frames by Columns & by Rows, etc. Syntax: rev(x) Parameter:x: Data object Returns: Reverse of the data object passed Example 1: # R program to reverse a vector # Create a ve...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2020" }, { "code": null, "e": 195, "s": 28, "text": "rev() function in R Language is used to return the reverse version of data objects. The data objects can be defined as Vectors, Data Frames by Columns & by Rows, etc." }, ...
C/C++ Pointers vs Java References
08 May, 2017 Java doesn’t have pointers; Java has references.Reference: A reference is a variable that refers to something else and can be used as an alias for that something else.Pointer: A pointer is a variable that stores a memory address, for the purpose of acting as an alias to what is stored at that address.So, a...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 May, 2017" }, { "code": null, "e": 602, "s": 52, "text": "Java doesn’t have pointers; Java has references.Reference: A reference is a variable that refers to something else and can be used as an alias for that something else.Pointer...
Software Engineering | Slicing
16 Feb, 2022 Slicing or program slicing is a technique used in software testing which takes a slice or a group of program statements in the program for testing particular test conditions or cases that may affect a value at a particular point of interest. It can also be used for the purpose of debugging in order to find...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Feb, 2022" }, { "code": null, "e": 700, "s": 28, "text": "Slicing or program slicing is a technique used in software testing which takes a slice or a group of program statements in the program for testing particular test conditions o...
Python program to read file word by word
29 Dec, 2020 Prerequisites: File Handling in Python Given a text file and the task is to read the information from file word by word in Python. Examples: Input:I am R2J!Output:IamR2J! Input:Geeks 4 GeeksAnd in that dream, we were flying.Output:Geeks4GeeksAndinthatdream,wewereflying. Approach: Open a file in read mode w...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Dec, 2020" }, { "code": null, "e": 91, "s": 52, "text": "Prerequisites: File Handling in Python" }, { "code": null, "e": 183, "s": 91, "text": "Given a text file and the task is to read the information from file ...
Program for Conway’s Game Of Life | Set 2
17 Jun, 2022 Given a binary grid[ ][ ] of size N*M, with each cell containing either 0 or 1, where 1 represents an alive cell and the 0 represents a dead cell. The task is to generate the next generation of cells based on the following rules: Any live cell with fewer than two live neighbors dies due to under-populati...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2022" }, { "code": null, "e": 286, "s": 54, "text": "Given a binary grid[ ][ ] of size N*M, with each cell containing either 0 or 1, where 1 represents an alive cell and the 0 represents a dead cell. The task is to generate the...
Different ways of sorting Dictionary by Values and Reverse sorting by values
10 Nov, 2020 Prerequisite: Dictionaries in Python A dictionary is a collection which is unordered, changeable, and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values. We can access the values of the dictionary using keys. In this article, 10 different ways of sorting the Pyt...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Nov, 2020" }, { "code": null, "e": 65, "s": 28, "text": "Prerequisite: Dictionaries in Python" }, { "code": null, "e": 410, "s": 65, "text": "A dictionary is a collection which is unordered, changeable, and indexe...
How to Copy an Array into Another Array in Golang? - GeeksforGeeks
26 Aug, 2019 Arrays in Golang or Go programming language is much similar to other programming languages. In the program, sometimes we need to store a collection of data of the same type, like a list of student marks. Such type of collection is stored in a program using an Array. An array is a fixed-length sequence whic...
[ { "code": null, "e": 25004, "s": 24976, "text": "\n26 Aug, 2019" }, { "code": null, "e": 25906, "s": 25004, "text": "Arrays in Golang or Go programming language is much similar to other programming languages. In the program, sometimes we need to store a collection of data of the ...
Amazon Interview Experience (On-Campus) - GeeksforGeeks
11 May, 2021 Round 1: In the first round I was asked 2 coding questions https://www.geeksforgeeks.org/maximum-size-sub-matrix-with-all-1s-in-a-binary-matrix/https://www.geeksforgeeks.org/find-the-next-lexicographically-greater-word-than-a-given-word/ https://www.geeksforgeeks.org/maximum-size-sub-matrix-with-all-1s-in...
[ { "code": null, "e": 25140, "s": 25112, "text": "\n11 May, 2021" }, { "code": null, "e": 25200, "s": 25140, "text": "Round 1: In the first round I was asked 2 coding questions " }, { "code": null, "e": 25379, "s": 25200, "text": "https://www.geeksforgeeks.org/...
Regression Analysis in R Programming - GeeksforGeeks
29 Nov, 2021 In statistics, Logistic Regression is a model that takes response variables (dependent variable) and features (independent variables) to determine the estimated probability of an event. A logistic model is used when the response variable has categorical values such as 0 or 1. For example, a student will pa...
[ { "code": null, "e": 26495, "s": 26467, "text": "\n29 Nov, 2021" }, { "code": null, "e": 26996, "s": 26495, "text": "In statistics, Logistic Regression is a model that takes response variables (dependent variable) and features (independent variables) to determine the estimated pr...
Go - Structures
Go arrays allow you to define variables that can hold several data items of the same kind. Structure is another user-defined data type available in Go programming, which allows you to combine data items of different kinds. Structures are used to represent a record. Suppose you want to keep track of the books in a libra...
[ { "code": null, "e": 2160, "s": 1937, "text": "Go arrays allow you to define variables that can hold several data items of the same kind. Structure is another user-defined data type available in Go programming, which allows you to combine data items of different kinds." }, { "code": null, ...
How to make an image draggable in HTML5 ? - GeeksforGeeks
19 Aug, 2021 Drag and drop is a very common and widely used feature in a modern-day website. It simply means to drag an image with the cursor and drop it to any other place. In this article, we are going to learn how to make an image draggable using HTML 5. Making any HTML5 elements including images draggable is quite ...
[ { "code": null, "e": 24814, "s": 24786, "text": "\n19 Aug, 2021" }, { "code": null, "e": 25059, "s": 24814, "text": "Drag and drop is a very common and widely used feature in a modern-day website. It simply means to drag an image with the cursor and drop it to any other place. In...
How to count the total number of links in a page in Selenium?
The total number of links in a page can be counted with the help of findElements() method. The logic is to return a list of web elements with tagname anchor, then getting the size of that list. Code Implementation import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; impo...
[ { "code": null, "e": 1256, "s": 1062, "text": "The total number of links in a page can be counted with the help of findElements() method. The logic is to return a list of web elements with tagname anchor, then getting the size of that list." }, { "code": null, "e": 1276, "s": 1256, ...
Daemon thread in Java
A Daemon thread is a background service thread which runs as a low priority thread and performs background operations like garbage collection. JVM exits if only daemon threads are remaining. The setDaemon() method of the Thread class is used to mark/set a particular thread as either a daemon thread or a user thread. Th...
[ { "code": null, "e": 1253, "s": 1062, "text": "A Daemon thread is a background service thread which runs as a low priority thread and performs background operations like garbage collection. JVM exits if only daemon threads are remaining." }, { "code": null, "e": 1522, "s": 1253, ...
Compute modulus division by a power-of-2-number - GeeksforGeeks
14 Mar, 2022 Compute n modulo d without division(/) and modulo(%) operators, where d is a power of 2 number. Let ith bit from right is set in d. For getting n modulus d, we just need to return 0 to i-1 (from right) bits of n as they are and other bits as 0.For example if n = 6 (00..110) and d = 4(00..100). Last set bit...
[ { "code": null, "e": 26205, "s": 26177, "text": "\n14 Mar, 2022" }, { "code": null, "e": 26737, "s": 26205, "text": "Compute n modulo d without division(/) and modulo(%) operators, where d is a power of 2 number. Let ith bit from right is set in d. For getting n modulus d, we jus...
How to get the list of column headers from a Pandas DataFrame?
To get a list of Pandas DataFrame column headers, we can use df.columns.values. Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df. Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df. Print the input DataFrame. Print the input DataFrame. Print the list of ...
[ { "code": null, "e": 1142, "s": 1062, "text": "To get a list of Pandas DataFrame column headers, we can use df.columns.values." }, { "code": null, "e": 1226, "s": 1142, "text": "Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df." }, { "cod...
How To Delete Columns From PySpark DataFrames | Towards Data Science
Dropping columns from DataFrames is one of the most commonly performed tasks in PySpark. In today’s short guide, we’ll explore a few different ways for deleting columns from a PySpark DataFrame. Specifically, we’ll discuss how to delete a single column drop multiple columns reverse the operation and instead, select the...
[ { "code": null, "e": 402, "s": 172, "text": "Dropping columns from DataFrames is one of the most commonly performed tasks in PySpark. In today’s short guide, we’ll explore a few different ways for deleting columns from a PySpark DataFrame. Specifically, we’ll discuss how to" }, { "code": nul...
Android - Shared Preferences
Android provides many ways of storing data of an application. One of this way is called Shared Preferences. Shared Preferences allow you to save and retrieve data in the form of key,value pair. In order to use shared preferences, you have to call a method getSharedPreferences() that returns a SharedPreference instance ...
[ { "code": null, "e": 3801, "s": 3607, "text": "Android provides many ways of storing data of an application. One of this way is called Shared Preferences. Shared Preferences allow you to save and retrieve data in the form of key,value pair." }, { "code": null, "e": 3989, "s": 3801, ...
VBScript DateSerial Function
It is a function that returns a date for the specified day, month and year parameters. DateSerial(year,month,day) year, a Required Parameter. A number between 100 and 9999 or a numeric expression. Values between 0 and 99 are interpreted as the years 1900 to 1999. For all other year arguments, use a complete four-digit...
[ { "code": null, "e": 2167, "s": 2080, "text": "It is a function that returns a date for the specified day, month and year parameters." }, { "code": null, "e": 2195, "s": 2167, "text": "DateSerial(year,month,day)\n" }, { "code": null, "e": 2407, "s": 2195, "tex...
How to get programmatically android version number?
This example demonstrates How to get programmatically android version number. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "utf-8"?> <Line...
[ { "code": null, "e": 1140, "s": 1062, "text": "This example demonstrates How to get programmatically android version number." }, { "code": null, "e": 1269, "s": 1140, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ...
C library function - abort()
The C library function void abort(void) abort the program execution and comes out directly from the place of the call. Following is the declaration for abort() function. void abort(void) NA NA This function does not return any value. The following example shows the usage of abort() function. #include <stdio.h> #include...
[ { "code": null, "e": 2126, "s": 2007, "text": "The C library function void abort(void) abort the program execution and comes out directly from the place of the call." }, { "code": null, "e": 2177, "s": 2126, "text": "Following is the declaration for abort() function." }, { ...
Convert the case of every value in a MySQL Column to uppercase
For this, use UPPER() on MySQL column. Let us first create a table − mysql> create table DemoTable627 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,FirstName varchar(100)); Query OK, 0 rows affected (0.62 sec) Insert some records in the table using insert command − mysql> insert into DemoTable627(FirstName) values(UPPER(...
[ { "code": null, "e": 1131, "s": 1062, "text": "For this, use UPPER() on MySQL column. Let us first create a table −" }, { "code": null, "e": 1270, "s": 1131, "text": "mysql> create table DemoTable627 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,FirstName varchar(100));\nQuery OK, ...
How to Fix int cannot be dereferenced Error in Java? - GeeksforGeeks
10 Jan, 2022 Here, we will follow the below-mentioned points to understand and eradicate the error alongside checking the outputs with minor tweaks in our sample code Introduction about the error with example Explanation of dereferencing in detail Finally, how to fix the issue with Example code and output. If You Got t...
[ { "code": null, "e": 23894, "s": 23866, "text": "\n10 Jan, 2022" }, { "code": null, "e": 24048, "s": 23894, "text": "Here, we will follow the below-mentioned points to understand and eradicate the error alongside checking the outputs with minor tweaks in our sample code" }, {...
Setting Font Size with Em Using CSS
For scalable size of text, the font-size is expressed in em. Bye default one em is equal to 16px or 12pt. Its value is relative to the parent element’s font-size. The syntax of CSS font-size property is as follows − Selector { font-size: /*value*/ } The following examples illustrate how CSS font-size property can be...
[ { "code": null, "e": 1225, "s": 1062, "text": "For scalable size of text, the font-size is expressed in em. Bye default one em is equal to 16px or 12pt. Its value is relative to the parent element’s font-size." }, { "code": null, "e": 1278, "s": 1225, "text": "The syntax of CSS f...
How to Host Multiple Websites with Apache Virtual Hosts | by Shinichi Okada | Towards Data Science
Apache’s virtual hosts can run multiple websites on a single server. In this article, you will learn how to host multiple websites including sub-domains. My Ubuntu 20.04 server has some files in the /etc/apache2/sites-available directory. We will create more files in this directory to create multiple virtual hosts. $ l...
[ { "code": null, "e": 326, "s": 172, "text": "Apache’s virtual hosts can run multiple websites on a single server. In this article, you will learn how to host multiple websites including sub-domains." }, { "code": null, "e": 489, "s": 326, "text": "My Ubuntu 20.04 server has some ...
Cypress - Basic Commands
Cypress basic commands are listed below − It is used to create an assertion and is an alias of .should (). The usage is as follows − //element is visible & enabled cy.get('#txt').should('be.visible').and('be.enabled') //element is checked cy.contains('Subject').and('be.checked') It provides an alias for later usage. T...
[ { "code": null, "e": 2539, "s": 2497, "text": "Cypress basic commands are listed below −" }, { "code": null, "e": 2604, "s": 2539, "text": "It is used to create an assertion and is an alias of .should ()." }, { "code": null, "e": 2630, "s": 2604, "text": "The ...
Arduino - Arithmetic Operators
Assume variable A holds 10 and variable B holds 20 then − void loop () { int a = 9,b = 4,c; c = a + b; c = a - b; c = a * b; c = a / b; c = a % b; } a + b = 13 a - b = 5 a * b = 36 a / b = 2 Remainder when a divided by b = 1 65 Lectures 6.5 hours Amit Rana 43 Lectures 3 hours...
[ { "code": null, "e": 2928, "s": 2870, "text": "Assume variable A holds 10 and variable B holds 20 then −" }, { "code": null, "e": 3037, "s": 2928, "text": "void loop () {\n int a = 9,b = 4,c;\n c = a + b;\n c = a - b;\n c = a * b;\n c = a / b;\n c = a % b;\n}" }, ...
Binary Tree Level Order Traversal in C++
Suppose we have a binary tree. We have to traverse this tree using the level order traversal scheme. So if the tree is like The traversal sequence will be like − [10, 5, 16, 8, 15, 20, 23] To solve this, we will follow these steps − define queue que to store nodes insert root into the que. while que is not empty, doite...
[ { "code": null, "e": 1186, "s": 1062, "text": "Suppose we have a binary tree. We have to traverse this tree using the level order traversal scheme. So if the tree is like" }, { "code": null, "e": 1251, "s": 1186, "text": "The traversal sequence will be like − [10, 5, 16, 8, 15, 2...
How to add White Gaussian Noise to Signal using MATLAB ?
16 Aug, 2021 In this article, we are going to discuss the addition of “White Gaussian Noise” to signals like sine, cosine, and square wave using MATLAB. The white Gaussian noise can be added to the signals using MATLAB/GNU-Octave inbuilt function awgn(). Here, “AWGN” stands for “Additive White Gaussian Noise”. AWGN is ...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Aug, 2021" }, { "code": null, "e": 353, "s": 54, "text": "In this article, we are going to discuss the addition of “White Gaussian Noise” to signals like sine, cosine, and square wave using MATLAB. The white Gaussian noise can be ad...
GATE-CS-2016 (Set 1) - GeeksforGeeks
11 Oct, 2021 I P always beats Q II. R always beats S III. S loses to P only sometimes IV. R always loses to Q (i) P is likely to beat all the three other players (ii) S is the absolute worst player in the set f(x) = 2x7 + 3x - 5 = 2x7 - 2x + 5x - 5 For exponential dependence we must have functions of form f...
[ { "code": null, "e": 29498, "s": 29470, "text": "\n11 Oct, 2021" }, { "code": null, "e": 29601, "s": 29498, "text": "I P always beats Q\nII. R always beats S\nIII. S loses to P only sometimes\nIV. R always loses to Q " }, { "code": null, "e": 29701, "s": 2960...
Python | Text to Speech by using pyttsx3
18 Apr, 2022 pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline and is compatible with both Python 2 and 3. An application invokes the pyttsx3.init() factory function to get a reference to a pyttsx3. Engine instance. it is a very easy to use tool which converts the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Apr, 2022" }, { "code": null, "e": 537, "s": 52, "text": "pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline and is compatible with both Python 2 and 3. An application invokes th...
Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
10 Dec, 2018 Java’s Linked list class offers a function that allows a “Queue Based” working called poll(). This function not only returns deletes the first element, but also displays them while being deleted and hence can have a lot of usage in daily life problems and competitive programming as well. There are 3 varian...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Dec, 2018" }, { "code": null, "e": 498, "s": 52, "text": "Java’s Linked list class offers a function that allows a “Queue Based” working called poll(). This function not only returns deletes the first element, but also displays them...