title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
jQuery | submit() with Examples | 21 Sep, 2018
The submit() method is an inbuilt method in jQuery which is used to submit event or the attaches a function to run when a submit event occurs. This method can only apply on the form elements.Syntax:
$(selector).submit(parameters);
Parameter: The parameters is optional for this method.
Return Value: This me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Sep, 2018"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "The submit() method is an inbuilt method in jQuery which is used to submit event or the attaches a function to run when a submit event occurs. This method can only apply on th... |
Program for sorting variables of any data type | 27 Jan, 2018
Write a program for sorting variables of any datatype without the use of std::sort .
Examples:
Input : 2000, 456, -10, 0
Output : -10 0 456 2000
Input : "We do nothing"
"Hi I have something"
"Hello Join something!"
"(Why to do work)"
Output :(Why to do work)
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Jan, 2018"
},
{
"code": null,
"e": 139,
"s": 54,
"text": "Write a program for sorting variables of any datatype without the use of std::sort ."
},
{
"code": null,
"e": 149,
"s": 139,
"text": "Examples:"
},
{
... |
Array Copy in Java | 26 Oct, 2021
Given an array, we need to copy its elements in a different array, to a naive user below way comes into mind which is however incorrect as depicted below as follows:
// Java Program to Illustrate Wrong Way Of Copying an Array
// Input array
int a[] = { 1, 8, 3 };
// Creating an array b[] of same size as ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Given an array, we need to copy its elements in a different array, to a naive user below way comes into mind which is however incorrect as depicted below as follows:"
},
... |
HTML applet Tag | 27 Apr, 2021
The <applet> tag in HTML was used to embed Java applets into any HTML document. The <applet> tag was deprecated in HTML 4.01, and it’s support has been completely discontinued starting from HTML 5. Alternatives available in HTML 5 are the <embed> and the <object> tags. There are still some browsers that su... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 762,
"s": 28,
"text": "The <applet> tag in HTML was used to embed Java applets into any HTML document. The <applet> tag was deprecated in HTML 4.01, and it’s support has been completely discontinued... |
ML – Nearest Centroid Classifier | 01 Jun, 2021
The Nearest Centroid (NC) Classifier is one of the most underrated and underutilised classifiers in Machine Learning. However, it is quite powerful and is highly efficient for certain Machine Learning classification tasks. The Nearest Centroid classifier is somewhat similar to the K-Nearest Neighbours clas... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 1413,
"s": 52,
"text": "The Nearest Centroid (NC) Classifier is one of the most underrated and underutilised classifiers in Machine Learning. However, it is quite powerful and is highly efficient f... |
vector capacity() function in C++ STL | 09 Jun, 2022
The vector::capacity() function is a built-in function which returns the size of the storage space currently allocated for the vector, expressed in terms of elements. This capacity is not necessarily equal to the vector size. It can be equal to or greater, with the extra space allowing to accommodate for g... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 696,
"s": 53,
"text": "The vector::capacity() function is a built-in function which returns the size of the storage space currently allocated for the vector, expressed in terms of elements. This ca... |
Matrix Multiplication With 1 MapReduce Step | 12 Nov, 2020
MapReduce is a technique in which a huge program is subdivided into small tasks and run parallelly to make computation faster, save time, and mostly used in distributed systems. It has 2 important parts:
Mapper: It takes raw data input and organizes into key, value pairs. For example, In a dictionary, you... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 259,
"s": 54,
"text": "MapReduce is a technique in which a huge program is subdivided into small tasks and run parallelly to make computation faster, save time, and mostly used in distributed syste... |
random.weibullvariate() function in Python | 26 May, 2020
random module is used to generate random numbers in Python. Not actually random, rather this is used to generate pseudo-random numbers. That implies that these randomly generated numbers can be determined.
weibullvariate() is an inbuilt method of the random module. It is used to return a random floating po... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "random module is used to generate random numbers in Python. Not actually random, rather this is used to generate pseudo-random numbers. That implies that these randomly genera... |
Java Character charCount() with Examples | 06 Dec, 2018
The java.lang.Character.charCount() is an inbuilt function in java which is used to determine number of characters needed to represent the specified character. If the character is equal to or greater than 0x10000, the method returns 2 otherwise 1.
Syntax:
public static int charCount(int code)
Parameters: ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "The java.lang.Character.charCount() is an inbuilt function in java which is used to determine number of characters needed to represent the specified character. If the characte... |
Scala Char toString() method with example | 29 Oct, 2019
The toString() method is utilized to convert a stated character into String.
Method Definition: def toString: String
Return Type: It returns the String representation of the stated character.
Example: 1#
// Scala program of toString()// method // Creating objectobject GfG{ // Main method def main... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2019"
},
{
"code": null,
"e": 105,
"s": 28,
"text": "The toString() method is utilized to convert a stated character into String."
},
{
"code": null,
"e": 145,
"s": 105,
"text": "Method Definition: def toStri... |
React-Bootstrap NavBar Component | 04 May, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. NavBar Component is a navigation header that is responsive and powerful. It supports navigation, branding, and many more other related features. We can use the following approach in ReactJS to use the react-bootstrap NavBar C... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 345,
"s": 28,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. NavBar Component is a navigation header that is responsive and powerful. It supports navigati... |
Print all subsequences of a string | Iterative Method | 06 Jul, 2022
Given a string s, print all possible subsequences of the given string in an iterative manner. We have already discussed Recursive method to print all subsequences of a string.
Examples:
Input : abc
Output : a, b, c, ab, ac, bc, abc
Input : aab
Output : a, b, aa, ab, aab
Approach 1 : Here, we discuss mu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 231,
"s": 54,
"text": "Given a string s, print all possible subsequences of the given string in an iterative manner. We have already discussed Recursive method to print all subsequences of a string... |
Python | Pandas Series.agg() | 19 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Series.agg() is used to pass a function or list of function to be applied on a series ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
How to pass variables to the next middleware using next() in Express.js ? - GeeksforGeeks | 17 Feb, 2021
The following example covers how to pass variables to the next middleware using next() in Express.js.
Approach:
We cannot directly pass data to the next middleware, but we can send data through the request object.
[Middleware 1] [Middleware 2]request.mydata = someData; ——-> let dataFromMiddleware1 = reques... | [
{
"code": null,
"e": 25026,
"s": 24998,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 25128,
"s": 25026,
"text": "The following example covers how to pass variables to the next middleware using next() in Express.js."
},
{
"code": null,
"e": 25138,
"s": 25128,
... |
OpenCV - The IMREAD_XXX Flag | OpenCV supports various types of images such as colored, binary, grayscale, etc. Using the imread() method and predefined fields of the Imgcodecs class, you can read a given image as another type.
In the earlier chapters, we have seen the syntax of imread() method of the Imgcodecs class. It accepts a string argument re... | [
{
"code": null,
"e": 3201,
"s": 3004,
"text": "OpenCV supports various types of images such as colored, binary, grayscale, etc. Using the imread() method and predefined fields of the Imgcodecs class, you can read a given image as another type."
},
{
"code": null,
"e": 3381,
"s": 3201... |
Turbo-charge your spaCy NLP pipeline | by Prashanth Rao | Towards Data Science | Consider you have a large text dataset on which you want to apply some non-trivial NLP transformations, such as stopword removal followed by lemmatizing the words (i.e. reducing them to root form) in the text. spaCy is an industrial-strength NLP library designed for just such a task.
In this post, the New York Times da... | [
{
"code": null,
"e": 456,
"s": 171,
"text": "Consider you have a large text dataset on which you want to apply some non-trivial NLP transformations, such as stopword removal followed by lemmatizing the words (i.e. reducing them to root form) in the text. spaCy is an industrial-strength NLP library d... |
Databases — SQL and NoSQL. Introduction to NoSQL databases with a... | by Anuradha Wickramarachchi | Towards Data Science | SQL came in to play with the research paper “A Relational Model of Data for Large Shared Data Banks” in 1970 by Dr. E. F. Codd. Yes!! that’s the Codd in Boyce-Codd normalization.
NoSQL came into play on late 1990’s. Yet, there has been such databased even before. NoSQL was introduced with the motive of breaking the bot... | [
{
"code": null,
"e": 351,
"s": 172,
"text": "SQL came in to play with the research paper “A Relational Model of Data for Large Shared Data Banks” in 1970 by Dr. E. F. Codd. Yes!! that’s the Codd in Boyce-Codd normalization."
},
{
"code": null,
"e": 732,
"s": 351,
"text": "NoSQL c... |
Python Program to Read Height in Centimeters and convert the Height to Feet and Inches | When it is required to read the height in ‘cm’ and convert it into ‘feet’ and ‘inches’, the ‘round’ method can be used.
Below is a demonstration of the same −
Live Demo
in_cm=int(input("Enter the height in centimeters..."))
in_inches=0.394*in_cm
in_feet=0.0328*in_cm
print("The length in inches is ")
print(round(in_inc... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "When it is required to read the height in ‘cm’ and convert it into ‘feet’ and ‘inches’, the ‘round’ method can be used."
},
{
"code": null,
"e": 1221,
"s": 1182,
"text": "Below is a demonstration of the same −"
},
{
"code": n... |
Adding Button in Bokeh - GeeksforGeeks | 03 Mar, 2021
In this article, we will learn about how to add a button in bokeh. Now, Bokeh provides us with a variety of widgets that can be used for various purposes. One of them is button. The button is one of the widgets of bokeh.models module that helps us in creating a button in our python notebook. Lets us see an... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 24532,
"s": 23925,
"text": "In this article, we will learn about how to add a button in bokeh. Now, Bokeh provides us with a variety of widgets that can be used for various purposes. One of t... |
Finding duplicate "words" in a string - JavaScript | We are required to write a JavaScript function that takes in a string and returns a new string with only the words that appeared for more than once in the original string.
For example: If the input string is −
const str = "big black bug bit a big black dog on his big black nose";
Then the output should be −
const outpu... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string and returns a new string with only the words that appeared for more than once in the original string."
},
{
"code": null,
"e": 1272,
"s": 1234,
"text": "For exampl... |
Subset with sum divisible by m | Practice | GeeksforGeeks | Given a set of n non-negative integers, and a value m, determine if there is a subset of the given set with sum divisible by m.
Example 1:
Input:
n = 4 m = 6
nums[] = {3 1 7 5}
Output:
1
Explanation:
If we take the subset {7, 5} then sum
will be 12 which is divisible by 6.
Example 2:
Input:
n = 3, m = 5
nums[] = {1 ... | [
{
"code": null,
"e": 366,
"s": 238,
"text": "Given a set of n non-negative integers, and a value m, determine if there is a subset of the given set with sum divisible by m."
},
{
"code": null,
"e": 377,
"s": 366,
"text": "Example 1:"
},
{
"code": null,
"e": 515,
"... |
How to send a SMS using SMSmanager in Dual SIM mobile in Android? | This example demonstrates how do I send in android.
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"?>
<LinearLayout xmlns:android="http:/... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "This example demonstrates how do I send in android."
},
{
"code": null,
"e": 1243,
"s": 1114,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project."
... |
How to create a responsive Image Grid with HTML and CSS? | Following is the code to create a responsive image grid using HTML and CSS −
Live Demo
<!DOCTYPE html>
<html>
<style>
* {
box-sizing: border-box;
}
h1 {
text-align: center;
}
.outer-grid {
display: flex;
flex-wrap: wrap;
padding: 0 4px;
}
.inner-grid {
flex: 25%;
max-width: 25%;
padding: 0 4px;... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Following is the code to create a responsive image grid using HTML and CSS −"
},
{
"code": null,
"e": 1150,
"s": 1139,
"text": " Live Demo"
},
{
"code": null,
"e": 2926,
"s": 1150,
"text": "<!DOCTYPE html>\n<html>... |
spaCy - Doc.ents Property | This doc property is used for the named entities in the document. If the entity recognizer has been applied, this property will return a tuple of named entity span objects.
An example of Doc.ents property is as follows −
import spacy
nlp_model = spacy.load("en_core_web_sm")
doc = nlp_model("This is Tutorialspoint.com."... | [
{
"code": null,
"e": 2245,
"s": 2072,
"text": "This doc property is used for the named entities in the document. If the entity recognizer has been applied, this property will return a tuple of named entity span objects."
},
{
"code": null,
"e": 2293,
"s": 2245,
"text": "An exampl... |
Aptitude | Arithmetic Aptitude 4 | Question 5 - GeeksforGeeks | 28 Jun, 2021
Subhash has 90 currency notes, some of which are Rs. 1000 denomination and rest of Rs. 500 denomination. The total amount is Rs 71,000. How many notes he has in denomination of Rs. 500?(A) 30(B) 32(C) 34(D) 38Answer: (D)Explanation:
Let the no. of Rs. 500 note be X
Then the no. of Rs. 1000 note = 90 – X
∴ ... | [
{
"code": null,
"e": 24348,
"s": 24320,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24581,
"s": 24348,
"text": "Subhash has 90 currency notes, some of which are Rs. 1000 denomination and rest of Rs. 500 denomination. The total amount is Rs 71,000. How many notes he has in de... |
RSpec - Subjects | One of RSpec’s strengths is that it provides many ways to write tests, clean tests. When your tests are short and uncluttered, it becomes easier to focus on the expected behavior and not on the details of how the tests are written. RSpec Subjects are yet another shortcut allowing you to write simple straightforward tes... | [
{
"code": null,
"e": 2118,
"s": 1794,
"text": "One of RSpec’s strengths is that it provides many ways to write tests, clean tests. When your tests are short and uncluttered, it becomes easier to focus on the expected behavior and not on the details of how the tests are written. RSpec Subjects are ye... |
How to split a string into elements of a string array in C#? | Set the string you want to split.
string str = "Hello World!";
Use the split() method to split the string into separate elements.
string[] res = str.Split(' ');
The following is the complete code to split a string into elements of a string array in C#.
Live Demo
using System;
class Demo {
static void Main() {
... | [
{
"code": null,
"e": 1096,
"s": 1062,
"text": "Set the string you want to split."
},
{
"code": null,
"e": 1125,
"s": 1096,
"text": "string str = \"Hello World!\";"
},
{
"code": null,
"e": 1192,
"s": 1125,
"text": "Use the split() method to split the string int... |
How to read data from one file and print to another file in Java? | Java provides I/O Streams to read and write data where a Stream represents an input source or an output destination which could be a file, i/o devise, other programs, etc.
In general, a Stream will be an input stream or, an output stream.
InputStream − This is used to read data from a source.
InputStream − This is used... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "Java provides I/O Streams to read and write data where a Stream represents an input source or an output destination which could be a file, i/o devise, other programs, etc."
},
{
"code": null,
"e": 1301,
"s": 1234,
"text": "In general... |
Contains Duplicate III in C++ | Suppose we have an array of integers, we have to check whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t. And the absolute difference between i and j is at most k. So if input is like [1,2,3,1], then if k = 3 and t = 0, then return tru... | [
{
"code": null,
"e": 1385,
"s": 1062,
"text": "Suppose we have an array of integers, we have to check whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t. And the absolute difference between i and j is at most k. So i... |
C# | How to use multiple catch clause - GeeksforGeeks | 24 Jan, 2019
The main purpose of the catch block is to handle the exception raised in the try block. This block is only going to execute when the exception raised in the program.In C#, You can use more than one catch block with the try block. Generally, multiple catch block is used to handle different types of exceptio... | [
{
"code": null,
"e": 24309,
"s": 24281,
"text": "\n24 Jan, 2019"
},
{
"code": null,
"e": 24938,
"s": 24309,
"text": "The main purpose of the catch block is to handle the exception raised in the try block. This block is only going to execute when the exception raised in the progra... |
Java Program to swap two arrays Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this Java programming tutorials, I am goin... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
End-to-End Machine Learning Project: Train and Deploy Models as Web Apps Using Flask and Heroku | by Saket Garodia | Towards Data Science | Business Problem: One of the fields where AI will play a huge role in the future is Medical Science. Doctors and researchers have been trying to use Machine Learning and Deep Learning to learn the occurrence of cancers and other chronic diseases by using millions of data points available through the protein combination... | [
{
"code": null,
"e": 1032,
"s": 172,
"text": "Business Problem: One of the fields where AI will play a huge role in the future is Medical Science. Doctors and researchers have been trying to use Machine Learning and Deep Learning to learn the occurrence of cancers and other chronic diseases by using... |
What is Column Space? — Example, Intuition & Visualization | by Aerin Kim | Towards Data Science | You might already know this, but for some quick background — when we see mathematical expressions like X ∈ R2, X ∈ R5 or X ∈ R100, what do they mean?
When you see these expressions, they are easy to understand if you visualize X as a column vector with n components. We use R because its components are the Real numbers.... | [
{
"code": null,
"e": 321,
"s": 171,
"text": "You might already know this, but for some quick background — when we see mathematical expressions like X ∈ R2, X ∈ R5 or X ∈ R100, what do they mean?"
},
{
"code": null,
"e": 492,
"s": 321,
"text": "When you see these expressions, they... |
RxJava - Environment Setup | RxJava is a library for Java, so the very first requirement is to have JDK installed in your machine.
First of all, open the console and execute a java command based on the operating system you are working on.
Let's verify the output for all the operating systems −
java version "1.8.0_101"
Java(TM) SE Runtime Environme... | [
{
"code": null,
"e": 2503,
"s": 2401,
"text": "RxJava is a library for Java, so the very first requirement is to have JDK installed in your machine."
},
{
"code": null,
"e": 2611,
"s": 2503,
"text": "First of all, open the console and execute a java command based on the operating... |
Return Statement vs Exit() in Main() using C++ | If you are a programmer, you write the code; If you write the code, you use the function; if you use the function, you use return and exit statements in every function. So In this article, we will discuss what a return statement and exit statement are and their differences.
In C++,
return is a statement that returns th... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "If you are a programmer, you write the code; If you write the code, you use the function; if you use the function, you use return and exit statements in every function. So In this article, we will discuss what a return statement and exit statement are a... |
ASP.NET Core - Identity Migrations | In this chapter, we will discuss the Identity migration. In ASP.NET Core MVC, authentication and identity features are configured in the Startup.cs file.
public void ConfigureServices(IServiceCollection services) {
services.AddMvc();
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<F... | [
{
"code": null,
"e": 2615,
"s": 2461,
"text": "In this chapter, we will discuss the Identity migration. In ASP.NET Core MVC, authentication and identity features are configured in the Startup.cs file."
},
{
"code": null,
"e": 2983,
"s": 2615,
"text": "public void ConfigureService... |
Parallax scrolling effect using CSS. - GeeksforGeeks | 16 Mar, 2021
ParallaxParallax is a 3d effect used in various websites to make webpages attractive. In this effect, as we scroll, the background of the webpages moves at a different speed than the foreground making it look brilliant to the eyes.
Examples:These websites show the parallax effect brilliantly-
Firewatchgame... | [
{
"code": null,
"e": 24553,
"s": 24525,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 24785,
"s": 24553,
"text": "ParallaxParallax is a 3d effect used in various websites to make webpages attractive. In this effect, as we scroll, the background of the webpages moves at a diffe... |
How to draw a circle in JavaScript? | Following is the code to draw a circle 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, Verdana, sans-serif;
}
... | [
{
"code": null,
"e": 1117,
"s": 1062,
"text": "Following is the code to draw a circle in JavaScript −"
},
{
"code": null,
"e": 1128,
"s": 1117,
"text": " Live Demo"
},
{
"code": null,
"e": 2029,
"s": 1128,
"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n... |
All the Pandas merge() you should know for combining datasets | by B. Chen | Towards Data Science | Pandas provides various built-in functions for easily combining datasets. Among them, merge() is a high-performance in-memory operation very similar to relational databases like SQL. You can use merge() any time when you want to do database-like join operations.
In this article, we’ll be going through some examples of ... | [
{
"code": null,
"e": 435,
"s": 172,
"text": "Pandas provides various built-in functions for easily combining datasets. Among them, merge() is a high-performance in-memory operation very similar to relational databases like SQL. You can use merge() any time when you want to do database-like join oper... |
MariaDB - Like Clause | The WHERE clause provides a way to retrieve data when an operation uses an exact match. In situations requiring multiple results with shared characteristics, the LIKE clause accommodates broad pattern matching.
A LIKE clause tests for a pattern match, returning a true or false. The patterns used for comparison accept t... | [
{
"code": null,
"e": 2573,
"s": 2362,
"text": "The WHERE clause provides a way to retrieve data when an operation uses an exact match. In situations requiring multiple results with shared characteristics, the LIKE clause accommodates broad pattern matching."
},
{
"code": null,
"e": 3040,... |
Apache Pig - MIN() | The MIN() function of Pig Latin is used to get the minimum (lowest) value (numeric or chararray) for a certain column in a single-column bag. While calculating the minimum value, the MIN() function ignores the NULL values.
Note −
To get the global minimum value, we need to perform a Group All operation, and calculate t... | [
{
"code": null,
"e": 2907,
"s": 2684,
"text": "The MIN() function of Pig Latin is used to get the minimum (lowest) value (numeric or chararray) for a certain column in a single-column bag. While calculating the minimum value, the MIN() function ignores the NULL values."
},
{
"code": null,
... |
How to insert only a single column into a MySQL table with Java? | Use INSERT INTO statement in the Java-MySQL connection code to insert a column.
Let us first create a table −
mysql> create table DemoTable
-> (
-> Name varchar(20)
-> );
Query OK, 0 rows affected (0.54 sec)
Here is the Java code to insert only a single column into a MySQL table.
import java.sql.Connection;
im... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Use INSERT INTO statement in the Java-MySQL connection code to insert a column."
},
{
"code": null,
"e": 1172,
"s": 1142,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1279,
"s": 1172,
"text": "m... |
Find the other number when LCM and HCF given - GeeksforGeeks | 04 Mar, 2021
Given a number A and L.C.M and H.C.F. The task is to determine the other number B.Examples:
Input: A = 10, Lcm = 10, Hcf = 50.
Output: B = 50
Input: A = 5, Lcm = 25, Hcf = 4.
Output: B = 20
Formula:-
A * B = LCM * HCF B = (LCM * HCF)/AExample : A = 15, B = 12 HCF = 3, LCM = 60 We can see that 3 * 60... | [
{
"code": null,
"e": 24327,
"s": 24299,
"text": "\n04 Mar, 2021"
},
{
"code": null,
"e": 24421,
"s": 24327,
"text": "Given a number A and L.C.M and H.C.F. The task is to determine the other number B.Examples: "
},
{
"code": null,
"e": 24520,
"s": 24421,
"text... |
How to put a Toplevel window in front of the main window in Tkinter? | The Tkinter Toplevel window creates an additional window apart from the main window. We can add widgets and components to the newly created top-level window. It supports all the properties of the parent or main window.
Sometimes the Toplevel window is also referred to as the child window. To put the child window in fro... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "The Tkinter Toplevel window creates an additional window apart from the main window. We can add widgets and components to the newly created top-level window. It supports all the properties of the parent or main window."
},
{
"code": null,
"e... |
Pandas Tricks for Imputing Missing Data | by Sadrach Pierre, Ph.D. | Towards Data Science | One of the biggest challenges data scientists face is dealing with missing data. In this post, we will discuss how to impute missing numerical and categorical values using Pandas.
Let’s get started!
For our purposes, we will be working with the Wine Magazine Dataset, which can be found here.
To start, let’s read the da... | [
{
"code": null,
"e": 226,
"s": 46,
"text": "One of the biggest challenges data scientists face is dealing with missing data. In this post, we will discuss how to impute missing numerical and categorical values using Pandas."
},
{
"code": null,
"e": 245,
"s": 226,
"text": "Let’s g... |
C++ Functions (Sum of numbers) | Set 1 | Practice | GeeksforGeeks | Given three numbers A, B, C you have to write a function named calcSum() which takes these 3 numbers as arguments and returns their sum.
Input:
The input line contains T, which denotes the number of testcases. Then T test cases follow. Each test case consists of a single line which contains three space separated integ... | [
{
"code": null,
"e": 363,
"s": 226,
"text": "Given three numbers A, B, C you have to write a function named calcSum() which takes these 3 numbers as arguments and returns their sum."
},
{
"code": null,
"e": 563,
"s": 363,
"text": "Input: \nThe input line contains T, which denotes... |
XML - Syntax | In this chapter, we will discuss the simple syntax rules to write an XML document. Following is a complete XML document −
<?xml version = "1.0"?>
<contact-info>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</contact-info>
You can notice there are two kinds of inform... | [
{
"code": null,
"e": 2083,
"s": 1961,
"text": "In this chapter, we will discuss the simple syntax rules to write an XML document. Following is a complete XML document −"
},
{
"code": null,
"e": 2237,
"s": 2083,
"text": "<?xml version = \"1.0\"?>\n<contact-info>\n <name>Tanmay P... |
Fortran - Variables | A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable should have a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable.
T... | [
{
"code": null,
"e": 2465,
"s": 2146,
"text": "A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable should have a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memor... |
Python 3 - break statement | The break statement is used for premature termination of the current loop. After abandoning the loop, execution at the next statement is resumed, just like the traditional break statement in C.
The most common use of break is when some external condition is triggered requiring a hasty exit from a loop. The break statem... | [
{
"code": null,
"e": 2534,
"s": 2340,
"text": "The break statement is used for premature termination of the current loop. After abandoning the loop, execution at the next statement is resumed, just like the traditional break statement in C."
},
{
"code": null,
"e": 2705,
"s": 2534,
... |
Creating VGG from Scratch using Tensorflow | by Arjun Sarkar | Towards Data Science | LeNet-5 was one of the oldest convolutional neural network architectures, designed by Yann LeCun in 1998, which was used to recognize handwritten digits. It used 5x5 filters, average pooling, and no padding. But by modern standards, this was a very small neural network and had only 60 thousand parameters. Nowadays, we ... | [
{
"code": null,
"e": 1480,
"s": 172,
"text": "LeNet-5 was one of the oldest convolutional neural network architectures, designed by Yann LeCun in 1998, which was used to recognize handwritten digits. It used 5x5 filters, average pooling, and no padding. But by modern standards, this was a very small... |
Find duplicates in O(n) time and O(1) extra space | Set 1 - GeeksforGeeks | 08 Apr, 2022
Given an array of n elements that contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find these repeating numbers in O(n) and using only constant memory space.
Example:
Input : n = 7 and array[] = {1, 2, 3, 6, 3, 6, 1}
Output: 1, 3, 6
Explanation: The numbers 1 , 3 ... | [
{
"code": null,
"e": 24869,
"s": 24841,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 25068,
"s": 24869,
"text": "Given an array of n elements that contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find these repeating numbers in O(n) an... |
Good Grams: How to Find Predictive N-Grams for your Problem | by Nicolas Bertagnolli | Towards Data Science | Nowadays NLP feels like it’s just about applying BERT and getting state of the art results on your problem. Often times, I find that grabbing a few good informative words can help too. Usually, I’ll have an expert come to me and say these five words are really predictive for this class. Then I’ll use those words as fea... | [
{
"code": null,
"e": 768,
"s": 172,
"text": "Nowadays NLP feels like it’s just about applying BERT and getting state of the art results on your problem. Often times, I find that grabbing a few good informative words can help too. Usually, I’ll have an expert come to me and say these five words are r... |
How to combine columns by excluding missing values in R? | If we have a data set that contains missing values at alternate places for each column then we might want to combine the columns by excluding those missing values, this will reduce the data set and the analysis is likely to become easier.
For this purpose, we can use na.exclude function along with apply function as sho... | [
{
"code": null,
"e": 1301,
"s": 1062,
"text": "If we have a data set that contains missing values at alternate places for each column then we might want to combine the columns by excluding those missing values, this will reduce the data set and the analysis is likely to become easier."
},
{
... |
Apache Camel - Introduction | Consider a situation where a large online grocery store in your town such as the Bigbasket in India invites you to design an IT solution for them. The stable and scalable solution will help them overcome the software maintenance problems they are facing today. This online store has been running its business for the las... | [
{
"code": null,
"e": 2678,
"s": 1871,
"text": "Consider a situation where a large online grocery store in your town such as the Bigbasket in India invites you to design an IT solution for them. The stable and scalable solution will help them overcome the software maintenance problems they are facing... |
Python 3 - List count() Method | The count() method returns count of how many times obj occurs in list.
Following is the syntax for count() method −
list.count(obj)
obj − This is the object to be counted in the list.
This method returns count of how many times obj occurs in list.
The following example shows the usage of count() method.
#!/usr/bin/pyt... | [
{
"code": null,
"e": 2411,
"s": 2340,
"text": "The count() method returns count of how many times obj occurs in list."
},
{
"code": null,
"e": 2456,
"s": 2411,
"text": "Following is the syntax for count() method −"
},
{
"code": null,
"e": 2473,
"s": 2456,
"tex... |
How to get the length, size, and shape of a series in Pandas? | There are several ways to get the number of elements present in a pandas Series object. And the class pandas series constructor provides you several attributes and methods to determine the features of the Series object.
In the following example, we will learn about the size and shape attributes of the pandas Series obj... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "There are several ways to get the number of elements present in a pandas Series object. And the class pandas series constructor provides you several attributes and methods to determine the features of the Series object."
},
{
"code": null,
"... |
glob – Filename pattern matching - GeeksforGeeks | 08 Dec, 2020
Glob module searches all path names looking for files matching a specified pattern according to the rules dictated by the Unix shell. Results so obtained are returned in arbitrary order. Some requirements need traversal through a list of files at some location, mostly having a specific pattern. Python’s gl... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 24350,
"s": 23925,
"text": "Glob module searches all path names looking for files matching a specified pattern according to the rules dictated by the Unix shell. Results so obtained are retur... |
Print uncommon elements from two sorted arrays - GeeksforGeeks | 10 Feb, 2022
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed in sorted order. Examples :
Input : arr1[] = {10, 20, 30}
arr2[] = {20, 25, 30, 40, 50}
Output : 10 25 40 50
We do not print 20 and 30 as these
elements... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 24604,
"s": 24429,
"text": "Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed in sorted order. E... |
Logistic Regression in Python - Testing | We need to test the above created classifier before we put it into production use. If the testing reveals that the model does not meet the desired accuracy, we will have to go back in the above process, select another set of features (data fields), build the model again, and test it. This will be an iterative step unti... | [
{
"code": null,
"e": 2145,
"s": 1733,
"text": "We need to test the above created classifier before we put it into production use. If the testing reveals that the model does not meet the desired accuracy, we will have to go back in the above process, select another set of features (data fields), buil... |
MySQL - SHOW ERRORS Statement | The MySQL SHOW ERRORS Statement is used to retrieve the information about the error occurred during the execution of the previous MySQL statement in the current session.
Following is the syntax of the SHOW ERRORS Statement −
SHOW ERRORS [LIMIT [offset,] row_count]
SHOW COUNT(*) ERRORS
Let us create a table with name M... | [
{
"code": null,
"e": 2503,
"s": 2333,
"text": "The MySQL SHOW ERRORS Statement is used to retrieve the information about the error occurred during the execution of the previous MySQL statement in the current session."
},
{
"code": null,
"e": 2558,
"s": 2503,
"text": "Following is... |
What is unsigned in MySQL? | Unsigned allows us to enter positive value; you cannot give any negative number. Let us create
a table to understand unsigned in MySQL. To create a table, we will use the CREATE command.
Let us create a table −
mysql> CREATE table UnsignedDemo
-> (
-> id int unsigned
-> );
Query OK, 0 rows affected (0.61 sec)
After tha... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "Unsigned allows us to enter positive value; you cannot give any negative number. Let us create\na table to understand unsigned in MySQL. To create a table, we will use the CREATE command."
},
{
"code": null,
"e": 1273,
"s": 1249,
"te... |
How to align Image in HTML? - GeeksforGeeks | 21 Jul, 2021
Image alignment is used to move the image at different locations (top, bottom, right, left, middle) in our web pages. We use <img> align attribute to align the image. It is an inline element.
Syntax:
<img align=”left|right|middle|top|bottom”>
Attribute Values:
left: It is used for the alignment of image ... | [
{
"code": null,
"e": 24135,
"s": 24104,
"text": " \n21 Jul, 2021\n"
},
{
"code": null,
"e": 24327,
"s": 24135,
"text": "Image alignment is used to move the image at different locations (top, bottom, right, left, middle) in our web pages. We use <img> align attribute to align the ... |
A Math Lover’s Guide to Hidden Markov Models | by Sachin Date | Towards Data Science | A Hidden Markov Model can be used to study phenomena in which only a portion of the phenomenon can be directly observed while the rest of it cannot be directly observed, although its effect can be felt on what is observed. The effect of the unobserved portion can only be estimated.
We represent such phenomena using a m... | [
{
"code": null,
"e": 454,
"s": 171,
"text": "A Hidden Markov Model can be used to study phenomena in which only a portion of the phenomenon can be directly observed while the rest of it cannot be directly observed, although its effect can be felt on what is observed. The effect of the unobserved por... |
Java & MySQL - Batching with PrepareStatement Object | Here is a typical sequence of steps to use Batch Processing with PrepareStatement Object −
Create SQL statements with placeholders.
Create SQL statements with placeholders.
Create PrepareStatement object using either prepareStatement() methods.
Create PrepareStatement object using either prepareStatement() methods.
S... | [
{
"code": null,
"e": 2777,
"s": 2686,
"text": "Here is a typical sequence of steps to use Batch Processing with PrepareStatement Object −"
},
{
"code": null,
"e": 2818,
"s": 2777,
"text": "Create SQL statements with placeholders."
},
{
"code": null,
"e": 2859,
"s"... |
Are you using Pipeline in Scikit-Learn? | by Ankit Goel | Towards Data Science | If you are doing Machine Learning, you would have come across pipelines as they help you to make a better machine learning workflow which is easy to understand and reproducible.
In case you are not aware of the pipelines you can refer awesome blogs from Rebecca Vickery “A Simple Guide to Scikit-learn Pipelines” and Sap... | [
{
"code": null,
"e": 350,
"s": 172,
"text": "If you are doing Machine Learning, you would have come across pipelines as they help you to make a better machine learning workflow which is easy to understand and reproducible."
},
{
"code": null,
"e": 583,
"s": 350,
"text": "In case ... |
How to add button to notifications in android? | This example demonstrate about How to add button to notifications in android
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" ?>
<Rela... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrate about How to add button to notifications in android"
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Python | Consecutive String Comparison - GeeksforGeeks | 29 Nov, 2019
Sometimes, while working with data, we can have a problem in which we need to perform comparison between a string and it’s next element in a list and return all strings whose next element is similar list. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using zip() + loopThis is ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Nov, 2019"
},
{
"code": null,
"e": 24561,
"s": 24292,
"text": "Sometimes, while working with data, we can have a problem in which we need to perform comparison between a string and it’s next element in a list and return all st... |
Tryit Editor v3.7 | Tryit: HTML external link | [] |
LISP - Data Types | In LISP, variables are not typed, but data objects are.
LISP data types can be categorized as.
Scalar types − for example, number types, characters, symbols etc.
Scalar types − for example, number types, characters, symbols etc.
Data structures − for example, lists, vectors, bit-vectors, and strings.
Data structures − ... | [
{
"code": null,
"e": 2116,
"s": 2060,
"text": "In LISP, variables are not typed, but data objects are."
},
{
"code": null,
"e": 2155,
"s": 2116,
"text": "LISP data types can be categorized as."
},
{
"code": null,
"e": 2222,
"s": 2155,
"text": "Scalar types − f... |
Setting up your PC/Workstation for Deep Learning: Tensorflow and PyTorch — Windows | by Abhinand | Towards Data Science | This article will guide you through the whole process of setting up the required tools and installing drivers required for Deep Learning on your windows machine. Surprisingly, even setting up the environment for doing Deep Learning isn’t that easy. Chances of you breaking something during this process is actually prett... | [
{
"code": null,
"e": 694,
"s": 172,
"text": "This article will guide you through the whole process of setting up the required tools and installing drivers required for Deep Learning on your windows machine. Surprisingly, even setting up the environment for doing Deep Learning isn’t that easy. Chance... |
How to Connect a Local or Remote Machine to a Databricks Cluster | Towards Data Science | When you start working with Databricks, you will reach the point that you decide to code outside of the Databricks and remotely connect to its computation power, a.k.a. Databricks Cluster. Why? Mostly because one of the main features of Databricks is its Spark job management that can make your life easy. Using this ser... | [
{
"code": null,
"e": 797,
"s": 172,
"text": "When you start working with Databricks, you will reach the point that you decide to code outside of the Databricks and remotely connect to its computation power, a.k.a. Databricks Cluster. Why? Mostly because one of the main features of Databricks is its ... |
Node.js Assert module - GeeksforGeeks | 07 Oct, 2021
Assert module in Node.js provides a bunch of facilities that are useful for the assertion of the function. The assert module provides a set of assertion functions for verifying invariants. If the condition is true it will output nothing else an assertion error is given by the console.
Install the assert mo... | [
{
"code": null,
"e": 37280,
"s": 37252,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 37566,
"s": 37280,
"text": "Assert module in Node.js provides a bunch of facilities that are useful for the assertion of the function. The assert module provides a set of assertion functions ... |
First Repeating Element | Practice | GeeksforGeeks | Given an array arr[] of size n, find the first repeating element. The element should occurs more than once and the index of its first occurrence should be the smallest.
Example 1:
Input:
n = 7
arr[] = {1, 5, 3, 4, 3, 5, 6}
Output: 2
Explanation:
5 is appearing twice and
its first appearence is at index 2
which is ... | [
{
"code": null,
"e": 407,
"s": 238,
"text": "Given an array arr[] of size n, find the first repeating element. The element should occurs more than once and the index of its first occurrence should be the smallest."
},
{
"code": null,
"e": 420,
"s": 409,
"text": "Example 1:"
},
... |
HTML <textarea> readonly Attribute | The readonly attribute of the <textarea> element is used to set a textarea as readonly. The visitor cannot change the text in the textarea if it is set as readonly.
However, visitor can copy that content.
Following is the syntax −
<textarea readonly>
Let us now see an example to implement the readonly attribute of the ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "The readonly attribute of the <textarea> element is used to set a textarea as readonly. The visitor cannot change the text in the textarea if it is set as readonly."
},
{
"code": null,
"e": 1267,
"s": 1227,
"text": "However, visitor ... |
Java Program to format date in mm-dd-yyyy hh:mm:ss format | Let us format date in mm-dd-yyyy hh:mm:ss format −
// displaying date in mm-dd-yyyy hh:mm:ss format
Format f = new SimpleDateFormat("mm-dd-yyyy hh:mm:ss");
String str = f.format(new Date());
System.out.println("Current Date in MM-dd-yyyy hh:mm:ss format = "+str);
Since we have used the Format and SimpleDateFormat class... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "Let us format date in mm-dd-yyyy hh:mm:ss format −"
},
{
"code": null,
"e": 1326,
"s": 1113,
"text": "// displaying date in mm-dd-yyyy hh:mm:ss format\nFormat f = new SimpleDateFormat(\"mm-dd-yyyy hh:mm:ss\");\nString str = f.format(... |
modal(options) method in Bootstrap | If you want to set content as a Bootstrap modal, then use the .modal(options) method.
For this, use jQuery to set the model on the click of a button as in the following code snippet −
$(document).ready(function(){
$("#button1").click(function(){
$("#newModal1").modal({backdrop: true});
});
});
Let us now implem... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "If you want to set content as a Bootstrap modal, then use the .modal(options) method."
},
{
"code": null,
"e": 1246,
"s": 1148,
"text": "For this, use jQuery to set the model on the click of a button as in the following code snippet ... |
Amazon RDS - MySQL DBA Tasks | As with every other database, Amazon RDS MYSQL also needs DBA tasks to fine tune the database and do periodic health checks etc. But as the AWS platform does not allow the shell access to the DB, there are a limited number of DBA tasks that can be performed as compared to the on-premise installation of MySQL. Below is ... | [
{
"code": null,
"e": 3004,
"s": 2585,
"text": "As with every other database, Amazon RDS MYSQL also needs DBA tasks to fine tune the database and do periodic health checks etc. But as the AWS platform does not allow the shell access to the DB, there are a limited number of DBA tasks that can be perfo... |
Building and Exporting Python Logs in Jupyter Notebooks | by Brian Mattis | Towards Data Science | Logging is an important capability within Python to monitor the health of our code. In a way, log files share a lot of the same concepts as the debugger. We can use logs to place breadcrumbs in our code to help determine what’s going on inside. This is especially useful when our script crashes for an unknown reason — i... | [
{
"code": null,
"e": 1010,
"s": 171,
"text": "Logging is an important capability within Python to monitor the health of our code. In a way, log files share a lot of the same concepts as the debugger. We can use logs to place breadcrumbs in our code to help determine what’s going on inside. This is e... |
Difference Between Daemon Threads and User Threads In Java - GeeksforGeeks | 16 Nov, 2018
In Java, there are two types of threads:
Daemon ThreadUser Thread
Daemon Thread
User Thread
Daemon threads are low priority threads which always run in background and user threads are high priority threads which always run in foreground. User Thread or Non-Daemon are designed to do specific or complex task... | [
{
"code": null,
"e": 24804,
"s": 24776,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 24845,
"s": 24804,
"text": "In Java, there are two types of threads:"
},
{
"code": null,
"e": 24870,
"s": 24845,
"text": "Daemon ThreadUser Thread"
},
{
"code": nu... |
C# | Remove the first occurrence from the StringCollection - GeeksforGeeks | 01 Feb, 2019
StringCollection class is a new addition to the .NET Framework class library that represents a collection of strings. StringCollection class is defined in the System.Collections.Specialized namespace.StringCollection.Remove(String) method is used to remove the first occurrence of a specific string from the... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24237,
"s": 23911,
"text": "StringCollection class is a new addition to the .NET Framework class library that represents a collection of strings. StringCollection class is defined in the Syst... |
How to get the current index of an array while using forEach loop in Kotlin? | Sometimes it becomes necessary to access the index of an array. In this article, we will see how we can access the index of an array in Kotlin while using forEach loop.
nstead of using forEach() loop, you can use the forEachIndexed() loop in Kotlin. forEachIndexed is an inline function which takes an array as an input ... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "Sometimes it becomes necessary to access the index of an array. In this article, we will see how we can access the index of an array in Kotlin while using forEach loop."
},
{
"code": null,
"e": 1434,
"s": 1231,
"text": "nstead of usi... |
Chrome Custom Tabs in Android with Kotlin - GeeksforGeeks | 30 Aug, 2021
As developers, we have the option of displaying web content to a user in their browser or via WebViews, but both have their own limitations: starting the browser is a large, non-customizable context transition for users, whereas WebViews don’t support all aspects of the web platform. To address this issue,... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 25770,
"s": 25116,
"text": "As developers, we have the option of displaying web content to a user in their browser or via WebViews, but both have their own limitations: starting the browser i... |
Latitude and longitude of the user's position in JavaScript? | The geolocation property returns a Geolocation object that can be used to locate the user's position. The object provided was navigator.geolocation.This might be annoying to the privacy of the user, therefore, the position is not available unless the user approves it.
navigator.geolocation;
This method returns the lati... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "The geolocation property returns a Geolocation object that can be used to locate the user's position. The object provided was navigator.geolocation.This might be annoying to the privacy of the user, therefore, the position is not available unless the us... |
Multiplexer Design using Verilog HDL - GeeksforGeeks | 07 Jun, 2021
Prerequisite – Multiplexers in Digital Logic Problem : Design of a 2:1 MUX using Verilog Hardware Description Language along with Testbench.
Concepts : A multiplexer is a combinational type of digital circuits that are used to transfer one of the available input lines to the single output and, which input... | [
{
"code": null,
"e": 24456,
"s": 24428,
"text": "\n07 Jun, 2021"
},
{
"code": null,
"e": 24598,
"s": 24456,
"text": "Prerequisite – Multiplexers in Digital Logic Problem : Design of a 2:1 MUX using Verilog Hardware Description Language along with Testbench. "
},
{
"code":... |
fgetc() and fputc() in C - GeeksforGeeks | 06 Jul, 2021
fgetc()
fgetc() is used to obtain input from a file single character at a time. This function returns the ASCII code of the character read by the function. It returns the character present at position indicated by file pointer. After reading the character, the file pointer is advanced to next character. If... | [
{
"code": null,
"e": 24510,
"s": 24482,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 24518,
"s": 24510,
"text": "fgetc()"
},
{
"code": null,
"e": 24915,
"s": 24518,
"text": "fgetc() is used to obtain input from a file single character at a time. This funct... |
C++ program to generate random number | Let us see how to generate random numbers using C++. Here we are generating a random number
in range 0 to some value. (In this program the max value is 100).
To perform this operation we are using the srand() function. This is in the C library. The function void srand(unsigned int seed) seeds the random number generato... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "Let us see how to generate random numbers using C++. Here we are generating a random number\nin range 0 to some value. (In this program the max value is 100)."
},
{
"code": null,
"e": 1411,
"s": 1220,
"text": "To perform this operati... |
Animating a Lightbox with CSS & JavaScript | We can style lightbox in our webpage using CSS and JavaScript. The following example styles lightbox.
Live Demo
<!DOCTYPE html>
<html>
<style>
#parent {
margin: 2%;
padding: 0;
box-sizing: border-box;
background: cornflowerblue;
text-align: center;
}
html,body {
height:100%;
max-height:100%;
mi... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "We can style lightbox in our webpage using CSS and JavaScript. The following example styles lightbox."
},
{
"code": null,
"e": 1175,
"s": 1164,
"text": " Live Demo"
},
{
"code": null,
"e": 3895,
"s": 1175,
"text":... |
Changing the Mouse Cursor in Tkinter | Tkinter is a GUI-based Python library which is used to develop various types of functional and GUI-based applications. It provides lots of functions and methods that can be used to provide extensibility and various features while developing an application.
In this article, we will see how we can change the mouse cursor... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "Tkinter is a GUI-based Python library which is used to develop various types of functional and GUI-based applications. It provides lots of functions and methods that can be used to provide extensibility and various features while developing an applicati... |
time.Time.UnixNano() Function in Golang with Examples - GeeksforGeeks | 24 Aug, 2021
In Go language, time packages supply functionality for determining as well as viewing time. The Time.UnixNano() function in Go language is used to yield “t” as a Unix time that is the number of seconds passed from January 1, 1970, in UTC and the output here doesn’t rely upon the location connected with t. ... | [
{
"code": null,
"e": 24554,
"s": 24526,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 24998,
"s": 24554,
"text": "In Go language, time packages supply functionality for determining as well as viewing time. The Time.UnixNano() function in Go language is used to yield “t” as a U... |
When Pandas is not enough. Non-Equi Joins with Pandas and PandaSQL | by Rahul Agarwal | Towards Data Science | Pandas is one of the best data manipulation libraries in recent times. It lets you slice and dice, groupby, join and do any arbitrary data transformation. You can take a look at this post, which talks about handling most of the data manipulation cases using a straightforward, simple, and matter of fact way using Pandas... | [
{
"code": null,
"e": 494,
"s": 172,
"text": "Pandas is one of the best data manipulation libraries in recent times. It lets you slice and dice, groupby, join and do any arbitrary data transformation. You can take a look at this post, which talks about handling most of the data manipulation cases usi... |
Understanding K-means Clustering in Machine Learning | by Dr. Michael J. Garbade | Towards Data Science | K-means clustering is one of the simplest and popular unsupervised machine learning algorithms.
Typically, unsupervised algorithms make inferences from datasets using only input vectors without referring to known, or labelled, outcomes.
AndreyBu, who has more than 5 years of machine learning experience and currently te... | [
{
"code": null,
"e": 268,
"s": 172,
"text": "K-means clustering is one of the simplest and popular unsupervised machine learning algorithms."
},
{
"code": null,
"e": 409,
"s": 268,
"text": "Typically, unsupervised algorithms make inferences from datasets using only input vectors ... |
Control methods of Database Security - GeeksforGeeks | 15 Dec, 2021
Database Security means keeping sensitive information safe and prevent the loss of data. Security of data base is controlled by Database Administrator (DBA).
The following are the main control measures are used to provide security of data in databases:
1. Authentication
2. Access control
3. Inference con... | [
{
"code": null,
"e": 24522,
"s": 24494,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 24681,
"s": 24522,
"text": "Database Security means keeping sensitive information safe and prevent the loss of data. Security of data base is controlled by Database Administrator (DBA). "
}... |
Python | TextBlob.correct() method | 13 Apr, 2022
With the help of TextBlob.correct() method, we can get the corrected words if any sentence have spelling mistakes by using TextBlob.correct() method.
Syntax : TextBlob.correct() Return : Return the correct sentence without spelling mistakes.
Example #1 : In this example, we can say that by using TextBlob... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2022"
},
{
"code": null,
"e": 178,
"s": 28,
"text": "With the help of TextBlob.correct() method, we can get the corrected words if any sentence have spelling mistakes by using TextBlob.correct() method."
},
{
"code": nul... |
Encryption and Decryption In Perl | 29 Jul, 2021
Crypt function in, Perl, is basically used to store sensitive data and passwords using ASCII characters as encrypted strings (this function encrypts the string). Strings can only be encrypted, they can not be decrypted in the same way as encryption is done.
Syntax: $encyrpted_string = crypt $string, $sal... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 314,
"s": 54,
"text": "Crypt function in, Perl, is basically used to store sensitive data and passwords using ASCII characters as encrypted strings (this function encrypts the string). Strings can ... |
Find positions of Matching Elements between Vectors in R Programming – match() Function | 15 Jun, 2020
match() function in R Language is used to return the positions of the first match of the elements of the first vector in the second vector. If the element is not found, it returns NA.
Syntax: match(x1, x2, nomatch)
Parameters:x1: Vector 1x2: Vector 2nomatch: value to be returned in case of no match
Example... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jun, 2020"
},
{
"code": null,
"e": 212,
"s": 28,
"text": "match() function in R Language is used to return the positions of the first match of the elements of the first vector in the second vector. If the element is not found, it ret... |
Collections.reverseOrder() in Java with Examples | 07 Jul, 2022
The reverseOrder() method of Collections class that in itself is present inside java.util package returns a comparator and using this comparator we can order the Collection in reverse order. Natural ordering is the ordering imposed by the objects’ own compareTo method.
Syntax:
public static Comparator rev... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 322,
"s": 52,
"text": "The reverseOrder() method of Collections class that in itself is present inside java.util package returns a comparator and using this comparator we can order the Collection i... |
Python | Splitting Text and Number in string | 01 Jul, 2019
Sometimes, we have a string, which is composed of text and number (or vice-versa), without any specific distinction between the two. There might be a requirement in which we require to separate the text from the number. Let’s discuss certain ways in which this can be performed.
Method #1 : Using re.compile... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2019"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "Sometimes, we have a string, which is composed of text and number (or vice-versa), without any specific distinction between the two. There might be a requirement in which we r... |
C Program for Binary Search (Recursive and Iterative) | 13 Jun, 2022
We basically ignore half of the elements just after one comparison.
Compare x with the middle element.If x matches with middle element, we return the mid index.Else If x is greater than the mid element, then x can only lie in right half subarray after the mid element. So we recur for right half.Else (x is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 120,
"s": 52,
"text": "We basically ignore half of the elements just after one comparison."
},
{
"code": null,
"e": 393,
"s": 120,
"text": "Compare x with the middle element.If ... |
How to Insert an element at a specific position in an Array in C++ | 21 Jun, 2022
An array is a collection of items stored at contiguous memory locations. In this article, we will see how to insert an element in an array in C++. Given an array arr of size n, this article tells how to insert an element x in this array arr at a specific position pos. Approach: Here’s how to do it.
First ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 353,
"s": 52,
"text": "An array is a collection of items stored at contiguous memory locations. In this article, we will see how to insert an element in an array in C++. Given an array arr of size ... |
Print numbers in descending order along with their frequencies | 14 Jun, 2022
Given an array arr, the task is to print the elements of the array in descending order along with their frequencies.Examples:
Input: arr[] = {1, 3, 3, 3, 4, 4, 5} Output: 5 occurs 1 times 4 occurs 2 times 3 occurs 3 times 1 occurs 1 timesInput: arr[] = {1, 1, 1, 2, 3, 4, 9, 9, 10} Output: 10 occurs 1 tim... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 156,
"s": 28,
"text": "Given an array arr, the task is to print the elements of the array in descending order along with their frequencies.Examples: "
},
{
"code": null,
"e": 425,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.