<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Cohesive Web</title>
	<atom:link href="http://blog.webconsultingengineering.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.webconsultingengineering.com</link>
	<description>In search the reasons of web addiction</description>
	<pubDate>Sat, 30 Aug 2008 07:31:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Converting Excel date/time to Unix timestamp</title>
		<link>http://blog.webconsultingengineering.com/phptalk/timestamp-excel2unix.html</link>
		<comments>http://blog.webconsultingengineering.com/phptalk/timestamp-excel2unix.html#comments</comments>
		<pubDate>Fri, 29 Aug 2008 13:04:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Talk]]></category>

		<guid isPermaLink="false">http://blog.webconsultingengineering.com/?p=12</guid>
		<description><![CDATA[Timestamp conversion are required when you import information generated by Windows based application to UNIX system. I faced a similar type of problem when I was trying to read data from a MS Excel file and storing it in MySQL database using a php code.
I was using Excel_reader class to read the Excel file. In [...]]]></description>
			<content:encoded><![CDATA[<p>Timestamp conversion are required when you import information generated by Windows based application to UNIX system. I faced a similar type of problem when I was trying to read data from a MS Excel file and storing it in MySQL database using a php code.</p>
<p>I was using Excel_reader class to read the Excel file. In that file there were two columns for 2 dates. While reading those column value I found they contain some numeric value. Those values are not same as unix timestamp value. As I was trying to store those values as timestamp I need to convert them into the timestamp.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-2303357471658970";
/* blog inside 071708 */
google_ad_slot = "2791882164";
google_ad_width = 360;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
After some searching and reading from internet I found that Windows and Unix system stores timestamp in different manner. Once this is clear to me I have converted them easily. So let us understand how these two system stores timestamp .</p>
<p>In Unix system timestamp is stored as integer in terms of seconds. If we consider the current timestamp value in Unix then it is basically the no. of seconds passed from 1 January 1970 00.00Hrs to till now. One important thing for Unix timestamp is that it is measured with reference to GMT time. That means there is no time-zone adjustment considered in case of Unix timestamp.</p>
<p>In case of Windows time it is stored as floating point/real number but in terms of days. For current timestamp, the no. days spent from 1 January 1900 stored in integer part and fraction of the day stored in the fractional part of the timestamp.</p>
<p>Now comes the conversion process. I made a simple conversion calculation as follows:</p>
<p class="code"><code><br />
$DayDifference = 25569; //Day difference between 1 January 1900 to 1 January 1970<br />
$Day2Seconds = 86400; // no. of seconds in a day<br />
$ExcelTime //integer value stored in the Excel column<br />
$UnixTime = ($ExcelTime - $DayDifference)*$Day2Seconds;<br />
</code></p>
<p>Now if you look at the calculation, you may find that the conversion is not absolutely accurate. This is because I haven&#8217;t consider the fractional part of the Excel time. The reason behind doing so is that all I need to do is to convert a date from Windows format to Unix format. So fraction part of windows time won&#8217;t affect a lot for my requirement. But if you use this calculation for converting a date-time from Windows format to Unix format then conversion of the fractional part should done.<br />
If you like this small tips please let me know about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webconsultingengineering.com/phptalk/timestamp-excel2unix.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>I got my new logo</title>
		<link>http://blog.webconsultingengineering.com/off-beat/i-got-my-new-logo.html</link>
		<comments>http://blog.webconsultingengineering.com/off-beat/i-got-my-new-logo.html#comments</comments>
		<pubDate>Wed, 27 Aug 2008 11:49:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Off Beat]]></category>

		<guid isPermaLink="false">http://blog.webconsultingengineering.com/?p=6</guid>
		<description><![CDATA[For me its a celebration time! Wanna know why ?
Well I got my new logo for my website and company. At first take a look at it.

Designed by my friend Nilkamal. Before he start working on it he asked me a simple question.
Do you dream about it?
I said yes. After 2 days this is the [...]]]></description>
			<content:encoded><![CDATA[<p>For me its a celebration time! Wanna know why ?</p>
<p>Well I got my new logo for my website and company. At first take a look at it.</p>
<p><a href="http://www.webconsultingengineering.com/images/wce_logo.gif"><img title="WCE Logo" src="http://www.webconsultingengineering.com/images/wce_logo.gif" alt="WCE Logo" width="477" height="181" /></a></p>
<p>Designed by my friend Nilkamal. Before he start working on it he asked me a simple question.</p>
<blockquote><p>Do you dream about it?</p></blockquote>
<p>I said yes. After 2 days this is the outcome. Simple but caries the senses. I like this guy, not because he is my friend but because of his artistic senses. I also love his professionalism. Together we had lot discussions related to art, culture, trends in visualization jobs and many more. Some day I will try to take his interview and then post it here.</p>
<p><span style="color: #993300;"><small>** This is a long waiting post, as I was very busy with my jobs. Also I found some problem with my blog, which needed fresh installation. So I upgrade it with current version and make this post live.</small></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webconsultingengineering.com/off-beat/i-got-my-new-logo.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>QuickForm and Jscalendar</title>
		<link>http://blog.webconsultingengineering.com/phptalk/quickform-jscalendar.html</link>
		<comments>http://blog.webconsultingengineering.com/phptalk/quickform-jscalendar.html#comments</comments>
		<pubDate>Tue, 08 Jul 2008 08:19:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Talk]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[dbtable]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[forms]]></category>

		<category><![CDATA[jscalendar]]></category>

		<category><![CDATA[pear]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[quickform]]></category>

		<guid isPermaLink="false">http://blog.webconsultingengineering.com/?p=5</guid>
		<description><![CDATA[Most of us are familiar with calendars in web pages. Small calendar showing date and year are really good to see and useful too. While in case of forms we have seen calendars attached with date fields. In some of my earlier projects I have designed date fields using simple drop down menu containing the [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us are familiar with calendars in web pages. Small calendar showing date and year are really good to see and useful too. While in case of forms we have seen calendars attached with date fields. In some of my earlier projects I have designed date fields using simple drop down menu containing the data, month and year menu. It’s good but not very user friendly as user need to select 3 menus to choose a certain date. I had to stick with that format as I mostly use PEAR <a title="HTML_QuickForm" href="http://pear.php.net/package/HTML_QuickForm">HTML_QuickForm</a> to design forms in the web pages. Among many reasons the most unavoidable one is that it automatically generates client side validation JavaScript code. With time I realized that I should find some options to integrate calendar object with the QuickForm.</p>
<p>After giving a thorough search I selected <a title="Jscalendar" href="http://www.dynarch.com/projects/calendar/">jscalendar</a> to incorporate with my form elements. The reasons behind selecting jscalendar are:</p>
<ul>
<li>It has a nice interface and wide variety of themes.</li>
<li>Multiple integration options along with selectable date format to put the date in the text field.</li>
<li>Support for integrating the calendar object with HTML_QuickForm.</li>
</ul>
<div style="padding:0px;"></div>
<p>Prior to integrate the jscalendar I need to upgrade HTML_QuickFom version to 3.2.10 as I found some code added in this version to support jscalendar. I also need to upgrade my <a href="http://pear.php.net/package/DB">PEAR DB</a> package to version 1.7.13 and <a href="http://pear.php.net/package/DB_Table">DB_Table</a> to version 1.5.5. In my projects most of the cases I generate forms using DB_Table instead of using QuickForm directly. This gives an extra benefit for data validation and storing them in database.</p>
<p>After the up-gradating the required pear packages I worked upon integrating the jscalendar code. After a spending a moderate amount of time I was able to work jscalender with the QuickForm. But unfortunately when I was trying generate forms using DB_Table jscalendar component was not working. I was getting javascript errors.<br />
I was following the method described by Philippe Jausions of <a href="http://www.11abacus.com/">11abacus</a> in jscalendar.php file. It was working fine with the QuickForm. In that case I was using addElements function to add jscalendar with proper options using the $option array like this –</p>
<p class="code"><code><br />
$options = array(<br />
                      'baseURL' =&gt; '../js/jscalendar/',<br />
                      'styleCss' =&gt; 'calendar-win2k-1.css',<br />
                      'language' =&gt; 'en',<br />
                      'button'   =&gt; '',<br />
                      'setup' =&gt; array(<br />
                                            'inputField' =&gt; 'datefield1',<br />
                                            'ifFormat' =&gt; '%d.%m.%Y %H:%M',<br />
                                            'showsTime' =&gt; true,<br />
                                            'time24' =&gt; true,<br />
                                            'weekNumbers' =&gt; false,<br />
                                            'showOthers' =&gt; true<br />
                                            ),<br />
                      );<br />
$form-&gt;addElement('jscalendar', ' datefield1', 'My Date', $options);<br />
</code></p>
<p>I used this same option array in the column definition for the same field, as DB_Table uses the column definition for the attributes of the form elements of the form. I written like</p>
<p class="code"><code><br />
'datefield1' =&gt; array(<br />
                               'type'    =&gt; 'varchar',<br />
                               'size'    =&gt; 20,<br />
                               'qf_type' =&gt; 'jscalendar',<br />
                               'qf_label'=&gt; '&lt;span class="caption"&gt;Date:&lt;/span&gt;',<br />
                               'require' =&gt; false,<br />
                               'qf_attrs' =&gt; array('class'=&gt; 'formfield','id' =&gt; 'datefield1'),<br />
                               'qf_opts' =&gt; array(<br />
                                                              'baseURL' =&gt; '../js/jscalendar/',<br />
                                                              'styleCss' =&gt; 'calendar-win2k-1.css',<br />
                                                              'language' =&gt; 'en',<br />
                                                              'button'   =&gt; '',<br />
                                                              'setup' =&gt; array(<br />
                                                                                         'inputField' =&gt; 'listadata',<br />
                                                                                         'ifFormat' =&gt; '%d.%m.%Y %H:%M',<br />
                                                                                         'showsTime' =&gt; true,<br />
                                                                                         'time24' =&gt; true,<br />
                                                                                         'weekNumbers' =&gt; false,<br />
                                                                                         'showOthers' =&gt; true<br />
                                                                                       ),<br />
                                                              ),<br />
                               'qf_client'=&gt; true,<br />
                               'qf_rules' =&gt; array(<br />
                                                              'required' =&gt; 'Date is required.',<br />
                                                              ),<br />
                               ),<br />
</code></p>
<p>It didn’t worked and also gave the javascript error as calendar.Setup - no such method found….<br />
Now I started working on how to fix this problem. I started checking the all the codes thoroughly and found that using QuickForm from DB_Table setting all these options can’t be done. After spending some upon those codes I rewrite the column definition like this</p>
<p class="code"><code><br />
'datefield1' =&gt; array(<br />
                               'type'    =&gt; 'varchar',<br />
                               'size'    =&gt; 20,<br />
                               'qf_type' =&gt; 'jscalendar',<br />
                               'qf_label'=&gt; '&lt;span class="caption"&gt;Date:&lt;/span&gt;',<br />
                               'require' =&gt; false,<br />
                               'qf_attrs' =&gt; array('class'=&gt; 'formfield','id' =&gt; 'datefield1'),<br />
                               'qf_opts' =&gt; array(<br />
                                                              'ifFormat' =&gt; '%d.%m.%Y',<br />
                                                              'showsTime' =&gt; false,<br />
                                                              'time24' =&gt; false,<br />
                                                              'weekNumbers' =&gt; false,<br />
                                                              'showOthers' =&gt; false,<br />
                                                              'button' =&gt; '',<br />
                                                              ),<br />
                               'qf_client'=&gt; true,<br />
                               'qf_rules' =&gt; array(<br />
                                                              'required' =&gt; 'Date is required.',<br />
                                                              ),<br />
                               ),<br />
</code></p>
<p>Also I declared the global path defining variable in the page where I was generating the form. I defined</p>
<p class="code"><code><br />
$GLOBALS['_HTML_QUICKFORM_JSCALENDAR_BASEPATH'] = &#8220;/js/jscalendar/&#8221;;<br />
</code></p>
<p>Oh that time it worked. It showed the small calendar while the clicking the small button beside the text field for data. But I wasn’t still happy with it. What I found that the calendar was coming but it wasn’t using any style and dates are raveling upon a transparent layer, making it too ugly. I tried to define the style using style class/ stylesheet file name in different places as different parameter. But nothing worked. Now I had two options then</p>
<p>Define the stylesheet for the calendar within the head tags of the page containing the form, means hardcode the name of the stylesheet.<br />
Change the coding to accommodate to options for setting the style class for the calendar.</p>
<p>Selecting the 1st option means loosing some dynamicity and selecting the 2nd option means I need to change or modify certain code in pear class package files. So it was difficult to select any option. I was investigating the benefits and the hitches which can come out as a result of using any one of those options. Also side by side I was looking for third other option which can be better then these two. I spent almost two days and came up with a decision of selecting the second option. I decided to add two lines of code in the QuicfForm.php file in the DB package as</p>
<p class="code"><code><br />
if(isset($col['qf_theme'])) {<br />
              $element-&gt;theme = $col['qf_theme'];<br />
}<br />
</code></p>
<p>Also I have added one more element in column definitions for the date field as</p>
<p class="code"><code><br />
'datefield1' =&gt; array(<br />
                               ……    …….<br />
                               ……    …….<br />
                               'qf_theme' =&gt; 'calendar-win2k-2',<br />
                               ),<br />
</code></p>
<p>Now my problem is solved and the jscalendar is working seamlessly with the QuickForm from the DB_Table package too.</p>
<p>My opinion is if you like to add the two lines of code in QuickForm.php file you can add it but you need to remember it at the time when you upgrade the pear package. Also you need to check if it works properly or not. The other way is to hardcode the stylesheet file within the head tag part of the page where you will go to generate the form. In this case you will surely loose some dynamicity but this is easier to work with. Choice is yours.</p>
<p>Currently I am working upon another important issue in php. I need some time to accomplish this job. I will discuss this issue too cause I find it very interesting. However if you find this above discussion useful then I might expect your comment here. Suggestion and queries are also welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webconsultingengineering.com/phptalk/quickform-jscalendar.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>My favorite</title>
		<link>http://blog.webconsultingengineering.com/movie/twofavorites.html</link>
		<comments>http://blog.webconsultingengineering.com/movie/twofavorites.html#comments</comments>
		<pubDate>Thu, 26 Jun 2008 12:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Hall of Movies]]></category>

		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.webconsultingengineering.com/?p=4</guid>
		<description><![CDATA[I am still searching theme for my blog. While doing so an idea came in to my mind. I must list my favorite movies in my blog. I have posted them in one of my earlier blog. Here I am cherishing them again.
First one is all about a battle. You might have seen this. If [...]]]></description>
			<content:encoded><![CDATA[<p>I am still searching theme for my blog. While doing so an idea came in to my mind. I must list my favorite movies in my blog. I have posted them in one of my earlier blog. Here I am cherishing them again.</p>
<p>First one is all about a battle. You might have seen this. If not watch it here. I&#8217;m sure you will like.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/LU8DDYz68kM&amp;hl=en&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/LU8DDYz68kM&amp;hl=en&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6"></embed></object></p>
<p>This is the 2nd highest viewed movie in <a title="YouTube" href="http://www.youtube.com" target="_blank">YouTube</a> . It almost near to 13.5 million views in YouTube. BBC has already <a title="bbc report for Battle of Kruger" href="http://news.bbc.co.uk/2/hi/africa/6938516.stm" target="_blank">reported</a> this as fast biggest web video hits. Though its a amateur video but it is becoming the envy of professional wildlife snappers. The movie has got a professional quality script which many film director like to work with, but in reality there was no script! Its a battle between survivor(calf), paladins(group of buffalo), hero of land (lions) and owner of water(crocodile). The eight-minute-long footage shows nothing can be unachievable. Enjoy the The battle of Kruger ..<br />
Some raw facts about battle of Kruger :</p>
<ul>
<li>Place : a watering hole near Pretoriuskop Camp, Mpumalanga in South Africa&#8217;s Kruger National Park</li>
<li>Time : September 2004</li>
<li>Shooter : David Budzinski acconpanied by Jason Schlosberg</li>
<li>Submitted to Youtube : May 03, 2007</li>
</ul>
<p>Now, a comment from Budzinski</p>
<blockquote><p><em><strong>&#8220;I&#8217;m not a camera person. I&#8217;m just lucky to have it!&#8221;</strong></em></p></blockquote>
<p>The second favorite movie is about time. Do you agree that sometimes each minute in our life becomes very important, vital or say crucial to our life? I&#8217;m pretty sure you will surely agree with me after watching this movie.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/ppAn0LNU_V8&amp;hl=en&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/ppAn0LNU_V8&amp;hl=en&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></embed></object></p>
<p>Some facts :</p>
<ul>
<li>Its named as <strong>Just 10 minutes</strong></li>
<li>Made by Ahmed Imamovic</li>
<li>The film won the award for the best European short film in 2002</li>
</ul>
<p>I hope you like them both. I will come up with some php related issue in my next post very soon. Till then <img src='http://blog.webconsultingengineering.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webconsultingengineering.com/movie/twofavorites.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Start Rollout</title>
		<link>http://blog.webconsultingengineering.com/intro/start-rollout.html</link>
		<comments>http://blog.webconsultingengineering.com/intro/start-rollout.html#comments</comments>
		<pubDate>Sat, 21 Jun 2008 08:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Introduction]]></category>

		<category><![CDATA[introduction]]></category>

		<guid isPermaLink="false">http://blog.webconsultingengineering.com/?p=3</guid>
		<description><![CDATA[Light!! Sound!! Action!!
Lets start.
Welcome to my blog. I gonna make my first post right now. Though I am not a good write but I feel at least I manage myself to express the thoughts that I like to share with others. I am not as good as regular blogger too, but I will definitely try [...]]]></description>
			<content:encoded><![CDATA[<p>Light!! Sound!! Action!!</p>
<p>Lets start.</p>
<p>Welcome to my blog. I gonna make my first post right now. Though I am not a good write but I feel at least I manage myself to express the thoughts that I like to share with others. I am not as good as regular blogger too, but I will definitely try my best to be like them.</p>
<p>Well this is a long awaiting moment for me since I had started blogging in another well known website. I was dreaming from that time to have my own blog in a domain owned by me. I dreamed, thought, planned, dropped all and started from scratch many times. Somehow I couldn&#8217;t reach the goal. May be I wasn&#8217;t enough prepared for that. But I kept the faith on myself that someday I will do it.</p>
<p>I have just started my own blog. Lots of things are already in my mind that I like to do, discuss over here.  I am also looking for some good template for my blog. Good suggestions are always welcome. But I really dislike spams. Believe me or not, I have proven myself as spam assassinator in early times. The first thing I have done after installing the wordpress blog is, install the anti spam pluggin <a title="Akismet" href="http://akismet.com/" target="_blank">Akismet</a>. I need to work on some message for the spammers too make them hate me. I will put that visible through out my blog.</p>
<p>I will come back with my next post very soon and I hope I will be able to get a suitable theme also.</p>
<p>Till then GoodLuck <img src='http://blog.webconsultingengineering.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webconsultingengineering.com/intro/start-rollout.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
