Posts

Showing posts from April, 2012

Site down: Time out erro (Apache server with tomcat 6)

Can any one find the solution for  this ????? error.log file........................ [Tue Apr 24 17:19:28 2012] [error] [client 66.249.68.225] (104)Connection reset by peer: proxy: error reading status line from remote server localhost [Tue Apr 24 17:19:28 2012] [error] [client 66.249.68.225] proxy: Error reading from remote server returned by /robots.txt [Tue Apr 24 17:19:58 2012] [error] [client 175.41.139.6] (104)Connection reset by peer: proxy: error reading status line from remote server localhost [Tue Apr 24 17:19:58 2012] [error] [client 175.41.139.6] proxy: Error reading from remote server returned by / [Tue Apr 24 17:23:19 2012] [error] [client 175.41.139.6] (104)Connection reset by peer: proxy: error reading status line from remote server localhost [Tue Apr 24 17:23:19 2012] [error] [client 175.41.139.6] proxy: Error reading from remote server returned by /Home.action access.log file............ 175.41.139.6 - - [24/Apr/2012:17:16:24 +0000] "GET / HTTP/1.0" 5

Facebook error response of type OAuthException: Error validating application. Invalid application ID

Console error:   Facebook responded with HTTP status code 400 and response body: {"error":{"message":"Error validating application. Invalid application ID.","type":"OAuthException","code":190}} --------------------------------------------------------------------------- com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: Error validating application. Invalid application ID. com.restfb.DefaultFacebookClient$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookClient.java:576) com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookClient.java:537) com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:485) com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:445) com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:405) com.restfb.De

Java Script: Remove space in a String

How to remove spaces from a string in java script? Add the following code snippet in your your java script code: String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; function removeSpace(text){    while(text.contains(' ')){        text=text.replace(' ','');    } }

Google map: calculate distance between two points(Marker)

rad = function(x) {             return x*Math.PI/180;          } distanceUsingHaversine = function(sourcePoint, destinationPoint) {      var RADIUS = 6371;    // earth's mean radius in km     var diff_Lat  = rad(destinationPoint.lat() - sourcePoint.lat());     var diff_Long = rad(destinationPoint.lng() - sourcePoint.lng());     var a = Math.sin(diff_Lat/2) * Math.sin(diff_Lat/2) +           Math.cos(rad(sourcePoint.lat())) * Math.cos(rad(destinationPoint.lat())) * Math.sin(diff_Long/2) *     Math.sin(diff_Long/2);   var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));   var dist =RADIUS * c;   return dist.toFixed(3); }