In any language, XSLT, PHP, Ruby, Perl, anything: how can I get the XPath or other path or identifier to the element containing the largest number of <p> tags?
...
What are some of the nastiest, most difficult bugs you have had to track and fix and why?
I am both genuinely curious and knee deep in the process as we speak. So as they say - misery likes company.
...
Can anyone recommend a good book for software people who are looking to break into the finance industry as a developer?
...
This site has been great for me to learn what's out there for programming tools and libraries. I'm wondering what are some promising tools/libraries/algorithms -- in any areas of programming or software engineering -- that are in alpha or beta right now that I should keep my eyes on when they get released.
Some ones that come to mind to...
I have the X,Y of 2 end points and 1 bezier point, of a Quadratic Bezier curve.
Using this data, how can I derive the polynomial representation of the curve?
...
I'm thinking of writing a domain specific language (DSL) to model business objects. The DSL will not be executed, instead it will be used by a template based code generator (probably CodeSmith) to generate the .NET & SQL.
The DSL will need to support the definition of the following elements:
Classes (name & description)
Properties (na...
Does anyone know the full technical vocabulary to describe all the various versions of quicksort?
The one I know is "fat pivot"[A] (where all items matching the pivot placed in the middle of the subarray and excluded from further sorting).
The ones I'd like to know are when one element (the pivot) is placed in the middle and excluded fr...
Hi! for a program I am writing I would need a dictionary between Spanish and English words. I googled a while, but I could not find any database freely available. Does anybody know where or how to get such a database (preferably a simple CSV or XML file)?
So far my best idea to create such a dictionary is to create a little program tha...
So I want to build a form validation class/object in javascript. The way I see it working would be something like this:
var form=new Validation();
form.addField("name","Your name","required");
form.addField("email","Email Address","is_email");
.........
form.validate();
I was thinking that the validation class would be defined someth...
I work for a large software company. On the contract I'm currently working on, I have to work with a grossly inefficient legacy application that we simply don't have the budget to fix, but which is very important to our customer.
Just for fun, over the course of a few months, I wrote a new, much improved version of it at home on my own...
This is a wheel that's been re-invented again and again over the years.
The Problem: The user needs to input a Date/Time
Basic considerations
We want to make it as easy as possible for the user to enter the desired date/time
Some applications call for historical dates, some applications call for future dates only, some will need to ...
What is the best way to join a list of strings into a combined delimited string. I'm mainly concerned about when to stop adding the delimiter. I'll use C# for my examples but I would like this to be language agnostic.
EDIT: I have not used StringBuilder to make the code slightly simpler.
Use a For Loop
for(int i=0; i < list.Length; ...
Currently I can think of only three good reasons to return this in a (public) method, namely:
(mmyers) when implementing fluent interfaces, e.g.
public class X
{
...
public X enableValidation()
{
setValidation(true);
return this;
}
...
}
(Jon Skeet) for identity conversions, e.g.
public class X
{
...
public X t...
I have general academic knowledge of the various design patterns that are discussed in GoF and Head First Design Patterns, but I have a difficult time applying them to the code that I am writing. A goal for me this year is to be able to recognize design patterns that are emerging from the code that I write.
Obviously this comes with exp...
Slightly modified version of canonical broken double-checked locking from Wikipedia:
class Foo {
private Helper helper = null;
public Helper getHelper() {
if (helper == null) {
synchronized(this) {
if (helper == null) {
// Create new Helper instance and store reference on
...
Over the course of time, my team has created a central class that handles an agglomeration of responsibilities and runs to over 8,000 lines, all of it hand-written, not auto-generated.
The mandate has come down. We need to refactor the monster class. The biggest part of the plan is to define categories of functionality into their own cl...
In my early coding days, I would tend to group classes that functioned in a similar way. For example:
Data transfer objects
Object A
Object B
Dialogs
Dialog A
Dialog B
After a while, it started to frustrate me that when I was working on a particular part of the application, I would have to jump all around to piece it together.
I...
I am in a compilers class and we are tasked with creating our own language, from scratch. Currently our dilemma is whether to include a 'null' type or not. What purpose does null provide? Some of our team is arguing that it is not strictly necessary, while others are pro-null just for the extra flexibility it can provide.
Do you have an...
What are the most important guidelines to follow if you need to break an interface in a .NET application? How do these guidelines change before and after your application has been deployed?
I know there are other questions that debate when/where interfaces should be used, however I don't want to get into that. I just want to know some ...
Do you have a process within your company for the approval and copy-editing of text on your software products?
If so, do you employ a professional copy-editor, or does a nominated person within the organisation take responsibility for this?
Edit
I know that this is not exactly programming-related, but it does have a strong bearing on ...