api

PrintWriter and PrintStream never throw IOExceptions

Some days ago I realized that PrintWriter (as well as PrintStream) never throw an IOException when writing, flushing or closing. Instead it sets an internal flag (trouble=true) when an error occurs. It's not possible to get the exact exception, but only if there was some exception (checkError()). My question is: why would one want to h...

Thread API priority translation to OS thread priority !

How are the java API thread priorities (1-10) gets translated to the OS level priorities since most OS don't have thread priority levels (in terms of number) which match this. So keeping in mind , can there be a scenario when two or more threads with different priorities eventually get the same priority at OS level. Please clarify, if ...

Is there a .NET Library or API to interact with/Edit the IIS Metabase ?

...or am I stuck rolling my own "XML chopping" functions. I'd like to create a small tasktray app so I can quickly re-point a Virual Directory to one of several of folders on my harddisk. Bit of background: I have 3 different svn branches of our code base on my dev machine. Current Production Branch ( C:\Projects\....\branches\Pro...

Activate a File Virus Scan from within Delphi app

We have an app that monitors a folder for file drop and need to initiate a virus scan before using any incoming files. This needs to be a part of the Delphi app and the file must pass the Virus Scan otherwise we delete the file. I know that there are command shell options available, however this must be a direct API call to a registere...

How do I get the path of the current drupal theme?

The drupal api has drupal_get_path($type, $name) which will give the path of any particular theme or module. What if I want the path of the current theme? ...

get list of tables, db schema, dump etc in Python sqlite3

For some reason I can't find online or in the docs the way to get the equivalents of sqlite's interactive shell commands: .tables .dump in Python's sqlite3 API. Is there anything like that? Am I missing something? -N. ...

Browser <-> Client Hardware API?

Are there any initiatives to implement/agree upon a standard API for connectivity between web browsers and client hardware. Example: The iPhone has a GPS/Camera/Accellerometer in it. It'd be very cool if my web app could communicate with them (rather than me having to write a thick ObjectiveC application). ...

Does Microsoft SkyDrive have an API?

So with the recent news that Microsoft Skydrive is going to get bumped to 25GB of storage per account, does anyone know if SkyDrive has an API? (And if so, where are the docs?) ...

Evidence that SharePoint has no SQL injection vulnerabilities?

My company has a requirement that all production sites pass an AppScan security scan. Sometimes, when we scan a SharePoint installation, the software detects a blind SQL injection vulnerability. I'm pretty sure this is a false positive--AppScan is probably interpreting some other activity in the HTTP response as success of the blind inje...

Algorithmic Trading API

Anyone have experience with algorithmic trading (like stocks)? Any good services to use to get quotes and to make trades? ...

Script to publish my SO Q's and A's on my twitter?

I realized that I'd like to publish my StackOverflow questions and answers on my twitter feed, but I don't want to do it manually. Where would I begin for this? What techniques/technologies/etc are available that would enable this? Perhaps someone has done this, or something similar (posting to blogs, etc?) Ulf's suggestion about my ...

How to deal with a Many-To-Many Relation in my API

I have two entities Foo and Bar with a Many to Many relationship between them. Let's say there is no semantic argument for why Foo might be "responsible" for the many to many relationship, but we arbitrarily decide that Foo is responsible for the relation (I.e., in NHibernate we would mark Bar as Inverse) That's all well and good from ...

Yahoo maps api, version 3.8 doesn't display custom image?

I used the following code to display custom marker on Yahoo Maps : <Script type=text/javascript> var map=new YMap(document.getElementById('map')); // Create a map object Get_Lat_Lon() ...

MP3 Encoding in Java

I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3, and vice-versa. Have evaluated Java Sound API, and LameOnJ, but they dont meet the requirements and aint stable, respectively. Please suggest one that is free, and platform independent. ...

Python Screenscraping

I'm wanting to create a REST API for TV listings in my country. While online aggregations of TV listings do exist they're too tied to the presentation to be of any use to software developers. In order to get hold of this information I'm thinking of going to each source and scraping the relevant information. While I've obtained similar i...

SQLite C/C++ API unsigned char *

Why does the SQLite C/C++ API return unsigned char *s for text values as opposed to the more de-facto char * type? This is somewhat related to the unsigned char question, except that the SQLite API's decision seems opposite of the conventional char * advice given for string-like values. For example: const unsigned char *sqlite3_column...

What's the good way to get messages from a specific facebook wall?

There is a groupwall of which i wanna download and store all messages in a db. In the documentation I cannot find a good way to do it. Did I miss something? What's the good way to do this? ...

How can I inform the implementor of my Interface that the "path" parameter represents a folder?

I am about to define an interface in my application that plug-in writers can implement to provide user-defined "export" capabilities. It'll look something like this: public interface IFooExporter { void ExportFoo(Foo foo, string path); } However, I need to let the plug-in writers know (explicitly, not just in documentation) that "...

Have Google maps center around geo-locs and zoom in appropriately

I would like to pass an x amount of geo-locations to the Google Maps API and have it centered around these locations and set the appropriate zoom level so all locations are visible on the map. I.e. show all the markers that are currently on the map. Is this possible with what the Google Maps API offers by default or do I need to resolve...

How to programmatically add portlet to the JBoss Portal dashboard

How can I programmatically add portlet to the JBoss Portal dashboard of specific user? Is there any remote API of the JBoss Portal to do this? SOAP web service, may be MBean-based API? Of course, as a last resort I can implement such service myself and deploy it to the JBoss Portal, but ideally it should not require deploying anything to...