api

Suggestions for how to clean up this API

For a fun project I'm trying to implement the BitTorrent spec, and right now I'm working on the BEncoding portion of it. The encoding basically can encode from int/string/dictionary -> string for transmission. I've got all of the different encodings written/tested/working as overloaded Encode(...) methods and I've got the individual de...

Ways to provide a framework for DLLs to depend on each other and expose functionality?

Essentially, how to write a plugin system, where each plugin is a DLL. (Or is there a better way of a plugin system where each plugin is written natively?) Suppose that each DLL offers some functionality available to other plugins. If plugin A does provides FuncA and plugin B wants FuncA, how should dependency be managed? How should plu...

How to create or modify the google maps controls?s

I wonder how sites like trulia.com and fotocasa.com customized the google maps ui for their website ex1: http://www.trulia.com/for_sale/Pinecrest,FL/x_map/#for_sale/Pinecrest,FL/x_map/2_p/ ...

Deserializing twitter stream json string F#, how to define 'null' as a proper value ?

Hello, I leave the below in case anybody wants the record types, but my question can be asked as following. Suppose one needs to write to a file a record type that can be null, what is the best way to achieve that, considering the below yields: "The type 'Basic' does not have 'null' as a proper value": type Basic = {Toto:string} let...

CURL can't connect? Just hangs and doesn't respond. PHP has it enabled.

Hi there, I have a simple PHP function on a friend server which I've checked and has PHP CURL enabled. The function is: function sw_fetch_code($apikey='',$email=''){ $url = "http://www.domain.com/xxx/api.php?getcode=1&apikey=".$apikey."&email=".$email.""; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); c...

Need Help finding out howto use Twitter's @anywhere isFollowing/isFollowedBy methods

I am trying to check via the Twitter Javascript Api (see here) if a logged in user is following me on twitter. If not, i will display a followbutton. Right now i can't seem to find out how the command isFollowing/isFollowedBy works (see doc). Code so far: twttr.anywhere( function (T) { if(T.User.find('mashable').isFollowing){ ...

Enums in Java API

hi, I am creating a java API for an addressbook Is it a good practice to use Enums in my API ? I am using it as follows: public enum AddressType { WORK,HOME } public class AddressBook implements Function{ Map<String, Details> byName = new TreeMap<String,Details>(); public void addNewContact(String name, String address, A...

ETrade API Examples

E-Trade released their API recently and provide a technical documentation which is somewhat useful but not complete. Does anyone have a fully working example (in any language) that shows how this works. I have been able to do the authentication using OAuth correctly, but when it comes to getting information out of my account or market ...

PHP Twitter replace link and hashtag for real link

Hi Im looping over json response from Twitter api. Each api response give me a tweet, something like this: Hi my name is @john, and I love #soccer, visit me Im trying to replace @john, and insert <a href=http://twitter.com/john&gt;@john&lt;/a&gt;. BUT, the comma (,) after @john, is the problem. How to replace dots, commas, etc before ...

Windows Shell Context Menu recreated with qt

Is there a way to query from qt the entries of the shell context menu (name and command)? Only if the application is run on Windows of course. ...

Google AdSense API error

I've been trying to get this working, but I always get internal server error. It's working fine if I request "generateReport" or something else, but with "generateAdCode" not. My code: <?php // Copyright 2006, Google Inc. All rights reserved. /** * sample code to generate AFC aggregate report through Adsense API */ require_once(...

Max Number of FileConnections

Is there a theoretical or practical limit to the maximum number of open FileConnections? Thanks! ...

Syndication service ID

How do I get one syndication service Id? It's necessary to make request to AdSense API but it isn't described in the docs. ...

Building a webservice with XML?

XML Webservice: the webservices takes in an XML request and responses with a XML response. im not sure if im doing the right thing for the request? With the XML request, do i take the XML request from the page input parameter? Example http://api.domain.com/webservice/xmlExample1.aspx?xml=&lt;Example1&gt;&lt;FirstName&gt;David&lt;/Fir...

how to authorize linkedin api access in window application...

i am creating a window application in c#.. i want to search the profiles in linked in... so how can i use the authorization........? thanks, ...

Perfomance Tuning in Geo API

I am using GEO API in a iPhone app, sometimes the app takes a long time to load the data, so I need a way to make the response fast, any ideas??? My App calls Geo API services in Asynchronous mode. ...

MMS Gateway Provider with PHP API, URL Callbacks, etc.

Hello All, Similar questions have been asked a few times, but I was unable to find the answer I needed in those other questions, so here goes. I am looking into integrating MMS messaging into a website and I seem to be hitting a wall when it comes to which provider to use. SMS only gateways seem to be prevalent, but MMS gateways with ...

Google AdSense API sandbox ads

Hello, I want to make a script similar like this http://www.labnol.org/google-adsense-sandbox/ , but I don't know where to begin. I am pretty familiar with Google AdSense API, but how could this work? I mean, there's no place to input what ads to show. ...

Running a constantly updated script

I have a PHP script that I keep updated and need to run on several servers to gather data based on config files like php ini, phpinfo, and other config files. I need to make sure that what's run is always the latest version of the script but this creates an annoying maintenance problem because the script is always being updated. So I'd...

Push API using C2DM

I have been working on c2dm for push API application. I am new to android and I dont understand the tut given at http://code.google.com/android/c2dm/index.html. Can anyone please guide me here? How would I start making an application that sends and receive the messages on emulator( I am working on emulator first and then want to test it ...