Create a Hit Counter in JSP

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

213 Views

Click the Below link to know how to create a hit Counter in Jsphttps://www.tutorialspoint.com/jsp/jsp_hits_counter.htm

LocalTime get Method in Java

Nancy Den
Updated on 30-Jul-2019 22:30:25

152 Views

The value of the specified field from the LocalTime can be obtained using the get() method in the LocalTime class in Java. This method requires a single parameter i.e. ChronoField that is required and it returns the value of the specified field from the LocalTime.A program that demonstrates this is given as followsExample Live Demoimport java.time.*; import java.time.temporal.ChronoField; public class Main{    public static void main(String[] args){       LocalTime lt = LocalTime.parse("23:15:30");       System.out.println("The LocalTime is: " + lt);       System.out.println("The MINUTE_OF_HOUR is: " +       lt.get(ChronoField.MINUTE_OF_HOUR));    } }outputThe LocalTime is: 23:15:30 ... Read More

Image Processing in Python

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

13K+ Views

Python provides lots of libraries for image processing, including −OpenCV − Image processing library mainly focused on real-time computer vision with application in wide-range of areas like 2D and 3D feature toolkits, facial & gesture recognition, Human-computer interaction, Mobile robotics, Object identification and others.Numpy and Scipy libraries − For image manipuation and processing.Sckikit − Provides lots of alogrithms for image processing.Python Imaging Library (PIL) − To perform basic operations on images like create thumnails, resize, rotation, convert between different file formats etc.In this section we are going to see some basics of image processing in python.Install required library Our first step ... Read More

Protocol Using Selective Repeat

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

12K+ Views

Selective repeat protocol, also called Selective Repeat ARQ (Automatic Repeat reQuest), is a data link layer protocol that uses sliding window method for reliable delivery of data frames. Here, only the erroneous or lost frames are retransmitted, while the good frames are received and buffered.It uses two windows of equal size: a sending window that stores the frames to be sent and a receiving window that stores the frames receive by the receiver. The size is half the maximum sequence number of the frame. For example, if the sequence number is from 0 – 15, the window size will be ... Read More

Group By Date in MySQL When Using DATETIME

Samual Sam
Updated on 30-Jul-2019 22:30:25

6K+ Views

To GROUP BY date while using datetime, the following is the syntax −select *from yourTableName GROUP BY date(yourColumnName);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table groupByDateDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> UserName varchar(20),    -> UserPostDatetime datetime    -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into groupByDateDemo(UserName, UserPostDatetime) values('Larry', '2018-01-02 13:45:40'); Query OK, 1 row affected (0.18 sec) mysql> insert ... Read More

Get Average of Entire Field Using Aggregation Framework in MongoDB

Chandu yadav
Updated on 30-Jul-2019 22:30:25

164 Views

You can use aggregate() method for this. Let us first create a collection with documents> db.averageAggregationDemo.insertOne({"PlayerGameScore":45}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ed66bd628fa4220163b95") } > db.averageAggregationDemo.insertOne({"PlayerGameScore":55}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ed671d628fa4220163b96") } > db.averageAggregationDemo.insertOne({"PlayerGameScore":65}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ed676d628fa4220163b97") } > db.averageAggregationDemo.insertOne({"PlayerGameScore":35}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ed67bd628fa4220163b98") } > db.averageAggregationDemo.insertOne({"PlayerGameScore":16}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ed701d628fa4220163b99") }Following is the query to display all documents from a collection with the help of find() method> db.averageAggregationDemo.find().pretty();This will produce the following output{ "_id" : ObjectId("5c9ed66bd628fa4220163b95"), "PlayerGameScore" ... Read More

Create New List from Existing List Using Function Mapper in Java

Samual Sam
Updated on 30-Jul-2019 22:30:25

176 Views

To create a new list with values from fields from existing list with Function Mapper, the following is an example. Here, we have a class Employee −class Employee {    private String emp_name;    private int emp_age;    private String emp_zone; }The following is an example that creates a new list from existing with Function Mapper −Example Live Demoimport java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; public class Demo {    public static void main(String args[]) {       List < Employee > emp = Arrays.asList(new Employee("Jack", 29, "South"), new Employee("Tom", 24, "North"),          new Employee("Harry", 35, ... Read More

MySQL Table Data Storage Location in Windows

Samual Sam
Updated on 30-Jul-2019 22:30:25

638 Views

In order to know the location of MySQL table data, you can use the below syntax −select @@datadir;You can also use SHOW VARIABLES command for this. Following is the syntax −show variables where Variable_name ='datadir';Let us implement the above syntaxes to know where MySQL table stores data −mysql> select @@datadir;This will produce the following output −+---------------------------------------------+ | @@datadir | +---------------------------------------------+ | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------------------------------------+ ... Read More

Read Next Byte of Data from Input Stream in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

469 Views

The method java.io.InputStream.read() is used to read the next byte of data from the input stream. This method requires no parameters and it returns the next data byte in the form of int. If the stream end is reached, it returns -1.A program that demonstrates this is given as follows −Exampleimport java.io.InputStream; public class Demo {    public static void main(String[] args) throws Exception {       InputStream input = null;       int i;       char c;       try {          input = new FileInputStream("C://JavaProgram//data.txt");          System.out.println("The ... Read More

Keep Two Columns in One Order in Android SQLite

Anvi Jain
Updated on 30-Jul-2019 22:30:25

303 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to keep two columns in one order in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all ... Read More

Advertisements