Posts

Simple Server and Client Chat using Python

Image
In Python language, socket (or network socket) is a module used to communicate between two computers. It provides two types of interface to access the network, namely low-level (platform dependent connections — Example: Telnet) and high-level (application dependent connections — Example: HTTP, FTP, SMTP, etc.). This is a simple tutorial to establish the low-level socket connection between server and client to communicate messages using the TCP/IP protocol. Server and Client Chat In this tutorial, I have used two scripts server.py to serve data by sending an invitation to the client, and client.py to receive data on acceptance of the invitation. After accepting the invitation, both server and client share messages mutually. — Server — An server script performs the sequence of functions such as socket() , bind() , listen() , and accept() (repeats for more than one client) to communicate with the client. The description of each functions used in the ser...

Retrieving Windows Product Key using VB Script

Image
In this article, I present the simple and safe method to retrieve product key of Windows operating system using VB Script. The VB Script reads the value of Windows product from the Registry Editor ( regedit ) and translates it to a formatted product key (25 alphanumeric characters). Also, it creates the backup of the product information to the local drive (Desktop). Instructions Step 1: Create a VB Script file “ WinProductKey.vbs ” using any ASCII text editor and enter the following codes. Source Code Dim objshell, path, DigitalID Set objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName, ProductID, ProductKey, ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = ...

Installing Latest Apache Web Server on Windows 10

Image
This tutorial describes step-by-step instructions to install the latest Apache HTTP Server software (latest stable version is 2.4.32, as on date 18 March 2018) on Windows 10 operating system. About Apache HTTP Server Apache HTTP Server (“Apache” and “httpd”) was launched in 1995 and it has been the most popular web server on the Internet since April 1996. The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featured, and freely-available source code implementation of an HTTP (Web) server. This project is part of the Apache Software Foundation. The latest released version of Apache HTTP Server Project is Apache HTTP Server 2.4.29 (as on date 18 March 2018). This version of Apache is the latest GA release of the new generation 2.4.x branch of Apache HTTPD and represents fifteen years of innovation by the project, and is recommended over all previous releases. Downloading Apache HTTP Se...

Simple WebServer using Python

Image
This is a simple example to develop your own Python web server used for application development or testing Python script and should not be used on a public network . It works similar to the Apache web server with limited functionalities and not intended to be a full-featured web server. This tutorial demonstrates just to activate the built-in web server through a batch file. Instructions For developing a Python web server, we simply need Python software alone. The batch file (.bat) was created to activate the built-in web server, automatically open the default web browser with custom folder as root directory (www), and minimize the command line window while running the Python script. Step 1: Download and install Python software according to your system platform. I have downloaded Windows x86-64 executable installer for 64-bit Windows 10 operating system. Step 2: Create a new folder named www ( optional , your path to the webpages). Also, create a new file index.html in...

Simple WebServer using PHP

Image
This is a simple example to design your own PHP web server used for application development or testing PHP script and should not be used on a public network . It works similar to the Apache web server with limited functionalities and not intended to be a full-featured web server. This tutorial demonstrates just to activate the built-in web server through a batch file. Instructions For designing a PHP web server, we simply need PHP software alone. The batch file(.bat) was created to activate the built-in web server, automatically open the default web browser with custom folder as root directory (www), and minimize the command line window while running the PHP script. Step 1: Download and extract compresed file (.zip) formatted PHP software according to your system platform. I have downloaded VC14 x64 Thread Safe (2017-Sep-26 23:04:10) for 64-bit Windows 10 OS. Step 2: Create a new folder www in the extracted folder. Also, create a new file index.html in the www folder ...

Frequency Plot of Protein Sequence using PHP and R

Image
A frequency plot is a graphical data analysis technique for summarizing the distributional information of a variable. The response variable is divided into equal sized intervals (or bins). The number of occurrences of the response variable is calculated for each bin. In this tutorial, the number of occurrences of each amino acids in the protein sequence (response variable) is calculated and sorted in ascending order. The frequency plot then consists of: Vertical Axis = Amino acids Horizontal Axis = Frequencies of the amino acids There are 4 types of frequency plots: Frequency plot (absolute counts); Relative frequency plot (convert counts to proportions); Cumulative frequency plot; Cumulative relative frequency plot. The frequency plot and the histogram have the same information except the frequency plot has lines connecting the frequency values, whereas the histogram has bars at the frequency values. Frequency plot using PHP and R In this tutorial, the programming langu...

Local NCBI BLAST+ in WebServer - Easy Steps

Image
This is a simple tutorial which explains how to design your own web interface for NCBI BLAST+ to perform local and online database search using PHP in webserver. The PHP library loc BLAST executes the NCBI BLAST+ programs using exec() function through passing parameters from the HTML form fields. In loc BLAST , two list boxes were used to select program & database, and text area & file upload is used to input query sequence in the FASTA file format. A FASTA file validation function is included to validate the query sequence before executing the BLAST programs. The loc BLAST PHP library and test database files were freely available at GitHub . Requirements for loc BLAST Setup In this tutorial, I have given a brief explanation about embedding the latest NCBI BLAST+ (the latest version of NCBI BLAST+ as on November 17, 2020 is 2.11.0 .) in any PHP enabled web server. The latest version of NCBI BLAST+ (standalone command-line BLAST programs) can be downloaded from the FTP s...