Thursday, June 5, 2014

Locate GPS enable device/terminal on your web server


Locate GPS enable device/terminal on your web server.

1.    Send GPS points(Lon,Lat) and unique ID of device/terminal on server via GPRS.
2.    Receive GPS points and ID from device/terminal.
3.    save GPS points and ID into flat file or database.
4.    Save below javascript code to locate multiple device/terminal on google map.
5.    add auto refresh function to reload page after fix interval of time.

File Name Locate_Device.html

//Start Of Locate_Device.html    -->
//ARAI file format one line one record.
//ID1,Lon1,Lat1
//ID2,Lon2,Lat2
//
<!DOCTYPE html>
<html>
<head>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAX4NEHbwolU-Nl8zzPRmQzsoJPWZ59jds&sensor=false">
</script>

<script>
var Lat=28.798077;
var Lon=77.418766;
var myCenter;
var lineArr;
//Anand Rai
function AutoRefresh( t ) {
    setTimeout("location.reload(true);", t);
}
function initialize()
{
readTextFile();
myCenter=new google.maps.LatLng(Lat, Lon);
var mapProp = {
  center:myCenter,
  zoom:15,
  mapTypeId:google.maps.MapTypeId.ROADMAP
  };
var map=new google.maps.Map(document.getElementById("googleMap")
  ,mapProp);

      
for (var i = 0; i < lineArr.length -1; i++) {
    var LocationArr = lineArr[i].split(',');
    var latLng = new google.maps.LatLng(LocationArr[1], LocationArr[2]);

    var marker = new google.maps.Marker({
        position:latLng
      });

      marker.setMap(map);
     
    var infowindow = new google.maps.InfoWindow({
        content:'Terminal<br>' + LocationArr[0]
        });

    infowindow.open(map,marker);
    }
}
function readTextFile()
{
    var rawFile = new XMLHttpRequest();
    rawFile.open("GET", "ARAI", false);
    rawFile.onreadystatechange = function ()
    {
        if(rawFile.readyState === 4)
        {
            if(rawFile.status === 200 || rawFile.status == 0)
            {
                var allText = rawFile.responseText;
                lineArr = allText.split('\n');
                var line1Arr = lineArr[1].split(',');
                Lat=line1Arr[1];
                Lon=line1Arr[2];
            }
        }
    }
    rawFile.send(null);
}
google.maps.event.addDomListener(window, 'load', initialize);

</script>
</head>

<body onload="JavaScript:AutoRefresh(60000);">
<div id="googleMap" style="width:800px;height:600px;"></div>

</body>
</html>
//End Of Locate_Device.html    <--

Tuesday, May 7, 2013

MyLocation

Click the button to get your position:

Tuesday, February 5, 2013

Automate FarmVille click in Vb.net for FarmVille addicted people

I was very addicted to farmville online game. It have some good strategy things and some most boring and painful thing like farming big farm like 20X20.

Then i have write a small program in VB.net to automate farming using auto click.

You can download this  program executable from below link.

https://docs.google.com/folder/d/0B5G4itY9P9sfWlJKdlQyT1pOSjg/edit?usp=sharing

or you can download source from below link and generate your own version for auto farming and many other boring things.

https://docs.google.com/folder/d/0B5G4itY9P9sfN2tqRlJXM3RjR1U/edit?usp=sharing

You can  see Video at below link to how to use this program.

http://youtu.be/WHsbRbPCXv4


You need "Microsoft Visual Basic 2010" (which is free) for compilation and make changes.

Happy Farming :)

Tuesday, January 8, 2013

EMV implementation

If you are working on EMV implementation on any new device.
Please make sure that you have latest EMV testing kit, latest device EMV kernel, Device OS, and latest VISA and Master guideline, latest Device Chip and Pin EMV and CTLS EMV Sample.
Vendor like Verifone Ingenico also provide training and sample for EMV and CTLS.
VISA Chip and Pin, VISA qsVSDC implementation is very easy and works on device default setting you don't need to do much effort to follow their guidelines.
MasterCard Chip and Pin, Paypass implementation is always pain because of their complex guidelines and device setting.
Amex implementation always looks complex but it is simple if they support you.
You can get EMV kit from ICCSolution, Fime, etc...
Master Visa guidelines from Bank.
You also need one good host simulator for fast development. FinSim is best.
You can get helpful documents from website like scribd for APACS, VISA Master EMV, CTLS.

What is EMV and EMV history?
http://www.scribd.com/doc/19132787/Intro-to-EMV
http://www.scribd.com/doc/19132768/EMV
http://www.scribd.com/doc/19132810/Standard-70-Book-1-1-June-2007
http://www.scribd.com/doc/19132767/EMV-v4-1-Book-1-ICC-to-Terminal-Interface
http://www.scribd.com/doc/19132765/EMV-Contact-Less-Communication-Protocol-v2-0
http://www.scribd.com/doc/19132750/Book-2
http://www.scribd.com/doc/19132743/Book-3
http://www.scribd.com/doc/19132747/Book4
https://www.scribd.com/doc/19132734/American-Express-EMV-Certification-Guide

EMV transaction flow:-
http://www.level2kernel.com/flow_chart.html


Verifone EMV webinar
http://www.verifonezone.com/fstore/0a463145bbfccb42_-634f7072_13697cf8344_-7a8b/EMV_201_Webinar_041012.pdf



EMV TAG Decoder

http://tvr-decoder.appspot.com/t/home

EMV transaction Steps:-

Card Detection and Reset
Candidate List Creation
Application Selection
Read Application Data
Data Authentication
Cardholder Verification
Processing Restrictions
Terminal Risk Management
Terminal Action Analysis
Card Action Analysis
Online Offline Decision
Online Processing
Second Card Action Analysis
Transaction Completed


Friday, September 2, 2011

Tech Guru: Static and Non Static Synchronized Methods

Tech Guru: Static and Non Static Synchronized Methods: Hi Friends, This is my first post. I hope you will like this one. Have you ever thought about the behavior of a static synchronize...