How do I find out if a connection has been broken using the httplib library? Seems like something so basic yet I can't find the answer on here or google.
Does anyone know if Hibernate 3.5 is supported under Seam 2.x (specifically 2.2.x)? I'm very interested in some of the JPA 2 features, particularly query building, but work within the Seam framework. Is this version of the library supported? Thanks in advance!
Hi,
I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this?
Thanks!
I have a file name, like "Foo.dll," for a library that I know is in the bin directory. I want to create an Assembly object for it. I'm trying to instantiate this object from a class that's not a page, so I don't have the Request object to get the path. How do I get the path I need to use Assembly.Load()?
Hi there! what about this one:
I want to format the currentTime displayed by a videoPlayer component inside flex, something like : 8230.999 to something like 01:59:59:999 which is "hours:minutes:seconds:milliseconds"
I trie different sets of codes but they can't get it to work because currentTime is nor a correct miliseconds time as it adds a floating 3 digit point to seconds;
so instead of : 2000ms it outputs 2.000
something people like me just can't understand!
thanx for any help :)
### UPDATE
I still have problem with milliseconds.
here's the current MXML:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
protected function convert_clickHandler(event:MouseEvent):void
{
var val:Number = new Number(inPut.text); //inPut.text = 1000.001
//val = val * 1000;
outPut.text = timeFormat(val);
}
public static function timeFormat(value:Number):String
{
var milliseconds:Number = value % 1000;
var seconds:Number = Math.floor((value/1000) % 60);
var minutes:Number = Math.floor((value/60000) % 60);
var hours:Number = Math.floor((value/3600000) % 24);
var s_miliseconds:String = (milliseconds<10 ? "00" : (milliseconds<100 ? "0" : ""))+ String(milliseconds);
var s_seconds:String = seconds < 10 ? "0" + String(seconds) : String(seconds);
var s_minutes:String = minutes < 10 ? "0" + String(minutes) : String(minutes);
var s_hours:String = hours < 10 ? "0" + String(hours) : String(hours);
return s_hours + ":" + s_minutes + ":" + s_seconds + '.'+s_miliseconds;
// returns 00:00:01.000.0009999999999763531 should return 00:00:01.001
// I still have problem with milliseconds
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:TextInput x="240" y="72" id="inPut" text="1000.001"/>
<s:TextInput x="240" y="140" id="outPut"/>
<s:Button x="274" y="107" label="convert" id="convert" click="convert_clickHandler(event)"/>
</s:Application>
Hey,
I'm new to python so I really don't know the language very well.
the following example was taken from here http://docs.python.org/library/json.html
>>> import json
>>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]')
[u'foo', {u'bar': [u'baz', None, 1.0, 2]}]
what does the u mean? and how do i know which elements are available in the dictionary?
Hi all,
I need to download an image from some URL to my server. However, my server's config disallowed me to do it this way:
getimagesize( $file );
Because, it generate error:
Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in somefile.php on line 10
So, is there another way I can use that doesn't require external library?
My app needs to process text files during a batch process. Occassionally I receive a file with some special character at the end of the file. I am not sure what that special character is. Is there anyway I can find what that character is so that I can tell the other team which is producing that file.
I have used mozilla's library to guess the file encoding and it says UTF-8.
#coding: utf-8
str2 = "asdf????????"
p str2.encoding #<Encoding:UTF-8>
p str2.scan /\p{Cyrillic}/ #found all cyrillic charachters
str2.gsub!(/\w/u,'') #removes only latin characters
puts str2
The question is why \w ignore cyrillic characters?
I have installed latest ruby package from http://rubyinstaller.org/.
Here is my output of ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
As far as i know 1.9 oniguruma regular expression library has full support for unicode characters.
Hi, i want to convert HTML (having javascript ) to PDF..
how i can do that ??
i just want to show what is being shown in web page ... like my scenerio is . i am displaying a gantt chart that is generated by javascript library .. now i want to save that HTML web page in PDF ... how to do that ????
Is there a way to specify code to be run whenever an error occurs in Matlab? Googling I came across RunTimeErrorFcn and daqcallback, but I believe these are specific to the Data Acquisition Toolbox. I want something for when I just trip over a bug, like an access to an unassigned variable. (I use a library called PsychToolbox that takes over the GPU, so I want to be able to clear its screen before returning to the command prompt.)
Although iPhone support JSON natively, and easy to consume RESTful services, AMF is a binary protocol and it supposes to use much less bandwidth. Do you think using AMF + Flash remoting is a good idea?
Just found this AMF library in cocoa (Objective-C): http://github.com/nesium/cocoa-amf/
Hi All
I would like to handle time series in python.
I have been suggested to use scikit.timeseries but I need to handle up to microseconds and this last, as far as I know, handles up to milliseconds.
Do you know any other library able to do that? At some point I need to merge 2 time series sampled at different time, and I would like to avoid rewriting such kind of features or any new classes from scratch whenever it is possible.
I thank you all
AFG
I'm keen to test out html offline storage and caching with a view to developing a prototype to show off the offline web application capabilities of html5.
I've found some webkit-specific samples, but I'm battling to find any decent code samples that even work at all in Firefox 3.6
For a sample, I'd be happy with something that works with the following:
Our company uses jquery extensively so I'd prefer samples that use that library or pure javascript.
It should at least work on firefox (3.6+ is fine)
Can anyone point me to some links that provide some guidance and code samples?
I wonder how can I enable the nullptr in the just released Visual Studio 2010. (C++ project, not managed).
This is one of the new features but it is not available by default and looking inside the documentation at http://msdn.microsoft.com/en-us/library/4ex65770(VS.100).aspx it seams that it is enabled by /clr but this is managed!
Is this a feature added only for .NET?
Hello,
I am creating some cookies in my ASP.NET application. These cookies expire 10 minutes after they have been created. I follow the approach described on MSDN as shown here:
http://msdn.microsoft.com/en-us/library/system.web.httpcookie.expires.aspx
My question is, when a cookie "expires", what happens? Does the browser automatically delete the cookie? Is it our responsibility as developers to remove the cookies if they exist and have expired?
Thank you,
I'm currently developing a library for monitoring calls to several remote services (WebServices, EJBs...).
One of the parameters that i would like to register is the port from which a EJB is called (a Stateless Session Bean invoked like a remote object)
There is any standarised way of getting the port? Or should I inspect the JNDI tree for this kind of information?
I'm using the EJB 2.1 spec, but it's also posible for me to use EJB 3
I remember having read a very good guide to writing collections. By that I mean, it described using macros to generate types with type parameters, kind of like C++ templates. I'm not sure if it was written by Rusty Russell, but it was someone I recognized. It was posted on hackernews or proggit... I wanted to write a new C library and has searched google for the past 30 min for this guide to no avail. Anybody remember?
The problem: Given a set of hand categorized strings (or a set of ordered vectors of strings) generate a decision function to categorize more input.
The question: are there any tools out there that will do that? I'm thinking of some kind of reasonably polished, download, install and go kind of things, as opposed to to some library or a brittle academic program.
Hi, I'm doing an add-in for Outlook 2007 in C++.
I need to capture the events like create, change or delete from the Outlook Items (Contact, Appointment, Tasks and Notes) but the only information/examples I've found are for Visual Basic so I don't know how to connect the event handler.
Here is some information related: http://msdn.microsoft.com/en-us/library/bb208390(v=office.12).aspx
Any help is welcome :) Thanks
Hi all,
I would like to know, is there a conversion library for converting string patterns to PCRE regular Expression patterns.
Sample Patterns:
application/ms-tnef ARKADMIN_GET_ 34 ^MAIL FROM|3a| ?
2|
Thanks in advance.
HI I'd like to know how to check out the speed of a file being uploaded in real time using the curl library in c++. This is what I have written:
curl_easy_getinfo(curl,CURLINFO_SPEED_UPLOAD,&c);
But the manual says that it shows average speed, but even this doesn't seem to work with me, because I can only see a 0.
There is one more thing: How to set an upload limit that works, because if I write this:
curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, 100);
I get an error 502 message
plis help
Hi:
I am new to JQuery library. I am currently trying to create a Draggable by mouse. Say, when I press the mouse it start to draw and then I drag the mouse to change the size and then I release the mouse to finalize the drawing.
Is it possible to do this with JQuery? Thank you in advance.
Joe