Dinesh Krishnan

Software Developer | Technology Consultant

Hello everyone, In this tutorial, you will learn how to write a text to file in Go language. The following example program has been tested and shared in the post. Go – Writing Text to File package main import ( "bufio" "fmt" "io/ioutil" "os" ) func main() { // reader to read text or content […]
Hello everyone, In this post, we will show you how to read the user-input in the Go programming language. The example program has been tested and shared in the same post. Go – Reading the User-Input package main import ( "bufio" "fmt" "os" ) // main function func main() { reader := bufio.NewReader(os.Stdin) fmt.Println("What is […]
Hello everyone, In this post, we will show you how to write a simple factorial program in the Go programming language. The example program has been tested and shared in the same post. Go – Factorial Program In below program, you can see it has two functions defined, the factorial() function is taking an integer […]
Hello everyone, In this post, we will show you how to swap two numbers in the Go programming language. The example program has been tested and shared in the same post. Go – Swap two numbers In below program, you can see it has two functions defined, the swap() function is taking two integers as […]
Hello everyone, In this tutorial, we will show you a simple python program about how to tokenize a word and sentence in NLTK. The same program has been tested and shared in the same post. Tokenizing in Python NLTK In order to perform the word and sentence tokenizing for the given word, we need to […]
Hello everyone, In this tutorial, you will learn how to write a simple factorial program in python and the same has been tested and shared in the same post. Factorial Program in Python We have created a simple function called “factorial()”, it takes “number” as an argument and it will return the factorial result for […]
Hello everyone, In this tutorial, we will show you a simple hello world example in spring shell. The following example program has been tested and shared in the post. Maven Dependency In order to use or integrate spring shell module as of boot application please make sure you have added following dependencies in your pom.xml […]
Hello everyone, In this tutorial, you will learn, how to enable SSL for Tomcat(version:9) server. The following steps have been tested and shared in the same post. Creating a Self-Signed Certificate The self-signed certificate can be created using keytool(which is part of JDK bundle), please hit the following command in the command prompt to create […]
In this tutorial, you will learn, How to extract a properties from an object using Java 8 stream API`s and same properties can be collected as a List object. This example program has been tested and shared in the same post. Example Program The following example contains two classes one is Customer class and another […]
Hello everyone, In this post, you will learn, How to get headers param value in Python Flask framework. The example program has been tested and shared in the same post. Example Program from flask import Flask, request app = Flask(__name__) @app.route('/hello') def hello(): name = request.headers.get('name') return 'Hello '+name app.run() Output * Serving Flask app […]
Hello everyone, In this post, you will learn, How to get query param value in Python Flask framework. The example program has been tested and shared in the same post. Example Program from flask import Flask, request app = Flask(__name__) @app.route('/hello') def hello(): name = request.args.get('name') return 'Hello '+name app.run() Output * Serving Flask app […]
Hello everyone, In this post, you will learn, How to get path variable value in Python Flask framework. The example program has been tested and shared in the same post. Example Program from flask import Flask app = Flask(__name__) @app.route('/<name>') def hello(name): return 'Hello '+name app.run() Output * Serving Flask app "app" (lazy loading) * […]
Hello everyone, In this post, you will learn, How to write simple Hello World example in Python Flask framework. The example program has been tested and shared in the same post. Example Program from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World' app.run() Output * Serving Flask app "app" (lazy loading) […]
Hello everyone, In this tutorial, you will learn how to bring color chooser using Tkinter in Python. The example program has been tested and shared in the same post. Example Program import tkinter as tk<br> from tkinter.colorchooser import * #defining get_color function def get_color():<br> color = askcolor()<br> print(color) #creating an instance for Tk root = […]
Hello everyone, In this example, you will learn how to bring file chooser using Tkinter in Python. The example program has been tested and shared in the same post. Example Program import tkinter as tk from tkinter.filedialog import askopenfilename # defining open_file_chooser function def open_file_chooser(): filename = askopenfilename() print("You have selected : %s" % filename) […]
Hello everyone, In this post, you will learn how to create GUI for simple arithmetic application using Tkinter in Python. The sample code has been tested and shared in the same post. Example Program import tkinter as tk # creating an instance for Tk root = tk.Tk() res = None # setting a title root.title("Application") […]
Hello everyone, In this post, you will learn How to Create a Simple Window in Python. The example program has been tested and shared in the same post. Example Program import tkinter as tk # creating an instance for Tk root = tk.Tk() # setting a title root.title("My Title") # starting a window root.mainloop() Output