api

Best practices for an API in PHP : functions, or classes ?

Hi, In my company we have developped some applications. We have to create an API for one application (say application A), so that the others can use it (an its data). The question is : we already have developped PHP classes for the model of Application A, if we want to create an API, should we : - re-use these classes (too much functio...

Youtube API PHP problem

Hello. I downloaded the library Yotube API PHP (search for videos) from zend.com and its examples. On windows (localhost) everything works fine ... Uploading on the debian server, and there at the request search video gives an error: Invalid response received - Status: 404 Code of this error from videO-browser.js /** * Sends an AJ...

What's the most low-level official touch input API which can be accessed from developers? (iPhone)

What's the most low-level official touch input API which can be accessed from developers? (iPhone) ...

Why isn't my AJAX call loading?

I'm working to integrate with the MailChimp API to submit a form via Ajax, but I'm having a lot of trouble integrating the form they provide. I think this is a good opportunity for me to learn more about Ajax, but I can't for the life of me figure out where my call is going wrong. Here's what I have in my Ajax call: $('#submit-button')...

Oracle: API for dealing with TNS file?

Is there an API that will read a TNS file and present it in some easy-to-use data structure? I would like to get a list of all my TNS entries. This works but is not particularly elegant! grep '^[a-zA-Z].*=' /etc/tnsnames.ora | sed 's/[ =].*//' ...

REST API for driving distance?

Is there a service that will give me the driving distance between two addresses? Apparently Google Maps API requires you to display a map, which I don't want to do (on that particular page), and I'd like to just snag the data and save it to my DB after a user submits a form, rather than waiting for JS to do it's thing. If it's relevan...

How to represent Unicode characters in an API

This is more an MBCS question than a Unicode question. I need to create an API that returns a list of structs that each instance holds a Unicode character as one of its members. This is in .NET so you'd think I'd want UTF-16, but then for Asian characters, there'd like be two characters required. What's the best practice when returnin...

Why doesn't each_slice work?

I am trying to use the Enumerable#each_slice. It doesn't work on my computer, stating that method is not found. I am running ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] API: http://ruby-doc.org/core/classes/Enumerable.html#M003142 Example: (1..10).each_slice(3) {|a| p a} # I get NoMethodError: undefined method `eac...

Best resource for integrating Skype API into ASP.Net website?

What's the best resource for integrating Skype API into ASP.Net website? I can't seem to find much on Skype.com's developer section. ...

Using the Google maps API with JavaScript or PHP?

i've read that you can use either javascript or php with google maps api. so what are the pros and cons for each of them? and if i got the geocodes stored in a database. should i get them with ajax and process them with javascript or should i use php? it says in the FAQ that 15000 requests are allowed per day per ip. does this mean tha...

Youtube API PHP problem

Hello, i am using a youtube api php and have problem... OS: debian, php 5.2 <?php require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata_YouTube'); $yt = new Zend_Gdata_YouTube(); $query = $yt->newVideoQuery(); $query->setQuery($searchTerm); $query->setStartIndex($startIndex); $query->setMaxResul...

Using .NET classes to communicate with a USB HID

Are there any USB developers out there who use .NET? I know one way of communicating with USB HID device is creating wrappers to the Windows API's like CreateFile, WriteFile and ReadFile. But I am wondering does anyone know if you can use any of the .NET classes to do the same thing. I am certain that I will still have to use some of th...

How do I build something when I know I'll get it wrong?

Background I have a personal project that I've been trying to build for around 5 years. In essence it's an online game - a web application. It's not a "money maker", just something that I really want to build, so finding the funding to hire a skilled team is very unlikely. I've built two fully-functional prototypes over the years, both...

Does anyone have documentation on SHGetSysColor?

I'm trying to find any reference for this function, but I haven't found anything. All I have is an obscure KB from Microsoft referencing that a programmer made boo-boo when coding a part of the Windows Mobile 6 where he should call SHGetSysColor but instead he called GetSysColor that gives a complete different color, for the same spec. ...

how can we integrate myspace in my website

how can we integrate myspace in my website.i want to bind friendslist and daily updates to my website? ...

Python API for VirtualBox

I have made a command-line interface for virtualbox such that the virtualbox can be controlled from a remote machine. now I am trying to implement the commmand-line interface using python virtualbox api. For that I have downloaded the pyvb package (python api documentation shows functions that can be used for implementing this under pyvb...

Sheet Music or Tablature APIs?

I'm surprised this hasn't been done yet...I'm looking for a sheet music and/or a guitar tablature API. ...

How to implement a REST API with included data in Ruby on Rails?

Hello, I'm working on a Ruby on Rails app which has a REST API. I manage two formats JSON and XML. Very often to simplify the use if the API, I'm making includes. But when you add params to to_json and to_xml like :only, :except, it's not only applied on the root object but on all the objects included. Do you know libs or methods to an...

Options for Evolving Cellular Automata Rules

I recently started work on a research project that has to do with evolving cellular automata rules (for a given task, follow the link if you're curious). I am currently evaluating options for tools that could be used for the job, here's what I have so far: MASON + ECJ Swarm MATLAB MATHEMATICA Some ad-hoc Python CA implementation + Pye...

Does trac have remote API?

I know there is xmlrpc plugin for trac. But I is not my trac site nor do I have admin rights. I just have a normal user account with limited priviledges. Beside the obvious low level of doing things (submitting requests by emulating web browser), is there a better way to do this? I'm interested mainly in these: View wiki page Edit wi...