<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2142845370944726605</id><updated>2025-05-19T01:43:32.427-07:00</updated><category term="Javascript"/><category term="PHP"/><category term="Imported"/><category term="jquery"/><category term="Java"/><category term="Algorithm"/><category term="Amazon EC2"/><category term="Cloud Computing"/><category term="EUCALYPTUS"/><category term="IAAS"/><category term="IE8"/><category term="Mysql"/><category term="Open Source Software"/><category term="json"/><category term="3D Printer"/><category term="ASN.1"/><category term="Anet"/><category term="Anet A8"/><category term="Apache httpd"/><category term="BCD"/><category term="Base64"/><category term="C"/><category term="CSS"/><category term="Decoder"/><category term="EXCEL"/><category term="Encoder"/><category term="Formatter"/><category term="General"/><category term="Grid Computing"/><category term="Hackathon"/><category term="JSP"/><category term="Linux"/><category term="Maker"/><category term="Mysql optimization"/><category term="OpenLaszlo"/><category term="PLA Filament"/><category term="Perl"/><category term="Project Euler"/><category term="SQL"/><category term="SSH"/><category term="Solaris 10"/><category term="Symfony"/><category term="TADHack 2016"/><category term="TADHack Kuala Lumpur 2016"/><category term="Unix"/><category term="Web Design"/><category term="XML"/><category term="jquery plugin"/><title type='text'>COMCRAZY Development Center</title><subtitle type='html'>Technical Diary . Career . Hobby</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-8482902221166849296</id><published>2018-12-29T08:38:00.001-08:00</published><updated>2018-12-31T06:52:37.082-08:00</updated><title type='text'>The Journey of Anet A8 Part 2 - Upgrades &amp; Mods</title><content type='html'>Identify, study and solving the issues&amp;nbsp;always is an enjoyment for me. As in my first print of the 3DBenchy that shown in the previous post -&amp;nbsp;&lt;a href=&quot;https://comcrazy-devcenter.blogspot.com/2018/10/the-journey-of-anet-a8.html&quot; target=&quot;_blank&quot;&gt;The Journey of Anet A8 Part 1 - Setup &amp;amp; Stock Printing&lt;/a&gt;, I knew my printer is not optimized.&lt;br /&gt;
&lt;br /&gt;
This post records all my journey on the upgrades, mods, tuning I had done at my printer.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
General Reading&lt;/h2&gt;
&lt;div&gt;
Below are few links as my kickstart on 3D printing and Anet A8&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://all3dp.com/1/common-3d-printing-problems-troubleshooting-3d-printer-issues/#section-fdm-3d-printing-problems-my-print-looks-bad&quot; target=&quot;_blank&quot;&gt;2018 3D Printing Troubleshooting Guide: 41 Common Problems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://all3dp.com/1/anet-a8-upgrades-mods/&quot; target=&quot;_blank&quot;&gt;25 Must-Have Anet A8 Upgrades &amp;amp; Mods in 2018&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.zvoon.net/3d-printer/filaments-compatibles-anet-a8-imprimante-3d/&quot; target=&quot;_blank&quot;&gt;Anet A8 compatible filaments &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Slicing Software&lt;/h2&gt;
Initially, I use the slicing software bundle with Anet A8, Cura version 14.0.7. For basic printing, this software is okie. I downloaded the latest Cura at that point of time - Cura 3.5.0 and of course the Anet A8 profile share by the&amp;nbsp;netizen on the optimize configuration. In addition, create a new profile for PLA 1.75mm filament as Cura default is 3mm filament for PLA.&lt;br /&gt;
&lt;br /&gt;
However, I face a serious under extrusion on the printing. After having a few tries on tuning and diagnosing,&amp;nbsp; I revert to back Cura 14.0.7.&lt;br /&gt;
&lt;br /&gt;
Within one month, Cura release version 3.6.0, as my suspicion on the under extrusion issue is a software issue, I downloaded the latest version and try again. It works perfectly just by using its default printing profile. I am happy with this current version&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
A8 Profile&lt;/h3&gt;
Below are the profile I set for my stock Anet A8 printer&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_mkW4PcPSGuERINIf5bVRC6_xpLBub9K-VwwN62JNmXfe9QCUOgfYeNg294_FDeEFWEAMHhIyBLo8bivjfgVQSbj72-hgvTutl8SIBmuITR23MXlgq1rWDv376FSEA1sOx4Dz4FG_fQ/s1600/a8curasetting1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;507&quot; data-original-width=&quot;639&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_mkW4PcPSGuERINIf5bVRC6_xpLBub9K-VwwN62JNmXfe9QCUOgfYeNg294_FDeEFWEAMHhIyBLo8bivjfgVQSbj72-hgvTutl8SIBmuITR23MXlgq1rWDv376FSEA1sOx4Dz4FG_fQ/s320/a8curasetting1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyumAEhQUpZ1v3wlYI5kLsQvMcAaGWeMaa0M70CJ4hJ9koIrZo_Re-1yQC9YEEBkmvBfcPFyHmjA-znYeA0n9GeAZXx2mzTmvbZtULVSw-ocpQFsWTQ0RFeUiF_HlQ09DtXIwVJGAsOA/s1600/a8curasetting5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;511&quot; data-original-width=&quot;642&quot; height=&quot;254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyumAEhQUpZ1v3wlYI5kLsQvMcAaGWeMaa0M70CJ4hJ9koIrZo_Re-1yQC9YEEBkmvBfcPFyHmjA-znYeA0n9GeAZXx2mzTmvbZtULVSw-ocpQFsWTQ0RFeUiF_HlQ09DtXIwVJGAsOA/s320/a8curasetting5.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;
Start G-code&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;;Sliced at: {day} {date} {time}&lt;br /&gt;G21&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;metric values&lt;br /&gt;G90&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;absolute positioning&lt;br /&gt;M82&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;set extruder to absolute mode&lt;br /&gt;M107&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;;start with the fan off&lt;br /&gt;G28 X0 Y0&amp;nbsp; ;move X/Y to min endstops&lt;br /&gt;G28 Z0&amp;nbsp; &amp;nbsp; &amp;nbsp;;move Z to min endstops&lt;br /&gt;G29&lt;br /&gt;G0 X0 Y15 F9000 ; Go to front&lt;br /&gt;G0 Z0.15 ; Drop to bed&lt;br /&gt;G92 E0 ; zero the extruded length&lt;br /&gt;G1 X40 E25 F500 ; Extrude 25mm of filament in a 4cm line&lt;br /&gt;G92 E0 ; zero the extruded length&lt;br /&gt;G1 E-1 F500 ; Retract a little&lt;br /&gt;G1 X80 F4000 ; Quickly wipe away from the filament line&lt;br /&gt;G1 Z0.3 ; Raise and begin printing.&lt;/span&gt;&lt;/blockquote&gt;
&lt;h4&gt;
End G-Code&lt;/h4&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;&quot;&gt;;End GCode&lt;br /&gt;M104 S0 ;extruder heater off&lt;br /&gt;M140 S0 ;heated bed heater off (if you have it)&lt;br /&gt;G91 ;relative positioning&lt;br /&gt;G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure&lt;br /&gt;G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more&lt;br /&gt;G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way&lt;br /&gt;M84 ;steppers off&lt;br /&gt;G90 ;absolute positioning&lt;/span&gt;&lt;/blockquote&gt;
Above G-Code is provided by&amp;nbsp;&lt;a href=&quot;https://gist.github.com/ianchen06/af8cf8f4f06f3bf6edc7ba1dd08df627&quot; target=&quot;_blank&quot;&gt;ianchen06&lt;/a&gt;, the start g-code include purge and nozzle wipe, this is very helpful to ensure the nozzle is clean before start printing.&lt;br /&gt;
&lt;h3&gt;
PLA 1.75mm Filament Profile&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ9ARO5pgg5IEpY6AAjdPd1nygbrx6B4IEEArWX0bXXuhU3GKOmMJAwDPkJ8Lsm4SF6cv3khbtJ2IW8yIjoLcOYq1IW51HvIO982VHyjma2oQu70OT_nowhD415TNTENFeL3YeztVYbAg/s1600/a8curasetting3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;764&quot; data-original-width=&quot;797&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ9ARO5pgg5IEpY6AAjdPd1nygbrx6B4IEEArWX0bXXuhU3GKOmMJAwDPkJ8Lsm4SF6cv3khbtJ2IW8yIjoLcOYq1IW51HvIO982VHyjma2oQu70OT_nowhD415TNTENFeL3YeztVYbAg/s320/a8curasetting3.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKW7N2qzRC8STP_Hpu-FsjkSELc0tw4Q3ha1ObFa6BsCe6SdFCYKpSJYNMZlJWgziI0qdeOIX9iH7-lhCBFTC1-o-WtpEh9EUrNqwnbj0fvh17hf1znP-VDBa5G6WyfO-vyES5cAQ5xSY/s1600/a8curasetting4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;772&quot; data-original-width=&quot;804&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKW7N2qzRC8STP_Hpu-FsjkSELc0tw4Q3ha1ObFa6BsCe6SdFCYKpSJYNMZlJWgziI0qdeOIX9iH7-lhCBFTC1-o-WtpEh9EUrNqwnbj0fvh17hf1znP-VDBa5G6WyfO-vyES5cAQ5xSY/s320/a8curasetting4.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Hardware Upgrades &amp;amp; Modes&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuUxFipKcy_c2WgsR0C7NrDTWy0hALQA9cKfLclKhI2rmZkIWLiFVveLyBmf9mjNoc37ayoMqwhfrJhELhuduaOPKKfqrb6q2Yd9T4ilU_R07T-GjXGOL9Dd3y4yCiV5pnaWuC_bCGCqc/s1600/20181225_224132.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuUxFipKcy_c2WgsR0C7NrDTWy0hALQA9cKfLclKhI2rmZkIWLiFVveLyBmf9mjNoc37ayoMqwhfrJhELhuduaOPKKfqrb6q2Yd9T4ilU_R07T-GjXGOL9Dd3y4yCiV5pnaWuC_bCGCqc/s640/20181225_224132.jpg&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Glass bed&lt;/li&gt;
&lt;li&gt;Auto Bed Leveling Sensor - 3D Touch&lt;/li&gt;
&lt;li&gt;Fan Duct&lt;/li&gt;
&lt;li&gt;Extruder Button&lt;/li&gt;
&lt;li&gt;Mosfet&lt;/li&gt;
&lt;li&gt;Power Supply&lt;/li&gt;
&lt;li&gt;T corner &amp;amp;&amp;nbsp;Anti Z Wobble&lt;/li&gt;
&lt;li&gt;Filament Guide&lt;/li&gt;
&lt;li&gt;Spool Holder&lt;/li&gt;
&lt;li&gt;Darth Vader Pop Figure&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTtzZRG-viJH9mzdNBbmvIboNXXP6aPf2hWih2GggnOIa3w3P9UuXYwPZAXeBh0hff3gWlEbG9J7TgpsD755qcQhDJfz9qkFQVgRKZjbW-Qe0yj3yvDGJlpa_UoYHd57xQ6nB3pBqjhRY/s1600/20181225_224310.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTtzZRG-viJH9mzdNBbmvIboNXXP6aPf2hWih2GggnOIa3w3P9UuXYwPZAXeBh0hff3gWlEbG9J7TgpsD755qcQhDJfz9qkFQVgRKZjbW-Qe0yj3yvDGJlpa_UoYHd57xQ6nB3pBqjhRY/s200/20181225_224310.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
1. Glass bed&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Glass bed is a very useful upgrade, easy to clean, easy to stick and is cheap. Refer to my previous post for detail&lt;/span&gt;&amp;nbsp;(&lt;a href=&quot;https://comcrazy-devcenter.blogspot.com/2018/10/the-journey-of-anet-a8.html&quot; style=&quot;font-weight: 400;&quot; target=&quot;_blank&quot;&gt;The Journey of Anet A8 Part 1 - Setup &amp;amp; Stock Printing&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;2. Auto Bed Leveling Sensor - 3D Touch&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Manual bed levelling always is a pain as you will need to repeat this after a few prints especially fail print that affects&amp;nbsp;the bed and Z axis.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So my first investment is auto bed levelling sensor, I choose a clone version of BLTouch from China for testing purposes - &lt;a href=&quot;https://www.lazada.com.my/-i347116428-s487759859.html?urlFlag=true&amp;amp;mp=1&quot; target=&quot;_blank&quot;&gt;3DTouch&lt;/a&gt;&amp;nbsp;that cost me MYR50.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;font-size: small; font-weight: 400;&quot;&gt;Installation of the BLTouch&amp;nbsp;/ 3DTouch is not so straightforward but is worth it. You will need some electronic and soldering knowledge. I will advise you finish below two videos before you decide to go for this upgrade. Good Luck!&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;
Installation&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;This&amp;nbsp;video is a good reference for installation of BLTouch for Anet A8. For bracket, I use &lt;a href=&quot;https://www.thingiverse.com/thing:1846913&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; design.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/6aofhlAooUE/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/6aofhlAooUE?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
Firmware&amp;nbsp;Upgrade&lt;/h4&gt;
&lt;div&gt;
This video is a good reference for firmware configuration, compilation and installation.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/WWDkZtWwd6I/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/WWDkZtWwd6I?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;h4&gt;
Calibrating Z-Offset With An Auto Bed Levelling Probe&lt;/h4&gt;
&lt;div&gt;
Yup, this upgrade is no magic, you still need to do the calibration&amp;nbsp;of Z-Offset. This video is a good reference as the starting point&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/y_1Kg45APko/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/y_1Kg45APko?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
3. Fan Duct&lt;/h3&gt;
&lt;div&gt;
The stock fan duct is not efficient, it didn&#39;t manage to cool down the filament fast enough. After few tries, this fan duct work well for me -&amp;nbsp;&lt;a href=&quot;https://www.thingiverse.com/thing:2133328&quot; target=&quot;_blank&quot;&gt;&quot;Spriya&quot; - High Efficiency Anet A8 Fan &lt;/a&gt;&lt;a href=&quot;https://www.thingiverse.com/thing:2133328&quot; target=&quot;_blank&quot;&gt;Duct&lt;/a&gt; . Just remember to tune your heater using PID Auto Tune&amp;nbsp;after installing the fan duct.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrACsZmgQePLpOxbCGeFnzxUSlXJC2JaIn9b1b600tKgNIYfbsUW_XSPWUxrW7V8_Zid_60yvD4ts8WZhopsYc6SL4c8l8qKbFDugjLegRPKD-Ot5CJbGVzAKeZOffi9OLvjNzHbzy40Y/s1600/20181130_225038.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrACsZmgQePLpOxbCGeFnzxUSlXJC2JaIn9b1b600tKgNIYfbsUW_XSPWUxrW7V8_Zid_60yvD4ts8WZhopsYc6SL4c8l8qKbFDugjLegRPKD-Ot5CJbGVzAKeZOffi9OLvjNzHbzy40Y/s320/20181130_225038.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFF-bifTo6_a7tDKGS9P61-dySruSWGzFZTyIUQbAtMLElVashGHEA1UEglzbGJT7X1tUI6m-Btt3-rAFCAi9gj0FOHLZWuubfbyfAEER0coJ_ORDkKCkkBqFIeFAYW3Tsn0YkvDl6Ksk/s1600/20181202_223047.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFF-bifTo6_a7tDKGS9P61-dySruSWGzFZTyIUQbAtMLElVashGHEA1UEglzbGJT7X1tUI6m-Btt3-rAFCAi9gj0FOHLZWuubfbyfAEER0coJ_ORDkKCkkBqFIeFAYW3Tsn0YkvDl6Ksk/s320/20181202_223047.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMC2TMAfjE94tMuGIuPgCJ2oM5xU9u6y-ck4mr5wcLs-cJVt4wVFDXC55L6Xy_uH9a3Pm8r-sy5BSH6iRYoTpVPxYhkoxXwjIdbgYgypSlzL7nCGB5Hlf5f1Ua_noZtpfZCdOOY3wZ8p4/s1600/20181225_224431.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMC2TMAfjE94tMuGIuPgCJ2oM5xU9u6y-ck4mr5wcLs-cJVt4wVFDXC55L6Xy_uH9a3Pm8r-sy5BSH6iRYoTpVPxYhkoxXwjIdbgYgypSlzL7nCGB5Hlf5f1Ua_noZtpfZCdOOY3wZ8p4/s200/20181225_224431.jpg&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;4. Extruder Button&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
A must have and is good for the test print. I use &lt;a href=&quot;https://www.thingiverse.com/thing:1935151&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;&amp;nbsp;design.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
5. Mosfet&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
For your safety, I only upgrade the heated bed. Get it from &lt;a href=&quot;https://www.lazada.com.my/-i318661759-s436955344.html?urlFlag=true&amp;amp;mp=1&quot; target=&quot;_blank&quot;&gt;Lazada&lt;/a&gt;&amp;nbsp;and cost me MYR10. The bracket I use &lt;a href=&quot;https://www.thingiverse.com/thing:2018906&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; design.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
6. Power Supply&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyJ4alnB4og-065c5zywSw6nFXHt1ZqVvsasogVctqDff3FfId8DHZe4zGRlFmbAR123TcvTgQoVLUYeIN4nqnhqJtIRFuL5APOo6Kcd5XXUzuh769g4lhv2JHyO7m3Fp8MgI6DN0Rzo/s1600/20181225_224224.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyJ4alnB4og-065c5zywSw6nFXHt1ZqVvsasogVctqDff3FfId8DHZe4zGRlFmbAR123TcvTgQoVLUYeIN4nqnhqJtIRFuL5APOo6Kcd5XXUzuh769g4lhv2JHyO7m3Fp8MgI6DN0Rzo/s200/20181225_224224.jpg&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
A should have upgrade. I burst the stock power supply (refer to my previous post). So I get a 300W power supply with a fan. A little bit noisy as there is a fan but for safety, I can take it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
7. T corner &amp;amp;&amp;nbsp;Anti Z Wobble&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghgqOUccqVlk8UULm80MBQn6Rv-LfdRagN3yQswdmwpdp8dkP13KI74F2qJb0VwgluFfHCGWrkJ9zpu8cgQWknVckAMooP3vp3zO_uoGqkcI1xChjwFxB_l2-E2XsQbvkMiLqaEMrs9rw/s1600/20181225_224207.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghgqOUccqVlk8UULm80MBQn6Rv-LfdRagN3yQswdmwpdp8dkP13KI74F2qJb0VwgluFfHCGWrkJ9zpu8cgQWknVckAMooP3vp3zO_uoGqkcI1xChjwFxB_l2-E2XsQbvkMiLqaEMrs9rw/s200/20181225_224207.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;Lot&#39;s of forum and comment recommended these two upgrades, as I don&#39;t have any jerking issue, I made this set of upgrade the last. Why I still go for this set of the upgrade? As screw and nut will lose on mechanical activity, putting this on will definitely reduce the jerking and give better stability.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
9. Filament Guide&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
More organize, specially with spool holder. I enhance the filament guide from &lt;a href=&quot;https://www.thingiverse.com/thing:1915337&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; design in order to work well with the spool holder.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQeGsRLPQcVSzqgrxaw7Smrr-7N7eITMVsHEJLYjxDWhB_P0Bb0YiF_sa2LV_7ijF3xa8hOlKQl5PfQlOhjhD5rG55qBDmmQHsQ2-gjOu13iPGj5006n1Ox0JHD6QC9cf8w_ohUI7w_6I/s1600/20181225_224148.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQeGsRLPQcVSzqgrxaw7Smrr-7N7eITMVsHEJLYjxDWhB_P0Bb0YiF_sa2LV_7ijF3xa8hOlKQl5PfQlOhjhD5rG55qBDmmQHsQ2-gjOu13iPGj5006n1Ox0JHD6QC9cf8w_ohUI7w_6I/s200/20181225_224148.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;9. Spool Holder&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
Save some space, more organized, smooth filament delivery. Is a must-have upgrade in my opinion. I am using &lt;a href=&quot;https://www.thingiverse.com/thing:1624641&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; design. This upgrade uses lots of filament and I managed to print it with stock A8.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
10. Darth Vader Pop Figure&lt;/h3&gt;
&lt;/div&gt;
Last, a Darth Vader pop figure. What the purpose?? Decoration and a detector for jerking of my printer!!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Some of my print&lt;/h2&gt;
As shown below, I had printed a sword for my boy, the Elucidator from Sword Art Online (&lt;a href=&quot;https://www.thingiverse.com/thing:1238148/collections&quot; target=&quot;_blank&quot;&gt;Thingiverse&lt;/a&gt;). There are a lot of defects like precision, print edges are bending (Warping), and others as this is printed with stock printer without any upgrade except the power supply and glass bed.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsZ8nRCWeXSVkLMi73RBVt_LdVqNdk1OpH1UluJQiqEzrRXRxeSOH2I4QZ76CpHjAs7MZRbkrfqTjgwai1hePOmhCdupHdKqj32WyKPAYKxB9jP2GXssQTZfSqT-wAbmNB-lMiU12dsE/s1600/20181115_231400.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsZ8nRCWeXSVkLMi73RBVt_LdVqNdk1OpH1UluJQiqEzrRXRxeSOH2I4QZ76CpHjAs7MZRbkrfqTjgwai1hePOmhCdupHdKqj32WyKPAYKxB9jP2GXssQTZfSqT-wAbmNB-lMiU12dsE/s640/20181115_231400.jpg&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
My first consider successful 3DBenchy&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0X7nw-sJpMILQWP-xzD16OSPj4SioG3ogb0FZ0oQWY8c4_h4gvR1PI0PshtoruwtdpdKV7Oi4PAFZl7S8cuoa1cZ7X4EJ_GFtIhDoW5eD3JOcgrZ2w7vU3rm_bt2wr4K9PpsPhTBnvVk/s1600/20181202_223047.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0X7nw-sJpMILQWP-xzD16OSPj4SioG3ogb0FZ0oQWY8c4_h4gvR1PI0PshtoruwtdpdKV7Oi4PAFZl7S8cuoa1cZ7X4EJ_GFtIhDoW5eD3JOcgrZ2w7vU3rm_bt2wr4K9PpsPhTBnvVk/s320/20181202_223047.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The Hulk - first print with the support structure.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYasoeKZPc7p5gAGjKlbULJxdbmXc4TENBJfIh43VxUxB51v7mgldsiyuF0igBc9FSE3ajGFkHx4idTSNuB4Wek-RHfdyBjahRW340GxZnGJ5pRog2I49km4Y9BugX4jh_RJRVUdt39ss/s1600/20181204_215747.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYasoeKZPc7p5gAGjKlbULJxdbmXc4TENBJfIh43VxUxB51v7mgldsiyuF0igBc9FSE3ajGFkHx4idTSNuB4Wek-RHfdyBjahRW340GxZnGJ5pRog2I49km4Y9BugX4jh_RJRVUdt39ss/s320/20181204_215747.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Baby Groot - Wood PLA filament&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitvnzcpAvZzPYgOgv1MMVlTrcd8R8q67JmJTPmnTzm_ROmc_3KfAgI8PYvsxTG3oAgljx4sJPXMF1bDvRtxPn6pzErH49IaG4spywXZommlomC7AQ4g3eHS9ZqkwsjKKRqjoPdgHYKvvg/s1600/20181231_224921.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;876&quot; data-original-width=&quot;657&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitvnzcpAvZzPYgOgv1MMVlTrcd8R8q67JmJTPmnTzm_ROmc_3KfAgI8PYvsxTG3oAgljx4sJPXMF1bDvRtxPn6pzErH49IaG4spywXZommlomC7AQ4g3eHS9ZqkwsjKKRqjoPdgHYKvvg/s320/20181231_224921.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/8482902221166849296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/12/the-journey-of-anet-a8-part-2-upgrades.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8482902221166849296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8482902221166849296'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/12/the-journey-of-anet-a8-part-2-upgrades.html' title='The Journey of Anet A8 Part 2 - Upgrades &amp; Mods'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_mkW4PcPSGuERINIf5bVRC6_xpLBub9K-VwwN62JNmXfe9QCUOgfYeNg294_FDeEFWEAMHhIyBLo8bivjfgVQSbj72-hgvTutl8SIBmuITR23MXlgq1rWDv376FSEA1sOx4Dz4FG_fQ/s72-c/a8curasetting1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-1035479943010480255</id><published>2018-10-28T17:33:00.000-07:00</published><updated>2018-12-29T06:06:49.640-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="3D Printer"/><category scheme="http://www.blogger.com/atom/ns#" term="Anet"/><category scheme="http://www.blogger.com/atom/ns#" term="Anet A8"/><category scheme="http://www.blogger.com/atom/ns#" term="Maker"/><category scheme="http://www.blogger.com/atom/ns#" term="PLA Filament"/><title type='text'>The Journey of Anet A8 Part 1 - Setup &amp; Stock Printing</title><content type='html'>After 1 years of dragging, finally i brought a 3D printer. As the engineer, maker and beginner, I had chose a DIY and cheapest 3D printer I can get in market - Anet A8 which cost me USD 145/= together with 1 Kg of white PLA filament.&lt;br /&gt;
&lt;br /&gt;
This post will record first month of my&amp;nbsp;experience with Anet A8 start with setting up hardware to printing experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Un-boxing and Verify Received Goods&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz0qATJIhislw3ZGfQDhHe8z8HLrfrTjnEing907tb2-hYwcFimYE3yeZLwhGO8lzDvDzcdXuriGq4b5HH6Oa1BpTXXF6SiiduoAjq_PgC99Z-ktW_ZAJYzUchOwmmhtlbP_zEGx_5Lpo/s1600/IMG_20181008_220024.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz0qATJIhislw3ZGfQDhHe8z8HLrfrTjnEing907tb2-hYwcFimYE3yeZLwhGO8lzDvDzcdXuriGq4b5HH6Oa1BpTXXF6SiiduoAjq_PgC99Z-ktW_ZAJYzUchOwmmhtlbP_zEGx_5Lpo/s320/IMG_20181008_220024.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;I brought this 3D printer from China seller via Lazada. Package arrived in good condition. In the box, there is a microSD card and USB card reader.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
English version of installation manual provided in the SD card. Cross check and all parts is included.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The pain part, all acrylic board is protected by sticker on both side, removing them is tedious and time consuming job. If you just done your manicure, get someone to do it for you.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Setting Up the 3D Printer&lt;/h2&gt;
&lt;div&gt;
Basically the manual is pretty clear and easy to follow and they do included a YouTube link (which i refer when i am stuck).&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Following is the progress of my installation.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKpQb7Whj-0CH7Uy7MOa7DRupSZz7oLYPyWd7RRoxsyRbhZhJe0KTlihZeaaaDk1ln71K1080_gsWB239qAN7h9h0vSBYcCXeyWj6EC2-qXE3aHo7gDt9B591YBYHGSn5FoJFViMFsYOs/s1600/IMG_20181008_233342.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKpQb7Whj-0CH7Uy7MOa7DRupSZz7oLYPyWd7RRoxsyRbhZhJe0KTlihZeaaaDk1ln71K1080_gsWB239qAN7h9h0vSBYcCXeyWj6EC2-qXE3aHo7gDt9B591YBYHGSn5FoJFViMFsYOs/s320/IMG_20181008_233342.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIgDI9iKcCROMDPmSPR3yo9SgbliV16c4z1lKKlewK-YXILJT0iiwKyJYnR3B7rgqcafel_fBTh2xPbp0A6EmNUQwEpnNbHL0LUa8HvNcMGdMWd8q_Jjqr3Ju01AYeAqO4osvRx1tSjM/s1600/IMG_20181009_214303.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIgDI9iKcCROMDPmSPR3yo9SgbliV16c4z1lKKlewK-YXILJT0iiwKyJYnR3B7rgqcafel_fBTh2xPbp0A6EmNUQwEpnNbHL0LUa8HvNcMGdMWd8q_Jjqr3Ju01AYeAqO4osvRx1tSjM/s320/IMG_20181009_214303.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGuPYUT3wIjSvJBfzaU-ckE47wU9hvSqziCIoOf4RANpA6XgUerDZhwYMqxmPNPW8CPp4KszVnxA1062o0vW4cKU1waB6ABc6Nz8zZSHXHqsEHrJN_2mk1kYPr7vMH4wvLWDHbX7Cg9y8/s1600/IMG_20181010_225023.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGuPYUT3wIjSvJBfzaU-ckE47wU9hvSqziCIoOf4RANpA6XgUerDZhwYMqxmPNPW8CPp4KszVnxA1062o0vW4cKU1waB6ABc6Nz8zZSHXHqsEHrJN_2mk1kYPr7vMH4wvLWDHbX7Cg9y8/s320/IMG_20181010_225023.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivIGnTljuUu_TLpVazSw_pRU4MAj_oc0G3NX0o-_WHHeWKFe8gifeUPRvYnCpFsbzjqaxfDgfpjY6vituilBzez-yr96-WzDuzMilOapp2opNBEYnJX01-o38OqMi3kGxPAyXYa-qojRg/s1600/IMG_20181011_010407.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivIGnTljuUu_TLpVazSw_pRU4MAj_oc0G3NX0o-_WHHeWKFe8gifeUPRvYnCpFsbzjqaxfDgfpjY6vituilBzez-yr96-WzDuzMilOapp2opNBEYnJX01-o38OqMi3kGxPAyXYa-qojRg/s320/IMG_20181011_010407.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
However, there are few points I will share here which for me is not clear or the silly mistake I made when setting up the 3D printer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Motors Position&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;For Y-Motor, the connector should face frontward, not downward or upward. (pg.12 Assembly Step 3)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYqBa81bfDOZerLeyHGOZehyMxm9EqwFFfSkIyPDJoyVedZDoR_Y-0zz3Ku6kEmUeyAS8g-hq1AAZUOeL_9S7fzK8SK_sCPqvs_W9KYJZYl9MozF39TN3JhhE1_hLp_tGXq7uD6QXb2r0/s1600/ymotor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;583&quot; data-original-width=&quot;230&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYqBa81bfDOZerLeyHGOZehyMxm9EqwFFfSkIyPDJoyVedZDoR_Y-0zz3Ku6kEmUeyAS8g-hq1AAZUOeL_9S7fzK8SK_sCPqvs_W9KYJZYl9MozF39TN3JhhE1_hLp_tGXq7uD6QXb2r0/s320/ymotor.png&quot; width=&quot;126&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For both Z-Motors, the connectors should face backward, as you can see mine is facing front. (pg 21 Assembly Step 12&amp;nbsp;)&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h3&gt;
Y Axis Belt&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The belt should tighten in the between of two belt fixation clamp, not next to the metal plate. (pg 19&amp;nbsp;Assembly Step 10)&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmfyDB3KIViLjk1CqLhymVujm7ic44w8KeXJBqPBbrobObZ7zmSUp8KQQ_p7o2WFmIgwRZOAFdqhLDbBy53juFOBB9HDCI0DFgqorLYLUsPu_LWcnSnKURMav3Vba0kZSYMrjJYVlHdOA/s1600/yaxisbelt.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;309&quot; data-original-width=&quot;530&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmfyDB3KIViLjk1CqLhymVujm7ic44w8KeXJBqPBbrobObZ7zmSUp8KQQ_p7o2WFmIgwRZOAFdqhLDbBy53juFOBB9HDCI0DFgqorLYLUsPu_LWcnSnKURMav3Vba0kZSYMrjJYVlHdOA/s320/yaxisbelt.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&amp;nbsp;Alignment of T Lead Screw,&amp;nbsp; Elastic Coupling and Z Motor&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;This is most unclear part for me, check this link to get the idea.&amp;nbsp;&lt;a href=&quot;https://3dprint.wiki/reprap/anet/a8/coupler&quot;&gt;https://3dprint.wiki/reprap/anet/a8/coupler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;After try and error, end up the two elastic couplings level alignment must be same.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxsQZLE2i4Ct1LKZyYxg5Mo2-lU6JblmQm272C4J5OQuiR4ka0xfdCvpaZRToFYIE4aBnnuj4aSUZqvWTJrWac4UUhgGBVYSJCr1MgQfVIGCN9g_wTHGbtP-F0rMPWigGOLDAfd1phPV8/s1600/xaxislevel.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;176&quot; data-original-width=&quot;489&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxsQZLE2i4Ct1LKZyYxg5Mo2-lU6JblmQm272C4J5OQuiR4ka0xfdCvpaZRToFYIE4aBnnuj4aSUZqvWTJrWac4UUhgGBVYSJCr1MgQfVIGCN9g_wTHGbtP-F0rMPWigGOLDAfd1phPV8/s320/xaxislevel.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Power Supply&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The power supplied is not auto detect the voltage, you have to choose 110v or 240v by adjusting a switch.&lt;/li&gt;
&lt;li&gt;As the printer is from China, the switch is set to 110v by default and I didn&#39;t release it. Bet you know what happen next, sparks and burn, say bye bye to the power supply.&lt;/li&gt;
&lt;li&gt;I get a new one with max load as 300w, the most important feature for the new power supply is it got a fan attached to it. This is very important if you get a new power supply, as there are many case power supply overheated and cause fire.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
Calibration&lt;/h2&gt;
&lt;div&gt;
Once my Anet A8 power up successfully, next will be calibration. Specially the Z axis calibration.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Warped Heat bed&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;While calibrating my Anet A8, I found out that the heatbed is not flat (warped) with curve downward 2mm in the middle.&lt;/li&gt;
&lt;li&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/XT2VL3OS1Tk/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/XT2VL3OS1Tk?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/li&gt;
&lt;li&gt;While waiting feedback from the seller, I just get a 2mm glass panel with size 220mm x 220mm x 2mm as suggested from forum which cost me less than USD2.50&lt;/li&gt;
&lt;li&gt;However, 220mm x 200mm&amp;nbsp; will block the heatbed screw, this will made calibrating a challenging job. I will suggest 200mm x 200mm or shown below but need custom glass cutting service and cost more.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVAMNIN3Zj-YX2s7-3t44PjCrEUnankbRA-NECL8mSPDjmYbJO__G0Q3WDcf4298lOOfsczP3KS-d_xQnAtn1L6mI8rFyhWC3UPrt8UQkAGalmVPFi4-02nIZ8NMs-x-vEbmD_FYCNSg/s1600/customglassbed.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;695&quot; data-original-width=&quot;668&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVAMNIN3Zj-YX2s7-3t44PjCrEUnankbRA-NECL8mSPDjmYbJO__G0Q3WDcf4298lOOfsczP3KS-d_xQnAtn1L6mI8rFyhWC3UPrt8UQkAGalmVPFi4-02nIZ8NMs-x-vEbmD_FYCNSg/s320/customglassbed.PNG&quot; width=&quot;307&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;How to make the glass stick on the heat bed? The easiest and cheapest solution and widely share in forum, get four wooden cloth pegs and get the spring in the middle then use your imagination.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdc2VrxQlDsjZL8vJ6QZLoQYx1GECoGVA6ZwVI4QOYN88rZYCakJrPfRo-JZkWMp57nV7PdNqqRTIlhwIZNvEzUwNiGaUl9PhDYph1B3_v6MwyYO8tGruTS9pGtHKOYcT4conVhzMYiHo/s1600/wood-everbilt-clotheslines-14149-64_1000.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1000&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdc2VrxQlDsjZL8vJ6QZLoQYx1GECoGVA6ZwVI4QOYN88rZYCakJrPfRo-JZkWMp57nV7PdNqqRTIlhwIZNvEzUwNiGaUl9PhDYph1B3_v6MwyYO8tGruTS9pGtHKOYcT4conVhzMYiHo/s200/wood-everbilt-clotheslines-14149-64_1000.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNEz9iZrjJVAvYP_wK2CXKkhReBoPI2j8alNKi2Wy_ZJMHERcE2Khs2jY4lZ9QdQ59k_VhItWLThkx_nT2oJ_CwN6O63c3AIQs003pPqtJO74NIahhqLGEeDRPCYMf8t-eDV5yNWKAPag/s1600/nVumb.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;300&quot; data-original-width=&quot;400&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNEz9iZrjJVAvYP_wK2CXKkhReBoPI2j8alNKi2Wy_ZJMHERcE2Khs2jY4lZ9QdQ59k_VhItWLThkx_nT2oJ_CwN6O63c3AIQs003pPqtJO74NIahhqLGEeDRPCYMf8t-eDV5yNWKAPag/s200/nVumb.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
Calibrating Z Axis&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;I know, using A4 paper to ensure 0.2mm space between heat bed and nozzle. But calibrating process is tedious and keep repeating.&lt;/li&gt;
&lt;li&gt;What I did is first ensure left side is calibrated using the A4 paper method. Then for the rest of the side, I just use&amp;nbsp;level ruler to made sure four side is at same level.&lt;/li&gt;
&lt;li&gt;Then use A4 paper to verified as the final steps. I found this way is faster and more precise.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirkTOtuqzDn88DoSjiWOPIJx4NglZ-HTjS4vMOnlBSPktVF9JRHxm7L1YpnZmHal9S9XRDojX-6AJSZds3mkaOFLDIneH6z38qQ2luEmtF0Uu6204QN4NqgPznkKwqgj5TRsGD1hiGR0g/s1600/leveller.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;191&quot; data-original-width=&quot;279&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirkTOtuqzDn88DoSjiWOPIJx4NglZ-HTjS4vMOnlBSPktVF9JRHxm7L1YpnZmHal9S9XRDojX-6AJSZds3mkaOFLDIneH6z38qQ2luEmtF0Uu6204QN4NqgPznkKwqgj5TRsGD1hiGR0g/s1600/leveller.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
3D Printer Profile&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;I used Cura software and 3D printer profile provided in the SD Card with slight modification as shown below&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Printing Temperature: 190 Celsius&lt;/li&gt;
&lt;li&gt;Bed Temperature: 75 Celsius&lt;/li&gt;
&lt;li&gt;Initial layer thickness (mm): 0&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;I found above configuration help the prints have better stickiness to the glass bed and have quality print. However, I believe the temperature is depend on environment too (I am in tropical country with average temperature of 30 Celsius), so test it yourself.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
Printing&lt;/h2&gt;
&lt;/div&gt;
&lt;h3&gt;
Adhesive, Adhesive &amp;amp; Adhesive - Why not sticking&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The prints always cannot stick on the heat bed or glass bed till end of the print. Specially the heat bed touching area is small.&lt;/li&gt;
&lt;li&gt;There are lots of suggestion using difference type of glue to help on this. My personal preference is using carpenter glue (white color glue).&lt;/li&gt;
&lt;li&gt;Before printing start, I will spread a thin layer of glue on the glass heat bed.&lt;/li&gt;
&lt;li&gt;Then in the middle of printing, pause the printing,&amp;nbsp; then I will use&amp;nbsp;syringe to put more glue around the prints and let it dry.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;As the carpenter glue is water soluble, you can wash the print with water to clean the dried glue.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7sinpck-W57HGcXGO9NL9QLh9_zYnWU8DXiCnQ8xplCyjWppR-qyac70_hX_Xq7wW6eRGiqe-QKSh6Q_ocTIiijm-R0wP1iXmb2cw1a2ezAhZy4tFO61yIxwVxPS0N7nm5zk1IAtePWc/s1600/20181028_235647.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7sinpck-W57HGcXGO9NL9QLh9_zYnWU8DXiCnQ8xplCyjWppR-qyac70_hX_Xq7wW6eRGiqe-QKSh6Q_ocTIiijm-R0wP1iXmb2cw1a2ezAhZy4tFO61yIxwVxPS0N7nm5zk1IAtePWc/s320/20181028_235647.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
Sample Prints&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Following is the some 3D print I made so far, is not perfect and I am still learning how to made it right&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5UI7CJDf64C4ifrm-p_AOVYvbTbW-LnvOpHav83UmkCiC-18IPO153n8YzKGCOFrlgANdmtSmQf3Yeu2vGqDWy252T8TibJSUeGgTpQZa8YOQlKgoMOpwhI-pYKldl2t56h-BkcVQa6Y/s1600/IMG_20181020_135221.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5UI7CJDf64C4ifrm-p_AOVYvbTbW-LnvOpHav83UmkCiC-18IPO153n8YzKGCOFrlgANdmtSmQf3Yeu2vGqDWy252T8TibJSUeGgTpQZa8YOQlKgoMOpwhI-pYKldl2t56h-BkcVQa6Y/s320/IMG_20181020_135221.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv2Y21Pz1qtR2xTn7AJ9cGi1tWeTSkfI37yoV9KU-sH__yEG4Bu53t8YwM51RSECPWsqNK3I4Qtv1XIJALEUflgYqRypTYND55P3lELHkUOa8zlhw2jCtujvpGpN0xEQYaqOlGym0Mp3A/s1600/IMG_20181023_224230.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv2Y21Pz1qtR2xTn7AJ9cGi1tWeTSkfI37yoV9KU-sH__yEG4Bu53t8YwM51RSECPWsqNK3I4Qtv1XIJALEUflgYqRypTYND55P3lELHkUOa8zlhw2jCtujvpGpN0xEQYaqOlGym0Mp3A/s320/IMG_20181023_224230.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Guide &amp;amp; Upgrades&lt;/h2&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;There are plenty of site sharing the must have upgrade for Anet A8, below are some reference&amp;nbsp;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://all3dp.com/1/anet-a8-upgrades-mods/&quot;&gt;https://all3dp.com/1/anet-a8-upgrades-mods/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.instructables.com/id/Beginners-Guide-to-3D-Printing-Anet-A8-DIY-3D-Prin/&quot;&gt;https://www.instructables.com/id/Beginners-Guide-to-3D-Printing-Anet-A8-DIY-3D-Prin/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;h2&gt;
Summary&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
I had spent 2 weeks in order to complete the setup and calibrating but is worth it. Anet A8 is a good choice by compare the quality and the price. All you need is patient and time.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/1035479943010480255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/10/the-journey-of-anet-a8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1035479943010480255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1035479943010480255'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/10/the-journey-of-anet-a8.html' title='The Journey of Anet A8 Part 1 - Setup &amp; Stock Printing'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz0qATJIhislw3ZGfQDhHe8z8HLrfrTjnEing907tb2-hYwcFimYE3yeZLwhGO8lzDvDzcdXuriGq4b5HH6Oa1BpTXXF6SiiduoAjq_PgC99Z-ktW_ZAJYzUchOwmmhtlbP_zEGx_5Lpo/s72-c/IMG_20181008_220024.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-8915087986010796283</id><published>2018-04-12T07:33:00.006-07:00</published><updated>2018-04-12T07:33:56.726-07:00</updated><title type='text'>mBlock 3 Arduino Extension for 2-Wheel Robot Car</title><content type='html'>This project is for 9 year old students to able to program this robot car. It uses mBlock (Scratch-based) with drag-and-drop programming.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://hackster.imgix.net/uploads/attachments/465325/xccar_profile_wvmy5URNaS.PNG?auto=compress%2Cformat&amp;amp;w=900&amp;amp;h=675&amp;amp;fit=min&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;391&quot; data-original-width=&quot;521&quot; height=&quot;240&quot; src=&quot;https://hackster.imgix.net/uploads/attachments/465325/xccar_profile_wvmy5URNaS.PNG?auto=compress%2Cformat&amp;amp;w=900&amp;amp;h=675&amp;amp;fit=min&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
We are introducing robotics and programming to 9 year old primary students with extreme budget constraint. With some research, we managed to come up with this solution. I will hereby share the material and idea behind this project.&lt;br /&gt;
&lt;br /&gt;
mBlock 3 is built based on Scratch 2.0. Scratch is a programming tools for kids; it allows kids to program code by dragging and dropping the &quot;blocks&quot;. mBlock enhances Scratch to allow it to talk to Arduino.&lt;br /&gt;
&lt;br /&gt;
What I had done was build an extension for mBlock 3 with predefined parameters to allow the kids to instruct the robot car to move or play music.&lt;br /&gt;
&lt;br /&gt;
Detailed instruction is included, click&amp;nbsp;&lt;a href=&quot;https://www.hackster.io/comcrazy/mblock-3-arduino-extension-for-2-wheel-robot-car-1c5d11&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;for detail.</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/8915087986010796283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/04/mblock-3-arduino-extension-for-2-wheel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8915087986010796283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8915087986010796283'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/04/mblock-3-arduino-extension-for-2-wheel.html' title='mBlock 3 Arduino Extension for 2-Wheel Robot Car'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-6059362080201460684</id><published>2018-04-12T07:30:00.003-07:00</published><updated>2025-04-02T02:09:48.867-07:00</updated><title type='text'>Workspace Environment Monitor - enVMon</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwzYlEHReVIdLuSX8YkPo8Zk_kgjD6H4waSRo8RQw0D60QREqGnpz-_fZBnKg026v8cMy9AEusd3Jj3dh7h4yau4M8TKiDALWmibGxR2AGXXAzy9Zu91CQ1_vhGmMRA1luDESK8NV6Ioc/s1600/Capture.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;382&quot; data-original-width=&quot;782&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwzYlEHReVIdLuSX8YkPo8Zk_kgjD6H4waSRo8RQw0D60QREqGnpz-_fZBnKg026v8cMy9AEusd3Jj3dh7h4yau4M8TKiDALWmibGxR2AGXXAzy9Zu91CQ1_vhGmMRA1luDESK8NV6Ioc/s320/Capture.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ever care about the place you may spend one-third of a day? enVMon captures noise level, air quality, UV level, temperature and humidity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://hackster.imgix.net/uploads/attachments/348057/coverphoto_LKSKrJChgA.png?auto=compress%2Cformat&amp;amp;w=900&amp;amp;h=675&amp;amp;fit=min&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;800&quot; height=&quot;240&quot; src=&quot;https://hackster.imgix.net/uploads/attachments/348057/coverphoto_LKSKrJChgA.png?auto=compress%2Cformat&amp;amp;w=900&amp;amp;h=675&amp;amp;fit=min&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This monitoring station will monitor the Ultra-Violet and sound level, temperature, humidity and air quality (CO2). All the above parameters are the common factors for a safe working environment.&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to place this monitoring station in the working environment and monitor it, compare the data and send notifications when the parameters reach the threshold.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Detail of the project is at&amp;nbsp;&lt;a href=&quot;https://www.hackster.io/comcrazy/workspace-environment-monitor-envmon-fe4286&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/6059362080201460684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/04/workspace-environment-monitor-envmon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6059362080201460684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6059362080201460684'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2018/04/workspace-environment-monitor-envmon.html' title='Workspace Environment Monitor - enVMon'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwzYlEHReVIdLuSX8YkPo8Zk_kgjD6H4waSRo8RQw0D60QREqGnpz-_fZBnKg026v8cMy9AEusd3Jj3dh7h4yau4M8TKiDALWmibGxR2AGXXAzy9Zu91CQ1_vhGmMRA1luDESK8NV6Ioc/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-6094899927840191651</id><published>2016-10-31T21:07:00.003-07:00</published><updated>2018-10-12T23:29:15.865-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hackathon"/><category scheme="http://www.blogger.com/atom/ns#" term="TADHack 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="TADHack Kuala Lumpur 2016"/><title type='text'>Susurri - The Secret Message Service</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFL8bXuf1yuDgLR64JD0TDsjFGuqF2q1gP1FEjrU3S7VLxJQfl9GFac1ndUhq-sLE1AiMLALcxoRZx_vQfoVnAa4kCBYnPPn4JydxULRAqXxGUDwyl8muVCHyiDB2pNmElpaHXkPPwqmA/s1600/Untitled.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;67&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFL8bXuf1yuDgLR64JD0TDsjFGuqF2q1gP1FEjrU3S7VLxJQfl9GFac1ndUhq-sLE1AiMLALcxoRZx_vQfoVnAa4kCBYnPPn4JydxULRAqXxGUDwyl8muVCHyiDB2pNmElpaHXkPPwqmA/s320/Untitled.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Susurri is a working prototype that I had build for TADHack 2016 Kuala Lumpur. By utilizing the Cisco Tropo service to create a platform to let people leave a message with password protected. Then others can retrieve and listen to the message as long as they have the password.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Below is the one-page slide that I had shared in the TADHack presentation.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBJX88ddJMCtjEqIbvu7eBvYhjWfbTwhgAuqLE-dr1NBqq6jkvgT-iS0iIdQz0T3VeagJP4FN2on_EPYGQltDq776CqLM7cAXIOulSlBsYQabUkIXEp531Lk_gR48oeiEzr6vWGVsYKUs/s1600/tadhack_susurri_slide.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBJX88ddJMCtjEqIbvu7eBvYhjWfbTwhgAuqLE-dr1NBqq6jkvgT-iS0iIdQz0T3VeagJP4FN2on_EPYGQltDq776CqLM7cAXIOulSlBsYQabUkIXEp531Lk_gR48oeiEzr6vWGVsYKUs/s320/tadhack_susurri_slide.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Tropo can support multiple programming languages, from&amp;nbsp;Groovy, JavaScript, PHP, python to Ruby. For this prototype, PHP is used and since is using demo account, SIP is used for testing and demo. A gentle reminder on Tropo service, it support wide range of country but not all, Malaysia is one of the country which Tropo not supported.&lt;br /&gt;
&lt;br /&gt;
Hereby I will share the code for Susurri, hope you enjoy your hacking on Tropo!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Tropo Script&lt;/h2&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: php; ruler: true;&quot;&gt;&amp;lt;?php
/*********************************
 * Configuration
 *********************************/
$GETSESSIONEP=&quot;http://FQDN/v3/getsession.php&quot;;
$UDPATERECORDEP=&quot;http://FQDN/v3/updateRecord.php&quot;;
$SEARCHRECORDEP=&quot;http://FQDN/v3/searchRecord.php&quot;;
$RECORDFTPBASEURI=&quot;ftp://FQDN/&quot;;
$RECORDUSER=&quot;records@FQDN&quot;;
$RECORDPASSWORD=&quot;secret&quot;;
$RECORDHTTPBASEURI=&quot;http://FQDN/records/&quot;;

/*********************************
 * Variable
 *********************************/
$revision=48;
$menuResult = 0;
$numberOfRetry = 3;
$passcode = 0;
$recordId = 0;
$recordFileName=&quot;&quot;;
$callerId=$currentCall-&amp;gt;callerID.&quot; [&quot;.$currentCall-&amp;gt;callerName.&quot;]&quot;;


/*********************************
 * Logic
 *********************************/

// Asking user for action, create a message or listen to message
$menuResult = ask(&quot;Welcome to susurri &quot;.$revision.&quot;! May I help you? Press 1 for creating a secret message, press 2 for listening to the secret message.&quot;, 
    array(&quot;choices&quot; =&amp;gt; &quot;1,2&quot;, 
        &quot;timeout&quot;=&amp;gt;5.0, 
        &quot;mode&quot;=&amp;gt;&quot;dtmf&quot;, 
        &quot;attempts&quot;=&amp;gt; $numberOfRetry, 
        &quot;onBadChoice&quot; =&amp;gt; &quot;badChoiceFCN&quot;)
);


if ($menuResult-&amp;gt;value==1) { //Create message

    // Create an record in DB
    $getSessionRespJson = myCurl($GETSESSIONEP);
    $getSessionRespArry = json_decode($getSessionRespJson,true);
    
    // Check for error
    if ($getSessionRespArry[&#39;id&#39;] != &#39;error&#39;) {
        $recordId = $getSessionRespArry[&#39;id&#39;];
        $recordFileName = $recordId.&quot;.wav&quot;;
        
        say(&quot;Please start to speak your message after the beep sound.&quot;);
        
        // Record user voice 
        record(&quot;Please press the hash key to stop recording.&quot;, array(
            &quot;beep&quot;=&amp;gt;true,
            &quot;terminator&quot;=&amp;gt;&quot;#&quot;,
            &quot;asyncUpload&quot;=&amp;gt;true,
            &quot;maxTime&quot;=&amp;gt;60,
            &quot;recordURI&quot;=&amp;gt;$RECORDFTPBASEURI. $recordFileName,
            &quot;recordPassword&quot;=&amp;gt;$RECORDPASSWORD,
            &quot;recordUser&quot;=&amp;gt;$RECORDUSER
       ));
       
       // Ask for password  
       $passcodeResult = ask(&quot;Please provide 5 digits passcode for your message.&quot;, 
            array(&quot;choices&quot; =&amp;gt; &quot;[5 DIGITS]&quot;, 
                &quot;timeout&quot;=&amp;gt;5.0, 
                &quot;mode&quot;=&amp;gt;&quot;dtmf&quot;, 
                &quot;attempts&quot;=&amp;gt; $numberOfRetry, 
                &quot;onBadChoice&quot; =&amp;gt; &quot;badChoiceFCN&quot;)
        );    
        
        $passcode = $passcodeResult-&amp;gt;value;

        // Update DB record
        $getUpdateRespJson = myCurl($UDPATERECORDEP.&quot;?id=&quot;.urlencode($recordId).
            &quot;&amp;amp;passcode=&quot;.urlencode($passcode).&quot;&amp;amp;soundfilename=&quot;.urlencode($recordFileName).
            &quot;&amp;amp;callerid=&quot;.urlencode($callerId));
            
        $getUpdateRespArry = json_decode($getUpdateRespJson,true);
        
        // Check for update status
        if ($getUpdateRespArry[&#39;result&#39;] == &#39;success&#39;) {
            say(&quot;Your record ID is &quot;.$recordId. &quot; and passcode is &quot;);
            // Speak by digit by digit rather as whole numeric
            say_as($passcode,&quot;digits&quot;);
        } else {
            say(&quot;Internal error on case 4&quot;);
        }
        
    } else { // If error
        say(&quot;Internal error on case 3&quot;);
    }
    
} else if ($menuResult-&amp;gt;value==2) { // Listen to a message

    // Asking user for passcode
    $listenPasscodeResult = ask(&quot;You have choose to listen a secret message, please enter 5 digits passcode.&quot;, 
        array(&quot;choices&quot; =&amp;gt; &quot;[5 DIGITS]&quot;, 
            &quot;timeout&quot;=&amp;gt;5.0, 
            &quot;mode&quot;=&amp;gt;&quot;dtmf&quot;, 
            &quot;attempts&quot;=&amp;gt; $numberOfRetry, 
            &quot;onBadChoice&quot; =&amp;gt; &quot;badChoiceFCN&quot;)
    );    
    $listenPasscode = $listenPasscodeResult-&amp;gt;value;
    
    say(&quot;You have provide the passcode as &quot;);
    // Speak by digit by digit rather as whole numeric
    say_as($listenPasscode,&quot;digits&quot;);
    
    
    // Search for recording from database
    $searchRecordRespJson = myCurl($SEARCHRECORDEP.&quot;?passcode=&quot;.urlencode($listenPasscode));
    $searchRecordRespArry = json_decode($searchRecordRespJson,true);  
    
    if ($searchRecordRespArry[&#39;result&#39;] == &#39;found&#39;) { // If found, playback the recording
        say(&quot;Message will start play in 2 seconds.&quot;);
        wait(2000);
        say($RECORDHTTPBASEURI.$searchRecordRespArry[&#39;soundFile&#39;]);
    } else if ($searchRecordRespArry[&#39;result&#39;] == &#39;notfound&#39;) {
        say(&quot;Message with provided passcode not found.&quot;);
    } else {
        say(&quot;Internal error on case 5&quot;);
    }
    
} else {
    say(&quot;Internal error on case 2&quot;);
}

say(&quot;Thank you for using Susurri.&quot;);
wait(1000); 

/*********************************
 * UTILS
 *********************************/

// Call back function if user input is not recognize
function badChoiceFCN($event) {
    say(&quot;Sorry, your input is not recognize.&quot;);
}

// Speak by digit by digit rather as whole numeric
function say_as($value, $type) {
    $ssml_start = &quot;&amp;lt;?xml version=&#39;1.0&#39;?&amp;gt;&amp;lt;speak&amp;gt;&quot;;
    $ssml_end=&quot;&amp;lt;/say-as&amp;gt;&amp;lt;/speak&amp;gt;&quot;;
    $ssml =&quot;&amp;lt;say-as interpret-as=\&quot;vxml:$type\&quot;&amp;gt;$value&quot;;
    $complete_string = $ssml_start . $ssml . $ssml_end;
    say($complete_string);
}

// CURL
function myCurl($url) {
    //  Initiate curl
    $ch = curl_init();
    // Disable SSL verification
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    // Will return the response, if false it print the response
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    // Set the url
    curl_setopt($ch, CURLOPT_URL,$url);
    // Execute
    $response=curl_exec($ch);
    // Closing
    curl_close($ch);
    
    return $response;
}
?&amp;gt;;
&lt;/pre&gt;
&lt;h2&gt;
Server Side Script&lt;/h2&gt;
&lt;h3&gt;
base.php - Establish DB connection&lt;/h3&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: php; ruler: true;&quot;&gt;&amp;lt;?php
$servername = &quot;localhost&quot;;
$username = &quot;username&quot;;
$password = &quot;password&quot;;
$dbname = &quot;susurri&quot;;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn-&amp;amp;gt;connect_error) {
    die(&quot;Connection failed: &quot; . $conn-&amp;amp;gt;connect_error);
} 

?&amp;gt;;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h3&gt;
getsession.php - Create a record in database and return id&lt;/h3&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: php; ruler: true;&quot;&gt;&amp;lt;?php
include &#39;base.php&#39;;

$sql = &quot;INSERT INTO records (createdBy)
VALUES (&#39;admin&#39;)&quot;;

if ($conn-&amp;gt;query($sql) === TRUE) {
    echo &quot;{\&quot;id\&quot;:\&quot;&quot;. $conn-&amp;gt;insert_id.&quot;\&quot;}&quot;;
} else {
    echo &quot;{\&quot;id\&quot;:\&quot;error\&quot;}&quot;;
}

$conn-&amp;gt;close();

?&amp;gt;;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h3&gt;
searchrecord.php - Search record in database&lt;/h3&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: php; ruler: true;&quot;&gt;&amp;lt;?php
include &#39;base.php&#39;;

$passcode=$_REQUEST[&#39;passcode&#39;];

$sql = &quot;SELECT soundFile FROM records WHERE passcode=&quot;.$passcode;

$result =$conn-&amp;gt;query($sql);


if ($result-&amp;gt;num_rows &amp;gt; 0) {
 while($row = $result-&amp;gt;fetch_assoc()) {
  echo &quot;{\&quot;result\&quot;:\&quot;found\&quot;, \&quot;soundFile\&quot;:\&quot;&quot;.$row[&quot;soundFile&quot;].&quot;\&quot;}&quot;;
  break;
 }
} else {
 echo &quot;{\&quot;result\&quot;:\&quot;notfound\&quot;}&quot;;
}


$conn-&amp;gt;close();
?&amp;gt;;
&lt;/pre&gt;
&lt;h3&gt;
updaterecord.php - Update record in database&lt;/h3&gt;
&lt;pre class=&quot;brush: php; ruler: true;&quot;&gt;&amp;lt;?php
include &#39;base.php&#39;;

$id=$_REQUEST[&#39;id&#39;];
$passcode=$_REQUEST[&#39;passcode&#39;];
$soundFilename=$_REQUEST[&#39;soundfilename&#39;];
$callerId=$_REQUEST[&#39;callerid&#39;];


$sql = &quot;UPDATE records SET passcode=\&quot;&quot;.$passcode.&quot;\&quot;, soundFile=\&quot;&quot;.$soundFilename.&quot;\&quot;, callerId=\&quot;&quot;.$callerId.&quot;\&quot;  WHERE id=&quot;.$id;

if ($conn-&amp;gt;query($sql) === TRUE) {
    echo &quot;{\&quot;result\&quot;:\&quot;success\&quot;}&quot;;
} else {
    echo &quot;{\&quot;result\&quot;:\&quot;fail\&quot;}&quot;;
}

$conn-&amp;gt;close();
?&amp;gt;;
&lt;/pre&gt;
&lt;h3&gt;
schema.sql - Database schema&lt;/h3&gt;
&lt;pre class=&quot;brush: sql; ruler: true;&quot;&gt;CREATE TABLE IF NOT EXISTS `records` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` varchar(255) DEFAULT NULL,
  `passcode` varchar(20) DEFAULT NULL,
  `soundFile` varchar(255) DEFAULT NULL,
  `callerId` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `passcod` (`passcode`)
) ENGINE=MyISAM  
&lt;/pre&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/b6Ax_Qo8f3M/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/b6Ax_Qo8f3M?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/6094899927840191651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2016/10/susurri-secret-message-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6094899927840191651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6094899927840191651'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2016/10/susurri-secret-message-service.html' title='Susurri - The Secret Message Service'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFL8bXuf1yuDgLR64JD0TDsjFGuqF2q1gP1FEjrU3S7VLxJQfl9GFac1ndUhq-sLE1AiMLALcxoRZx_vQfoVnAa4kCBYnPPn4JydxULRAqXxGUDwyl8muVCHyiDB2pNmElpaHXkPPwqmA/s72-c/Untitled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-3649390392098113067</id><published>2015-06-30T20:57:00.000-07:00</published><updated>2015-06-30T22:51:41.565-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASN.1"/><category scheme="http://www.blogger.com/atom/ns#" term="Base64"/><category scheme="http://www.blogger.com/atom/ns#" term="BCD"/><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="Decoder"/><category scheme="http://www.blogger.com/atom/ns#" term="Encoder"/><category scheme="http://www.blogger.com/atom/ns#" term="Formatter"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Tool for encode, decode and formatter for common use data</title><content type='html'>After long 4 years, finally get a technical oriented job again. No more manager but solution architect. 

In this post I will share a web tool able to below task&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Hex - Ascii Converter&lt;/li&gt;
&lt;li&gt;Base64 encoder and decoder&lt;/li&gt;
&lt;li&gt;BCD encoder and decoder&amp;nbsp;&lt;/li&gt;
&lt;li&gt;ASN.1 Decoder&amp;nbsp;&lt;/li&gt;
&lt;li&gt;XML Formatter&amp;nbsp;&lt;/li&gt;
&lt;li&gt;JSON Formatter&amp;nbsp;&lt;/li&gt;
&lt;li&gt;CSS Formatter&amp;nbsp;&lt;/li&gt;
&lt;li&gt;SQL Formatter&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Hereby is the link &lt;a href=&quot;http://comcrazy-devcenter.blogspot.com/p/jdencoder.html&quot;&gt;J.Dencoder&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/3649390392098113067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2015/06/tool-for-encode-decode-and-formatter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3649390392098113067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3649390392098113067'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2015/06/tool-for-encode-decode-and-formatter.html' title='Tool for encode, decode and formatter for common use data'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-2983542567027306148</id><published>2012-01-11T16:16:00.000-08:00</published><updated>2012-01-11T16:16:10.534-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="SSH"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Password-less SSH Authentication Validation</title><content type='html'>Password-less SSH login is widely use inside a trusted network. System administrator will use this method to remotely execute some task specially in a batch scripting. However, this method sometime may failed in certain circumstances for example host name change, accidentally remove the public key or private key or run the script using different user.&lt;br /&gt;
&lt;br /&gt;
So validation and alerting is very important on&amp;nbsp;Password-less SSH&amp;nbsp;Authentication. Hereby is the script to perform validation, it has been tested on RHEL and CentOS.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;u&gt;Setup&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
1. tester1 account is configured to have SSH RSA password-less login from comcrazy account&lt;br /&gt;
2. tester2 account have NO password-less login from comcrazy account&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Test Script&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[comcrazy@localhost ~]$ ssh -qo BatchMode=yes&amp;nbsp;tester1@localhost.localdomain echo OK |grep OK |wc -l&lt;br /&gt;1&lt;br /&gt;[comcrazy@localhost ~]$ ssh -qo BatchMode=yes&amp;nbsp;tester2@localhost.localdomain echo OK |grep OK |wc -l&lt;br /&gt;0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Result&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
By using above command, if the remote account IS NOT configured as SSH password-less authentication or password-less authentication is not working, then it will return 0. Otherwise, this command will return a 1 as result.</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/2983542567027306148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2012/01/password-less-ssh-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/2983542567027306148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/2983542567027306148'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2012/01/password-less-ssh-authentication.html' title='Password-less SSH Authentication Validation'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-6938727628080511916</id><published>2011-12-14T13:00:00.000-08:00</published><updated>2018-04-29T05:34:05.748-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Euler"/><title type='text'>Project Euler and Me</title><content type='html'>&lt;style&gt;
.downloadlink {color: #666666}

/* 
 Blue Dream
 Written by Teylor Feliz  http://www.admixweb.com
*/


table { background:#D3E4E5;
 border:1px solid gray;
 border-collapse:collapse;
 color:#fff;
 font:normal 12px verdana, arial, helvetica, sans-serif;
}
caption { border:1px solid #5C443A;
 color:#5C443A;
 font-weight:bold;
 letter-spacing:20px;
 padding:6px 4px 8px 0px;
 text-align:center;
 text-transform:uppercase;
}
td, th { color:#363636;
 padding:.4em;
}
tr { border:1px dotted gray;
}
thead th, tfoot th { background:#5C443A;
 color:#FFFFFF;
 padding:3px 10px 3px 10px;
 text-align:left;
 text-transform:uppercase;
}
tbody td a {
 text-decoration:none;
 font-weight: bold;
}
tbody td a:visited { color:gray;
 text-decoration:line-through;
}
tbody td a:hover { text-decoration:underline;
}
tbody th a { color:#363636;
 font-weight:normal;
 text-decoration:none;
}
tbody th a:hover { color:#363636;
}
tbody td+td+td+td a { background-image:url(&#39;bullet_blue.png&#39;);
 background-position:left center;
 background-repeat:no-repeat;
 color:#03476F;
 padding-left:15px;
}
tbody td+td+td+td a:visited { background-image:url(&#39;bullet_white.png&#39;);
 background-position:left center;
 background-repeat:no-repeat;
}
tbody th, tbody td { text-align:left;
 vertical-align:top;
}
tfoot td { background:#5C443A;
 color:#FFFFFF;
 padding-top:3px;
}
.odd { background:#fff;
}
tbody tr:hover { background:#99BCBF;
 border:1px solid #03476F;
 color:#000000;
}
&lt;/style&gt;
&lt;img src=&quot;https://projecteuler.net/profile/comcrazy.png&quot; style=&quot;float: right; margin: 10px;&quot;&gt;Thanks to &lt;a href=&quot;http://blog.ailinchia.com/&quot;&gt;Ailin &lt;/a&gt;and &lt;a href=&quot;http://kahthong.com/&quot;&gt;Adam &lt;/a&gt;that introduce me the Project Euler and now I am totally addicted with it. After 8 years not using C as my primary programming language, is time for me to pick it up and do something with C ideology - small footprint with great performance!&lt;br /&gt;
&lt;br /&gt;
Below is the question from Project Euler and the code I had written to solve it. Feel free to download them then make it better or give comment and suggestion on the solution. Programmer ROCKS!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Description / Title&lt;/th&gt;&lt;th&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
Solutions&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;&lt;td&gt;Add all the natural numbers below one thousand that are multiples of 3 or 5.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1HW3mS1v9npVV8o_tD5BXsy9DKCTFFCYK&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;2&lt;/td&gt;&lt;td&gt;By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1q2OJc2kdDhImPfrpvVWr9PE-vdsZCQk-&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;3&lt;/td&gt;&lt;td&gt;Find the largest prime factor of a composite number.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=14bj0T9RdPnpGJZS22jGs6acLECzwlfpq&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;4&lt;/td&gt;&lt;td&gt;Find the largest palindrome made from the product of two 3-digit numbers.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1rFOS-eTAzAIgamTSy1QBGWyH1TavlEkJ&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;5&lt;/td&gt;&lt;td&gt;What is the smallest number divisible by each of the numbers 1 to 20?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=12xcFHKP-rje1T6LUfu0udLqHJFQhDlG7&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;6&lt;/td&gt;&lt;td&gt;What is the difference between the sum of the squares and the square of the sums?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1yZKN7b-omcwl4Q2lkHn14C4FyJu4W_wp&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;7&lt;/td&gt;&lt;td&gt;Find the 10001st prime.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1SV-jL2i7Jsk3EsEi9Hriel0XaRJPV9gS&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;8&lt;/td&gt;&lt;td&gt;Discover the largest product of five consecutive digits in the 1000-digit number.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1zXkkgE3lUSK5nMr60UL5tc_6AECCyxLD&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;9&lt;/td&gt;&lt;td&gt;Find the only Pythagorean triplet, {&lt;var&gt;a&lt;/var&gt;, &lt;var&gt;b&lt;/var&gt;, &lt;var&gt;c&lt;/var&gt;}, for which &lt;var&gt;a&lt;/var&gt; + &lt;var&gt;b&lt;/var&gt; + &lt;var&gt;c&lt;/var&gt; = 1000.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1TTELF3dlMAXmqvE_iQzqchS4WOSK-ge6&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;10&lt;/td&gt;&lt;td&gt;Calculate the sum of all the primes below two million.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1W9XqTKVtD_En56A-nA3WhqjLdy4mXiWG&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;11&lt;/td&gt;&lt;td&gt;What is the greatest product of four adjacent numbers on the same straight line in the 20 by 20 grid?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1Jhzj6j7hhyxIdLu_h7KHHfoiiTe6u6c0&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;12&lt;/td&gt;&lt;td&gt;What is the value of the first triangle number to have over five hundred divisors?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1aHUeStrqMgInv2nYxvWJK7Gt1AidxK7u&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;13&lt;/td&gt;&lt;td&gt;Find the first ten digits of the sum of one-hundred 50-digit numbers.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1cZIUU44P06XS9KLVzZo8eBYvB3szdjdH&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;14&lt;/td&gt;&lt;td&gt;Find the longest sequence using a starting number under one million.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1EcIR5PBIbVOdjxVkYA7D0mhR27O2hpn5&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;15&lt;/td&gt;&lt;td&gt;Starting in the top left corner in a 20 by 20 grid, how many routes are there to the bottom right corner?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=11SDAVSsLj9FvE0PFY02eXd4dE5eRWzcj&quot; target=&quot;_blank&quot;&gt;Serial&lt;/a&gt;&lt;br /&gt;
Parallel&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;16&lt;/td&gt;&lt;td&gt;What is the sum of the digits of the number 2&lt;sup&gt;1000&lt;/sup&gt;?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1zmcHwOwSU-8t6BMA6a84WWtQhxr5tX97&quot; target=&quot;_blank&quot;&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;17&lt;/td&gt;&lt;td&gt;How many letters would be needed to write all the numbers in words from 1 to 1000?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;18&lt;/td&gt;&lt;td&gt;Find the maximum sum travelling from the top of the triangle to the base.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;19&lt;/td&gt;&lt;td&gt;How many Sundays fell on the first of the month during the twentieth century?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;20&lt;/td&gt;&lt;td&gt;Find the sum of digits in 100!&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;21&lt;/td&gt;&lt;td&gt;Evaluate the sum of all amicable pairs under 10000.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;22&lt;/td&gt;&lt;td&gt;What is the total of all the name scores in the file of first names?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;23&lt;/td&gt;&lt;td&gt;Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;24&lt;/td&gt;&lt;td&gt;What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;25&lt;/td&gt;&lt;td&gt;What is the first term in the Fibonacci sequence to contain 1000 digits?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;26&lt;/td&gt;&lt;td&gt;Find the value of &lt;i&gt;d&lt;/i&gt; &amp;lt; 1000 for which 1/&lt;i&gt;d&lt;/i&gt; contains the longest recurring cycle.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;27&lt;/td&gt;&lt;td&gt;Find a quadratic formula that produces the maximum number of primes for consecutive values of &lt;i&gt;n&lt;/i&gt;.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;28&lt;/td&gt;&lt;td&gt;What is the sum of both diagonals in a 1001 by 1001 spiral?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;29&lt;/td&gt;&lt;td&gt;How many distinct terms are in the sequence generated by &lt;i&gt;a&lt;sup&gt;b&lt;/sup&gt;&lt;/i&gt; for 2 = &lt;i&gt;a&lt;/i&gt; = 100 and 2 = &lt;i&gt;b&lt;/i&gt; = 100?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;30&lt;/td&gt;&lt;td&gt;Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;31&lt;/td&gt;&lt;td&gt;Investigating combinations of English currency denominations.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;32&lt;/td&gt;&lt;td&gt;Find the sum of all numbers that can be written as pandigital products.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;33&lt;/td&gt;&lt;td&gt;Discover all the fractions with an unorthodox cancelling method.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;34&lt;/td&gt;&lt;td&gt;Find the sum of all numbers which are equal to the sum of the factorial of their digits.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;35&lt;/td&gt;&lt;td&gt;How many circular primes are there below one million?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;36&lt;/td&gt;&lt;td&gt;Find the sum of all numbers less than one million, which are palindromic in base 10 and base 2.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;37&lt;/td&gt;&lt;td&gt;Find the sum of all eleven primes that are both truncatable from left to right and right to left.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;38&lt;/td&gt;&lt;td&gt;What is the largest 1 to 9 pandigital that can be formed by multiplying a fixed number by 1, 2, 3, ... ?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;39&lt;/td&gt;&lt;td&gt;If &lt;i&gt;p&lt;/i&gt; is the perimeter of a right angle triangle, {&lt;i&gt;a&lt;/i&gt;, &lt;i&gt;b&lt;/i&gt;, &lt;i&gt;c&lt;/i&gt;}, which value, for &lt;i&gt;p&lt;/i&gt; = 1000, has the most solutions?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;40&lt;/td&gt;&lt;td&gt;Finding the &lt;i&gt;n&lt;/i&gt;&lt;sup&gt;th&lt;/sup&gt; digit of the fractional part of the irrational number.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;41&lt;/td&gt;&lt;td&gt;What is the largest &lt;i&gt;n&lt;/i&gt;-digit pandigital prime that exists?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;42&lt;/td&gt;&lt;td&gt;How many triangle words does the list of common English words contain?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;43&lt;/td&gt;&lt;td&gt;Find the sum of all pandigital numbers with an unusual sub-string divisibility property.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;44&lt;/td&gt;&lt;td&gt;Find the smallest pair of pentagonal numbers whose sum and difference is pentagonal.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;45&lt;/td&gt;&lt;td&gt;After 40755, what is the next triangle number that is also pentagonal and hexagonal?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;46&lt;/td&gt;&lt;td&gt;What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;47&lt;/td&gt;&lt;td&gt;Find the first four consecutive integers to have four distinct primes factors.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;48&lt;/td&gt;&lt;td&gt;Find the last ten digits of 1&lt;sup&gt;1&lt;/sup&gt; + 2&lt;sup&gt;2&lt;/sup&gt; + ... + 1000&lt;sup&gt;1000&lt;/sup&gt;.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td align=&quot;right&quot;&gt;49&lt;/td&gt;&lt;td&gt;Find arithmetic sequences, made of prime terms, whose four digits are permutations of each other.&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td align=&quot;right&quot;&gt;50&lt;/td&gt;&lt;td&gt;Which prime, below one-million, can be written as the sum of the most consecutive primes?&lt;/td&gt;&lt;td&gt;&lt;div class=&quot;downloadlink&quot; style=&quot;text-align: center;&quot;&gt;
Link&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://comcrazy-devcenter.blogspot.com/2011/12/project-euler-and-me.html&quot; name=&quot;problem15&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
Problem 15&lt;/h3&gt;
Using&amp;nbsp;programmatic method with serial navigating technique take 2 hours 15&amp;nbsp;minutes&amp;nbsp;to get the result. If using&amp;nbsp;mathematical&amp;nbsp;method to calculate the possible path only take less then 1 second. The difference between these two methods is mathematical method only projected how many path there are but programmatic method give the actual path it had been navigated.&lt;br /&gt;
&lt;br /&gt;
In my opinion, the real world problem like solving maze or path finding,&amp;nbsp;programmatic method is more realistic. However,&amp;nbsp;mathematical&amp;nbsp;method can help to pre-project the result. The next thing I will going to do is design a parallel&amp;nbsp;path navigating&amp;nbsp;technique&amp;nbsp;using multi-thread with multiple navigator, this solution will combine both&amp;nbsp;mathematical &amp;nbsp;and&amp;nbsp;programmatic method to accomplish the objective.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Result&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Problem 15 with Serial Navigating Solution&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
Path for 1x1. P: 2 (0s 2ms), M: 2 (0s 381ms)&lt;br /&gt;
Path for 2x2. P: 6 (0s 2ms), M: 6 (0s 11ms)&lt;br /&gt;
Path for 3x3. P: 20 (0s 4ms), M: 20 (0s 12ms)&lt;br /&gt;
Path for 4x4. P: 70 (0s 9ms), M: 70 (0s 12ms)&lt;br /&gt;
Path for 5x5. P: 252 (0s 50ms), M: 252 (0s 13ms)&lt;br /&gt;
Path for 6x6. P: 924 (0s 101ms), M: 924 (0s 13ms)&lt;br /&gt;
Path for 7x7. P: 3432 (0s 370ms), M: 3432 (0s 16ms)&lt;br /&gt;
Path for 8x8. P: 12870 (0s 1479ms), M: 12870 (0s 16ms)&lt;br /&gt;
Path for 9x9. P: 48620 (0s 5363ms), M: 48620 (0s 21ms)&lt;br /&gt;
Path for 10x10. P: 184756 (0s 18646ms), M: 184756 (0s 15ms)&lt;br /&gt;
Path for 11x11. P: 705432 (0s 40020ms), M: 705432 (0s 17ms)&lt;br /&gt;
Path for 12x12. P: 2704156 (0s 167027ms), M: 2704156 (0s 17ms)&lt;br /&gt;
Path for 13x13. P: 10400600 (0s 587571ms), M: 10400600 (0s 19ms)&lt;br /&gt;
Path for 14x14. P: 40116600 (3s -715159ms), M: 40116600 (0s 20ms)&lt;br /&gt;
Path for 15x15. P: 155117520 (8s 773356ms), M: 155117520 (0s 19ms)&lt;br /&gt;
Path for 16x16. P: 601080390 (36s -370565ms), M: 601080390 (0s 81ms)&lt;br /&gt;
Path for 17x17. P: 2333606220 (138s 83071ms), M: 2333606220 (0s 104ms)&lt;br /&gt;
Path for 18x18. P: 9075135300 (546s -580371ms), M: 9075135300 (0s 68ms)&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
Path for 19x19.&amp;nbsp;P:&amp;nbsp;35345263800&amp;nbsp;(2104s 60565ms),&amp;nbsp;M: 35345263800 (0s 44ms)&lt;/div&gt;
&lt;div&gt;
Path for 20x20.&amp;nbsp;P:&amp;nbsp;137846528820&amp;nbsp;(8236s 7101ms),&amp;nbsp;M: 137846528820 (0s 40ms)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/6938727628080511916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/project-euler-and-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6938727628080511916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6938727628080511916'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/project-euler-and-me.html' title='Project Euler and Me'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-5977063838485164167</id><published>2011-12-09T05:51:00.001-08:00</published><updated>2011-12-20T22:28:02.355-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>FORM validation with jquery.ajax</title><content type='html'>&lt;b&gt;&lt;u&gt;When &amp;lt;FORM&amp;gt; validation meet the JQUERY.AJAX&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Below are the basic &amp;lt;FORM&amp;gt; with validation before the form submitted.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;1 &amp;nbsp;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;2 &amp;nbsp; &amp;nbsp;function validateform() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &quot;POST&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;/country/checkcountry&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: &quot;code=&quot;+countrycode+&quot;&amp;amp;name=&quot;+countryname,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataType: &#39;json&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success: function (data, status) &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (data.result != &#39;OK&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&#39;check ok&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else { &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&#39;check not ok&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;14 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;16 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;},&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;17 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;error: function (data, status) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;18 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&#39;check error&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;19 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;20 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;21 &amp;nbsp; &amp;nbsp; &amp;nbsp;}); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;22 &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&#39;should never show&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;23 &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;24 &amp;nbsp; &amp;nbsp; &amp;nbsp;return false; //For testing purpose, it should be return true&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;25 &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;26 &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;27&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;28 &amp;lt;FORM action=&quot;/country/addcountry&quot; method=&quot;post&quot; onsubmit=&quot;return validateform()&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;29 &amp;nbsp; &amp;nbsp; ..........................&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;30 &amp;lt;/FORM&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
At the first glance, the java script seem logically fine. Actually, there are TWO major issue in that java script!&lt;br /&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;1. ASYNC issue&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
If we really make above code&amp;nbsp;run-able, no matter what result we get from the ajax call, we will still &amp;nbsp;get the &quot;should never show&quot; message at line 22 then follow by the console message from the ajax stub (10,13 or 18).&lt;br /&gt;
&lt;br /&gt;
By default, jquery ajax is a&amp;nbsp;asynchronous process. This means once the ajax triggered, browser will not wait until it complete but rather continue with the next task. For our case is the console.log at line 22.&lt;br /&gt;
&lt;br /&gt;
This is not the result we want, specially a&amp;nbsp;sequential&amp;nbsp;validation activity. I order to solve this, we need to add a parameter to the ajax as shown below.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;asycn: false,&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;2. Return operation in jquery ajax&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
After insert the async parameter to ajax, then let&#39;s try again. aiks... still cannot get the expected result, although by now the sequence of the log is correct. By now, we should get the console message&amp;nbsp;&amp;nbsp;from the ajax stub (10,13 or 18) first then follow by&amp;nbsp;message at line 22.&amp;nbsp;But the function should not reach line 22, it should return at line 11, 14 or 19.&lt;br /&gt;
&lt;br /&gt;
The catch is, jquery ajax execute their operation at another thread and not in the same scope with&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;validateform&amp;nbsp;&lt;/span&gt;function. The return operation in ajax only quit from it&#39;s own thread but not the function. In order to solve this, declare a boolean variable at the scope of&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;validateform&amp;nbsp;&lt;/span&gt;function then assigned the status and perform necessary action after the ajax task. See below code for complete solution.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;1 &amp;nbsp;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;2 &amp;nbsp; &amp;nbsp;function validateform() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; var validateResult = true;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &quot;POST&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;/country/checkcountry&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: &quot;code=&quot;+countrycode+&quot;&amp;amp;name=&quot;+countryname,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataType: &#39;json&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;success: function (data, status) &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (data.result != &#39;OK&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&#39;check ok&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; validateResult=false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;14 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else { &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&#39;check not ok&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;16 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; validateResult=true;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;17 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;18 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;},&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;19 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;error: function (data, status) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;20 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&#39;check error&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;21 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;validateResult=false&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;22 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;23 &amp;nbsp; &amp;nbsp; &amp;nbsp;}); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;24&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;25 &amp;nbsp; &amp;nbsp; &amp;nbsp;return validateResult;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;26 &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;27&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;28 &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;29 &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;30&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;31 &amp;lt;FORM action=&quot;/country/addcountry&quot; method=&quot;post&quot; onsubmit=&quot;return validateform()&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;32 &amp;nbsp; &amp;nbsp; ..........................&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;33 &amp;lt;/FORM&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Ajax task may take some time to complete, if you using it at form validation specially submit validation, is recommended to show some indication to user to inform their action is under process.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/5977063838485164167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/when-validation-meet-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5977063838485164167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5977063838485164167'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/when-validation-meet-jquery.html' title='FORM validation with jquery.ajax'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-1290507005241577813</id><published>2011-12-07T23:17:00.001-08:00</published><updated>2011-12-20T22:28:25.055-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Document.getElementById return null</title><content type='html'>&lt;b&gt;&lt;u&gt;The problem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Document.getElementById() - The most useful and common use features while developing in javascript. Some how this function call will failed unexpected without any javascript error. The most common error for this function is returning a NULL even we can 100% confirm the element with correct ID is there!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The&amp;nbsp;catch&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Come on, this is not a browser issue nor javascript issue. There are few possible that trigger this issue. Listed below is what I faced before, if you have more please share by replying a comment. TQ.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. &amp;nbsp;ID had been used more than once in a HTML page&lt;/b&gt;&lt;br /&gt;
Check is the ID the element has been used more than once in a HTML. The most easier way to debug is right click on the web browser and click VIEW SOURCE (CTRL U). From there use the find tool to search for the ID that document.getElementById() cannot found.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Nested &amp;lt;FORM&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
document.getElementById() return null while trying to get a &amp;lt;FORM&amp;gt; element? Make sure that the &amp;lt;FORM&amp;gt; element you try to get is not under another &amp;lt;FORM&amp;gt; element! This error is usually happen while using PHP framework or template based framework.&lt;br /&gt;
&lt;br /&gt;
Try to move the inner &amp;lt;FORM&amp;gt; element out from the parent form. For Symfony PHP framework, sometime this is hard to archive because we are good programmer that make our code modular enough to screw&amp;nbsp;ourselves&amp;nbsp;up :P . In this case, you can use the SLOT concept in Symfony to solve this problem.&lt;br /&gt;
&lt;br /&gt;
You know something is not listed here, please reply a comment to share. TQ.</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/1290507005241577813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/documentgetelementbyid-return-null.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1290507005241577813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1290507005241577813'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/12/documentgetelementbyid-return-null.html' title='Document.getElementById return null'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-2715749243801294499</id><published>2011-10-30T17:40:00.000-07:00</published><updated>2011-10-30T17:57:04.365-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Imported"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Useful Coding Tools and JavaScript Libraries For Web Developers - Smashing Magazine</title><content type='html'>&lt;a href=&quot;http://www.smashingmagazine.com/2011/10/28/useful-coding-workflow-tools-for-web-designers-developers/&quot;&gt;Useful Coding Tools and JavaScript Libraries For Web Developers - Smashing Magazine&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/pengoopmcjnbflcjbmoeodbmoflcgjlk&quot; style=&quot;font-size: 13px;&quot;&gt;&#39;via Blog this&#39;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/2715749243801294499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/useful-coding-tools-and-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/2715749243801294499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/2715749243801294499'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/useful-coding-tools-and-javascript.html' title='Useful Coding Tools and JavaScript Libraries For Web Developers - Smashing Magazine'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-9160620657353123036</id><published>2011-10-27T17:49:00.000-07:00</published><updated>2011-10-30T17:56:30.943-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Imported"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Lessons From A Review Of JavaScript Code - Smashing Coding</title><content type='html'>&lt;a href=&quot;http://coding.smashingmagazine.com/2011/10/27/lessons-from-a-review-of-javascript-code/&quot;&gt;Lessons From A Review Of JavaScript Code - Smashing Coding&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/pengoopmcjnbflcjbmoeodbmoflcgjlk&quot; style=&quot;font-size: 13px;&quot;&gt;&#39;via Blog this&#39;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/9160620657353123036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/lessons-from-review-of-javascript-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/9160620657353123036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/9160620657353123036'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/lessons-from-review-of-javascript-code.html' title='Lessons From A Review Of JavaScript Code - Smashing Coding'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-3288461676091135749</id><published>2011-10-11T00:40:00.000-07:00</published><updated>2011-10-16T18:46:42.719-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General"/><category scheme="http://www.blogger.com/atom/ns#" term="Imported"/><title type='text'>Supporting Your Product: How To Provide Technical Support - Smashing Magazine</title><content type='html'>&lt;a href=&quot;http://www.smashingmagazine.com/2011/10/10/supporting-product-providing-technical-support/&quot;&gt;Supporting Your Product: How To Provide Technical Support - Smashing Magazine&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/pengoopmcjnbflcjbmoeodbmoflcgjlk&quot; style=&quot;font-size: 13px;&quot;&gt;&#39;via Blog this&#39;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/3288461676091135749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/supporting-your-product-how-to-provide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3288461676091135749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3288461676091135749'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/supporting-your-product-how-to-provide.html' title='Supporting Your Product: How To Provide Technical Support - Smashing Magazine'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-5085928496935675788</id><published>2011-10-10T03:09:00.000-07:00</published><updated>2011-10-16T18:46:34.777-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Imported"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Design"/><title type='text'>Free Download: Cheat Sheet For Designing Web Forms - Smashing UX Design</title><content type='html'>&lt;a href=&quot;http://uxdesign.smashingmagazine.com/2011/10/07/free-download-cheat-sheet-for-designing-web-forms/&quot;&gt;Free Download: Cheat Sheet For Designing Web Forms - Smashing UX Design&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/pengoopmcjnbflcjbmoeodbmoflcgjlk&quot; style=&quot;font-size: 13px;&quot;&gt;&#39;via Blog this&#39;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/5085928496935675788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/free-download-cheat-sheet-for-designing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5085928496935675788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5085928496935675788'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/free-download-cheat-sheet-for-designing.html' title='Free Download: Cheat Sheet For Designing Web Forms - Smashing UX Design'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-1038518939083340885</id><published>2011-10-10T00:15:00.000-07:00</published><updated>2011-10-10T00:45:09.589-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery plugin"/><title type='text'>Panes Freezer - The jquery plugin</title><content type='html'>&lt;style&gt;
table
{
font-family: &quot;Lucida Sans Unicode&quot;, &quot;Lucida Grande&quot;, Sans-Serif;
font-size: 12px;
margin: 25px;
width: 480px;
text-align: center;
border-collapse: collapse;
border-top: 7px solid #9baff1;
border-bottom: 7px solid #9baff1;
}
th
{
font-size: 13px;
font-weight: normal;
padding: 8px;
background: #e8edff;
border-right: 1px solid #9baff1;
border-left: 1px solid #9baff1;
color: #039;
}
td
{
padding: 8px;
background: #e8edff; border-right: 1px solid #aabcfe;
border-left: 1px solid #aabcfe;
color: #669;
}
&lt;/style&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3100909261281490039&quot; name=&quot;About&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;

About&lt;/h2&gt;
When working with large table, it gets a bit frustrating, when you go
to read the data in a distant row or column and the headings at the top
of the page or down the side of the sheet disappear.&lt;br /&gt;
&lt;br /&gt;
If you are like me, you&#39;re never quite sure if you are looking in the
right spot so you scroll back and forth trying to read first the
heading and then the data, heading then the data, until you&#39;re almost
sure you have it right.&lt;br /&gt;
&lt;br /&gt;
To avoid this back and forth waste of time, use this jquery plugin.
This plugin allows you to lock specific rows and columns so that they
will always be visible on screen no matter how far you scroll to the
right or down.&lt;br /&gt;
&lt;br /&gt;
Idea of this plugin is no existing coding modification need to be done,
just with additional &amp;lt;DIV&amp;gt; and call the plugin code shown
below, that&#39;s all!&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
$(&#39;#mydiv_1_0&#39;).panesfreezer({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;headerrow&#39;: 1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;headercolumn&#39; : 1&lt;br /&gt;
});&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;




&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3100909261281490039&quot; name=&quot;Demo&quot;&gt;&lt;/a&gt;Demo&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://comcrazy.github.com/Panes-Freezer/basic.html&quot;&gt;Table with no style&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://comcrazy.github.com/Panes-Freezer/tablecss.html&quot;&gt;Table with style&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;




&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3100909261281490039&quot; name=&quot;Supported_browser&quot;&gt;&lt;/a&gt;Supported
browser&lt;/h2&gt;
Below table show the supported browser for this plugin
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;height: 60px; text-align: left; width: 533px;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;No&lt;/th&gt;
&lt;th&gt;Browser&lt;/th&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;OS&lt;/th&gt;
&lt;th style=&quot;text-align: center;&quot;&gt;Support&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Google Chrome&amp;nbsp;&lt;/td&gt;
&lt;td&gt;14.0.835.202 m&lt;/td&gt;
&lt;td&gt;Windows 7&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Firefox&amp;nbsp;&lt;/td&gt;
&lt;td&gt;7.0&lt;/td&gt;
&lt;td&gt;Windows 7&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Safari &lt;/td&gt;
&lt;td&gt;5.1&lt;/td&gt;
&lt;td&gt;Windows 7&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Internet Explorer&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;n&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;h2&gt;




&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3100909261281490039&quot; name=&quot;Links&quot;&gt;&lt;/a&gt;Links&lt;/h2&gt;
jquery plugin page - &lt;a href=&quot;http://plugins.jquery.com/project/panesfreezer&quot;&gt;http://plugins.jquery.com/project/panesfreezer&lt;/a&gt;&lt;br /&gt;
Github page - &lt;a href=&quot;https://github.com/comcrazy/Panes-Freezer/&quot;&gt;https://github.com/comcrazy/Panes-Freezer/&lt;/a&gt;&lt;br /&gt;
Author blog - &lt;a href=&quot;http://comcrazy-devcenter.blogspot.com/&quot;&gt;http://comcrazy-devcenter.blogspot.com/&lt;/a&gt;
@ &lt;a href=&quot;http://comcrazy.info/&quot;&gt;http://comcrazy.info/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/1038518939083340885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/panes-freezer-jquery-plugin.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1038518939083340885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1038518939083340885'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/panes-freezer-jquery-plugin.html' title='Panes Freezer - The jquery plugin'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-3026512228756350158</id><published>2011-10-06T02:57:00.000-07:00</published><updated>2011-10-06T03:03:42.518-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql optimization"/><title type='text'>MySQL Schema and Index Optimization Example</title><content type='html'>Transaction logging is a essential activity for telco industry. These records are important to resolve customer dispute or technical support activity. This post will discuss about MySQL schema and index optimization on a table that store huge amount (20 Millions ++ per day in one table) of transaction record.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Gathered Information &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1. Shown below is the table schema for the transaction log table.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CREATE TABLE `transactionlog` (&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `datetime` varchar(45) NOT NULL DEFAULT &#39;&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `version` int(10) DEFAULT NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `category` varchar(45) DEFAULT NULL, &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `src_acc_name` varchar(45) DEFAULT NULL,&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `dst_acc_name` varchar(45) DEFAULT NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `ib_msg_id` varchar(100) DEFAULT NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `ob_msg_id` varchar(100) DEFAULT NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `receiver_mpno` varchar(45) DEFAULT NULL,&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `sender_mpno` varchar(45) DEFAULT NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `country_code` varchar(5) DEFAULT NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `operator_id` int(10) DEFAULT NULL,&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; `submitted_datetime` varchar(45) NOT NULL DEFAULT &#39;&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; ----- WITH MORE COLUMNS ----&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; KEY `index1` (`submitted_datetime`(20),`category`),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; KEY `index2` (`submitted_datetime`(20),`receiver_mpno`(20)),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; KEY `index3` (`submitted_datetime`(20),`src_acc_name`,`category`),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; KEY `index4` (`submitted_datetime`(20),`operator_id`),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; KEY `index5` (`ib_msg_id`(25))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;) ENGINE=MyISAM DEFAULT CHARSET=latin1 &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
2. Shown below is the SQL that utilize above table that extract from code.&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND category IN (&#39;Category 1&#39;, &#39;Category 2&#39;, &#39;Category 3&#39;) ORDER BY datetime ASC;&lt;br /&gt;&lt;br /&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND (receiver_mpno = &#39;69012641245&#39; OR sender_mpno = &#39;69012641245&#39;) &lt;br /&gt;&amp;nbsp; ORDER BY datetime ASC;&lt;br /&gt;&lt;br /&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND (src_acc_name = &#39;carrier11&#39; OR dst_acc_name = &#39;carrier11&#39;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND category IN (&#39;Category 1&#39;, &#39;Category 2&#39;, &#39;Category 3&#39;) &lt;br /&gt;&amp;nbsp; ORDER BY datetime ASC;&lt;br /&gt;&lt;br /&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND transactionlog.operator_id = 3366 &lt;br /&gt;&amp;nbsp; ORDER BY datetime ASC;&lt;br /&gt;&lt;br /&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND (ib_msg_id = &#39;message03400123123413&#39; OR ob_msg_id = &#39;message03400123123413&#39;) &lt;br /&gt;&amp;nbsp; ORDER BY datetime ASC;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Analysis and Solution&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
OK, let&#39;s start with table schema defination. Below are the few issues I spotted.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #cc0000;&quot;&gt;
&lt;b&gt;1. datetime &amp;amp; submitted_datetime &lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Both data type are varchar(45) which doesn&#39;t make sense. Why want to store date time information in a varchar rather than datetime datatype? Based on &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html&lt;/a&gt;, datetime datatype consume 8 bytes (current sue 46 bytes). In addition, perfomance on index creation and index filtering on datetime datatype definately faster than varchar.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Change the datatype to datetime.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #cc0000;&quot;&gt;2. Category as constant&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
After study the code, found out that categories is a set of constant string; wherelse in coding, those categories is identified by integer. &lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Change the datatype of category from varchar(45) to tinyint (3). Then another issue raise to me, data is insert into this table using select insert sql statement which the catogery of the source table also is a varchar. In order to solve this, I recommeneded to create a mysql procedure to map the string to an integer and use it at the select insert statement. Pro of this method is no code changes needed. Cons is if there are new category added, need to update the mysql procedure.&lt;br /&gt;
&lt;br /&gt;
Next, let&#39;s look into index for this table. Below are the few issues I spotted.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #cc0000;&quot;&gt;3. Table index definition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Problem &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;From the provided sql, found out that ob_msg_id and dst_acc_name apear at where clause but it not exist in index.&lt;/li&gt;
&lt;li&gt;From the provided sql, the query have a pattern which start from submitted_datetime then follow by other criteria. If that is the case, no need to create so many index to optimize the search filtering. With correct sequence, one index is enough, please refer to http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html&lt;/li&gt;
&lt;/ol&gt;
&lt;u&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Create a index as follow, Then modify the code that will generate the SQL statement where clause follow below index sequence.&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;KEY `index1` (`submitted_datetime`, `category`, `receiver_mpno`(20), `sender_mpno`(20), `src_acc_name`, `dst_acc_name`, `operator_id`, `ib_msg_id`(25), `ob_msg_id`(25), `datetime`) USING BTREE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Propose Solution Summary &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Table Schema&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;CREATE TABLE `transactionlog` (&amp;nbsp; &lt;br /&gt;`datetime` &lt;span style=&quot;color: orange;&quot;&gt;datetime &lt;/span&gt;NOT NULL DEFAULT &#39;&#39;,&amp;nbsp; &lt;br /&gt;`version` int(10) DEFAULT 0,&amp;nbsp; &lt;br /&gt;`category` &lt;span style=&quot;color: orange;&quot;&gt;tinyint(3)&lt;/span&gt; DEFAULT 0,&amp;nbsp;&amp;nbsp; &lt;br /&gt;`src_acc_name` varchar(45) DEFAULT NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;`dst_acc_name` varchar(45) DEFAULT NULL,&amp;nbsp; &lt;br /&gt;`ib_msg_id` varchar(100) DEFAULT NULL,&amp;nbsp; &lt;br /&gt;`ob_msg_id` varchar(100) DEFAULT NULL,&amp;nbsp; &lt;br /&gt;`receiver_mpno` varchar(45) DEFAULT NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;`sender_mpno` varchar(45) DEFAULT NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;`country_code` varchar(5) DEFAULT NULL,&amp;nbsp; &lt;br /&gt;`operator_id` int(10) DEFAULT 0,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;`submitted_&lt;span style=&quot;color: orange;&quot;&gt;datetime&lt;/span&gt;` datetime NOT NULL DEFAULT &#39;&#39;,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;----- WITH MORE COLUMNS ----&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: orange;&quot;&gt;KEY `index1` (`submitted_datetime`, `category`, `receiver_mpno`(20), `sender_mpno`(20), `src_acc_name`, `dst_acc_name`, `operator_id`, `ib_msg_id`(25), `ob_msg_id`(25), `datetime`) USING BTREE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;) ENGINE=MyISAM DEFAULT CHARSET=latin1 &lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;u&gt;&lt;b&gt;Select Statement&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND category IN &lt;span style=&quot;color: orange;&quot;&gt;(1, 2, 3)&lt;/span&gt; ORDER BY datetime ASC;&lt;br /&gt;&lt;br /&gt;SELECT * FROM transactionlog &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.operator ON (transactionlog.operator_id&amp;nbsp; = cfg.operator.operator_id) &lt;br /&gt;&amp;nbsp; LEFT JOIN cfg.country ON (transactionlog.country_code&amp;nbsp; = cfg.country.country_code) &lt;br /&gt;&amp;nbsp; WHERE submitted_datetime &amp;gt;= &#39;2009-09-10 20:00:00&#39; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND submitted_datetime &amp;lt;= &#39;2009-09-10 22:00:00&#39; &lt;br /&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND category IN (1, 2, 3) &lt;/span&gt;&lt;br style=&quot;color: orange;&quot; /&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND (src_acc_name = &#39;carrier11&#39; OR dst_acc_name = &#39;carrier11&#39;) &lt;/span&gt;&lt;br /&gt;&amp;nbsp; ORDER BY datetime ASC;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Optimization Testing and It&#39;s Result&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Environment&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Platform: Virtual Machine 32bit&lt;br /&gt;
CPU: 1 core, Intel(R) Core(TM)2 Duo CPU&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T6670&amp;nbsp; @ 2.20GHz&lt;br /&gt;
Memory: 1024M&lt;br /&gt;
OS version : CentOS release 5.4 (Final)&lt;br /&gt;
Mysql version: Ver 14.14 Distrib 5.5.15, for Linux (i686) using readline 5.1&lt;br /&gt;
Mysql config: installation default&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Result&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; table-layout: fixed; width: 635px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 294pt;&quot; width=&quot;392&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 51pt;&quot; width=&quot;68&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 44pt;&quot; width=&quot;58&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 88pt;&quot; width=&quot;117&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #c0504d; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: white; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap; width: 294pt;&quot; width=&quot;392&quot;&gt;Task (transactionlog table contain 20M records initially)&amp;nbsp;&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #c0504d; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: white; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap; width: 51pt;&quot; width=&quot;68&quot;&gt;Before (s)&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #c0504d; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: white; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap; width: 44pt;&quot; width=&quot;58&quot;&gt;After (s)&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #c0504d; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: white; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap; width: 88pt;&quot; width=&quot;117&quot;&gt;Improvement (%)&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Select insert 32K+ records and insert into transactionlog table&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;422.52&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;5.97&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl67&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;98.59%&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Search by category&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;318.51&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;91.11&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl67&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;71.39%&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl68&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Search by receiver/sender number&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl68&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;314.7&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl68&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;74.38&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl69&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;76.36%&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Search by account name&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;326.67&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;96.09&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl67&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;70.58%&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl68&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Search by operator id&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl68&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;327.49&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl68&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;79.79&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl69&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #dbe5f1; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;75.64%&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;Search by message ID&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;319.46&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;86.92&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl67&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #b8cce4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; font-family: Calibri, sans-serif; font-size: 11pt; font-style: normal; font-weight: 400; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-decoration: none; vertical-align: bottom; white-space: nowrap;&quot;&gt;72.79%&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Conclusion&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Bravo, the results generally are improve over 70%. As shown at the table above, more index (or separated index) doesn&#39;t mean better performance. It is very expensive to generate index, it hoc up CPU time and IO waiting time. Secondly, varchar is convenient but is very bad in indexing; slower and bigger size.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/3026512228756350158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/mysql-schema-and-index-optimization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3026512228756350158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/3026512228756350158'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/10/mysql-schema-and-index-optimization.html' title='MySQL Schema and Index Optimization Example'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-4391636767765654132</id><published>2011-09-08T01:29:00.000-07:00</published><updated>2018-04-29T05:43:50.107-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Javascript Multi-Dimension Array to JSON Converter</title><content type='html'>&lt;b&gt;&lt;u&gt;The Problem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Lately ask by one of my programmer - How to pass a javascript multi-dimension array back to PHP? First thing strike in my mind, JSON.stringify! But after some quick reading and testing, found out that&amp;nbsp;stringify&amp;nbsp;does not support cyclic data structures.&lt;br /&gt;
&lt;br /&gt;
Then brainstorming session begin. Why need to pass in multi-dimension array, why not this and why not that... And last, he just said &quot;This is the way I want, can you make it happen or not?&quot;.&lt;br /&gt;
&lt;br /&gt;
Thanks for his challenge, here by is the solution.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The Solution&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Following code is tested with following scenario&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;string&lt;/li&gt;
&lt;li&gt;numeric&lt;/li&gt;
&lt;li&gt;fraction&lt;/li&gt;
&lt;li&gt;boolean&lt;/li&gt;
&lt;li&gt;\r\n&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Is not yet fully comply to json specification yet but support most common use datatype. If anyone enhance this code, please do share. Thank you.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;lt;script&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Convert an javascript array to json format, support multi&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* dimension array.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param &amp;nbsp; &amp;nbsp;thearray &amp;nbsp; Javascript array wish to convert&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return &amp;nbsp; &amp;nbsp; &amp;nbsp; JSON &amp;nbsp; JSON String represent the array&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; function multiDimensionArray2JSON(thearray)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var output = &#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var opentag = &#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var closetag =&#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Only process if user input is an array */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (thearray instanceof Array)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var arraykey = [];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var keyneeded = false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Get the key, if the key is non numeric then will output&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* the key */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var key in thearray)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (thearray[key] != undefined)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arraykey.push(key); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!/^[0-9]*$/.test(key))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyneeded = true;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* use difference tag for associate array */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (keyneeded)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; opentag = &#39;{&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; closetag =&#39;}&#39;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; opentag = &#39;[&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; closetag =&#39;]&#39;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += opentag;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; arraykey.length; i++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* insert key */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (keyneeded)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += &#39;&quot;&#39;+arraykey[i]+&#39;&quot;:&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* if sub node still a array then process it */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (thearray[arraykey[i]] instanceof Array)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += multiDimensionArray2JSON(thearray[arraykey[i]]);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* if string, quoate it */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof thearray[arraykey[i]] == &#39;string&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += &#39;&quot;&#39;+thearray[arraykey[i]].replace(/\n/, &#39;\\n&#39;).replace(/\r/, &#39;\\r&#39;)+&#39;&quot;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += thearray[arraykey[i]];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* end of element, terminate it */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((i+1) != arraykey.length)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += &#39;,&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += closetag; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output += &#39;&quot;&#39;+thearray+&#39;&quot;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return output;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The Test Output&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: small;&quot;&gt;Associate Array&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            PHP json encode: 
{&quot;first&quot;:[&quot;child1&quot;,&quot;node1&quot;,[&quot;subchidl1&quot;,&quot;subnode1&quot;]],&quot;second&quot;:{&quot;0&quot;:&quot;child2&quot;,&quot;1&quot;:&quot;node3&quot;,&quot;new&quot;:true},&quot;third&quot;:[&quot;child3&quot;,3,3.33,&quot;a\r\n&quot;],&quot;forth&quot;:&quot;child4&quot;}
 (PHP json encode)        &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            
{&quot;first&quot;:[&quot;child1&quot;,&quot;node1&quot;,[&quot;subchidl1&quot;,&quot;subnode1&quot;]],&quot;second&quot;:{&quot;0&quot;:&quot;child2&quot;,&quot;1&quot;:&quot;node3&quot;,&quot;new&quot;:true},&quot;third&quot;:[&quot;child3&quot;,3,3.33,&quot;a\r\n&quot;],&quot;forth&quot;:&quot;child4&quot;}
 (multiDimensionArray2JSON)          
        &lt;/span&gt;&lt;/div&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: small;&quot;&gt;Normal Array&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            PHP json encode: 
[[&quot;child1&quot;,&quot;node1&quot;,[&quot;subchidl1&quot;,&quot;subnode1&quot;]],{&quot;0&quot;:&quot;child2&quot;,&quot;1&quot;:&quot;node3&quot;,&quot;new&quot;:true},[&quot;child3&quot;,&quot;node3&quot;],&quot;child4&quot;]
 (PHP json encode)        &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            
[[&quot;child1&quot;,&quot;node1&quot;,[&quot;subchidl1&quot;,&quot;subnode1&quot;]],{&quot;0&quot;:&quot;child2&quot;,&quot;1&quot;:&quot;node3&quot;,&quot;new&quot;:true},[&quot;child3&quot;,&quot;node3&quot;],&quot;child4&quot;]
 (multiDimensionArray2JSON)          
        &lt;/span&gt;&lt;/div&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: small;&quot;&gt;Not Array&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            PHP json encode: &quot;not array&quot; (PHP json encode)        &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            &quot;not array&quot; (multiDimensionArray2JSON)          
        &lt;/span&gt;&lt;/div&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: small;&quot;&gt;Masza&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            {&quot;carrier0&quot;:[&quot;&quot;,&quot;10&quot;],&quot;carrier1&quot;:[&quot;10&quot;,&quot;10&quot;],&quot;0carrier&quot;:[&quot;&quot;,&quot;10&quot;],&quot;1carrier&quot;:[&quot;10&quot;,&quot;10&quot;]} (PHP json encode)        &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
            {&quot;carrier0&quot;:[&quot;&quot;,&quot;10&quot;],&quot;carrier1&quot;:[&quot;10&quot;,&quot;10&quot;],&quot;0carrier&quot;:[&quot;&quot;,&quot;10&quot;],&quot;1carrier&quot;:[&quot;10&quot;,&quot;10&quot;]} (multiDimensionArray2JSON) &amp;nbsp;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;To download the test scrip, click &lt;a href=&quot;https://drive.google.com/open?id=1KxO6MqEYeluycwVRPZnyQCSNaC2LhMLJ&quot;&gt;here&lt;/a&gt;. &amp;nbsp; &amp;nbsp;&lt;/b&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/4391636767765654132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/09/javascript-multi-dimension-array-to.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/4391636767765654132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/4391636767765654132'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/09/javascript-multi-dimension-array-to.html' title='Javascript Multi-Dimension Array to JSON Converter'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-8404824702135545574</id><published>2011-08-18T19:34:00.000-07:00</published><updated>2011-08-18T19:52:25.016-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Path Finding in PHP</title><content type='html'>Lately create a path finding algorithm example using PHP for my junior to refer. Hopefully this code will also&amp;nbsp;benefit&amp;nbsp;others who look for same solution.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Scenario&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Have bunch of records which is in the tree structure with one entry point. Need to find all the possible path from entry point node until the leave node.&lt;br /&gt;
&lt;br /&gt;
Following is the tree structure.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; / | \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/ &amp;nbsp;| &amp;nbsp;\&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; 3 &amp;nbsp; 14&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/ &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; / &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; / &amp;nbsp; &amp;nbsp; &amp;nbsp;/ \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;/ &amp;nbsp; &amp;nbsp; &amp;nbsp;/ &amp;nbsp; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp;7 &amp;nbsp; &amp;nbsp; 8&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; / &amp;nbsp; &amp;nbsp; &amp;nbsp; \ &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/\&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; / &amp;nbsp;\&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;/ | \ &amp;nbsp; &amp;nbsp; &amp;nbsp;12 &amp;nbsp; 13&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; / &amp;nbsp;| &amp;nbsp;\ &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;16 &amp;nbsp;17 &amp;nbsp;18 &amp;nbsp; 15&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expected Path:&lt;br /&gt;
ROUTE1:ROUTE2:ROUTE4:ROUTE6&lt;br /&gt;
ROUTE1:ROUTE3:ROUTE5:ROUTE7:ROUTE9:ROUTE11:ROUTE16&lt;br /&gt;
ROUTE1:ROUTE3:ROUTE5:ROUTE7:ROUTE9:ROUTE11:ROUTE17&lt;br /&gt;
ROUTE1:ROUTE3:ROUTE5:ROUTE7:ROUTE9:ROUTE11:ROUTE18&lt;br /&gt;
ROUTE1:ROUTE3:ROUTE5:ROUTE8:ROUTE10:ROUTE12:ROUTE15&lt;br /&gt;
ROUTE1:ROUTE3:ROUTE5:ROUTE8:ROUTE10:ROUTE13&lt;br /&gt;
ROUTE1:ROUTE14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-size: large;&quot;&gt;&lt;b&gt;Click&amp;nbsp;&lt;span id=&quot;goog_1688631462&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://dl.dropbox.com/u/20700696/treetraveling.zip&quot;&gt;here&lt;/a&gt;&amp;nbsp;&lt;span id=&quot;goog_1688631463&quot;&gt;&lt;/span&gt;to Download.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/8404824702135545574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/08/path-finding-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8404824702135545574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8404824702135545574'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/08/path-finding-in-php.html' title='Path Finding in PHP'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-6676622237129098207</id><published>2011-05-28T08:30:00.000-07:00</published><updated>2018-04-29T05:42:36.588-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Symfony"/><title type='text'>Symfony Admin Generator Framework Skeleton</title><content type='html'>Symfony is a very useful PHP framework, specially the admin generator features! Just define the database schema, run few command and without writing a single code (errr.... sort of) the basic CRUD (Create Read Update Delete) functionality is ready! In addition, table listing, search features (with filtering function) and batch action is there too! It&#39;s amazing and thanks to Symfony developer effort on this.&lt;br /&gt;
&lt;br /&gt;
However, the output still lack of other essential features like&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Site header and site footer&lt;/li&gt;
&lt;li&gt;User authentication, user account, user permission and user group.&lt;/li&gt;
&lt;li&gt;Menu system&lt;/li&gt;
&lt;li&gt;and so on....&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJRSHmTiGECT_2gejqetMaRmkxwFSj3RD99SYQxXNr0RlwuUXFt1SoJu75ZpNHaC72A0bUQRJ4udmU_GW94hafUbHv9ZEfaN5nxseP1_T4Z6faMwHgtVMm_aLVAXgignD0cJz-xnOCmRE/s1600/admin_template_login.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;143&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJRSHmTiGECT_2gejqetMaRmkxwFSj3RD99SYQxXNr0RlwuUXFt1SoJu75ZpNHaC72A0bUQRJ4udmU_GW94hafUbHv9ZEfaN5nxseP1_T4Z6faMwHgtVMm_aLVAXgignD0cJz-xnOCmRE/s400/admin_template_login.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
To complete the admin generator functionality, I had installed the most useful plugin published on Symfony web site and put some extra effort to make other useful features to this distribution.&lt;br /&gt;
&lt;br /&gt;
Following is the extra features&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt; A basic web design with site title at header and copyright statement with company name at footer. Configurable via siteconfig.&lt;/li&gt;
&lt;li&gt;A pretty login screen&lt;/li&gt;
&lt;li&gt;Drop down menu at header. Fully configurable with two level menu supported&lt;/li&gt;
&lt;li&gt;Dynamic SMTP information that store in database, no extra code needed to use the info, just call the mailer will do. Configurable via siteconfig.&lt;/li&gt;
&lt;li&gt;Dynamic timezone on site level (with minor enhancement, can be user level too). Database still store the date time in UTC but displayed to user using configured timezone. Configurable via siteconfig.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;A simple send email form, able to send email based on the SMTP setting and each email is save to database too. HTML email support with tinyMCE use in mail composing form.&lt;/li&gt;
&lt;li&gt;Better UI compare to default template provided by Symfony admin generator. Using jquery and ajax for search reload , pagination reload and overlay search box.&lt;/li&gt;
&lt;li&gt;A nice interface&amp;nbsp; for user, group and permission management.&lt;/li&gt;
&lt;li&gt;Site Configuration tool (siteconfig) for admin to configure the parameter used by above features.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2oEZl8lgSZ7xday6a9lWUzy02TFurK_cUzQQbyEMgXD6-SCqnRXzYSuKcf_4NXcjQcZAHXM-Ji2L6LzQmDO2SwPInMYKp-EZsdG7hC9fzxOGa5MZsP_JIcdkgijhv47lZ4YoYc0IbQs/s1600/admin_template_user.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2oEZl8lgSZ7xday6a9lWUzy02TFurK_cUzQQbyEMgXD6-SCqnRXzYSuKcf_4NXcjQcZAHXM-Ji2L6LzQmDO2SwPInMYKp-EZsdG7hC9fzxOGa5MZsP_JIcdkgijhv47lZ4YoYc0IbQs/s400/admin_template_user.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Following plugins is used in this distribution&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt; symfony&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.4.11-stable&amp;nbsp;&lt;/li&gt;
&lt;li&gt;sfDoctrineGuardPlugin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.0.0-stable&amp;nbsp;&lt;/li&gt;
&lt;li&gt;mpRealityAdminPlugin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9.4-beta&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;pmSuperfishMenuPlugin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.0.1-stable&amp;nbsp;&lt;/li&gt;
&lt;li&gt;sfDatePickerTimePlugin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1.4-alpha&amp;nbsp;&lt;/li&gt;
&lt;li&gt;sfFormExtraPlugin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1.3-stable &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #cc0000;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Click &lt;span id=&quot;goog_1688631462&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://drive.google.com/open?id=1KxO6MqEYeluycwVRPZnyQCSNaC2LhMLJ&quot; target=&quot;_blank&quot;&gt;here &lt;span id=&quot;goog_1688631463&quot;&gt;&lt;/span&gt;&lt;/a&gt;to Download.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/6676622237129098207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/symfony-admin-generator-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6676622237129098207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6676622237129098207'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/symfony-admin-generator-framework.html' title='Symfony Admin Generator Framework Skeleton'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJRSHmTiGECT_2gejqetMaRmkxwFSj3RD99SYQxXNr0RlwuUXFt1SoJu75ZpNHaC72A0bUQRJ4udmU_GW94hafUbHv9ZEfaN5nxseP1_T4Z6faMwHgtVMm_aLVAXgignD0cJz-xnOCmRE/s72-c/admin_template_login.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-1700107048904855163</id><published>2011-05-13T21:44:00.000-07:00</published><updated>2011-05-13T21:47:52.974-07:00</updated><title type='text'>PHP Pear Mail Test Kit</title><content type='html'>&lt;span id=&quot;goog_1991208956&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1991208957&quot;&gt;&lt;/span&gt;Requested by the support team, I had build a PHP page that able to test the functionality of the PHP Pear Mail module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_cCDFN6u76Dc1xaom5LpE6hcX2uN-lLElVm57VOLhG6bGPmb2lmvbkAcLNifQmWqd_N7TDnbbpbF1baADmG-rWZ84vniqbcsoptXrkR0PA5E7tkL-akzcvd6RCvUuxOMKhA7jx2RdlXU/s1600/mail.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_cCDFN6u76Dc1xaom5LpE6hcX2uN-lLElVm57VOLhG6bGPmb2lmvbkAcLNifQmWqd_N7TDnbbpbF1baADmG-rWZ84vniqbcsoptXrkR0PA5E7tkL-akzcvd6RCvUuxOMKhA7jx2RdlXU/s320/mail.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
The features included&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Validate installation of PEAR&lt;/li&gt;
&lt;li&gt;Validate installation of PEAR Mail module&lt;/li&gt;
&lt;li&gt;Support all send mail options that supported by PEAR Mail - mail, direct sendmail, SMTP.&lt;/li&gt;
&lt;li&gt;Enable or disable SMTP authentication.&lt;/li&gt;
&lt;li&gt;Full validation on user input&lt;/li&gt;
&lt;li&gt; ALL in a SINGLE file, easy to install.&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_cCDFN6u76Dc1xaom5LpE6hcX2uN-lLElVm57VOLhG6bGPmb2lmvbkAcLNifQmWqd_N7TDnbbpbF1baADmG-rWZ84vniqbcsoptXrkR0PA5E7tkL-akzcvd6RCvUuxOMKhA7jx2RdlXU/s1600/mail.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;HTML&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HEAD&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TITLE&amp;gt;PHP Pear Mail Test Tool&amp;lt;/TITLE&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;META NAME=&quot;Generator&quot; CONTENT=&quot;TextPad 4.6&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;META NAME=&quot;Author&quot; CONTENT=&quot;comcrazy&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;META NAME=&quot;Keywords&quot; CONTENT=&quot;php pear mail test tool&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;META NAME=&quot;Description&quot; CONTENT=&quot;PHP Pear Mail test tool, support mail, sendmail and SMTP&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .errormsg&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: red;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .notimsg&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: blue;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;lt;![CDATA[&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function authChange()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(document.getElementById(&#39;smtpAuth&#39;).checked)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUsername&#39;).disabled = false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPassword&#39;).disabled = false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUserRequired&#39;).style.display = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPasswordRequired&#39;).style.display = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUsername&#39;).disabled = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPassword&#39;).disabled = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUsername&#39;).value = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPassword&#39;).value = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUserRequired&#39;).style.display = &quot;none&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPasswordRequired&#39;).style.display = &quot;none&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function validateForm()&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var emailReg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;fromEmailError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;toEmailError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;subjectError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;smtpserverError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;smtpportError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUsernameError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPasswordError&#39;).innerHTML = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var errDetect = false;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var notDataErrMsg = &quot;Required.&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var invalidEmailMsg = &quot;Invalid email format&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fromEmail = document.getElementById(&#39;fromEmail&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var toEmail = document.getElementById(&#39;toEmail&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var subject = document.getElementById(&#39;subject&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var emailContent = document.getElementById(&#39;emailContent&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var smtpserver = document.getElementById(&#39;smtpserver&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var smtpport = document.getElementById(&#39;smtpport&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var emailUsername = document.getElementById(&#39;emailUsername&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var emailPassword = document.getElementById(&#39;emailPassword&#39;).value;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fromEmail.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;fromEmailError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(emailReg.test(fromEmail) == false)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;fromEmailError&#39;).innerHTML = invalidEmailMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (toEmail.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;toEmailError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(emailReg.test(toEmail) == false)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;toEmailError&#39;).innerHTML = invalidEmailMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (subject.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;subjectError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (document.getElementById(&#39;mailerSMTP&#39;).checked)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (smtpserver.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;smtpserverError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (smtpport.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;smtpportError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (!parseInt(smtpport) || parseInt(smtpport) &amp;lt;= 0 || parseInt(smtpport) &amp;gt; 65535)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;smtpportError&#39;).innerHTML = &quot;Invalid port number, should between 1 - 65535&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (document.getElementById(&#39;smtpAuth&#39;).checked)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (emailUsername.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailUsernameError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (emailPassword.length == 0)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;emailPasswordError&#39;).innerHTML = notDataErrMsg;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errDetect = true;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (errDetect == true? false : true);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ]]&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/HEAD&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BODY&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;H1 style=&quot;margin-bottom: 0;&quot;&amp;gt;PHP Pear Mail Tester&amp;lt;/H1&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div style=&quot;margin-top: 0&quot;&amp;gt;by &amp;lt;a href=&quot;http://comcrazy-devcenter.blogspot.com/&quot; alt=&quot;comcrazy development centre&quot;&amp;gt;comcrazy&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HR/&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; include_once &#39;System.php&#39;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; include_once &#39;Mail.php&#39;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (class_exists(&#39;System&#39;, false))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!class_exists(&#39;Mail&#39;, false))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;span class=&#39;errormsg&#39;&amp;gt;ERROR: Pear Mail Module is not installed or not define at include path.&amp;lt;/span&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;HR/&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;span class=&#39;errormsg&#39;&amp;gt;ERROR: Pear is not installed or not define at include path.&amp;lt;/span&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;HR/&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $errMsg = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $notiMsg = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (isset($_REQUEST[&#39;mailer&#39;]))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $to = $_REQUEST[&#39;toEmail&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subject = $_REQUEST[&#39;subject&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $message = $_REQUEST[&#39;emailContent&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $from = $_REQUEST[&#39;fromEmail&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($_REQUEST[&#39;mailer&#39;][0] == &quot;mail&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $mailer = Mail::factory(&#39;mail&#39;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if ($_REQUEST[&#39;mailer&#39;][0] == &quot;sendmail&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $mailer = Mail::factory(&#39;sendmail&#39;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if ($_REQUEST[&#39;mailer&#39;][0] == &quot;smtp&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $host = $_REQUEST[&#39;smtpserver&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $port = $_REQUEST[&#39;smtpport&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $auth = $_REQUEST[&#39;smtpAuth&#39;] == &quot;on&quot; ? TRUE : FALSE;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($auth)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $username = $_REQUEST[&#39;emailUsername&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $password = $_REQUEST[&#39;emailPassword&#39;];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $username = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $password = &quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $mailer = Mail::factory(&#39;smtp&#39;, array(&#39;host&#39; =&amp;gt; $host,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;port&#39; =&amp;gt; $port,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;auth&#39; =&amp;gt; $auth,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;username&#39; =&amp;gt; $username,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;password&#39; =&amp;gt; $password,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;debug&#39; =&amp;gt; true));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $errMsg = &quot;No Mailer is choosen&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!strlen($errMsg))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $headers = array(&#39;From&#39; =&amp;gt; $from,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;To&#39; =&amp;gt; $to,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Subject&#39; =&amp;gt; $subject);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $mail = $mailer-&amp;gt;send($to, $headers, $message);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (PEAR::isError($mail))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $errMsg = $mail-&amp;gt;getMessage();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $notiMsg = &quot;Email successfully sent!&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (strlen($errMsg))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;BR/&amp;gt;&amp;lt;span class=&#39;errormsg&#39;&amp;gt;$errMsg&amp;lt;/span&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (strlen($notiMsg))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;BR/&amp;gt;&amp;lt;span class=&#39;notimsg&#39;&amp;gt;$notiMsg&amp;lt;/span&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;HR/&amp;gt;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form method=&quot;post&quot; action=&quot;&quot; id=&quot;mailForm&quot; onsubmit=&quot;return validateForm();&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; style=&quot;float: left&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th colspan=&quot;2&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input name=&quot;mailer[]&quot; type=&quot;radio&quot; value=&quot;mail&quot; CHECKED onclick=&quot;document.getElementById(&#39;mailserver&#39;).style.display=&#39;none&#39;&quot;/&amp;gt;Mail()&amp;amp;nbsp;&amp;amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input name=&quot;mailer[]&quot; type=&quot;radio&quot; value=&quot;sendmail&quot; onclick=&quot;document.getElementById(&#39;mailserver&#39;).style.display=&#39;none&#39;&quot;/&amp;gt;Direct Sendmail&amp;amp;nbsp;&amp;amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id=&quot;mailerSMTP&quot; name=&quot;mailer[]&quot; type=&quot;radio&quot; value=&quot;smtp&quot; onclick=&quot;document.getElementById(&#39;mailserver&#39;).style.display=&#39;&#39;&quot;/&amp;gt;SMTP&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;From:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;fromEmail&quot; name=&quot;fromEmail&quot; size=&quot;30&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;fromEmailError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;To:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;toEmail&quot; name=&quot;toEmail&quot; size=&quot;30&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;toEmailError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;Subject:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;subject&quot; name=&quot;subject&quot; size=&quot;30&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;subjectError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;textarea id=&quot;emailContent&quot; name=&quot;emailContent&quot; cols=&quot;50&quot; rows=&quot;8&quot;&amp;gt;This is a message&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table id=&quot;mailserver&quot; border=&quot;1&quot; cellpadding=&quot;2&quot; style=&quot;float: left; display:none&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th colspan=&quot;2&quot;&amp;gt;Email Server Configuration&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;SMTP Host:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;smtpserver&quot; name=&quot;smtpserver&quot; size=&quot;30&quot; value=&quot;ssl://smtp.gmail.com&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;smtpserverError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;SMTP Port:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;smtpport&quot; name=&quot;smtpport&quot; size=&quot;30&quot; value=&quot;465&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;smtpportError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Authentication:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;smtpAuth&quot; name=&quot;smtpAuth&quot; type=&quot;checkbox&quot; CHECKED onchange=&quot;authChange()&quot;/&amp;gt;Authentication Required&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span id=&quot;emailUserRequired&quot; style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;Username:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;emailUsername&quot; name=&quot;emailUsername&quot; size=&quot;30&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;emailUsernameError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;span id=&quot;emailPasswordRequired&quot; style=&quot;color:red&quot;&amp;gt;*&amp;lt;/span&amp;gt;Password:&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id=&quot;emailPassword&quot; type=&quot;password&quot; name=&quot;emailPassword&quot; size=&quot;30&quot;/&amp;gt;&amp;lt;div class=&quot;errormsg&quot; id=&quot;emailPasswordError&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div style=&quot;height:5px; width: 100%; clear:both&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Send Email&quot;&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/BODY&amp;gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/HTML&amp;gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/1700107048904855163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/php-pear-mail-test-kit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1700107048904855163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/1700107048904855163'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/php-pear-mail-test-kit.html' title='PHP Pear Mail Test Kit'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_cCDFN6u76Dc1xaom5LpE6hcX2uN-lLElVm57VOLhG6bGPmb2lmvbkAcLNifQmWqd_N7TDnbbpbF1baADmG-rWZ84vniqbcsoptXrkR0PA5E7tkL-akzcvd6RCvUuxOMKhA7jx2RdlXU/s72-c/mail.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-7383957638129157285</id><published>2011-03-31T19:28:00.000-07:00</published><updated>2011-04-12T08:27:45.724-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Enhancement of jquery datetime plugin</title><content type='html'>&lt;b&gt;The problem&lt;/b&gt;&lt;br /&gt;
Lately integrate jquery datetime v1.0.5 plugin (http://plugins.jquery.com/project/datetime) into my web app to let user choose both date and time. When using it, found a problem if below conditions is applied.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt; Min date and Max date is set.&lt;/li&gt;
&lt;li&gt; Default date and time is the middle of min and max date and the default date is following month of min date.&lt;/li&gt;
&lt;li&gt;e.g. Min date is 28/04/2011, Max date is 30/06/2011 and default date is 30/04/2011 16:00. &lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
The problem are&lt;br /&gt;
&lt;ol&gt;&lt;li&gt; The calender shown May calender as expected but the previous button is disable and user cannot back to April which the Min date is set.&lt;/li&gt;
&lt;li&gt;User can forward to additional two months after the Max date month, which mean this case the next button only disable when user access until month of August. However, user still cannot choose the date after the Max date.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The catch&lt;/b&gt;&lt;br /&gt;
After study the code found out the issue. (Following line number is refer to the src edition of javascript). Code between line 121 - 124 is in charge to enable and disabled the next and previous button. Originally, condition&amp;nbsp; used is comparing the unix time get from date object &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;((min &amp;gt; date.getTime())&lt;/span&gt; or &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;((min &amp;lt; date.getTime())&lt;/span&gt;&lt;/span&gt;. But somehow I found out that the date object day is modified at line 118 and this cause the month of date is changed in certain condition. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The solution&lt;/b&gt;&lt;br /&gt;
In order to solve the problem below is the code to replace the original code from line 121-124.&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; html += ($.inArray(className, [ &#39;last&#39;, &#39;middle&#39; ]) &amp;gt; -1) ? &#39;&#39; : &#39;&amp;lt;a title=&quot;Prev&quot; class=&quot;ui-datetime-prev ui-corner-all&#39;+&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((month &amp;lt;= this.minDate.getMonth()) ? &#39; ui-state-disabled&#39; : &#39;&#39;)+&#39;&quot;&amp;gt;&amp;lt;span class=&quot;ui-icon ui-icon-circle-triangle-w&quot;&amp;gt;Prev&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; html += ($.inArray(className, [ &#39;first&#39;, &#39;middle&#39; ]) &amp;gt; -1) ? &#39;&#39; : &#39;&amp;lt;a title=&quot;Next&quot; class=&quot;ui-datetime-next ui-corner-all&#39;+&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((this.maxDate.getMonth() &amp;lt;= month) ? &#39; ui-state-disabled&#39; : &#39;&#39;)+&#39;&quot;&amp;gt;&amp;lt;span class=&quot;ui-icon ui-icon-circle-triangle-e&quot;&amp;gt;Next&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
What I change is the rule of comparing &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;(month &amp;lt;= this.minDate.getMonth()&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;(this.maxDate.getMonth() &amp;lt;= month)&lt;/span&gt;. [month] is a variable created at line 114, it&#39;s out of for loop and it never change after initialization. Since calender navigation is month by month, I use the [month] to compare again the Min date and Max date month.</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/7383957638129157285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/03/enhancement-of-jquery-datetime-plugin.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/7383957638129157285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/7383957638129157285'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/03/enhancement-of-jquery-datetime-plugin.html' title='Enhancement of jquery datetime plugin'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-6789341604818176351</id><published>2011-01-19T01:04:00.000-08:00</published><updated>2011-01-19T01:04:01.046-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EXCEL"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Excel column label calculation (increment)</title><content type='html'>Sharing out the code that calculate the excel column label by increment. Suitable for any version of excel.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Calculate the column label base on incremental value&lt;br /&gt;
&amp;nbsp;* @param string $txtCurrID Column label for start position&lt;br /&gt;
&amp;nbsp;* @param int $intIncrement Number of columns that need to be forwarded&lt;br /&gt;
&amp;nbsp;* @return string&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
function increaseColumnID($txtCurrID, $intIncrement)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID=&quot;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $secondID=&quot;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $intCalVal=&quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Make sure the label is in upper case */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $txtCurrID = strtoupper($txtCurrID);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Split the label, since the max label is two character,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * so take first and second character */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(2 == strlen($txtCurrID)) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID = $txtCurrID[0];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $secondID = $txtCurrID[1];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if(1 == strlen($txtCurrID)) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $secondID = $txtCurrID;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* If the increment more than 26, increase the first id by one&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * , reduct the increment 26 each loop until it smaller or&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * equal to 26 */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while ($intIncrement &amp;gt; 26)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $intIncrement -= 26;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($firstID == &quot;&quot;) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID = &quot;A&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID = chr(ord($firstID) + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* If increment apply to current second label more than character &#39;Z&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * (90), then we increment the first label again */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((ord($secondID)+$intIncrement) &amp;gt; 90)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($firstID == &quot;&quot;) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID = &quot;A&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $firstID = chr(ord($firstID) + 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $intIncrement = (ord($secondID)+$intIncrement) - 90;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Need to minus one because we start from &#39;A&#39; (65) */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $secondID = chr(65 + $intIncrement -1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $secondID = chr(ord($secondID)+$intIncrement);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* return the calculated label in string format */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return $firstID.$secondID;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
echo &quot;A:25 = &quot;.increaseColumnID(&quot;A&quot;, 25).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;A:26 = &quot;.increaseColumnID(&quot;A&quot;, 26).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;A:50 = &quot;.increaseColumnID(&quot;A&quot;, 50).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;aa:1 = &quot;.increaseColumnID(&quot;aa&quot;, 1).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;aa:26 = &quot;.increaseColumnID(&quot;aa&quot;, 26).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;aa:52 = &quot;.increaseColumnID(&quot;aa&quot;, 52).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;b:52 = &quot;.increaseColumnID(&quot;b&quot;, 52).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
echo &quot;A:100 = &quot;.increaseColumnID(&quot;A&quot;, 100).&quot;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/6789341604818176351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/excel-column-label-calculation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6789341604818176351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/6789341604818176351'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/excel-column-label-calculation.html' title='Excel column label calculation (increment)'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-8309759913112866262</id><published>2011-01-16T18:56:00.000-08:00</published><updated>2011-01-16T19:13:20.562-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE8"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><title type='text'>IE8 : jquery : ajaxfileupload : Syntax Error: Unterminated string constant</title><content type='html'>&lt;u&gt;&lt;b&gt;The problem&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Write a web app to  upload a file, read the content then return the content in HTML table using JSON format then display the result dynamically at current HTML page. Below is the JSON return by a PHP script.&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{filename: &#39;input.dat&#39;,total_recipient: &#39;1&#39;,totalcolumn: &#39;3&#39;,samples: &#39;&amp;lt;table width=&quot;400px&quot;&amp;gt;&amp;lt;thead&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Column 1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Column 2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Column 3&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/thead&amp;gt;&amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;phone no&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;address&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&#39;,columntag: &#39;{Col_1},{Col_2},{Col_3},&#39;}&lt;/span&gt;&lt;/blockquote&gt;As usual it work perfectly on FF 3.5.3, but when come to IE8 I got the error message &quot;Syntax Error: Unterminated string constant&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;The catch&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
From the JSON alert on IE8, a linefeed (\r) follow by newline (\n) is inserted on some HTML tag. JSON result has following content.&lt;br /&gt;
&lt;blockquote&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{filename: &#39;input.dat&#39;,total_recipient: &#39;1&#39;,totalcolumn: &#39;3&#39;,samples: &#39;\r\n&amp;lt;table width=&quot;400px&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;thead&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;th&amp;gt;Column 1&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;th&amp;gt;Column 2&amp;lt;/th&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;th&amp;gt;Column 3&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/thead&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;tbody&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;td&amp;gt;phone no&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;td&amp;gt;address&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&#39;,columntag: &#39;{Col_1},{Col_2},{Col_3},&#39;}&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;The solution&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
The quick hack is to remove the \r\n before it pass to browser to process. Edit the ajaxfileupload javascript file. At uploadHttpData function, look for the data type is JSON. Add following line before it run the eval() function.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;data = data.replace(new RegExp( &quot;[\\n|\\r]&quot;, &quot;g&quot; ), &quot;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;u&gt;Environment&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Broswer : Internet Explorer 8.07600.16385&lt;/li&gt;
&lt;li&gt;OS: Window 7&lt;/li&gt;
&lt;li&gt;HTML Doc Type: DTD HTML 4.01&lt;/li&gt;
&lt;li&gt;JS Lib: jquery&amp;nbsp; 1.4.4&lt;/li&gt;
&lt;li&gt;Jquery Plug-in: ajaxfileupload v1.0&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0980576857&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&amp;nbsp; &lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1935182323&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt; &lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0596528388&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt; &lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1450502288&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0321472667&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/8309759913112866262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/ie8-jquery-ajaxfileupload-syntax-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8309759913112866262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/8309759913112866262'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/ie8-jquery-ajaxfileupload-syntax-error.html' title='IE8 : jquery : ajaxfileupload : Syntax Error: Unterminated string constant'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-5056322238424926085</id><published>2011-01-15T07:24:00.000-08:00</published><updated>2011-12-07T23:22:27.380-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE8"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>IE8 : Object doesn&#39;t support this property or method</title><content type='html'>&lt;b&gt;&lt;u&gt;The problem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Try to load following html to IE8 then insert some text to the input box and click the button. It should just alert the text you had key in but it give a javascript error &quot;Object doesn&#39;t support this property or method&quot;. Below code work perferly on FF 3.5.3.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;&lt;/span&gt;&lt;a href=&quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;http://www.w3.org/TR/html4/strict.dtd&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;ID Test&amp;lt;/TITLE&amp;gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
function testnow()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;inputvalue = document.getElementById(&#39;inputvalue&#39;).value;&lt;br /&gt;
&amp;nbsp;alert (&quot;input value is [&quot;+inputvalue+&quot;]&quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;
&amp;lt;BODY&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;H3&amp;gt;Input Text&amp;lt;/H3&amp;gt;&lt;br /&gt;
&amp;lt;input id=&quot;inputvalue&quot; type=&quot;tet&quot;&amp;gt;&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;button onclick=&quot;testnow()&quot;&amp;gt;click me&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;u&gt;The&amp;nbsp;catch&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
The cause of this js error is the HTML ID of the input (which is &quot;inputvalue&quot;) is same as the js variable name used in testnow() function. IE8 seem can access the HTML element just use the ID directly. Try to replace testnow() function codes with this code &lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;alert (inputvalue.value);&lt;/span&gt; . It work in IE8! of course, will not work in FF3.5.3.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;The solution&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;While declare a js variable, use the var keyword (e.g. &lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;var inputvalue=&quot;&quot;&lt;/span&gt;). &lt;/li&gt;
&lt;li&gt;Do not use the same name at both&amp;nbsp;HTML ID and javascript variable name. &lt;/li&gt;
&lt;li&gt;Best practice, give better name for you variable like txtInputValue.&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;&lt;u&gt;Environment&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Broswer : Internet Explorer 8.07600.16385&lt;/li&gt;
&lt;li&gt;OS: Window 7&lt;/li&gt;
&lt;li&gt;HTML Doc Type: DTD HTML 4.01&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;&lt;/ol&gt;
&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1890774553&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&amp;nbsp; &lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=047022780X&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt; &lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=codece-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1430228539&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/5056322238424926085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/ie8-object-doesnt-support-this-property.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5056322238424926085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/5056322238424926085'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/01/ie8-object-doesnt-support-this-property.html' title='IE8 : Object doesn&#39;t support this property or method'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2142845370944726605.post-4161577510185789128</id><published>2010-05-08T08:28:00.000-07:00</published><updated>2011-05-28T08:33:47.903-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Amazon EC2"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloud Computing"/><category scheme="http://www.blogger.com/atom/ns#" term="EUCALYPTUS"/><category scheme="http://www.blogger.com/atom/ns#" term="IAAS"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Open Source Software"/><title type='text'>Machine Image Tool - A GUI Disk Dump Tool</title><content type='html'>While involving in cloud computing project, migrate virtual machine image is a common activity in order to use current virtual machine image in EUCALYPTUS environment.&lt;br /&gt;
&lt;br /&gt;
However, for non technical people to&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;mount a loop file,&amp;nbsp;&lt;/li&gt;
&lt;li&gt;list the partition in the mounted loop file and&lt;/li&gt;
&lt;li&gt; using disk dump (dd) to dump the partition to a file&lt;/li&gt;
&lt;/ol&gt;is really not a straight forward job. To ease the user, I had build a java based GUI tool to solved the problem.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxAxEmLcmJ3b8gKZvfFK7hng8vY4bXj8sGFSbSVkVz3eHF4uAGASZCyVbcr3VibXU7eVYakcc-wz-vSIzI_IX68J0IHdEbcyM_qP10Wu3DXPC25DlBnmcQwwn4WaAr7S_PgZVRS4jxec/s1600/mitool_main.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxAxEmLcmJ3b8gKZvfFK7hng8vY4bXj8sGFSbSVkVz3eHF4uAGASZCyVbcr3VibXU7eVYakcc-wz-vSIzI_IX68J0IHdEbcyM_qP10Wu3DXPC25DlBnmcQwwn4WaAr7S_PgZVRS4jxec/s320/mitool_main.png&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Following is the main features for Machine Image Tool (mitool)&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Export partition to new loop file&lt;/li&gt;
&lt;li&gt;Support Partition - primary&lt;/li&gt;
&lt;li&gt;Support loop file format - RAW&lt;/li&gt;
&lt;/ul&gt;It able to read a machine image in RAW format (qcow and VMDK not yet support) then show user all the partitions that contain in the machine image.&amp;nbsp; User can select a partition and export to a file. The exported file then can use as the disk image in EUCALYPTUS cloud computing platform.&lt;br /&gt;
&lt;br /&gt;
To have a try on this tool, please visit &lt;a href=&quot;http://sourceforge.net/projects/mitool/&quot;&gt;&lt;span id=&quot;goog_482287588&quot;&gt;http://sourceforge.net/projects/mitool/&lt;/span&gt;&lt;span id=&quot;goog_482287589&quot;&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;goog_482287586&quot;&gt;-&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://comcrazy-devcenter.blogspot.com/feeds/4161577510185789128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/machine-image-tool-gui-disk-dump-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/4161577510185789128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2142845370944726605/posts/default/4161577510185789128'/><link rel='alternate' type='text/html' href='http://comcrazy-devcenter.blogspot.com/2011/05/machine-image-tool-gui-disk-dump-tool.html' title='Machine Image Tool - A GUI Disk Dump Tool'/><author><name>James Ong</name><uri>http://www.blogger.com/profile/05467288026520976934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxAxEmLcmJ3b8gKZvfFK7hng8vY4bXj8sGFSbSVkVz3eHF4uAGASZCyVbcr3VibXU7eVYakcc-wz-vSIzI_IX68J0IHdEbcyM_qP10Wu3DXPC25DlBnmcQwwn4WaAr7S_PgZVRS4jxec/s72-c/mitool_main.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>