Posts

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...

Extracting Multiple FASTA Sequences using PHP

Image
This is a simple tutorial which explains how to safely extract multiple sequences from a FASTA file using PHP script. I have used four functions to perform different tasks: read_fas_file() - to check invalid file, fas_check() - to check FASTA file format, get_seq() - to retrieve sequence and sequence name pairs, and fas_get() - to extract and display multiple FASTA file formatted sequences. The full source code and multiple protein sequences in FASTA file format used in this tutorial is given below. Source Code function read_fas_file($x) { // Check for Empty File if (!file_exists($x)) { print "File Not Exist!!"; exit(); } else { $fh = fopen($x, 'r'); if (filesize($x) == 0) { print "File is Empty!!"; fclose($fh); exit(); } else { $f = fread($fh, filesize($x)); fclose($fh); return $f; } } } function fas_check($x) { // Check FASTA File Format $gt = substr($x, 0, 1); if ($gt != ">") { print "Not F...