Friday, September 15, 2017

Simple Show/Hide Text using JavaScript

cPanel Domain

This is a simple tutorial which explains how to show or hide lines in a paragraph using JavaScript. The concept is to split the lines in the paragraph into two sections and show/hide the second section by clicking a hyperlinked text (to create a toggle effect). By default, the first section in the paragraph is set to always visible, and a hyperlink at the end of the line with onclick action to display the second section. Similarly, a hyperlink at the end of the line of the second section with onclick action is displayed after a mouse click event to hide the second section.

Example

This is a simple tutorial which explains how to show or hide lines in a paragraph using JavaScript. <a style='text-decoration: none' id='show_line' href='javascript:void(0)' onclick="document.getElementById('more').style.display = 'inline'; document.getElementById('hide_line').style.display = 'inline'; document.getElementById('show_line').style.display = 'none';">show more</a><span id='more' style='display: none;'>The concept is to split the lines in the paragraph into two sections and show/hide the <i>second section</i> by clicking a hyperlinked text (to create a toggle effect). By default, the <i>first section</i> in the paragraph is set to always visible, and a hyperlink at the end of the line with <kbd>onclick</kbd> action to display the <i>second section</i>. Similarly, a hyperlink at the end of the line of the <i>second section</i> with <kbd>onclick</kbd> action is displayed after a mouse click event to hide the <i>second section</i>. </span><a style='text-decoration: none; display: none' id='hide_line' href='javascript:void(0)' onclick="document.getElementById('more').style.display = 'none'; document.getElementById('show_line').style.display = 'inline'; document.getElementById('hide_line').style.display = 'none';">hide less</a>

Demo

This is a simple tutorial which explains how to show or hide lines in a paragraph using JavaScript. show more

Monday, November 7, 2016

Pointing Subdomain to another Domain through cPanel

cPanel Domain

Pointing Subdomain to another Domain

Pointing a subdomain to another domain is a challenging task for those who shift to another hosting provider. The problem is, old domain must point to the new domain properly for all sub-directories (Eg. https://sub.site1.com/article/introduction.html to https://www.site2.com/article/introduction.html). If the subdomain does not properly points to the new domain, the link may get broken. We can point a subdomain to another domain through cPanel, Zone Editor, or .htaccess file. In this tutorial, I have used cPanel version 66.0.14 to take screenshot.

cPanel Method

It is an easy method to point a subdomain to another domain. In this method, we can simply set both domains in cPanel to perform the task. In the Domains section of cPanel, click the Redirects link. In the Redirects page, enter the old subdomain and the new domain as shown in the screenshot below. Select the Wild Card Redirect box to redirect all files within a directory with the same filename in the redirected directory. But, you cannot use a Wild Card Redirect to redirect your main domain to a different directory on your site.

cPanel Redirect

The list of redirections can be viewed from the Subdomains page in the cPanel. To open the Subdomains page, click the Subdomains link present in the Domains section in the cPanel.

cPanel Subdomains

Zone Editor Method

It is a little difficult method to point a subdomain to another domain. In this method, we must specify the IP address of the new domain in “A” record in the Zone Editor. The correct IP address of the new domain must be carefully entered to point to the new domain properly. Click the + Add Record drop down menu and select Add A Record list. In the Name column, enter the old subdomain sub.site1.com and the IP address in the Record column. Press Add Record button to save the record.

cPanel Redirect

.htaccess Method

It is a difficult and complicated method to point a subdomain to another domain. In this method, we must enter the Apache handler command in the .htaccess file which is located in the www or htdocs directory, to redirect the URL. Incorrect commands may bisbehave the site's functionality. The Apache handler command for URL redirection is Redirect 301 /sub http://site2.com/$1.

Thursday, September 15, 2016

Installing Latest PyMOL Software for FREE

BIOGEM

Introduction to PyMOL

PyMOL is a Python-enhanced OpenGL based molecular visualization tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source PyMOL is available at SourceForge.net (https://sourceforge.net/projects/pymol/) for free to everyone. The commercial graphical end PyMOL is developed, maintained and distributed by Schrödinger, Inc (https://www.pymol.org/). PyMOL can produce high-quality 3D images of small molecules and biological macromolecules, such as proteins. According to the original author, almost a quarter of all published images of 3D protein structures in the scientific literature were made using PyMOL.

Requirements for PyMOL Installation

In this tutorial, I have explained how to install the latest PyMOL software (the latest version of PyMOL software as on September 15, 2016 is 1.8.3.2) for free. I have chosed Windows 10 Enterprise OEM 64-bit operating system to install the PyMOL software. So, I have downloaded all stable version executables in 64-bit. Before begining to install the PyMOL, we have to download the Python software and needed Python packages with same version. For example, I have chosen Python version 3.x, So I have downloaded the Python packages supporting 3.x version and x64(64-bit).

1. Python v3.5.2 - https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe (File Size: 28.7 MB)

Download PyMOL and neccessary packages from the unofficial windows binaries portal (http://www.lfd.uci.edu/~gohlke/pythonlibs/)

2. PIP v8.1.2 - http://www.lfd.uci.edu/~gohlke/pythonlibs/dp2ng7en/pip-8.1.2-py2.py3-none-any.whl (File Size: 1.14 MB)

3. Numpy+MKL v1.11.1 - http://www.lfd.uci.edu/~gohlke/pythonlibs/dp2ng7en/numpy-1.11.1+mkl-cp35-cp35m-win_amd64.whl (File Size: 111 MB)

4. PMW v2.0.1 - http://www.lfd.uci.edu/~gohlke/pythonlibs/dp2ng7en/Pmw-2.0.1-py3-none-any.whl (File Size: 533 KB)

5. PyMOL v1.8.3.2 - http://www.lfd.uci.edu/~gohlke/pythonlibs/dp2ng7en/pymol-1.8.3.2-cp35-cp35m-win_amd64.whl (File Size: 7.03 MB)

6. PyMOL Launcher v1.0 - http://www.lfd.uci.edu/~gohlke/pythonlibs/dp2ng7en/pymol_launcher-1.0-cp35-cp35m-win_amd64.whl (File Size: 207 KB)

Total download size of the complete softwares will be around 148.61 MB.

Installation Procedure

1. Install the downloaded Python v3.5.2 sofware with administrator priviliges. Follow the Customize installation procedure as shown in the images below to change the installation directory.
BIOGEM
BIOGEM
BIOGEM
BIOGEM

2. Copy the downloaded Python packages PIP v8.1.2, PMW v2.0.1, PyMOL v1.8.3.2, PyMOL v1.0, PyMOL Launcher v1.0, and Numpy+MKL v1.11.1 to the directory (C:\Python35\Scripts).
BIOGEM

3. Run Command Prompt with administrator priviliges. Enter the command line (cd "C:\Python35\Scripts") to enter into Scripts directory.

4. Enter the following commands in the Commmand Prompt in the order given below to install PyMOL. Refer the snapshot given below for clarification.
  • pip install pip-8.1.2-py2.py3-none-any.whl
  • pip install numpy-1.11.1+mkl-cp35-cp35m-win_amd64.whl
  • pip install Pmw-2.0.1-py3-none-any.whl
  • pip install pymol-1.8.3.2-cp35-cp35m-win_amd64.whl
  • pip install pymol_launcher-1.0-cp35-cp35m-win_amd64.whl
BIOGEM
5. Open the directory (C:\Python35) and double-click the binary file PyMOL.exe to launch PyMOL v1.8.3.2 software.
BIOGEM

Thursday, December 4, 2014

Technical Questions


1.You have been asked to review instructions in a .PDF file, but the file doesn't open. What is a typical troubleshooting step for this issue?

Reinstall or update Adobe Reader
Ask for another copy of the file
Open the file with Notepad
Convert the file to a different format

2. In Windows Vista, Windows 7, or Windows 8, what is the Snipping Tool used for?

To create audio snippets
To crop photos uploaded from a camera
To edit movies
To capture and create screenshots

3. An application is not responding; how would you force the application to close?

Restart the computer
Click on the red X icon on the application
Open the task manager, select the application, and click End Task
Open Programs and Features, select the application, and click Uninstall

4. In Windows Vista, Windows 7, and Windows 8 where are recently downloaded files stored by default?

C:\Users\username\Downloads\
C:\Documents and Settings\username\Downloads\
C:\Program Files\
C:\Program Files (x86)\Internet Explorer\Recent Downloads\

5. Internet Explorer is exhibiting unusual behavior when attempting to view a web page; which of the following is a troubleshooting step that will reset the browser's settings to default?

Open the Task Manager, select the application, and click End Task
Open Internet Explorer, click Tools and select Internet Options, click Delete Browsing History
Open Internet Explorer, click Tools and Select Internet Options, click Use default home page
Open Internet Options, click the Advanced Tab, click the Reset button

6. You have been asked to install a new piece of software, but it does not seem to be working correctly. What is a reasonable troubleshooting step you can take?

Unplug your modem or router, then plug it back in
Reinstall your Operating System
Check your Anti-Virus to see if the software has been blocked
Unplug your computer, then plug it back in

7. In the Excel spreadsheet shown above, how can columns J and K be made visible?

Highlight row 1 and click on the 'Sort A to Z' button
Highlight columns L and M, right-click, and select 'Insert'
Highlight columns I and L, right-click, and select 'Unhide'
Highlight any cell in column I and press the tab key

8. Your supervisor indicates you should have received an email, but you cannot find it in your Inbox. Which of the following is the first troubleshooting step that should be taken?

Check the Spam or Junk folder
Restart the computer
Contact Technical Support
Ask the supervisor to resend the email

9. You need to send an Excel file to Technical Support. From within the Compose Message window of a standard email program. Which button should you use?





10. In Internet Explorer, what does the above icon represent?

Broken image
Internet connection unavailable
Print Failed
Compatibility View

Answers: 1-A, 2-D, 3-C, 4-A, 5-D, 6-C, 7-C, 8-A, 9-B, 10-D

Sunday, November 30, 2014

How to upgrade phpMyAdmin in XAMPP to latest?

Most of the windows users choose XAMMP to install Apache distribution containing MySQL, PHP, phpMyAdmin, and Perl. But, if you try to update any one of the softwares, you may face difficulties. Either you must have to install the latest version of XAMPP (or) you must update the software and configure the web server manually. In such case, we may either loss the data (or) it may remain nonfunctional. So it is safe to take backup of whole files, before trying to install manually.

Thursday, May 8, 2014

Hydrophobicity Plot using BioPython

Hydrophobicity is the property of being water repellent, tending to repel and not absorb water. Calculation of hydrophobicity in proteins is important in identifying its various features. This can be membrane spanning regions, antigenic sites, exposed loops or buried residues. Usually, these calculations are shown as a plot along the protein sequence, making it easy to identify the location of potential protein features. The hydrophobicity is calculated by sliding a fixed size window (of an odd number) over the protein sequence. At the central position of the window, the average hydrophobicity of the entire windows is plotted.