I have to build a new webapp. My simple question is:
How can I choose my programming
language according to my needs?
Someone can help me building a Programming Language Comparison?
...
I see parallels between MEF and Lua. Both allow you to register methods and deploy as you need. Are both MEF and Lua forms of IoC / Dependency Injection?
...
So far I've seen many posts dealing with equality of floating point numbers. The standard answer to a question like "how should we decide if x and y are equal?" is
abs(x - y) < epsilon
where epsilon is a fixed, small constant. This is because the "operands" x and y are often the results of some computation where a rounding error is in...
Give me some of your thoughts on which is a better coding practice/makes more efficient code/looks prettier/whatever: Increasing and improving your ability to use if statements to anticipate and catch potential problems? Or simply making good use of try/catch in general?
Let's say this is for Java (if it matters).
Edit: I'm presentl...
What would be the benefit of using decimal.compare vs. just using a > or < to compare to variables?
...
How do I implement this equality comparison is a sane java way?
boolean x = (a == b) || (a.equals(b))
I want to make sure the content of both objects is equal but null is also ok, i.e. both can be null and are thus equal.
Update: just to be clear, I have to implement this comparison several times and don't want to copy&paste this...
This is one of the things I've been hearing in Django VS ASP.NET discussion. I personally find it hard to believe but I never tried Django.
So my question is: assuming that I am equally familiar with both python and the .NET framework but I do not know anything about Django or ASP.NET (with Visual Studio), is Django faster than ASP.NET ...
Hi,
I want to determine whether to different child nodes within an XML document are equal or not. Two nodes should be considered equal if they have the same set of attributes and child notes and all child notes are equal, too (i.e. the whole sub tree should be equal).
The input document might be very large (up to 60MB, more than a 1000...
I need help getting my head around the difference between my current OOP notion of state, and the way it would be done in a functional language like Haskell or Clojure.
To use a hackneyed example, let's say we're dealing with simplified bank account objects/structs/whatever. In an OOP language, I'd have some class holding a reference ...
I have heard that the Java implementation of Generics is not as good as the C# implementation. In that the syntax looks similar, what is it that is substandard about the Java implementation, or is it a religious point of view?
...
I am creating a mock database for import export tests (of the algorithm reading and writing complex data structures to our database, not just to test IO operations), and am trying to decide whether to use a DataSet to store the mock tables (by table name) in the faux-database, or Dictionary()
In terms of retrieving a datatable by name, ...
I'm trying to get started with unit testing in Python and I was wondering if someone could inform me of the advantages and disadvantages of doctest and unittest. What conditions would you use each for?
...
I have some generic types, like the following:
public struct Tuple<T1, T2> { ... }
public struct Tuple<T1, T2, T3> { ... }
etc.
These should in theory be able to compare themselves against other values of the same type, so that I can write the following type of code:
List<Tuple<Type, String>> l = new List<Tuple<Type, String>>();
l.Ad...
Background
I'm researching the efficiency of messaging within contemporary web applications, examining the use of alternatives to XML. This is a university project whose results will be released publicly - the greater the participation of the community, the greater the value of the results that are given back.
I need as many real-life e...
What are the trade-offs between using a System V and a Posix semaphore?
...
Stackoverflow User Luke wrote in this answer:
The boundaries between desktop and web
applications have really blurred.
Whilst once upon a time the nature of
developing for the web was totally
different to developing for the
desktop, nowadays you find the same
concepts [...] cropping up in both.
Since I am continually lo...
By default C# compares DateTime objects to the 100ns tick. However, my database returns DateTime values to the nearest millisecond. What's the best way to compare two DateTime objects in C# using a specified tolerance?
Edit: I'm dealing with a truncation issue, not a rounding issue. As Joe points out below, a rounding issue would introd...
Question: For typed in commands invoked via M-x I am having difficulty understanding how Emacs allows recalling and rerunning the commands. The command-history works quite differently from Vim. It puts the commands in a buffer rather than the "minibuffer".
Is there a way to get something similar to Vim's approach (i.e., previously typed...
I have this quiz application where I match what people type with the right answer. For now, what I do is basically that :
if ($input =~ /$answer/i) {
print "you won";
}
It's nice, as if the answer is "fish" the user can type "a fish" and be counted a good answer.
The problem I'm facing is that, well, my users as I are french, an...
I ran into this today when unit testing a generic dictionary.
System.Collections.Generic.Dictionary<int, string> actual, expected;
actual = new System.Collections.Generic.Dictionary<int, string> { { 1, "foo" }, { 2, "bar" } };
expected = new System.Collections.Generic.Dictionary<int, string> { { 1, "foo" }, { 2, "bar" } };
Assert.AreEqu...