Wednesday, March 31, 2010

Connect windows VOBs from solaris: Clear Case

Not sure whether this is will be a everyday requirement, but this one popped in front us some time back. Like all other things we kept this so called idea on the shelf and kept watching. At last we decided to try this out so that we can implement this setup. Rolled up our sleeves and got it to action

First downloaded the clear case solaris installation passport advantage. Download the clear case as per our requirement check before downloading whether it's for Intel (X86) or for SPARC.
After downloading copy those file to target machine where installation needs to be done.
Make sure you have enough space on the target machine (preferably free space 2GB)
Check whether you have root user access before starting the installation
From the downloaded installation copy you will find cc_ms_install.pdf keep that open you might need that for reference and Google at standby ;-)
We followed this technote which worked
Add the machine name and IP in the hosts file in both the machines (UNIX & windows vice versa) to identify in the network

Installation


Run the site_prep script which will prepare the environment before installation, will ask about the registry server and license server.
Note: The registry & License server should be common one for windows for Linux
Enter the details which you know, skip the other details or confirm it twice before entering.
After that completion of script run install_script file for installing actual clear case
Select standard installation, since you have already entered the necessary data in site_prep it will ask for confirmation. So keep going

Clear Case Setup

Create a UNIX region in solaris machine using the clear case command for creating region
After region creation, make sure the region created is visible on windows machine & solaris machine
Here After follow whatever given in the article which you have opened
Create the UNIX snapshot view (check the article)
Create the VOB tag for the UNIX region (check the article)
Load the VOB

Pitfalls

While creating snapshot view, check the option carefully there is value "-tmode strip_cr" which will make your files loading will be slow and may not load some of the files which are not compatible to UNIX.
Loading the VOB, if you loading ends up only top level folder, follow this
Here is small trick if you follow the article the clear case will be loaded but only the top level folders will be loaded., You are correct this behaviour is not common if you face this. We have a solution. create a snapshot view in windows using that view open the edcs, copy the contents in that and use the same in your UNIX machine. There goes all your files will start loading.

I'm not a SCM guy and many thanks to subbu who ran the show and for PS & naveen for helping and guiding to make this happen.

There was not enough material on this topic, so thought of my 2 cents contributions to the SCM community. ... :-)

Thursday, March 04, 2010

Check ActiveX Controls Enabled through JavaScript

Interenet Explorer has activeX controls, which can be controlled by user. Before allowing user to access the application which uses activeX controls it is good to run a check on the users browser requirements.

Standard set of the browser check is easy and pretty common like

  • JavaScript Check
  • Cookie check
  • Adobe Reader Check
  • Windows Media Player Check

But to check whether the user has disabled activeX controls there is no straight forward way (as of i knew...if any body know do let me know).

One more way is to create an AJAX request, and check whether we can create XMLHTTP request. If you disable activeX controls in the Internet Explorer options the XMLHTTP request object created will be empty.

Code snippet

function createRequestObject() {
var xmlhttp;
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
try {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e) {
xmlhttp=null;
}
}
if(!xmlhttp&&typeof XMLHttpRequest!="undefined") {
xmlhttp=new XMLHttpRequest();
}
return xmlhttp;
}
var activex=createRequestObject();
if(activex==null) {
alert('activex Disable XMLXTTP');
} else {
alert('activex Enable XMLXTTP');
}
I have ran tests on this code and looks good. There one more way to do activeX check, thats is via windows Media player check

Here is the code for that
var minVersion = "11";
var WMP = PluginDetect.isMinVersion('WindowsMediaPlayer', minVersion);
if (WMP == -2) {
alert('activex Disable XMLXTTP');
} else {
alert('activex Enable XMLXTTP');
}
This snippet also works fine, but we may land into trouble when the system doesn't have windows Media player. So the latter one is safe bet.