How to setup Python based Django framework and MySQL Databse to execute SQL statements

Introduction Here in this tutorial I am going to show you how to setup Python based Django framework and MySQL database server to execute SQL statement in Windows environment. The MySQL server is used as a persistent system for storing data for the application. I have already discussed in my another tutorial how to setup Django, so I won’t repeat…

How To Setup Python Based Django Framework In Windows

Django In this example I am going to show you how to configure Python based Django in Windows Operating System. The current version of Django, at the time of writing, I am using here is 3.0.8 and later updated to version 4.2.5. Here I am going to show you how to install latest version of Django in Windows 64 bit…

Allow only numeric values or digits in input field using React

Introduction In this example I am going to show you how to allow only numeric values or digits in input field using React JS. You may have a requirement where you only need to allow user digits or numeric values for the input field. If user inputs non-numeric values then either you show an error or you do not allow…

Allow only numeric values or digits in input field using Angular 10

In this tutorial I am going to show you how to allow users only input numeric values or digits. If users enter non-numeric value then we will show an error message. We can also completely prevent from entering non-numeric values. In this case, we need to accept only numbers for a textbox or input field instead of validating the value…

How to select single or multiple records using JDBC executeQuery() and executeQueryForList()

Here we will discuss how to select single or multiple records using JDBC API. To select single record from database we use executeQuery() and to select multiple records we use executeQueryForList(). You may need to use executeQuery() to fetch single record from the database for various reasons, such as: You want to see details for a particular record You want…

Batch insert and batch update into DataBase using JDBC PreparedStatement

Introduction Here I am going to tell you how to insert and update a list of objects in batch using JDBC PreparedStatement in Java programming language. Generally when you have a list of objects or lots of data then probably it is not a good idea to insert or update individual record or object into database, because it makes lots…

How To Add Comments In Excel Sheet Cell Using Apache POI Java API

Introduction In an excel file, you might have seen there are comments on text cells or columns. So in this tutorial you will see how to add or insert comments in excel sheet cell using Apache POI Java API. Comments can help you to remember what all are formulae or instructions you want to provide to other excel users. In…

Should we synchronize run() method?

Here in this tutorial we will discuss whether we should synchronize the run() method or not. Another question may arise can we synchronize run() method? In simple word, yes, we can synchronize the run() method. Do we need to synchronize the run method? When it comes to whether we need to synchronize or not, then it is not necessary to…

How to post tweets using Twitter4j Java API

Here we will discuss on how to post tweets using Twitter4j Java API. Twitter4j is an unofficial Java library and using this you can easily integrate Java application with Twitter service. You can easily use standalone jar for this twitter4j API or using maven or gradle build tool to download the required jar on the classpath automatically.

Callback method example in Java

Here I am showing a simple example on what is callback method in Java. A callback is a piece of code that you can pass as an argument to be executed on some other code. Since Java doesn’t yet support function pointer, the callback methods are implemented as command objects. A callback will usually hold reference to some state to…