Does Windows provide some sort of evented API so I can run some code whenever a drive (say a usb stick) is attached?
Like ReadDirectoryChangesW is for events on the filesystem?
I have functionality built in python on a central server. I wish to expose this api over the network to an iphone application. What would be the best way to do that?
Is it possible to create web services in python and have the iphone app use those? If so could anyone give me pointers as to how to create web services in python.
If someone has a better idea on how to go about doing this let me know =)
Hi,
I'm trying to get Google Maps Directions API working with jQuery, and
I have the following code..
http://pastebin.com/6jcGt706
Where #end is a select list in the HTML.. I'm Using jQuery 1.4.. I'm
not sure as to what is going wrong.. Can you please help me with
this...
Would appreciate if any one could help me fix the problem with this..
Thanks!
I am trying to use the youtube API to pulldown some videos for my site. Currently am running this code here:
//Youtube Videos Pull Down
$youtubeURL = "http://gdata.youtube.com/feeds/api/videos?alt=json&q=cats+cradle+chapel+hill&orderby=published&max-results=10&v=2";
$youtubeSearch = file_get_contents($youtubeURL, true);
$youtubeArray = json_decode($youtubeSearch, true);
Not having any problems accessing certain elements of the associative array however youtube's api is putting $ in many of its array elements .. such as [media$group]
Anytime I try to access an array with one of the $ elements in it, it doesn't work. Suggestions?
I have tried preg_replace but can't seem to get my expression right.
I have a file that is generated inside (hudson server) /var/lib/hudson/jobs/jobtitle/1/out.txt
I need to fetch this file, but doing a GET request for http://myhudson:8090/job/jobtitle/1/out.txt doesn't actually locate the file.
Basically, I have another box that will grab this file from the hudson server. This box will make the out.txt file available for download.
Another challenge is the build number directories. How would I be able to use the hudson API to stop or delete the specific builds running ?
I am forced to do iterate through all build numbers to send STOP or DELETE api call in php using wget to do the REST API call. This is not very efficient.
for ($i=0; $i < 3000; $i++){
exec('wget -O /dev/null "http://myhudson:8090/job/' . 'jobtitle' . '/$i/stop"');
}
The greenlet package is used by gevent and eventlet for asynchronous IO. It is written as a C-extension and therefore doesn't work with Jython or IronPython. If performance is of no concern, what is the easiest approach to implementing the greenlet API in pure Python.
A simple example:
def test1():
print 12
gr2.switch()
print 34
def test2():
print 56
gr1.switch()
print 78
gr1 = greenlet(test1)
gr2 = greenlet(test2)
gr1.switch()
Should print 12, 56, 34 (and not 78).
Is it possible to use the criteria api to load a set of parent objects along with a filtered, eagerly loaded set of child objects? I'm trying to query a list of categories and at the same time load the categories products that start with the letter M. The query below gives me the results I want but the Products are not eagerly loaded, that is NHibernate performs additional queries when I enumerate the Product collection:
var categoriesWithProducts = session.CreateCriteria<Category>()
.SetFetchMode("Products", FetchMode.Eager)
.CreateCriteria("Products")
.Add(Expression.Like("Name", "M%"))
.List<Category>();
What am I missing here?
Has anyone here used Microsoft Anti-Virus API to scan file uploads using any anti-virus ? What is your experience. I want to use mcafee, trend or other well known AV to be called programatically.
I have authlogic going on my app, but now I need to have an an API. I
don't want to establish a session, just want a user to send in data in
a json request such as:
{"type":"address","password":"mypassword","name":"my notificaiton name
goes here","user":"myusername","text":"my interesting stuff goes
here"}
So questions -
1) is this a decent approach?
2) how do i do the auth inside my rails controller?
In API documentation, and sometimes even used in discussions here on Stack Overflow, I sometimes see the pound (#) character used instead of the dot (.) as the separator between the class name and the method name. For example:
Settings#maxPageSize
I'm wondering what this usage means, and where it comes from?
Recently, I happen to know MovieClip.addFrameScript() which is very useful, otherwise timeline script should be coded in fla. Do you know any other undocumented Actionscript3 API?
I have two classes: Cat and DomesticCat, that extends Cat.
I want to select all Cats, but no oneDomesticCat. How to do it using NHibernate criteria API?
Hi all
I am looking for some compare application that i will be able to use from my code .
I need to compare files and know if they identical if not to get the lines and text where the difference was found.
Most;y i compare a text(ASCII) files.
So i need program with easy api for that thing.
Thanks for help.
Hi,
In my C++ program, I need to call this c API:
GConn* gnet_conn_new (const gchar *hostname,
gint port,
GConnFunc func);
where GConnFunc is defined as:
void (*GConnFunc) (GConn *conn);
My question is if I have a C++ class and have a member function like
Class A {
public:
A();
void my_func (GConn* conn);
}
In my A::A() Constructor, how can I pass this-myfunc to gnet_conn_new as the GConnFunc parameter?
Thank you.
All,
Has anyone figured out how to return the sql for an object that is in Webi using the rebean api? I have got the ReportExpression of the column but, from there I am having a difficult time retrieving the SQL of the object.
Thanks
I am using FindFirstChangeNotification API to monitor the changes happening in a particular folder.But how to exclude a particular file(present in the watching folder) change notification Only.
Dear,
I am looking for well known Microsoft Project alike applications which somehow i get to know through this http://stackoverflow.com/questions/729926/alternatives-to-microsoft-project but I also need to know their API/Library through which I can pro grammatically read their files using .NET
Hope m not asking for much :)
Where in the Google Maps API docs can I find a table explaining the accuracy values of Geocode lookups?
Has the range of values changed in between V2 and V3?
Hello,
As my project to do over this summer I would like to create a program that answers a Skype call using the Skype API and allows a user to connect to another VOIP provider (through SIP) and make calls by dialling through the client callers Skype application.
I understand that the Skype API allows me to answer and receive keypad input, but I'm stuck on actually sending the sound of the call to a SIP client.
Is there an API/library that would allow me to take the Skype receiving audio as input in the SIP client?
Is this even possible?
I'm not tied to a language but I had planned on using Python.
Thanks.
I have written the code it works on Android 2.2 API but it does not work on Android 4.0
String url = textUrl.getText().toString();
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
try
{
HttpResponse response = client.execute(request);
textResult.setText(HttpHelper.request(response));
}
catch (Exception e) {
// TODO: handle exception
textResult.setText("Failed");
}