title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
TimeSpan.FromSeconds() Method in C# | 30 Sep, 2019
This method is used to get a TimeSpan that represents a specified number of seconds, accurate to the nearest millisecond.
Syntax: public static TimeSpan FromSeconds (double value);
Parameter:value: This parameter specifies the number of seconds, accurate to the nearest millisecond..
Return Value: It return... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 150,
"s": 28,
"text": "This method is used to get a TimeSpan that represents a specified number of seconds, accurate to the nearest millisecond."
},
{
"code": null,
"e": 209,
"s": 15... |
Execute both if and else statements in C/C++ simultaneously | 06 Jan, 2021
Write a C/C++ program that executes both if-else block statements simultaneously.
Syntax of if-else statement in C/C++ language is:
if (Boolean expression)
{
// Statement will execute only
// if Boolean expression is true
}
else
{
// Statement will execute only if
// the Boolean expressi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jan, 2021"
},
{
"code": null,
"e": 135,
"s": 52,
"text": "Write a C/C++ program that executes both if-else block statements simultaneously. "
},
{
"code": null,
"e": 374,
"s": 135,
"text": "Syntax of if-else stat... |
numpy.irr() in Python | 23 Aug, 2021
numpy.irr(values) : This financial function helps user to compute IRR Value i.e. Internal Rate of Return ie. “average” periodically compounded rate of return.
Parameters : values : [array-like] Input cash flows per time period. net “deposits” are negative and net “withdrawals” are positiveReturn : Inter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 188,
"s": 28,
"text": "numpy.irr(values) : This financial function helps user to compute IRR Value i.e. Internal Rate of Return ie. “average” periodically compounded rate of return. "
},
{
"... |
Lodash _.mapKeys() Method | 13 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.mapKeys() method is used to create an object with the same values as the object and the keys created by running each of the object’s own enumerable string keys.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": null,
"e"... |
Using Fused Location API to Fetch Current Location in Android | 25 Aug, 2021
Using Fused Location API to Retrieve Current Location Have you ever seen the movement of taxis on the roads while on their way to your location after booking an Uber cab? There are several apps that make use of some form of location service. The ability to use GPS to update the position is a pretty nice fe... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 627,
"s": 53,
"text": "Using Fused Location API to Retrieve Current Location Have you ever seen the movement of taxis on the roads while on their way to your location after booking an Uber cab? The... |
Immutable List in Java | 11 Dec, 2018
ImmutableList, as suggested by the name, is a type of List which is immutable. It means that the content of the List are fixed or constant after declaration, that is, they are read-only.
If any attempt made to add, delete and update elements in the List, UnsupportedOperationException is thrown.
An Immutabl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 241,
"s": 54,
"text": "ImmutableList, as suggested by the name, is a type of List which is immutable. It means that the content of the List are fixed or constant after declaration, that is, they ar... |
Feedback form using Pugjs, Node.js, MongoDB, Express - GeeksforGeeks | 07 Oct, 2021
We can create a feedback form using PugJs, NodeJS, MongoDB, Express with the following steps. A feedback form takes the input from the user and sends the data to the server to process it and store it accordingly into the database.
Step 1: Create a feedback_form named folder in any directory. You can take a... | [
{
"code": null,
"e": 26055,
"s": 26027,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 26286,
"s": 26055,
"text": "We can create a feedback form using PugJs, NodeJS, MongoDB, Express with the following steps. A feedback form takes the input from the user and sends the data to t... |
HTTP - Methods | The set of common methods for HTTP/1.1 is defined below and this set can be expanded based on requirements. These method names are case sensitive and they must be used in uppercase.
The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and ... | [
{
"code": null,
"e": 1961,
"s": 1779,
"text": "The set of common methods for HTTP/1.1 is defined below and this set can be expanded based on requirements. These method names are case sensitive and they must be used in uppercase."
},
{
"code": null,
"e": 2140,
"s": 1961,
"text": "... |
Remove duplicates from an unsorted linked list | Practice | GeeksforGeeks | Given an unsorted linked list of N nodes. The task is to remove duplicate elements from this unsorted Linked List. When a value appears in multiple nodes, the node which appeared first should be kept, all others duplicates are to be removed.
Example 1:
Input:
N = 4
value[] = {5,2,2,4}
Output: 5 2 4
Explanation:Given li... | [
{
"code": null,
"e": 480,
"s": 238,
"text": "Given an unsorted linked list of N nodes. The task is to remove duplicate elements from this unsorted Linked List. When a value appears in multiple nodes, the node which appeared first should be kept, all others duplicates are to be removed."
},
{
... |
How to use Do Until Loop in Excel VBA? - GeeksforGeeks | 28 Jul, 2021
In this article, we are going to see look into the Do Until loop in Excel VBA using a suitable example.
In the Microsoft Excel tabs, select the Developer Tab. Initially, the Developer Tab may not be available.
The Developer Tab can be enabled easily by a two-step process :
Right-click on any of the existi... | [
{
"code": null,
"e": 26399,
"s": 26371,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 26503,
"s": 26399,
"text": "In this article, we are going to see look into the Do Until loop in Excel VBA using a suitable example."
},
{
"code": null,
"e": 26610,
"s": 26503,... |
C - Expressions and Statements - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to learn about... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
How to copy a file, group of files, or directory in Linux? | In this article, we will learn to copy a file or directory in the Linux/Unix operating system using terminal, we use the cp command to copy a file or directory in the Linux system.
cp (copy) - The cp command is used to copy files or directories in the Linux system. If we want to copy a file from a source directory and ... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "In this article, we will learn to copy a file or directory in the Linux/Unix operating system using terminal, we use the cp command to copy a file or directory in the Linux system."
},
{
"code": null,
"e": 1608,
"s": 1243,
"text": "c... |
Android | How to open Camera through Intent and display captured image - GeeksforGeeks | 20 Nov, 2021
Pre-requisites:
Android App Development Fundamentals for Beginners
Guide to Install and Set up Android Studio
Android | Starting with first app/android project
Android | Running your first Android app
The purpose of this article is to show how to open Camera from inside an App and click the image and ... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n20 Nov, 2021"
},
{
"code": null,
"e": 23885,
"s": 23868,
"text": "Pre-requisites: "
},
{
"code": null,
"e": 23937,
"s": 23885,
"text": "Android App Development Fundamentals for Beginners "
},
{
"code":... |
Query BinData by Type in MongoDB | To query by type, use subtype() in MongoDB. Let us create a collection with documents −
> db.demo249.insertOne({ "_id" : BinData(0,"AQAAAAEBAAVlbl9VSwAAAAAAAAhv") });
{
"acknowledged" : true,
"insertedId" : BinData(0,"AQAAAAEBAAVlbl9VSwAAAAAAAAhv")
}
> db.demo249.insertOne({"_id" : BinData(4,"CNDF66qIlCY92q1vFAAA... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To query by type, use subtype() in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1644,
"s": 1150,
"text": "> db.demo249.insertOne({ \"_id\" : BinData(0,\"AQAAAAEBAAVlbl9VSwAAAAAAAAhv\") });\n{\n \"ac... |
Git - Rename Operation | Till now, both Tom and Jerry were using manual commands to compile their project. Now, Jerry decides to create Makefile for their project and also give a proper name to the file “string.c”.
[jerry@CentOS project]$ pwd
/home/jerry/jerry_repo/project
[jerry@CentOS project]$ ls
README src
[jerry@CentOS project]$ cd src/... | [
{
"code": null,
"e": 2235,
"s": 2045,
"text": "Till now, both Tom and Jerry were using manual commands to compile their project. Now, Jerry decides to create Makefile for their project and also give a proper name to the file “string.c”."
},
{
"code": null,
"e": 2542,
"s": 2235,
"... |
MySQL - CURTIME() Function | The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the specified time. MySQL provides a set of functions to manipulate the... | [
{
"code": null,
"e": 2664,
"s": 2333,
"text": "The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the ... |
Java Program to Insert Details in a Table using JDBC - GeeksforGeeks | 13 Jul, 2021
Java Database Connectivity is basically a standard API(application interface) between the java programming language and various databases like Oracle, SQL, Postgress, SQL, etc. It connects the front end(for interacting with the users ) with the backend( for storing data).
Algorithm: Search/ Insert/ Delete/... | [
{
"code": null,
"e": 24746,
"s": 24718,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 25019,
"s": 24746,
"text": "Java Database Connectivity is basically a standard API(application interface) between the java programming language and various databases like Oracle, SQL, Postgre... |
How to interface Arduino with a GSM Module and ping to a website? | In this article, we will see how to interface Arduino with a GSM Module, and ping to a website.You will need the following −
An Arduino board
An Arduino board
A GSM Module (SIM800C, SIM900A, are popular examples, but you can have any
other module as well)
A GSM Module (SIM800C, SIM900A, are popular examples, but you ca... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "In this article, we will see how to interface Arduino with a GSM Module, and ping to a website.You will need the following −"
},
{
"code": null,
"e": 1204,
"s": 1187,
"text": "An Arduino board"
},
{
"code": null,
"e": 122... |
CSS Transitions | CSS transitions allows you to change property values smoothly, over a given duration.
Mouse over the element below to see a CSS transition effect:
In this chapter you will learn about the following properties:
transition
transition-delay
transition-duration
transition-property
transition-timing-function
The numbers in ... | [
{
"code": null,
"e": 86,
"s": 0,
"text": "CSS transitions allows you to change property values smoothly, over a given duration."
},
{
"code": null,
"e": 147,
"s": 86,
"text": "Mouse over the element below to see a CSS transition effect:"
},
{
"code": null,
"e": 210,
... |
GridView Using Custom ArrayAdapter in Android with Example - GeeksforGeeks | 11 Apr, 2022
This article will be building an application to demonstrate the use of CustomArrayAdapters in GridView. GridViews are view containers that display views in two-dimensional (rows and columns) they are used in my android applications one simple example would be the gallery app. The adapter connects the UI el... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 25660,
"s": 25116,
"text": "This article will be building an application to demonstrate the use of CustomArrayAdapters in GridView. GridViews are view containers that display views in two-dim... |
How can I write an SQL IN query with a Python tuple? | To write an SQL in query, you need to ensure that you provide the placeholders in the query using so that the query is properly escaped. For example,
my_tuple = ("Hello", "world", "John")
placeholder= '?'
placeholders= ', '.join(placeholder for _ in my_tuple)
query= 'SELECT name FROM students WHERE id IN (%s)' % place... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "To write an SQL in query, you need to ensure that you provide the placeholders in the query using so that the query is properly escaped. For example,"
},
{
"code": null,
"e": 1403,
"s": 1213,
"text": "my_tuple = (\"Hello\", \"world\... |
Opening Existing Excel sheet in Java using Apache POI - GeeksforGeeks | 21 Jan, 2021
Apache POI is a powerful API by which one can read, write and modify any Microsoft document like powerpoint, world, or excel. Apache POI have different classes and method to work upon different MS Office Document.
POIFS –It’s Stand for “Poor Obfuscation Implementation File System”. This component is the b... | [
{
"code": null,
"e": 23979,
"s": 23951,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 24194,
"s": 23979,
"text": "Apache POI is a powerful API by which one can read, write and modify any Microsoft document like powerpoint, world, or excel. Apache POI have different classes and... |
unordered_map insert in C++ STL - GeeksforGeeks | 19 Dec, 2018
The unordered_map::insert() is a built-in function in C++ STL which is used to insert elements with a particular key in the unordered_map container. This function increases container size by 1. This function does not insert duplicate entries. There are following variant of this function. All are overloaded... | [
{
"code": null,
"e": 24149,
"s": 24121,
"text": "\n19 Dec, 2018"
},
{
"code": null,
"e": 24477,
"s": 24149,
"text": "The unordered_map::insert() is a built-in function in C++ STL which is used to insert elements with a particular key in the unordered_map container. This function ... |
Check if an array is Wave Array - GeeksforGeeks | 01 Apr, 2021
Given an array of N positive integers. The task is to check if the array is sorted in wave form.Examples:
Input: arr[] = {1, 2, 3, 4, 5}
Output: NO
Input: arr[] = {1, 5, 3, 7, 2, 8, 6}
Output: YES
Approach:
First check the element at index 1, i.e, A[1] and observe the pattern.
If arr[1] is greater t... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 24539,
"s": 24431,
"text": "Given an array of N positive integers. The task is to check if the array is sorted in wave form.Examples: "
},
{
"code": null,
"e": 24631,
"s": 24... |
D3.js - Requests API | D3.js provides a request API to perform the XMLHttpRequest. This chapter explains the various requests API in detail.
XMLHttpRequest is the built-in http client to emulate the browser XMLHttpRequest object. It can be used with JS designed for browsers to improve reuse of code and allow the use of existing libraries.
Yo... | [
{
"code": null,
"e": 2248,
"s": 2130,
"text": "D3.js provides a request API to perform the XMLHttpRequest. This chapter explains the various requests API in detail."
},
{
"code": null,
"e": 2448,
"s": 2248,
"text": "XMLHttpRequest is the built-in http client to emulate the browse... |
Built-in javascript constructors? | Javascript has provided some built-in constructors. Those built-in functions include object(), string(), number, etc. We cannot include Math object in those built-in constructors because Math is a global object. The 'new' keyword cannot be used with Math.
In the following example, many built-in constructors were used a... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "Javascript has provided some built-in constructors. Those built-in functions include object(), string(), number, etc. We cannot include Math object in those built-in constructors because Math is a global object. The 'new' keyword cannot be used with Mat... |
BigQuery + Cloud Functions: how to run your queries as soon as a new Google Analytics table is available | by Marieke Pots | Towards Data Science | If you have your Google Analytics view linked to BigQuery, you are probably enjoying the advantages it brings. There is no sampling in your data, you can bring in third-party data, you have more control over your data and much more.
But, there was one thing bothering me. And maybe it is bothering you too. The exact tim... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "If you have your Google Analytics view linked to BigQuery, you are probably enjoying the advantages it brings. There is no sampling in your data, you can bring in third-party data, you have more control over your data and much more."
},
{
"code": ... |
How to submit an HTML form using JavaScript? | To submit an HTML form using JavaScript, we are calling validate() to validate data when the onsubmit event is occurring.
You can try to run the following code to submit an HTML form −
<html>
<head>
<title>Form Validation</title>
<script>
// Form validation
function validate() {
... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "To submit an HTML form using JavaScript, we are calling validate() to validate data when the onsubmit event is occurring."
},
{
"code": null,
"e": 1247,
"s": 1184,
"text": "You can try to run the following code to submit an HTML form... |
How to get the readonly files using Get-ChildItem in PowerShell? | To get the Readonly files with Get-ChildItem in PowerShell, you need to use the –Readonly files. Readonly file has attribute ‘r’.
In the below example, you can check the attribute of the file.
Get-ChildItem D:\Temp\ -ReadOnly
PS C:\WINDOWS\system32> Get-ChildItem D:\Temp\* -ReadOnly
Directory: D:\Temp
Mode ... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "To get the Readonly files with Get-ChildItem in PowerShell, you need to use the –Readonly files. Readonly file has attribute ‘r’."
},
{
"code": null,
"e": 1255,
"s": 1192,
"text": "In the below example, you can check the attribute of... |
Split Command in Linux with Examples - GeeksforGeeks | 17 May, 2020
Split command in Linux is used to split large files into smaller files. It splits the files into 1000 lines per file(by default) and even allows users to change the number of lines as per requirement.
The names of the files are PREFIXaa, PREFIXab, PREFIXac, and so on. By default the PREFIX of files name is... | [
{
"code": null,
"e": 23641,
"s": 23613,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 23842,
"s": 23641,
"text": "Split command in Linux is used to split large files into smaller files. It splits the files into 1000 lines per file(by default) and even allows users to change th... |
How to extract numbers from a string using regular expressions? | You can match numbers in the given string using either of the following regular expressions −
“\\d+”
Or,
"([0-9]+)"
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ExtractingDigits {
public static void main(String[] args) {
Scanner sc = new Scanner(System.... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "You can match numbers in the given string using either of the following regular expressions −"
},
{
"code": null,
"e": 1178,
"s": 1156,
"text": "“\\\\d+”\nOr,\n\"([0-9]+)\""
},
{
"code": null,
"e": 1873,
"s": 1178,
... |
Getting Started Unit Testing with Pytest — PART 2 | by Ben Bogart | Towards Data Science | Last week I wrote about getting started with unit tests. We covered basic assertion testing, parameterization, fixtures, and most importantly, how tests save you time so you can get more done or spend more time with your family — your choice. This article starts where that one left off, so if you need a refresher, here... | [
{
"code": null,
"e": 510,
"s": 172,
"text": "Last week I wrote about getting started with unit tests. We covered basic assertion testing, parameterization, fixtures, and most importantly, how tests save you time so you can get more done or spend more time with your family — your choice. This article... |
Dart - Streams - GeeksforGeeks | 17 Sep, 2021
A Stream is a sequence of asynchronous events. It is like an asynchronous Iterable—where, instead of getting the next event when you ask for it, the stream tells you that there is an event when it is ready.
In other words, streams are a source of asynchronous events delivered sequentially. There are data ... | [
{
"code": null,
"e": 24421,
"s": 24393,
"text": "\n17 Sep, 2021"
},
{
"code": null,
"e": 24629,
"s": 24421,
"text": "A Stream is a sequence of asynchronous events. It is like an asynchronous Iterable—where, instead of getting the next event when you ask for it, the stream tells y... |
Arduino - Reading Analog Voltage | This example will show you how to read an analog input on analog pin 0. The input is converted from analogRead() into voltage, and printed out to the serial monitor of the Arduino Software (IDE).
You will need the following components −
1 × Breadboard
1 × Arduino Uno R3
1 × 5K variable resistor (potentiometer)
2 × Jump... | [
{
"code": null,
"e": 3066,
"s": 2870,
"text": "This example will show you how to read an analog input on analog pin 0. The input is converted from analogRead() into voltage, and printed out to the serial monitor of the Arduino Software (IDE)."
},
{
"code": null,
"e": 3107,
"s": 3066,... |
Python - Tkinter LabelFrame | A labelframe is a simple container widget. Its primary purpose is to act as a spacer or container for complex window layouts.
This widget has the features of a frame plus the ability to display a label.
Here is the simple syntax to create this widget −
w = LabelFrame( master, option, ... )
master − This represents the... | [
{
"code": null,
"e": 2370,
"s": 2244,
"text": "A labelframe is a simple container widget. Its primary purpose is to act as a spacer or container for complex window layouts."
},
{
"code": null,
"e": 2447,
"s": 2370,
"text": "This widget has the features of a frame plus the ability... |
Tryit Editor v3.7 | Tryit: JavaScript not supported | [] |
C++ While Loop | Loops can execute a block of code as long as a specified condition is reached.
Loops are handy because they save time, reduce errors, and they make code more readable.
The while loop loops through a block of code as long as a specified condition is true:
In the example below, the code in the loop will run, over and ove... | [
{
"code": null,
"e": 79,
"s": 0,
"text": "Loops can execute a block of code as long as a specified condition is reached."
},
{
"code": null,
"e": 168,
"s": 79,
"text": "Loops are handy because they save time, reduce errors, and they make code more readable."
},
{
"code": ... |
How to swap two numbers without using a temp variable in C# | To swap two numbers, use the third variable and perform arithmetical operator without using a temp variable.
Set two variables for swapping −
val1 = 5;
val2 = 10;
Now perform the following operation for swap −
val1 = val1 + val2;
val2 = val1 - val2;
val1 = val1 - val2;
using System;
namespace Demo {
class Program {
... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To swap two numbers, use the third variable and perform arithmetical operator without using a temp variable."
},
{
"code": null,
"e": 1204,
"s": 1171,
"text": "Set two variables for swapping −"
},
{
"code": null,
"e": 122... |
DAX Aggregation - SUMX function | Returns the sum of an expression evaluated for each row in a table.
SUMX (<table>, <expression>)
table
The table containing the rows for which the expression will be evaluated.
expression
The expression to be evaluated for each row of the table.
A decimal number.
Only the numbers in the column that results by evaluat... | [
{
"code": null,
"e": 2069,
"s": 2001,
"text": "Returns the sum of an expression evaluated for each row in a table."
},
{
"code": null,
"e": 2100,
"s": 2069,
"text": "SUMX (<table>, <expression>) \n"
},
{
"code": null,
"e": 2106,
"s": 2100,
"text": "table"
},... |
Circular Array Loop in C++ | Suppose we have a circular array nums of positive and negative integer values. If a number k at an index is a positive number, then move forward k steps. Otherwise, if it's negative (-k), move backward k steps. Since the array is circular, we can assume that the next element of the last element is the first element, an... | [
{
"code": null,
"e": 1715,
"s": 1062,
"text": "Suppose we have a circular array nums of positive and negative integer values. If a number k at an index is a positive number, then move forward k steps. Otherwise, if it's negative (-k), move backward k steps. Since the array is circular, we can assume... |
Automating the DCF Valuation. Using a Monte Carlo Simulation to... | by Andrew Cole | Towards Data Science | The DCF (Discounted Cash Flow) Valuation model is perhaps the single most important financial tool that financial professionals can have. This model is great in theory and practice, but traditionally performed in excel, it can be quite tedious and cumbersome in function at times. Fortunately, using Python, we can autom... | [
{
"code": null,
"e": 681,
"s": 172,
"text": "The DCF (Discounted Cash Flow) Valuation model is perhaps the single most important financial tool that financial professionals can have. This model is great in theory and practice, but traditionally performed in excel, it can be quite tedious and cumbers... |
iftop command in Linux with Examples - GeeksforGeeks | 26 May, 2020
iftop is a network analyzing tool used by system administrators to view the bandwidth related stats. It shows a quick overview of the networking activities on an interface. It stands from Interface TOP and the top is derived from op command in Linux. It even acts as a diagnostics to diagnose which program ... | [
{
"code": null,
"e": 24015,
"s": 23987,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 24361,
"s": 24015,
"text": "iftop is a network analyzing tool used by system administrators to view the bandwidth related stats. It shows a quick overview of the networking activities on an i... |
Reading and writing Excel files using the openpyxl module in Python | openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.
It was born from lack of existing library to read/write natively from Python the Office Open XML format.
An excel file that we use for operation is called Workbook that contains a minimum of one Sheet and a maximum of tens of sheets.
One s... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files."
},
{
"code": null,
"e": 1248,
"s": 1143,
"text": "It was born from lack of existing library to read/write natively from Python the Office Open XML form... |
Count ways to express a number as sum of powers - GeeksforGeeks | 26 Mar, 2021
Given two integers x and n, we need to find number of ways to express x as sum of n-th powers of unique natural numbers. It is given that 1 <= n <= 20.Examples:
Input : x = 100
n = 2
Output : 3
Explanation: There are three ways to
express 100 as sum of natural numbers
raised to power 2.
100 = ... | [
{
"code": null,
"e": 25442,
"s": 25414,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 25605,
"s": 25442,
"text": "Given two integers x and n, we need to find number of ways to express x as sum of n-th powers of unique natural numbers. It is given that 1 <= n <= 20.Examples: "... |
JDBC - Interview Questions | Dear readers, these JDBC Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JDBC. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start ... | [
{
"code": null,
"e": 2594,
"s": 2162,
"text": "Dear readers, these JDBC Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JDBC. As per my experience good interviewers hardly plan to ask any p... |
How to Solve a Staff Scheduling Problem with Python | by Khuyen Tran | Towards Data Science | Imagine you are a manager of a coffee shop. Your coffee shop opens 24h daily. The daily schedule is divided into 8 time windows as shown in the table below. Each time window requires a different amount of staff.
Staff members need to be scheduled into 4 different shifts like below:
How can you decide how many staff wor... | [
{
"code": null,
"e": 383,
"s": 171,
"text": "Imagine you are a manager of a coffee shop. Your coffee shop opens 24h daily. The daily schedule is divided into 8 time windows as shown in the table below. Each time window requires a different amount of staff."
},
{
"code": null,
"e": 454,
... |
C# Linq Select Method | Use the Select method to modify the elements in an array.
The following is our string array.
string[] stationery = { "diary", "board", "pencil", "whiteboard" };
The Select method also specifies Lambda Expressions as shown below −
Live Demo
using System;
using System.Linq;
using System.Collections.Generic;
public class... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "Use the Select method to modify the elements in an array."
},
{
"code": null,
"e": 1155,
"s": 1120,
"text": "The following is our string array."
},
{
"code": null,
"e": 1223,
"s": 1155,
"text": "string[] stationer... |
Foods Around Me: Google Maps Data Scraping with Python & Google Colab | by Regita H. Zakia | Towards Data Science | I have always been that person who reaches for my smartphone once a question struck my mind; faster when it relates to food. This is what I experienced when I went to Bali last December. It was on peak season — of course, wrong choice of time. As a foodie I am, food is the first thing I was thinking of when I arrived. ... | [
{
"code": null,
"e": 655,
"s": 172,
"text": "I have always been that person who reaches for my smartphone once a question struck my mind; faster when it relates to food. This is what I experienced when I went to Bali last December. It was on peak season — of course, wrong choice of time. As a foodie... |
4 Personality Traits of a Great Programmer - GeeksforGeeks | 28 Feb, 2020
These days, coding and programming skills are considered to be must-haves for anyone trying to start a technology career. That makes sense, of course, because we now live in a connected world where all of the devices we use daily need programmers to make them work and extend their usefulness. That reality ... | [
{
"code": null,
"e": 24984,
"s": 24956,
"text": "\n28 Feb, 2020"
},
{
"code": null,
"e": 25501,
"s": 24984,
"text": "These days, coding and programming skills are considered to be must-haves for anyone trying to start a technology career. That makes sense, of course, because we n... |
\sideset - Tex Command | \sideset - used for putting symbols at the four 'corners' of a large operator.
{ \sideset{_#1^#2}{_#3^#4} <large operator>}
\sideset command is used for putting symbols at the four 'corners' of a large operator.
\sideset{_1^2}{_3^4}\sum
∑12∑34
\sideset{_1^2}{_3^4}\sum
∑12∑34
\sideset{_1^2}{_3^4}\sum
14 Lec... | [
{
"code": null,
"e": 8065,
"s": 7986,
"text": "\\sideset - used for putting symbols at the four 'corners' of a large operator."
},
{
"code": null,
"e": 8110,
"s": 8065,
"text": "{ \\sideset{_#1^#2}{_#3^#4} <large operator>}"
},
{
"code": null,
"e": 8198,
"s": 8110... |
Binning for Feature Engineering in Machine Learning | by Jeremiah Lutes | Towards Data Science | If you have trained your model and still think the accuracy can be improved, it may be time for feature engineering. Feature engineering is the practice of using existing data to create new features. This post will focus on a feature engineering technique called “binning”.
This post will assume a basic understanding of... | [
{
"code": null,
"e": 445,
"s": 171,
"text": "If you have trained your model and still think the accuracy can be improved, it may be time for feature engineering. Feature engineering is the practice of using existing data to create new features. This post will focus on a feature engineering technique... |
Caffe2 - Verifying Access to Pre-Trained Models | Before you learn to use a pre-trained model in your Python application, let us first verify that the models are installed on your machine and are accessible through the Python code.
When you install Caffe2, the pre-trained models are copied in the installation folder. On the machine with Anaconda installation, these mo... | [
{
"code": null,
"e": 1973,
"s": 1791,
"text": "Before you learn to use a pre-trained model in your Python application, let us first verify that the models are installed on your machine and are accessible through the Python code."
},
{
"code": null,
"e": 2155,
"s": 1973,
"text": "... |
Missing letter from strings in JavaScript | We have a string of length m that contains first m letters of the English alphabets, but somehow, one element went missing from the string. So now the string contains m-1 letters.
We are required to write a function that takes in one such string and returns the missing element from the string
Therefore, let’s write the... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "We have a string of length m that contains first m letters of the English alphabets, but somehow, one element went missing from the string. So now the string contains m-1 letters."
},
{
"code": null,
"e": 1356,
"s": 1242,
"text": "We... |
How do I check that a number is float or integer - JavaScript? | Let’s say we have the following variables −
var value1 = 10;
var value2 = 10.15;
Use the Number() condition to check that a number is float or integer −
Number(value) === value && value % 1 !== 0;
}
Following is the code −
function checkNumberIfFloat(value) {
return Number(value) === value && value % 1 !== 0;
}
var ... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "Let’s say we have the following variables −"
},
{
"code": null,
"e": 1143,
"s": 1106,
"text": "var value1 = 10;\nvar value2 = 10.15;"
},
{
"code": null,
"e": 1215,
"s": 1143,
"text": "Use the Number() condition to... |
How to change the mouse pointer color in Tkinter? | Tkinter is a standard Python library for developing GUI-based applications. We can change the properties of its widgets by using the built-in functions and methods. In some applications, the properties affect the mouse pointer as well.
Tkinter provides us a way to change the mouse pointer color in the window. To config... | [
{
"code": null,
"e": 1298,
"s": 1062,
"text": "Tkinter is a standard Python library for developing GUI-based applications. We can change the properties of its widgets by using the built-in functions and methods. In some applications, the properties affect the mouse pointer as well."
},
{
"co... |
Tryit Editor v3.7 - Show Java | import java.time.LocalDate; // import the LocalDate class
public class Main {
public static void main(String[] args) {
LocalDate myObj = LocalDate.now(); // Create a date object
System.out.println(myObj); // Display the current date | [] |
Perl | uc() Function - GeeksforGeeks | 07 May, 2019
uc() function in Perl returns the string passed to it after converting it into uppercase. It is similar to ucfirst() function which returns only first character in uppercase.
Note: The characters which are already in UpperCase are not modified.
Syntax: uc String
Returns: string in uppercase.
Example 1:
#!/... | [
{
"code": null,
"e": 23617,
"s": 23589,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 23792,
"s": 23617,
"text": "uc() function in Perl returns the string passed to it after converting it into uppercase. It is similar to ucfirst() function which returns only first character in... |
Introduction to Marketing Mix Modeling in Python | by Dr. Robert Kübler | Towards Data Science | To keep a business running, spending money on advertising is crucial — this is the case regardless of whether the company is small or already established. And the number of ad spendings in the industry are enormous:
These volumes make it necessary to spend each advertising dollar wisely. However, this is easier said th... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "To keep a business running, spending money on advertising is crucial — this is the case regardless of whether the company is small or already established. And the number of ad spendings in the industry are enormous:"
},
{
"code": null,
"e": 61... |
Convert dataframe column to datetime in R - GeeksforGeeks | 23 May, 2021
The string-type date objects do not offer easy parsing and manipulation of the components. The conversion of date objects to POSIXct or POSIXlt objects can help in the easy conversion of dates to the required formats with desirable time zones. In this article, we will discuss how to convert dataframe colum... | [
{
"code": null,
"e": 25190,
"s": 25162,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 25536,
"s": 25190,
"text": "The string-type date objects do not offer easy parsing and manipulation of the components. The conversion of date objects to POSIXct or POSIXlt objects can help in... |
Program to perform string compression in Python | Suppose we have a string s. We have to compress this string into Run length encoding form. So when a character is repeated k number of times consecutively like 'bbbb' here letter 'b' is repeated four times consecutively, so the encoded form will be 'b4'. For single characters we shall not add the count into it.
So, if ... | [
{
"code": null,
"e": 1375,
"s": 1062,
"text": "Suppose we have a string s. We have to compress this string into Run length encoding form. So when a character is repeated k number of times consecutively like 'bbbb' here letter 'b' is repeated four times consecutively, so the encoded form will be 'b4'... |
VBScript DatePart Function | It is a function that returns the specific part of a given date.
DatePart(interval,date[,firstdayofweek[,firstweekofyear]])
Interval, a Required Parameter. It can take the following values −
d − day of the year.
m − month of the year
y − year of the year
yyyy − year
w − weekday
ww − week
q − quarter
h − hour
m − n
s... | [
{
"code": null,
"e": 2145,
"s": 2080,
"text": "It is a function that returns the specific part of a given date."
},
{
"code": null,
"e": 2206,
"s": 2145,
"text": "DatePart(interval,date[,firstdayofweek[,firstweekofyear]]) \n"
},
{
"code": null,
"e": 2412,
"s": 220... |
Group similar Image by using the Gaussian mixture model (EM algorithm) | by AKASH KUMAR | Towards Data Science | Clustering one of the most popular unsupervised machine learning problem. We are already familiar with k-means clustering algorithm but wait there is a problem in this:
Highly dependent on the initial value of centroids: If we change it ’s initialization then cluster position then it is highly likely that the final clu... | [
{
"code": null,
"e": 341,
"s": 172,
"text": "Clustering one of the most popular unsupervised machine learning problem. We are already familiar with k-means clustering algorithm but wait there is a problem in this:"
},
{
"code": null,
"e": 877,
"s": 341,
"text": "Highly dependent ... |
Absolute Deviation and Absolute Mean Deviation using NumPy | In Statistical analysis study of data variability in a sample indicates how dispersed are the values in a given data sample. The two important ways we calculate the variability are Absolute Deviation and Mean Absolute Deviation.
In this method we first find the mean value of the given sample and then calculate the dif... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "In Statistical analysis study of data variability in a sample indicates how dispersed are the values in a given data sample. The two important ways we calculate the variability are Absolute Deviation and Mean Absolute Deviation."
},
{
"code": n... |
Detecting Semantic Drift within Image Data | by Leandro G. Almeida | Towards Data Science | Your machine learning model sees the world through the lens of its training data. That means that your model gets more and more myopic as the real world gets further from what your training data represents. However, when operating machine learning applications, upgrading your glasses (retraining your model) is not our ... | [
{
"code": null,
"e": 653,
"s": 172,
"text": "Your machine learning model sees the world through the lens of its training data. That means that your model gets more and more myopic as the real world gets further from what your training data represents. However, when operating machine learning applica... |
How can SciPy be used to calculate the permutations and combination values in Python? | SciPy can be used to determine the permutation and combination with respect to two values.
A function named ‘perm’ present in the class ‘special’ in ‘SciPy’ is used.
Syntax of ‘perm’ function
scipy.special.perm(N, k)
Performing permutation on a set of values has been shown below
Live Demo
from scipy.special import per... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "SciPy can be used to determine the permutation and combination with respect to two values."
},
{
"code": null,
"e": 1228,
"s": 1153,
"text": "A function named ‘perm’ present in the class ‘special’ in ‘SciPy’ is used."
},
{
"c... |
How to create dynamic search box in ReactJS? - GeeksforGeeks | 18 Jan, 2021
The dynamic search box is a search bar with a text field to take the user input and then perform some operation on the user input to show him the dynamic results based on his input. API calls in made whenever a user starts typing in order to show him the dynamic options. For example Youtube search box, Goo... | [
{
"code": null,
"e": 24921,
"s": 24893,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 25423,
"s": 24921,
"text": "The dynamic search box is a search bar with a text field to take the user input and then perform some operation on the user input to show him the dynamic results b... |
ntptrace - Unix, Linux Command | ntptrace determines where a given Network Time Protocol (NTP) server gets its time from, and follows the chain of NTP servers back to their master time source. If given no arguments, it starts with localhost[char46] Here is an example of the output from ntptrace:
% ntptrace
localhost: stratum 4, offset 0.0019529, sy... | [
{
"code": null,
"e": 10847,
"s": 10581,
"text": "\nntptrace determines where a given Network Time Protocol (NTP) server gets its time from, and follows the chain of NTP servers back to their master time source. If given no arguments, it starts with localhost[char46] Here is an example of the output ... |
What are the steps involved to use a CURSOR in any COBOL-DB2 program? | The CURSOR is used when we have to fetch multiple rows from a table. There are 4 steps involved in order to use a cursor in a COBOL-DB2 program.
DECLARE cursor− In this step we will define the layout of the cursor. We will give the query we want to use. For example−
DECLARE cursor− In this step we will define the layou... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "The CURSOR is used when we have to fetch multiple rows from a table. There are 4 steps involved in order to use a cursor in a COBOL-DB2 program."
},
{
"code": null,
"e": 1329,
"s": 1207,
"text": "DECLARE cursor− In this step we will ... |
Microsoft Expression Web - Hyperlinks | In this chapter, we will learn how to use hyperlinks in your website. One of the things that makes the web so expansive is the capability of webpages to link to other webpages. Hyperlinks or links are found within nearly all web pages.
Hyperlinks also allow users to click and go to a different page, a place within a pa... | [
{
"code": null,
"e": 2432,
"s": 2196,
"text": "In this chapter, we will learn how to use hyperlinks in your website. One of the things that makes the web so expansive is the capability of webpages to link to other webpages. Hyperlinks or links are found within nearly all web pages."
},
{
"co... |
Tcl - While Loop | A while loop statement in Tcl language repeatedly executes a target statement as long as a given condition is true.
The syntax of a while loop in Tcl language is −
while {condition} {
statement(s)
}
Here, statement(s) may be a single statement or a block of statements. The condition may be any expression, and true ... | [
{
"code": null,
"e": 2317,
"s": 2201,
"text": "A while loop statement in Tcl language repeatedly executes a target statement as long as a given condition is true."
},
{
"code": null,
"e": 2365,
"s": 2317,
"text": "The syntax of a while loop in Tcl language is −"
},
{
"cod... |
Iterating over Enum Values in Java | The Enum class is the common base class of all Java language enumeration types.
Let us see an example to iterate over enum values using for loop −
public class Demo {
public enum Vehicle { CAR, BUS, BIKE }
public static void main(String[] args) {
for (Vehicle v : Vehicle.values())
System.out.printl... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "The Enum class is the common base class of all Java language enumeration types."
},
{
"code": null,
"e": 1209,
"s": 1142,
"text": "Let us see an example to iterate over enum values using for loop −"
},
{
"code": null,
"e"... |
Bertrand's Postulate - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 407,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
JavaScript - Date getDay() Method | Javascript date getDay() method returns the day of the week for the specified date according to local time. The value returned by getDay() is an integer corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
Its syntax is as follows −
Date.getDay()
Returns the day of the week for t... | [
{
"code": null,
"e": 2711,
"s": 2466,
"text": "Javascript date getDay() method returns the day of the week for the specified date according to local time. The value returned by getDay() is an integer corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on."
},
... |
df Command in Linux with examples - GeeksforGeeks | 22 Oct, 2021
There might come a situation while using Linux when you want to know the amount of space consumed by a particular file system on your LINUX system or how much space is available on a particular file system. LINUX being command friendly provides a command line utility for this i.e df command that displays t... | [
{
"code": null,
"e": 23974,
"s": 23946,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 24370,
"s": 23974,
"text": "There might come a situation while using Linux when you want to know the amount of space consumed by a particular file system on your LINUX system or how much spac... |
Ant - JUnit Integration | JUnit is the commonly used unit testing framework for Java-based developments. It is easy to use and easy to extend. There are a number of JUnit extensions available. If you are unfamiliar with JUnit, you should download it from www.junit.org and read its manual.
This chapter shows how to execute JUnit tests by using A... | [
{
"code": null,
"e": 2361,
"s": 2097,
"text": "JUnit is the commonly used unit testing framework for Java-based developments. It is easy to use and easy to extend. There are a number of JUnit extensions available. If you are unfamiliar with JUnit, you should download it from www.junit.org and read i... |
Vim - Editing | Vim provides many commands which make editing functionality really powerful. In this chapter, we will discuss following items −
Insert
Append
Open new line
Substitute
Change
Replace
Join
To insert text before cursor perform following steps −
To insert text before cursor perform following steps
Switch to insert mode
i
... | [
{
"code": null,
"e": 2098,
"s": 1970,
"text": "Vim provides many commands which make editing functionality really powerful. In this chapter, we will discuss following items −"
},
{
"code": null,
"e": 2105,
"s": 2098,
"text": "Insert"
},
{
"code": null,
"e": 2112,
... |
How do I check if a column is empty or null in MySQL? | To check if a column is empty or null , we can use the where clause with IS NULL and for empty
we can use the condition ‘ ‘ i.e. empty space. The steps required for this are as folllows:
First a table is created with the help of create command as follows −
mysql> CREATE table ColumnValueNullDemo
-> (
-> ColumnName varc... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "To check if a column is empty or null , we can use the where clause with IS NULL and for empty\nwe can use the condition ‘ ‘ i.e. empty space. The steps required for this are as folllows:\nFirst a table is created with the help of create command as foll... |
How to select random elements from an R vector? | Random selection of elements from a R vector ensures the unbiased selection because while doing the random selection, each of the elements of the vector gets an equal probability of being selected by the random selection procedure specifically the simple random sampling selection procedure. To select, one or more eleme... | [
{
"code": null,
"e": 1441,
"s": 1062,
"text": "Random selection of elements from a R vector ensures the unbiased selection because while doing the random selection, each of the elements of the vector gets an equal probability of being selected by the random selection procedure specifically the simpl... |
How to convert nested array pairs to objects in an array in JavaScript ? | Suppose, we have an array of arrays like this −
const arr = [
[
['firstName', 'Joe'],
['lastName', 'Blow'],
['age', 42],
['role', 'clerk'],
[
['firstName', 'Mary'],
['lastName', 'Jenkins'],
['age', 36],
['role', 'manager']
]
]
];
We are requi... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "Suppose, we have an array of arrays like this −"
},
{
"code": null,
"e": 1370,
"s": 1110,
"text": "const arr = [\n [\n ['firstName', 'Joe'],\n ['lastName', 'Blow'],\n ['age', 42],\n ['role', 'clerk'],\n [\n... |
\fbox - Tex Command | \fbox - Used to put a box around argument; argument is in text mode.
{ \fbox #1 }
\fbox command draws a box around argument; argument is in text mode.
\boxed{Hi there!}
Hithere!
\fbox{Hi there!}
Hi there!
\boxed{Hi there!}
Hithere!
\boxed{Hi there!}
\fbox{Hi there!}
Hi there!
\fbox{Hi there!}
14 Lect... | [
{
"code": null,
"e": 8055,
"s": 7986,
"text": "\\fbox - Used to put a box around argument; argument is in text mode."
},
{
"code": null,
"e": 8068,
"s": 8055,
"text": "{ \\fbox #1 }"
},
{
"code": null,
"e": 8137,
"s": 8068,
"text": "\\fbox command draws a box ... |
Rotate Array | Practice | GeeksforGeeks | Given an unsorted array arr[] of size N. Rotate the array to the left (counter-clockwise direction) by D steps, where D is a positive integer.
Example 1:
Input:
N = 5, D = 2
arr[] = {1,2,3,4,5}
Output: 3 4 5 1 2
Explanation: 1 2 3 4 5 when rotated
by 2 elements, it becomes 3 4 5 1 2.
Example 2:
Input:
N = 10, D = 3... | [
{
"code": null,
"e": 434,
"s": 290,
"text": "Given an unsorted array arr[] of size N. Rotate the array to the left (counter-clockwise direction) by D steps, where D is a positive integer. "
},
{
"code": null,
"e": 447,
"s": 436,
"text": "Example 1:"
},
{
"code": null,
... |
C# and Selenium: Wait Until Element is Present | We can wait until an element is present in Selenium webdriver using the explicit wait. It is mainly used whenever there is a synchronization issue for an element to be available on page.
The WebDriverWait and the ExpectedCondition classes are used for an explicit wait implementation. We have to create an object of the ... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "We can wait until an element is present in Selenium webdriver using the explicit wait. It is mainly used whenever there is a synchronization issue for an element to be available on page."
},
{
"code": null,
"e": 1459,
"s": 1249,
"tex... |
Python Pandas - Visualization | This functionality on Series and DataFrame is just a simple wrapper around the matplotlib libraries plot() method.
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(10,4),index=pd.date_range('1/1/2000',
periods=10), columns=list('ABCD'))
df.plot()
Its output is as follows −
If the index cons... | [
{
"code": null,
"e": 2558,
"s": 2443,
"text": "This functionality on Series and DataFrame is just a simple wrapper around the matplotlib libraries plot() method."
},
{
"code": null,
"e": 2719,
"s": 2558,
"text": "import pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.ran... |
Style to highlight active HTML anchor with CSS | To highlight active HTML anchor with CSS, use the :target selector.
You can try to run the following code to implement the :target Selector:
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
:target {
border: 2px solid #D4D4D4;
background-color: orange;
color: white;
... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To highlight active HTML anchor with CSS, use the :target selector."
},
{
"code": null,
"e": 1203,
"s": 1130,
"text": "You can try to run the following code to implement the :target Selector:"
},
{
"code": null,
"e": 1213... |
How to create a plot title with unicode characters using ggplot2 in R? | If we want to use unicode characters in the title for a plot created with the help of ggplot2 package then the ggtitle function will be used combined with functions called expression and paste. Using the expression and paste functions, we can write unicode characters for the title of the plot. Check out the below examp... | [
{
"code": null,
"e": 1414,
"s": 1062,
"text": "If we want to use unicode characters in the title for a plot created with the help of ggplot2 package then the ggtitle function will be used combined with functions called expression and paste. Using the expression and paste functions, we can write unic... |
How to design Bootstrap Fullscreen Select feature for Mobiles ? - GeeksforGeeks | 15 Oct, 2020
In this article, we will learn how to design Bootstrap fullscreen select feature for mobile devices.
The Bootstrap fullscreen select plugin key features are as follows.
It provides advanced HTML full screen select functionality.
It provides in and out animations.
It provides open and close events function ... | [
{
"code": null,
"e": 28360,
"s": 28332,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 28461,
"s": 28360,
"text": "In this article, we will learn how to design Bootstrap fullscreen select feature for mobile devices."
},
{
"code": null,
"e": 28529,
"s": 28461,
... |
How to initialize a const field in constructor? | Here we will see how to initialize the const type variable using constructor?
To initialize the const value using constructor, we have to use the initialize list. This initializer list is used to initialize the data member of a class. The list of members, that will be initialized, will be present after the constructor ... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "Here we will see how to initialize the const type variable using constructor?"
},
{
"code": null,
"e": 1434,
"s": 1140,
"text": "To initialize the const value using constructor, we have to use the initialize list. This initializer li... |
numpy.argwhere() in Python - GeeksforGeeks | 24 Dec, 2018
numpy.argwhere() function is used to find the indices of array elements that are non-zero, grouped by element.
Syntax : numpy.argwhere(arr)
Parameters :arr : [array_like] Input array.
Return : [ndarray] Indices of elements that are non-zero. Indices are grouped by element.
Code #1 :
# Python program explai... | [
{
"code": null,
"e": 24403,
"s": 24375,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 24514,
"s": 24403,
"text": "numpy.argwhere() function is used to find the indices of array elements that are non-zero, grouped by element."
},
{
"code": null,
"e": 24543,
"s":... |
Python Program To Find the Smallest and Largest Elements in the Binary Search Tree | When it is required to find the smallest and the largest elements in a binary search tree, a binary tree class is created, and methods to add elements to the tree, search for a specific node are defined. An instance of the class is created, and is used with these methods.
Below is a demonstration of the same −
Live De... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "When it is required to find the smallest and the largest elements in a binary search tree, a binary tree class is created, and methods to add elements to the tree, search for a specific node are defined. An instance of the class is created, and is used ... |
How to insert element as a first child using jQuery? | To insert element as a first child using jQuery, use the prepend() method. The prepend( content ) method prepends content to the inside of every matched element.
You can try to run the following code to learn how to insert element as a first child using jQuery:
Live Demo
<html>
<head>
<title>jQuery Example</t... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "To insert element as a first child using jQuery, use the prepend() method. The prepend( content ) method prepends content to the inside of every matched element."
},
{
"code": null,
"e": 1324,
"s": 1224,
"text": "You can try to run t... |
Deque in Java | The dequeue is a double ended queue and data elements can be added or removed from either end. The dequeue in Java is implemented using the java.util.Deque interface which is a subtype of the java.util.Queue interface.
A program that demonstrates some of the methods of a dequeue is given as follows −
Live Demo
import ... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "The dequeue is a double ended queue and data elements can be added or removed from either end. The dequeue in Java is implemented using the java.util.Deque interface which is a subtype of the java.util.Queue interface."
},
{
"code": null,
"e... |
How to delete a file using PHP ? - GeeksforGeeks | 28 Mar, 2022
To delete a file by using PHP is very easy. Deleting a file means completely erase a file from a directory so that the file is no longer exist. PHP has an unlink() function that allows to delete a file. The PHP unlink() function takes two parameters $filename and $context. Syntax:
unlink( $filename, $conte... | [
{
"code": null,
"e": 24346,
"s": 24318,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 24628,
"s": 24346,
"text": "To delete a file by using PHP is very easy. Deleting a file means completely erase a file from a directory so that the file is no longer exist. PHP has an unlink()... |
BigInteger Class in Java - GeeksforGeeks | 10 Dec, 2021
BigInteger class is used for the mathematical operation which involves very big integer calculations that are outside the limit of all available primitive data types.
In this way, BigInteger class is very handy to use because of its large method library and it is also used a lot in competitive programming.... | [
{
"code": null,
"e": 24328,
"s": 24300,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 24495,
"s": 24328,
"text": "BigInteger class is used for the mathematical operation which involves very big integer calculations that are outside the limit of all available primitive data typ... |
10 Steps in Pandas to Process LAS File and Plot(part1) | by Ryan A. Mardani | Towards Data Science | Log ASCII Standard (LAS) is a popular format to store well log information in the oil and gas industry. Logs are physical properties of subsurface rocks measured through depth intervals. There are several commercial software that can read this format. LAS viewers are sometimes free but with limited capability. If you w... | [
{
"code": null,
"e": 472,
"s": 47,
"text": "Log ASCII Standard (LAS) is a popular format to store well log information in the oil and gas industry. Logs are physical properties of subsurface rocks measured through depth intervals. There are several commercial software that can read this format. LAS ... |
Pentagonal Pyramidal Number - GeeksforGeeks | 12 Apr, 2021
Given a number n, find the nth pentagonal pyramidal number.A Pentagonal Pyramidal Number belongs to the figurate number class. It is the number of objects in a pyramid with a pentagonal base. The nth pentagonal pyramidal number is equal to sum of first n pentagonal numbers. Examples:
Input : n = 3
Outpu... | [
{
"code": null,
"e": 25354,
"s": 25326,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 25641,
"s": 25354,
"text": "Given a number n, find the nth pentagonal pyramidal number.A Pentagonal Pyramidal Number belongs to the figurate number class. It is the number of objects in a pyr... |
How to get the Azure VM virtual Network and the Subnet name using PowerShell? | To retrieve the Azure VM virtual network and subnet name, we first need to retrieve the Azure
VM NIC information. To get the Azure VM NIC information, we need to use the Get-AzVM command, and then we can use the NetworkProfile property to retrieve the NIC name as shown below.
PS C:\> $vm = Get-AzVM -Name TestVM
$vmnic ... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "To retrieve the Azure VM virtual network and subnet name, we first need to retrieve the Azure"
},
{
"code": null,
"e": 1339,
"s": 1156,
"text": "VM NIC information. To get the Azure VM NIC information, we need to use the Get-AzVM com... |
Decryption of Transposition Cipher | In this chapter, you will learn the procedure for decrypting the transposition cipher.
Observe the following code for a better understanding of decrypting a transposition cipher. The cipher text for message Transposition Cipher with key as 6 is fetched as Toners raiCntisippoh.
import math, pyperclip
def main():
myMe... | [
{
"code": null,
"e": 2379,
"s": 2292,
"text": "In this chapter, you will learn the procedure for decrypting the transposition cipher."
},
{
"code": null,
"e": 2570,
"s": 2379,
"text": "Observe the following code for a better understanding of decrypting a transposition cipher. The... |
How to get programmatically android device brand name? | This example demonstrate about How to get programmatically android device brand name.
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"... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "This example demonstrate about How to get programmatically android device brand name."
},
{
"code": null,
"e": 1277,
"s": 1148,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required ... |
Identical Linked Lists | Practice | GeeksforGeeks | Given two Singly Linked List of N and M nodes respectively. The task is to check whether two linked lists are identical or not.
Two Linked Lists are identical when they have same data and with same arrangement too.
Example 1:
Input:
LinkedList1: 1->2->3->4->5->6
LinkedList2: 99->59->42->20
Output: Not identical
Examp... | [
{
"code": null,
"e": 454,
"s": 238,
"text": "Given two Singly Linked List of N and M nodes respectively. The task is to check whether two linked lists are identical or not. \nTwo Linked Lists are identical when they have same data and with same arrangement too."
},
{
"code": null,
"e": 4... |
PyQt5 - QGridLayout Class | A GridLayout class object presents with a grid of cells arranged in rows and columns. The class contains addWidget() method. Any widget can be added by specifying the number of rows and columns of the cell. Optionally, a spanning factor for row as well as column, if specified makes the widget wider or taller than one c... | [
{
"code": null,
"e": 2341,
"s": 1963,
"text": "A GridLayout class object presents with a grid of cells arranged in rows and columns. The class contains addWidget() method. Any widget can be added by specifying the number of rows and columns of the cell. Optionally, a spanning factor for row as well ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.