Monday, September 30, 2013

Cool option on fire fox on element identifying

This is a cool option on identifying elements on a web page. It’s really new and cool feature to me don’t know about others :D


Navigate to Firefox ( im using v:23)




Navigate to any website you want.
Rite click on the web page and select Inspect elements.





As on the image click on the highlighted area.




Bingooo




Get Geo location coordinates by submitting a String value (an address) in C#


String address is my string value where by passing an address.
Inside the foreach loop i can get the Longitude and Latitude.

To use this code you need to have below references available in your reference folder on the solution explorer.
using System.Xml;
using System.Web;

using System.Net;





public  void GetGeoLocation()
{
         string address = "Colombo 03, Colombo";


            string urlAddress = "http://maps.googleapis.com/maps/api/geocode/xml?address=" +          HttpUtility.UrlEncode(address) + "&sensor=false";


  try
    {
         XmlDocument objXmlDocument = new XmlDocument();
                    objXmlDocument.Load(urlAddress);


         XmlNodeList objXmlNodeList = objXmlDocument.SelectNodes("/GeocodeResponse/result/geometry/location");

 foreach (XmlNode objXmlNode in objXmlNodeList)
      {
        // GET LONGITUDE
      string Latitude = objXmlNode.ChildNodes.Item(0).InnerText;
        // GET LATITUDE
      string Longitude = objXmlNode.ChildNodes.Item(1).InnerText;
      }

                 
     }
    catch (Exception)
                { }

 }





Thursday, September 26, 2013

How to instal Back Track 5

  • Download the image :http://www.backtrack-linux.org/downloads/
  • Write it to a DVD.
  • Boot from the DVD by selecting the 1st boot device CD/DVD Rom.
  • Press "Enter" key on "Boot" prompt.
  • you will see Backtrack Live CD menu. Press enter on "Backtrack Text – Default Boot Text Mode".
  • On the "Root@bt:~#" prompt type "startx" and press enter.
  • After another few moments, you will come to the desktop of Backtrack. Double click on the “Install Backtrack” to begin the install process.
  • Now you can do the installation from the UI as on windows :) 
  • In some point you will ask select the partition   where you want to install the OS ,so select the partition you want to install OS and right click on it select edit (i really cant remember the exact option, any how it have only 3 options.select the top most 1 :) ).
  • Then there will be a option to select "Boot file system" (on default on that drop down there will have /boot and /windows. Just enter "/" ( to say this is root) and continue)
  • Default root name : root
  • Default root password :toor


ජය වේවා