I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this: take a list - in this case, the children of an objectified lxml element - divide it into groups based on some criteria, and then later iterate over each of these groups separately.
I've reviewed…
Hi everyone,
This is an issue sporadically for very few users, however we haven't been able to replicate it. However I have now got a Chrome instance (Mac) which is reproducing the error (for some unknown reason), and I hope to not restart it until I have this nailed!
Rails application, using memcached for session store. While the bug manifests…
Where I work, we employ a consultant to do a considerable amount of work for us to hold us over until we can hire/train more staff. He has been working with us for quite a long time now, and he has always had this strange habit of leaving his initials on EVERYTHING he touches, as if its his sort of branding or advertising. And by everything, I…
I was thinking of working on a project while I have some free time and this one looks pretty nice: http://mindprod.com/project/filefinder.html
One thing I'm wondering about is that will it really be much faster compared to the regular windows search if I use SQL? I'm planning to use MySQL since it's open source. Also, do I need to be good at…
There is an SAP server that has some webservices I need to use, so I am trying to use wsimport to generate the client stubs.
I don't want to find all the wsdls and schemas that are referenced and modify them to do it locally, as that isn't sustainable, if they service should change.
So, how can I use wsimport to fetch a wsdl and generate…
I'm working on a project in Unity3D with Javascript, and I'm trying to implement the SmartFoxServer API (http://smartfoxserver.com) in Javascript instead of their example C# code. I've gotten most of it converted correctly, but I am still getting an error at runtime with the following line involving delegation to a C# file that is in the…
I am writing an asynchronous Ping using Raw Sockets in F#, to enable parallel requests using as few threads as possible ("System.Net.NetworkInformation.Ping" appears to use one thread per request, but have not tested this... also am interested in using F# async workflows). The synchronous version below correctly times out when the target…
I'm having trouble starting a transaction with Hibernate and MySQL while running in JUnit. I'm getting a HibernateException which states: "No TransactionManagerLookup specified". I believe this error is because I don't have a proper configuration setting for hibernate.transaction.manager_lookup_class.
I see that under the namespace of…
I interned at my current place of employment for 2.5 years while I was an undergrad. During that time, I worked 40 hours per week during the summer and averaged 20 hours per week during the school year. I have since been hired full-time and I have been with the company a little over 3 years now.
How many years of work experience do I…
While searching SO for approaches to error handling related to business rule validation , all I encounter are examples of structured exception handling.
MSDN and many other reputable development resources are very clear that exceptions are not to be used to handle routine error cases. They are only to be used for exceptional…
Hi, I'm still learning (baby steps). Messing about with a function and hoping to find a tidier way to deal with my datatables.
For the more commonly used tables throughout the life of the program, I'll dump them to datatables and query those instead. What I'm hoping to do is query the datatables for say column x = "this", and…
Should we be testing values that we already know the answer to?
If a value is important enough to be a dedicated hard code value then should should it be important enough of to change a test at the same time as the value? or is this just overkill?!
Any obvious issues/problems/gotchas with synchronizing access (in an ASP.NET MVC blogging engine) to a shared object model (NHibernate, but it could be anything) at the Controller/Action level via ReaderWriterLockSlim?
(Assume the object model is very large and expensive to build per-request, so we need to share it among…
I am building some equations in F#, and when working on my polynomial class I found some odd behavior using List.mapi
Basically, each polynomial has an array, so 3*x^2 + 5*x + 6 would be [|6, 5, 3|] in the array, so, when adding polynomials, if one array is longer than the other, then I just need to append the extra…
I'm working on a regex to match valid integer numbers such as the following:
0
1
99
999
However it should not allow matching an empty string. The closest I can get is:
(0)|\\d{1,3}
Which to me says a matching string will have either a zero or a series of digits between 1 and 3 characters long. However, empty…
Hey,
I've currently got a webserver set up which I communicate over SOAP with my iPhone app. I am returning a string containing a GUID and when I attempt to compare this with another string I get some strange results:
Why would this not fire? Surely the two strings are a match?
Thanks
For starters, this exercise in GNU make was admittedly just that: an exercise rather than a practicality, since a simple bash script would have sufficed. However, it brought up interesting behavior I don't quite understand.
I've written a seemingly simple Makefile to handle generation of SSL key/cert pairs as…
I've having trouble discerning which version/build of ruby to use with the most recent rails 3 beta. I was using 1.8.7 but over time the server would use too much memory and begin to slow down and eventually not work at all. Which version/build worked for you?
Hello,
I am trying to accomplish the following:
I wrote a Flex application that is trying to connect to a WCF service hosted on the clients computer.
I also wrote a windows forms application for the client to run. This application exposes a self-hosted WCF service that the Flex application is supposed to…
What up fam. So this isn't a question asking about memory management schemes; for those of you who may not know, the Flash Virtual Machine relies on garbage collection by using reference counting and mark and sweep (for good coverage of these topics, check out Grant Skinner's article and presentation). …
Is it possible to generate subclasses at runtime or while an application is running? If so, how is this achieved and what precautions should be taken to prevent a rogue object wreaking havoc inside an application?
<div>
<div>test</div>
</div>
$("div:contains('test')").css('display','none');
I know I am going to kick myself on this. The problem is that when this runs all divs are hidden due to nesting. How do I make it so that the parent div does not get hidden? I am limited to…
In .NET what is the best way to find the length of an integer in characters if it was represented as a string?
e.g.
1 = 1 character
10 = 2 characters
99 = 2 characters
100 = 3 characters
1000 = 4 characters
The obvious answer is to convert the int to a string and get its length but I want the…
Hi all,
Just wondering what everybody's opinion is on the Windows Admin tool Event Viewer?
I'm writing a WCF application at the moment and have started logging errors to the windows event viewer when I handle them. I then started thinking, should I be logging more than just errors, such as when…