Tuesday, February 17, 2009

Cross browser pop up opener and select options for a Text box

Main.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
    function searchPopUp(idfield,nameField){
        document.getElementById('localIdfield').value = idfield;
        document.getElementById('localNameField').value  = nameField;
        window.open("popUp.html","Ratting", "width=550,height=170,left=150,top=200,toolbar=1,status=1,");
    }
//-->
</SCRIPT>
</HEAD>
<BODY>
<form method=post action='' name=f1>
    <INPUT TYPE="hidden" NAME="localIdfield" id="localIdfield">
    <INPUT TYPE="hidden" NAME="localNameField" id="localNameField">
    <table border=0 cellpadding=0 cellspacing=0 width=550>
    <tr>
        <td >
            <font size=2 face='Verdana'>Program Manager</font>
            <input type="text" disabled="true" name="programManagerContactId" id="programManagerContactId"  size='8'>
            <input type="hidden" name="programManagerName" id="programManagerName" size='8'>
            <a href="javascript:void(0);" NAME="My Window Name" title=" My title here " onClick="javascript:searchPopUp('programManagerContactId','programManagerName');">Search Program Manager</a>
        </td>
    </tr>
    <tr>
        <td >
            <font size=2 face='Verdana'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Auditor</font>
            <input type="text" disabled="true"  name="auditorContactId" id="auditorContactId" size='8'>
            <input type="hidden" name="auditorName" id="auditorName" size='8'>
            <a href="javascript:void(0);" NAME="My Window Name" title=" My title here " onClick="javascript:searchPopUp('auditorContactId','auditorName');">Search Auditor</a>
        </td>
    </tr>
</table>
</form>
</BODY>
</HTML>

popUp.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

<script langauge="javascript">
    function return_values(local_id, local_name){
        var parentIdField = opener.document.getElementById('localIdfield').value;
        var parentNameField = opener.document.getElementById('localNameField').value;

        opener.document.getElementById(parentIdField).value = document.getElementById(local_id).value;
        opener.document.getElementById(parentNameField).value =document.getElementById(local_name).value;
        self.close();
    }
</script>

<title>(Type a title for your page here)</title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<form name="frm" method=post action=''>
    <table border=0 cellpadding=0 cellspacing=0 width=250>
        <tr>
            <td align="center">
                Id to be set<input type="text" name="local_id" id="local_id" size="12">
            </td>
        </tr>
        <tr>
            <td align="center">
                Name to be set<input type="text" name="local_name" id="local_name" size="12">
            </td>
        </tr>
    </td></tr>
    </table>
    <input type=button value='Submit' onclick="return_values('local_id','local_name');">
</form>
</html>

Tuesday, February 10, 2009

Dot Net Installer download direct links

Ref from : http://www.msfn.org/board/lofiversion/index.php/t122149.html

.NET Frameworks 1.1, 1.1SP1, 2SP1 are full downloads

.NET Framework 3 and 3.5 from the general MSDN and windows update site are bootstrappers (installs, checks config, and then downloads what's needed).

Microsoft Dot Net Framework 3.0 Bootstrapper 2.8 MB
CODE
http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en


Microsoft Dot Net Framework 3.0 SP1 is a full download

Microsoft Dot Net Framework 3.0 Redistributable 50.3 MB - Direct Link
CODE
http://go.microsoft.com/fwlink/?LinkId=70848

Microsoft Dot Net Framework 3.5 Bootstrapper 2.7 MB
CODE
http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en

Microsoft Dot Net Framework 3.5 Redistributable 33.3 MB
CODE
http://www.microsoft.com/downloads/details.aspx?FamilyID=e3821449-3c6b-42f1-9fd9-0041345b3385&DisplayLang=en


Microsoft Dot Net Framework 3.5 Full Package 197 MB Direct Link
CODE
http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe

It's the last one - the 197 MB file that looks to contain all preceding Dot NET versions... It also looks like it contains the x64 architecture files as well - I'm just not too sure???



Tuesday, February 3, 2009

Spring Mail and Gmail SMTP server

Spring Mail and Gmail SMTP server

February 1, 2008 at 9:04 pm · Filed under open source, spring

In case you need to use Spring Mail with Gmail SMTP server, first of all configure a mail sender bean:

<!-- Mail Sender -->
<bean
id= "mailSender" class= "org.springframework.mail.javamail.JavaMailSenderImpl" >
  <property
name= "host" value= "${mail.host}" />
  <property
name= "port" value= "${mail.port}" />
  <property
name= "username" value= "${mail.username}" />
  <property
name= "password" value= "${mail.password}" />
  <property
name= "protocol" value= "${mail.protocol}" />
  <property
name= "javaMailProperties" >
    <props>
      <prop
key= "mail.smtps.auth" >true</prop>
      <prop
key= "mail.smtps.starttls.enable" >true</prop>
      <prop
key= "mail.smtps.debug" >true</prop>
    </props>
  </property>
</bean>

We could take to a property file the relevant properties:

mail.
host = smtp. googlemail . com
mail.
port = 465
mail.
username = yourUsername
mail.
password = yourPassword
mail.
protocol = smtps

Let’s see an integrational test for this:

public class SimpleMailSenderTest extends AbstractDependencyInjectionSpringContextTests {
  
protected MailSender mailSender ;
  
public SimpleMailSenderTest () {
    setPopulateProtectedVariables
( true );
  
}
  @
Override
  
protected String [] getConfigLocations () {
    
return new String [] { ”applicationContext. xml };
  
}
  
public void testSendEmail () throws Exception {
    SimpleMailMessage simpleMessage =
new SimpleMailMessage ();
    simpleMessage.
setFrom ( ”fromEmail” );
    simpleMessage.
setTo ( ”toEmail” );
    simpleMessage.
setText ( ”Testing text” );
    simpleMessage.
setSubject ( ”Testing subject” );
    mailSender.
send ( simpleMessage );
  
}
}

In case we have a template for sending these emails we could define a template message bean:

<bean
id= "templateMessage" class= "org.springframework.mail.SimpleMailMessage" >
  <property
name= "from" value= "fromAddress" />
  <property
name= "to" value= "toAddress" />
</bean>

Alternatively, we could also specify replyTo, cc, bcc, sentDate, subject and text.



Spring Mail and Gmail SMTP server

Spring Mail and Gmail SMTP server

February 1, 2008 at 9:04 pm · Filed under open source, spring

In case you need to use Spring Mail with Gmail SMTP server, first of all configure a mail sender bean:

<!-- Mail Sender -->
<bean
id= "mailSender" class= "org.springframework.mail.javamail.JavaMailSenderImpl" >
  <property
name= "host" value= "${mail.host}" />
  <property
name= "port" value= "${mail.port}" />
  <property
name= "username" value= "${mail.username}" />
  <property
name= "password" value= "${mail.password}" />
  <property
name= "protocol" value= "${mail.protocol}" />
  <property
name= "javaMailProperties" >
    <props>
      <prop
key= "mail.smtps.auth" >true</prop>
      <prop
key= "mail.smtps.starttls.enable" >true</prop>
      <prop
key= "mail.smtps.debug" >true</prop>
    </props>
  </property>
</bean>

We could take to a property file the relevant properties:

mail.
host = smtp. googlemail . com
mail.
port = 465
mail.
username = yourUsername
mail.
password = yourPassword
mail.
protocol = smtps

Let’s see an integrational test for this:

public class SimpleMailSenderTest extends AbstractDependencyInjectionSpringContextTests {
  
protected MailSender mailSender ;
  
public SimpleMailSenderTest () {
    setPopulateProtectedVariables
( true );
  
}
  @
Override
  
protected String [] getConfigLocations () {
    
return new String [] { ”applicationContext. xml };
  
}
  
public void testSendEmail () throws Exception {
    SimpleMailMessage simpleMessage =
new SimpleMailMessage ();
    simpleMessage.
setFrom ( ”fromEmail” );
    simpleMessage.
setTo ( ”toEmail” );
    simpleMessage.
setText ( ”Testing text” );
    simpleMessage.
setSubject ( ”Testing subject” );
    mailSender.
send ( simpleMessage );
  
}
}

In case we have a template for sending these emails we could define a template message bean:

<bean
id= "templateMessage" class= "org.springframework.mail.SimpleMailMessage" >
  <property
name= "from" value= "fromAddress" />
  <property
name= "to" value= "toAddress" />
</bean>

Alternatively, we could also specify replyTo, cc, bcc, sentDate, subject and text.



Thursday, January 22, 2009

One liners -- Hidden meanings in Company talk

One liners -- Hidden meanings in Company talk
Today's Professional Management FUNDAS

1."We will do it" means "You will do it"

2."You have done a great job" means "More work to be given to you"

3."We are working on it" means "We have not yet started working on the same"

4."Tomorrow first thing in the morning" means "Its not getting done "At least not tomorrow!"

5."After discussion we will decide-I am very open to views" means "I have already decided, I will tell you what to do"

6."There was a slight miscommunication" means "We had actually lied"

7."Lets call a meeting and discuss" means "I have no time now, will talk later"

8."We can always do it" means "We actually cannot do the same on time"

9."We are on the right track but there needs to be a slight extension of the deadline" means "The project is screwed up, we cannot deliver on time."

10."We had slight differences of opinion "means "We had actually fought"

11."Make a list of the work that you do and let's see how I can help you" means "Anyway you have to find a way out no help from me"

12."You should have told me earlier" means "Well even if you told me earlier that would have made hardly any difference!"

13."We need to find out the real reason" means "Well I will tell you where your fault is"

14."Well Family is important; your leave is always granted. Just ensure that the work is not affected," means, "Well you know..."

15."We are a team," means, "I am not the only one to be blamed"

16."That's actually a good question" means "I do not know anything about it"

17."All the Best" means "You are in trouble"