Hello Everyone,
Recently i was doing some development stuff on Google maps API. After i finished my integration of google maps and google street view API with my application, during testing, i found an annoying Message: Not Implemented error message and the line number to which it was pointing was 1 and was senseless. I did'nt get this error on other browsers like Chrome & Firefox. This error was specific to internet explorer only (Why the hell they keep javascript's different for different browser's god knows !!!). Well, so i did some research and ultimately found a solution.
The error was in one of my javascript's onload function.
In my buggy code it was something like below ::
body.onload=loadMap();
I removed those open close parenthesis and my error got vanished.
body.onload=loadMap;
Internet explorer was really pointing to a strange line number to which you can never imagine this sort of error.
Anyways, thank god to internet explorer 8 javascript debugger which really helped me in finding the correct issue.
Cheers,
Ujjwal Soni
Monday, July 5, 2010
Thursday, July 1, 2010
Google Street View availability validation
Hi,
Yesterday, i was working on street view google maps api, i faced an issue on validating some addresses as well as some latitude longitude data for street view. As street view is avaiable only for some locations, some addresses were showing as blank on street view. I managed to validate that via code mentioned below.
function showStreetViewGoogleMaps()
{
var svClient = new GStreetviewClient();
svClient.getNearestPanoramaLatLng(point, function (nearest) {
if ((nearest !== null) && (point.distanceFrom(nearest) <= 100)) {
alert('Street view available');
}
else {
alert('Street view not available'); // Not within 100 meters
}
});
}
This is how i managed to validate street view for google maps.
Cheers!!!
Ujjwal Soni
Yesterday, i was working on street view google maps api, i faced an issue on validating some addresses as well as some latitude longitude data for street view. As street view is avaiable only for some locations, some addresses were showing as blank on street view. I managed to validate that via code mentioned below.
function showStreetViewGoogleMaps()
{
var svClient = new GStreetviewClient();
svClient.getNearestPanoramaLatLng(point, function (nearest) {
if ((nearest !== null) && (point.distanceFrom(nearest) <= 100)) {
alert('Street view available');
}
else {
alert('Street view not available'); // Not within 100 meters
}
});
}
This is how i managed to validate street view for google maps.
Cheers!!!
Ujjwal Soni
Thursday, June 24, 2010
Problem running Apache 2.2 with XAMPP
Hi,
Today i was installing XAMPP on windows 7 desktop. Well, the installation gone perfectly well. Finally, i was able to access XAMPP control panel, but, the moment i started apache 2.2, it failed. Then i installed it as a service and then started, but it was still in vain.
Later on, i changed C:\xampp\apache\conf\httpd.conf file contents as below
Listen 80
to
Listen 81
and then restarted the service, finally it worked.
The reason why i changed the port is because i later on found that skype also listens to the same port which was a default port for Apache 2.2
Today i was installing XAMPP on windows 7 desktop. Well, the installation gone perfectly well. Finally, i was able to access XAMPP control panel, but, the moment i started apache 2.2, it failed. Then i installed it as a service and then started, but it was still in vain.
Later on, i changed C:\xampp\apache\conf\httpd.conf file contents as below
Listen 80
to
Listen 81
and then restarted the service, finally it worked.
The reason why i changed the port is because i later on found that skype also listens to the same port which was a default port for Apache 2.2
Tuesday, June 22, 2010
Generating Serial Numbers from Database
Hi,
Recently, in one of my e-commerce applications, there was a need for generating a unique serial number. I tried for all possibilities from java code but some one suggested to do this from backend. I tried for below mentioned way and it worked finally.
CREATE TYPE ARRAY AS TABLE OF VARCHAR2(10)
/
CREATE FUNCTION MY_NUMBERS(N IN NUMBER DEFAULT NULL)
RETURN ARRAY
PIPELINED
AS
BEGIN
FOR j IN 1 .. NVL(N,10)
LOOP
PIPE ROW('ACUPRO'||lpad(j,5,0));
END LOOP;
RETURN;
END;
/
select * from TABLE(MY_NUMBERS(3));
COLUMN_VAL
----------
ACUPRO00001
ACUPRO00002
ACUPRO00003
Regards,
Ujjwal Soni
Recently, in one of my e-commerce applications, there was a need for generating a unique serial number. I tried for all possibilities from java code but some one suggested to do this from backend. I tried for below mentioned way and it worked finally.
CREATE TYPE ARRAY AS TABLE OF VARCHAR2(10)
/
CREATE FUNCTION MY_NUMBERS(N IN NUMBER DEFAULT NULL)
RETURN ARRAY
PIPELINED
AS
BEGIN
FOR j IN 1 .. NVL(N,10)
LOOP
PIPE ROW('ACUPRO'||lpad(j,5,0));
END LOOP;
RETURN;
END;
/
select * from TABLE(MY_NUMBERS(3));
COLUMN_VAL
----------
ACUPRO00001
ACUPRO00002
ACUPRO00003
Regards,
Ujjwal Soni
Friday, June 11, 2010
Porting Java
Love it or hate it, one of the great things about Java is its portability. It abstracts out many of the platform-specific things so that you, the programmer, need not worry about things like file systems and how to create directories and the like. Not a big deal, he thought, that's what Java was built for ...
public static MultipartRequest createMultipartRequest (HttpServletRequest req) throws IOException { [SNIP] // Create a temp directory for the attachments Runtime.getRuntime().exec ("mkdir -p " + Constants.UPLOAD_PATH); File check = new File (Constants.UPLOAD_PATH); [SNIP] }
Thursday, June 10, 2010
Update on Alfresco Installation on Windows 7
Hello Everyone,
I finally managed to run Alfresco on my Windows 7 desktop.
I edited some lines in alfresco-global.properties located under C:\Alfresco\tomcat\shared\classes. This is a global file used for configuration of email/database etc for Alfresco Server.
I was using mysql database for Alfresco, so my DB hostname entry in this file was
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
i changed it to
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=127.0.0.1
db.port=3306
and my server got up and running.
Cheers!!!
Ujjwal Soni
I finally managed to run Alfresco on my Windows 7 desktop.
I edited some lines in alfresco-global.properties located under C:\Alfresco\tomcat\shared\classes. This is a global file used for configuration of email/database etc for Alfresco Server.
I was using mysql database for Alfresco, so my DB hostname entry in this file was
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
i changed it to
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=127.0.0.1
db.port=3306
and my server got up and running.
Cheers!!!
Ujjwal Soni
Subscribe to:
Posts (Atom)
