title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
C++ Program to compute division upto n decimal places
Given with the value of x and y as a positive integer with the value of n for number of decimal places and the task is to generate the division up to n decimal places. Input-: x = 36, y = 7, n = 5 Output-: 5.14285 Input-: x = 22, y = 7, n = 10 Output-: 3.1428571428 Approach used in the below program is as follows − Inp...
[ { "code": null, "e": 1230, "s": 1062, "text": "Given with the value of x and y as a positive integer with the value of n for number of decimal places and the task is to generate the division up to n decimal places." }, { "code": null, "e": 1328, "s": 1230, "text": "Input-: x = 36...
Functional Programming - Recursion
A function that calls itself is known as a recursive function and this technique is known as recursion. A recursion instruction continues until another instruction prevents it. The following example shows how recursion works in C++, which is an object-oriented programming language − #include <stdio.h> long int fact(in...
[ { "code": null, "e": 1998, "s": 1821, "text": "A function that calls itself is known as a recursive function and this technique is known as recursion. A recursion instruction continues until another instruction prevents it." }, { "code": null, "e": 2105, "s": 1998, "text": "The f...
AWT Event Classes
The Event classes represent the event. Java provides us various Event classes but we will discuss those which are more frequently used. It is the root class from which all event state objects shall be derived. All Events are constructed with a reference to the object, the source, that is logically deemed to be the obje...
[ { "code": null, "e": 1883, "s": 1747, "text": "The Event classes represent the event. Java provides us various Event classes but we will discuss those which are more frequently used." }, { "code": null, "e": 2171, "s": 1883, "text": "It is the root class from which all event stat...
Finding Data Type of User Input using Regular Expression in Java - GeeksforGeeks
16 Oct, 2020 Given a string, the task is to find its corresponding datatype using regular expression in java. We can broadly classify all data types into following types: Integer: Numeric datatypes like byte, short, int, long take the form of an Integer object.Double: Decimal datatypes like float and double take the fo...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n16 Oct, 2020" }, { "code": null, "e": 24045, "s": 23948, "text": "Given a string, the task is to find its corresponding datatype using regular expression in java." }, { "code": null, "e": 24106, "s": 24045, "t...
XML - Databases
XML Database is used to store huge amount of information in the XML format. As the use of XML is increasing in every field, it is required to have a secured place to store the XML documents. The data stored in the database can be queried using XQuery, serialized, and exported into a desired format. There are two major ...
[ { "code": null, "e": 2261, "s": 1961, "text": "XML Database is used to store huge amount of information in the XML format. As the use of XML is increasing in every field, it is required to have a secured place to store the XML documents. The data stored in the database can be queried using XQuery, s...
Batch Script - Files
In this chapter, we will learn how to create, save, execute, and modify batch files. Batch files are normally created in notepad. Hence the simplest way is to open notepad and enter the commands required for the script. For this exercise, open notepad and enter the following statements. :: Deletes All files in the Curr...
[ { "code": null, "e": 2254, "s": 2169, "text": "In this chapter, we will learn how to create, save, execute, and modify batch files." }, { "code": null, "e": 2457, "s": 2254, "text": "Batch files are normally created in notepad. Hence the simplest way is to open notepad and enter ...
Dynamically Add/Delete HTML Table Rows Using Javascript
Theory of Computation In this article, you will learn how to create a simple user interface where a user can add or delete multiple table rows in a form dynamically using Javascript. Sometimes, there may be a requirement for the user to add multiple repeated row's fields in a form. We cannot assume how many fields we s...
[ { "code": null, "e": 112, "s": 90, "text": "Theory of Computation" }, { "code": null, "e": 273, "s": 112, "text": "In this article, you will learn how to create a simple user interface where a user can add or delete multiple table rows in a form dynamically using Javascript." }...
C++ Break and Continue
You have already seen the break statement used in an earlier chapter of this tutorial. It was used to "jump out" of a switch statement. The break statement can also be used to jump out of a loop. This example jumps out of the loop when i is equal to 4: The continue statement breaks one iteration (in the loop), if a sp...
[ { "code": null, "e": 136, "s": 0, "text": "You have already seen the break statement used in an earlier chapter of this tutorial. It was used to \"jump out\" of a switch statement." }, { "code": null, "e": 197, "s": 136, "text": "The break statement can also be used to jump out o...
Longest Mountain in Array in C++
Consider any (contiguous) subarray B (of A) a called mountain if the following properties hold − size of B >= 3 There exists some 0 < i < B.length - 1 such that B[0] < B[1] < ... B[i-1] < B[i] > B[i+1] > ... > B[B.length - 1] Suppose we have an array A of integers; we have to find the length of the longest mountain. We...
[ { "code": null, "e": 1159, "s": 1062, "text": "Consider any (contiguous) subarray B (of A) a called mountain if the following properties hold −" }, { "code": null, "e": 1174, "s": 1159, "text": "size of B >= 3" }, { "code": null, "e": 1288, "s": 1174, "text": ...
How to delete a column from Pandas DataFrame
To delete a column from a DataFrame, use del(). You can also use pop() method to delete. Just drop it using square brackets. Mention the column to be deleted in the brackets and that’s it, for example − del dataFrame[‘ColumnName’] Import the required library with an alias − import pandas as pd Create a Pandas DataFrame...
[ { "code": null, "e": 1265, "s": 1062, "text": "To delete a column from a DataFrame, use del(). You can also use pop() method to delete. Just drop it using square brackets. Mention the column to be deleted in the brackets and that’s it, for example −" }, { "code": null, "e": 1293, "s"...
Python - Recursion
Recursion allows a function to call itself. Fixed steps of code get executed again and again for new values. We also have to set criteria for deciding when the recursive call ends. In the below example we see a recursive approach to the binary search. We take a sorted list and give its index range as input to the recur...
[ { "code": null, "e": 2662, "s": 2327, "text": "Recursion allows a function to call itself. Fixed steps of code get executed again and again for new values. We also have to set criteria for deciding when the recursive call ends. In the below example we see a recursive approach to the binary search. W...
How to bitwise XOR of hex numbers in Python?
You can get the XOR of any type of numbers using the ^ operator. Specifically for hex numbers, you can use: a = 0x12ef b = 0xabcd print(hex(a ^ b)) This will give the output: 0xb922 The 0x at the beginning of the numbers implies that the number is in hex representation. You can use the ^ operator for other integer repr...
[ { "code": null, "e": 1170, "s": 1062, "text": "You can get the XOR of any type of numbers using the ^ operator. Specifically for hex numbers, you can use:" }, { "code": null, "e": 1210, "s": 1170, "text": "a = 0x12ef\nb = 0xabcd\nprint(hex(a ^ b))" }, { "code": null, ...
How to enable vertical scroll bar for android webview?
This example demonstrate about How to set default text encoded for android webview. 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": 1146, "s": 1062, "text": "This example demonstrate about How to set default text encoded for android webview." }, { "code": null, "e": 1275, "s": 1146, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required de...
Capsule Neural Networks: The Next Neural Networks? Part 1: CNNs and their problems. | by Tomer Eldor | Towards Data Science
This is part of a series of posts built to teach about Capsule Neural Networks. This first post will explain about “normal” (convolutional) Neural Networks and their problems. Neural Networks may be the hottest field in Machine Learning. In recent years, there were many new developments improving neural networks and bu...
[ { "code": null, "e": 347, "s": 171, "text": "This is part of a series of posts built to teach about Capsule Neural Networks. This first post will explain about “normal” (convolutional) Neural Networks and their problems." }, { "code": null, "e": 1331, "s": 347, "text": "Neural Ne...
UnitTest Framework - Doctest
Python' standard distribution contains 'Doctest' module. This module's functionality makes it possible to search for pieces of text that look like interactive Python sessions, and executes these sessions to see if they work exactly as shown. Doctest can be very useful in the following scenarios − To check that a module...
[ { "code": null, "e": 2340, "s": 2098, "text": "Python' standard distribution contains 'Doctest' module. This module's functionality makes it possible to search for pieces of text that look like interactive Python sessions, and executes these sessions to see if they work exactly as shown." }, { ...
Cohort Analysis Visualization with R | by Pararawendy Indarjo | Towards Data Science
If you are a data practitioner in the B2C (Business to Consumer) industry, or simply a data-geek who has analyzed some consumer data, chances are you must be familiar with cohort analysis. Cohort analysis is an analytic method where we first group individuals who belong to the dataset into different cohorts with specif...
[ { "code": null, "e": 361, "s": 172, "text": "If you are a data practitioner in the B2C (Business to Consumer) industry, or simply a data-geek who has analyzed some consumer data, chances are you must be familiar with cohort analysis." }, { "code": null, "e": 687, "s": 361, "text"...
JavaScript Events
HTML events are "things" that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can "react" on these events. An HTML event can be something the browser does, or something a user does. Here are some examples of HTML events: An HTML web page has finished loading An HTML input field was changed ...
[ { "code": null, "e": 55, "s": 0, "text": "HTML events are \"things\" that happen to HTML elements." }, { "code": null, "e": 136, "s": 55, "text": "When JavaScript is used in HTML pages, JavaScript can \n\"react\" on \nthese events." }, { "code": null, "e": 211, "s...
CSS3 - Rounded Corners
CSS3 Rounded corners are used to add special colored corner to body or text by using the border-radius property.A simple syntax of rounded corners is as follows − #rcorners7 { border-radius: 60px/15px; background: #FF0000; padding: 20px; width: 200px; height: 150px; } The following table shows the poss...
[ { "code": null, "e": 2789, "s": 2626, "text": "CSS3 Rounded corners are used to add special colored corner to body or text by using the border-radius property.A simple syntax of rounded corners is as follows −" }, { "code": null, "e": 2912, "s": 2789, "text": "#rcorners7 {\n bo...
Boyce-Codd Normal Form (BCNF) - GeeksforGeeks
27 Jan, 2020 Application of the general definitions of 2NF and 3NF may identify additional redundancy caused by dependencies that violate one or more candidate keys. However, despite these additional constraints, dependencies can still exist that will cause redundancy to be present in 3NF relations. This weakness in 3N...
[ { "code": null, "e": 24660, "s": 24632, "text": "\n27 Jan, 2020" }, { "code": null, "e": 25069, "s": 24660, "text": "Application of the general definitions of 2NF and 3NF may identify additional redundancy caused by dependencies that violate one or more candidate keys. However, d...
Fortran - Logical Operators
The following table shows all the logical operators supported by Fortran. Assume variable A holds .true. and variable B holds .false. , then − Try the following example to understand all the logical operators available in Fortran − program logicalOp ! this program checks logical operators implicit none ! variable d...
[ { "code": null, "e": 2289, "s": 2146, "text": "The following table shows all the logical operators supported by Fortran. Assume variable A holds .true. and variable B holds .false. , then −" }, { "code": null, "e": 2378, "s": 2289, "text": "Try the following example to understand...
Swift - Literals
A literal is the source code representation of a value of an integer, floating-point number, or string type. The following are examples of literals − 42 // Integer literal 3.14159 // Floating-point literal "Hello, world!" // String literal An integer literal can be a decimal, binary, octal, ...
[ { "code": null, "e": 2403, "s": 2253, "text": "A literal is the source code representation of a value of an integer, floating-point number, or string type. The following are examples of literals −" }, { "code": null, "e": 2521, "s": 2403, "text": "42 // Integer lit...
How to Get the Datatype of a Column of a Table using JDBC? - GeeksforGeeks
21 Aug, 2021 Java supports many databases and for each database, we need to have their respective jar files to be placed in the build path to proceed for JDBC connectivity. MySQL: mysql-connector-java-8.0.22 or similar mysql connectors with different versions. In this article, we are using mysql-connector-java-8.0.22 S...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n21 Aug, 2021" }, { "code": null, "e": 23717, "s": 23557, "text": "Java supports many databases and for each database, we need to have their respective jar files to be placed in the build path to proceed for JDBC connectivity." ...
\pmb - Tex Command
\pmb - poor man's bold. { \pmb #1 } \pmb command turns on poor man's bold. It works by duplicating its argument slightly offset, giving a bold effect (at least in the horizontal direction); doesn't work well for horizontal lines, like - or +. a \pmb a \boldsymbol a aaaa \pmb{a+b-c}\ \ a+b-c a+b−ca+b−c a+b−c a ...
[ { "code": null, "e": 8010, "s": 7986, "text": "\\pmb - poor man's bold." }, { "code": null, "e": 8022, "s": 8010, "text": "{ \\pmb #1 }" }, { "code": null, "e": 8229, "s": 8022, "text": "\\pmb command turns on poor man's bold. It works by duplicating its argum...
final vs Immutability in Java - GeeksforGeeks
02 Mar, 2022 final: In Java, final is a modifier that is used for class, method, and variable also. When a variable is declared with the final keyword, its value can’t be modified, essentially, a constant. Immutability: In simple terms, immutability means unchanging overtime or being unable to be changed. In Java, we k...
[ { "code": null, "e": 23583, "s": 23555, "text": "\n02 Mar, 2022" }, { "code": null, "e": 23991, "s": 23583, "text": "final: In Java, final is a modifier that is used for class, method, and variable also. When a variable is declared with the final keyword, its value can’t be modif...
Lolcode - Quick Guide
LOLCODE is an esoteric programming language inspired by the funny things on the Internet. It is designed to test the boundaries of programming language design. This chapter will make you familiar with setting up the local environment for LOLCODE, installing it on Windows, and executing its script online at Tutorialspoi...
[ { "code": null, "e": 2000, "s": 1840, "text": "LOLCODE is an esoteric programming language inspired by the funny things on the Internet. It is designed to test the boundaries of programming language design." }, { "code": null, "e": 2177, "s": 2000, "text": "This chapter will make...
Deploy and Host your Data Science Project | by Merlin Schäfer | Towards Data Science
You’ve analyzed a data set and found interesting insights, you have built a machine learning pipeline, but so far they just live within your jupyter notebook. If others want to view your work they have to read through your notebook and view every output, that’s only ideal in a few cases. It’s time to take your work and...
[ { "code": null, "e": 520, "s": 172, "text": "You’ve analyzed a data set and found interesting insights, you have built a machine learning pipeline, but so far they just live within your jupyter notebook. If others want to view your work they have to read through your notebook and view every output, ...
How to read a text file in Python?
A text file is the file containing simple text. Python provides inbuilt functions to read, create and write text files. We will discuss how to read a text file in Python. There are three ways to read a text file in Python − read() − This method reads the entire file and returns a single string containing all the conten...
[ { "code": null, "e": 1233, "s": 1062, "text": "A text file is the file containing simple text. Python provides inbuilt functions to read, create and write text files. We will discuss how to read a text file in Python." }, { "code": null, "e": 1286, "s": 1233, "text": "There are t...
Difference between background and background-color - GeeksforGeeks
16 Jul, 2019 Background PropertyThe background property in CSS is very commonly used and contains many variants. The background property consists of all the following properties:background-colorbackground-imagebackground-positionbackground-sizebackground-repeatbackground-originbackground-clipbackground-attachmentBackgr...
[ { "code": null, "e": 24261, "s": 24233, "text": "\n16 Jul, 2019" }, { "code": null, "e": 26134, "s": 24261, "text": "Background PropertyThe background property in CSS is very commonly used and contains many variants. The background property consists of all the following propertie...
How Ternary operator in PowerShell Works?
The ternary operator in PowerShell was introduced with the PowerShell version7.0. The ternary operator has ‘?’ (question mark) symbol and its syntax is, [Condition] ? (output if True) : (output if false) The left side of the ternary operator is condition and the right side is output based on the condition statement. Th...
[ { "code": null, "e": 1215, "s": 1062, "text": "The ternary operator in PowerShell was introduced with the PowerShell version7.0. The ternary operator has ‘?’ (question mark) symbol and its syntax is," }, { "code": null, "e": 1266, "s": 1215, "text": "[Condition] ? (output if True...
K-nearest Neighbors Algorithm with Examples in R (Simply Explained knn) | by Kshitiz Sirohi | Towards Data Science
In this post I am going to exampling what k- nearest neighbor algorithm is and how does it help us. But before we move ahead, we aware that my target audience is the one who wants to get intuitive understanding of the concept and not very in-dept understanding, that is why I have avoided being too pedantic about this t...
[ { "code": null, "e": 561, "s": 172, "text": "In this post I am going to exampling what k- nearest neighbor algorithm is and how does it help us. But before we move ahead, we aware that my target audience is the one who wants to get intuitive understanding of the concept and not very in-dept understa...
Powershell - Check File Existence
Test-Path cmdlet is used to check existence of a file. In this example, we're having a file test.txt in D:\temp\test directory Type the following command in PowerShell ISE Console Test-Path D:\temp\test\test.txt You can see following output in PowerShell console. Test-Path D:\temp\test\test.txt True In this example, w...
[ { "code": null, "e": 2089, "s": 2034, "text": "Test-Path cmdlet is used to check existence of a file." }, { "code": null, "e": 2161, "s": 2089, "text": "In this example, we're having a file test.txt in D:\\temp\\test directory" }, { "code": null, "e": 2214, "s": 2...
Appending values at the end of an NumPy array - GeeksforGeeks
02 Sep, 2020 Let us see how to append values at the end of a NumPy array. Adding values at the end of the array is a necessary task especially when the data is not fixed and is prone to change. For this task we can use numpy.append(). This function can help us to append a single value as well as multiple values at the ...
[ { "code": null, "e": 24316, "s": 24288, "text": "\n02 Sep, 2020" }, { "code": null, "e": 24641, "s": 24316, "text": "Let us see how to append values at the end of a NumPy array. Adding values at the end of the array is a necessary task especially when the data is not fixed and is...
Cool Custom Welcome Messages on Linux terminal - GeeksforGeeks
31 Jan, 2019 There is a Linux hack which can be used to display a custom message on the terminal every time we open it. This can be done by manipulating the .bashrc shell script. What is .bashrc ? It is a shell script that Bash runs whenever it is started interactively. You can put any command in that file that you cou...
[ { "code": null, "e": 23865, "s": 23837, "text": "\n31 Jan, 2019" }, { "code": null, "e": 24031, "s": 23865, "text": "There is a Linux hack which can be used to display a custom message on the terminal every time we open it. This can be done by manipulating the .bashrc shell scrip...
Sort a multidimensional array by date element in PHP
07 Jan, 2020 Sorting a multidimensional array by element containing date. Use the usort() function to sort the array. The usort() function is PHP builtin function that sorts a given array using user-defined comparison function. This function assigns new integral keys starting from zero to array elements. Syntax: boolea...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jan, 2020" }, { "code": null, "e": 321, "s": 28, "text": "Sorting a multidimensional array by element containing date. Use the usort() function to sort the array. The usort() function is PHP builtin function that sorts a given array ...
How to get file creation and modification date or time in Python?
08 Jul, 2022 A Timestamp is a sequence of characters, that signify the occurrence of an event. Timestamps are required extensively in computer science. This exists of varying precision and accuracy i.e. some timestamps have the precision of up to milliseconds for the occurrence of the even, while others do not. This al...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jul, 2022" }, { "code": null, "e": 597, "s": 28, "text": "A Timestamp is a sequence of characters, that signify the occurrence of an event. Timestamps are required extensively in computer science. This exists of varying precision and...
How to combine two dataframe in Python – Pandas?
02 Dec, 2020 Prerequisites: Pandas In many real-life situations, the data that we want to use comes in multiple files. We often have a need to combine these files into a single DataFrame to analyze the data. Pandas provide such facilities for easily combining Series or DataFrame with various kinds of set logic for the ...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Dec, 2020" }, { "code": null, "e": 76, "s": 54, "text": "Prerequisites: Pandas" }, { "code": null, "e": 562, "s": 76, "text": "In many real-life situations, the data that we want to use comes in multiple files. W...
Lodash _.isFunction() Method
10 Sep, 2020 The Lodash _.isFunction() Method checks whether the given value is a function object or not and returns the corresponding boolean value. Syntax: _.isFunction( value ) Parameters: This method accepts single parameter as mentioned above and described below: value: This parameter holds the value that to be c...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Sep, 2020" }, { "code": null, "e": 165, "s": 28, "text": "The Lodash _.isFunction() Method checks whether the given value is a function object or not and returns the corresponding boolean value." }, { "code": null, "e": 1...
Find the length of largest subarray with 0 sum
28 Jun, 2022 Given an array of integers, find the length of the longest sub-array with a sum that equals 0. Examples: Input: arr[] = {15, -2, 2, -8, 1, 7, 10, 23}; Output: 5 Explanation: The longest sub-array with elements summing up-to 0 is {-2, 2, -8, 1, 7} Input: arr[] = {1, 2, 3} Output: 0 Explanation:There is n...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2022" }, { "code": null, "e": 149, "s": 54, "text": "Given an array of integers, find the length of the longest sub-array with a sum that equals 0." }, { "code": null, "e": 160, "s": 149, "text": "Examples: ...
How to Display/Hide functions using aria-hidden attribute in jQuery ?
20 Sep, 2021 The ‘aria-hidden’ attribute plays an important role in context of web-accessibility. It is a simple way to make web content/applications more accessible to people with disabilities. This attribute is used to indicate that the element and all of its descendants are not visible or perceivable to any user as ...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2021" }, { "code": null, "e": 735, "s": 28, "text": "The ‘aria-hidden’ attribute plays an important role in context of web-accessibility. It is a simple way to make web content/applications more accessible to people with disabil...
Shellphish Tool in Kali Linux - GeeksforGeeks
15 Mar, 2021 Shellphish is a powerful open-source tool Phishing Tool. It became very popular nowadays that is used to do phishing attacks on Target. Shellphish is easier than Social Engineering Toolkit. It contains some templates generated by another tool called SocialFish and offers phishing templates webpages for 18...
[ { "code": null, "e": 26222, "s": 26194, "text": "\n15 Mar, 2021" }, { "code": null, "e": 26940, "s": 26222, "text": "Shellphish is a powerful open-source tool Phishing Tool. It became very popular nowadays that is used to do phishing attacks on Target. Shellphish is easier than S...
Bitwise AND of all unordered pairs from a given array - GeeksforGeeks
26 Jul, 2021 Given an array arr[] of size N, the task is to find the bitwise AND of all possible unordered pairs present in the given array. Examples: Input: arr[] = {1, 5, 3, 7}Output: 1 Explanation: All possible unordered pairs are (1, 5), (1, 3), (1, 7), (5, 3), (5, 7), (3, 7). Bitwise AND of all possible pairs = ( ...
[ { "code": null, "e": 26917, "s": 26889, "text": "\n26 Jul, 2021" }, { "code": null, "e": 27045, "s": 26917, "text": "Given an array arr[] of size N, the task is to find the bitwise AND of all possible unordered pairs present in the given array." }, { "code": null, "e"...
Node.js Stream writable.destroy() Method - GeeksforGeeks
12 Oct, 2021 The writable.destroy() method is an inbuilt application programming interface of Stream module which is used to destroy the created stream and you cannot call the write() method to write data again after you have already destroyed the created stream. Syntax: writable.destroy() Parameters: This method does ...
[ { "code": null, "e": 38501, "s": 38473, "text": "\n12 Oct, 2021" }, { "code": null, "e": 38752, "s": 38501, "text": "The writable.destroy() method is an inbuilt application programming interface of Stream module which is used to destroy the created stream and you cannot call the ...
Python-Quizzes | Python List Quiz | Question 4 - GeeksforGeeks
17 Sep, 2020 Question 4: Find the output of the following program: def addToList(listcontainer): listcontainer += [10] mylistContainer = [10, 20, 30, 40] addToList(mylistContainer) print len(mylistContainer) (A) 4(B) 5(C) 6(D) 10Answer: (B)Explanation: In Python, everything is a reference, and references are pas...
[ { "code": null, "e": 25415, "s": 25387, "text": "\n17 Sep, 2020" }, { "code": null, "e": 25469, "s": 25415, "text": "Question 4: Find the output of the following program:" }, { "code": "def addToList(listcontainer): listcontainer += [10] mylistContainer = [10, 20, 3...
File delete() method in Java with Examples - GeeksforGeeks
28 Jan, 2019 The delete() function is a part of File class in Java . This function deletes an existing file or directory. If the file is deleted then the function returns true else returns false Function signature: public boolean delete() Syntax: boolean var = file.delete(); Parameters: This method does not accept any ...
[ { "code": null, "e": 26107, "s": 26079, "text": "\n28 Jan, 2019" }, { "code": null, "e": 26289, "s": 26107, "text": "The delete() function is a part of File class in Java . This function deletes an existing file or directory. If the file is deleted then the function returns true ...
C# | Removing the specified node from the LinkedList<T> - GeeksforGeeks
01 Feb, 2019 Remove(LinkedListNode<T>) method is used to remove the specified node from the LinkedList<T>. Syntax: public void Remove (System.Collections.Generic.LinkedListNode<T> node); Here, node is the LinkedListNode<T> to remove from the LinkedList<T>. Exceptions: ArgumentNullException : If the node is null. Inval...
[ { "code": null, "e": 25759, "s": 25731, "text": "\n01 Feb, 2019" }, { "code": null, "e": 25853, "s": 25759, "text": "Remove(LinkedListNode<T>) method is used to remove the specified node from the LinkedList<T>." }, { "code": null, "e": 25861, "s": 25853, "text...
Writing a CSV file in Java using OpenCSV - GeeksforGeeks
07 Dec, 2021 A Comma-Separated Values (CSV) file is just a normal plain-text file, store data in a column by column, and split it by a separator (e.g normally it is a comma “, ”). OpenCSV is a CSV parser library for Java. OpenCSV supports all the basic CSV-type operations you are want to do. Java 7 is currently the min...
[ { "code": null, "e": 25831, "s": 25803, "text": "\n07 Dec, 2021" }, { "code": null, "e": 25998, "s": 25831, "text": "A Comma-Separated Values (CSV) file is just a normal plain-text file, store data in a column by column, and split it by a separator (e.g normally it is a comma “, ...
Inorder predecessor and successor for a given key in BST - GeeksforGeeks
18 Mar, 2022 I recently encountered with a question in an interview at e-commerce company. The interviewer asked the following question:There is BST given with root node with key part as integer only. The structure of each node is as follows: C++ Java Python3 C# Javascript struct Node{ int key; struct Node *left,...
[ { "code": null, "e": 26397, "s": 26369, "text": "\n18 Mar, 2022" }, { "code": null, "e": 26627, "s": 26397, "text": "I recently encountered with a question in an interview at e-commerce company. The interviewer asked the following question:There is BST given with root node with k...
How to Take Input From User Separated By Space in Java ? - GeeksforGeeks
15 Sep, 2021 There are 2 methods to take input from the user which are separated by space which are as follows: Using BufferedReader Class and then splitting and parsing each valueUsing nextInt( ) method of Scanner class Using BufferedReader Class and then splitting and parsing each value Using nextInt( ) method of Sca...
[ { "code": null, "e": 25250, "s": 25222, "text": "\n15 Sep, 2021" }, { "code": null, "e": 25349, "s": 25250, "text": "There are 2 methods to take input from the user which are separated by space which are as follows:" }, { "code": null, "e": 25458, "s": 25349, ...
Compute nCr % p | Set 2 (Lucas Theorem) - GeeksforGeeks
22 Mar, 2021 Given three numbers n, r and p, compute value of nCr mod p.Examples: Input: n = 10, r = 2, p = 13 Output: 6 Explanation: 10C2 is 45 and 45 % 13 is 6. Input: n = 1000, r = 900, p = 13 Output: 8 We strongly recommend to refer below post as a prerequisite of this.Compute nCr % p | Set 1 (Introduction and...
[ { "code": null, "e": 25939, "s": 25911, "text": "\n22 Mar, 2021" }, { "code": null, "e": 26010, "s": 25939, "text": "Given three numbers n, r and p, compute value of nCr mod p.Examples: " }, { "code": null, "e": 26137, "s": 26010, "text": "Input: n = 10, r =...
How to Merge Two Pandas DataFrames on Index? - GeeksforGeeks
13 Jan, 2022 In this article, we will discuss how to merge two Pandas Dataframes on Index. This method is used to join the dataframe based on index. Syntax: dataframe1.join(dataframe2) Example: Python3 # import pandas moduleimport pandas as pd # create student dataframedata1 = pd.DataFrame({'id': [1, 2, 3, 4], ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n13 Jan, 2022" }, { "code": null, "e": 25615, "s": 25537, "text": "In this article, we will discuss how to merge two Pandas Dataframes on Index." }, { "code": null, "e": 25673, "s": 25615, "text": "This method ...
JavaScript | ArrayBuffer Object - GeeksforGeeks
26 Jun, 2018 An ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. The contents of an ArrayBuffer cannot be directly manipulated and can only be accessed through a DataView Object or one of the typed array objects. These Objects are used to read and write the contents of the buffer....
[ { "code": null, "e": 26129, "s": 26101, "text": "\n26 Jun, 2018" }, { "code": null, "e": 26752, "s": 26129, "text": "An ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. The contents of an ArrayBuffer cannot be directly manipulated and can on...
Lexicographically minimum string rotation | Set 1 - GeeksforGeeks
11 Jun, 2021 Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDAD.Source: Google Written TestMore Examples: Input: GEEKSQUIZ Output: EEKSQUIZG Input: GFG Output: FGG Input: GEEKSFORGEEKS Output: EEKSFORGEEKSG Following is a simple solut...
[ { "code": null, "e": 26553, "s": 26525, "text": "\n11 Jun, 2021" }, { "code": null, "e": 26727, "s": 26553, "text": "Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDAD.Source: Google Written TestMore ...
Getting Synchronized Map from Java HashMap - GeeksforGeeks
13 Jan, 2021 HashMap is a non synchronized collection class. If we want to perform thread-safe operations on it then we must have to synchronize it explicitly. In order to synchronize it explicitly the synchronizedMap() method of java.util.Collections class is used to return a synchronized (thread-safe) map backed by t...
[ { "code": null, "e": 25801, "s": 25773, "text": "\n13 Jan, 2021" }, { "code": null, "e": 26126, "s": 25801, "text": "HashMap is a non synchronized collection class. If we want to perform thread-safe operations on it then we must have to synchronize it explicitly. In order to sync...
Maximize matrix as per given condition - GeeksforGeeks
21 May, 2021 You are given a N*N matrix, where each element of matrix lies in the range 0 to M. You can apply the below operation on matrix any number of times: Choose any two consecutive elements Increment one of them by 1 and decrease other by 1 Note: The elements should remain within the range 0 to M after applyin...
[ { "code": null, "e": 26165, "s": 26137, "text": "\n21 May, 2021" }, { "code": null, "e": 26315, "s": 26165, "text": "You are given a N*N matrix, where each element of matrix lies in the range 0 to M. You can apply the below operation on matrix any number of times: " }, { ...
PyQt5 QCalendarWidget - Setting date Range - GeeksforGeeks
18 Aug, 2021 In this article we will see how we can set the date range to the QCalendarWidget. The date range of QCalendarWidget restricts the user selection, i.e. the user can only select dates within the specified date range. Rest of the dates get disabled. In order to do this we will use setDateRange method with th...
[ { "code": null, "e": 26437, "s": 26409, "text": "\n18 Aug, 2021" }, { "code": null, "e": 26685, "s": 26437, "text": "In this article we will see how we can set the date range to the QCalendarWidget. The date range of QCalendarWidget restricts the user selection, i.e. the user can...
Python File flush() Method
Python file method flush() flushes the internal buffer, like stdio's fflush. This may be a no-op on some file-like objects. Python automatically flushes the files when closing them. But you may want to flush the data before closing any file. Following is the syntax for flush() method − fileObject.flush(); NA NA This ...
[ { "code": null, "e": 2368, "s": 2244, "text": "Python file method flush() flushes the internal buffer, like stdio's fflush. This may be a no-op on some file-like objects." }, { "code": null, "e": 2486, "s": 2368, "text": "Python automatically flushes the files when closing them. ...
JavaScript Number.MAX_VALUE & Number.MIN_VALUE with Examples
The JavaScript Number.MAX_VALUE & Number.MIN_VALUE property represents the maximum and minimum numeric value representation possible in JavaScript respectively. Following is the code for the JavaScript Number.MAX_VALUE & Number.MIN_VALUE property − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8...
[ { "code": null, "e": 1223, "s": 1062, "text": "The JavaScript Number.MAX_VALUE & Number.MIN_VALUE property represents the maximum and minimum numeric value representation possible in JavaScript respectively." }, { "code": null, "e": 1311, "s": 1223, "text": "Following is the code...
PHP - Local Variables
Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types − Local variables Function parameters Global variables Static variables. A variable declared in a function is considered local; that is, it can be referenced solely in th...
[ { "code": null, "e": 2909, "s": 2757, "text": "Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types −" }, { "code": null, "e": 2925, "s": 2909, "text": "Local variables" }, { ...
Prediction task with Multivariate Time Series and VAR model. | by Alena Nazarava | Towards Data Science
Time Series data can be confusing, but very interesting to explore. The reason this sort of data grabbed my attention is that it can be found in almost every business (sales, deliveries, weather conditions etc.). For instance: using Google BigQuery how to explore weather effects on NYC link. The main steps in the task:...
[ { "code": null, "e": 465, "s": 172, "text": "Time Series data can be confusing, but very interesting to explore. The reason this sort of data grabbed my attention is that it can be found in almost every business (sales, deliveries, weather conditions etc.). For instance: using Google BigQuery how to...
HDF5 files in Python - GeeksforGeeks
28 Jun, 2021 HDF5 file stands for Hierarchical Data Format 5. It is an open-source file which comes in handy to store large amount of data. As the name suggests, it stores data in a hierarchical structure within a single file. So if we want to quickly access a particular part of the file rather than the whole file, we ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n28 Jun, 2021" }, { "code": null, "e": 25023, "s": 24292, "text": "HDF5 file stands for Hierarchical Data Format 5. It is an open-source file which comes in handy to store large amount of data. As the name suggests, it stores data...
Add Legend to Plot in R - GeeksforGeeks
16 May, 2021 Legends are useful to add more information to the plots and enhance the user readability. It involves the creation of titles, indexes, placement of plot boxes in order to create a better understanding of the graphs plotted. The in-built R function legend() can be used to add legend to plot. Syntax: legend...
[ { "code": null, "e": 25046, "s": 25018, "text": "\n16 May, 2021" }, { "code": null, "e": 25339, "s": 25046, "text": "Legends are useful to add more information to the plots and enhance the user readability. It involves the creation of titles, indexes, placement of plot boxes in o...
MongoDB aggregation group and remove duplicate array values?
Use MongoDB aggregate for this and within that, use $group. Let us create a collection with documents − > db.demo649.insertOne( ... { "_id" : 101, "Names" : [ "John", "Bob", "Bob", "Robert" ], "CountryName" : "US" } ... ); { "acknowledged" : true, "insertedId" : 101 } > > db.demo649.insertOne({ "_id" :102, "Names" :...
[ { "code": null, "e": 1166, "s": 1062, "text": "Use MongoDB aggregate for this and within that, use $group. Let us create a collection with documents −" }, { "code": null, "e": 1475, "s": 1166, "text": "> db.demo649.insertOne(\n... { \"_id\" : 101, \"Names\" : [ \"John\", \"Bob...
Select specific rows in a range with MySQL?
Let us first create a table − mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(20) ); Query OK, 0 rows affected (1.23 sec) Insert some records in the table using insert command − mysql> insert into DemoTable(StudentName) values('John'); Query OK, 1 row affected...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1244, "s": 1092, "text": "mysql> create table DemoTable\n (\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n StudentName varchar(20)\n );\nQuery OK, 0 rows affected (1.23 ...
How to create a command-line progress bar in C/C++ - GeeksforGeeks
19 Jul, 2020 The task is to write a C/C++ program to draw a command-line progress bar. Approach: To create a progress bar the idea is to use system() function which will give colored output. Below is the illustration of how to use system() function. The system function accepts the following parameters for colouring the...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n19 Jul, 2020" }, { "code": null, "e": 25004, "s": 24930, "text": "The task is to write a C/C++ program to draw a command-line progress bar." }, { "code": null, "e": 25167, "s": 25004, "text": "Approach: To cre...
Smallest Subsequence of Distinct Characters in Python
Suppose we have a text, we have to find the lexicographically smallest subsequence of text that contains all the distinct characters of text exactly once. So if the input is like “cdadabcc”, then the output will be “adbc”. To solve this, we will follow these steps − Define a stack st, two maps last_o and considered, th...
[ { "code": null, "e": 1285, "s": 1062, "text": "Suppose we have a text, we have to find the lexicographically smallest subsequence of text that contains all the distinct characters of text exactly once. So if the input is like “cdadabcc”, then the output will be “adbc”." }, { "code": null, ...
Isolation Forest is the best Anomaly Detection Algorithm for Big Data Right Now | by Andrew Young | Towards Data Science
Isolation forest or “iForest” is an astoundingly beautiful and elegantly simple algorithm that identifies anomalies with few parameters. The original paper is accessible to a broad audience and contains minimal math. In this article, I will explain why iForest is the best anomaly detection algorithm for big data right ...
[ { "code": null, "e": 591, "s": 172, "text": "Isolation forest or “iForest” is an astoundingly beautiful and elegantly simple algorithm that identifies anomalies with few parameters. The original paper is accessible to a broad audience and contains minimal math. In this article, I will explain why iF...
Python | Ways to Convert a 3D list into a 2D list
02 Aug, 2019 List is a common type of data structure in Python. While we have used the list and 2d list, the use of 3d list is increasing day by day, mostly in case of web development.Given a 3D list, the task is to convert it into a 2D list. These type of problems are encountered while working on projects or while con...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Aug, 2019" }, { "code": null, "e": 407, "s": 28, "text": "List is a common type of data structure in Python. While we have used the list and 2d list, the use of 3d list is increasing day by day, mostly in case of web development.Give...
Weighted K-NN
07 Apr, 2020 Weighted kNN is a modified version of k nearest neighbors. One of the many issues that affect the performance of the kNN algorithm is the choice of the hyperparameter k. If k is too small, the algorithm would be more sensitive to outliers. If k is too large, then the neighborhood may include too many point...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Apr, 2020" }, { "code": null, "e": 646, "s": 52, "text": "Weighted kNN is a modified version of k nearest neighbors. One of the many issues that affect the performance of the kNN algorithm is the choice of the hyperparameter k. If k...
File.SetAttributes() Method in C# with Examples
26 Feb, 2021 File.SetAttributes(String, FileAttributes) is an inbuilt File class method that is used to set the specified file attributes of the file on the specified path. File attributes are those certain rights that are either granted or denied. These rights are for a user or for an operating system that accesses th...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Feb, 2021" }, { "code": null, "e": 414, "s": 28, "text": "File.SetAttributes(String, FileAttributes) is an inbuilt File class method that is used to set the specified file attributes of the file on the specified path. File attributes...
Find whether there is path between two cells in matrix
12 May, 2022 Given N X N matrix filled with 1, 0, 2, 3. Find whether there is a path possible from source to destination, traversing through blank cells only. You can traverse up, down, right, and left. A value of cell 1 means Source. A value of cell 2 means Destination. A value of cell 3 means Blank cell. A value of ...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 May, 2022" }, { "code": null, "e": 245, "s": 54, "text": "Given N X N matrix filled with 1, 0, 2, 3. Find whether there is a path possible from source to destination, traversing through blank cells only. You can traverse up, down, r...
NavigableSet in Java with Examples
28 Jun, 2021 NavigableSet represents a navigable set in Java Collection Framework. The NavigableSet interface inherits from the SortedSet interface. It behaves like a SortedSet with the exception that we have navigation methods available in addition to the sorting mechanisms of the SortedSet. For example, the Navigable...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2021" }, { "code": null, "e": 622, "s": 52, "text": "NavigableSet represents a navigable set in Java Collection Framework. The NavigableSet interface inherits from the SortedSet interface. It behaves like a SortedSet with the e...
How to simulate pressing enter in HTML text input with Selenium ? - GeeksforGeeks
15 Dec, 2021 Selenium is an inbuilt module available in python that allows users to make automated suites and tests. We can build code or scripts to perform tasks automatically in a web browser using selenium. Selenium is used to test the software by automation. Also, programmers can create automated test cases for the...
[ { "code": null, "e": 25539, "s": 25511, "text": "\n15 Dec, 2021" }, { "code": null, "e": 25883, "s": 25539, "text": "Selenium is an inbuilt module available in python that allows users to make automated suites and tests. We can build code or scripts to perform tasks automatically...
Django model data types and fields list - GeeksforGeeks
04 Jan, 2022 The most important part of a model and the only required part of a model is the list of database fields it defines. Fields are specified by class attributes. Be careful not to choose field names that conflict with the models API like clean, save, or delete. Example: from django.db import models class Mu...
[ { "code": null, "e": 25519, "s": 25491, "text": "\n04 Jan, 2022" }, { "code": null, "e": 25778, "s": 25519, "text": "The most important part of a model and the only required part of a model is the list of database fields it defines. Fields are specified by class attributes. Be ca...
Python | Multiply elements of Tuple - GeeksforGeeks
11 Dec, 2019 Given, a list of tuples, the task is to multiply the elements of the tuple and return list of the multiplied elements. Examples: Input: [(2, 3), (4, 5), (6, 7), (2, 8)]Output: [6, 20, 42, 16] Input: [(11, 22), (33, 55), (55, 77), (11, 44)]Output: [242, 1815, 4235, 484] There are multiple ways to multiply e...
[ { "code": null, "e": 25735, "s": 25707, "text": "\n11 Dec, 2019" }, { "code": null, "e": 25854, "s": 25735, "text": "Given, a list of tuples, the task is to multiply the elements of the tuple and return list of the multiplied elements." }, { "code": null, "e": 25864, ...
Program to find remainder without using modulo or % operator - GeeksforGeeks
14 Jan, 2022 Given two numbers ‘num’ and ‘divisor’, find remainder when ‘num’ is divided by ‘divisor’. The use of modulo or % operator is not allowed.Examples : Input: num = 100, divisor = 7 Output: 2 Input: num = 30, divisor = 9 Output: 3 Method 1 : C++ Java Python3 C# PHP Javascript // C++ program to find r...
[ { "code": null, "e": 26032, "s": 26004, "text": "\n14 Jan, 2022" }, { "code": null, "e": 26181, "s": 26032, "text": "Given two numbers ‘num’ and ‘divisor’, find remainder when ‘num’ is divided by ‘divisor’. The use of modulo or % operator is not allowed.Examples : " }, { ...
marshal — Internal Python object serialization - GeeksforGeeks
01 Feb, 2022 Serializing a data means converting it into a string of bytes and later reconstructing it from such a string. If the data is composed entirely of fundamental Python objects, the fastest way to serialize the data is by using marshal module (For user defined classes, Pickle should be preferred). Marshal modu...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n01 Feb, 2022" }, { "code": null, "e": 25924, "s": 25537, "text": "Serializing a data means converting it into a string of bytes and later reconstructing it from such a string. If the data is composed entirely of fundamental Pytho...
Count substrings with same first and last characters - GeeksforGeeks
22 Oct, 2021 We are given a string S, we need to find count of all contiguous substrings starting and ending with same character. Examples : Input : S = "abcab" Output : 7 There are 15 substrings of "abcab" a, ab, abc, abca, abcab, b, bc, bca bcab, c, ca, cab, a, ab, b Out of the above substrings, there are 7 substr...
[ { "code": null, "e": 26383, "s": 26355, "text": "\n22 Oct, 2021" }, { "code": null, "e": 26500, "s": 26383, "text": "We are given a string S, we need to find count of all contiguous substrings starting and ending with same character." }, { "code": null, "e": 26512, ...
mount command in Linux with Examples - GeeksforGeeks
23 May, 2019 All files in a Linux filesystem are arranged in form of a big tree rooted at ‘/‘.These files can be spread out on various devices based on your partition table, initially your parent directory is mounted(i.e attached) to this tree at ‘/‘, others can be mounted manually using GUI interface(if available) or ...
[ { "code": null, "e": 25278, "s": 25250, "text": "\n23 May, 2019" }, { "code": null, "e": 25810, "s": 25278, "text": "All files in a Linux filesystem are arranged in form of a big tree rooted at ‘/‘.These files can be spread out on various devices based on your partition table, in...
Zoho Interview Experience | Set 12 (On-Campus) - GeeksforGeeks
05 Jul, 2016 Recently ZOHO visited our campus for recruitment and i would like to share my experience.Thanks to geeksforgeeks which contributed to most of my preparations..Round 1 : TIME : 2hrsI was expecting an aptitude written round .But they gave us 30 flowchart and asked us to go through each flowchart and the ques...
[ { "code": null, "e": 26189, "s": 26161, "text": "\n05 Jul, 2016" }, { "code": null, "e": 26746, "s": 26189, "text": "Recently ZOHO visited our campus for recruitment and i would like to share my experience.Thanks to geeksforgeeks which contributed to most of my preparations..Roun...
How to set up the Game Loop in PygGame ? - GeeksforGeeks
01 Oct, 2021 In this article, we will see how to set up a game loop in PyGame. Game Loop is the loop that keeps the game running. It keeps running till the user wants to exit. While the game loop is running it mainly does the following tasks: Update our game window to show visual changesUpdate our game states based on ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n01 Oct, 2021" }, { "code": null, "e": 25767, "s": 25537, "text": "In this article, we will see how to set up a game loop in PyGame. Game Loop is the loop that keeps the game running. It keeps running till the user wants to exit. ...
Range Queries for number of Armstrong numbers in an array with updates - GeeksforGeeks
07 Oct, 2021 Given an array arr[] of N integers, the task is to perform the following two queries: query(start, end): Print the number of Armstrong numbers in the subarray from start to end update(i, x): Add x to the array element referenced by array index i, that is: arr[i] = x Examples: Input: arr = { 18, 153, 8, 9...
[ { "code": null, "e": 26840, "s": 26812, "text": "\n07 Oct, 2021" }, { "code": null, "e": 26927, "s": 26840, "text": "Given an array arr[] of N integers, the task is to perform the following two queries: " }, { "code": null, "e": 27018, "s": 26927, "text": "que...
Python | Pandas Series.dt.is_month_end - GeeksforGeeks
20 Mar, 2019 Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.is_month_end attribute return a boolean value Indicating whether the date is the last day of the month. Syntax: Series.dt.is_month_end Parameter : None Returns : numpy array Example #1: ...
[ { "code": null, "e": 26119, "s": 26091, "text": "\n20 Mar, 2019" }, { "code": null, "e": 26344, "s": 26119, "text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.is_month_end attribute return a boolean va...
DateTimeOffset.ToUnixTimeMilliseconds() Method in C# - GeeksforGeeks
19 Mar, 2019 DateTimeOffset.ToUnixTimeMilliseconds Method is used to return the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z. This method will return a negative value for the date and time values before 1970-01-01T00:00:00Z. Syntax: public long ToUnixTimeMilliseconds (); Return Value: This me...
[ { "code": null, "e": 25401, "s": 25373, "text": "\n19 Mar, 2019" }, { "code": null, "e": 25640, "s": 25401, "text": "DateTimeOffset.ToUnixTimeMilliseconds Method is used to return the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z. This method will return...
Python: os.path.abspath() method with example
29 Dec, 2019 OS module in Python provides various methods for interacting with the operating system. It comes under Python’s standard utility module, so there is no need to install it externally. os.path is a submodule of OS module which contains some useful functions on pathnames. The path parameters are either string...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Dec, 2019" }, { "code": null, "e": 494, "s": 52, "text": "OS module in Python provides various methods for interacting with the operating system. It comes under Python’s standard utility module, so there is no need to install it ext...
Data Structure - Expression Parsing
The way to write arithmetic expression is known as a notation. An arithmetic expression can be written in three different but equivalent notations, i.e., without changing the essence or output of an expression. These notations are − Infix Notation Prefix (Polish) Notation Postfix (Reverse-Polish) Notation These notatio...
[ { "code": null, "e": 2947, "s": 2714, "text": "The way to write arithmetic expression is known as a notation. An arithmetic expression can be written in three different but equivalent notations, i.e., without changing the essence or output of an expression. These notations are −" }, { "code"...
Java Program to double the size of an array
To double the size of an array, let us first create an array − int arr[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50}; Now, get the length of the above array − int len = arr.length; Double the size of the above array − intnewArray[] = new int[len*2]; Now, newArray[] will be having twice the length of the array arr[]. publ...
[ { "code": null, "e": 1250, "s": 1187, "text": "To double the size of an array, let us first create an array −" }, { "code": null, "e": 1303, "s": 1250, "text": "int arr[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50};" }, { "code": null, "e": 1344, "s": 1303, "tex...
Python | Pandas Series.sum()
10 Oct, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Series.sum() method is used to get the sum of the values for the requested axis. Synta...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Oct, 2018" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Handling nested data objects using jQuery DataTables plugin
08 Jan, 2021 DataTables are a modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpage. It is a simple-to-use plug-in with many options for the developer’s custom changes. The common features of DataTables are sorting, ordering, searching, and pagination. DataTables can easily re...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jan, 2021" }, { "code": null, "e": 311, "s": 28, "text": "DataTables are a modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpage. It is a simple-to-use plug-in with many options for the deve...
How to hide scroll bar for inactivity?
27 Apr, 2020 There are many ways to hide the scroll bar when the page is inactive. One such way is using the onscroll, onmousewheel, onclick and onmousemove events, which help us to achieve our goal using basic HTML and JavaScript. Approach: The onscroll event is used to disable the scroll bar. The onscroll event acts ...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Apr, 2020" }, { "code": null, "e": 272, "s": 53, "text": "There are many ways to hide the scroll bar when the page is inactive. One such way is using the onscroll, onmousewheel, onclick and onmousemove events, which help us to achie...
Sum of Series | Practice | GeeksforGeeks
Write a program to find the sum of the given series 1+2+3+ . . . . . .(N terms) Example 1: Input: N = 1 Output: 1 Explanation: For n = 1, sum will be 1. Example 2: Input: N = 5 Output: 15 Explanation: For n = 5, sum will be 1 + 2 + 3 + 4 + 5 = 15. Your Task: Complete the function seriesSum() which takes single integ...
[ { "code": null, "e": 307, "s": 226, "text": "Write a program to find the sum of the given series 1+2+3+ . . . . . .(N terms) " }, { "code": null, "e": 318, "s": 307, "text": "Example 1:" }, { "code": null, "e": 381, "s": 318, "text": "Input:\nN = 1\nOutput: 1\...
How to get the seed value of an identity column in MySQL?
For this, you can use SHOW VARIABLES command − mysql> SHOW VARIABLES LIKE 'auto_inc%'; This will produce the following output − +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | auto_increment_increment | 1 | | auto_increment_offset | 1 | +------...
[ { "code": null, "e": 1234, "s": 1187, "text": "For this, you can use SHOW VARIABLES command −" }, { "code": null, "e": 1274, "s": 1234, "text": "mysql> SHOW VARIABLES LIKE 'auto_inc%';" }, { "code": null, "e": 1315, "s": 1274, "text": "This will produce the fo...
Python | Pandas Series.tz_convert
30 Jan, 2019 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2019" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Program to toggle all characters in a string
06 Jul, 2022 Given a string, the task is to toggle all the characters of the string i.e to convert Upper case to Lower case and vice versa. Examples: Input : gfg Output : GFG Input : aBc12# Output : AbC12# Input : tu@kmiNi Output : TU@KMInI Traverse the given string, if uppercase characters come, convert into low...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 179, "s": 52, "text": "Given a string, the task is to toggle all the characters of the string i.e to convert Upper case to Lower case and vice versa." }, { "code": null, "e": 190, "...
Move all values equal to K to the end of the Array
11 Aug, 2021 Given an array arr[] of size N and an integer K, the task is to print the array after moving all value equal to K at the end of the array. Examples: Input: arr = [2, 1, 2, 2, 2, 3, 4, 2], K = 2 Output: [4, 1, 3, 2, 2, 2, 2, 2] Explanation: 2 is the number which has to be moved to the end of the array arr[...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Aug, 2021" }, { "code": null, "e": 193, "s": 54, "text": "Given an array arr[] of size N and an integer K, the task is to print the array after moving all value equal to K at the end of the array." }, { "code": null, "e"...
Preorder Successor of a Node in Binary Tree
Difficulty Level : Easy Given a binary tree and a node in the binary tree, find the preorder successor of the given node. It may be assumed that every node has a parent link. Examples: Consider the following binary tree 20 / \ 10 26 / ...
[ { "code": null, "e": 24, "s": 0, "text": "Difficulty Level :\nEasy" }, { "code": null, "e": 187, "s": 24, "text": "Given a binary tree and a node in the binary tree, find the preorder successor of the given node. It may be assumed that every node has a parent link. Examples: " ...
Minimum distance between any two equal elements in an Array
15 Jun, 2021 Given an array arr, the task is to find the minimum distance between any two same elements in the array. If no such element is found, return -1. Examples: Input: arr = {1, 2, 3, 2, 1} Output: 2 Explanation: There are two matching pairs of values: 1 and 2 in this array. Minimum Distance between two 1’s = ...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jun, 2021" }, { "code": null, "e": 199, "s": 54, "text": "Given an array arr, the task is to find the minimum distance between any two same elements in the array. If no such element is found, return -1." }, { "code": null, ...
Nexphisher – Advanced Phishing tool for Kali Linux
30 Jun, 2021 Nexphisher is an open-source tool with 30 distinct types of phishing sites via which you may get the credentials of a social media account. It was initially developed to carry out phishing assaults through social engineering. NexPhisher is a Linux-based simple phishing tool. The phishing pages are taken fr...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 254, "s": 28, "text": "Nexphisher is an open-source tool with 30 distinct types of phishing sites via which you may get the credentials of a social media account. It was initially developed to carry...
Site Reliability Engineering
10 Sep, 2020 Site Reliability Engineering, it is a practice that tech giants are practicing now a days where operation problems of an organization are treated as software engineering problem, in other way when a developer is assigned to solve operations problem. Basically, SREs are software engineers who build various ...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Sep, 2020" }, { "code": null, "e": 459, "s": 28, "text": "Site Reliability Engineering, it is a practice that tech giants are practicing now a days where operation problems of an organization are treated as software engineering probl...
DataTables lengthChange Option
31 May, 2021 DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched, sorted, and filtered according to the needs of the user. The DataTable also exposes a powerful API that can be further used to mod...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 May, 2021" }, { "code": null, "e": 366, "s": 28, "text": "DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched...
How to create a Confirmation Dialog Box in Java?
To create a confirmation dialog box in Java, use the Java Swing JOptionPane.showConfirmDialog() method, which allows you to create a dialog box that asks for confirmation from the user. For example, Do you want to restart the system?, “This file contains a virus, Do you want to still download?”, etc. Kt comes with a ty...
[ { "code": null, "e": 1570, "s": 1187, "text": "To create a confirmation dialog box in Java, use the Java Swing JOptionPane.showConfirmDialog() method, which allows you to create a dialog box that asks for confirmation from the user. For example, Do you want to restart the system?, “This file contain...