title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Command Line Scripts | Python Packaging - GeeksforGeeks
29 Apr, 2019 How do we execute any script in Python? $ python do_something.py $ python do_something_with_args.py gfg vibhu Probably that’s how you do it.If your answer was that you just click a button on your IDE to execute your Python code, just assume you were asked specifically how you do it on command line. Let’s ...
[ { "code": null, "e": 23849, "s": 23821, "text": "\n29 Apr, 2019" }, { "code": null, "e": 23889, "s": 23849, "text": "How do we execute any script in Python?" }, { "code": null, "e": 23960, "s": 23889, "text": "$ python do_something.py\n$ python do_something_wi...
How to add string values to a C# list?
To add string values to a list in C#, use the Add() method. Firstly, declare a string list in C# − List<string> list1 = new List<string>(); Now add string items − myList.Add("Jack"); myList.Add("Ben"); myList.Add("Eon"); myList.Add("Tim"); Let us see the complete code − using System; using System.Collections.Generic; u...
[ { "code": null, "e": 1122, "s": 1062, "text": "To add string values to a list in C#, use the Add() method." }, { "code": null, "e": 1161, "s": 1122, "text": "Firstly, declare a string list in C# −" }, { "code": null, "e": 1202, "s": 1161, "text": "List<string>...
Art of Vector Representation of Words | by ASHISH RANA | Towards Data Science
Expressing power of notations used to represent a vocabulary of a language has been a great deal of interest in the field of linguistics. Languages in practice have semantic ambiguity. “John kissed his wife, and so did Sam”. Sam kissed John’s wife or his own? These ambiguities must be handled in order to represent info...
[ { "code": null, "e": 356, "s": 171, "text": "Expressing power of notations used to represent a vocabulary of a language has been a great deal of interest in the field of linguistics. Languages in practice have semantic ambiguity." }, { "code": null, "e": 396, "s": 356, "text": "“...
Rendering elements in React.js
The smallest building blocks of React applications are the elements. Example of an element is − const message = <h1>Welcome, Steve</h1>; React DOM updates the actual DOM with the converted react elements. React components are made up of elements. We will have a parent div element in the main html file . This div can be...
[ { "code": null, "e": 1158, "s": 1062, "text": "The smallest building blocks of React applications are the elements. Example of an element is −" }, { "code": null, "e": 1199, "s": 1158, "text": "const message = <h1>Welcome, Steve</h1>;" }, { "code": null, "e": 1309, ...
Make first letter of a string uppercase in JavaScript?
To make first letter of a string uppercase, use toUpperCase() in JavaScript. With that, we will use charAt(0) since we need to only capitalize the 1st letter. function replaceWithTheCapitalLetter(values){ return values.charAt(0).toUpperCase() + values.slice(1); } var word="javascript" console.log(replaceWithTheCapit...
[ { "code": null, "e": 1221, "s": 1062, "text": "To make first letter of a string uppercase, use toUpperCase() in JavaScript. With that, we will\nuse charAt(0) since we need to only capitalize the 1st letter." }, { "code": null, "e": 1399, "s": 1221, "text": "function replaceWithTh...
Brilliant Numbers - GeeksforGeeks
16 Jul, 2021 Brilliant Number is a number N which is the product of two primes with the same number of digits.Few Brilliant numbers are: 4, 6, 9, 10, 14, 15, 21, 25, 35, 49.... Given a number N, the task is to check if N is a Brilliant Number or not. If N is a Brilliant Number then print “Yes” else print “No”.Example...
[ { "code": null, "e": 24301, "s": 24273, "text": "\n16 Jul, 2021" }, { "code": null, "e": 24426, "s": 24301, "text": "Brilliant Number is a number N which is the product of two primes with the same number of digits.Few Brilliant numbers are: " }, { "code": null, "e": 2...
RequireJS - Module Loading
Modules are loaded using the define() function in js file. The syntax for loading the module in html file is as shown below − <script data-main = "main" src = "require.js"></script> In the script tag given above, main is used to set up packages that are relative to require.js, which in this example are the source packa...
[ { "code": null, "e": 1968, "s": 1842, "text": "Modules are loaded using the define() function in js file. The syntax for loading the module in html file is as shown below −" }, { "code": null, "e": 2024, "s": 1968, "text": "<script data-main = \"main\" src = \"require.js\"></scri...
Java Program to Implement Playfair Cipher Algorithm - GeeksforGeeks
11 Nov, 2021 Cipher is an algorithm for encryption and decryption. The cipher text is a process that applies to different types of algorithms to convert plain text to coded text. It is referred to as ciphertext. The Playfair cipher was the first practical digraph substitution cipher. The scheme was invented in 1854 by...
[ { "code": null, "e": 23655, "s": 23624, "text": " \n11 Nov, 2021\n" }, { "code": null, "e": 24414, "s": 23655, "text": "Cipher is an algorithm for encryption and decryption. The cipher text is a process that applies to different types of algorithms to convert plain text to coded ...
Genshin Impact Social Network Analysis with Python | Towards Data Science
Genshin is an open-world action role-playing game. On top of being named one of Google Play’s best games of 2020, it is also one of the top grossing mobile games in the first half of 2021. Packaged with game is the lore, where the player and other characters weave in and out of story lines. The way different characters...
[ { "code": null, "e": 463, "s": 171, "text": "Genshin is an open-world action role-playing game. On top of being named one of Google Play’s best games of 2020, it is also one of the top grossing mobile games in the first half of 2021. Packaged with game is the lore, where the player and other charact...
Nan (Not a Number) in Java
13 Jan, 2017 Can You guess the output of following code fragment: public class Test{ public static void main(String[] args) { System.out.println(2 % 0); }} Yes, You guessed it right: ArithmeticExceptionOutput: Exception in thread "main" java.lang.ArithmeticException: / by zero at traps.Test.main...
[ { "code": null, "e": 24081, "s": 24053, "text": "\n13 Jan, 2017" }, { "code": null, "e": 24134, "s": 24081, "text": "Can You guess the output of following code fragment:" }, { "code": "public class Test{ public static void main(String[] args) { System.out.pri...
How to get Python exception text?
If a python code throws an exception, we can catch it and print the type, the error message, traceback and get information like file name and line number in python script where the exception occurred. We can find the type, value, traceback parameters of the error Type gives the type of exception that has occurred; valu...
[ { "code": null, "e": 1263, "s": 1062, "text": "If a python code throws an exception, we can catch it and print the type, the error message, traceback and get information like file name and line number in python script where the exception occurred." }, { "code": null, "e": 1326, "s": ...
Explain the Union to pointer in C language
A union is called as a memory location, which is shared by several variables of different data types. The syntax is as follows − union uniontag{ datatype member 1; datatype member 2; ---- ---- datatype member n; }; For example, union sample{ int a; float b; char c; }; Given below are the respect...
[ { "code": null, "e": 1164, "s": 1062, "text": "A union is called as a memory location, which is shared by several variables of different data types." }, { "code": null, "e": 1191, "s": 1164, "text": "The syntax is as follows −" }, { "code": null, "e": 1292, "s": 1...
Introduction to Git Data Extraction and Analysis in Python | by Xhentilo Karaj | Towards Data Science
Is there anyone in the software industry who has never used or at least heard of Git? Git is a revolutionary tool that is quite ubiquitous in software teams nowadays. This article’s purpose is not to provide an introduction to git, there are a ton of resources that can guide you through that. Its purpose is rather to a...
[ { "code": null, "e": 258, "s": 172, "text": "Is there anyone in the software industry who has never used or at least heard of Git?" }, { "code": null, "e": 569, "s": 258, "text": "Git is a revolutionary tool that is quite ubiquitous in software teams nowadays. This article’s purp...
CoffeeScript - switch statement
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case. Here is the syntax of switch in JavaScript. switch (expression){ case condition 1: statement(s) break; case condition ...
[ { "code": null, "e": 2539, "s": 2309, "text": "A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case. Here is the syntax of switch in JavaScript." }, { "code": n...
Hierarchical Clustering — Explained | by Soner Yıldırım | Towards Data Science
Clustering algorithms are unsupervised machine learning algorithms so there is no label associated with data points. Clustering algorithms look for similarities or dissimilarities among data points so that similar ones can be grouped together. There are many different approaches and algorithms to perform clustering tas...
[ { "code": null, "e": 585, "s": 171, "text": "Clustering algorithms are unsupervised machine learning algorithms so there is no label associated with data points. Clustering algorithms look for similarities or dissimilarities among data points so that similar ones can be grouped together. There are m...
Set Colorbar Range in matplotlib - GeeksforGeeks
11 Dec, 2020 Hello Geeks! In this article, we will try to set the color range using the matplotlib Python module. Matplotlib allows us a large range of Colorbar customization. The Colorbar is simply an instance of plt.Axes. It provides a scale for number-to-color ratio based on the data in a graph. Setting a range limi...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n11 Dec, 2020" }, { "code": null, "e": 24828, "s": 24292, "text": "Hello Geeks! In this article, we will try to set the color range using the matplotlib Python module. Matplotlib allows us a large range of Colorbar customization. ...
How to Find Linux File Creation Time using Debugfs? - GeeksforGeeks
09 Apr, 2021 Everything is treated as a file in Linux, and all the information about a file is stored in inodes, which includes the crucial metadata about a file such as creation time, last modification, etc. Every file in Linux is identified by its inode number. In this article, we will be using debugf command to find...
[ { "code": null, "e": 24952, "s": 24924, "text": "\n09 Apr, 2021" }, { "code": null, "e": 25203, "s": 24952, "text": "Everything is treated as a file in Linux, and all the information about a file is stored in inodes, which includes the crucial metadata about a file such as creati...
Python | sympy.is_odd() method - GeeksforGeeks
12 Oct, 2021 In simpy module, we can test whether a given number n is odd or not using sympy.is_odd() function. Syntax: sympy.is_odd(n) Parameter: n; number to be tested Return: bool value result Code #1: # Python program to check odd number# using sympy.is_odd() method # importing sympy modulefrom sympy import *...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n12 Oct, 2021" }, { "code": null, "e": 24391, "s": 24292, "text": "In simpy module, we can test whether a given number n is odd or not using sympy.is_odd() function." }, { "code": null, "e": 24480, "s": 24391, ...
ML Approaches for Time Series. In this post I play around with some... | by Pablo Ruiz | Towards Data Science
Modeling time series with non conventional models In this post I play around with some Machine Learning techniques to analyze time series data and explore their potential use in this case of scenarios. In this first post only the first point of the index is developed. The rest have a separate post which can be accessed...
[ { "code": null, "e": 222, "s": 172, "text": "Modeling time series with non conventional models" }, { "code": null, "e": 374, "s": 222, "text": "In this post I play around with some Machine Learning techniques to analyze time series data and explore their potential use in this cas...
Explain division operation in relational algebra (DBMS)?
Query is a question or requesting information. Query language is a language which is used to retrieve information from a database. Query language is divided into two types − Procedural language Procedural language Non-procedural language Non-procedural language Information is retrieved from the database by specifying t...
[ { "code": null, "e": 1193, "s": 1062, "text": "Query is a question or requesting information. Query language is a language which is used to retrieve information from a database." }, { "code": null, "e": 1236, "s": 1193, "text": "Query language is divided into two types −" }, ...
UInt16.ToString Method in C# with Examples
The UInt16.ToString() method in C# is used to convert the numeric value of the current UInt16 instance to its equivalent string representation. Following is the syntax − public override string ToString(); Let us now see an example to implement the UInt16.ToString() method − using System; public class Demo { public s...
[ { "code": null, "e": 1206, "s": 1062, "text": "The UInt16.ToString() method in C# is used to convert the numeric value of the current UInt16 instance to its equivalent string representation." }, { "code": null, "e": 1232, "s": 1206, "text": "Following is the syntax −" }, { ...
How to get the IP address of android device programmatically?
This example demonstrates how do I get the IP address of android device programmatically. 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": 1152, "s": 1062, "text": "This example demonstrates how do I get the IP address of android device programmatically." }, { "code": null, "e": 1281, "s": 1152, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requi...
Address Calculation Sort using Hashing - GeeksforGeeks
10 Oct, 2018 In this sorting algorithm, Hash Function f is used with the property of Order Preserving Function which states that if . Hash Function: f(x) = floor( (x/maximum) * SIZE ) where maximum => maximum value in the array, SIZE => size of the address table (10 in our case), floor => floor function Th...
[ { "code": null, "e": 24744, "s": 24716, "text": "\n10 Oct, 2018" }, { "code": null, "e": 24865, "s": 24744, "text": "In this sorting algorithm, Hash Function f is used with the property of Order Preserving Function which states that if ." }, { "code": null, "e": 24880...
Find the next greater element in a Circular Array - GeeksforGeeks
20 Apr, 2022 Given a circular array arr[] of N integers such that the last element of the given array is adjacent to the first element of the array, the task is to print the Next Greater Element in this circular array. Elements for which no greater element exist, consider the next greater element as “-1”. Examples: Inp...
[ { "code": null, "e": 24984, "s": 24956, "text": "\n20 Apr, 2022" }, { "code": null, "e": 25278, "s": 24984, "text": "Given a circular array arr[] of N integers such that the last element of the given array is adjacent to the first element of the array, the task is to print the Ne...
Check if list contains consecutive numbers in Python
Depending on the needs of our data analysis we may need to check for presence of sequential numbers in a python data container. In the below programs we find out if among the elements of Alist, there are any consecutive numbers. The sorted function will rearrange the elements of the list in a sorted order. We then appl...
[ { "code": null, "e": 1291, "s": 1062, "text": "Depending on the needs of our data analysis we may need to check for presence of sequential numbers in a python data container. In the below programs we find out if among the elements of Alist, there are any consecutive numbers." }, { "code": nu...
What are the different types of keywords in C language?
Keywords are generally called as pre-defined or reserved words in a programming language. Every keyword in C language performs a specific function in a program. Keywords cannot be used as variable names. Keywords cannot be used as variable names. Keywords have fixed meanings, and that meaning cannot be changed. Keyword...
[ { "code": null, "e": 1223, "s": 1062, "text": "Keywords are generally called as pre-defined or reserved words in a programming language. Every keyword in C language performs a specific function in a program." }, { "code": null, "e": 1266, "s": 1223, "text": "Keywords cannot be us...
Guide on AWS Textract set-up. On how to accurately process PDF files... | by Daulet Nurmanbetov | Towards Data Science
How to accurately process PDF files with OCR-as-a-service from AWS Recently a new paradigm of async API responses has become prominent. It works by returning Job-ID rather than an API response. Then, to check the status, the user would need to submit a second call to the API with the Job ID. Here’s an excellent guide o...
[ { "code": null, "e": 113, "s": 46, "text": "How to accurately process PDF files with OCR-as-a-service from AWS" }, { "code": null, "e": 372, "s": 113, "text": "Recently a new paradigm of async API responses has become prominent. It works by returning Job-ID rather than an API res...
Testing and Building Angular7 Projects
In this chapter will discuss the following topics − To test Angular 7 Project To build Angular 7 Project During the project setup, the required packages for testing are already installed. There is a .spec.ts file created for every new component, service, directive, etc. We are going to use jasmine to write our test cas...
[ { "code": null, "e": 2113, "s": 2061, "text": "In this chapter will discuss the following topics −" }, { "code": null, "e": 2139, "s": 2113, "text": "To test Angular 7 Project" }, { "code": null, "e": 2166, "s": 2139, "text": "To build Angular 7 Project" }, ...
How to use wildcard in Python regular expression?
The following code uses the Python regex .()dot character for wildcard which stands for any character other than newline. import re rex = re.compile('th.s') l = "this, thus, just, then" print rex.findall(l) This gives the output ['this', 'thus']
[ { "code": null, "e": 1184, "s": 1062, "text": "The following code uses the Python regex .()dot character for wildcard which stands for any character other than newline." }, { "code": null, "e": 1269, "s": 1184, "text": "import re\nrex = re.compile('th.s')\nl = \"this, thus, just,...
How your data is stored on disk and memory? | by Guangyuan(Frank) Li | Towards Data Science
I consider myself as an applied programmer, I use high-level programming languages like Python to manipulate the data frames, build simple pipelines to facilitate the data analysis of certain tasks. However, at the atomic level, the computer itself doesn’t understand what “pandas.read_csv()” means or what the “write.ta...
[ { "code": null, "e": 663, "s": 171, "text": "I consider myself as an applied programmer, I use high-level programming languages like Python to manipulate the data frames, build simple pipelines to facilitate the data analysis of certain tasks. However, at the atomic level, the computer itself doesn’...
Function Annotations in Python
Function annotations introduced in Python 3.0 adds a feature that allows you to add arbitrary metadata to function parameters and return value. Since python 3, function annotations have been officially added to python (PEP-3107). The primary purpose was to have a standard way to link metadata to function parameters and...
[ { "code": null, "e": 1397, "s": 1062, "text": "Function annotations introduced in Python 3.0 adds a feature that allows you to add arbitrary metadata to function parameters and return value. Since python 3, function annotations have been officially added to python (PEP-3107). The primary purpose was...
Increase the thickness of a line with Matplotlib - GeeksforGeeks
26 Dec, 2020 Prerequisites: Matplotlib Matplotlib is the most widely used library for plotting graphs with the available dataset. Matplotlib supports line chart which are used to represent data over a continuous time span. In line chart, the data value is plotted as points and later connected by a line to show trend of...
[ { "code": null, "e": 30222, "s": 30194, "text": "\n26 Dec, 2020" }, { "code": null, "e": 30248, "s": 30222, "text": "Prerequisites: Matplotlib" }, { "code": null, "e": 30640, "s": 30248, "text": "Matplotlib is the most widely used library for plotting graphs w...
Java program to count total bits in a number
The total bits in a number can be counted by using its binary representation. An example of this is given as follows − Number = 9 Binary representation = 1001 Total bits = 4 A program that demonstrates this is given as follows. Live Demo public class Example { public static void main(String[] arg) { int num ...
[ { "code": null, "e": 1181, "s": 1062, "text": "The total bits in a number can be counted by using its binary representation. An example of this is given as follows −" }, { "code": null, "e": 1237, "s": 1181, "text": "Number = 9\nBinary representation = 1001\nTotal bits = 4\n" }...
Clojure - Maps
A Map is a collection that maps keys to values. Two different map types are provided - hashed and sorted. HashMaps require keys that correctly support hashCode and equals. SortedMaps require keys that implement Comparable, or an instance of Comparator. A map can be created in two ways, the first is via the hash-map met...
[ { "code": null, "e": 2627, "s": 2374, "text": "A Map is a collection that maps keys to values. Two different map types are provided - hashed and sorted. HashMaps require keys that correctly support hashCode and equals. SortedMaps require keys that implement Comparable, or an instance of Comparator."...
TensorFlow - Keras
Keras is compact, easy to learn, high-level Python library run on top of TensorFlow framework. It is made with focus of understanding deep learning techniques, such as creating layers for neural networks maintaining the concepts of shapes and mathematical details. The creation of freamework can be of the following two ...
[ { "code": null, "e": 2777, "s": 2449, "text": "Keras is compact, easy to learn, high-level Python library run on top of TensorFlow framework. It is made with focus of understanding deep learning techniques, such as creating layers for neural networks maintaining the concepts of shapes and mathematic...
How to export class with static methods in Node.js ?
26 May, 2021 We know JS static keyword defines static properties and methods for a class. Static method or properties can not be called from instances of the class. Instead, they’re calling from the class itself. class Car { static run() { console.log('Car running...') } } // Error: (intermediate value).run // is ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2021" }, { "code": null, "e": 228, "s": 28, "text": "We know JS static keyword defines static properties and methods for a class. Static method or properties can not be called from instances of the class. Instead, they’re callin...
Python | Merging nested lists
18 Dec, 2021 Given two nested lists, ‘lst1’ and ‘lst2’, write a Python program to create a new nested list ‘lst3’ out of the two given nested lists, so that the new nested list consist common intersections of both lists as well as the non-intersecting elements. Examples: Input : lst1 = [[5, 9], [8, 2, 6], [3, 4]] ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Dec, 2021" }, { "code": null, "e": 277, "s": 28, "text": "Given two nested lists, ‘lst1’ and ‘lst2’, write a Python program to create a new nested list ‘lst3’ out of the two given nested lists, so that the new nested list consist com...
Improving Linear Search Technique
13 Jan, 2022 A linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched. It is observed that when searching for a key element, then there is a possibility for searching the same key ele...
[ { "code": null, "e": 53, "s": 25, "text": "\n13 Jan, 2022" }, { "code": null, "e": 382, "s": 53, "text": "A linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole lis...
Socket Programming in C/C++: Handling multiple clients on server without multi threading
28 Jun, 2022 This tutorial assumes you have a basic knowledge of socket programming, i.e you are familiar with basic server and client model. In the basic model, server handles only one client at a time, which is a big assumption if you want to develop any scalable server model.The simple way to handle multiple clients...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2022" }, { "code": null, "e": 517, "s": 52, "text": "This tutorial assumes you have a basic knowledge of socket programming, i.e you are familiar with basic server and client model. In the basic model, server handles only one c...
How to set Default Password Character in TextBox in C#?
29 Nov, 2019 In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In TextBox, you are allowed to set a value which represents whether the text in the TextBox control should appear as the default password...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2019" }, { "code": null, "e": 634, "s": 28, "text": "In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In Te...
LESS - Fade
It is used to set the transparency of a color for selected elements. It has following parameters − color − It represents color object. color − It represents color object. amount − It contains percentage between 0 - 100%. amount − It contains percentage between 0 - 100%. The following example demonstrates the use of fad...
[ { "code": null, "e": 2649, "s": 2550, "text": "It is used to set the transparency of a color for selected elements. It has following parameters −" }, { "code": null, "e": 2685, "s": 2649, "text": "color − It represents color object." }, { "code": null, "e": 2721, ...
Custom ArrayList in Java
A custom ArrayList can have multiple types of data and its attributes in general are based on the user requirements. A program that demonstrates a custom ArrayList is given as follows − Live Demo import java.util.ArrayList; public class CustomArrayList { int n = 5; class Employee { int eno; String na...
[ { "code": null, "e": 1179, "s": 1062, "text": "A custom ArrayList can have multiple types of data and its attributes in general are based on the user requirements." }, { "code": null, "e": 1248, "s": 1179, "text": "A program that demonstrates a custom ArrayList is given as follow...
Generate all the binary strings of N bits - GeeksforGeeks
12 Jul, 2021 Given a positive integer number N. The task is to generate all the binary strings of N bits. These binary strings should be in ascending order.Examples: Input: 2 Output: 0 0 0 1 1 0 1 1 Input: 3 Output: 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Approach: The idea is to try every permutation. For...
[ { "code": null, "e": 25278, "s": 25250, "text": "\n12 Jul, 2021" }, { "code": null, "e": 25433, "s": 25278, "text": "Given a positive integer number N. The task is to generate all the binary strings of N bits. These binary strings should be in ascending order.Examples: " }, ...
MongoDB $arrayElemAt Operator
09 Dec, 2021 MongoDB provides different types of array expression operators that are used in the aggregation pipeline stages and $arrayElemAt operator is one of them. This operator is used to return the element present on the specified index of the given array. Syntax: { $arrayElemAt: [ <array>, <index> ] } Here, the...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Dec, 2021" }, { "code": null, "e": 278, "s": 28, "text": "MongoDB provides different types of array expression operators that are used in the aggregation pipeline stages and $arrayElemAt operator is one of them. This operator is used...
Matplotlib.pyplot.eventplot() in Python
19 Apr, 2020 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. This function is often used to plot identical lines at a given position. These plots, in genera...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 240, "s": 28, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t...
Levene’s test
21 May, 2021 Levene’s test is used to assess the equality of variance between two different samples. For every case, it calculates the absolute difference between the value of that case and its cell mean and performs a one-way analysis of variance (ANOVA) on those differences The samples from the populations under cons...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2021" }, { "code": null, "e": 292, "s": 28, "text": "Levene’s test is used to assess the equality of variance between two different samples. For every case, it calculates the absolute difference between the value of that case an...
Paper Battery
06 Jan, 2022 A Paper Battery is a meager, adaptable energy manufacture and storage device that is shaped by merging carbon nanotubes with an ordinary sheet of cellulose-based paper. The paper battery can act in two different ways. A battery and a supercapacitor too. These non-dangerous, adaptable batteries can be utili...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jan, 2022" }, { "code": null, "e": 604, "s": 28, "text": "A Paper Battery is a meager, adaptable energy manufacture and storage device that is shaped by merging carbon nanotubes with an ordinary sheet of cellulose-based paper. The pa...
Python 3 - Tuples
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The main difference between the tuples and the lists is that the tuples cannot be changed unlike lists. Tuples use parentheses, whereas lists use square brackets. Creating a tuple is as simple as putting different comma-separated ...
[ { "code": null, "e": 2727, "s": 2474, "text": "A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The main difference between the tuples and the lists is that the tuples cannot be changed unlike lists. Tuples use parentheses, whereas lists use square brackets."...
PyQt5 QDateTimeEdit – Setting QDateTime to it
10 Jul, 2020 In this article we will see how we can set QDateTime object to the QDateTimeEdit widget. QDateTime is basically a combination of QDate and QTime i.e it has both date and time. And QDateTimeEdit widget is used to show or receive the QDateTime. In order to do this we will use setDateTime method with the QDat...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jul, 2020" }, { "code": null, "e": 271, "s": 28, "text": "In this article we will see how we can set QDateTime object to the QDateTimeEdit widget. QDateTime is basically a combination of QDate and QTime i.e it has both date and time....
Python Program for Find largest prime factor of a number
17 Feb, 2018 Given a positive integer \’n\'( 1 <= n <= 1015). Find the largest prime factor of a number. Input: 6 Output: 3 Explanation Prime factor of 6 are- 2, 3 Largest of them is \'3\' Input: 15 Output: 5 Python3 # Python3 code to find largest prime# factor of numberimport math # A function to find largest prime...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Feb, 2018" }, { "code": null, "e": 144, "s": 52, "text": "Given a positive integer \\’n\\'( 1 <= n <= 1015). Find the largest prime factor of a number." }, { "code": null, "e": 250, "s": 144, "text": "Input: 6\nO...
Scala String toLowerCase() method with example
29 Oct, 2019 The toLowerCase() method is utilized to convert all the characters in the String into the lowercase. Method Definition: String toLowerCase() Return Type: It returns the resultant string after converting each character of the string into the lowercase. Example: 1# // Scala program of toLowerCase()// method ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Oct, 2019" }, { "code": null, "e": 129, "s": 28, "text": "The toLowerCase() method is utilized to convert all the characters in the String into the lowercase." }, { "code": null, "e": 169, "s": 129, "text": "Metho...
AngularJS - Upload File
We are providing an example of Upload File. To develop this app, we have used HTML, CSS and AngularJS. Following example shows about how to upload the file using AngularJS. <html> <head> <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"> </script> </head> <bo...
[ { "code": null, "e": 3006, "s": 2833, "text": "We are providing an example of Upload File. To develop this app, we have used HTML, CSS and AngularJS. Following example shows about how to upload the file using AngularJS." }, { "code": null, "e": 4963, "s": 3006, "text": "<html>\n ...
How to open two files together in Python?
24 Jan, 2021 Python provides the ability to open as well as work with multiple files at the same time. Different files can be opened in different modes, to simulate simultaneous writing or reading from these files. An arbitrary number of files can be opened with the open() method supported in Python 2.7 version or grea...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 395, "s": 28, "text": "Python provides the ability to open as well as work with multiple files at the same time. Different files can be opened in different modes, to simulate simultaneous writing or...
Hashtable keys() Method in Java
09 Oct, 2021 As we all know enumeration defines java class type so do enumerations can have constructors, methods, and instance variables. The java.util.Hashtable.keys() method of Hashtable class in Java is used to get the enumeration of the keys present in the hashtable. Illustration: Syntax: public Enumeration<K> ke...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Oct, 2021" }, { "code": null, "e": 288, "s": 28, "text": "As we all know enumeration defines java class type so do enumerations can have constructors, methods, and instance variables. The java.util.Hashtable.keys() method of Hashtabl...
How to get the number of pages in a PDF document using PHP ?
29 Jul, 2020 PHP offers inbuilt functions and extensions that can be used to count the number of pages in a document with .pdf extension. There are numerous ways by which this can be done. Following are the methods used to count the pages in a pdf document: Method 1: Using ImageMagic extension: The extension offered by...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2020" }, { "code": null, "e": 273, "s": 28, "text": "PHP offers inbuilt functions and extensions that can be used to count the number of pages in a document with .pdf extension. There are numerous ways by which this can be done....
Python slice() function
30 Sep, 2021 Python slice() function returns a slice object. A sequence of objects of any type(string, bytes, tuple, list or range) or the object which implements __getitem__() and __len__() method then this object can be sliced using slice() method. Syntax: slice(stop) slice(start, stop, step) Parameters: start: S...
[ { "code": null, "e": 53, "s": 25, "text": "\n30 Sep, 2021" }, { "code": null, "e": 102, "s": 53, "text": "Python slice() function returns a slice object. " }, { "code": null, "e": 293, "s": 102, "text": "A sequence of objects of any type(string, bytes, tuple, ...
Project Idea | Third -Eye : Aid for Blind
29 Jun, 2018 Project Title: Third Eye – Aid For Blind. Introduction:This project aims to develop a complete portable aid(Raspberry Pi) for blind pedestrians and deal with problems in existing systems efficiently. The system designed will detect an object or obstacleusing ultrasonic sensors and gives audio instructions ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Jun, 2018" }, { "code": null, "e": 96, "s": 54, "text": "Project Title: Third Eye – Aid For Blind." }, { "code": null, "e": 463, "s": 96, "text": "Introduction:This project aims to develop a complete portable aid...
Stein’s Algorithm for finding GCD
04 Jul, 2022 Stein’s algorithm or binary GCD algorithm is an algorithm that computes the greatest common divisor of two non-negative integers. Stein’s algorithm replaces division with arithmetic shifts, comparisons, and subtraction. Examples: Input: a = 17, b = 34 Output : 17 Input: a = 50, b = 49 Output: 1 Algorith...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 272, "s": 52, "text": "Stein’s algorithm or binary GCD algorithm is an algorithm that computes the greatest common divisor of two non-negative integers. Stein’s algorithm replaces division with ari...
Rearrange a binary string as alternate x and y occurrences
09 Jun, 2022 Given a binary string s and two integers x and y are given. Task is to arrange the given string in such a way so that ‘0’ comes X-time then ‘1’ comes Y-time and so on until one of the ‘0’ or ‘1’ is finished. Then concatenate rest of the string and print the final string. Given : x or y can not be 0Examples...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Jun, 2022" }, { "code": null, "e": 363, "s": 52, "text": "Given a binary string s and two integers x and y are given. Task is to arrange the given string in such a way so that ‘0’ comes X-time then ‘1’ comes Y-time and so on until o...
Check if a given Binary Tree is Heap
25 Mar, 2022 Given a binary tree, we need to check it has heap property or not, Binary tree need to fulfill the following two conditions for being a heap – It should be a complete tree (i.e. all levels except last should be full).Every node’s value should be greater than or equal to its child node (considering max-hea...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Mar, 2022" }, { "code": null, "e": 198, "s": 54, "text": "Given a binary tree, we need to check it has heap property or not, Binary tree need to fulfill the following two conditions for being a heap – " }, { "code": null, ...
How to enable row selection in a JTable with Java
To enable row selection, use the setRowSelectionAllowed () method and set it to TRUE − table.setCell setRowSelectionAllowed(true); The following is an example to enable row selection in a JTable − package my; import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; ...
[ { "code": null, "e": 1149, "s": 1062, "text": "To enable row selection, use the setRowSelectionAllowed () method and set it to TRUE −" }, { "code": null, "e": 1193, "s": 1149, "text": "table.setCell setRowSelectionAllowed(true);" }, { "code": null, "e": 1259, "s":...
How to parse an URL in JavaScript?
It is very simple to parse an URL in javascript by using DOM method rather than Regular expressions. If regular expressions are used then code will be much more complicated. In DOM method just a function call will return the parsed URL. In the following example, initially a function is created and then an anchor tag "...
[ { "code": null, "e": 1300, "s": 1062, "text": "It is very simple to parse an URL in javascript by using DOM method rather than Regular expressions. If regular expressions are used then code will be much more complicated. In DOM method just a function call will return the parsed URL. " }, { "...
Using Neural Networks to solve Ordinary Differential Equations | by Caio Davi | Towards Data Science
The idea of solving an ODE using a Neural Network was first described by Lagaris et al. The insight behind it is basically training a neural network to satisfy the conditions required by a differential equation. In other words, we need to find a function whose derivative satisfies the ODE conditions. This article will ...
[ { "code": null, "e": 559, "s": 47, "text": "The idea of solving an ODE using a Neural Network was first described by Lagaris et al. The insight behind it is basically training a neural network to satisfy the conditions required by a differential equation. In other words, we need to find a function w...
Initialize HashSet in Java
A set is a collection which does not allows duplicate values. HashSet is an implementation of a Set. Following are the ways in which we can initialize a HashSet in Java. Using constructor − Pass a collection to Constructor to initialize an HashSet. Using constructor − Pass a collection to Constructor to initialize an H...
[ { "code": null, "e": 1232, "s": 1062, "text": "A set is a collection which does not allows duplicate values. HashSet is an implementation of a Set. Following are the ways in which we can initialize a HashSet in Java." }, { "code": null, "e": 1311, "s": 1232, "text": "Using constr...
Will a finally block execute after a return statement in a method in Java?
Yes, the finally block will be executed even after a return statement in a method. The finally block will always execute even an exception occurred or not in Java. If we call the System.exit() method explicitly in the finally block then only it will not be executed. There are few situations where the finally will not ...
[ { "code": null, "e": 1146, "s": 1062, "text": "Yes, the finally block will be executed even after a return statement in a method. " }, { "code": null, "e": 1521, "s": 1146, "text": "The finally block will always execute even an exception occurred or not in Java. If we call the Sy...
Clearing a Dictionary using Javascript
We'll implement a clear() function that simply clears the contents of the container. For example, clear() { this.container = {} } You can test this using − const myMap = new MyMap(); myMap.put("key1", "value1"); myMap.put("key2", "value2"); myMap.display(); myMap.clear(); myMap.display(); This will give the outp...
[ { "code": null, "e": 1161, "s": 1062, "text": "We'll implement a clear() function that simply clears the contents of the container. For example, " }, { "code": null, "e": 1196, "s": 1161, "text": "clear() {\n this.container = {}\n}" }, { "code": null, "e": 1223, ...
Find x, y, z that satisfy 2/n = 1/x + 1/y + 1/z - GeeksforGeeks
21 Apr, 2021 Given n, find x, y, z such that x, y, z satisfy the equation “2/n = 1/x + 1/y + 1/z”There are multiple x, y and z that satisfy the equation print anyone of them, if not possible then print -1.Examples: Input : 3 Output : 3 4 12 Explanation: here 3 4 and 12 satisfy the given equation Input : 7 Output : ...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n21 Apr, 2021" }, { "code": null, "e": 24896, "s": 24692, "text": "Given n, find x, y, z such that x, y, z satisfy the equation “2/n = 1/x + 1/y + 1/z”There are multiple x, y and z that satisfy the equation print anyone of them, i...
kill command in Linux with Examples - GeeksforGeeks
22 May, 2019 kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process which terminates the process. If the user doesn’t specify any signal which is to be sent along with kill command then default TERM signal is sent that ...
[ { "code": null, "e": 24555, "s": 24527, "text": "\n22 May, 2019" }, { "code": null, "e": 24886, "s": 24555, "text": "kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process which t...
MFC - Combo Boxes
A combo box consists of a list box combined with either a static control or edit control. it is represented by CComboBox class. The list-box portion of the control may be displayed at all times or may only drop down when the user selects the drop-down arrow next to the control. AddString Adds a string to the end of the...
[ { "code": null, "e": 2346, "s": 2067, "text": "A combo box consists of a list box combined with either a static control or edit control. it is represented by CComboBox class. The list-box portion of the control may be displayed at all times or may only drop down when the user selects the drop-down a...
How to perform scrolling action on page in Selenium?
We can perform the following actions with respect to scrolling in Selenium − The scrolling down to a specific pixel. JavascriptExecutor j = (JavascriptExecutor) driver; // scroll down by 1500 pixel with coordinates 0 and 1500 in x, y axes j.executeScript("window.scrollBy(0,1500)"); The scrolling down to the bottom of t...
[ { "code": null, "e": 1139, "s": 1062, "text": "We can perform the following actions with respect to scrolling in Selenium −" }, { "code": null, "e": 1179, "s": 1139, "text": "The scrolling down to a specific pixel." }, { "code": null, "e": 1345, "s": 1179, "te...
Alternate range slicing in list (Python)
Slicing is a very common technique for analyzing data from a given list in Python. But for our analysis sometimes we need to create slices of a list for a specific range of values. For example we need to print 4 elements by skipping every 4 elements from the list. In this article we will see this concept of range slici...
[ { "code": null, "e": 1396, "s": 1062, "text": "Slicing is a very common technique for analyzing data from a given list in Python. But for our analysis sometimes we need to create slices of a list for a specific range of values. For example we need to print 4 elements by skipping every 4 elements fro...
codecs.encode() in Python - GeeksforGeeks
26 Mar, 2020 With the help of codecs.encode() method, we can encode the string into the binary form . Syntax : codecs.encode(string) Return : Return the encoded string. Example #1 :In this example we can see that by using codecs.encode() method, we are able to get the encoded string which can be in binary form by using...
[ { "code": null, "e": 23811, "s": 23783, "text": "\n26 Mar, 2020" }, { "code": null, "e": 23900, "s": 23811, "text": "With the help of codecs.encode() method, we can encode the string into the binary form ." }, { "code": null, "e": 23931, "s": 23900, "text": "S...
Angular ng Bootstrap Dropdown Component - GeeksforGeeks
06 Jul, 2021 Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites. In this article we will see how to use Dropdown in angular ng bootstrap. Dropdown is used to make a group of objects that w...
[ { "code": null, "e": 25109, "s": 25081, "text": "\n06 Jul, 2021" }, { "code": null, "e": 25293, "s": 25109, "text": "Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make ...
How to Best Work with JSON in Python | by Julia Kho | Towards Data Science
In this article, you will learn how to read, parse, and write JSON files in Python. I will talk about how to best handle simple JSON files as well as nested JSON files. In addition, I will discuss how to access specific values in the data. JSON (Java Script Object Notation) is a popular file format for storing and tran...
[ { "code": null, "e": 412, "s": 172, "text": "In this article, you will learn how to read, parse, and write JSON files in Python. I will talk about how to best handle simple JSON files as well as nested JSON files. In addition, I will discuss how to access specific values in the data." }, { "...
Groovy - floor()
The method floor gives the largest integer that is less than or equal to the argument. double floor(double d) double floor(float f) Parameters − A double or float primitive data type. Return Value − This method Returns the largest integer that is less than or equal to the argument. Returned as a double. Following is ...
[ { "code": null, "e": 2325, "s": 2238, "text": "The method floor gives the largest integer that is less than or equal to the argument." }, { "code": null, "e": 2372, "s": 2325, "text": "double floor(double d) \ndouble floor(float f)\n" }, { "code": null, "e": 2424, ...
Swing Examples - Show Alert message Dialog
Following example showcase how to show a simple message alert with Ok button in swing based application. We are using the following APIs. JOptionPane − To create a standard dialog box. JOptionPane − To create a standard dialog box. JOptionPane.showMessageDialog() − To show the simple alert message. JOptionPane.showMess...
[ { "code": null, "e": 2144, "s": 2039, "text": "Following example showcase how to show a simple message alert with Ok button in swing based application." }, { "code": null, "e": 2177, "s": 2144, "text": "We are using the following APIs." }, { "code": null, "e": 2224, ...
How to check whether a value is numeric or not using jQuery ? - GeeksforGeeks
11 Sep, 2019 Given an input element and the task is to check whether the entered value is numeric or not using jQuery. The jQuery $.isNumeric() method is used to check whether the entered number is numeric or not. $.isNumeric() method: It is used to check whether the given argument is a numeric value or not. If it is n...
[ { "code": null, "e": 25103, "s": 25075, "text": "\n11 Sep, 2019" }, { "code": null, "e": 25304, "s": 25103, "text": "Given an input element and the task is to check whether the entered value is numeric or not using jQuery. The jQuery $.isNumeric() method is used to check whether ...
Data Cleaning with Python and Pandas: Detecting Missing Values | by John Sullivan | Towards Data Science
Data cleaning can be a tedious task. It’s the start of a new project and you’re excited to apply some machine learning models. You take a look at the data and quickly realize it’s an absolute mess. According to IBM Data Analytics you can expect to spend up to 80% of your time cleaning data. In this post we’ll walk thro...
[ { "code": null, "e": 208, "s": 171, "text": "Data cleaning can be a tedious task." }, { "code": null, "e": 298, "s": 208, "text": "It’s the start of a new project and you’re excited to apply some machine learning models." }, { "code": null, "e": 369, "s": 298, ...
Clear/Set a specific bit of a number in Arduino
When you delve into advanced firmware, you deal with a lot of registers, whose specific bits need to be set or cleared depending on your use case. Arduino has inbuild functions to do that. bitSet(x, index) and, bitClear(x, index) Where x is the number whose bit has to be set/ cleared and index is the position of the bi...
[ { "code": null, "e": 1251, "s": 1062, "text": "When you delve into advanced firmware, you deal with a lot of registers, whose specific bits need to be set or cleared depending on your use case. Arduino has inbuild functions to do that." }, { "code": null, "e": 1268, "s": 1251, "t...
Elixir - Structs
Structs are extensions built on top of maps that provide compile-time checks and default values. To define a struct, the defstruct construct is used − defmodule User do defstruct name: "John", age: 27 end The keyword list used with defstruct defines what fields the struct will have along with their default values. S...
[ { "code": null, "e": 2279, "s": 2182, "text": "Structs are extensions built on top of maps that provide compile-time checks and default values." }, { "code": null, "e": 2333, "s": 2279, "text": "To define a struct, the defstruct construct is used −" }, { "code": null, ...
Python | Convert byteString key:value pair of dictionary to String - GeeksforGeeks
11 Feb, 2019 Given a dictionary having key:value pairs as byteString, the task is to convert the key:value pair to string. Examples: Input: {b'EmplId': b'12345', b'Name': b'Paras', b'Company': b'Cyware' } Output: {'EmplId': '12345', 'Name': 'Paras', 'Company': 'Cyware'} Input: {b'Key1': b'Geeks', b'Key2': b'For', b'Ke...
[ { "code": null, "e": 24554, "s": 24526, "text": "\n11 Feb, 2019" }, { "code": null, "e": 24664, "s": 24554, "text": "Given a dictionary having key:value pairs as byteString, the task is to convert the key:value pair to string." }, { "code": null, "e": 24674, "s": ...
How to update ui from Intent Service in android?
Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to stop service after done some action in service class or else we need t...
[ { "code": null, "e": 1415, "s": 1062, "text": "Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to sto...
How can I remove the decimal part of JavaScript number?
To remove the decimal part from a number, use the JavaScript Math.trunc() method. The method returns the integer part of a number by removing the decimal part. Live Demo <!DOCTYPE html> <html> <body> <p>Value:</p> <script> var myFloat = 4.5; var myTrunc = Math.trunc( myFloat ); ...
[ { "code": null, "e": 1222, "s": 1062, "text": "To remove the decimal part from a number, use the JavaScript Math.trunc() method. The method returns the integer part of a number by removing the decimal part." }, { "code": null, "e": 1232, "s": 1222, "text": "Live Demo" }, { ...
Maven - IntelliJ IDEA IDE Integration
IntelliJ IDEA has in-built support for Maven. We are using IntelliJ IDEA Community Edition 11.1 in this example. Some of the features of IntelliJ IDEA are listed below − You can run Maven goals from IntelliJ IDEA. You can run Maven goals from IntelliJ IDEA. You can view the output of Maven commands inside the IntelliJ ...
[ { "code": null, "e": 2173, "s": 2060, "text": "IntelliJ IDEA has in-built support for Maven. We are using IntelliJ IDEA Community Edition 11.1 in this example." }, { "code": null, "e": 2230, "s": 2173, "text": "Some of the features of IntelliJ IDEA are listed below −" }, { ...
Spark SQL - Parquet Files
Parquet is a columnar format, supported by many data processing systems. The advantages of having a columnar storage are as follows − Columnar storage limits IO operations. Columnar storage limits IO operations. Columnar storage can fetch specific columns that you need to access. Columnar storage can fetch specific col...
[ { "code": null, "e": 1854, "s": 1720, "text": "Parquet is a columnar format, supported by many data processing systems. The advantages of having a columnar storage are as follows −" }, { "code": null, "e": 1893, "s": 1854, "text": "Columnar storage limits IO operations." }, {...
Deploy Sci-kit Learn models in .NET Core Applications | by George Novack | Towards Data Science
One frequent pain point for organizations trying to deliver ML models to Production is the discrepancy between the tools and technologies used by Data Scientists and those used by Application Developers. Data Scientists will most likely work in Python, using Machine Learning frameworks like Sci-kit Learn, Tensorflow, o...
[ { "code": null, "e": 613, "s": 46, "text": "One frequent pain point for organizations trying to deliver ML models to Production is the discrepancy between the tools and technologies used by Data Scientists and those used by Application Developers. Data Scientists will most likely work in Python, usi...
Display all grants for user in MySQL
Use INFORMATION_SCHEMA.SCHEMA_PRIVILEGES to display all grants for a user − select *from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES; Let us implement the above syntax to show all grants for a user − mysql> select *from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES; This will produce the following output − +---------------------------...
[ { "code": null, "e": 1138, "s": 1062, "text": "Use INFORMATION_SCHEMA.SCHEMA_PRIVILEGES to display all grants for a user −" }, { "code": null, "e": 1189, "s": 1138, "text": "select *from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES;" }, { "code": null, "e": 1255, "s": 118...
VB.Net - Program Structure
Before we study basic building blocks of the VB.Net programming language, let us look a bare minimum VB.Net program structure so that we can take it as a reference in upcoming chapters. A VB.Net program basically consists of the following parts − Namespace declaration Namespace declaration A class or module A class or ...
[ { "code": null, "e": 2486, "s": 2300, "text": "Before we study basic building blocks of the VB.Net programming language, let us look a bare minimum VB.Net program structure so that we can take it as a reference in upcoming chapters." }, { "code": null, "e": 2547, "s": 2486, "text...
Form widget in Django
In this article, we will see how to use widgets in a Django form. Widgets can be quiet helpful to make the frontend better. Widgets are html elements that are rendered from Django form, textarea, input, password input, etc., all are widgets. First let's create a Django project and an app. I created the project with the...
[ { "code": null, "e": 1304, "s": 1062, "text": "In this article, we will see how to use widgets in a Django form. Widgets can be quiet helpful to make the frontend better. Widgets are html elements that are rendered from Django form, textarea, input, password input, etc., all are widgets." }, { ...
How to Generate Newman Reports on Jenkins using Postman?
We can generate Newman reports on Jenkins. The reports obtained from Jenkins are a pictorial and organized representation of test execution results. These reports can also be shared with all the stakeholders of the project. Jenkins reports can be generated in several formats and can be controlled by adding different fl...
[ { "code": null, "e": 1286, "s": 1062, "text": "We can generate Newman reports on Jenkins. The reports obtained from Jenkins are a pictorial and organized representation of test execution results. These reports can also be shared with all the stakeholders of the project." }, { "code": null, ...
How to use case-insensitive switch-case in JavaScript?
To use case-insensitive switch-case in JavaScript, make the input all upper or all lowercase. You can try to run the following code to learn how to use a case-insensitive switch: <!DOCTYPE html> <html> <body> <h3>JavaScript Strings</h3> <p id="test"></p> <script> var str = "amit"; ...
[ { "code": null, "e": 1156, "s": 1062, "text": "To use case-insensitive switch-case in JavaScript, make the input all upper or all lowercase." }, { "code": null, "e": 1241, "s": 1156, "text": "You can try to run the following code to learn how to use a case-insensitive switch:" ...
Replacing array of object property name in JavaScript
Following is the code to replace array of object property name in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Ver...
[ { "code": null, "e": 1141, "s": 1062, "text": "Following is the code to replace array of object property name in JavaScript −" }, { "code": null, "e": 1152, "s": 1141, "text": " Live Demo" }, { "code": null, "e": 2263, "s": 1152, "text": "<!DOCTYPE html>\n<htm...
Sum Of Digits | Practice | GeeksforGeeks
Given a number, N. Find the sum of all the digits of N Example 1: Input: N = 12 Output: 3 Explanation: Sum of 12's digits: 1 + 2 = 3 Example 2: Input: N = 23 Output 5 Explanation: Sum of 23's digits: 2 + 3 = 5 Your Task: You don't need to read input or print anything. Your task is to complete the function sumOfDigi...
[ { "code": null, "e": 295, "s": 238, "text": "Given a number, N. Find the sum of all the digits of N\n " }, { "code": null, "e": 306, "s": 295, "text": "Example 1:" }, { "code": null, "e": 373, "s": 306, "text": "Input:\nN = 12\nOutput:\n3\nExplanation:\nSum of...
How can we use WHERE clause with MySQL INSERT INTO command?
We can use conditional insert i.e. WHERE clause with INSERT INTO command in the case of new row insertion. It can be done with following ways − In this case, we insert the value from dummy table along with some conditions. The syntax can be as follows − INSERT INTO table_name(column1,column2,column3,...) Select value1,...
[ { "code": null, "e": 1206, "s": 1062, "text": "We can use conditional insert i.e. WHERE clause with INSERT INTO command in the case of new row insertion. It can be done with following ways −" }, { "code": null, "e": 1316, "s": 1206, "text": "In this case, we insert the value from...
Deploy Tensorflow Object Detection API on Kubernetes with Python, Flask and Docker | by Neeraj Krishna | Towards Data Science
The TensorFlow Object Detection API is an open source framework built on top of TensorFlow that makes it easy to construct, train and deploy object detection models.This article demonstrates how you can serve the Tensorflow Object Detection API with Flask, Dockerize the application and deploy it on Kubernetes using the...
[ { "code": null, "e": 519, "s": 172, "text": "The TensorFlow Object Detection API is an open source framework built on top of TensorFlow that makes it easy to construct, train and deploy object detection models.This article demonstrates how you can serve the Tensorflow Object Detection API with Flask...
How do you make a button that adds text in HTML <input>?
Let’s say the following is our HTML button − <button id="clickButton">Click the button to add the input into the belowText Box</button> Use document.getElementById() to add a text in <input> on button click. Following is the code − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="vi...
[ { "code": null, "e": 1107, "s": 1062, "text": "Let’s say the following is our HTML button −" }, { "code": null, "e": 1198, "s": 1107, "text": "<button id=\"clickButton\">Click the button to add the input into the belowText Box</button>" }, { "code": null, "e": 1294, ...
CIFAR 100: Transfer Learning using EfficientNet | Towards Data Science
Convolutional Neural Network (CNN) is a class of deep neural networks commonly used to analyze images. In this article, we will together build a CNN model that can correctly recognize and classify colored images of objects into one of the 100 available classes of the CIFAR-100 dataset. In particular, we will reuse a st...
[ { "code": null, "e": 591, "s": 172, "text": "Convolutional Neural Network (CNN) is a class of deep neural networks commonly used to analyze images. In this article, we will together build a CNN model that can correctly recognize and classify colored images of objects into one of the 100 available cl...
Proof that vertex cover is NP complete - GeeksforGeeks
03 Aug, 2018 Prerequisite – Vertex Cover Problem, NP-CompletenessProblem – Given a graph G(V, E) and a positive integer k, the problem is to find whether there is a subset V’ of vertices of size at most k, such that every edge in the graph is connected to some vertex in V’. Explanation –First let us understand the noti...
[ { "code": null, "e": 29836, "s": 29808, "text": "\n03 Aug, 2018" }, { "code": null, "e": 30098, "s": 29836, "text": "Prerequisite – Vertex Cover Problem, NP-CompletenessProblem – Given a graph G(V, E) and a positive integer k, the problem is to find whether there is a subset V’ o...
Do static variables get initialized in a default constructor in java?
A static filed/variable belongs to the class and it will be loaded into the memory along with the class. You can invoke them without creating an object. (using the class name as reference). There is only one copy of the static field available throughout the class i.e. the value of the static field will be same in all o...
[ { "code": null, "e": 1446, "s": 1062, "text": "A static filed/variable belongs to the class and it will be loaded into the memory along with the class. You can invoke them without creating an object. (using the class name as reference). There is only one copy of the static field available throughout...
Search a 2D Matrix II in Python
Suppose we have one m x n matrix. We have to write an efficient algorithm that searches for a value in that matrix. This matrix has the following properties − Integers in each row are sorted in ascending from left to right. Integers in each column are sorted in ascending from top to bottom. So if the matrix is like − I...
[ { "code": null, "e": 1224, "s": 1062, "text": " Suppose we have one m x n matrix. We have to write an efficient algorithm that searches for a value in that matrix. This matrix has the following properties −" }, { "code": null, "e": 1289, "s": 1224, "text": "Integers in each row...