Posts

Mapping the Disease Trends

Image
West Nile Virus (WNV) is the most widespread arbovirus (viruses that are transmitted by arthropods) in theworld. . During the period of 1996 -1999, the WNV became prevalent insouthern Romania, the Volga delta in southern Russia, and the northeastern United States. The spread of WNV covered the United States from coast to coast in four years, and by then it had 7 infected about one million Americans, killing about eight hundred. Here I mapped the spatial trends of WNV virus in the United States of America. Check website - http://globalmonitoring.sdstate.edu/eastweb/maps/wnv1999_2011/

Add and Remove DOM Elements..

Snippets for adding DOM elements dynamically to the defined DOM element. Here, "mydiv2" is added dynamically as "mydiv"1's child.     //Dynamically generate Div     var newdiv = document.createElement('div');     var divIdName ='mydiv2';     newdiv.setAttribute('id',divIdName);     newdiv.style.width = "565px";     newdiv.style.height = "480px";     newdiv.style.left = "0px";     newdiv.style.top = "0px";     newdiv.style.position = "absolute";    newdiv.style.border = "1px solid #000";     document.getElementById('mydiv1').appendChild(newdiv); A good example by Dustin Diaz to remove DOM elements Dynamically. removeElement JavaScript Function function removeElement(divNum) { var d = document.getElementById('myDiv'); var olddiv = document.getElementById(divNum); d.removeChild(olddiv); }

Detect Browser Type Using Javascript and Pass it into PHP variable

<html> <head> <script type="text/javascript" language="javascript"> function DetectBrowser(){ // Browser Detection Javascript // copyright 1 February 2003, by Stephen Chapman, Felgall Pty Ltd // You have permission to copy and use this javascript provided that // the content of the script is not changed in any way. var agt=navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1) return 'Opera'; if (agt.indexOf("staroffice") != -1) return 'Star Office'; if (agt.indexOf("webtv") != -1) return 'WebTV'; if (agt.indexOf("beonex") != -1) return 'Beonex'; if (agt.indexOf("chimera") != -1) return 'Chimera'; if (agt.indexOf("netpositive") != -1) return 'NetPositive'; if (agt.indexOf("chrome") != -1) return 'Chrome'; if (agt.indexOf("firefox") != -1) return 'Firefox'; if (agt.indexOf(...

A thought in the lazy day

Being a geographer, I am so thrilled in my life. I got opportunities to feel nature from the bottom of my heart. I am also an engineer. I found geography is more interesting than engineering; however I love math, statistics, and scientific computing. I never afraid from math meantime, implementing math in geography is very fascinating job for me. It’s a time to integrate technology with nature so don’t get late to be a geographer and experience ecstatic in your entire life.

How to get Color Brewer Ramp in ArcMap 10?

There are two ways to achieve this: Method A steps: 1. Download Color Brewer Color Ramp Style Set from http://arcscripts.esri.com/details.asp?dbid=14403 2. Unzip it. 3. Open the Layer properties and click on ‘Symbology’ tab in ‘ArcMap 10’. 4. Double click on one of the color symbol beneath ‘Symbol’ that gives you a ‘Symbol Selector’ window. 5. Click “Style References..” 6. Click “Add Style to List..” and add ‘ColorBrewer.style’ that is obtained from setp 2. 7. If you made it correctly it should be listed in the ‘Style References’. 8. Select ‘ColorBrewer.style’ and make it default. 9. Close the layer properties once and open it again, you will see newly generated color ramp. Method B steps: 1. You have to pick each color ramp value manually from http://colorbrewer2.org/ . 2. Open the Layer properties and click on ‘Symbology’ tab in ‘ArcMap 10’. 3. Double click on one of the color symbol beneath ‘Symbol’ that gives you a ‘Symbol Selector’ window. 4. Click...

Iframe busy inidcating spinning bar.

I got one solution on delving the internet <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title> Iframe Loading Notice - Demo</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> #holder, #holder iframe { position:relative; width:500px; height:400px } # loading { height:50px; width:125px; padding:1ex; position:absolute; top:50%; left:50%; margin-top:-25px; margin-left:-63px; display:none; border:2px groove gray; background-color:#cccccc; color:#333333; } </style> <script type="text/ javascript "> var loadit=function(){ var f=document.getElementById('myframe'), l=document.getElementById(' loading ').style; l.display='block'; if(f.onload==null){ f.onload=function(){l.display='none'}; if(window.atta...

Convert PHP array into Javascript array

I got a chance to write a script that converts php array into javascript  array. Here it is.. <?php   $phparray= array(1,2,3,4,5); ?> <script type="text/javascript" language="javascript">     var mydata = new Array (     <?php       for ($i = 0; ($i < count($phparray)); $i++) {         if ($i > 0) {           echo ",\n";         }         echo "    \"";         echo $phparray[$i];         echo "\"";       }           ?>     ); </script>