title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python String maketrans() Method | Python string method maketrans() returns a translation table that maps each character in the intabstring into the character at the same position in the outtab string. Then this table is passed to the translate() function.
Note − Both intab and outtab must have the same length.
Following is the syntax for maketrans() m... | [
{
"code": null,
"e": 2467,
"s": 2244,
"text": "Python string method maketrans() returns a translation table that maps each character in the intabstring into the character at the same position in the outtab string. Then this table is passed to the translate() function."
},
{
"code": null,
... |
Find a specific element in a C# List | Set a list −
List<int> myList = new List<int>() {
5,
10,
17,
19,
23,
33
};
Let us say you need to find an element that is divisible by 2. For that, use the Find() method −
int val = myList.Find(item => item % 2 == 0);
Here is the complete code −
Live Demo
using System;
using System.Collections.Generi... | [
{
"code": null,
"e": 1075,
"s": 1062,
"text": "Set a list −"
},
{
"code": null,
"e": 1155,
"s": 1075,
"text": "List<int> myList = new List<int>() {\n 5,\n 10,\n 17,\n 19,\n 23,\n 33\n};"
},
{
"code": null,
"e": 1252,
"s": 1155,
"text": "Let us say ... |
CSS - Pulse Effect | It Provides a single vibration or short burs to an element.
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
Transform − Transform applies to 2d and 3d transformation to an element.
Transform − Transform applies to 2d and 3d transformation to an el... | [
{
"code": null,
"e": 2686,
"s": 2626,
"text": "It Provides a single vibration or short burs to an element."
},
{
"code": null,
"e": 2807,
"s": 2686,
"text": "@keyframes pulse {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.1); }\n 100% { transform: scale(1); } \n... |
Stream toArray() in Java with Examples | 06 Dec, 2018
Stream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a result or a side-effect. After the terminal operation is performed, the stream pipeline is considered consumed, and can no longer be used.
Syntax :
Object[] toAr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 313,
"s": 28,
"text": "Stream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a result or a side-effect. Afte... |
TimeUnit sleep() method in Java with Examples | 15 Oct, 2018
The sleep() method of TimeUnit Class is used to performs a Thread.sleep using this time unit. This is a convenience method that sleeps time arguments into the form required by the Thread.sleep method.
Syntax:
public void sleep(long timeout)
throws InterruptedException
Parameters: This method acc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Oct, 2018"
},
{
"code": null,
"e": 229,
"s": 28,
"text": "The sleep() method of TimeUnit Class is used to performs a Thread.sleep using this time unit. This is a convenience method that sleeps time arguments into the form required by... |
Writer write(String) method in Java with Examples | 29 Jan, 2019
The write(String) method of Writer Class in Java is used to write the specified String on the stream. This String value is taken as a parameter.
Syntax:
public void write(String string)
Parameters: This method accepts a mandatory parameter string which is the String to be written in the Stream.
Return Valu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 173,
"s": 28,
"text": "The write(String) method of Writer Class in Java is used to write the specified String on the stream. This String value is taken as a parameter."
},
{
"code": null,
... |
Node.js fs.rmdir() Method | 12 Oct, 2021
The fs.rmdir() method is used to delete a directory at the given path. It can also be used recursively to remove nested directories.
Syntax:
fs.rmdir( path, options, callback )
Parameters: This method accept three parameters as mentioned above and described below:
path: It holds the path of the director... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 161,
"s": 28,
"text": "The fs.rmdir() method is used to delete a directory at the given path. It can also be used recursively to remove nested directories."
},
{
"code": null,
"e": 170,
... |
Python MariaDB – Insert into Table using PyMySQL | 14 Oct, 2020
MariaDB is an open source Database Management System and its predecessor to MySQL. The pymysql client can be used to interact with MariaDB similar to that of MySQL using Python.
In this article we will look into the process of inserting rows to a table of the database using pymysql. You can insert one row ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "MariaDB is an open source Database Management System and its predecessor to MySQL. The pymysql client can be used to interact with MariaDB similar to that of MySQL using Pytho... |
How to Add SearchView in Google Maps in Android? | 04 Feb, 2021
We have seen the implementation of Google Maps in Android along with markers on it. But many apps provide features so that users can specify the location on which they have to place markers. So in this article, we will implement a SearchView in our Android app so that we can search a location name and add ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2021"
},
{
"code": null,
"e": 363,
"s": 28,
"text": "We have seen the implementation of Google Maps in Android along with markers on it. But many apps provide features so that users can specify the location on which they have to... |
Python | Get the starting index for all occurrences of given substring | 18 Dec, 2019
Given a string and a substring, the task to find out the starting index for all the occurrences of a given substring in a string. Let’s discuss a few methods to solve the given task.
Method #1: Using Naive Method
# Python3 code to demonstrate# to find all occurrences of substring in# a string # Initialisi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Dec, 2019"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "Given a string and a substring, the task to find out the starting index for all the occurrences of a given substring in a string. Let’s discuss a few methods to solve the give... |
Program to convert a given number to words | Set 2 | 04 Jan, 2022
Write code to convert a given number into words.Examples:
Input: 438237764
Output: forty three crore eighty two lakh
thirty seven thousand seven hundred and
sixty four
Input: 999999
Output: nine lakh ninety nine thousand nine
hundred and ninety nine
Input: 1000
Output: one thousand
Explanation:1000 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 113,
"s": 54,
"text": "Write code to convert a given number into words.Examples: "
},
{
"code": null,
"e": 388,
"s": 113,
"text": "Input: 438237764\nOutput: forty three crore ei... |
Serialize and Deserialize complex JSON in Python | 17 May, 2022
JSON stands for JavaScript Object Notation. It is a format that encodes the data in string format. JSON is language independent and because of that, it is used for storing or transferring data in files. The conversion of data from JSON object string is known as Serialization and its opposite string JSON ob... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 602,
"s": 28,
"text": "JSON stands for JavaScript Object Notation. It is a format that encodes the data in string format. JSON is language independent and because of that, it is used for storing or ... |
HTTP status codes | Successful Responses | 31 Oct, 2019
The HTTP status codes are used to indicate that any specific HTTP request has successfully completed or not. The HTTP status codes are categorized into five sections those are listed below:
Informational responses (100–199)
Successful responses (200–299)
Redirects (300–399)
Client errors (400–499)
Server e... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "The HTTP status codes are used to indicate that any specific HTTP request has successfully completed or not. The HTTP status codes are categorized into five sections those are... |
Types of Motherboards | 24 Mar, 2022
There isn’t wide range of motherboard sizes available but in this article, we will discuss about the available options and when to use suitable size. Motherboards are described using form factor called Advanced Technology eXTENDED (ATX) and this form factor is invented by INTEL company and it has been ind... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Mar, 2022"
},
{
"code": null,
"e": 651,
"s": 28,
"text": "There isn’t wide range of motherboard sizes available but in this article, we will discuss about the available options and when to use suitable size. Motherboards are describ... |
numpy.poly1d() in Python | 04 Dec, 2020
The numpy.poly1d() function helps to define a polynomial function. It makes it easy to apply “natural operations” on polynomials.
Syntax: numpy.poly1d(arr, root, var)Parameters :arr : [array_like] The polynomial coefficients are given in decreasing order of powers. If the second parameter (root) is set to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 158,
"s": 28,
"text": "The numpy.poly1d() function helps to define a polynomial function. It makes it easy to apply “natural operations” on polynomials."
},
{
"code": null,
"e": 400,
... |
How i can replace number with string using Python? | For this purpose let us use a dictionary object having digit as key and its word representation as value −
dct={'0':'zero','1':'one','2':'two','3':'three','4':'four',
'5':'five','6':'six','7':'seven','8':'eight','9':'nine'
Initializa a new string object
newstr=''
Using a for loop traverse each character ch from ... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "For this purpose let us use a dictionary object having digit as key and its word representation as value −"
},
{
"code": null,
"e": 1290,
"s": 1169,
"text": "dct={'0':'zero','1':'one','2':'two','3':'three','4':'four',\n '5':'five... |
PySpark UDFs and star expansion. A simple hack to ensure that Spark... | by Schaun Wheeler | Towards Data Science | For the most part, I found my transition from primarily working in SQL to primarily working in Spark to be smooth. Being familiar with ORMs like SQLalchemy and Django, it wasn’t hard to adapt. Selects, filters, joins, groupbys and things like that all work more or less the way they do in SQL. I think there’s a logic to... | [
{
"code": null,
"e": 627,
"s": 172,
"text": "For the most part, I found my transition from primarily working in SQL to primarily working in Spark to be smooth. Being familiar with ORMs like SQLalchemy and Django, it wasn’t hard to adapt. Selects, filters, joins, groupbys and things like that all wor... |
PHP - Introduction | PHP started out as a small open source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.
PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
PHP is a server... | [
{
"code": null,
"e": 2938,
"s": 2757,
"text": "PHP started out as a small open source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994."
},
{
"code": null,
"e": 3000,
"s": 2938,
"text": "P... |
How to use APIs to get spatial features for your models | by Philipp Spachtholz | Towards Data Science | In this post, I would like to show you how you can use APIs to quickly obtain many features for your spatial datasets to build better data science models.
On my own way to becoming a data scientist and subsequently in my work as a data scientist I built several models based on spatial data, e.g. to predict house prices... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "In this post, I would like to show you how you can use APIs to quickly obtain many features for your spatial datasets to build better data science models."
},
{
"code": null,
"e": 812,
"s": 327,
"text": "On my own way to becoming a dat... |
Java Type Casting | Type casting is when you assign a value of one primitive data type to another type.
In Java, there are two types of casting:
Widening Casting (automatically) - converting a smaller type
to a larger type size
byte -> short -> char -> int -> long -> float -> double
Narrowing Casting (manually) - converting a larger typ... | [
{
"code": null,
"e": 84,
"s": 0,
"text": "Type casting is when you assign a value of one primitive data type to another type."
},
{
"code": null,
"e": 125,
"s": 84,
"text": "In Java, there are two types of casting:"
},
{
"code": null,
"e": 266,
"s": 125,
"text... |
From Text to Knowledge: The Information Extraction Pipeline | by Tomaz Bratanic | Towards Data Science | I am thrilled to present my latest project I have been working on. If you have been following my posts, you know that I am passionate about combining natural language processing and knowledge graphs. In this blog post, I will present my implementation of an information extraction data pipeline. Later on, I will also ex... | [
{
"code": null,
"e": 581,
"s": 172,
"text": "I am thrilled to present my latest project I have been working on. If you have been following my posts, you know that I am passionate about combining natural language processing and knowledge graphs. In this blog post, I will present my implementation of ... |
A comprehensive study of Mixed Integer Programming with JuMP on Julia (Part 1) | by Ouaguenouni Mohamed | Towards Data Science | One of the primary purposes of the computer sciences and operation research is to solve problems efficiently; problem-solving is a field where we often find very “ad-hoc” methods of resolution, they can be efficient, but they rely on some specific properties of the problem which are not necessarily easy to notice.
In t... | [
{
"code": null,
"e": 488,
"s": 172,
"text": "One of the primary purposes of the computer sciences and operation research is to solve problems efficiently; problem-solving is a field where we often find very “ad-hoc” methods of resolution, they can be efficient, but they rely on some specific propert... |
Combine Rows into String in SQL Server - GeeksforGeeks | 09 Mar, 2021
Imagine we need to select all the data from any given list. We could use multiple queries to combine rows in SQL Server to form a String.
Example-1 :Let us suppose we have below table named “geek_demo” –
Approach-1 :In the below example, we will combine rows using the COALESCE Function.
Query to Concatena... | [
{
"code": null,
"e": 24013,
"s": 23985,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 24152,
"s": 24013,
"text": "Imagine we need to select all the data from any given list. We could use multiple queries to combine rows in SQL Server to form a String. "
},
{
"code": nu... |
Write a program in Python to read sample data from an SQL Database | Assume you have a sqlite3 database with student records and the result for reading all the data is,
Id Name
0 1 stud1
1 2 stud2
2 3 stud3
3 4 stud4
4 5 stud5
To solve this, we will follow the steps given below −
Define a new connection. It is shown below,
Define a new connection. It is shown below,
con = sqlite3.conn... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "Assume you have a sqlite3 database with student records and the result for reading all the data is,"
},
{
"code": null,
"e": 1222,
"s": 1162,
"text": " Id Name\n0 1 stud1\n1 2 stud2\n2 3 stud3\n3 4 stud4\n4 5 stud5"
},
{
"co... |
Find the number of good permutations - GeeksforGeeks | 20 May, 2021
Given two integers N and K. The task is to find the number of good permutations of the first N natural numbers. A permutation is called good if there exist at least N – K indices i (1 ≤ i ≤ N) such that Pi = i.
Examples:
Input: N = 4, K = 1 Output: 1 {1, 2, 3, 4} is the only possible good permutation.
Inp... | [
{
"code": null,
"e": 25069,
"s": 25041,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 25280,
"s": 25069,
"text": "Given two integers N and K. The task is to find the number of good permutations of the first N natural numbers. A permutation is called good if there exist at leas... |
Length of minimized Compressed String - GeeksforGeeks | 31 Mar, 2022
Given a string S, the task is to find the length of the shortest compressed string. The string can be compressed in the following way:
If S = “ABCDABCD”, then the string can be compressed as (ABCD)2, so the length of the compressed string will be 4.
If S = “AABBCCDD” then the string compressed form will be... | [
{
"code": null,
"e": 24281,
"s": 24253,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 24416,
"s": 24281,
"text": "Given a string S, the task is to find the length of the shortest compressed string. The string can be compressed in the following way:"
},
{
"code": null,
... |
How to find the mean squared error for linear model in R? | To find the mean squared error for linear model, we can use predicted values of the model and find the error from dependent variable then take its square and the mean of the whole output. For example, if we have a linear model called M for a data frame df then we can find the mean squared error using the command mean((... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "To find the mean squared error for linear model, we can use predicted values of the model and find the error from dependent variable then take its square and the mean of the whole output. For example, if we have a linear model called M for a data frame ... |
How to Build a Matrix Module from Scratch | by Khuyen Tran | Towards Data Science | Numpy is a useful library that enables you to create a matrix and perform matrix operations with ease. If you want to know about tricks you could use to create a matrix with Numpy, check out my blog here. But what if you want to create a matrix class with features that are not included in the Numpy library? To be able ... | [
{
"code": null,
"e": 629,
"s": 47,
"text": "Numpy is a useful library that enables you to create a matrix and perform matrix operations with ease. If you want to know about tricks you could use to create a matrix with Numpy, check out my blog here. But what if you want to create a matrix class with ... |
Styling Links with CSS | To style links with CSS, at first we should know the following link states: link, visited, hover and active. Use the pseudo-classes of anchor element to style links −
a:link for link
a:visited forvisited link
a:link for hover on link
a:active for active link
Let us now see an example −
Live Demo
<!DOCTYPE html>
<html>... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "To style links with CSS, at first we should know the following link states: link, visited, hover and active. Use the pseudo-classes of anchor element to style links −"
},
{
"code": null,
"e": 1321,
"s": 1229,
"text": "a:link for link... |
C library function - putchar() | The C library function int putchar(int char) writes a character (an unsigned char) specified by the argument char to stdout.
Following is the declaration for putchar() function.
int putchar(int char)
char − This is the character to be written. This is passed as its int promotion.
char − This is the character to be writ... | [
{
"code": null,
"e": 2132,
"s": 2007,
"text": "The C library function int putchar(int char) writes a character (an unsigned char) specified by the argument char to stdout."
},
{
"code": null,
"e": 2185,
"s": 2132,
"text": "Following is the declaration for putchar() function."
}... |
Flutter - Important CLI commands - GeeksforGeeks | 09 Jul, 2021
Flutter is a mobile development UI kit managed by Google. It is powered by dart language which is used for the Flutter framework to make applications for mobile, web, and desktop with a single codebase. Flutter Command-Line (CLI) tool enables a user to interact with flutter SDK.
In this article, we are go... | [
{
"code": null,
"e": 24422,
"s": 24394,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 24703,
"s": 24422,
"text": "Flutter is a mobile development UI kit managed by Google. It is powered by dart language which is used for the Flutter framework to make applications for mobile, w... |
Data Extraction from GitHub and Auto-run or Schedule Python Script | by Eklavya Saxena | Towards Data Science | This blog is a part of Automated ETL for LIVE Tableau Public Visualizations and is sub-divided into two parts, namely:
Extract Data from Raw .csv Files of GitHub User ContentAutomate Python Scripts with Task Scheduler on Windows
Extract Data from Raw .csv Files of GitHub User Content
Automate Python Scripts with Task S... | [
{
"code": null,
"e": 291,
"s": 172,
"text": "This blog is a part of Automated ETL for LIVE Tableau Public Visualizations and is sub-divided into two parts, namely:"
},
{
"code": null,
"e": 401,
"s": 291,
"text": "Extract Data from Raw .csv Files of GitHub User ContentAutomate Pyt... |
Creating Web Applications with D3 Observable | by Sean McClure | Towards Data Science | I’ve written previously about bringing D3 into web applications here, looking at how to bind D3 visuals to UI elements. The purpose was to encourage moving beyond stand-alone visuals and get people prototyping fuller applications. Real applications solicit feedback because they get used, helping us validate analyses be... | [
{
"code": null,
"e": 614,
"s": 172,
"text": "I’ve written previously about bringing D3 into web applications here, looking at how to bind D3 visuals to UI elements. The purpose was to encourage moving beyond stand-alone visuals and get people prototyping fuller applications. Real applications solici... |
Neon Text Display Using HTML & CSS - GeeksforGeeks | 31 Jul, 2019
In this article, you will learn to create a neon text display using HTML & CSS.The neon text display is the simplest yet one of the most striking effects used to give cool designing to your texts on your web pages. In the neon display, the color of the text glows continuously that you can control by animat... | [
{
"code": null,
"e": 24279,
"s": 24251,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 25192,
"s": 24279,
"text": "In this article, you will learn to create a neon text display using HTML & CSS.The neon text display is the simplest yet one of the most striking effects used to g... |
VBScript - Syntax | Let us write a VBScript to print out "Hello World".
<html>
<body>
<script language = "vbscript" type = "text/vbscript">
document.write("Hello World!")
</script>
</body>
</html>
In the above example, we called a function document.write, which writes a string into the HTML document. This functi... | [
{
"code": null,
"e": 2132,
"s": 2080,
"text": "Let us write a VBScript to print out \"Hello World\"."
},
{
"code": null,
"e": 2284,
"s": 2132,
"text": "<html>\n <body>\n <script language = \"vbscript\" type = \"text/vbscript\">\n document.write(\"Hello World!\")\n ... |
XML - WhiteSpaces | In this chapter, we will discuss whitespace handling in XML documents. Whitespace is a collection of spaces, tabs, and newlines. They are generally used to make a document more readable.
XML document contains two types of whitespaces - Significant Whitespace and Insignificant Whitespace. Both are explained below with e... | [
{
"code": null,
"e": 2148,
"s": 1961,
"text": "In this chapter, we will discuss whitespace handling in XML documents. Whitespace is a collection of spaces, tabs, and newlines. They are generally used to make a document more readable."
},
{
"code": null,
"e": 2290,
"s": 2148,
"tex... |
How to subtract one polynomial to another using NumPy in Python? - GeeksforGeeks | 29 Aug, 2020
In this article, let’s discuss how to subtract one polynomial to another. Two polynomials are given as input and the result is the subtraction of two polynomials.
The polynomial p(x) = C3 x2 + C2 x + C1 is represented in NumPy as : ( C1, C2, C3 ) { the coefficients (constants)}.
Let take two polynomials p... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24455,
"s": 24292,
"text": "In this article, let’s discuss how to subtract one polynomial to another. Two polynomials are given as input and the result is the subtraction of two polynomials."... |
How To Fit A Random Forest Classifier In Julia | by Emmett Boudreau | Towards Data Science | Within the past few years of very rapid development in data science technology, we have seen the dramatic escalation and adoption of a multitude of open-source tools. Among these are well-known tools like SkLearn and Tensorflow. With the recent early adoption of Julia, however, there are oppurtunities to dramatically i... | [
{
"code": null,
"e": 697,
"s": 172,
"text": "Within the past few years of very rapid development in data science technology, we have seen the dramatic escalation and adoption of a multitude of open-source tools. Among these are well-known tools like SkLearn and Tensorflow. With the recent early adop... |
Fine-Tuning Pre-trained Model VGG-16 | by Muriel Kosaka | Towards Data Science | In my previous article, I explored using the pre-trained model VGG-16 as a feature extractor for transfer learning on the RAVDESS Audio Dataset. As a newcomer to Data Science, I read through articles here on Medium and came across this handy article by Pedro Marcelino in which he describes the process of transfer learn... | [
{
"code": null,
"e": 1141,
"s": 171,
"text": "In my previous article, I explored using the pre-trained model VGG-16 as a feature extractor for transfer learning on the RAVDESS Audio Dataset. As a newcomer to Data Science, I read through articles here on Medium and came across this handy article by P... |
Python | Ways to change keys in dictionary - GeeksforGeeks | 28 Feb, 2019
Given a dictionary, the task is to change the key based on the requirement. Let’s see different methods we can do this task.
Method #1 : Using naive method
# Python code to demonstrate# changing keys of dictionary# using naive method # inititialising dictionaryini_dict = {'nikhil': 1, 'vashu' : 5, ... | [
{
"code": null,
"e": 23752,
"s": 23724,
"text": "\n28 Feb, 2019"
},
{
"code": null,
"e": 23877,
"s": 23752,
"text": "Given a dictionary, the task is to change the key based on the requirement. Let’s see different methods we can do this task."
},
{
"code": null,
"e": 2... |
Difference between Class and Structure in C# - GeeksforGeeks | 18 May, 2020
A class is a user-defined blueprint or prototype from which objects are created. Basically, a class combines the fields and methods(member function which defines actions) into a single unit.
Example:
// C# program to illustrate the// concept of classusing System; // Class Declarationpublic class Author { ... | [
{
"code": null,
"e": 24286,
"s": 24258,
"text": "\n18 May, 2020"
},
{
"code": null,
"e": 24477,
"s": 24286,
"text": "A class is a user-defined blueprint or prototype from which objects are created. Basically, a class combines the fields and methods(member function which defines a... |
Matrix operations using operator overloading - GeeksforGeeks | 16 Aug, 2021
Pre-requisite: Operator OverloadingGiven two matrix mat1[][] and mat2[][] of NxN dimensions, the task is to perform Matrix Operations using Operator Overloading.Examples:
Input: arr1[][] = { {1, 2, 3}, {4, 5, 6}, {1, 2, 3}}, arr2[][] = { {1, 2, 3}, {4, 5, 16}, {1, 2, 3}} Output: Addition of two given Mat... | [
{
"code": null,
"e": 24840,
"s": 24812,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 25013,
"s": 24840,
"text": "Pre-requisite: Operator OverloadingGiven two matrix mat1[][] and mat2[][] of NxN dimensions, the task is to perform Matrix Operations using Operator Overloading.Ex... |
java.lang.reflect.Field.getType() Method Example | The java.lang.reflect.Field.getType() method returns a Class object that identifies the declared type for the field represented by this Field object.
Following is the declaration for java.lang.reflect.Field.getType() method.
public Class<?> getType()
a Class object identifying the declared type of the field represente... | [
{
"code": null,
"e": 1604,
"s": 1454,
"text": "The java.lang.reflect.Field.getType() method returns a Class object that identifies the declared type for the field represented by this Field object."
},
{
"code": null,
"e": 1679,
"s": 1604,
"text": "Following is the declaration for... |
Python | Pandas Series.ffill() | 13 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.ffill() function is synonym for forw... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Python – Product of two Dictionary Keys | 17 Dec, 2019
Sometimes, while working with dictionaries, we might have utility problem in which we need to perform elementary operation among the common keys of dictionaries. This can be extended to any operation to be performed. Let’s discuss product of like key values and ways to solve it in this article.
Method #1 :... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2019"
},
{
"code": null,
"e": 324,
"s": 28,
"text": "Sometimes, while working with dictionaries, we might have utility problem in which we need to perform elementary operation among the common keys of dictionaries. This can be e... |
std::string::resize() in C++ | 26 Jul, 2019
resize() lets you change the number of characters. Here are we will describe two syntaxes supported by std::string::resize() in C++Return Value : None
Syntax 1: Resize the number of characters of *this to num.
void string ::resize (size_type num)
num: New string length, expressed in number of characters.
E... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 203,
"s": 52,
"text": "resize() lets you change the number of characters. Here are we will describe two syntaxes supported by std::string::resize() in C++Return Value : None"
},
{
"code": n... |
ZonedDateTime plus() method in Java with Examples | 18 Dec, 2018
In ZonedDateTime class, there are two types of plus() method depending upon the parameters passed to it.
plus() method of a ZonedDateTime class used to return a copy of this date-time with the specified amount of unit added.If it is not possible to add the amount, because the unit is not supported or for s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Dec, 2018"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "In ZonedDateTime class, there are two types of plus() method depending upon the parameters passed to it."
},
{
"code": null,
"e": 377,
"s": 133,
"text": "p... |
Topological Sorting | 03 Jun, 2022
Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph is not a DAG.
For example, a topological sorting of the following graph is “5 4 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 295,
"s": 54,
"text": "Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Topologi... |
Poverty Alleviation Programmes in India | 30 Nov, 2021
In the mid 19th century and early 20th century, we saw an increase in poverty during the colonial age. The colonial rules moved unwaged artisans into farming and converted the nation into a province gradually rich in land-living, uneducated labor, and low efficiency. Thus, it made the nation scarce in labo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "In the mid 19th century and early 20th century, we saw an increase in poverty during the colonial age. The colonial rules moved unwaged artisans into farming and converted the... |
Teradata - Questions & Answers | Dear readers, these Teradata Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Teradata. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally question... | [
{
"code": null,
"e": 3205,
"s": 2764,
"text": "Dear readers, these Teradata Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Teradata. As per my experience good interviewers hardly plan to a... |
SQL Query to Create Table With a Primary Key | 13 Sep, 2021
A primary key uniquely identifies each row table. It must contain unique and non-NULL values. A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called composite keys.
To create a Primary key in the table, we have ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 289,
"s": 28,
"text": "A primary key uniquely identifies each row table. It must contain unique and non-NULL values. A table can have only one primary key, which may consist of single or multiple fi... |
chown command in Linux with Examples | 24 Feb, 2022
Different users in the operating system have ownership and permission to ensure that the files are secure and put restrictions on who can modify the contents of the files. In Linux there are different users who use the system:
Each user has some properties associated with them, such as a user ID and a ho... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 283,
"s": 54,
"text": "Different users in the operating system have ownership and permission to ensure that the files are secure and put restrictions on who can modify the contents of the files. In... |
LinkedHashMap and LinkedHashSet in Java | 16 Sep, 2021
The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap provided the advantage of quick insertion, search, and deletion but it never maintained the track and order of insertion which the LinkedHashMap provides where the elements can be... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 396,
"s": 52,
"text": "The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap provided the advantage of quick insertion, sea... |
Java.io.Reader class in Java | 30 Jan, 2017
It is an abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.Constructors:
prot... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jan, 2017"
},
{
"code": null,
"e": 355,
"s": 52,
"text": "It is an abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will ... |
Take Matrix input from user in Python | 30 Dec, 2020
Matrix is nothing but a rectangular arrangement of data or numbers. In other words, it is a rectangular array of data or numbers. The horizontal entries in a matrix are called as ‘rows’ while the vertical entries are called as ‘columns’. If a matrix has r number of rows and c number of columns then the ord... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 496,
"s": 54,
"text": "Matrix is nothing but a rectangular arrangement of data or numbers. In other words, it is a rectangular array of data or numbers. The horizontal entries in a matrix are calle... |
Enumeration in Scala | 21 Oct, 2021
An enumerations serve the purpose of representing a group of named constants in a programming language. Refer Enumeration (or enum) in C and enum in Java for information on enumerations. Scala provides an Enumeration class which we can extend in order to create our enumerations. Declaration of enumerations... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 346,
"s": 28,
"text": "An enumerations serve the purpose of representing a group of named constants in a programming language. Refer Enumeration (or enum) in C and enum in Java for information on en... |
How to Maintain Insertion Order of the Elements in Java HashMap? | 04 Jan, 2021
When elements get from the HashMap due to hashing the order they inserted is not maintained while retrieval. We can achieve the given task using LinkedHashMap. The LinkedHashMap class implements a doubly-linked list so that it can traverse through all the elements.
Example:
Input : HashMapInput = {c=6, a=1... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "When elements get from the HashMap due to hashing the order they inserted is not maintained while retrieval. We can achieve the given task using LinkedHashMap. The LinkedHashM... |
Python – Sort Dictionary key and values List | 02 Jun, 2020
Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform the sorting of it, wrt keys, but also can have a variation in which we need to perform a sort on its values list as well. Let’s discuss certain way in which this task can be performed.
Input : test_dict = {... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2020"
},
{
"code": null,
"e": 314,
"s": 28,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform the sorting of it, wrt keys, but also can have a variation in which we nee... |
PHP Returning values | A function can have return as last statement in its body although it is not mandatory. When a function is called, control of program come back to calling environment after executing statements in its body block - irrespective of whether last statement in function block is return or not. In absence of retun statement, c... | [
{
"code": null,
"e": 1791,
"s": 1187,
"text": "A function can have return as last statement in its body although it is not mandatory. When a function is called, control of program come back to calling environment after executing statements in its body block - irrespective of whether last statement i... |
Flask â Message Flashing | A good GUI based application provides feedback to a user about the interaction. For example, the desktop applications use dialog or message box and JavaScript uses alerts for similar purpose.
Generating such informative messages is easy in Flask web application. Flashing system of Flask framework makes it possible to c... | [
{
"code": null,
"e": 2359,
"s": 2167,
"text": "A good GUI based application provides feedback to a user about the interaction. For example, the desktop applications use dialog or message box and JavaScript uses alerts for similar purpose."
},
{
"code": null,
"e": 2561,
"s": 2359,
... |
Macro Processor | 06 Oct, 2020
A Macro instruction is the notational convenience for the programmer. For every occurrence of macro the whole macro body or macro block of statements gets expanded in the main source code. Thus Macro instructions make writing code more convenient.
Salient features of Macro Processor:
Macro represents a g... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2020"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "A Macro instruction is the notational convenience for the programmer. For every occurrence of macro the whole macro body or macro block of statements gets expanded in the main... |
Python – Pearson’s Chi-Square Test | 23 Jun, 2020
The Pearson’s Chi-Square statistical hypothesis is a test for independence between categorical variables. In this article, we will perform the test using a mathematical approach and then using Python’s SciPy module.First, let us see the mathematical approach :
The Contingency Table :A Contingency table (al... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2020"
},
{
"code": null,
"e": 314,
"s": 53,
"text": "The Pearson’s Chi-Square statistical hypothesis is a test for independence between categorical variables. In this article, we will perform the test using a mathematical appro... |
Check for NaN in Pandas DataFrame | 02 Jul, 2020
NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted to any other type than float. NaN value is one of the major problems in Data Analysis. It is very essential to deal with NaN in order to get the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 354,
"s": 28,
"text": "NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted to any other... |
Selenium Webdriver - Double Click | Selenium can perform mouse movements, key press, hovering on an element, double click, drag and drop actions, and so on with the help of the ActionsChains class. The method double_click performs double-click on an element.
The syntax for using the double click is as follows:
double_click(e=None)
Here, e is the element... | [
{
"code": null,
"e": 2426,
"s": 2203,
"text": "Selenium can perform mouse movements, key press, hovering on an element, double click, drag and drop actions, and so on with the help of the ActionsChains class. The method double_click performs double-click on an element."
},
{
"code": null,
... |
How To Build a Basic Chatbot from Scratch | by Pratheesh Shivaprasad | Towards Data Science | Be it a Whatsapp chat, Telegram group, Slack channel, or any product website, I’m sure you have encountered one of these bots popping out of nowhere. You ask some questions and it will try it’s best to resolve your queries. Today we’ll try to build a chatbot that could respond to some basic queries and respond in real-... | [
{
"code": null,
"e": 498,
"s": 172,
"text": "Be it a Whatsapp chat, Telegram group, Slack channel, or any product website, I’m sure you have encountered one of these bots popping out of nowhere. You ask some questions and it will try it’s best to resolve your queries. Today we’ll try to build a chat... |
How to get the complete screenshot of a page in Selenium with python? | We can get the complete screenshot of a page in Selenium. While
executing any test cases, we might encounter failures. To keep track of the failures
we capture a screenshot of the web page where the error exists.
In a test case, there may be failure for reasons listed below −
If the assertion does not pass.
If there ar... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "We can get the complete screenshot of a page in Selenium. While\nexecuting any test cases, we might encounter failures. To keep track of the failures\nwe capture a screenshot of the web page where the error exists."
},
{
"code": null,
"e": 1... |
Groupby without aggregation in Pandas - GeeksforGeeks | 29 Aug, 2021
Pandas is a great python package for manipulating data and some of the tools which we learn as a beginner are an aggregation and group by functions of pandas.
Groupby() is a function used to split the data in dataframe into groups based on a given condition. Aggregation on other hand operates on series, d... | [
{
"code": null,
"e": 24072,
"s": 24044,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 24232,
"s": 24072,
"text": "Pandas is a great python package for manipulating data and some of the tools which we learn as a beginner are an aggregation and group by functions of pandas. "
... |
Can we throw an Unchecked Exception from a static block in java? | A static block is a block of code with a static keyword. In general, these are used to initialize the static members. JVM executes static blocks before the main method at the time of class loading.
Live Demo
public class MyClass {
static{
System.out.println("Hello this is a static block");
}
public stat... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "A static block is a block of code with a static keyword. In general, these are used to initialize the static members. JVM executes static blocks before the main method at the time of class loading."
},
{
"code": null,
"e": 1271,
"s": 126... |
JCL - Environment Setup | There are many Free Mainframe Emulators available for Windows which can be used to write and learn sample JCLs.
One such emulator is Hercules, which can be easily installed in Windows by following few simple steps given below:
Download and install the Hercules emulator, which is available from the Hercules' home site -... | [
{
"code": null,
"e": 1976,
"s": 1864,
"text": "There are many Free Mainframe Emulators available for Windows which can be used to write and learn sample JCLs."
},
{
"code": null,
"e": 2091,
"s": 1976,
"text": "One such emulator is Hercules, which can be easily installed in Window... |
Apex - Quick Guide | Apex is a proprietary language developed by the Salesforce.com. As per the official definition, Apex is a strongly typed, object-oriented programming language that allows developers to execute the flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com API.
It... | [
{
"code": null,
"e": 2370,
"s": 2052,
"text": "Apex is a proprietary language developed by the Salesforce.com. As per the official definition, Apex is a strongly typed, object-oriented programming language that allows developers to execute the flow and transaction control statements on the Force.com... |
Efficiently Reading Input For Competitive Programming using Java 8 - GeeksforGeeks | 08 Oct, 2021
As we all know, while solving any CP problems, the very first step is collecting input or reading input. A common mistake we all make is spending too much time on writing code and compile-time as well. In Java, it is recommended to use BufferedReader over Scanner to accept input from the user. Why? It is d... | [
{
"code": null,
"e": 24836,
"s": 24808,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 25353,
"s": 24836,
"text": "As we all know, while solving any CP problems, the very first step is collecting input or reading input. A common mistake we all make is spending too much time on ... |
Interactive Weather Data Visualizations with Plotly | by Will Norris | Towards Data Science | The Global Surface Summary of the Day (GSOD) is a weather data set from over 9,000 weather stations dating back to 1929. It was created and is maintained by the National Oceanic and Atmospheric Administration (NOAA) and generates a daily summary of hourly surface measurements for 18 climate variables like mean dew poin... | [
{
"code": null,
"e": 410,
"s": 47,
"text": "The Global Surface Summary of the Day (GSOD) is a weather data set from over 9,000 weather stations dating back to 1929. It was created and is maintained by the National Oceanic and Atmospheric Administration (NOAA) and generates a daily summary of hourly ... |
Django ModelFormSets - GeeksforGeeks | 09 Jan, 2020
ModelFormsets in a Django is an advanced way of handling multiple forms created using a model and use them to create model instances. In other words, ModelFormsets are a group of forms in Django. One might want to initialize multiple forms on a single page all of which may involve multiple POST requests, f... | [
{
"code": null,
"e": 41553,
"s": 41525,
"text": "\n09 Jan, 2020"
},
{
"code": null,
"e": 41871,
"s": 41553,
"text": "ModelFormsets in a Django is an advanced way of handling multiple forms created using a model and use them to create model instances. In other words, ModelFormsets... |
Convert an integer to a hex string in C++ | In this program we will see how to convert an integer to hex string. To convert an integer into hexadecimal string we can follow mathematical steps. But in this case we have solved this problem using simple trick.
In C / C++ there is a format specifier %X. It prints the value of some variable into hexadecimal form. We ... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "In this program we will see how to convert an integer to hex string. To convert an integer into hexadecimal string we can follow mathematical steps. But in this case we have solved this problem using simple trick."
},
{
"code": null,
"e": 14... |
How to restart a remote system using PowerShell? | To restart the remote computer, you need to use the Restart-Computer command provided by the computer name. For example,
Restart-Computer -ComputerName Test1-Win2k12
The above command will restart computer Test1-Win2k12 automatically and if you have multiple remote computers to restart then you can provide multiple com... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "To restart the remote computer, you need to use the Restart-Computer command provided by the computer name. For example,"
},
{
"code": null,
"e": 1228,
"s": 1183,
"text": "Restart-Computer -ComputerName Test1-Win2k12"
},
{
"c... |
Android - Notifications | A notification is a message you can display to the user outside of your application's normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the noti... | [
{
"code": null,
"e": 4007,
"s": 3607,
"text": "A notification is a message you can display to the user outside of your application's normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user ope... |
How to change the order of bars in bar chart in R? | This can be done by setting the levels of the variable in the order we want.
> data <- data.frame(Class=c("Highschool","Highschool","Graduate","Graduate",
"Graduate","Graduate","Masters","Masters","Masters","PhD"))
Setting the levels in decreasing order
> data <- within(data,
Class <- factor(Class,
levels=names(sort(ta... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This can be done by setting the levels of the variable in the order we want."
},
{
"code": null,
"e": 1277,
"s": 1139,
"text": "> data <- data.frame(Class=c(\"Highschool\",\"Highschool\",\"Graduate\",\"Graduate\",\n\"Graduate\",\"Gra... |
String slicing in C# to rotate a string | Let’s say our string is −
var str = "welcome";
Use the substring() method and the following, if you want to rotate only some characters. Here, we are rotating only 2 characters −
var res = str.Substring(1, str.Length - 1) + str.Substring(0, 2);
The following is the complete code −
Live Demo
using System;
public class... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Let’s say our string is −"
},
{
"code": null,
"e": 1109,
"s": 1088,
"text": "var str = \"welcome\";"
},
{
"code": null,
"e": 1241,
"s": 1109,
"text": "Use the substring() method and the following, if you want to r... |
Ball tracking in volleyball with OpenCV and Tensorflow | by Constantin Toporov | Towards Data Science | After the first experience of applying AI in sport, I was inspired to continue. Home exercises are looked like an insignificant goal and I targeted team plays.
AI in sports is a pretty new thing. There are a few interesting works:
Basketball
Tennis
Volleyball
I am a big fan of playing volleyball, so let’s talk about th... | [
{
"code": null,
"e": 332,
"s": 172,
"text": "After the first experience of applying AI in sport, I was inspired to continue. Home exercises are looked like an insignificant goal and I targeted team plays."
},
{
"code": null,
"e": 403,
"s": 332,
"text": "AI in sports is a pretty n... |
Error Bar plots from a Data Frame using Matplotlib in Python | by Kalyan Keesara | Towards Data Science | I recently had to compare the performance of a few approaches/algorithms for a report and I chose error bars to summarize the results. If you have a similar task at hand, save yourself some time with this article.
Error bar charts are a great way to represent the variability in your data. In simpler words, they give an... | [
{
"code": null,
"e": 386,
"s": 172,
"text": "I recently had to compare the performance of a few approaches/algorithms for a report and I chose error bars to summarize the results. If you have a similar task at hand, save yourself some time with this article."
},
{
"code": null,
"e": 586,... |
How to write a function in JavaScript ? - GeeksforGeeks | 29 Sep, 2021
Introduction: A function is a collection of reusable code that may be invoked from anywhere in your application. This avoids the need to write the same code again and over. It aids programmers in the creation of modular code. Functions enable a programmer to break down a large program into several smaller ... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 25247,
"s": 24909,
"text": "Introduction: A function is a collection of reusable code that may be invoked from anywhere in your application. This avoids the need to write the same code again ... |
CSS - Inclusion | There are four ways to associate styles with your HTML document. Most commonly used methods are inline CSS and External CSS.
You can put your CSS rules into an HTML document using the <style> element. This tag is placed inside the <head>...</head> tags. Rules defined using this syntax will be applied to all the element... | [
{
"code": null,
"e": 2751,
"s": 2626,
"text": "There are four ways to associate styles with your HTML document. Most commonly used methods are inline CSS and External CSS."
},
{
"code": null,
"e": 3004,
"s": 2751,
"text": "You can put your CSS rules into an HTML document using th... |
How to get the first key name of a JavaScript object ? - GeeksforGeeks | 26 Jul, 2021
Given an object and the task is to get the first key of a JavaScript Object. Since JavaScript object does not contains numbered index so we use the following approaches to get the first key name of the object.
Approach 1:
First take the JavaScript Object in a variable.
Use object.keys(objectName) method to... | [
{
"code": null,
"e": 24722,
"s": 24694,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 24932,
"s": 24722,
"text": "Given an object and the task is to get the first key of a JavaScript Object. Since JavaScript object does not contains numbered index so we use the following appro... |
How to sort an ArrayList in Descending Order in Java | To sort an ArrayList, you need to use the Collections.sort() method. This sorts in ascending order, but if you want to sort the ArrayList in descending order, use the Collections.reverseOrder() method as well. This gets included as a parameter −
Collections.sort(myList, Collections.reverseOrder());
Following is the cod... | [
{
"code": null,
"e": 1308,
"s": 1062,
"text": "To sort an ArrayList, you need to use the Collections.sort() method. This sorts in ascending order, but if you want to sort the ArrayList in descending order, use the Collections.reverseOrder() method as well. This gets included as a parameter −"
},
... |
Andrew Ng’s Machine Learning Course in Python (Logistic Regression) | by Benjamin Lau | Towards Data Science | Continuing from the series, this will be python implementation of Andrew Ng’s Machine Learning Course on Logistic Regression.
Logistic regression is used in classification problems where the labels are a discrete number of classes as compared to linear regression, where labels are continuous variables.
Same as usual, w... | [
{
"code": null,
"e": 173,
"s": 47,
"text": "Continuing from the series, this will be python implementation of Andrew Ng’s Machine Learning Course on Logistic Regression."
},
{
"code": null,
"e": 351,
"s": 173,
"text": "Logistic regression is used in classification problems where ... |
Highcharts - VU Meter Chart | We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter.
An example of a Gauge with dual axes is given below.
Let us now see the additional configurations/steps taken.
Configure the chart type to be gauge based. Set the type as 'gauge'.
var chart = {
type: 'guage'
};
Ap... | [
{
"code": null,
"e": 2121,
"s": 2017,
"text": "We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter."
},
{
"code": null,
"e": 2174,
"s": 2121,
"text": "An example of a Gauge with dual axes is given below."
},
{
"code": nul... |
How to create a responsive "timeline" with CSS? | To create a responsive timeline with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" event="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
}
body {
background-color: #9037f5;
font-family: 'Segoe UI', Tahoma, Geneva, Ver... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "To create a responsive timeline with CSS, the code is as follows −"
},
{
"code": null,
"e": 1140,
"s": 1129,
"text": " Live Demo"
},
{
"code": null,
"e": 4115,
"s": 1140,
"text": "<!DOCTYPE html>\n<html>\n<head>\n... |
I Implemented a Face Detection Model. Here’s How I Did It. | by Chi-Feng Wang | Towards Data Science | Last week, I started an internship at Augentix Inc., aiming to learn more about neural networks. There, I came across a model for facial detection which achieved high accuracy while keeping real time performance (link here). This model uses Multi-task Cascaded Convolutional Networks (MTCNN), which is essentially severa... | [
{
"code": null,
"e": 578,
"s": 172,
"text": "Last week, I started an internship at Augentix Inc., aiming to learn more about neural networks. There, I came across a model for facial detection which achieved high accuracy while keeping real time performance (link here). This model uses Multi-task Cas... |
How to retrieve the OS of the Azure VM using Azure CLI in PowerShell? | To retrieve the Azure VM OS using Azure CLI, we can use the “az vm” command but before that, need to make sure that you are connected to the Azure cloud and the subscription.
PS C:\> az vm show -n VMName -g VMRG --query
"[storageProfile.imageReference.offer]" -otsv
OR
PS C:\> az vm show -n VMName -g VMRG --query storag... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "To retrieve the Azure VM OS using Azure CLI, we can use the “az vm” command but before that, need to make sure that you are connected to the Azure cloud and the subscription."
},
{
"code": null,
"e": 1328,
"s": 1237,
"text": "PS C:\\... |
How to query on list field in MongoDB? | To understand the query on list field, and/or, you can create a collection with documents.
The query to create a collection with a document is as follows −
> db.andOrDemo.insertOne({"StudentName":"Larry","StudentScore":[33,40,50,60,70]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5c9522d316f542d757e2b444"... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "To understand the query on list field, and/or, you can create a collection with documents."
},
{
"code": null,
"e": 1218,
"s": 1153,
"text": "The query to create a collection with a document is as follows −"
},
{
"code": null... |
Selecting Multiple Columns From a Pandas DataFrame | Towards Data Science | Multiple column selection is one of the most common and simple tasks one can perform. In today’s short guide we will discuss about a few possible ways for selecting multiple columns from a pandas DataFrame. Specifically, we will explore how to do so
using basing indexing
with loc
using iloc
through the creation of a ne... | [
{
"code": null,
"e": 421,
"s": 171,
"text": "Multiple column selection is one of the most common and simple tasks one can perform. In today’s short guide we will discuss about a few possible ways for selecting multiple columns from a pandas DataFrame. Specifically, we will explore how to do so"
},... |
Machine Learning in JavaScript. Is it easier? difficult? or simply fun? | by Rajat S | Towards Data Science | If you have tried Machine Learning before, you are probably thinking that there is a huge typo in the article’s title and that I meant to write Python or R in place of JavaScript.
And if you are a JavaScript developer, you probably know that since the creation of NodeJS, almost anything is possible in JavaScript. You c... | [
{
"code": null,
"e": 351,
"s": 171,
"text": "If you have tried Machine Learning before, you are probably thinking that there is a huge typo in the article’s title and that I meant to write Python or R in place of JavaScript."
},
{
"code": null,
"e": 665,
"s": 351,
"text": "And if... |
Employee Management System using Python - GeeksforGeeks | 06 Oct, 2021
The task is to create a Database-driven Employee Management System in Python that will store the information in the MySQL Database. The script will contain the following operations :
Add Employee
Remove Employee
Promote Employee
Display Employees
The idea is that we perform different changes in our Employe... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 24108,
"s": 23925,
"text": "The task is to create a Database-driven Employee Management System in Python that will store the information in the MySQL Database. The script will contain the fol... |
Program for decimal to hexadecimal conversion in C++ | Given with a decimal number as an input, the task is to convert the given decimal number into a hexadecimal number.
Hexadecimal number in computers is represented with base 16 and decimal number is represented with base 10 and represented with values 0 - 9 whereas hexadecimal number have digits starting from 0 – 15 in ... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "Given with a decimal number as an input, the task is to convert the given decimal number into a hexadecimal number."
},
{
"code": null,
"e": 1460,
"s": 1178,
"text": "Hexadecimal number in computers is represented with base 16 and de... |
Node.js - Express Framework | Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based Web applications. Following are some of the core features of Express framework −
Allows to set up middlewares to respond t... | [
{
"code": null,
"e": 2297,
"s": 2018,
"text": "Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based Web applications. Following are some of the core featur... |
How do we convert a string to a set in Python? | Python’s standard library contains built-in function set() which converts an iterable to set. A set object doesn’t contain repeated items. So, if a string contains any character more than once, that character appears only once in the set object. Again, the characters may not appear in the same sequence as in the string... | [
{
"code": null,
"e": 1431,
"s": 1062,
"text": "Python’s standard library contains built-in function set() which converts an iterable to set. A set object doesn’t contain repeated items. So, if a string contains any character more than once, that character appears only once in the set object. Again, ... |
How to set smooth scrolling to stop at a specific position from the top using jQuery ? - GeeksforGeeks | 22 Jun, 2021
The scrollTop() method in jQuery is used to scroll to a particular portion of the page. Animating this method with the available inbuilt animations can make the scroll smoother. And, subtracting the specified value from it will make the scrolling to stop from the top.
Approach: The hash portion of the anch... | [
{
"code": null,
"e": 25070,
"s": 25042,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 25339,
"s": 25070,
"text": "The scrollTop() method in jQuery is used to scroll to a particular portion of the page. Animating this method with the available inbuilt animations can make the sc... |
Exploring Design Patterns in Python | by Dan Root | Towards Data Science | Design Patterns are used to help programmers with understanding concepts, teaching, learning, and building on other great working ideas and concepts. So, when you are thinking Design Patterns think of solving problems. Design Patterns are models built to help structure and solve simple to complicated issues. A good amo... | [
{
"code": null,
"e": 1241,
"s": 172,
"text": "Design Patterns are used to help programmers with understanding concepts, teaching, learning, and building on other great working ideas and concepts. So, when you are thinking Design Patterns think of solving problems. Design Patterns are models built to... |
What is the correct way to define class variables in Python? | Class variables are variables that are declared outside the__init__method. These are static elements, meaning, they belong to the class rather than to the class instances. These class variables are shared by all instances of that class. Example code for class variables
class MyClass:
__item1 = 123
__item2 = "abc"
... | [
{
"code": null,
"e": 1333,
"s": 1062,
"text": "Class variables are variables that are declared outside the__init__method. These are static elements, meaning, they belong to the class rather than to the class instances. These class variables are shared by all instances of that class. Example code for... |
C program for Binomial Coefficients table | Given with a positive integer value let’s say ‘val’ and the task is to print the value of binomial coefficient B(n, k) where, n and k be any value between 0 to val and hence display the result.
Binomial coefficient (n, k) is the order of choosing ‘k’ results from the given ‘n’ possibilities. The value of binomial coeff... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "Given with a positive integer value let’s say ‘val’ and the task is to print the value of binomial coefficient B(n, k) where, n and k be any value between 0 to val and hence display the result."
},
{
"code": null,
"e": 1421,
"s": 1256,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.