Monday, November 12, 2007

Can You Clone Tangler For $1,500?

http://www.techcrunch.com/2007/11/11/can-you-clone-tangler-for-1500/

a must read for all the People I have worked with...

Monday, November 5, 2007

Getting Eclipse to Work on Ubuntu

Getting Eclipse to wiork on Ubuntu for all my Development Work proved to be very tricky.
There are issues related to permission compatibility and what not.

Here is what worked for me.
After installing and uninstalling Eclipse and deleting the Workspace for quite a few times, I first removed all the Packages with the search term eclipse from the Synaptic Package Manager (Top Bar -> System Menu -> Administration -> Synaptic Package Manager)

Then I used the steps as explained in the iteratively documented tutorial at Ubuntuforum in the following url

http://ubuntuforums.org/showthread.php?t=201378

After doing this, the first time I run the Editor from the terminal with the following command
rungss@rungss-ubuntu: eclipse -clean

then I included the following Update sites
name="Subclipse Subversion Plugin" url="http://subclipse.tigris.org/update_1.2.x"
name="The Eclipse 3.3 Project Updates" url="http://update.eclipse.org/updates/3.3"
name="Europa Discovery Site" url="http://download.eclipse.org/releases/europa"
name="PDT Updates" url="http://download.eclipse.org/tools/pdt/updates/"
name="Web Tools Platform (WTP) Updates" url="http://download.eclipse.org/webtools/updates"

By default there were two sites

name="The Eclipse Project Updates" url="http://update.eclipse.org/updates/3.2"
name="Callisto Discovery Site" url="http://download.eclipse.org/callisto/releases"

Here is the link of Update Site Bookmarks which you can import through the Eclipse Update manager.
http://bijay.rungta.googlepages.com/ubuntu-lamp-eclipse-update-sites-boo.xml

Note: be careful with the ending /(slash) for the site urls enter them as is in the above list. Its strange that for some sites the end "/" is valid while not for others.

Then I searched for Updates..

Upon the listing of all available features I selected a few based on my preferences. The following is the list of them
  • Subclipse Plugin from Subclipse Update site
  • PDT features and PDT SDK features from the PDT Update Site
  • Eclipse 3.3 from the Eclipse 3.3 Project Update Site.(I like the view in 3.3 where you can minimize all panels and view any one of them as you wish irrespective of the Perspective you are viewing the Editor)
  • WTP from Europa Site and some other CVS related features.
While selecting these features I clicked on the Select Required button when I saw any error for incompatibility in selected features.

Next I signed the Agreements and when Saving them I selected the folder "/usr/local/lib/eclipse" to install features where it was in any other Directory than the base installation location (Basically wherever it permitted to do so.)
This is done so that other users can also use them. Advise taken from the article at https://help.ubuntu.com/community/EclipseWebTools

That is all This seems to work for me.
Here are the various webpages that I reviewed many a times during the whole process

http://ubuntuforums.org/showthread.php?t=201378
https://help.ubuntu.com/community/EclipseWebTools
https://help.ubuntu.com/community/EclipseIDE

https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/68053
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/68053
http://flurdy.com/docs/eclipse/install.html
http://ubuntuforums.org/showthread.php?p=3177266
http://www.eclipseplugincentral.com/PNphpBB2-printview-t-2556-start-0.html
http://www.eclipse.org/eclipse/development/readme_eclipse_3.3.1.1.html
http://ubuntuforums.org/archive/index.php/t-436316.html

PS: The strategy to install plugins in the directory /usr/local/lib/eclipse again had some problems. Was getting an error message saying conflict entries..
I guess what happened is some of the files(a part of some plugin was exisitng in both the directory usr/lib/eclipse and usr/local/lib/eclipse) or may be because i installed Eclipse 3.3 on Eclipse 3.2 I have started the Eclipse 3.3 updation right now and wil realize if thats what the problem was in some time. Will update the post.

So I had to uninstall the Eclipse again and then I reinstalled. But to my Surprise I got the same error again(Conflict..)
I later realized that this was because when I installed it after uninstalling it... It was basically installed from the cache on the Local Computer..

So I run the following command to first clear the cache

apt-get clean

Thanks to teh article at https://help.ubuntu.com/community/AptGetHowto

And then I reinstalled eclipse with the following the steps at the Page
http://ubuntuforums.org/showthread.php?t=201378

Lets see how it goes now...

Saturday, October 27, 2007

Generating Sitemap for your site

Today I gave it another try to generate the site-map for the Web Portal I am working on.

You don't really need to have the Access to the Command line for Python Scripting in the Server nor do you need to have the capability to run Python scripts in the Server.

Here are the steps that I followed to achieve this.

Downloaded the sitemap_gen Project files from Sourceforge referred from Google's Webmaster Pages at Google Sitemap Generator

You will require Python installed in your system. visit Python Home page to download and install it In my case it was already installed.

Follow the steps mentioned at https://www.google.com/webmasters/tools/docs/en/sitemap-generator.html to configure the config file.

Here I used my local site information instead of the real site as I did not have access to the Server to run a Python script.

The Sitemap generator checks your server logs and checks the files system to generate the site map. I configured for all these information required.

Now when I run the script it created a few links in the sitemap as the Server log had very few urls.

At this point I download a Link Checker from http://sourceforge.net/projects/linkchecker/
you can use any link checker. This is just so that I will run it to create enough log information in the log file so that they will be included sitemap generator when creating the sitemap.

Here I did a number of trial and error to exclude what was not required and after a few iteration when I I was done with creating the Sitemap by running the Python script up to my satisfaction I replaced the local urls with the Actual urls and then uploaded the file sitemap.xml and submitted the same to Google.

Google Talk Polygamy for multiple identities

I can now log into multiple Google Account at the same time on Google Talk Desktop Client.

On Google's own Google Talk client for Windows...

No need to be logged in with various Browsers for different identities...
Basically, to have "Google Polygamy" you need to run Google Talk with the following switch: /nomutex

1. Right-click on the desktop
2. Select New
3. Select Shortcut
4. Paste this into the text box:
"c:\program files\google\google talk\googletalk.exe" /nomutex
5. Click Next and choose a shortcut name such as Google Talk1, Google Talk2, or something related to your Gmail account for easy remembering which account is which.

Google Talk Polygamy for multiple identities

Running Apache as a service on Windows

To install Apache as a service on Windows browse to the Apache Flder through the command line and enter the following command

apache -i -n "Service Name"

Service Name is the name of the service that you want to give it.

To name it Apache enter the following command

apache -i -n "Apache"

Quotes are required if the Service name that you want has blank space(s)

if it succeeds test it with the follwing command to start the service. from next time the Service will start when the windows starts.

apache -n "Apache" -k start


Have fun, no extra window opened all the time to annoy you and no pain of having to start the Apache web server each time you boot your system

For further documentation visit http://httpd.apache.org/docs/1.3/win_service.html

Alias Directive in Apache HTTP Server

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with url-path will be mapped to local files beginning with directory-path. The url-path is case-sensitive, even on case-insenitive file systems.

Example:

Alias /image /ftp/pub/image

A request for http://myserver/image/foo.gif would cause the server to return the file /ftp/pub/image/foo.gif. Only complete path segments are matched, so the above alias would not match a request for http://myserver/imagefoo.gif. For more complex matching using regular expressions, see the AliasMatch directive.

Note that if you include a trailing / on the url-path then the server will require a trailing / in order to expand the alias. That is, if you use Alias /icons/ /usr/local/apache/icons/ then the url /icons will not be aliased.

Note that you may need to specify additional <directory> sections which cover the destination of aliases. Aliasing occurs before <directory> sections are checked, so only the destination of aliases are affected. (Note however <location> sections are run through once before aliases are performed, so they will apply.)

In particular, if you are creating an Alias to a directory outside of your DocumentRoot, you may need to explicitly permit access to the target directory.

Example:

Alias /image /ftp/pub/image
<directory>
Order allow,deny
Allow from all
</directory>


PS: The directive Alias should be inside the tag as in the following example

<IfModule alias_module>

Alias /seagull E:\rungta\workspaces\Eclipse_PDT_Europa\Seagull\www
Alias /project1 E:\rungta\workspaces\Eclipse_PDT_Europa\Project1
</IfModule>

Then set the Target Directory Access permission outside the ifModule Tag


<Directory E:\rungta\workspaces\Eclipse_PDT_Europa\Seagull\www>
Order allow,deny
Allow from all
</Directory>

<Directory E:\rungta\workspaces\Eclipse_PDT_Europa\Project1>
Order allow,deny
Allow from all
</Directory>

Plcaing Ad Banners through phpAdsNew/Openads in vBulletin

This tutorial instructs you to help display your Custom Ad Banners in vBulletin Discussion Board (one of the most popular bulletin boards Software) using Openads, formerly called phpadsnew (The most popular adserver solution)

There are two things needed to be done to achieve this..

First you need to execute the invocation code for the banner trough vBulletin to initialize the variables for the banners.
This can be done using the Hook system in vBulltin, by creating a Plugin
    Follow the steps mentioned below to do this.
  • In the admin panel goto Plugins & Products -> Plugin Manager

  • Click on the link Add New Plugin(You will find this at the bottom of the page)
    In the resulting page do the followings..
  • Select vBulletin from the Select Box labeled Product

  • Select global_start from the Select Box labeled Hook Location

  • Enter a title for this plugin let's name it phpAdsNew

  • Enter the invocation code of your ad banner in the text area labeled Plugin PHP Code except the echo part(because you dont want to display the Ads here)
It should look something like the following
if (@include(getenv('DOCUMENT_ROOT').'/manager/phpadsnew.inc.php'))
{
if (!isset($phpAds_context))
{
$phpAds_context = array();
}
$phpAds_raw01 = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
$phpAds_raw02 = view_raw ('zone:2', 0, '', '', '0', $phpAds_context);
$phpAds_raw03 = view_raw ('zone:3', 0, '', '', '0', $phpAds_context);
$phpAds_raw04 = view_raw ('zone:4', 0, '', '', '0', $phpAds_context);
//** initialize as many AdBanners as you want here ***
}

Now the second Step:

After deciding where you want to place the Ads, you need to identify the template for the section in which you want it displayed for example if you want to display the Ad in your left Column then you need to select the left column template from the Admin panel

  • Admin CP -> Styles & Templates -> Style Manager
  • select Edit Templates from the drop down box
  • double click on the item left_column
In the resulting page you will see the template code as following:
<br />
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="90%">
<tr>
<td class="tcat"><span class="smallfont"><b>» Block Name</b></span></td>
</tr>
<tr<
<td color="#FFFFFF" width="100%" bgcolor="#FFFFFF">

<!-- Begin custom code -->

$phpAds_raw01[html]
$phpAds_raw02[html]
<!-- all the AdBanners you want to display here -->

<!-- End custom code -->

</td>
</tr>
</table>
<br />


Click on the Save Button and you should be done..

Shirky: Ontology is Overrated -- Categories, Links, and Tags

An article on the importance of categorizing things. Read this while reading a thread on the Zoints - Tagging plugin for PaGaLGuY Forum Shirky: Ontology is Overrated -- Categories, Links, and Tags: "Ontology is Overrated: Categories, Links, and Tags"

vB Survey a Survey tool for vBulletin

vB Survey: Add a full-featured survey tool to your forum

http://www.vbulletin.org/forum/showthread.php?t=131650

How to Install Plug-ins/Hooks in vBulletin

Today I learned How to Install Plug-ins/Hooks in vBulletin

Check this thread on a simple instruction on how to install Hacks or plugins
http://www.vbulletin.org/forum/archive/index.php/t-82621.html
http://www.vbulletin.org/forum/showthread.php?t=39142

Google Customized Search Engine

Playing around with Google Customized Search Engine.

Created a new Customized Search Engine with the following attributes.

Search engine name: Web Development on LAMP
Search engine description:: Web Development on LAMP

Search engine keywords:PHP, JavaScript, MySQL, HTML, CSS, Web, Development,

How to search included sites:

You can add the Search engine as a button if you have the Google toolbar installed in your browser. by clicking on the following link
http://toolbar.google.com/buttons/add?url=http://bijay.rungta.googlepages.com/WebDevelopmentOnLAMP.xml

Here is the Home page of the Search Engine
http://www.google.com/coop/cse?cx=004917130917186567756%3Abnjzh5zpjj4&hl=en
Looks good so far...

Setting up XAMPP for LAMP Development on Windows

Out of several LAMP/WAMP stack packages available in the market I prefer XAMPP from http://apachefriends.org when Working on a Windows machine for my Development Environment.

The XAMPP for Windows can be downloaded from the following link
http://www.apachefriends.org/en/xampp-windows.html

I download/keep the zip archive of the Basic package XAMPP Windows 1.6.4 which has the following components

Apache HTTPD 2.2.6, MySQL 5.0.45, PHP 5.2.4 + 4.4.7 + PEAR + Switch, MiniPerl 5.8.7, Openssl 0.9.8e, PHPMyAdmin 2.11.1, XAMPP Control Panel 2.5, Webalizer 2.01-10, Mercury Mail Transport System v4.01a, FileZilla FTP Server 0.9.23, SQLite 2.8.15, ADODB 4.94, Zend Optimizer 3.3.0, XAMPP Security, Ming. For Windows 98, 2000, XP.

After downloading it if you unzip the archive you will get a folder structure something like the following
---------------------------------
./xampp
./xampp/apache
./xampp/php
./xampp/mysql
./xampp/perl
---------------------------------
Copy the XAMPP folder to the root of any Drive (Its not really required but to avaoid any hassle I recommend that you copy it to the Local Drive root and avoid spaces in any of the paths to all executables)

You can run the Server in many ways. I am going to describe some of them here.


Note: Before proceeding you need to make sure that the default Ports for the Servers that you wish to run or install are free. You can check this by running the Executable file ./xampp/xampp-portcheck.exe This will tell you whether the ports are free or not. if any of the port numbers 80(for HTTP Server) and 443(for HTTPS Server) is not free you will either need to stop/disable the Application that is running on this port or you will need to configure the Apache Server to run on some other port.

To change the default HTTP Port 80 for Apache open the config file ./xampp/apache/conf/httpd.conf in a text editor and replace all occurances of 80 to the new Port (Which should again obviously be free).
If you need to change the port 443 then open the file ./xampp/apache/conf/extra/httpd-ssl.conf and replace the occurances of 443 with the new port.

Similarly to run MySQL on a different port you will need to make changes in the file ./xampp/my.ini by replacing the default Port number 3306 with some other free valid port number.

If you are not a hard core LAMP Developer and going to have to run the server only occasionally You can start the Apache Server by executing the Batch file ./xampp/apache_start.bat in the root XAMPP folder. and to run the MySQL server run the Batch file ./xampp/mysql_start.bat

You should be all set to run your applications. Copy Your Applications directory to ./xampp/htdocs/MyAPP/* and you can access the Application with a url http://localhost/MyApp and http://localhost/MyApp/*

But this scheme has a drawback that you cat close the dos window unless you want to stop the Servers. To do so you have to run the Batch files ./xampp/apache_stop.bat
and ./xampp/mysql_stop.bat to stop them.

XAMPP Provides a Control Panel which is a file named ./xampp/xampp-control.exe if you run it you will get a User interface as in the following screenshot


You can simply Start and Stop by clicking the button with appropriate label beside each service. Bothe Servers are in running mode in the above Screen shot. so you don't see the Button labeled Start here.

This scheme is very cool but if you are a hard code developer and will need the Server running all the time then probably you wouldn't want to have to start the Servers manually each time you boot your System.

You can install the Servers as a Windows Server by clicking on the checkbox beside the respective Server. Make sure to stop the Server you are installing as a Service before checking the checkbox to install it.You will be prompted to confirm if you really want to install it as a service. It will be installed if you confirm by clicking the button labeled "OK" Once the Service is installed you can start the Servers manually by clicking on the Start button here for the first and last time.


Note: If you have the XAMPP folder in D and select the Service option then you will have to run the Script .xampp/setup_xampp.bat before proceeding because of some bug in this version (not sure about other versions.).

You should be all set now. next time you boot the System both the Servers will be started automatically.

Checklists:
Ports
XAMPP Path

Happy Developing on LAMP/WAMP ...

Monday, October 22, 2007

Test for Automatic Posting to your Other Blog at Blogger

This is the first test for posting your Blog to multiple Blogs at Blogger.

What I am going to do is to set this Blog to send an email to me whenever I Publish a Post in this Blog.

The email Account I have set to send the Blog Post to is a Gmail Account which has the filtering capability.

All mails that are sent on Publishing of new Posts have the Subject field in the format [<Blog Title>] <Post Subject>. I will create a filter in my Google account to filter these emails and forward them to the Mail-to-Blogger Address(an address by which you can post to your blog via email.) for the Other Blog. selecting the radio button labeled Save emails as draft posts so that I can make changes to the posts before publishing in the Other account. Not sure though this might not be required. let's see..

This should do the trick and make a post to the other Blogger account.

PS: hmmm didn't work. Gmail not forwarding the mail to Blogger. Tried various tricks but with no luck. May be will try again later. DO comment if you find any solution.

Thursday, September 20, 2007

Data binding in Flex.

About data binding

Data binding is the process of tying the data in one object to another object. It provides a convenient way to pass data around in an application. Adobe Flex 2 provides three ways to specify data binding: the curly braces ({}) syntax and the <mx:binding> tag in MXML and the BindingUtils methods in ActionScript. </mx:binding>

Common uses of data binding include the following:

  • To bind properties of user interface controls to data service requests.
  • To bind data service results to properties of user interface controls.
  • To bind data service results to a middle-tier data model, and to bind that data model's fields to user interface controls. For more information about data models, see Storing Data.
  • To bind properties of user interface controls to a middle-tier data model, and to bind that data model's fields bound to a data service request (a three-tier system).
  • To bind an ArrayCollection or XMLListCollection object to the dataProvider property of a List-based control.
  • To bind individual parts of complex properties to properties of user interface controls. An example would be a master-detail scenario in which clicking an item in a List control displays data in several other controls.
  • To bind XML data to user interface controls by using ECMAScript for XML (E4X) expressions in binding expressions.

Although binding is a powerful mechanism, it is not appropriate for all situations. For example, for a complex user interface in which individual pieces must be updated based on strict timing, it would be preferable to use a method that assigns properties in order. Also, binding executes every time a property changes, so it is not the best solution when you want changes to be noticed only some of the time.

Data binding requires a source property, a destination property, and a triggering event that indicates when to copy the data from the source to the destination. The following example shows a Text control that gets its data from an HSlider control's value property. The property name inside the curly braces is the source property of the binding expression. When the value of the source property changes, Flex copies the current value of the source property, mySlider.value, to the destination property, the Text control's text property.

You can use all properties of a component as the destination of a data binding expression. However, to use a property as the source of a data binding expression, the component must be implemented to support data binding, which means that the component dispatches an event when the value of the property changes to trigger the binding. For more information on creating component properties that can be used as the source of a data binding expression, see Bindable metadata tag in Creating and Extending Flex 2 Components.

In the Adobe Flex 2 Language Reference, a property that can be used as the source of a data binding expression includes the following statement in its description:

"This property can be used as the source for data binding."

Binding occurs under the following circumstances:

  • The object that is the binding source dispatches an event.
  • Application code calls a service.

In addition to properties, you can use ActionScript functions as the source of binding expressions. You usually do this when using a bindable property as an argument of a function. When the property changes, the function executes, and the result is used in the binding destination.

You can also use a property of type Function as a binding source or destination. A property of type Function is a variable that holds a reference to a function.

Source: http://livedocs.macromedia.com/flex/201/html/databinding_091_02.html

Sunday, September 9, 2007

The Idea and Purpose of this Blog

Hello there,
Thanks for visiting this Blog.

I am a self trained Software Developer passionate about Programming and working on solutions to Problems involving complex R&D activities.

I work on LAMP platform with AJAX, JSON using Object oriented concepts to provide faster, better, secure and feature rich web applications, solutions and services.

For those who don't know what LAMP and AJAX is, here is a quick introduction.

LAMP stands for Linux, Apache, MySQL and PHP all of which are open source technologies therefore very suitable for small organizations. As the only resources needed is the development and hosting of the application. Generally, This combination of Techniques can solve all your the computing, automation and communication needs.

AJAX stands for Asynchronous JavaScript and XML.
This allows you to Communicate between a Web browser and the Server in the background and change the content of the page, or take actions in the server.

Web 2.0 generation web Applications are achieved through AJAX.

Gmail is one such Application which uses AJAX extensively to provide services for all kind of users.

So here is a Blog dedicated to LAMP AJAX generally Web Development using this Platform and related stuff.

Basically I am looking at a Place where I can manage my Knowledge. Knowledge Management. Where I can share my Experience, Knowledge and expertise.

Keep checking out the Blog for interesting and helpful articles here or simply subscribe to the RSS Feed by clicking here