api

Haskell: Show screwed up?

The show function in Haskell doesn't seem to do what it should: Prelude> let str = "stack\n\noverflow" Prelude> putStrLn str stack overflow Prelude> show str "\"Stack\\n\\n\\noverflow\"" Prelude> When I declare functions, I normally put the type signatures as Show, which doesn't deal with newlines correctly. I want it to treat \n as...

Rest URL design - multiple resources in one http call

From what I understand, a good REST URL for getting a resource would look like this: /resource/{id} The problem I have is, that I often need to get a large number of resources at the same time and don't want to make a separate http call for each one of them. Is there a neat URL design that would cater for that or is this just not suit...

how to convert .cdr (corel draw file) vector images to jpg on imagick PHP API

hi ; how to convert .cdr (corel draw file) vector images to jpg on imagick PHP API ...

Gmail contacts API limitations workaround

Given that the Google Contacts java API has not exposed all the fields http://groups.google.com/group/google-contacts-api/browse_thread/thread/a2dbc7d052fa318b/f704527adc6c6597?lnk=gst&q=exposed#f704527adc6c6597 How would you workaround the problem of accessing the 'Mr' or 'Company' fields on the Google Contacts api? ...

.NET virus scanning API

I'm building a web application in which I need to scan the user-uploaded files for viruses. Does anyone with experience in building something like this can provide information on how to get this up and running? I'm guessing antivirus software packages have APIs to access their functionality programatically, but it seems it's not easy to...

ColdFusion COM object manipulation of MS Word 2000 dies after 100 seconds

I'm using ColdFusion 7 on a Windows 2003 server to talk to a default installation of Microsoft Word 2000 using COM objects. The goal is to generate a document with some tables in it. That much I'm able to do. The CPU spikes to 100% for the duration, but my code is functional and if it's short, it works. The problem I'm encountering is w...

How can I provide a limited interface to Greasemonkey's GM_xmlhttpRequest to my page's Javascript?

I have a Greasemonkey userscript which runs most of its code in an unprivileged context by inserting a <script> tag like so: function code { ... } var script = document.createElement("script"); script.type = "application/javascript"; script.innerHTML = "(" + code + ")();"; document.body.appendChild(script); This avoids the need to ...

Python QuickBase API Help

Hey, I'm having some trouble using the QuickBase API from Python. From the QuickBase guide, there are two methods of hitting the API: POST and GET. I can handle the GET calls, but some API methods require XML to be sent over POST. The link to the documentation is here: http://member.developer.intuit.com/MyIDN/technical_resources/quic...

How to detect whether Windows is shutting down or restarting

I know that when Windows is shutting down, it sends a WM_QUERYENDSESSION message to each application. This makes it easy to detect when Windows is shutting down. However, is it possible to know if the computer going to power-off or is it going to restart after Windows has shutdown. I am not particularly hopeful, considering the document...

What is the best credit card processing service?

We're looking to add credit card payments to our system (and it needs to be fairly custom, handling variable "per use" charges each month). We would like the integration to be simple and secure (i.e. no storing of credit card data on our system). What, in your opinion, is the best credit card processing provider to offer this kind of...

Question on Google Provisioning API and SSO Password change propagation

Hey all, I'm using the Google Apps Provisioning API to synchronize user data with our internal database (MySQL). For every new user created through our site's backend, a corresponding user in created in the GoogApp system. Change is passwords are also synchronized accordingly. I'm about to implement SSO, so that logins performed on ...

What's the best way to create a client library for a web service API?

We have web service running for one of our projects. We want to be able to access this web service similar to how you'd access an API (such as Google Data, etc.) where you have client libraries in several languages: .NET, Java, Python, etc. You'd be able to download these libraries (usually .DLL) from our project's website and then inte...

What is the Linux Equivalent of Kernel32.dll?

Does Linux have a shared library that exports OS functions? msvcrt.dll -> libc.so.6 kernel32.dll -> ? ...

Has anyone been able to get Confluence.pm to add attachments?

If so can you provide the code. I am able to do almost everything else from creating new pages, modifying page attributes etc.. But I cannot seem to add attachments. I have read the official conflunce Perl XML-RPC site and discussions but all the code fragments they show there don't seem to work for me. Here is my hacked up attempt at i...

Importing namespaces isn't working for an API I just installed...

Hi, I just got the Google Data API and I can't seem to use it in my application. I got the msi file, built the Google Data API SDK successfully. Then I went back to my project, right clicked on the Bin folder and selected Add Reference... From there I added all of the dlls in the C:\Program Files\Google\Google Data API SDK\Redist folde...

Getting a list of locals on the iPhone

Hi, how do I get a list of e.g. Restaurants around me? As far as I can see, google enables JS requests only, right? I would not want to use the WebView for that. Are there any other ways to get it? May be not google? I'm wondering because it's such a common task, but I've found no info on the net about it.. Cheers ...

MSScriptControl 'Specified cast is not valid' when exposing an object to VBScript

I'm trying to implement scripting capability to my application. I'm using the code below. Whenever I instantiate a new Api object, the application is supposed to quit (a little testing thing :p) However, the application crashes at script.AddObject(...) with the error Specified cast is not valid. Is there a step I'm missing here? public...

How to test an API ?

In an interview, whether for developer positions or white-box qa positions, you are ofter asked to: create test cases for a piece of code / API categorize each test i.e. functional, stress, load, performance, security etc. prioritize (assuming low / medium / high priorities) I want to gather up ideas for such test cases. We can assum...

Flickr API + JAVA - flickrj

I want to download a set of photos of a particular user in Flickr using the Flickr Java API (flickrj) Does anybody knows how to do it? I've stated with this code: Transport t = new REST(); Flickr f = new Flickr(key, secret, t); User u = f.getPeopleInterface().findByUsername("username"); What should I do next? ...

Advice on wrapping third party libraries

I have been working a year now as a software developer for a at the computer-vision department of a company. My main job is integration of third-party software into a framework, so i usually end up writing wrapper libraries because a lot of this third party software does not work the way we want it to work(not thread safe, pain in the a*...