title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Program to make Indian Flag in Python | Python’s libraries to draw graphs has very extensive features which can not only give us charts but also give us flexibility to draw other diagrams like flags. In that sense those modules have an artistic touch. In this article we will see how to draw the Indian flag using the libraries numpy and matplotlib.
We create ... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "Python’s libraries to draw graphs has very extensive features which can not only give us charts but also give us flexibility to draw other diagrams like flags. In that sense those modules have an artistic touch. In this article we will see how to draw t... |
Find Common Words in Article with Python Module Newspaper and NLTK | by Khuyen Tran | Towards Data Science | You want to extract essential information from an interesting article, but find the article is too long to read with your limited amount of time. Before you dive into the whole article and end up disappointed with the irrelevant content, you should look at the summary and keywords beforehand.
newpaper3k and nltk are th... | [
{
"code": null,
"e": 465,
"s": 171,
"text": "You want to extract essential information from an interesting article, but find the article is too long to read with your limited amount of time. Before you dive into the whole article and end up disappointed with the irrelevant content, you should look a... |
How can I create a MySQL stored procedure that returns multiple values from a MySQL table? | We can create a stored procedure with both IN and OUT parameters to get multiple values from a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −
mysql> Select * from student_info;
+------+---------+------------+------------+
| id | Name | Addres... | [
{
"code": null,
"e": 1277,
"s": 1062,
"text": "We can create a stored procedure with both IN and OUT parameters to get multiple values from a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −"
},
{
"code": null,
"e": 1... |
How to read volley json array in android? | This example demonstrate about How to read volley json array 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 ... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "This example demonstrate about How to read volley json array in android."
},
{
"code": null,
"e": 1264,
"s": 1135,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cr... |
Python MongoDB - Introduction | Pymongo is a python distribution which provides tools to work with MongoDB, it is the most preferred way to communicate with MongoDB database from python.
To install pymongo first of all make sure you have installed python3 (along with PIP) and MongoDB properly. Then execute the following command.
C:\WINDOWS\system32>p... | [
{
"code": null,
"e": 3360,
"s": 3205,
"text": "Pymongo is a python distribution which provides tools to work with MongoDB, it is the most preferred way to communicate with MongoDB database from python."
},
{
"code": null,
"e": 3504,
"s": 3360,
"text": "To install pymongo first of... |
C program to print environment variables | Here, we will create a c program to print environment variables.
Environment variable is a global variable that can affect the way the running process will behave on the system.
//Program to print environment variables
Live Demo
#include <stdio.h>
int main(int argc, char *argv[], char * envp[]){
int i;
for (i = ... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "Here, we will create a c program to print environment variables."
},
{
"code": null,
"e": 1240,
"s": 1127,
"text": "Environment variable is a global variable that can affect the way the running process will behave on the system."
}... |
Java program to split and join a string | To split and join a string in Java, use the split() and join() method as in the below example −
public class Demo{
public static void main(String args[]){
String my_str = "This_is_a_sample";
String[] split_str = my_str.split("_", 4);
System.out.println("The split string is:");
for (String eve... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "To split and join a string in Java, use the split() and join() method as in the below example −"
},
{
"code": null,
"e": 1608,
"s": 1158,
"text": "public class Demo{\n public static void main(String args[]){\n String my_str = ... |
PHP - Function eregi_replace() | string eregi_replace (string pattern, string replacement, string originalstring);
The eregi_replace() function operates exactly like ereg_replace(), except that the search for pattern in string is not case sensitive.
After the replacement has occurred, the modified string will be returned.
After the replacement has oc... | [
{
"code": null,
"e": 2840,
"s": 2757,
"text": "string eregi_replace (string pattern, string replacement, string originalstring);\n"
},
{
"code": null,
"e": 2975,
"s": 2840,
"text": "The eregi_replace() function operates exactly like ereg_replace(), except that the search for patt... |
Find average of a list in python? | Python provides sum function for calculating n number of element. Here we use this function and then calculate average.
Step 1: input “size of the list”
Step 2: input “Element”
Step 3: using sum function calculate summation of all numbers.
Step 4: calculate average.
# Average of a list
A=list()
n=int(input("Enter the ... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "Python provides sum function for calculating n number of element. Here we use this function and then calculate average."
},
{
"code": null,
"e": 1330,
"s": 1182,
"text": "Step 1: input “size of the list”\nStep 2: input “Element”\nSte... |
XGBoost: A Complete Guide to Fine-Tune and Optimize your Model | by David Martins | Towards Data Science | Initially started as a research project in 2014, XGBoost has quickly become one of the most popular Machine Learning algorithms of the past few years.
Many consider it as one of the best algorithms and, due to its great performance for regression and classification problems, would recommend it as a first choice in many... | [
{
"code": null,
"e": 323,
"s": 172,
"text": "Initially started as a research project in 2014, XGBoost has quickly become one of the most popular Machine Learning algorithms of the past few years."
},
{
"code": null,
"e": 694,
"s": 323,
"text": "Many consider it as one of the best... |
Solidity - Conversions | Solidity allows implicit as well as explicit conversion. Solidity compiler allows implicit conversion between two data types provided no implicit conversion is possible and there is no loss of information. For example uint8 is convertible to uint16 but int8 is convertible to uint256 as int8 can contain negative value n... | [
{
"code": null,
"e": 2898,
"s": 2555,
"text": "Solidity allows implicit as well as explicit conversion. Solidity compiler allows implicit conversion between two data types provided no implicit conversion is possible and there is no loss of information. For example uint8 is convertible to uint16 but ... |
PyGTK - DrawingArea Class | The DrawingArea widget presents a blank canvas containing a gtk.gdk.Window on which objects such as line, rectangle, arc, etc. can be drawn.
PyGTK uses Cairo library for such drawing operations. Cairo is a popular 2D vector graphics library. It is written in C., although, it has bindings in most Languages such as C++, ... | [
{
"code": null,
"e": 2875,
"s": 2734,
"text": "The DrawingArea widget presents a blank canvas containing a gtk.gdk.Window on which objects such as line, rectangle, arc, etc. can be drawn."
},
{
"code": null,
"e": 3230,
"s": 2875,
"text": "PyGTK uses Cairo library for such drawing... |
Guava - Objects Class | Objects class provides helper functions applicable to all objects such as equals, hashCode, etc.
Following is the declaration for com.google.common.base.Objects class −
@GwtCompatible
public final class Objects
extends Object
static boolean equal(Object a, Object b)
Determines whether two possibly-null objects are e... | [
{
"code": null,
"e": 1982,
"s": 1885,
"text": "Objects class provides helper functions applicable to all objects such as equals, hashCode, etc."
},
{
"code": null,
"e": 2054,
"s": 1982,
"text": "Following is the declaration for com.google.common.base.Objects class −"
},
{
... |
NLP Text Preprocessing and Cleaning Pipeline in Python | by Emily Elia | Towards Data Science | Through language we express the human experience. Language is how we communicate, express sentiment, listen, think and converse. Over the past decade, tremendous progress has been made in natural language processing(NLP) where computers can classify, generate, and respond to language like a human can. These models and ... | [
{
"code": null,
"e": 737,
"s": 171,
"text": "Through language we express the human experience. Language is how we communicate, express sentiment, listen, think and converse. Over the past decade, tremendous progress has been made in natural language processing(NLP) where computers can classify, gene... |
Java Examples - Implementation of Stack | How to implement stack ?
Following example shows how to implement stack by creating user defined push() method for entering elements and pop() method for retrieving elements from the stack.
public class MyStack {
private int maxSize;
private long[] stackArray;
private int top;
public MyStack(int s) {
... | [
{
"code": null,
"e": 2093,
"s": 2068,
"text": "How to implement stack ?"
},
{
"code": null,
"e": 2258,
"s": 2093,
"text": "Following example shows how to implement stack by creating user defined push() method for entering elements and pop() method for retrieving elements from the... |
Collecting Movie Data. Using a bunch of APIs to assemble a... | by Zachary Ang | Towards Data Science | I started out with the initial premise that I could try and predict the price of an iTunes movie given its characteristics. I knew that we could get information on movies in iTunes with a well documented public API, so let’s take a look.
There are two main ways you can get movie information from the iTunes store on the... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "I started out with the initial premise that I could try and predict the price of an iTunes movie given its characteristics. I knew that we could get information on movies in iTunes with a well documented public API, so let’s take a look."
},
{
"co... |
Backing up Cisco IOS Router image - GeeksforGeeks | 03 Mar, 2022
As a network administrator, you should always have a backup for worse conditions. One of the common worse conditions that can occur is the IOS image of a device deleted. This condition gets worse if there is no backup of the IOS image present.
So to ignore conditions like these, a backup should be a must ... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 26000,
"s": 25755,
"text": "As a network administrator, you should always have a backup for worse conditions. One of the common worse conditions that can occur is the IOS image of a device de... |
Python program to extract Email-id from URL text file - GeeksforGeeks | 29 Dec, 2020
Prerequisite : Pattern Matching with Python RegexGiven the URL text-file, the task is to extract all the email-ids from that text file and print the urllib.request library can be used to handle all the URL related work.
Example :
Input :
Hello
This is Geeksforgeeks
review-team@geeksforgeeks.org
contribute... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 25757,
"s": 25537,
"text": "Prerequisite : Pattern Matching with Python RegexGiven the URL text-file, the task is to extract all the email-ids from that text file and print the urllib.request... |
PYGLET – On Key Press Event - GeeksforGeeks | 30 Jul, 2021
In this article we will see how we can trigger on key press event in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia etc. A window is a “heavyweight” object occupying operating system resources. Windows may appear as f... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 26169,
"s": 25537,
"text": "In this article we will see how we can trigger on key press event in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually ri... |
How to detect whether the website is being opened in a mobile device or a desktop in JavaScript ? - GeeksforGeeks | 21 May, 2021
Using CSS Media Queries, we can easily know that a user is currently viewing our website in which device (using min-width and max-width). It is only limited to styling web pages, but we can control the functionality of the website according to the user’s device using the navigator userAgent Property in Jav... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 26861,
"s": 26545,
"text": "Using CSS Media Queries, we can easily know that a user is currently viewing our website in which device (using min-width and max-width). It is only limited to sty... |
Array of Vectors in C++ STL - GeeksforGeeks | 14 Feb, 2020
Prerequisite: Arrays in C++, Vector in C++ STL
An array is a collection of items stored at contiguous memory locations. It is to store multiple items of the same type together. This makes it easier to get access to the elements stored in it by the position of each element.
Vectors are known as dynamic arra... | [
{
"code": null,
"e": 25842,
"s": 25814,
"text": "\n14 Feb, 2020"
},
{
"code": null,
"e": 25889,
"s": 25842,
"text": "Prerequisite: Arrays in C++, Vector in C++ STL"
},
{
"code": null,
"e": 26116,
"s": 25889,
"text": "An array is a collection of items stored at... |
LinkedList addAll() Method in Java - GeeksforGeeks | 10 Dec, 2018
java.util.LinkedList.addAll(Collection C): This method is used to append all of the elements from the collection passed as parameter to this function to the end of a list keeping in mind the order of return by the collections iterator.Syntax:boolean addAll(Collection C)Parameters: The parameter C is a coll... | [
{
"code": null,
"e": 25250,
"s": 25222,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 28803,
"s": 25250,
"text": "java.util.LinkedList.addAll(Collection C): This method is used to append all of the elements from the collection passed as parameter to this function to the end of... |
Memoization (1D, 2D and 3D) - GeeksforGeeks | 08 Nov, 2021
Most of the Dynamic Programming problems are solved in two ways:
Tabulation: Bottom UpMemoization: Top Down
Tabulation: Bottom Up
Memoization: Top Down
One of the easier approaches to solve most of the problems in DP is to write the recursive code at first and then write the Bottom-up Tabulation Method o... | [
{
"code": null,
"e": 26507,
"s": 26479,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 26574,
"s": 26507,
"text": "Most of the Dynamic Programming problems are solved in two ways: "
},
{
"code": null,
"e": 26617,
"s": 26574,
"text": "Tabulation: Bottom UpMe... |
Hungarian Algorithm for Assignment Problem | Set 1 (Introduction) - GeeksforGeeks | 04 Mar, 2020
Let there be n agents and n tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on the agent-task assignment. It is required to perform all tasks by assigning exactly one agent to each task and exactly one task to each agent in such a way that the total cost of... | [
{
"code": null,
"e": 26571,
"s": 26543,
"text": "\n04 Mar, 2020"
},
{
"code": null,
"e": 26908,
"s": 26571,
"text": "Let there be n agents and n tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on the agent-task assignment. It is r... |
Maximize the bitwise OR of an array - GeeksforGeeks | 05 May, 2021
Given an array of N integers. The bitwise OR of all the elements of the array has to be maximized by performing one task. The task is to multiply any element of the array at-most k times with a given integer x.Examples :
Input: a = {1, 1, 1}, k = 1, x = 2 Output: 3 Explanation: Any possible choice of doi... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 26290,
"s": 26067,
"text": "Given an array of N integers. The bitwise OR of all the elements of the array has to be maximized by performing one task. The task is to multiply any element of th... |
How to get highcharts dates in the x-axis ? - GeeksforGeeks | 22 Jun, 2020
Graphs or charts are the best way to represent data as they are more user-friendly than viewing raw data. It also makes it easy to perform analytics on the data. There are many libraries in JavaScript that make it easy to create these visualizations and use them in mobile or web applications. One such libr... | [
{
"code": null,
"e": 25815,
"s": 25787,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 26275,
"s": 25815,
"text": "Graphs or charts are the best way to represent data as they are more user-friendly than viewing raw data. It also makes it easy to perform analytics on the data. T... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider the following policies for preventing deadlock in a system with mutually exclusive resources.
I. Processes should acquire all their resources at the
beginning of execution. If any resource is not
available, all resources acquired so far are released.
II. The resources are numbered unique... | [
{
"code": null,
"e": 25839,
"s": 25811,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25942,
"s": 25839,
"text": "Consider the following policies for preventing deadlock in a system with mutually exclusive resources."
},
{
"code": null,
"e": 26554,
"s": 25942,
... |
Find the Number Occurring Odd Number of Times - GeeksforGeeks | 09 Dec, 2021
Given an array of positive integers. All numbers occur an even number of times except one number which occurs an odd number of times. Find the number in O(n) time & constant space.
Examples :
Input : arr = {1, 2, 3, 2, 3, 1, 3}
Output : 3
Input : arr = {5, 7, 2, 7, 5, 2, 5}
Output : 5
A Simple Solution i... | [
{
"code": null,
"e": 26325,
"s": 26297,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26506,
"s": 26325,
"text": "Given an array of positive integers. All numbers occur an even number of times except one number which occurs an odd number of times. Find the number in O(n) time ... |
Scopes in Kotlin Coroutines - GeeksforGeeks | 15 Oct, 2021
Prerequisites:
Kotlin Coroutines on Android
Suspend Function In Kotlin Coroutines
Scope in Kotlin’s coroutines can be defined as the restrictions within which the Kotlin coroutines are being executed. Scopes help to predict the lifecycle of the coroutines. There are basically 3 scopes in Kotlin coroutines:... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n15 Oct, 2021"
},
{
"code": null,
"e": 25362,
"s": 25347,
"text": "Prerequisites:"
},
{
"code": null,
"e": 25391,
"s": 25362,
"text": "Kotlin Coroutines on Android"
},
{
"code": null,
"e": 25429,
... |
Difference between Latency and Jitter in OS - GeeksforGeeks | 23 Jun, 2021
What is latency ?The literal meaning of latency is “delay”.
In an operating system , latency is the time between when an interrupt occurs, and when the processor starts to run code to process the interrupt. It is considered as the combined delay between an input or command and therefore the desired output ... | [
{
"code": null,
"e": 25762,
"s": 25734,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 25822,
"s": 25762,
"text": "What is latency ?The literal meaning of latency is “delay”."
},
{
"code": null,
"e": 26099,
"s": 25822,
"text": "In an operating system , laten... |
Map of Vectors in C++ STL with Examples - GeeksforGeeks | 16 Jan, 2020
Map in STL Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values.
Vector in STL Vector is same as dynamic arrays with the ability to resize itself automatically when an element is inserted or d... | [
{
"code": null,
"e": 25801,
"s": 25773,
"text": "\n16 Jan, 2020"
},
{
"code": null,
"e": 25981,
"s": 25801,
"text": "Map in STL Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have ... |
Why You Should Be Using Pandas Dataframes for Keras Trainings on Image Classification Problems | Towards Data Science | As seen in my previous article, research projects can be arduous with a lack of organization. So many resources around, that sometimes slow down the process of researching.
In this article, I am going to focused on datasets that are composed of images, especially those for Image Classification problems. We are going to... | [
{
"code": null,
"e": 345,
"s": 172,
"text": "As seen in my previous article, research projects can be arduous with a lack of organization. So many resources around, that sometimes slow down the process of researching."
},
{
"code": null,
"e": 602,
"s": 345,
"text": "In this artic... |
Sort the words in lexicographical order in Python | Sorting words in lexicographical order mean that we want to arrange them first by the first letter of the word. Then for the words whose first letter is the same, we arrange them within that group by the second letter and so on just like in a language's dictionary(not the data structure).
Python has 2 functions, sort a... | [
{
"code": null,
"e": 1352,
"s": 1062,
"text": "Sorting words in lexicographical order mean that we want to arrange them first by the first letter of the word. Then for the words whose first letter is the same, we arrange them within that group by the second letter and so on just like in a language's... |
Spring JDBC - Configure Data Source | Let us create a database table Student in our database TEST. I assume you are working with MySQL database, if you work with any other database then you can change your DDL and SQL queries accordingly.
CREATE TABLE Student(
ID INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(20) NOT NULL,
AGE INT NOT NULL,
PRIMA... | [
{
"code": null,
"e": 2597,
"s": 2396,
"text": "Let us create a database table Student in our database TEST. I assume you are working with MySQL database, if you work with any other database then you can change your DDL and SQL queries accordingly."
},
{
"code": null,
"e": 2731,
"s": ... |
How to sample from language models | by Ben Mann | Towards Data Science | Causal language models like GPT-2 are trained to predict the probability of the next word given some context. For example, given “I ate a delicious hot ___”, the model may predict “dog” with 80% probability, “pancake” 5% probability, etc. The cool thing about this structure is they can be used to generate sequences of ... | [
{
"code": null,
"e": 928,
"s": 172,
"text": "Causal language models like GPT-2 are trained to predict the probability of the next word given some context. For example, given “I ate a delicious hot ___”, the model may predict “dog” with 80% probability, “pancake” 5% probability, etc. The cool thing a... |
Node.js crypto.generateKeyPairSync() Method - GeeksforGeeks | 11 Oct, 2021
The crypto.generateKeyPairSync() method is an inbuilt application programming interface of crypto module which is used to generate a new asymmetric key pair of the specified type. For example, the currently supported key types are RSA, DSA, EC, Ed25519, Ed448, X25519, X448, and DH. Moreover, if option’s pu... | [
{
"code": null,
"e": 24521,
"s": 24493,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 25181,
"s": 24521,
"text": "The crypto.generateKeyPairSync() method is an inbuilt application programming interface of crypto module which is used to generate a new asymmetric key pair of the... |
How to get sequence number in loops with JavaScript? | To get sequence number in loops, use the forEach() loop. Following is the code −
let studentDetails =
[
{
id: 101, details: [{name: 'John'}, {name: 'David'},{name: 'Bob'}]},
{id:102, details: [{name:'Carol'},{name:'David'},
{name:'Mike'}]
}
];
var counter = 1;
studentDetails.forEach(function(k){... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "To get sequence number in loops, use the forEach() loop. Following is the code −"
},
{
"code": null,
"e": 1469,
"s": 1143,
"text": "let studentDetails =\n[\n {\n id: 101, details: [{name: 'John'}, {name: 'David'},{name: 'Bob'}... |
How to implement MongoDB $or query? | The syntax is as follows for the $or query in MongoDB −
db.yourCollectionName.find({ $or : [ { "yourFieldName" : "yourValue1" }, {"yourFieldName":"yourValue2"},...........N ] } ).pretty();
To understand the concept, let us create a collection with the document. The query to create a collection with a document is as fol... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "The syntax is as follows for the $or query in MongoDB −"
},
{
"code": null,
"e": 1251,
"s": 1118,
"text": "db.yourCollectionName.find({ $or : [ { \"yourFieldName\" : \"yourValue1\" }, {\"yourFieldName\":\"yourValue2\"},...........N ]... |
How to link jQuery in HTML page? | jQuery is a fast and concise JavaScript library primarily designed with a nice motto − Write less, do more. The main purpose of this library is to make it easier to use JavaScript on our website. jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQue... | [
{
"code": null,
"e": 1479,
"s": 1062,
"text": "jQuery is a fast and concise JavaScript library primarily designed with a nice motto − Write less, do more. The main purpose of this library is to make it easier to use JavaScript on our website. jQuery simplifies HTML document traversing, event handlin... |
How to display mean in a histogram using ggplot2 in R? | To display mean in a histogram using ggplot2, we can use geom_vline function where we need to define the x-intercept value as the mean of the column for which we want to create the histogram. Also, we can change the size of the line for mean in the histogram by using size argument inside geom_vline function.
Consider t... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "To display mean in a histogram using ggplot2, we can use geom_vline function where we need to define the x-intercept value as the mean of the column for which we want to create the histogram. Also, we can change the size of the line for mean in the hist... |
How to Run a Command with Time Limit (Timeout) In Linux | Sometimes a Unix command may run for a very long time without giving the final output or it make a processing giving partial output from time to time. In such scenario we will like to put a time frame within which either the command mast complete for the process should abort. This is achieved by using below options.
Th... | [
{
"code": null,
"e": 1380,
"s": 1062,
"text": "Sometimes a Unix command may run for a very long time without giving the final output or it make a processing giving partial output from time to time. In such scenario we will like to put a time frame within which either the command mast complete for th... |
Predicting Used Car Prices with Machine Learning Techniques | by Enes Gokce | Towards Data Science | You can reach all Python scripts of this study on my github page. If you are interested, you can also find the scripts used for data cleaning for this study in the same repository.
If you are interested in learning about a building a Machine Learning system from scratch including:
Justifications during data cleaning
Ex... | [
{
"code": null,
"e": 353,
"s": 172,
"text": "You can reach all Python scripts of this study on my github page. If you are interested, you can also find the scripts used for data cleaning for this study in the same repository."
},
{
"code": null,
"e": 454,
"s": 353,
"text": "If yo... |
Consuming a REST API ( Github Users ) using Fetch - React Client - GeeksforGeeks | 09 Nov, 2021
In this article you will learn to develop a React application, which will fetch the data from a REST API using Fetch. We will use GitHub Users API to fetch the user’s public information with their username. You can find the API reference and source code links at the end of this article.
Before moving onto... | [
{
"code": null,
"e": 24397,
"s": 24369,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 24686,
"s": 24397,
"text": "In this article you will learn to develop a React application, which will fetch the data from a REST API using Fetch. We will use GitHub Users API to fetch the use... |
C# | CharEnumerator.MoveNext() Method - GeeksforGeeks | 30 Apr, 2019
CharEnumerator.MoveNext() Method is used to increments the internal index of the current CharEnumerator object to the next character of the enumerated string.
Syntax:
public bool MoveNext();
Return Value: This method returns the boolean value true value if the index is successfully incremented and within t... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 24070,
"s": 23911,
"text": "CharEnumerator.MoveNext() Method is used to increments the internal index of the current CharEnumerator object to the next character of the enumerated string."
}... |
ASP.NET MVC - Quick Guide | ASP.NET MVC is basically a web development framework from Microsoft, which combines the features of MVC (Model-View-Controller) architecture, the most up-to-date ideas and techniques from Agile development, and the best parts of the existing ASP.NET platform.
ASP.NET MVC is not something, which is built from ground zer... | [
{
"code": null,
"e": 2529,
"s": 2269,
"text": "ASP.NET MVC is basically a web development framework from Microsoft, which combines the features of MVC (Model-View-Controller) architecture, the most up-to-date ideas and techniques from Agile development, and the best parts of the existing ASP.NET pla... |
PreparedStatementSetter Interface | The org.springframework.jdbc.core.PreparedStatementSetter interface acts as a general callback interface used by the JdbcTemplate class. This interface sets values on a PreparedStatement provided by the JdbcTemplate class, for each of a number of updates in a batch using the same SQL.
Implementations are responsible fo... | [
{
"code": null,
"e": 2682,
"s": 2396,
"text": "The org.springframework.jdbc.core.PreparedStatementSetter interface acts as a general callback interface used by the JdbcTemplate class. This interface sets values on a PreparedStatement provided by the JdbcTemplate class, for each of a number of update... |
Maven Interview Questions | Dear readers, these Maven Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Maven. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions star... | [
{
"code": null,
"e": 2494,
"s": 2060,
"text": "Dear readers, these Maven Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Maven. As per my experience good interviewers hardly plan to ask any... |
How to order by certain part of a string in MySQL? | You can use ORDER BY SUBSTRING() to order by certain part of a string in MySQL. Let us first create a table:
mysql> create table DemoTable (UserId varchar(200));
Query OK, 0 rows affected (0.68 sec)
Following is the query to insert records in the table using insert command:
mysql> insert into DemoTable values('USER_123... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "You can use ORDER BY SUBSTRING() to order by certain part of a string in MySQL. Let us first create a table:"
},
{
"code": null,
"e": 1261,
"s": 1171,
"text": "mysql> create table DemoTable (UserId varchar(200));\nQuery OK, 0 rows af... |
How to get Value of a Edit Text field in Android using Kotlin? | This example demonstrates how to get Value of a Edit Text field in Android using Kotlin?
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "This example demonstrates how to get Value of a Edit Text field in Android using Kotlin?"
},
{
"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... |
Complementation process in DFA - GeeksforGeeks | 26 Jul, 2021
Prerequisite – Design a Finite automata Suppose we have a DFA that is defined by ( Q, , , q0, F ) and it accepts the language L1. Then, the DFA which accepts the language L2 where L2 = ̅L1‘, will be defined as below:
( Q, , , q0, Q-F )
The complement of a DFA can be obtained by making the non-final state... | [
{
"code": null,
"e": 24376,
"s": 24348,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 24595,
"s": 24376,
"text": "Prerequisite – Design a Finite automata Suppose we have a DFA that is defined by ( Q, , , q0, F ) and it accepts the language L1. Then, the DFA which accepts the l... |
Rotate In Animation Effect with CSS | To create a rotate in animation effect with CSS, you can try to run the following code −
Live Demo
<html>
<head>
<style>
.animated {
background-image: url(/css/images/logo.png);
background-repeat: no-repeat;
background-position: left top;
padding-top:95p... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To create a rotate in animation effect with CSS, you can try to run the following code −"
},
{
"code": null,
"e": 1161,
"s": 1151,
"text": "Live Demo"
},
{
"code": null,
"e": 2727,
"s": 1161,
"text": "<html>\n <... |
C library function - free() | The C library function void free(void *ptr) deallocates the memory previously allocated by a call to calloc, malloc, or realloc.
Following is the declaration for free() function.
void free(void *ptr)
ptr − This is the pointer to a memory block previously allocated with malloc, calloc or realloc to be deallocated. If a ... | [
{
"code": null,
"e": 2136,
"s": 2007,
"text": "The C library function void free(void *ptr) deallocates the memory previously allocated by a call to calloc, malloc, or realloc."
},
{
"code": null,
"e": 2186,
"s": 2136,
"text": "Following is the declaration for free() function."
... |
Print all possible strings that can be made by placing spaces - GeeksforGeeks | 29 Apr, 2021
Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them
Examples :
Input : str[] = "ABC"
Output : ABC
AB C
A BC
A B C
Input : str[] = "ABCD"
Output : ABCD
A BCD
AB CD
A B CD
ABC... | [
{
"code": null,
"e": 25112,
"s": 25084,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25232,
"s": 25112,
"text": "Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them "
},
{
"code": null,
"e": 25244,... |
ArrayDeque in Java - GeeksforGeeks | 24 Jan, 2022
The ArrayDeque in Java provides a way to apply resizable-array in addition to the implementation of the Deque interface. It is also known as Array Double Ended Queue or Array Deck. This is a special kind of array that grows and allows users to add or remove an element from both sides of the queue.
Few imp... | [
{
"code": null,
"e": 28561,
"s": 28533,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 28861,
"s": 28561,
"text": "The ArrayDeque in Java provides a way to apply resizable-array in addition to the implementation of the Deque interface. It is also known as Array Double Ended Que... |
Advantages of getter and setter Over Public Fields in Java with Examples - GeeksforGeeks | 03 Mar, 2021
Providing getter and setter methods to access any class field in Java can at first look pointless and meaningless, simply because you can make the field public, and it is available in Java programs from anywhere. In reality, many programmers do this in the early days, but once you start thinking in terms o... | [
{
"code": null,
"e": 23581,
"s": 23553,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 23996,
"s": 23581,
"text": "Providing getter and setter methods to access any class field in Java can at first look pointless and meaningless, simply because you can make the field public, an... |
A (very) friendly introduction to Confidence Intervals | by Dima Shulga | Towards Data Science | Today I want to talk about a basic term in statistics — confidence intervals, I want to do it in a very friendly manner, discussing only the general idea, without too much fancy statistics terms and with python!
Although this term is very basic, it sometimes very hard to fully understand (as it was for me) what’s reall... | [
{
"code": null,
"e": 384,
"s": 172,
"text": "Today I want to talk about a basic term in statistics — confidence intervals, I want to do it in a very friendly manner, discussing only the general idea, without too much fancy statistics terms and with python!"
},
{
"code": null,
"e": 546,
... |
How to delete the Azure Resource Group using PowerShell? | To delete the azure resource group using PowerShell, we need to use the Remove-AZResourceGroup command. But before using this command, make sure that no usable resources exist in the resource group that you want to delete.
To check if the resources are available in the resource group, use the below command. Here we are... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "To delete the azure resource group using PowerShell, we need to use the Remove-AZResourceGroup command. But before using this command, make sure that no usable resources exist in the resource group that you want to delete."
},
{
"code": null,
... |
Search in Rotated Sorted Array II in C++ | Consider we have an array sorted in ascending order. That is rotated at some pivot unknown to us beforehand. For example, if the array is like [0,0,1,2,2,5,6], this might become [2,5,6,0,0,1,2]. We have a target value to search. If that is found in the array, then return true, otherwise return false. So if the array is... | [
{
"code": null,
"e": 1448,
"s": 1062,
"text": "Consider we have an array sorted in ascending order. That is rotated at some pivot unknown to us beforehand. For example, if the array is like [0,0,1,2,2,5,6], this might become [2,5,6,0,0,1,2]. We have a target value to search. If that is found in the ... |
How to Build an Accounting System using SQLite | by Kenneth Infante | Towards Data Science | Scratch your own itch.
This is the advice that I always give whenever someone asks me how to learn programming. Practically, it means that you have to solve things or choose projects that are relevant to you — either in your work or personal life.
Mindlessly going to tutorials in Youtube, reading programming books, cop... | [
{
"code": null,
"e": 195,
"s": 172,
"text": "Scratch your own itch."
},
{
"code": null,
"e": 420,
"s": 195,
"text": "This is the advice that I always give whenever someone asks me how to learn programming. Practically, it means that you have to solve things or choose projects tha... |
Shop Order Analysis in Python. Product analysis with the Apriori... | by Michael Whittle | Towards Data Science | The Apriori algorithm is used in data mining to identify frequent items and association rule learning in a dataset. This article will focus on one practical and common use case, the analysis of shop orders. For example, which products are ordered more frequently than others, and which unrelated products are ordered as ... | [
{
"code": null,
"e": 716,
"s": 47,
"text": "The Apriori algorithm is used in data mining to identify frequent items and association rule learning in a dataset. This article will focus on one practical and common use case, the analysis of shop orders. For example, which products are ordered more freq... |
Machine Learning with Python - Histograms | Histograms group the data in bins and is the fastest way to get idea about the distribution of each attribute in dataset. The following are some of the characteristics of histograms −
It provides us a count of the number of observations in each bin created for visualization.
It provides us a count of the number of obse... | [
{
"code": null,
"e": 2488,
"s": 2304,
"text": "Histograms group the data in bins and is the fastest way to get idea about the distribution of each attribute in dataset. The following are some of the characteristics of histograms −"
},
{
"code": null,
"e": 2580,
"s": 2488,
"text":... |
Python Comments | Comments can be used to explain Python code.
Comments can be used to make the code more readable.
Comments can be used to prevent execution when testing code.
Comments starts with a #, and Python will
ignore them:
Comments can be placed at the end of a line, and Python will ignore the rest
of the line:
A comment does... | [
{
"code": null,
"e": 45,
"s": 0,
"text": "Comments can be used to explain Python code."
},
{
"code": null,
"e": 98,
"s": 45,
"text": "Comments can be used to make the code more readable."
},
{
"code": null,
"e": 159,
"s": 98,
"text": "Comments can be used to p... |
C++ Program to Check whether Graph is a Bipartite using BFS | A bipartite graph is a graph in which if the graph coloring is possible using two colors i.e; vertices in a set are colored with the same color. This is a C++ program to Check whether a graph bipartite or not using BFS.
Begin
Function Bipartite():
1) Assign a color to the source vertex
2) Color all the neighbo... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "A bipartite graph is a graph in which if the graph coloring is possible using two colors i.e; vertices in a set are colored with the same color. This is a C++ program to Check whether a graph bipartite or not using BFS."
},
{
"code": null,
"... |
Introduction to ML5.js. A Beginner's Friendly Machine Learning... | by Akshay Lamba | Towards Data Science | This article is 1st part on ML5.js learning series, The complete series shall be available both on text readable forms on Medium and in video explanatory Form on my channel on YouTube. A Complete Playlist of Views are being updated.
ML5.js is a recently developed high level Library which aims to make machine learning a... | [
{
"code": null,
"e": 404,
"s": 171,
"text": "This article is 1st part on ML5.js learning series, The complete series shall be available both on text readable forms on Medium and in video explanatory Form on my channel on YouTube. A Complete Playlist of Views are being updated."
},
{
"code": ... |
jQuery - ajax events | Ajax requests produce a number of different events that you can subscribe to. Here's a full list of the events and in what order they are broadcast.
There are two types of events −
These are callbacks that you can subscribe to within the Ajax request object.
$.ajax({
beforeSend: function(){
// Handle the befor... | [
{
"code": null,
"e": 2471,
"s": 2322,
"text": "Ajax requests produce a number of different events that you can subscribe to. Here's a full list of the events and in what order they are broadcast."
},
{
"code": null,
"e": 2503,
"s": 2471,
"text": "There are two types of events −"
... |
WebRTC - Mobile Support | In the mobile world, the WebRTC support is not on the same level as it is on desktops. Mobile devices have their own way, so WebRTC is also something different on the mobile platforms.
When developing a WebRTC application for desktop, we consider using Chrome, Firefox or Opera. All of them support WebRTC out of the box... | [
{
"code": null,
"e": 2072,
"s": 1887,
"text": "In the mobile world, the WebRTC support is not on the same level as it is on desktops. Mobile devices have their own way, so WebRTC is also something different on the mobile platforms."
},
{
"code": null,
"e": 2290,
"s": 2072,
"text"... |
Fine-tuning pretrained NLP models with Huggingface’s Trainer | by Vincent Tan | Towards Data Science | Motivation: While working on a data science competition, I was fine-tuning a pre-trained model and realised how tedious it was to fine-tune a model using native PyTorch or Tensorflow. I experimented with Huggingface’s Trainer API and was surprised by how easy it was. As there are very few examples online on how to use ... | [
{
"code": null,
"e": 622,
"s": 172,
"text": "Motivation: While working on a data science competition, I was fine-tuning a pre-trained model and realised how tedious it was to fine-tune a model using native PyTorch or Tensorflow. I experimented with Huggingface’s Trainer API and was surprised by how ... |
How to Create a Simple Gantt Chart Using JavaScript | by Alfrick Opidi | Towards Data Science | Use a JavaScript library to create a Gantt chart and take your project management efforts to the next level
Earlier this year, my team was looking for a project management tool that could assist us in charting the various tasks related to our app development project against some specific timelines. After doing some res... | [
{
"code": null,
"e": 280,
"s": 172,
"text": "Use a JavaScript library to create a Gantt chart and take your project management efforts to the next level"
},
{
"code": null,
"e": 535,
"s": 280,
"text": "Earlier this year, my team was looking for a project management tool that coul... |
implement real time object detection | Towards Data Science | The Self-Driving car might still be having difficulties understanding the difference between humans and garbage can, but that does not take anything away from the amazing progress state-of-the-art object detection models have made in the last decade.
Combine that with the image processing abilities of libraries like Op... | [
{
"code": null,
"e": 423,
"s": 172,
"text": "The Self-Driving car might still be having difficulties understanding the difference between humans and garbage can, but that does not take anything away from the amazing progress state-of-the-art object detection models have made in the last decade."
}... |
Generate a list of Primes less than n in Python | Suppose we have a number n, we have to generate a list of all prime numbers smaller than or
equal to n in ascending order. We have to keep in mind that 1 is not a prime number.
So, if the input is like 12, then the output will be [2, 3, 5, 7, 11].
To solve this, we will follow these steps −
sieve := a list of size n+1 ... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "Suppose we have a number n, we have to generate a list of all prime numbers smaller than or\nequal to n in ascending order. We have to keep in mind that 1 is not a prime number."
},
{
"code": null,
"e": 1310,
"s": 1239,
"text": "So, ... |
How to get the current GPS location programmatically on Android using Kotlin? | This example demonstrates how to get the current GPS location programmatically on Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" en... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "This example demonstrates how to get the current GPS location programmatically on Android using Kotlin."
},
{
"code": null,
"e": 1295,
"s": 1166,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and ... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 19 Nov, 2018
For computers based on three-address instruction formats, each address field can be used to specify which of the following:
S1: A memory operand
S2: A processor register
S3: An implied accumulator register
(A) Either S1 or S2(B) Either S2 or S3(C) Only S2 and S3(D) All of S1, S2 and S3Answer: (A)Explanatio... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 25819,
"s": 25695,
"text": "For computers based on three-address instruction formats, each address field can be used to specify which of the following:"
},
{
"code": null,
"e": 25... |
__getitem__ and __setitem__ in Python - GeeksforGeeks | 23 Mar, 2020
Dunder methods are double underscored methods that are used to emulate the behavior of built-in types. They are predefined methods that simplify many operations that can be performed on a class instance, like __init__(), __str__(), __call__() etc. These methods are very helpful because they are used in bin... | [
{
"code": null,
"e": 24352,
"s": 24324,
"text": "\n23 Mar, 2020"
},
{
"code": null,
"e": 24738,
"s": 24352,
"text": "Dunder methods are double underscored methods that are used to emulate the behavior of built-in types. They are predefined methods that simplify many operations th... |
Reverse alternate K nodes in a Singly Linked List - Iterative Solution - GeeksforGeeks | 11 Nov, 2021
Given a linked list and an integer K, the task is to reverse every alternate K nodes.Examples:
Input: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> NULL, K = 3 Output: 3 2 1 4 5 6 9 8 7Input: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> NULL, K = 5 Output: 5 4 3 2 1 6 7 8 9
Approach: We have already d... | [
{
"code": null,
"e": 26409,
"s": 26381,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 26506,
"s": 26409,
"text": "Given a linked list and an integer K, the task is to reverse every alternate K nodes.Examples: "
},
{
"code": null,
"e": 26687,
"s": 26506,
"t... |
String Interpolation in Angular 8 - GeeksforGeeks | 31 Aug, 2020
String Interpolation in Angular 8 is a one-way data-binding technique that is used to transfer the data from a TypeScript code to an HTML template (view). It uses the template expression in double curly braces to display the data from the component to the view. String interpolation adds the value of a prop... | [
{
"code": null,
"e": 25898,
"s": 25870,
"text": "\n31 Aug, 2020"
},
{
"code": null,
"e": 26256,
"s": 25898,
"text": "String Interpolation in Angular 8 is a one-way data-binding technique that is used to transfer the data from a TypeScript code to an HTML template (view). It uses ... |
Biggest integer which has maximum digit sum in range from 1 to n - GeeksforGeeks | 22 Apr, 2021
Given a number n, find a number in range from 1 to n such that its sum is maximum. If there are several such integers, determine the biggest of them.
Examples :
Input: n = 100
Output: 99
99 is the largest number in range from
1 to 100 with maximum sum of digits.
Input: n = 48
Output: 48
Explanation:
... | [
{
"code": null,
"e": 26073,
"s": 26045,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 26223,
"s": 26073,
"text": "Given a number n, find a number in range from 1 to n such that its sum is maximum. If there are several such integers, determine the biggest of them."
},
{
... |
Dual pivot Quicksort - GeeksforGeeks | 17 Mar, 2022
As we know, the single pivot quick sort takes a pivot from one of the ends of the array and partitioning the array, so that all elements are left to the pivot are less than or equal to the pivot, and all elements that are right to the pivot are greater than the pivot.The idea of dual pivot quick sort is to... | [
{
"code": null,
"e": 24078,
"s": 24050,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 25079,
"s": 24078,
"text": "As we know, the single pivot quick sort takes a pivot from one of the ends of the array and partitioning the array, so that all elements are left to the pivot are ... |
How to remove all rows from a table in JavaScript ? - GeeksforGeeks | 31 Jul, 2019
Given an HTML document which contains an HTML table and the task is to remove all rows from the HTML table. Removing all rows is different from removing the few rows. This can be done by using JavaScript.
Approach
First of all set the ID or unique class to the table.
Select the table element and use remove... | [
{
"code": null,
"e": 26105,
"s": 26077,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 26310,
"s": 26105,
"text": "Given an HTML document which contains an HTML table and the task is to remove all rows from the HTML table. Removing all rows is different from removing the few ro... |
How to set the Text in TextBox in C#? - GeeksforGeeks | 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 the text associated with the TextBox by using the Text property of the TextBox. In Windows form, you c... | [
{
"code": null,
"e": 23988,
"s": 23960,
"text": "\n29 Nov, 2019"
},
{
"code": null,
"e": 24339,
"s": 23988,
"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 ... |
Spring Boot - Apache Kafka | Apache Kafka is an open source project used to publish and subscribe the messages based on the fault-tolerant messaging system. It is fast, scalable and distributed by design. If you are a beginner to Kafka, or want to gain a better understanding on it, please refer to this link − www.tutorialspoint.com/apache_kafka/
I... | [
{
"code": null,
"e": 3344,
"s": 3025,
"text": "Apache Kafka is an open source project used to publish and subscribe the messages based on the fault-tolerant messaging system. It is fast, scalable and distributed by design. If you are a beginner to Kafka, or want to gain a better understanding on it,... |
Python PostgreSQL - Introduction | PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development phase and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.
To communicate with PostgreSQL using Python you need to install psycopg, an ad... | [
{
"code": null,
"e": 3447,
"s": 3205,
"text": "PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development phase and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness."
},
{
... |
Kubernetes - Network Policy | Network Policy defines how the pods in the same namespace will communicate with each other and the network endpoint. It requires extensions/v1beta1/networkpolicies to be enabled in the runtime configuration in the API server. Its resources use labels to select the pods and define rules to allow traffic to a specific po... | [
{
"code": null,
"e": 2567,
"s": 2195,
"text": "Network Policy defines how the pods in the same namespace will communicate with each other and the network endpoint. It requires extensions/v1beta1/networkpolicies to be enabled in the runtime configuration in the API server. Its resources use labels to... |
LeetCode Longest Substring Without Repetition Solution in Python | Towards Data Science | LeetCode is a platform that gives access to numerous coding problems that are usually asked in technical interviews of tech giants such as Google, Meta and Amazon for Engineering and Machine Learning positions.
In today’s article, we are going to explore a couple of approaches for the third problem on LeetCode problem ... | [
{
"code": null,
"e": 258,
"s": 47,
"text": "LeetCode is a platform that gives access to numerous coding problems that are usually asked in technical interviews of tech giants such as Google, Meta and Amazon for Engineering and Machine Learning positions."
},
{
"code": null,
"e": 457,
... |
Node.js - Packaging | JXcore, which is an open source project, introduces a unique feature for packaging and encryption of source files and other assets into JX packages.
Consider you have a large project consisting of many files. JXcore can pack them all into a single file to simplify the distribution. This chapter provides a quick overvie... | [
{
"code": null,
"e": 2167,
"s": 2018,
"text": "JXcore, which is an open source project, introduces a unique feature for packaging and encryption of source files and other assets into JX packages."
},
{
"code": null,
"e": 2394,
"s": 2167,
"text": "Consider you have a large project... |
C Program for KMP Algorithm for Pattern Searching | In this problem, we are given two strings a text and a pattern. Our task is to create a program for KMP algorithm for pattern search, it will find all the occurrences of pattern in text string.
Here, we have to find all the occurrences of patterns in the text.
Let’s take an example to understand the problem,
text = “xy... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "In this problem, we are given two strings a text and a pattern. Our task is to create a program for KMP algorithm for pattern search, it will find all the occurrences of pattern in text string."
},
{
"code": null,
"e": 1323,
"s": 1256,
... |
Variational Auto Encoders. What happens when we encounter data... | by Viv | Towards Data Science | What happens when we encounter data with no labels? Most deep learning techniques require cleanly labelled data, but how realistic is this? At its core, this technique essentially says that if you have a set of inputs and their respective target labels, you can try and learn the probability of a particular label for a ... | [
{
"code": null,
"e": 758,
"s": 172,
"text": "What happens when we encounter data with no labels? Most deep learning techniques require cleanly labelled data, but how realistic is this? At its core, this technique essentially says that if you have a set of inputs and their respective target labels, y... |
Singleton Class in Kotlin - GeeksforGeeks | 14 Sep, 2020
Singleton Class in Kotlin is also called as the Singleton Object in Kotlin. Singleton class is a class that is defined in such a way that only one instance of the class can be created and used everywhere. Many times we create the two different objects of the same class, but we have to remember that creatin... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 25588,
"s": 25116,
"text": "Singleton Class in Kotlin is also called as the Singleton Object in Kotlin. Singleton class is a class that is defined in such a way that only one instance of the ... |
How to handle a link click event using jQuery? | To handle a click event using jQuery, use the click() method. You can try to run the following code to handle a link click event using jQuery −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "To handle a click event using jQuery, use the click() method. You can try to run the following code to handle a link click event using jQuery −"
},
{
"code": null,
"e": 1216,
"s": 1206,
"text": "Live Demo"
},
{
"code": null,
... |
How to scroll to element with Selenium WebDriver using C#? | We can scroll to an element with Selenium webdriver in C#. This is done with the help of JavaScript Executor. Selenium can run JavaScript commands with the help of ExecuteScript method.
The method scrollIntoView in JavaScript is used to perform the scrolling action and the value true is passed as a parameter to the met... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "We can scroll to an element with Selenium webdriver in C#. This is done with the help of JavaScript Executor. Selenium can run JavaScript commands with the help of ExecuteScript method."
},
{
"code": null,
"e": 1436,
"s": 1248,
"text... |
How to check if String is Palindrome using C#? | Let’s say we need to find that the following string is Palindrome or not −
str = "Level";
For that, convert the string into character array to chec each character −
char[] ch = str.ToCharArray();
Now find the reverse −
Array.Reverse(ch);
Use the Equals method to find whether the reverse is equal to original array or no... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "Let’s say we need to find that the following string is Palindrome or not −"
},
{
"code": null,
"e": 1152,
"s": 1137,
"text": "str = \"Level\";"
},
{
"code": null,
"e": 1227,
"s": 1152,
"text": "For that, convert t... |
How to read a .txt file with RandomAccessFile in Java? | In general, while reading or writing data to a file, you can only read or, write data from the start of the file. you cannot read/write from random position.
The java.io.RandomAccessFile class in Java enables you to read/write data to a random access file.
This acts similar to a large array of bytes with an index or, c... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "In general, while reading or writing data to a file, you can only read or, write data from the start of the file. you cannot read/write from random position."
},
{
"code": null,
"e": 1319,
"s": 1220,
"text": "The java.io.RandomAccess... |
Python program to print all the numbers divisible by 3 and 5 for a given number | This is a python program to print all the numbers which are divisible by 3 and 5 from a given interger N. There are numerous ways we can write this program except that we need to check if the number is fully divisble by both 3 and 5.
Below is my code to write a python program to print all the numbers divisible by 3 and... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "This is a python program to print all the numbers which are divisible by 3 and 5 from a given interger N. There are numerous ways we can write this program except that we need to check if the number is fully divisble by both 3 and 5."
},
{
"code... |
How to disable landscape mode in Android? | Android supports two orientations as portrait and landscape. we can disable orientation in android application. This example demonstrate
about how to disable landscape mode 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... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "Android supports two orientations as portrait and landscape. we can disable orientation in android application. This example demonstrate\nabout how to disable landscape mode in Android."
},
{
"code": null,
"e": 1376,
"s": 1247,
"text... |
How to create wave ball effect using CSS? - GeeksforGeeks | 11 Sep, 2020
Wave ball effect is a new entry in the world of animation effects that are used in the designing of modern web apps. In this effect, we have some balls which are animated like a wave. Now you can add different elements to it make it unique like a different color for balls and animation-delay or by changing... | [
{
"code": null,
"e": 28046,
"s": 28018,
"text": "\n11 Sep, 2020"
},
{
"code": null,
"e": 28377,
"s": 28046,
"text": "Wave ball effect is a new entry in the world of animation effects that are used in the designing of modern web apps. In this effect, we have some balls which are a... |
Program to find largest element in an array using Dynamic Memory Allocation - GeeksforGeeks | 17 Sep, 2020
Given an array arr[] consisting of N integers, the task is to find the largest element in the given array using Dynamic Memory Allocation.
Examples:
Input: arr[] = {4, 5, 6, 7} Output: 7Explanation:The largest element present in the given array is 7.
Input: arr[] = {8, 9, 10, 12} Output: 12Explanation:The ... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n17 Sep, 2020"
},
{
"code": null,
"e": 26290,
"s": 26151,
"text": "Given an array arr[] consisting of N integers, the task is to find the largest element in the given array using Dynamic Memory Allocation."
},
{
"code": nu... |
C# | Params - GeeksforGeeks | 19 Jan, 2019
Params is an important keyword in C#. It is used as a parameter which can take the variable number of arguments.
Important Point About Params Keyword :
It is useful when programmer don’t have any prior knowledge about the number of parameters to be used.
Only one Params keyword is allowed and no additional... | [
{
"code": null,
"e": 25179,
"s": 25151,
"text": "\n19 Jan, 2019"
},
{
"code": null,
"e": 25292,
"s": 25179,
"text": "Params is an important keyword in C#. It is used as a parameter which can take the variable number of arguments."
},
{
"code": null,
"e": 25331,
"s... |
How to create a tar file using Python? | Use the tarfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively.
import os
import tarfile
def tardir(path, tar_name):
with tarfile.open(tar_name, "w:gz") as tar_handle:
for root, dirs, files in os.walk(path):
for file i... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "Use the tarfile module to create a zip archive of a directory. Walk the directory tree using os.walk and add all the files in it recursively."
},
{
"code": null,
"e": 1499,
"s": 1204,
"text": "import os\nimport tarfile\ndef tardir(pa... |
Tryit Editor v3.7 | Tryit: Using the clip property | [] |
Find Simple Closed Path for a given set of points in C++ | Consider we have a set of points. We have to find a simple closed path covering all points. Suppose the points are like below, and the next image is making a closed path on those points.
To get the path, we have to follow these steps −
Find the bottom left point as P
Find the bottom left point as P
Sort other n – 1 poi... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "Consider we have a set of points. We have to find a simple closed path covering all points. Suppose the points are like below, and the next image is making a closed path on those points."
},
{
"code": null,
"e": 1298,
"s": 1249,
"tex... |
Text alignment in a Matplotlib legend | To make text alignment in a matplotlib legend, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create x data points using numpy.
Create x data points using numpy.
Plot x, sin(x) and ... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "To make text alignment in a matplotlib legend, we can take the following steps −"
},
{
"code": null,
"e": 1219,
"s": 1143,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": nul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.