title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Clojure - Exception Handling
Exception handling is required in any programming language to handle the runtime errors so that the normal flow of the application can be maintained. Exception usually disrupts the normal flow of the application, which is the reason why we need to use exception handling in our application. Exception is broadly classifi...
[ { "code": null, "e": 2665, "s": 2374, "text": "Exception handling is required in any programming language to handle the runtime errors so that the normal flow of the application can be maintained. Exception usually disrupts the normal flow of the application, which is the reason why we need to use e...
The Ultimate Guide to Logical Operators in R | by Linda Ngo | Towards Data Science
Suppose we want to change or compare the results of the comparisons made using relational operators. How would we go about doing that? R does this using the AND, the OR, and the NOT operator. AND operator & OR operator | NOT operator ! The AND operator takes two logical values and returns TRUE only if both values are T...
[ { "code": null, "e": 307, "s": 172, "text": "Suppose we want to change or compare the results of the comparisons made using relational operators. How would we go about doing that?" }, { "code": null, "e": 364, "s": 307, "text": "R does this using the AND, the OR, and the NOT oper...
C++ program for Finite Automata algorithm for Pattern Searching
In this article, we will be discussing a program to execute the Finite Automata algorithm for pattern searching. We are provided with a text[0...n-1] and a pattern[0...m-1]. We have to find all the occurrences of the pattern[] in the text[]. For this we would preprocess the text[] and build a 2-d array to represent it....
[ { "code": null, "e": 1175, "s": 1062, "text": "In this article, we will be discussing a program to execute the Finite Automata algorithm for pattern searching." }, { "code": null, "e": 1304, "s": 1175, "text": "We are provided with a text[0...n-1] and a pattern[0...m-1]. We have ...
How to print text from a list of all web elements with same class name in Selenium?
We can get the text from a list of all web elements with the same class name in Selenium webdriver. We can use any of the locators like the class name with method By.className, xpath with method By.xpath, or css with method By.cssSelector. Let us verify a xpath expression //h2[@class='store-name'] which represents mult...
[ { "code": null, "e": 1302, "s": 1062, "text": "We can get the text from a list of all web elements with the same class name in Selenium webdriver. We can use any of the locators like the class name with method By.className, xpath with method By.xpath, or css with method By.cssSelector." }, { ...
BabylonJS - Physics Engine
Babylon.js has plugin system for Physics engine which helps to add interactions to the scene.It shows the collision and bouncing between 2 objects and makes it more like real life interaction.The demo will show the balls colliding with each other and moving around with the collision and later resting.We notice the same...
[ { "code": null, "e": 2996, "s": 2183, "text": "Babylon.js has plugin system for Physics engine which helps to add interactions to the scene.It shows the collision and bouncing between 2 objects and makes it more like real life interaction.The demo will show the balls colliding with each other and mo...
Delete data from a collection in MongoDB using multiple conditions?
You can use remove() for this. Let us first create a collection with documents − > db.deleteDataDemo.insertOne({_id:1,"Name":"Larry"}); { "acknowledged" : true, "insertedId" : 1 } > db.deleteDataDemo.insertOne({_id:2,"Name":"Chris"}); { "acknowledged" : true, "insertedId" : 2 } > db.deleteDataDemo.insertOne({_id:3,"Nam...
[ { "code": null, "e": 1143, "s": 1062, "text": "You can use remove() for this. Let us first create a collection with documents −" }, { "code": null, "e": 1736, "s": 1143, "text": "> db.deleteDataDemo.insertOne({_id:1,\"Name\":\"Larry\"});\n{ \"acknowledged\" : true, \"insertedId\"...
TypeScript Accessor - GeeksforGeeks
17 Nov, 2021 In TypeScript, there are two supported methods getter and setter to access and set the class members. The greater method control over how a member is accessed on each object. Methods of the typescript accessor property: getter: This method comes when you want to access any property of an object. setter: ...
[ { "code": null, "e": 25063, "s": 25035, "text": "\n17 Nov, 2021" }, { "code": null, "e": 25285, "s": 25063, "text": "In TypeScript, there are two supported methods getter and setter to access and set the class members. The greater method control over how a member is accessed on e...
Python - Convert Nested Tuple to Custom Key Dictionary - GeeksforGeeks
10 Jul, 2020 Sometimes, while working with Python records, we can have data that come without proper column names/identifiers, which can just be identified by their index, but we intend to assign them keys and render in form of dictionaries. This kind of problem can have application in domains such as web development. ...
[ { "code": null, "e": 24309, "s": 24281, "text": "\n10 Jul, 2020" }, { "code": null, "e": 24680, "s": 24309, "text": "Sometimes, while working with Python records, we can have data that come without proper column names/identifiers, which can just be identified by their index, but ...
Minimum changes required to make two arrays identical - GeeksforGeeks
25 Aug, 2021 Given two arrays, and with n elements each. The task is to make these two arrays identical i:e, for each , we want to make . In a single operation, you can choose two integers x and y, and replace all the occurrences of x in both the arrays with y. Notice that regardless of the number of occurrences replac...
[ { "code": null, "e": 24810, "s": 24782, "text": "\n25 Aug, 2021" }, { "code": null, "e": 25231, "s": 24810, "text": "Given two arrays, and with n elements each. The task is to make these two arrays identical i:e, for each , we want to make . In a single operation, you can choose ...
The Doubly Linked List class in Javascript
Here is the complete implementation of the DoublyLinkedList Class − class DoublyLinkedList { constructor() { this.head = null; this.tail = null; this.length = 0; } insert(data, position = this.length) { let node = new this.Node(data); // List is currently empty if (this.head...
[ { "code": null, "e": 1130, "s": 1062, "text": "Here is the complete implementation of the DoublyLinkedList Class −" }, { "code": null, "e": 3446, "s": 1130, "text": "class DoublyLinkedList {\n constructor() {\n this.head = null;\n this.tail = null;\n this.length ...
Firebase - Twitter Authentication
In this chapter, we will explain how to use Twitter authentication. You can create Twitter app on this link. Once your app is created click on Keys and Access Tokens where you can find API Key and API Secret. You will need this in step 2. In your Firebase dashboard side menu, you need to click Auth. Then open SIGN-IN-M...
[ { "code": null, "e": 2234, "s": 2166, "text": "In this chapter, we will explain how to use Twitter authentication." }, { "code": null, "e": 2405, "s": 2234, "text": "You can create Twitter app on this link. Once your app is created click on Keys and Access Tokens where you can fi...
Batch Script - PAUSE
This batch command prompts the user and waits for a line of input to be entered. Pause @echo off pause The command prompt will show the message “Press any key to continue....” to the user and wait for the user’s input. Print Add Notes Bookmark this page
[ { "code": null, "e": 2250, "s": 2169, "text": "This batch command prompts the user and waits for a line of input to be entered." }, { "code": null, "e": 2257, "s": 2250, "text": "Pause\n" }, { "code": null, "e": 2274, "s": 2257, "text": "@echo off \npause" }...
BigInteger modPow() Method in Java - GeeksforGeeks
11 Aug, 2021 Prerequisite: BigInteger BasicsThe Java.math.BigInteger.modPow() method returns a BigInteger whose value is (thisexponent mod m ). If exponent == 1, the returned value is (this mod m) and if exponent < 0, the returned value is the modular multiplicative inverse of (this-exponent). The method throws an Arit...
[ { "code": null, "e": 24374, "s": 24346, "text": "\n11 Aug, 2021" }, { "code": null, "e": 24709, "s": 24374, "text": "Prerequisite: BigInteger BasicsThe Java.math.BigInteger.modPow() method returns a BigInteger whose value is (thisexponent mod m ). If exponent == 1, the returned v...
Spring Setter-based Dependency Injection
Setter-based DI is accomplished by the container calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate your bean. The following example shows a class TextEditor that can only be dependency-injected using pure setter-based injection. Let us have...
[ { "code": null, "e": 2482, "s": 2292, "text": "Setter-based DI is accomplished by the container calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate your bean." }, { "code": null, "e": 2601, "s": 2482, "...
Copy all files from one directory to another using Python - GeeksforGeeks
06 Sep, 2021 In this article, we will discuss how to copy all files from one directory to another using Python. This can be done using the shutil module. This module can be used in Python to perform operations on files and folders in a directory. Shutil package facilitates the access, movement, and removal of the files...
[ { "code": null, "e": 24430, "s": 24402, "text": "\n06 Sep, 2021" }, { "code": null, "e": 24529, "s": 24430, "text": "In this article, we will discuss how to copy all files from one directory to another using Python." }, { "code": null, "e": 24759, "s": 24529, ...
Python | os.utime() method - GeeksforGeeks
03 Oct, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.utime() method of os module in Python is used to set the access and modified time of ...
[ { "code": null, "e": 23897, "s": 23869, "text": "\n03 Oct, 2019" }, { "code": null, "e": 24116, "s": 23897, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable...
Android: How to Upload an image on Firebase storage? - GeeksforGeeks
07 Dec, 2021 Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides secure file uploads and downloads for Firebase application. This article explains how to build an Android application with the ability to select ...
[ { "code": null, "e": 24905, "s": 24877, "text": "\n07 Dec, 2021" }, { "code": null, "e": 25127, "s": 24905, "text": "Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Firebase provides s...
How do you use a ‘for loop’ for accessing array elements in C#?
The ‘for loop’ executes a sequence of statements multiple times and abbreviates the code that manages the loop variable. The following is our for loop. Live Demo using System; namespace ArrayApplication { class MyArray { static void Main(string[] args) { int [] n = new int[10]; /* n is an array of 10...
[ { "code": null, "e": 1183, "s": 1062, "text": "The ‘for loop’ executes a sequence of statements multiple times and abbreviates the code that manages the loop variable." }, { "code": null, "e": 1214, "s": 1183, "text": "The following is our for loop." }, { "code": null, ...
Process Dataset with 200 Million Rows using Vaex | by Satyam Kumar | Towards Data Science
Pandas is one of the most popular libraries used for data science case studies. It is one of the best tools for exploratory data analysis and data wrangling. Pandas works efficiently well with small or medium-size datasets which fit best into the memory. For out of core dataset or large dataset pandas is inefficient to...
[ { "code": null, "e": 635, "s": 172, "text": "Pandas is one of the most popular libraries used for data science case studies. It is one of the best tools for exploratory data analysis and data wrangling. Pandas works efficiently well with small or medium-size datasets which fit best into the memory. ...
JqueryUI - Sortable
jQueryUI provides sortable() method to reorder elements in list or grid using the mouse. This method performs sortability action based upon an operation string passed as the first parameter. The sortable () method can be used in two forms − $(selector, context).sortable (options) Method $(selector, context).sortable (o...
[ { "code": null, "e": 2455, "s": 2264, "text": "jQueryUI provides sortable() method to reorder elements in list or grid using the mouse. This method performs sortability action based upon an operation string passed as the first parameter." }, { "code": null, "e": 2505, "s": 2455, ...
File Upload Example in Python
To upload a file, the HTML form must have the enctype attribute set to multipart/form-data. The input tag with the file type creates a "Browse" button. <html> <body> <form enctype = "multipart/form-data" action = "save_file.py" method = "post"> <p>File: <input type = "file" name = "filename" /></p> <p><input t...
[ { "code": null, "e": 1214, "s": 1062, "text": "To upload a file, the HTML form must have the enctype attribute set to multipart/form-data. The input tag with the file type creates a \"Browse\" button." }, { "code": null, "e": 1445, "s": 1214, "text": "<html>\n<body>\n <form enc...
Tryit Editor v3.7
Tryit: HTML table header spans 2 columns
[]
A Better Way to Handle Missing Values in your Dataset: Using IterativeImputer (PART I) | by Gifari Hoque | Towards Data Science
IntroductionReasoning with MissingnessHow does it work?- Univariate Imputation- Multivariate ImputationIterative Imputer- How to be the “Chosen One”- The Process Behind the IterationsGetting Started- The Problem with Single Imputation MethodsHow Single Imputation vs. Iterative Imputation can Affect the Distribution of ...
[ { "code": null, "e": 540, "s": 172, "text": "IntroductionReasoning with MissingnessHow does it work?- Univariate Imputation- Multivariate ImputationIterative Imputer- How to be the “Chosen One”- The Process Behind the IterationsGetting Started- The Problem with Single Imputation MethodsHow Single Im...
Data Preprocessing with Python Pandas — Part 3 Normalisation | by Angelica Lo Duca | Towards Data Science
This tutorial explains how to preprocess data using the Pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalised format. Preprocessing involves the following aspects: missing values data formatting data normalisation data standardisation dat...
[ { "code": null, "e": 418, "s": 172, "text": "This tutorial explains how to preprocess data using the Pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalised format. Preprocessing involves the following aspects:" }, {...
How can we MySQL LOAD DATA INFILE statement with ‘FIELDS TERMINATED BY’ option to import data from text file into MySQL table?
‘FIELDS TERMINATED BY’ option should be used when the text file which we want to import into MySQL table is having the values which are separated by a comma(,) or maybe with any other separator like a colon(:), semicolon(;) etc. It can be understood with the help of the following example − Suppose we are having the fol...
[ { "code": null, "e": 1353, "s": 1062, "text": "‘FIELDS TERMINATED BY’ option should be used when the text file which we want to import into MySQL table is having the values which are separated by a comma(,) or maybe with any other separator like a colon(:), semicolon(;) etc. It can be understood wit...
Angular 2 - Components
Components are a logical piece of code for Angular JS application. A Component consists of the following − Template − This is used to render the view for the application. This contains the HTML that needs to be rendered in the application. This part also includes the binding and directives. Template − This is used to r...
[ { "code": null, "e": 2404, "s": 2297, "text": "Components are a logical piece of code for Angular JS application. A Component consists of the following −" }, { "code": null, "e": 2589, "s": 2404, "text": "Template − This is used to render the view for the application. This contai...
WPF - Menu
Menu is a control that enables you to hierarchically organize elements associated with the commands and event handlers. Menu is an ItemsControl, so it can contain a collection of any object type such as string, image, or panel. The hierarchical inheritance of Menu class is as follows − Below are the commonly used prope...
[ { "code": null, "e": 2307, "s": 2020, "text": "Menu is a control that enables you to hierarchically organize elements associated with the commands and event handlers. Menu is an ItemsControl, so it can contain a collection of any object type such as string, image, or panel. The hierarchical inherita...
Create View SQL in SAP HANA database
>Create View View_name as Select Col1,Col2 From Table_name; In the above SQL statement, you are creating a view that contains Col1 and Col2 from the table. Table Name − Emp_Info To create a view, which contains only 3 column...
[ { "code": null, "e": 1122, "s": 1062, "text": ">Create View View_name as\nSelect Col1,Col2 From Table_name;" }, { "code": null, "e": 1218, "s": 1122, "text": "In the above SQL statement, you are creating a view that contains Col1 and Col2 from the table." }, { "code": nul...
MS Project - Plan Duration Cost & Time
After assigning resources to tasks you can view the cost, duration and work required for the plan to complete. In Gantt Chart View → View Tab → Split View group → Timeline checkbox. You will be able to see the plan’s start and finish dates. In the Gantt Chart view, you can also look at the project summary task, to not...
[ { "code": null, "e": 1992, "s": 1881, "text": "After assigning resources to tasks you can view the cost, duration and work required for the plan to complete." }, { "code": null, "e": 2064, "s": 1992, "text": "In Gantt Chart View → View Tab → Split View group → Timeline checkbox.\...
How do I define string constants in C++?
To define a string constant in C++, you have to include the string header library, then create the string constant using this class and the const keyword. #include<iostream> #include<string> int main() { const std::string MY_STRING = "Hello World!"; std::cout << MY_STRING; return 0; } This will give the output − Hello ...
[ { "code": null, "e": 1217, "s": 1062, "text": "To define a string constant in C++, you have to include the string header library, then create the string constant using this class and the const keyword." }, { "code": null, "e": 1348, "s": 1217, "text": "#include<iostream>\n#includ...
Groovy - Arithmetic Operators
The Groovy language supports the normal Arithmetic operators as any the language. Following are the Arithmetic operators available in Groovy − int x = 5; x++; x will give 6 int x = 5; x--; x will give 4 The following code snippet shows how the various operators can be used. class Example { static void main(String[]...
[ { "code": null, "e": 2381, "s": 2238, "text": "The Groovy language supports the normal Arithmetic operators as any the language. Following are the Arithmetic operators available in Groovy −" }, { "code": null, "e": 2392, "s": 2381, "text": "int x = 5;" }, { "code": null, ...
How can we decode a JSON object in Java?
A JSON is a lightweight, text-based and language-independent data exchange format. A JSON can represent two structured types like objects and arrays. We can decode a JSON object using JSONObject and JSONArray from json.simple API. A JSONObject works as a java.util.Map whereas JSONArray works as a java.util.List. In the...
[ { "code": null, "e": 1376, "s": 1062, "text": "A JSON is a lightweight, text-based and language-independent data exchange format. A JSON can represent two structured types like objects and arrays. We can decode a JSON object using JSONObject and JSONArray from json.simple API. A JSONObject works as ...
Macros vs Functions - GeeksforGeeks
19 Oct, 2021 A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before entering into the actual coding (main () function). A macro is defined with the pre-processor directive. Macros are pre-processed which means that...
[ { "code": null, "e": 24013, "s": 23985, "text": "\n19 Oct, 2021" }, { "code": null, "e": 24439, "s": 24013, "text": "A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before en...
Basic Algorithms — Counting Inversions | by Keita Miyaki | Towards Data Science
Even with significant advancement in computing capacities in recent years, it is still costly to operate on large datasets. Writing cost-efficient codes is, thus, one of the critical skills for data scientists. While an algorithm whose cost is linear to the input data size may be not so different from one that costs sq...
[ { "code": null, "e": 572, "s": 171, "text": "Even with significant advancement in computing capacities in recent years, it is still costly to operate on large datasets. Writing cost-efficient codes is, thus, one of the critical skills for data scientists. While an algorithm whose cost is linear to t...
Update 'a' record with 'b' and 'b' with 'a' in a MySQL column (swap) with only 'a' and 'b' values?
For this, use a CASE statement. Let us first create a table − mysql> create table DemoTable ( Value char(1) ); Query OK, 0 rows affected (1.21 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values('a'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values...
[ { "code": null, "e": 1124, "s": 1062, "text": "For this, use a CASE statement. Let us first create a table −" }, { "code": null, "e": 1213, "s": 1124, "text": "mysql> create table DemoTable\n(\n Value char(1)\n);\nQuery OK, 0 rows affected (1.21 sec)" }, { "code": null,...
Tryit Editor v3.7
Tryit: The outline-offset property
[]
How to find and remove duplicates from a table in Oracle?
Problem Statement:You want to find and remove duplicates from a table in Oracle. Solution: We can use Oracle’s internal ROWID value for uniquely identifying rows in a table. The sample syntax to acheive this would like below. delete from table where rowid in (... query here ...) delete from table where rowid in (.....
[ { "code": null, "e": 1143, "s": 1062, "text": "Problem Statement:You want to find and remove duplicates from a table in Oracle." }, { "code": null, "e": 1288, "s": 1143, "text": "Solution: We can use Oracle’s internal ROWID value for uniquely identifying rows in a table. The samp...
Indentation in Python - GeeksforGeeks
26 Nov, 2019 Indentation is a very important concept of Python because without proper indenting the Python code, you will end up seeing IndentationError and the code will not get compiled. In simple terms indentation refers to adding white space before a statement. But the question arises is it even necessary?To unders...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n26 Nov, 2019" }, { "code": null, "e": 24102, "s": 23926, "text": "Indentation is a very important concept of Python because without proper indenting the Python code, you will end up seeing IndentationError and the code will not g...
How to retrieve Date from a table in JDBC?
The ResultSet interface provides a method named getDate() this method accepts an integer parameter representing the index of the column, (or, a String parameter representing the name of the column) from which you need to retrieve the date value. To retrieve date value from a table − Register the driver class using the ...
[ { "code": null, "e": 1346, "s": 1062, "text": "The ResultSet interface provides a method named getDate() this method accepts an integer parameter representing the index of the column, (or, a String parameter representing the name of the column) from which you need to retrieve the date value. To retr...
Erlang - Funs
Funs are used to define anonymous functions in Erlang. The general syntax of an anonymous function is given below − F = fun (Arg1, Arg2, ... ArgN) -> ... End Where F − This is the variable name assigned to the anonymous function. F − This is the variable name assigned to the anonymous function. Arg1, Arg2, ... ArgN...
[ { "code": null, "e": 2417, "s": 2301, "text": "Funs are used to define anonymous functions in Erlang. The general syntax of an anonymous function is given below −" }, { "code": null, "e": 2463, "s": 2417, "text": "F = fun (Arg1, Arg2, ... ArgN) ->\n ...\nEnd\n" }, { "co...
Build and Run a Docker Container for your Machine Learning Model | by Xavier Vasques | Towards Data Science
The idea of this article is to do a quick and easy build of a Docker container with a simple machine learning model and run it. Before reading this article, do not hesitate to read Why use Docker for Machine Learning and Quick Install and First Use of Docker. In order to start building a Docker container for a machine ...
[ { "code": null, "e": 432, "s": 172, "text": "The idea of this article is to do a quick and easy build of a Docker container with a simple machine learning model and run it. Before reading this article, do not hesitate to read Why use Docker for Machine Learning and Quick Install and First Use of Doc...
Difference between %s and %d in Python string
24 Jan, 2021 In this article, we will see the difference between %s and %d in Python. Here, we start with the proper explanation of one at a time, then both, and at last compare these. The % symbol is used in Python with a large variety of data types and configurations. It is used as an argument specifier and string fo...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 200, "s": 28, "text": "In this article, we will see the difference between %s and %d in Python. Here, we start with the proper explanation of one at a time, then both, and at last compare these." ...
Output of Python programs | Set 9 (Dictionary)
09 Mar, 2022 Prerequisite: Dictionary 1) What is the output of the following program? Python3 dictionary = {'GFG' : 'geeksforgeeks.org', 'google' : 'google.com', 'facebook' : 'facebook.com' }del dictionary['google'];for key, values in dictionary.items(): print(key)dictionary.c...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Mar, 2022" }, { "code": null, "e": 126, "s": 52, "text": "Prerequisite: Dictionary 1) What is the output of the following program? " }, { "code": null, "e": 134, "s": 126, "text": "Python3" }, { "code": "...
Solidity – Basics of Interface
11 May, 2022 Interfaces are the same as abstract contracts created by using an interface keyword, also known as a pure abstract contract. Interfaces do not have any definition or any state variables, constructors, or any function with implementation, they only contain function declarations i.e. functions in interfaces ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2022" }, { "code": null, "e": 594, "s": 28, "text": "Interfaces are the same as abstract contracts created by using an interface keyword, also known as a pure abstract contract. Interfaces do not have any definition or any state...
How to determine if a binary tree is height-balanced?
16 Jun, 2022 A tree where no leaf is much farther away from the root than any other leaf. Different balancing schemes allow different definitions of “much farther” and different amounts of work to keep them balanced.Consider a height-balancing scheme where the following conditions should be checked to determine if a bi...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 461, "s": 54, "text": "A tree where no leaf is much farther away from the root than any other leaf. Different balancing schemes allow different definitions of “much farther” and different amounts o...
How to find Windows Product Key Using PowerShell?
Windows Product key can be retrieved using PowerShell or CMD. To retrieve the product key using PowerShell, we need to query SoftwareLicesingService class and there is a property called OA3xOriginalProductKey which stores the product key. Get-WmiObject -query `select * from SoftwareLicensingService' | Select OA3xOrigin...
[ { "code": null, "e": 1426, "s": 1187, "text": "Windows Product key can be retrieved using PowerShell or CMD. To retrieve the product key using PowerShell, we need to query SoftwareLicesingService class and there is a property called OA3xOriginalProductKey which stores the product key." }, { ...
Create a small-caps effect for CSS
To create a small-caps effect, use the font-variant property. You can try to run the following code to learn how to work with font-variant property in CSS: <html> <head> </head> <body> <p style = "font-variant:small-caps;"> Asia, Antartica, Africa are continents </p> </body> </html>
[ { "code": null, "e": 1249, "s": 1187, "text": "To create a small-caps effect, use the font-variant property." }, { "code": null, "e": 1343, "s": 1249, "text": "You can try to run the following code to learn how to work with font-variant property in CSS:" }, { "code": null...
DC.js - Dashboard Working Example
In this chapter, we will develop a dashboard in DC by clicking and selecting a chart. Now, we have the background and can start to write some code. It contains the following steps − Let us add styles in the CSS using the coding given below. <style> .dc-chart { font-size: 12px; } .dc-grid-top { padding-left: 10px;...
[ { "code": null, "e": 2145, "s": 2059, "text": "In this chapter, we will develop a dashboard in DC by clicking and selecting a chart." }, { "code": null, "e": 2241, "s": 2145, "text": "Now, we have the background and can start to write some code. It contains the following steps −"...
Drools - Debugging
There are different ways to debug a Drools project. Here, we will write a Utility class to let you know which rules are being triggered or fired. With this approach, you can check what all rules are getting triggered in your Drools project. Here is our Utility Class package com.sample; import org.drools.spi.KnowledgeHe...
[ { "code": null, "e": 1943, "s": 1797, "text": "There are different ways to debug a Drools project. Here, we will write a Utility class to let you know which rules are being triggered or fired." }, { "code": null, "e": 2064, "s": 1943, "text": "With this approach, you can check wh...
What is a variable, field, property in Java?
In programming to hold data members we use variables, Java you can declare three types of variables namely, Local variables − Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed when the m...
[ { "code": null, "e": 1170, "s": 1062, "text": "In programming to hold data members we use variables, Java you can declare three types of variables namely," }, { "code": null, "e": 1403, "s": 1170, "text": "Local variables − Variables defined inside methods, constructors or blocks...
How to dynamically load a Python class?
There's no available function that takes a fully qualified class name and returns the class. However we can define a function that has this functionality. The following code is of such a function. def get_class( s ): parts = s.split('.') module = ".".join(parts[:-1]) n = __import__( module ) for comp in...
[ { "code": null, "e": 1217, "s": 1062, "text": "There's no available function that takes a fully qualified class name and returns the class. However we can define a function that has this functionality." }, { "code": null, "e": 1259, "s": 1217, "text": "The following code is of su...
Jenkins - Quick Guide
Jenkins is a software that allows continuous integration. Jenkins will be installed on a server where the central build will take place. The following flowchart demonstrates a very simple workflow of how Jenkins works. Along with Jenkins, sometimes, one might also see the association of Hudson. Hudson is a very popular...
[ { "code": null, "e": 2342, "s": 2123, "text": "Jenkins is a software that allows continuous integration. Jenkins will be installed on a server where the central build will take place. The following flowchart demonstrates a very simple workflow of how Jenkins works." }, { "code": null, "e...
Pivot Tables — Data Aggregation Tool in Python | by Tanya Dayanand | Towards Data Science
Exploratory data analysis is an important phase of machine learning projects. The wonderful Pandas library is equipped with several useful functions for this purpose. One among them is pivot_table that summarizes a feature’s values in a neat two-dimensional table. The data summarization tool frequently found in data an...
[ { "code": null, "e": 782, "s": 46, "text": "Exploratory data analysis is an important phase of machine learning projects. The wonderful Pandas library is equipped with several useful functions for this purpose. One among them is pivot_table that summarizes a feature’s values in a neat two-dimensiona...
Create, Append and Modify List in R - GeeksforGeeks
30 Jun, 2021 In R Programming Language, the list is a one dimensional data structure which can hold multiple data type elements. In this article, we are going to create a list and append data into the list and modify the list elements. List can be created by using list() function. Syntax: list(value1,value2,..............
[ { "code": null, "e": 24851, "s": 24823, "text": "\n30 Jun, 2021" }, { "code": null, "e": 25074, "s": 24851, "text": "In R Programming Language, the list is a one dimensional data structure which can hold multiple data type elements. In this article, we are going to create a list ...
Selection Sort | Practice | GeeksforGeeks
Given an unsorted array of size N, use selection sort to sort arr[] in increasing order. Example 1: Input: N = 5 arr[] = {4, 1, 3, 9, 7} Output: 1 3 4 7 9 Explanation: Maintain sorted (in bold) and unsorted subarrays. Select 1. Array becomes 1 4 3 9 7. Select 3. Array becomes 1 3 4 9 7. Select 4. Array becomes 1 3 4 9...
[ { "code": null, "e": 327, "s": 238, "text": "Given an unsorted array of size N, use selection sort to sort arr[] in increasing order." }, { "code": null, "e": 339, "s": 327, "text": "\nExample 1:" }, { "code": null, "e": 632, "s": 339, "text": "Input:\nN = 5\n...
Find common values between two NumPy arrays - GeeksforGeeks
29 Aug, 2020 In NumPy, we can find common values between two arrays with the help intersect1d(). It will take parameter two arrays and it will return an array in which all the common elements will appear. Syntax: numpy.intersect1d(array1,array2) Parameter :Two arrays. Return :An array in which all the common element wi...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n29 Aug, 2020" }, { "code": null, "e": 24484, "s": 24292, "text": "In NumPy, we can find common values between two arrays with the help intersect1d(). It will take parameter two arrays and it will return an array in which all the ...
Is something better than pandas when the dataset fits the memory? | by Vaclav Dekanovsky | Medium | Towards Data Science
The tabular format is still the most typical way how to store data and there’s arguably no better tool how to explore data-tables than python’s pandas. Despite its broad range of capabilities, pandas has limits. In those cases, you have to opt for an alternative. Though, does it make sense to abandon pandas and use ano...
[ { "code": null, "e": 553, "s": 172, "text": "The tabular format is still the most typical way how to store data and there’s arguably no better tool how to explore data-tables than python’s pandas. Despite its broad range of capabilities, pandas has limits. In those cases, you have to opt for an alte...
JavaScript - Debugging
Every now and then, developers commit mistakes while coding. A mistake in a program or a script is referred to as a bug. The process of finding and fixing bugs is called debugging and is a normal part of the development process. This section covers tools and techniques that can help you with debugging tasks.. The most ...
[ { "code": null, "e": 2587, "s": 2466, "text": "Every now and then, developers commit mistakes while coding. A mistake in a program or a script is referred to as a bug." }, { "code": null, "e": 2777, "s": 2587, "text": "The process of finding and fixing bugs is called debugging an...
C program to print a string without any quote in the program
This is another tricky problem. In this program, we will see how to print a string using C where no quotation marks are used. Here we are using macro function. We are defining a macro function like #define getString(x) #x The getString() is a macro function. It returns x by converting it into a string. The # before x i...
[ { "code": null, "e": 1188, "s": 1062, "text": "This is another tricky problem. In this program, we will see how to print a string using C where no quotation marks are used." }, { "code": null, "e": 1260, "s": 1188, "text": "Here we are using macro function. We are defining a macr...
Computer Arithmetic | Set - 1 - GeeksforGeeks
07 Apr, 2021 Negative Number Representation Sign Magnitude Sign magnitude is a very simple representation of negative numbers. In sign magnitude the first bit is dedicated to represent the sign and hence it is called sign bit. Sign bit ‘1’ represents negative sign. Sign bit ‘0’ represents positive sign. In sign magni...
[ { "code": null, "e": 26443, "s": 26415, "text": "\n07 Apr, 2021" }, { "code": null, "e": 26476, "s": 26445, "text": "Negative Number Representation" }, { "code": null, "e": 26491, "s": 26476, "text": "Sign Magnitude" }, { "code": null, "e": 26659, ...
Tryit Editor v3.7
Tryit: HTML style attribute
[]
Math Operations on BigInteger in Java
Let us apply the following operations on BigInteger using the in-built methods in Java. Addition: add() method Subtraction: subtract() method Multiplication: multiply() method Division: divide() method Let us create three BigInteger objects. BigInteger one = new BigInteger("98765432123456789"); BigInteger two = new Big...
[ { "code": null, "e": 1150, "s": 1062, "text": "Let us apply the following operations on BigInteger using the in-built methods in Java." }, { "code": null, "e": 1264, "s": 1150, "text": "Addition: add() method\nSubtraction: subtract() method\nMultiplication: multiply() method\nDiv...
Convert a Mobile Numeric Keypad sequence to equivalent sentence - GeeksforGeeks
28 Jan, 2022 Given a string S of size N, consisting of digits [0 – 9] and character ‘.’, the task is to print the string that can be obtained by pressing the mobile keypad in the given sequence. Note: ‘.’ represents a break while typing. Below is the image to represent the characters associated with each number in the...
[ { "code": null, "e": 24904, "s": 24876, "text": "\n28 Jan, 2022" }, { "code": null, "e": 25087, "s": 24904, "text": "Given a string S of size N, consisting of digits [0 – 9] and character ‘.’, the task is to print the string that can be obtained by pressing the mobile keypad in t...
How to pass data between Activities on an Android application using Kotlin?
This example demonstrates how to pass data between Activities on an Android application using Kotlin. 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" enco...
[ { "code": null, "e": 1164, "s": 1062, "text": "This example demonstrates how to pass data between Activities on an Android application using Kotlin." }, { "code": null, "e": 1293, "s": 1164, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fi...
Bellman–Ford Algorithm for Shortest Paths
Bellman-Ford algorithm is used to find minimum distance from the source vertex to any other vertex. The main difference between this algorithm with Dijkstra’s the algorithm is, in Dijkstra’s algorithm we cannot handle the negative weight, but here we can handle it easily. Bellman-Ford algorithm finds the distance in a ...
[ { "code": null, "e": 1335, "s": 1062, "text": "Bellman-Ford algorithm is used to find minimum distance from the source vertex to any other vertex. The main difference between this algorithm with Dijkstra’s the algorithm is, in Dijkstra’s algorithm we cannot handle the negative weight, but here we ca...
Display multiple lines of text in a component’s tooltip with Java
Let’s first see how we set text in a components tooltip − JLabel label3 = new JLabel("Password", SwingConstants.CENTER); label3.setToolTipText("Enter Password"); To display multiple lines of text in a tooltip, use <html>. Here, we have used the HTML <br> tag for new line and that would create multiple lines of text in ...
[ { "code": null, "e": 1120, "s": 1062, "text": "Let’s first see how we set text in a components tooltip −" }, { "code": null, "e": 1224, "s": 1120, "text": "JLabel label3 = new JLabel(\"Password\", SwingConstants.CENTER);\nlabel3.setToolTipText(\"Enter Password\");" }, { "...
Tilt of Binary Tree | Practice | GeeksforGeeks
Given a binary tree of size N+1, your task is to complete the function tiltTree(), that return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree node values. Null nodes are assigned tilt to be zero. ...
[ { "code": null, "e": 634, "s": 238, "text": "Given a binary tree of size N+1, your task is to complete the function tiltTree(), that return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all rig...
Java Connection getClientInfo() method with example
The getClientInfo() method of the Connection interface returns the name and values of the client info properties of the current connection. This method returns a properties object. To retrieve the values of the client info properties file. Register the driver using the registerDriver() method of the DriverManager class...
[ { "code": null, "e": 1243, "s": 1062, "text": "The getClientInfo() method of the Connection interface returns the name and values of the client info properties of the current connection. This method returns a properties object." }, { "code": null, "e": 1302, "s": 1243, "text": "T...
Query to find Nth maximum value in MySQL
Let us first create a table − mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.59 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(40); Query OK, 1 row affected (0.26 sec) mysql> insert into DemoTable values(60); Query OK, 1 row ...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1192, "s": 1092, "text": "mysql> create table DemoTable\n -> (\n -> Value int\n -> );\nQuery OK, 0 rows affected (0.59 sec)" }, { "code": null, "e": 1248, "...
Serving ML Models in Production with FastAPI and Celery | by Jonathan Readshaw | Towards Data Science
There is an abundance of material online related to building and training all kinds of machine learning models. However once a high performance model has been trained there is significantly less material for how to put it into production. This post walks through a working example for serving a ML model using Celery and...
[ { "code": null, "e": 410, "s": 171, "text": "There is an abundance of material online related to building and training all kinds of machine learning models. However once a high performance model has been trained there is significantly less material for how to put it into production." }, { "c...
Pandas timeseries plot setting X-axis major and minor ticks and labels
Using Pandas, we can create a dataframe with time and speed, and thereafter, we can use the data frame to get the desired plot. Construct a new Generator with the default BitGenerator (PCG64). Construct a new Generator with the default BitGenerator (PCG64). Using Pandas, get a fixed frequency DatetimeIndex. From '2020-...
[ { "code": null, "e": 1190, "s": 1062, "text": "Using Pandas, we can create a dataframe with time and speed, and thereafter, we can use the data frame to get the desired plot." }, { "code": null, "e": 1255, "s": 1190, "text": "Construct a new Generator with the default BitGenerato...
Tryit Editor v3.7
Tryit: HTML HEX color values
[]
TypeScript | Array filter() Method - GeeksforGeeks
18 Jun, 2020 The Array.filter() is an inbuilt TypeScript function which is used to creates a new array with all elements that pass the test implemented by the provided function. Syntax: array.filter(callback[, thisObject]) Parameter: This methods accepts two parameter as mentioned and described below: callback : This p...
[ { "code": null, "e": 24434, "s": 24406, "text": "\n18 Jun, 2020" }, { "code": null, "e": 24607, "s": 24434, "text": "The Array.filter() is an inbuilt TypeScript function which is used to creates a new array with all elements that pass the test implemented by the provided function...
Partition problem | DP-18 - GeeksforGeeks
23 Mar, 2022 Partition problem is to determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is the same. Examples: arr[] = {1, 5, 11, 5} Output: true The array can be partitioned as {1, 5, 5} and {11} arr[] = {1, 5, 3} Output: false The array cannot be parti...
[ { "code": null, "e": 24890, "s": 24862, "text": "\n23 Mar, 2022" }, { "code": null, "e": 25040, "s": 24890, "text": "Partition problem is to determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is the same. " }, { ...
Comparing RNN Architectures for Lyric Generation | Towards Data Science
Music has long been considered to be one of the most influential and powerful forms of artwork. As such, it has been used to express raw emotion from the artist and transfer it to the listener. Being a fan of music myself, it was only natural to wonder how difficult it would be to generate lyrics using recurrent neural...
[ { "code": null, "e": 365, "s": 171, "text": "Music has long been considered to be one of the most influential and powerful forms of artwork. As such, it has been used to express raw emotion from the artist and transfer it to the listener." }, { "code": null, "e": 679, "s": 365, "...
Java Swing | Popup and PopupFactory with examples - GeeksforGeeks
16 Jun, 2021 Popup and PopupFactory are a part of the Java Swing library. Popups are used when we want to display to the user a Component on the top of all the other Components in that particular containment hierarchy. PopupFactory is the class that is used to create popups. Popups have a very small life cycle, and gen...
[ { "code": null, "e": 23974, "s": 23946, "text": "\n16 Jun, 2021" }, { "code": null, "e": 24379, "s": 23974, "text": "Popup and PopupFactory are a part of the Java Swing library. Popups are used when we want to display to the user a Component on the top of all the other Components...
Visualizing Three-Dimensional Data in Python | Towards Data Science
When you are measuring the dependence of a property on multiple independent variables, you now need to plot data in three dimensions. Examples of this typically occur with spatial measurements, where there is an intensity associated with each (x, y) point, like in a rastered microscopy measurement or spatial diffractio...
[ { "code": null, "e": 654, "s": 172, "text": "When you are measuring the dependence of a property on multiple independent variables, you now need to plot data in three dimensions. Examples of this typically occur with spatial measurements, where there is an intensity associated with each (x, y) point...
Java Program For Finding The Middle Element Of A Given Linked List - GeeksforGeeks
08 Dec, 2021 Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should be 3. If there are even nodes, then there would be two middle nodes, we need to print the second middle element. For example, if given linked list is 1->2->3->4->5-...
[ { "code": null, "e": 24098, "s": 24067, "text": " \n08 Dec, 2021\n" }, { "code": null, "e": 24437, "s": 24098, "text": "Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should be 3. If there are...
Call by Value Vs Call by Reference in JavaScript - GeeksforGeeks
31 Aug, 2020 Call by Value: Suppose there is a variable named “a”. Now, we store a primitive value(boolean, integer, float, etc) in the variable “a”. Let us store an integer value in “a”, Let a=5. Now the variable “a” stores 5 and has an address location where that primitive value sits in memory. Now, suppose we copy t...
[ { "code": null, "e": 24831, "s": 24803, "text": "\n31 Aug, 2020" }, { "code": null, "e": 24968, "s": 24831, "text": "Call by Value: Suppose there is a variable named “a”. Now, we store a primitive value(boolean, integer, float, etc) in the variable “a”." }, { "code": null...
Machine Learning 101: Predicting Drug Use Using Logistic Regression In R | by Leihua Ye, PhD | Towards Data Science
Executive Summary Generalized Linear Models (GLM) Three types of link function: Logit, Probit, and Complementary log-log (cloglog) Building a logistic regression to predict drug use and compare these three types of GLM In Machine Learning 101 courses, stats professors introduce GLM right after linear regression as the ...
[ { "code": null, "e": 189, "s": 171, "text": "Executive Summary" }, { "code": null, "e": 221, "s": 189, "text": "Generalized Linear Models (GLM)" }, { "code": null, "e": 302, "s": 221, "text": "Three types of link function: Logit, Probit, and Complementary log-...
Classification Basics: Walk-through with the Iris Data Set | Towards Data Science
When I was first learning how to code, I would practice my data skills on different data sets to create mini Jupyter Notebook reference guides. Since I have found this to be an incredibly useful tool, I thought I’d start sharing code walk-throughs. Hopefully this is a positive resource for those learning to use Python ...
[ { "code": null, "e": 601, "s": 172, "text": "When I was first learning how to code, I would practice my data skills on different data sets to create mini Jupyter Notebook reference guides. Since I have found this to be an incredibly useful tool, I thought I’d start sharing code walk-throughs. Hopefu...
Binding mouse double click in Tkinter
Let us suppose that for a particular application, we want to bind the mouse double-click so that it performs some event or operation. We can use the bind(‘<Double-Button-1>’, handler) or bind(‘<Double-Button-2>’, handler) methods to bind the mouse Left or Right Buttons with a handler or a callback function. In this exa...
[ { "code": null, "e": 1371, "s": 1062, "text": "Let us suppose that for a particular application, we want to bind the mouse double-click so that it performs some event or operation. We can use the bind(‘<Double-Button-1>’, handler) or bind(‘<Double-Button-2>’, handler) methods to bind the mouse Left ...
T-SQL - Quick Guide
In 1970's the product called 'SEQUEL', structured English query language, developed by IBM and later SEQUEL was renamed to 'SQL' which stands for Structured Query Language. In 1986, SQL was approved by ANSI (American national Standards Institute) and in 1987, it was approved by ISO (International Standards Organization...
[ { "code": null, "e": 2233, "s": 2060, "text": "In 1970's the product called 'SEQUEL', structured English query language, developed by IBM and later SEQUEL was renamed to 'SQL' which stands for Structured Query Language." }, { "code": null, "e": 2383, "s": 2233, "text": "In 1986, ...
Finding Donors: Classification Project With PySpark | by Victor Roman | Towards Data Science
The aim of this article is to make a gentle introduction to Classification problems in Machine Learning and go through a comprehensive guide to develop succesfully a class prediction using PySpark. So without further a do, let’s jump into it! If you want to a deep explanation about Classification problems, its main alg...
[ { "code": null, "e": 370, "s": 172, "text": "The aim of this article is to make a gentle introduction to Classification problems in Machine Learning and go through a comprehensive guide to develop succesfully a class prediction using PySpark." }, { "code": null, "e": 415, "s": 370, ...
Tryit Editor v3.6 - Show Python
mydb = mysql.connector.connect( host="localhost", user="myusername", password="mypassword", database="mydatabase" ) ​ mycursor = mydb.cursor()
[ { "code": null, "e": 57, "s": 25, "text": "mydb = mysql.connector.connect(" }, { "code": null, "e": 77, "s": 57, "text": " host=\"localhost\"," }, { "code": null, "e": 98, "s": 77, "text": " user=\"myusername\"," }, { "code": null, "e": 123, ...
Peewee - Delete Records
Running delete_instance() method on a model instance delete corresponding row from the mapped table. obj=User.get(User.name=="Amar") obj.delete_instance() On the other hand, delete() is a class method defined in model class, which generates DELETE query. Executing it effectively deletes rows from the table. db.create_t...
[ { "code": null, "e": 2485, "s": 2384, "text": "Running delete_instance() method on a model instance delete corresponding row from the mapped table." }, { "code": null, "e": 2539, "s": 2485, "text": "obj=User.get(User.name==\"Amar\")\nobj.delete_instance()" }, { "code": nu...
Program to print pyramid pattern in C
A pyramid is a polyhedron formed by connecting a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral face. It is a conic solid with polygonal base. A pyramid with an n-sided base has n + 1 vertices, n + 1 faces, and 2n edges. All pyramids are self-dual. Accept the numb...
[ { "code": null, "e": 1367, "s": 1062, "text": "A pyramid is a polyhedron formed by connecting a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral face. It is a conic solid with polygonal base. A pyramid with an n-sided base has n + 1 vertices, n +...
Python Program to Append, Delete and Display Elements of a List Using Classes
When it is required to append, delete, and display the elements of a list using classes, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is created, and the functions are used to add el...
[ { "code": null, "e": 1484, "s": 1062, "text": "When it is required to append, delete, and display the elements of a list using classes, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An ins...
DateTime.AddMinutes() Method in C# - GeeksforGeeks
18 Jan, 2019 This method is used to return a new DateTime that adds the specified number of minutes to the value of this instance. Syntax: public DateTime AddMinutes (double value); Here, value is a number of whole and fractional minutes. The value parameter can be negative or positive. Return Value: This method return...
[ { "code": null, "e": 23911, "s": 23883, "text": "\n18 Jan, 2019" }, { "code": null, "e": 24029, "s": 23911, "text": "This method is used to return a new DateTime that adds the specified number of minutes to the value of this instance." }, { "code": null, "e": 24037, ...
How to format a string to date in as dd-MM-yyyy using java?
The java.text package provides a class named SimpleDateFormat which is used to format and parse dates in required manner (local). Using the methods of this class you can parse String to Date or, format Date to String. You can parse a given String to Date object using the parse() method of the SimpleDateFormat class. To...
[ { "code": null, "e": 1192, "s": 1062, "text": "The java.text package provides a class named SimpleDateFormat which is used to format and parse dates in required manner (local)." }, { "code": null, "e": 1280, "s": 1192, "text": "Using the methods of this class you can parse String...
Total coverage of all zeros in a binary matrix
06 Jul, 2022 Given a binary matrix that is, it contains 0s and 1s only, we need to find sum of coverage of all zeros of the matrix where coverage for a particular 0 is defined as total number of ones around a zero in left, right, up and bottom directions. The ones can be anywhere till corner point in a direction. Exam...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jul, 2022" }, { "code": null, "e": 356, "s": 53, "text": "Given a binary matrix that is, it contains 0s and 1s only, we need to find sum of coverage of all zeros of the matrix where coverage for a particular 0 is defined as total nu...
Python | os.rmdir() method
29 May, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. All functions in os module raise OSError in the case of invalid or inaccessible file nam...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2019" }, { "code": null, "e": 247, "s": 28, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin...
How to Add Title to Subplots in Matplotlib?
03 Jan, 2021 In this article, we will see how to add a title to subplots in Matplotlib? Let’s discuss some concepts : Matplotlib : Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with th...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jan, 2021" }, { "code": null, "e": 157, "s": 52, "text": "In this article, we will see how to add a title to subplots in Matplotlib? Let’s discuss some concepts :" }, { "code": null, "e": 433, "s": 157, "text": "...
Python | Add leading Zeros to string
25 Jun, 2022 Sometimes, during the string manipulation, we are into a problem where we need to pad or add leading zeroes to the string as per the requirements. This problem can occur in web development. Having shorthands to solve this problem turns out to be handy in many situations. Let’s discuss certain ways in which...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Jun, 2022" }, { "code": null, "e": 365, "s": 28, "text": "Sometimes, during the string manipulation, we are into a problem where we need to pad or add leading zeroes to the string as per the requirements. This problem can occur in we...
PHP | ctype_digit() (Checks for numeric value)
05 Jun, 2018 A ctype_digit() function in PHP used to check each and every character of text are numeric or not. It returns TRUE if all characters of the string are numeric otherwise return FALSE. Syntax : ctype_digit(string text) Parameter Used:The ctype_digit() function in PHP accepts only one parameter. text : Its m...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jun, 2018" }, { "code": null, "e": 211, "s": 28, "text": "A ctype_digit() function in PHP used to check each and every character of text are numeric or not. It returns TRUE if all characters of the string are numeric otherwise return...
D3.js axis.ticks() Function
07 Aug, 2020 The d3.axis.ticks() Function in D3.js is used to control which ticks are displayed by the axis. This function returns the axis generator Syntax: axis.ticks(arguments...) axis.ticks([count[, specifier]]) axis.ticks([interval[, specifier]]) Parameters: This function accepts the following parameters. count/in...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 165, "s": 28, "text": "The d3.axis.ticks() Function in D3.js is used to control which ticks are displayed by the axis. This function returns the axis generator" }, { "code": null, "e": 1...
How to use JavaScript Fetch API to Get Data ?
08 Jan, 2021 The Fetch API provides a JavaScript interface that enables users to manipulate and access parts of the HTTP pipeline such as responses and requests. Fetch API has so many rich and exciting options like method, headers, body, referrer, mode, credentials, cache, redirect, integrity and few more. However, th...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jan, 2021" }, { "code": null, "e": 202, "s": 52, "text": "The Fetch API provides a JavaScript interface that enables users to manipulate and access parts of the HTTP pipeline such as responses and requests. " }, { "code": nu...
Ways to filter Pandas DataFrame by column values
01 Oct, 2020 In this post, we will see different ways to filter Pandas Dataframe by column values. First, Let’s create a Dataframe: Python3 # importing pandas import pandas as pd # declare a dictionaryrecord = { 'Name' : ['Ankit', 'Swapnil', 'Aishwarya', 'Priyanka', 'Shivangi', 'Shaurya' ], 'Age' :...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 147, "s": 28, "text": "In this post, we will see different ways to filter Pandas Dataframe by column values. First, Let’s create a Dataframe:" }, { "code": null, "e": 155, "s": 147, ...
Python – Split heterogeneous type list
16 Sep, 2021 Sometimes, we might be working with many data types and in these instances, we can have a problem in which list that we receive might be having elements from different data types. Let’s discuss certain ways in which this task can be performed. Method #1 : Using list comprehension + isinstance() The combina...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Sep, 2021" }, { "code": null, "e": 272, "s": 28, "text": "Sometimes, we might be working with many data types and in these instances, we can have a problem in which list that we receive might be having elements from different data ty...
How to add Key Value Pair to List in R ?
01 Oct, 2021 A key-value pair can be explained as a set of two linked data items where a key uniquely identifies a value or a set of values in the data. Since a list can hold multiple data-types data, we can have a key-value pair stored in the list We can assign variables to each key and value. Store each key-value pai...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2021" }, { "code": null, "e": 264, "s": 28, "text": "A key-value pair can be explained as a set of two linked data items where a key uniquely identifies a value or a set of values in the data. Since a list can hold multiple data...