Thursday, 30 August 2012

Network Driver for LAN Driver for Windows Server 2008 R2 on Intel DH67BL Motherboard.



http://social.technet.microsoft.com/Forums/en-AU/winservergen/thread/5cd65b9c-6bb8-4dfa-bcda-fefdee071a3f


[ControlFlags]
ExcludeFromSelect = \
    PCI\VEN_8086&DEV_1502,\
    PCI\VEN_8086&DEV_1503
[Intel]
[Intel.NTamd64.6.1.1]
; DisplayName                   Section              DeviceID
; -----------                   -------              --------
%E1502NC.DeviceDesc%            = E1502.6.1.1,       PCI\VEN_8086&DEV_1502
%E1503NC.DeviceDesc%            = E1503.6.1.1,       PCI\VEN_8086&DEV_1503
[Intel.NTamd64.6.1]
; DisplayName                   Section        DeviceID
; -----------                   -------        --------
%E1502NC.DeviceDesc%            = E1502,       PCI\VEN_8086&DEV_1502

+++++++++++++++++++++++++++++++++++++++++++++++++++
remove entries from ExcludeFromSelect
and copy
%E1503NC.DeviceDesc%            = E1503.6.1.1,       PCI\VEN_8086&DEV_1503
to entries in [Intel.NTamd64.6.1]
+++++++++++++++++++++++++++++++++++++++++++++++++++
Saving the .inf file should be like this:

[ControlFlags]
ExcludeFromSelect =

[Intel]
[Intel.NTamd64.6.1.1]
; DisplayName                   Section              DeviceID
; -----------                   -------              --------
%E1502NC.DeviceDesc%            = E1502.6.1.1,       PCI\VEN_8086&DEV_1502
%E1503NC.DeviceDesc%            = E1503.6.1.1,       PCI\VEN_8086&DEV_1503
[Intel.NTamd64.6.1]
; DisplayName                   Section        DeviceID
; -----------                   -------        --------
%E1502NC.DeviceDesc%            = E1502,       PCI\VEN_8086&DEV_1502
%E1503NC.DeviceDesc%            = E1503.6.1.1,       PCI\VEN_8086&DEV_1503

************************************************************************
Reinstall the LAN driver pointing to the edited intaller files in desktop

Thanks

Wednesday, 29 August 2012

Java Map basics


       Map<String, String> map = new HashMap<>();

       map.put("One", new Integer(1));    
       map.put("Two", new Integer(2));
       map.put("Three", new Integer(3));

     
      Retriving the values from map by passing perticular key    
      Object one =  map.get("One");       
      System.out.println("Value is " + one);

      Validating key from map by passing perticular value

      if( map.containsKey("One") ){
            System.out.println("HashMap contains One as key");
        }else{
            System.out.println("HashMap does not contain One as value");
        }
  
     Validating value from map by passing perticular value
         if(hashMap.containsValue(new Integer(1))){
            System.out.println("HashMap contains 1 as value");
        }else{
           System.out.println("HashMap does not contain 1 as value");        
    }

     Retriving All values from map. 
      Iterator entries = map.entrySet().iterator();
      Entry thisEntry = (Entry) entries.next();
      Object value = thisEntry.getValue().equals("
One");
      Object key= thisEntry.getKey();
      System.out.println(value+""+ thisEntry.getKey().equals("One"));

Java Dynamic getting parent node and child nodes


import java.io.StringReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.CharacterData;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

public class test {
  public static void main(String arg[]) throws Exception{

 String xmlRecords = "ur xml here ";
      DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
      InputSource is = new InputSource();
      is.setCharacterStream(new StringReader(xmlRecords));
      Document doc = db.parse(is);
      System.out.println(doc.getDocumentElement().getNodeName());
      NodeList nodes = doc.getElementsByTagName("FareInput");
      for (int i = 0; i < nodes.getLength(); i++) {
          Element element = (Element) nodes.item(i);
          Element ele = (Element) nodes.item(i); 
          NamedNodeMap nl = ele.getAttributes();
          for(int k=0;k<nl.getLength();k++)
              System.out.println(nl.item(k).getNodeValue());
      }
  }

  public static String getCharacterDataFromElement(Element e) {
    Node child = e.getFirstChild();
    if (child instanceof CharacterData) {
      CharacterData cd = (CharacterData) child;
      return cd.getData();
    }
    return "";
  }
}

 
   

java Parsing string xml


import java.io.StringReader;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.CharacterData;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

public class test {

  public static void main(String arg[]) throws Exception{
     
String xmlRecords = "Drop ur xml here ";

    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    InputSource is = new InputSource();
    is.setCharacterStream(new StringReader(xmlRecords));

    Document doc = db.parse(is);
    NodeList nodes = doc.getElementsByTagName("FareInput");

    for (int i = 0; i < nodes.getLength(); i++) {
      Element element = (Element) nodes.item(i);
      Element ele = (Element) nodes.item(0);  
      System.out.println("lccp: " + getCharacterDataFromElement(ele));
      String lccp = ele.getAttribute("lccp_trnno");
      String lccp_srccode = ele.getAttribute("lccp_srccode");
      String lccp_dstncode = ele.getAttribute("lccp_dstncode");
      System.out.println("lccp: " + lccp);
    }
  }

  public static String getCharacterDataFromElement(Element e) {
    Node child = e.getFirstChild();
    if (child instanceof CharacterData) {
      CharacterData cd = (CharacterData) child;
      return cd.getData();
    }
    return "";
  }
}

  
   

Wednesday, 22 August 2012

Hi all,

Eclipse and there Version.



Release         Date             Platform version    Projects
Juno            01 June 2012                     3.7/48                                         Juno project
Indigo          June 2011        3.7                 Indigo projects
Helios          23 June 2010     3.6                 Helios projects
Galileo         24 June 2009     3.5                 Galileo projects
Ganymede        25 June 2008     3.4                 Ganymede projects
Europa          29 June 2007     3.3                 Europa projects
Callisto        30 June 2006     3.2                 Callisto projects
Eclipse 3.1     28 June 2005     3.1  
Eclipse 3.0     28 June 2004     3.0