Category Archives: PC

blog.farazmahmood.com

 

As I have previously mentioned that I am now a proud owner of farazmahmood.com domain. At the moment my domain is registered with yahoo, and www.farazmahmood.com is directed to http://s.faraz.mahmood.googlepages.com  as I am not in mood to buy a hosting solution , why , well  I don’t think I need one right now, and googlepages are doing their job fine. 

 In my previous post “some activities” I mentioned about creating a sub-domain blog.farazmahmood.com and pointing it towards my laptop, (it is functional only after my office hours i.e when I am at home ,usually 8pm-10 am ). I Installed wordpress on my laptop and configured it in IIS ( IIS ,PHP,mysql combo) , well it worked fine except for one little issue, i cannot host multiple domains on my machine with IIS , i have to use virtual directories to get through it . like http://blog.farazmahmood.com/blog to reach my blog and http://blog.farazmahmood.com/someotherstuf   to get someotherstuf , instead of http://someotherstuf.farazmahmood.com .

The main reason for the behavior is that my machine has win xp with IIS 5.1 installed. The desktop class OS has several limitations when it comes to server oriented task, one of which is that the IIS can not host multiple sites , though you can use virtual directories to do so, but you won’t be able to host multiple domains on the same machine. I wanted this to host multiple subdomains on my laptop ( this is known as virtual hosting).

So ..

I switched to Apache web server. Two days earlier I downloaded and installed the apache web server. Apache web server does not have such restrictions, and its quite popular on web for its performance and feature set. Apache also support virtual hosting,  plus a module based architecture , to extend the functionality  of the web server. Configurations are little bit difficult, but forums and help docs are quite helpful, though a UI configuration manager would be warmly welcome.

Anyways, i configured to host my subdomain http://blog.farazmahmood.com as a virtual host on apache. (I did some mistakes while configuring , i enabled virtual host include but did not updated the virtual host. This situation took half an hour to get resolved.) so now my local blog setup is http://blog.farazmahmood.com . I am intended to use this as a mirror for my original blog https://farazmahmood.wordpress.com . I will be adding few more web applications like forum, PHP nuke, wiki , etc .. so keep checking.

(working hours -weekdays:  8 pm -9 am ,  friday /saturday: full day ,  All times are acc to. UAE standard time 🙂 )

regards

faraz

Advertisements

My Fist Live Messenger Add-in : BlogPublisher

Well Its my first experience with live messenger addin. I wrote a blog publishing addin , that reads RSS feed from the blogs or any other site and updates my Personal Status Message on Live Messenger at regular interval (at the moment it updates after 30 secs) .

Introduction:

Windows Live Messenger exposes the Add-In functionality, though its still in beta stages and not fully exposed to the users. However for the developers, it can be enabled by setting up a key in the registry \HKCU\Software\Microsoft\MSNMessenger

Add a  DWORD “AddInFeatureEnabled” and set its value to “1”.

Now Sign in with your windows live messenger, goto options , you will see  a new add-in tab in the left pane.

 

Now comes hard part  or should I say the fun part. You can develop a plug-in for yourself too and its easy. Live Messenger exposes its functionality via MessengerClient.dll, which has been exposed as .net 2.0 assembly. As of now , the Live Messenger supports plug-ins targeted for .net 2.0.

To start developing the plugin, just add the reference of MessengerClient.dll , (you can find it in the msn messenger installation folder, default location is <ProgramFilesDir>\MSN Messenger\MessengerClient.dll).

Create a new project in visual studio 2005, or other IDE you are using, add reference to the dll by browsing to the directory. Messenger exposes its add-in functionality through  IMessengerAddIn Interface. This Interface has one method ,Initialize(MessengerClient). This method is invoked when your add-in is being loaded. Here you will receive a messenger client object. The MessengerClient has following members:

  1. Properties
    • AddInProperties : Information about the AddIn, DisplayName , Private Message , Creator Info.
    • LocalUser : Information about the signed in user.
    • SavedState: Storage for pluging specific data (like settings etc.)
  2. Methods
    • SendActionMessage
    • SendTextMessage
    • SendNudgeMessage
  3. Events
    • IncomingTextMessage
    • OutgoingTextMessage
    • ShowOptionsDialog
    • Shutdown
    • StatusChanged

I think all these members are quite self explanatory. ShowOptionsDialog occurs when the user clicks on the Settings button in the Add-In Screen in Option Dialog.

So Where to start, well create a class , implement the IMessengerAddIn interface and the world is all yours. But watch for the tricky part, Messenger expects the assembly name as per the NamespaceQualified Name of the Addin Type. So if you are implementing the interface in MyTestAddIn, which is in the namespace of MyMessengerAddIns, then your assembly name should be MyMessengerAddIns.MyTestAddIn.dll . yeah yeah I know that’s insane , but its how the add-in works in messenger, might be this behavior change in future as we have the beta right now.

Now invoke your imagination power and do something creative. I worked out a blog publishing plug-in, which will fetch the rss feed from the blogs (which you can specify in the settings box) and then updates your personal messages setting it to the entries in the feed at regular intervals.

 

I wrote a simple RSS reader, which reads the feed from the URL , then parses it into a model, (it only reads selected properties.)  Reading RSS is quite simple , its simply an XML document. You can get the full specification on the Internet, or just view the source of any rss feed in your browser , you will understand the structure easily. I have two timers in my AddIn one for updating the personal message at regular interval and the other for checking the updates on the feed.

Important Notes:

The Messenger AddIn is executed in Internet Zone (so you have very limited permission to do anything, no file access , no internet access 🙂 ) unless you strong name your assembly and install it in the gac. 

To Debug the add-in via Visual Studio Debugger, goto the Project Properties and set the Start Action to start an external program i.e “msnmsgr.exe” it is in the same directory as the MessengerClient.dll. When you run the project in VS,it will invoke the messenger, which in turn load your dll. Install your assembly into gac , after the messenger is invoked and while it is loading your add-in. that way it will not be obstructed by Code Access Security obstacles.

Each Add-In is executed in it own Application Domain , and it is sandboxed , so that it will not harm other  add-ins.

Resources :

Special Thanks to Bart De Smet for his post “Your first Windows Live Messenger add-in” , a very nice and well written tutorial to the add-in functionality. Another excellent article on CodeProjectCreating Windows Live Messenger Addins” by Filip van der Meeren. For RSS reading , “You Own .Net RSS Feed in C#” by James H. Byrd  and RSS 2.0 Framework by Chris Richner are very helpful.

Where to go from here:

well the options are uncountable. I am thinking about writing a secure chat plug-in so that it will encrypt you conversation using some public key algorithm, so that no more msn sniffing can haunt.

Source Code :

I will upload the source code soon , I am looking for some file hosting site, as the wordpress only uploads images and pdf files. Please check back later, or if you need it immediately then just drop me a comment.

Wikipedia ~ friend or foe

Wikipedia , one of the buzz word of recent times, I think anyone who has used internet , has  definitely landed on site , which claims to be the largest online editable encylopedia serving 1688000+ english articles.

Wikipedia allow its user to create /change new articles. Users add /update articles, discuss about the different  aspects of the articles like presentation ,layout etc. Often disagreement of different users on issues bring admins into action. They arbitrate the matter on hand to resolve the issue. Wikipedia also employs a restriction scheme so that an arcticle cannot be reverted back frequently during a defined preiod of time.

Wikipedia has been the source of vast knowledge. But can we trust the unbiassness of the source. This is a major question that a lot people raising these days.  Usually the scientific articles are more trusthworty but the political articles contains a lot of biasness not only from the users but also from the moderators/admins of wikipedia. Like articles on Pakistan, Islam, World Wars,Bush , US , India, are mostly biased either pretending the issue at hand to be a misrepresentation of the facts as in case of Pakistan , Islam or covering the facts imposing false representation as in case of US, India etc.

Those who dared to correct the facts have been targeted by the biased user lobbies, and ulitmately fall victim to a premanent ban by admins/moderators who back those user lobbies. Following articles shed some light on the issue. I don’t know about the credibility of the authors, but I have found some biasness in the wiki article, so i think they are quite correct in their claim.

 

Wikipedia: The untimely rise and expected fall
Wikipedia is controlled by group bullying and hatefulness

UPDATE:
 “Wikipedia: The Untimely rise and expected fall” article was written by Mr. Asad Asif, following is the link of his article on his blog.

Wikipedia: The untimely rise and expected fall by Asad Asif.

 

(do let me know about your experience)

faraz

Getting Rid of Annoying “Restart Window dialogue”

As most of you will be using windows xp , you might have come across the nuisance of  “Restart Window : Now or Later “. It comes usually when you have downloaded and applied some updates from microsoft. if you choose later, that little rascal disappears from ur screen , then came back after 5-10 minutes urging you to restart your system. that’s really bullshit,

i understand that for updates to be successfully applied windows often required a reboot. but this is quite an annoying situation. i am using my laptop for around 1 year , it has got xp installed on it , (btw i dont like xp much, i would rather prefer win2k). i use my laptop for almost  17/18 hrs a day whether for work or during leisure . i usually put my laptop on standby instead of shutting down, as i have multiple application running ,multiple browser windows with multiple tabs opened, and i  don’t want to restart from scratch.  But that scoundrel keep on insisting that i should restart my windows to complete the update process. (my current system uptime is 7 days 3 hour and 15 minutes 🙂 ) .

so what to do  , Goto services panel in Computer Management , look for automatic updates service , stop the service and live happily after. 🙂

just a reminder , you should do so at your own risk. Automatic update service looks for new updates on microsoft site , it then downloads and apply the patch according to the user setting, but that dialogue is not user configurable. If you list the processes running on your system, you will there is a process “wacult.exe” this is the main culprit that displays the dialogue box, but if you kill it , it will be re spawned by automatic update service so you need to stop that service to stop this process. btw you should have all security patch installed on your machine before stopping the service.

Knoppix-live linux frm CD : first encounter

whaaooa !!!

Knoppix
the time is 4:26 , almost 45 minutes ago , i just booted my pc with Knoppix to expereince the live linux,, and i m still in amaze 🙂 i must say what the F*&k , this is damn sexiest thing i have ever witnessed, sorry ladies, but this live linux distribution is driving me crazy, i m wrting this blog from mozilla browser from knoppix distro

well what is a linux live cd , live linux are distirubtion of linux which resides on the cd/dvd, and there is no need to install them , u just boot off from ur cd, the loader will load os into RAM , wihtout ever touching ur HDD,and i mean complete OS ,with many application available in this distro of knoppix ( including koffice, kdevelopment IDE, a ful fledge media player capable of playing divx files, audio player, network tools, mulitmeida tools , and whole lot more

although there are options available to install these live linux distro, i dont think they are much needed :),the knoppix creates all files in memory (RAM) uunless specified, it also has the support of USB drives ,so that u can persist ur desktop and fiels on the usb and can easily carry over.It is also quoted very often that a usb stick +live linux cd(knoppix in our case) makes a mobile desktop, u just need these 2, and every pc becomes ur own pc 🙂

i was half asleep before rebooting the system, the download just finished about 1 and half hour ago, i had to burn the cd so that a bootable media is available, and after 5 mins it shocked me :D,

newayz , i wuld recomnd this distro to all linux enthusiasts, specially students and normall windows user who just want to taste linux without actually modifying their harddisk ,and intalling it 🙂
long live linux 🙂

tata
faraz