Friday, April 23, 2010

I am using air-pillow

One of the most interesting thing is I am using an air pillow. When I came to khulna from Dhaka I dedicated my pillow to the mess I was staying for some reasons. So, as a matter of fact I got a pillow from mukta's house as a gift. But my days turned into bad when I found that I have brought some cirpoka from the Dhaka mess and its inside my mosquitoes. The bad experience is that whenever I turned the light off this shit comes out and starts biting. I was wondering how they come and where they live. One day, I washed the mosquito very sincerely with JET but stills it is inside it and I became astonished that this shit is staying inside the pillow I am using. The time i saw, I just threw that pillow outside my room and started sleeping using some under my head. After some days, I found cirpoka is also in the books I am using and then I took a candle and burn the books page corners and also the mosquito corners. Lastly, an idea came from mukta's head that air pillow can be used. So, now I am using an air pillow cost 270 tk and it is restricted from all kinds of external object except the air. So, now no cirpoka cant disturb me when lights off. I still know it is here but at least it wont enter my pillow. I am having good experience sleeping on air pillow and planning to have air bed or others that can be air type.

thanks.

I am using air-pillow

One of the most interesting thing is I am using an air pillow. When I came to khulna from Dhaka I dedicated my pillow to the mess I was staying for some reasons. So, as a matter of fact I got a pillow from mukta's house as a gift. But my days turned into bad when I found that I have brought some cirpoka from the Dhaka mess and its inside my mosquitoes. The bad experience is that whenever I turned the light off this shit comes out and starts biting. I was wondering how they come and where they live. One day, I washed the mosquito very sincerely with JET but stills it is inside it and I became astonished that this shit is staying inside the pillow I am using. The time i saw, I just threw that pillow outside my room and started sleeping using some under my head. After some days, I found cirpoka is also in the books I am using and then I took a candle and burn the books page corners and also the mosquito corners. Lastly, an idea came from mukta's head that air pillow can be used. So, now I am using an air pillow cost 270 tk and it is restricted from all kinds of external object except the air. So, now no cirpoka cant disturb me when lights off. I still know it is here but at least it wont enter my pillow. I am having good experience sleeping on air pillow and planning to have air bed or others that can be air type.

thanks.

Thursday, April 22, 2010

To Err is human

Today after dinner, I was buying some apples from a little boy sitting in the chair of his father. I asked him, 'Can you sell apples?' He replied,'yes'. I was thinking him little boy and also thinking about the boy's family. That time a man came and started playing with a mango. I was thinking whether this man is going to exploit this young child. Anyway, nothing happened like that. I bought .5 kg apple costs 55 TK. I gave the boy 100 Tk. He returned me 45 TK and I was demanding 55 Tk. I just forgot that I gave him 100 tk. I was thinking .5 cost 55 tk and I bought .5 kg and he should cash me 55 tk back. Suddenly, that man said how much I have given to the boy. That time I felt that I an wrong and the boy is correct. I was thinking about that man but with a great surprise I noticed that my activities was likely to exploiting the boy. I felt shame and could not forgive myself for doing that. We demand ourselves educated and a bit different.. and was thinking how could I...?..but that time I remembered..education makes better human but not above human. and making mistake is a notion of human behavior....so the proverb comes 'To err is human'.

To Err is human

Today after dinner, I was buying some apples from a little boy sitting in the chair of his father. I asked him, 'Can you sell apples?' He replied,'yes'. I was thinking him little boy and also thinking about the boy's family. That time a man came and started playing with a mango. I was thinking whether this man is going to exploit this young child. Anyway, nothing happened like that. I bought .5 kg apple costs 55 TK. I gave the boy 100 Tk. He returned me 45 TK and I was demanding 55 Tk. I just forgot that I gave him 100 tk. I was thinking .5 cost 55 tk and I bought .5 kg and he should cash me 55 tk back. Suddenly, that man said how much I have given to the boy. That time I felt that I an wrong and the boy is correct. I was thinking about that man but with a great surprise I noticed that my activities was likely to exploiting the boy. I felt shame and could not forgive myself for doing that. We demand ourselves educated and a bit different.. and was thinking how could I...?..but that time I remembered..education makes better human but not above human. and making mistake is a notion of human behavior....so the proverb comes 'To err is human'.

Tuesday, April 20, 2010

Using image map and popupcontrol extender

In interactive map client provided me a jquery library which is called zoom map and he instructed to work according to that but I found some problem in work with multiple version of jquery. For example jquery-min-1.3.2 does not support the coexistence with jquery-1.4.2.js. Anyway, I am going to describe here, how to use image map and popupcontrolextender. To perform this we need to follow these steps:

Step-1: We have to register the AjaxControlToolkit for using its control which we are calling here PopupControlExtender.

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


Step-2:
Consider an image containing lots of hot spot and when there is a click on that hot spot certain popup-winow will show up. So, here is the code for image and map.

< img id="homeimg" src="maps/map-bg-w-dots.jpg" style="border-width:0px" runat="server" alt="" usemap="#homemap" / >
< map name="homemap" id="homemap">
< area id="hole1area" runat="server" target="_self" onclick="showdetails(1)" shape="circle" style="cursnor:pointer" alt="" coords="314,178,7"/>
< area id="hole2area" runat="server" target="_self" onclick="showdetails(2)" shape="circle" style="cursor:pointer" alt="" coords="285,56,7"/>
< /map>



Here, onclick="showdetails(1)" can be used to populate data from some xml file relevant to hole1area if needed. As for example I have done in
my map project

Step-3:
Now we need the popup control extender that will generate a popup. So, here is the code below:

< asp:ScriptManager runat="server">< /asp:ScriptManager>
< cc1:PopupControlExtender runat="server" ID="MyPopupExtender1" OffsetX="550" OffsetY="300" PopupControlID="popupwindow1" TargetControlID="hole1area">
< /cc1:PopupControlExtender>
< cc1:PopupControlExtender runat="server" ID="MyPopupExtender2" OffsetX="550" OffsetY="300" PopupControlID="popupwindow2" TargetControlID="hole2area">
< /cc1:PopupControlExtender>


< div id='popupwindow1'>
Description for hole1...............
< /div>
< div id='popupwindow2'>
Description for hole2................
< /div>



Here, several thing to notice:
TargetControlID= the control which will be clicked on.
PopupControlID= the control which will be shown as popup.
OffsetX= the X position where popup will be shown
OffsetY= the Y position where popup will be shown.

So, this is the simplest way to use image map and popupcontrolextender. And whenever I started working client become excited as I was not using his solution but finally I ended up with good solution and he was quite satisfied. So, this project was one of the challenging task to me.

thanks. Masud.

The challenging task in interactive map project

Few days ago I a project successfully called Interactive Map project. The development URL of this project is:
http://cpdemo.com/vistaverde/development.html
From this project I got an outline professional work and fancy works. Anyway, I was satisfying client's requirements and at time I found client has made an easy requirements visually but technically it is a tough one which I didn't perform ever. Actually, the life software engineer is quite thrilling in that sense that it is full of challenges and that's why I could not leave this despite of being a university lecturer. Anyway, here the way I solved the problem.

Requirement: to stop hiding the popup-window at click outside the popup window.
Relevance description: I was using asp.net ajax control toolkit to make a popup-window after a mouse click on some hot spot on an image map. And default behavior of the popup window as designed by the toolkit developers was to be hidden at the mouse click outside the popup window. I tried a lots of ways but I could not stop the mouse click. I used e.stopPropagation(){for FF} and e.cancelBubble=true {for IE} but nothing works for me and lastly I found some tutorials and several combination of them works.

Steps to solution:
step-1: to override the default behavior of the toolkit we need to override the function. For example, I was using popupcontrolExtender control for making popup-window. Anyone can easily download source from this URL to see the behavior of the control as set by the developers:
http://ajaxcontroltoolkit.codeplex.com/releases/view/16488#DownloadId=41941
Here, I found that _onBodyClick: handler is managing the click on the body of html page and making the __VisiblePopup hidden. So I need to override this handler as I found. This whole modification will be contained inside a dll. So I created a dll project on Visual Studio called MypopupControl

Step-2:
To override this handler I created a javascript file that contains the overridden handler which looks like the following. It is named as 'myjsfile.js' in my solution.



//starting of javascript code

try
{

AjaxControlToolkit.myPopupControlBehavior= function(element)
{
AjaxControlToolkit.myPopupControlBehavior.initializeBase(this,[element]);
};
AjaxControlToolkit.myPopupControlBehavior.prototype =
{
_onBodyClick:function()
{
if(this._popupVisible)
{
return false;
}
}
};
AjaxControlToolkit.myPopupControlBehavior.inheritsFrom(AjaxControlToolkit.PopupControlBehavior);
AjaxControlToolkit.myPopupControlBehavior.registerClass('AjaxControlToolkit.myPopupControlBehavior', AjaxControlToolkit.PopupControlBehavior);

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();


}catch(exc){}


Here we can see that _onBodyClick handler is modified so that a visible popup wont be hidden by the mouse click on the body.

Step-3:
I also created a C# file called 'myPopupControlExtender.cs' that contains the following contents: Please note that myPopupControlExtender class inherits PopupControlExtender class of AjaxControlToolkit namespace that means it will have all the properties of PopupControlExtender class.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using AjaxControlToolkit;


[assembly: WebResource("MyPopupControl.myjsfile.js", "text/javascript")] //the custom/override javascript file is an embedded resource

namespace MyPopupControl
{

[ClientScriptResource("AjaxControlToolkit.myPopupControlBehavior", "MyPopupControl.myjsfile.js")]

public class myPopupControlExtender : PopupControlExtender
{



}

}





Here, we can see that an assembly entry is used to embed the javascript file and it will be resided inside the C# dll we will be creating.

Step-4: The mostly important step of this process is to declared the javascript file as the embedded resource and without this whole process wont be effective. So, to do this:
Right click on js file>Properties> Build Action >Embedded Resource

Step-5: Now we need to just build the project and we will get a brand new dll called MyPopupControl which is containing the modified behavior of PopupControl and in my case I created new popupcontrolextender which was named as 'myPopupControlExtender' and as its inherits all the properties of popupcontrolExtender plus containing the modified behavior of _onBodyClick:function()...so that serves my purpose of the project.

thanks. Masud.

Wednesday, April 14, 2010

Campus shut down

Few days ago, I was awaken by the call from mukta and I was told that KU-campus is shut down for indefinite time and it occurred due tom campus violence of students. Actually, I didn't know anything about it beforehand. Then I went to university and found different kinds of explanation from different teachers and people are focusing that students were too violent and they destroyed the properties of the university. I was not lucky enough to hear from any student because, they were already out of campus. My thought about this occurrence is like this:
1. There should be a neutral and honest investigation team from inside or outside the university.
2. There should be thorough review of events for the past days before this mishap.
3. The main duty is to find out the culprits whoever may be students or teachers. Shahnawaj who is the worst culprit will have to be punished severely and anybody who gave him shelter will have to suffer and we have to be strong enough to punish any evil.
4. If anybody is trying to gain some interest from this event, we have to stop them.
5. No mercy will be paid to anyone for the overall welfare and future of this university.
6. I want welfare of this university not only teachers or not only students.
7. We all have our conscience and we have to use it for every step of this trial.

Lets hope we overcome this bad time of khulna university history.

Stay at Dhaka (10-13) April, 2010

I just returned from Dhaka this morning and had a sound sleep for 4-5 hours and then had lunch and now I am writing the blog. My intention for dhaka trip was to meet the CEO of my company Nochallenge technology. This man was a e-boss so far after getting my job on 27 April, 2009. So, it looks like I have completed my job for 1 year and now I am designated as Lead Application System Engineer of nochallenge Technology. I passed some good time with my room-mates specially ALI (long time room partner and most close friend) and my fellow men of Khan Jahan Ali Hall 201. Actually, I nevertried to avoid my friends, but communicating with them always and meeting them in dhaka is quite difficult also in case of Dhaka. For example, I could not meet all the people in dhaka despite of my stay for 3 days in dhaka. Some people may mind that I didn't see them but its true and it does not happen all the time. But the matter is, how much we are trying that's the matter. Anyway, now planning to go outside in the afternoon with partner (of course life partner) and having some nice time. I bought a gift for her but I didn't tell her yet. I hope she will like it and she likes surprise and I am trying have that for her.
Happy bengali new year to everybody.
thanks.

Stay at Dhaka (10-13) April, 2010

I just returned from Dhaka this morning and had a sound sleep for 4-5 hours and then had lunch and now I am writing the blog. My intention for dhaka trip was to meet the CEO of my company Nochallenge technology. This man was a e-boss so far after getting my job on 27 April, 2009. So, it looks like I have completed my job for 1 year and now I am designated as Lead Application System Engineer of nochallenge Technology. I passed some good time with my room-mates specially ALI (long time room partner and most close friend) and my fellow men of Khan Jahan Ali Hall 201. Actually, I nevertried to avoid my friends, but communicating with them always and meeting them in dhaka is quite difficult also in case of Dhaka. For example, I could not meet all the people in dhaka despite of my stay for 3 days in dhaka. Some people may mind that I didn't see them but its true and it does not happen all the time. But the matter is, how much we are trying that's the matter. Anyway, now planning to go outside in the afternoon with partner (of course life partner) and having some nice time. I bought a gift for her but I didn't tell her yet. I hope she will like it and she likes surprise and I am trying have that for her.
Happy bengali new year to everybody.
thanks.