How to catch FusionTablesLayer errors? - google-maps-api-3

I'm fairly new to the Google Maps API and unlikely to get things right the first time..
The documentation doesn't seem to provide any way to check errors on things like the FusionTablesLayer constructor, for example a query error.
In the interests of saving development time and building a more robust solution, is there a way to catch errors on the FusionTablesLayer constructor, or in general for the maps API?

Related

What is the best practice for server-side code in Meteor?

I'm new to the world of coding and Web dev and for my first real project, I've started building a quiz web app using Meteor.
Long story short, the app basically displays a random question to the user, then takes in their answer and gets feedback (it's a bit more complicated than that, but for the purposes of this question, that's the main functionality).
I've managed to get it working, but pretty much everything (apart from account creation and that kind of stuff) is done on the client-side (such as getting the random qn) - which I'd imagine is not very secure..
I'd like to move most of the calculations and operations on the server, but I don't want to publish any of the Questions collection to the client, since that means the client can essentially change it and/or view the correct answer.
So, my question is, would it be considered 'bad practice' if I don't publish anything to the client (except their user document) and basically do everything through Meteor methods (called on the client, and executed server-side)?
I've already tried implementing it and so far everything's working fine, but was just wondering whether it's good practice. Would it hurt performance in any way?
I've searched online for a while, but couldn't really find a definitive answer, hence my post here... TIA
The below example pulled right from the documentation showing how to omit fields.
// Server: Publish the `Rooms` collection, minus secret info...
Meteor.publish('rooms', function () {
return Rooms.find({}, {
fields: { secretInfo: 0 }
});
});

Injecting code to track events on Delphi

I have a big and old application written in Delphi version 2007 for over a decade now and in order to rewrite it I intend to understand which parts/features of it are mostly used by the majority of its users.
The idea that came up is to track objects clicks and window creations to populate a log or analytics tool like Google Analytics or Deskmetrics with quantitative and qualitative data in order to help on the decision making.
To achieve that, I'm trying to figure out what is the easiest path respecting the current version limitations. One of the possibilities I am exploring is understanding how to implement some generic code that could be somehow "injected/reflected" in a class level so all instantiated objects may among other things, call a function passing parameters that identify themselves and this function would then take action to log that info using the best tool.
The only real solution so far is copying and pasting this function call on several thousands of onClick/onCreate methods and I'd like to avoid it while I am open to all other possibilities that may come out on this thread.
Thanks!

Getting exception information from QuickBooks Online

Is there a way to get more specific information about the exception/error that occurred when interacting with QuickBooks Online?
I've been messing around and testing certain things and I would get an exception but all it would say is "BadRequest" from a IdsException, which isn't too helpful. So I was just curious if there was a way to extract more information. I know they put more information and such in the response body but since I'm using a DataService object I'm not sure how to see the response body.
I've checked Intuits documentation and checked all the properties and methods I could think to check but haven't had any luck so far.
If I need to put up an example of what I'm doing I can. Thanks for any help.
When sending information to QuickBooks Online and QuickBooks does not like what you are sending you will get a ValidationException.
This exception is clearly not too helpful as it is very vague. However, if you catch it and then look for the InnerExceptions array of IdsError you can find more information about what actually went wrong.
In my situation I would catch the main exception, ex, and have to do this:
ex.InnerException.InnerExceptions(i).Message
From there you can either display it or concat all the errors together or anything else you want.

Querying location fel in freebase from Google Refine returns error

I am fairly new to Google (Open) Refine and Freebase, and I am trying to find tutorials (aside from their video) on data augmentation. I have a fairly simple table with states of the US, which would like to augment with population data and other fields. The images below describe the process.
Does anybody have any idea why I get the error?
Is there a way to perform the same operation directly with Freebase, or a good tutorial out there?
If you're using Refine 2.5, Google turned off the APIs that it uses for augmentation from Freebase.
OpenRefine 2.6 which will start alpha/beta testing shortly adds support for the new APIs.

Freebase with own data?

I have been looking for an autosuggest search script and I have finally found one that I like, the only problem is that I cannot find a way to get it to run off our database results.
Is there any way to customize this script so that it runs from our own database, and not off the freebase pre-defined data types?
http://www.freebase.com/docs/suggest
Have you tried overriding service_url and service_path ? There are also the corresponding params for the flyout service. It's documented in the docs that you pointed to.
As masouras says, you can override service_url and service_path, but that's not particularly helpful unless you have another service which provides the same APIs as Freebase.
Dae Park recently posted a recipe to the Freebase mailing list which might help - however, I'm not aware of anyone who's actually managed to get Suggest working with anything other than Freebase.

Resources