api

Table api

Suppose you have a table widget class. Do you do table.row(i).column(0).setText(students[i].surname()) or table[0][i] = students[i].surname() the latter makes way less sense but the simplicity is so luring ;) ditto for: table.row(0).column(0).setBackground(red) vs: table[0][0].setBackground(red) Note that Table::row returns a Table::...

How to use google maps API with multiple markers on the same map

So, i have the following script to use the google maps API, its all fine, but i need to create a map that has more than one Marker (the balloon shaped icon pointing to something) and i need each of those markers to point on a different area of the map (i.e. different coordinates), how can i do it? <script type="text/javascript"> ...

Multiple Markers on a Google Map

I added a google map with two markers (i am just testing), the code is: function load() { var map = new GMap2(document.getElementById("map")); var marker = new GMarker(new GLatLng(<%=coordinates%>)); var marker2 = new GMarker(new GLatLng(31.977211,35.951729)); var html="<%=maptitle%><br/>" + "<%=text%>"; ...

Download files from a directory listing.

Is it possible to download all the files from a directory listing? Eg., the following link leads to a listing. http://www.arthika.net/1234TB/new/Kuruvi/ Please point me to some related API's to download all the files from such listings (if possible). Thanks ...

Difference in server times

I'm developing a web site which will retrieve SMS messages that have been sent to a gateway. The gateway is accessed via an API, with the requests in the following format: http://www.smsgateway.com/?login=myusername&amp;password=mypassword&amp;lasttime=1236164238 Notice that I'm having to track the last time messages were downloaded -...

render :json does not accept options

I'd love to use render :json but it seems its not as flexible. Whats the right way to do this? respond_to do |format| format.html # index.html.erb format.xml { render :xml => @things } #This is great format.json { render :text => @things.to_json(:include => :photos) } #This doesn't include photos format.json { render :js...

.eml to .pdf API

Does anyone know of an .eml to .pdf C# API? ...

Tokyo Cabinet and SQLite compatible interfaces?

I was wondering if anyone has seen a library that abstracts away SQLite and Tokyo-Cabinet to the same API. Basically I'm looking for something that will allow me to test and dev with SQLite, and later move to TC for production. Anyways the language I'm using specifically is Lua, but I'm sure such a library doesn't exist for Lua, so a L...

Are there an error handling API / framework in Java?

On a Server there can occur different temporary (transient) errors. For example an OutOfMemoryError or a broken connection to a database. I think it is a good idea to repeat such job a short time later. Of course it should not a endless loop because the error is not temporary. Are there any good API to help with it? Or a guide how I ca...

How might I use the W3C Markup Validator API in my .NET application?

I found that there's an API for the W3C Markup Validator. I had earlier asked: Is there a .NET library for the W3C Markup Validator API? Assaf's answer: This API is SOAP based. If you want to use it in a .net application you can just add the web reference and code against it. Seems simple enough as it's basically a one-met...

Where is Time.advance documented?

Looking around on the Web I found that the Ruby Time class has Time#advance. Where is this documented? I saw no mention of it in the Ruby API docs here. The search function for the API docs indicated that there is no method called "advance" anywhere. Nonetheless, in IRB... >> t = Time.now => Thu Mar 05 16:08:57 -0800 2009 >> t.advance...

Windows Mobile GetStoreInfo Invalid Parameter

I am an working on a mobile application using Windows Mobile PocketPC 5.0 SDK. At some point I need to call the function GetStoreInfo. It takes two parameters, first one is a handle to the open store and second one is a structure to be filled by the function. Caller only needs to fill in the cbSize field. And that is supposed to be equal...

Using markers and polylines with google maps api

I have a map and it has both markers and polylines. Now I need to seperate these polylines and the markers on different layers I.E When i want to remove the polylines i just execute the method with layer name that removes the polyline's layer can you please help me with this? ...

ShellExecuteEx or HlinkSimpleNavigateToString

I want to launch a web page in the default browser from my Win32 application. Both functions do the job. Is there any reason to use one or the other? ...

Style of C API function

I am working on a library that support multiple programming environment such as VB6 and FoxPro. I have to stick with C convention as it is the lowest common denominator. Now I have a question regarding the style. Suppose that the function process input and returns a string. During the process, the error can happen. The current proposed ...

How to organize API?

I am designing an API and I would like it to be simple to use. So, if I have Customers, Statements, and Payments. Does it make sense to have objects such as: Customer, CustomerHandler, Statement, StatementHandler, Payment, PaymentHandler? This way when the developer wants to do something with customers he/she knows to create a Custom...

Is there a Wikipedia API?

On my Wikipedia user page, I run a Wikipedia script that displays my statistics (number of pages edited, number of new pages, monthly activity etc.). I'd like to put this info on my blog. Can anyone recommend any API's that would allow me to do something like this? ...

Is there a java api to access bugzilla?

Is there a (standalone!) java api which wraps the XML-RPC interface to bugzilla? I don't want to program my own api for it, and I can't actually find a library which does this (and only this). Update: I'm looking for something like this http://oss.dbc.dk/bugzproxy/ only written in Java ...

Need advice on wordy naming of methods

I'm writing an API for creating geometric shapes, and I'm running into some difficulties naming my methods. Let's take a simple case: Creating a circle. Most of us might be familiar with a method like graphics.drawEllipse(x, y, w, h). To draw a circle, you need to know the top left coordinate, and the width and height of the circle. ...

How to start creating an application API in .NET

Hi, In the company I work for we have a desktop application developed in .NET that we like to open up some parts for other software developers. I see it like some kind of public methods that other software can access. Is there any standard approach, best practices or other experience of this? I guess you could do this with Win32 calls...