How to use Google Protocol Buffers in Java to serialize structured Data

Introduction In this guide we will see how to use Google protocol buffers in Java to serialize structured data. I will show you both using gradle and maven build tools. You may choose any programming language from a variety of languages such as Java, C++, C#, Go, Dart, Python to serialize your data using Google protocol buffers. What are Google…

How to use Lombok in Java to reduce Boilerplate Code

Introduction In this tutorial we will see how to use lombok in Java based projects or applications to reduce boilerplate code. Lombok is a Java library that automatically provides getters/setters or equals method in your Java class. Just by placing an annotation your class has a fully featured builder, it automates your logging variables, and much more. You can also…

How to send attachments with email using Python

Introduction We have seen various examples on sending text email, RFC 822 standard email, HTML email but here we will see how to send attachments with email using Python 3. Attachments may be any type of files such as image, pdf, text etc. We will send email message over TLS and SSL ports using Gmail SMTP Server. We are going…

How to send an HTML email using Python

Introduction This tutorial will show you how to send an HTML email using Python 3. In our previous example we have seen how to send text message using Python 3 email library. Another variant of sending text message is using RFC 822 standard. In simple text email you don’t have option to decorate your message using styles or you cannot…

How to use RFC 822 for sending email in Python

Introduction Here we will create an example to send text message using RFC 822 in Python 3 programming language. We have seen how to send simple text email using gmail SMTP server in Python programming language. In this example we will also send the text message using RFC 822 standard, because RFC 822 standard does not support special encoding for…

How to send a simple email using Python

Introduction In this tutorial we will see how to send a simple email using Python 3. Simple email means we will send a text message using Gmail SMTP server. You may find useful other tutorials on sending emails with different formats. We will connect to both TLS and SSL ports over Gmail SMTP server. We will use here email package…

Find out how many times each character is showing up in a string

Introduction Here we will create a simple example to count each character to find out how many times each character repeats in the string. A string can have unique characters as well repeated characters. A string can also have only unique characters in it. Let’s say, you are given a string input, for example, “Hello World!”. Your output should be,…

How to find Prime Numbers using Java Programming Language

Introduction In this example we will see how to find prime numbers using Java programming language between 1 and 1000. We will also use Java 8 IntStream API to find prime numbers. We will actually compute prime number between given ranges, let’s say from i to n. So you can replace the starting (i) and ending (n) ranges. A number…

AJAX Based Login Logout Using Flask MySQL

Login Logout App I will create an example to show you how to build jQuery AJAX based login logout using Python Flask MySQL. Flask is a light-weight framework for building rapid web application whose data are stored into MySQL database server. I will use HTML, AJAX technique using jQuery technology to call the REST API for login and logout endpoints….

jQuery AJAX based Registration System using Python Flask MySQL

Introduction This guide will walk you through how to build jQuery AJAX based registration system using Python Flask MySQL. In this example I am going to build REST API that will be called from front-end technologies – jQuery, HTML including AJAX technique. I will determine registration process based on various http status codes such as 200 – success, 400 –…