Sunday, May 23, 2010

Geo Location Using HTML5

HTML5 is the new Version of HTML.You can read more details here

GEOLocation is used to find out where are now @ the world

GEOLocation API can be used for wide range of application,Such as

1. Find points of interest in the user's area
2. Annotating content with location information
3. Show the user's position on a map
4. Turn-by-turn route navigation
5. Alerts when points of interest are in the user's vicinity
6. Up-to-date local information
7. Location-tagged status updates in social networking applications

Here is a sample GEOLocation Code

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=_your_key_" type="text/javascript"></script>
<script type="text/javascript">
var map;

function initialize(){
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(53.500, -4.00), 4);
map.setUIToDefault();
}
}

function findLoc(){
if (!navigator.geolocation) {
alert('Sorry, your browser does not support Geo Services');
}
else {
// Get the current location
navigator.geolocation.getCurrentPosition(showMap);
return false;
}
}

function showMap(position){
var lat = position.coords.latitude;
var lon = position.coords.longitude;

alert('You appear to be located at (' lat ', ' lon ') (lat,lng)');

var myPoint = new GLatLng(lat, lon);
map.setCenter(myPoint, 15);

var yourCurrPoint = new GMarker(myPoint);
map.addOverlay(yourCurrPoint);
return false;

}
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
...
<form>
<input type="button" value="Find Me!" onclick="findLoc()" />
</form>
<div id="map_canvas" style="width: 500px; height: 300px">
</div>
</body>
</html>



The Above code is Coped from : http://tai-dev.blog.co.uk/2009/07/17/a-quick-test-of-the-html5-geolocation-api-with-firefox-3-5-spookily-accurate-on-my-work-pc-6533920/

You can Find More Details From

1.WikiPedia
2.W3 Specification

Saturday, May 1, 2010

Chapter 1 : How to start with Mobile Programming : Basic Working

You need following things for the proper development of a mobile app development,

1.Latest J2SE SDK
2.Late J2ME SDK

How to create a J2ME Project??

Follow this steps* :
Start -> All Programs -> Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC -> Wireless Toolkit 2.5.2

In Wireless Toolkit 2.5.2 Window click "New Project"

In the coming window you need to gave a project name on first text box( You can gave the Name of your app here)

In second text box you have to gave MIDlet class name ( Name of the main class to be loaded first)

then click OK.

After that go to C:\Documents and Settings\itmarkerz\j2mewtk\2.5.2\apps\\

You will see a src folder there

Create a File with name of MIDlet class

Save it

Build it using Build Section

Click Run

Your Project will get Run in emulator

Tuesday, March 23, 2010

Using Custom Font For Our Website using CSS

I used to think about add custom free font to my website, after considering with some of my friends i got the solution i am placing it here

CSS CODE
<style type="text/css">
@font-face {
font-family: Junction;
src: url('Junction 02.ttf');
}

div {
font-family: Junction;
font-size: 2em;
}

HTML CODE

<body>
<div>I used to think about add custom free font to my website, after considering with some of my friends i got the solution i am placing it here</div>
</body>


*Junction 02.ttf : Can found in http://www.theleagueofmoveabletype.com/fonts/1-junction

Thursday, February 18, 2010

Nice jquery plugin for a different data view

one of my friend in twitter had posted this link
its a nice jquery plug-in
see this


QuickSand


it can be used for Reorder and filter items with a nice shuffling animation.

Wednesday, February 18, 2009

Contact Grabber Using PHP

i was searching for a contact grabber......i got a good code from here..... plz see this if you need to add a contact grabber in your site
Recently some quotes struck my mind from a blog. It is basically , i think, 100% true , even though described in as a funny way.

See:

Project Manager is a Person who thinks nine Women can deliver a baby
in One month


Developer is a Person who thinks it will take 18 months to deliver a Baby.

Onsite Coordinator is one who thinks single Woman can deliver nine
babies in one month


Client is the one who doesn`t know why he wants a baby

Marketing Manager is a person who thinks he can deliver a baby even
if no man and woman are available


Resource Optimization Team thinks they don`t Need a man or
woman;They`ll produce a child with zero resources


Documentation Team thinks they don`t care whether the child is
delivered, they`ll just document 9 months.


Quality Auditor is the person who is never happy with the PROCESS to
produce a baby.And lastly……


Tester is a person who always tells his wife that this is not the Right baby

Courtesy:SajithMR's Blog

How to get Client IP Address

Hi friends....

i was writring a code in the PHP for geting client address,i got following code as working, try out....

but you have to upload the code in a webserver,and when it load in the client page we will get the client address

CODE:-

function getIP() {
$ip;
if (getenv("HTTP_CLIENT_IP"))
$ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR"))
$ip = getenv("REMOTE_ADDR");
else
$ip = "UNKNOWN";
return $ip;

}

$client_ip=getIP();
echo "Your IP :".$client_ip;
?>