Hibernate has a handful of methods that, one way or another, takes your object and puts it into the database. What are the differences between them, when to use which, and why isn't there just one intelligent method that knows when to use what?
The methods that I have identified thus far are:
save()
update()
saveOrUpdate()
saveOrUpdat...
I'm trying to port an old library (that doesn't use namespaces as far as I can tell) to modern compilers. One of my targets can't tell the difference between System::TObject and ::TObject (without a namespace). System::TObject is native to the compiler.
I've tried a using directive, i.e. using ::TObject;
But that doesn't do it.
The ob...
Hello
I've been developing a DLL in Visual Studio 2005. At the moment it compiles and does what it's supposed to.
However, I wanted to compile it using Borland C++ 2006 because I've heard that is better and makes faster code. When I try to do it I get error messages like this one:
E2015 Ambiguity between strcmp(const char *,const char...
Forgive me, for I am fairly new to C++, but I am having some trouble regarding operator ambiguity. I think it is compiler-specific, for the code compiled on my desktop. However, it fails to compile on my laptop. I think I know what's going wrong, but I don't see an elegant way around it. Please let me know if I am making an obvious mista...
Hi,
I'm trying to produce a pretty simple XML schema for an XML similar to the following:
<messages>
<item>
<important_tag></important_tag>
</item>
<item>
<important_tag></important_tag>
<tag2></tag2>
</item>
<item>
<tag2></tag2>
<tag3></tag3>
</item>
</messages>
The idea is that <important_tag> will h...
I wanted a Django model with 2 foreign keys from the same table. It's an event table which has 2 columns for employees: the 'actor' and the 'receiver'. But I get this error:
Error: One or more models did not validate:
tasks.task: Intermediary model TaskEvent has more than one foreign key to Employee, which is ambiguous and is not permi...
I need some advice on how to resolve ambiguities within application specifications.
As one simple example,
When a user fails to authenticate after a number of times, send a notification to IT.
In the above example, it is not clear how many times "a number of times" is.
It is not clear and I cannot simply set a random limit like 100...
I just discovered that when calling Java from Matlab
object.method(arg1,...,argn)
is equivalent to
method(object, arg1,...,argn)
The problem here is I also have a method.m that does some translation from Java to Matlab (eg. convert String[] to cell of strings). My method.m looks like
function result = method(object, arg1,...argn)...
Duplicate of the following question: C function conflict
Hi,
in my current project I have to use some kind of interface lib. The function names are given by this interface, what this functions do is developers choice. As far as I can tell a project shall use this functions and when it comes to compiling you choose the lib and with it ...
My code won't compile due to the error below:
The call is ambiguous between the following methods or properties: 'System.Math.Round(double, int)' and 'System.Math.Round(decimal, int)
My code is
Math.Round(new FileInfo(strFilePath).Length / 1024, 1)
How can I fix this?
Thanks
...
When ASP.NET came out people started referring to ASP 3 (and below) as classic ASP. Does anyone do this when refering to ASP.NET (non MVC) in relation to ASP.NET MVC?
It seems awkward when answering questions refering to normal ASP.NET as the "non ASP.NET MVC ASP.NET!"
Please don't explain the differences between the two- I know that a...
I've started reading Jon Skeet's early access version of his book, which contains sections on C# 4.0, and one thing struck me. Unfortunately I don't have Visual Studio 2010 available so I thought I'd just ask here instead and see if anyone knew the answer.
If I have the following code, a mixture of existing code, and new code:
public v...
As some of you may have noticed, a few hours ago Microsoft released Windows 7 RTM to those of us with a Technet or MSDN subscription.
I unfortunately didn't have the opportunity time-wise to test the new OS. I'm asking of anyone who used it with Visual Studio 2008 during RC what was your experience? Did you feel the RC offered a stable ...
I'm trying to hack my own dependency injection container in PHP, based on constructor injection. The container instantiates complex objects and inject them with the required objects based on the type hints in the constructor using reflection.
One thing I obviously stumbled upon is the fact that I can register multiple components that ca...
VARIABLE: ...
UNARYOP: 'not' Expression; // unary operation
BINARYOP: 'or' VARIABLE;
Expression : (NIL | INTEGER | UNARYOP) BINARYOP?;
In the above scenario, 'or' can either be reached through
Expression->BINARYOP
or
EXPRESSION->UNARYOP->Expression->BINARYOP
Is there a systematic way to remove ambiguities such as the above?
...
Suppose I have:
public class OuterClass() {
public class InnerClass {
public void someMethod(int x) {
someMethod(x);
}
}
public void someMethod(int x) {
System.out.println(x);
}
}
How do I resolve the ambiguity between the someMethod() of the outer class and the someMethod() of the inner...
Why is this an error :
ie. arent long long and long double different types ?
../src/qry.cpp", line 5360:
Error: Overloading ambiguity between "Row::updatePair(int, long long)"
and "Row::updatePair(int, long double)".
Calling code:
.
.
pRow -> updatePair(924, 0.0);
pRow -> updatePair(925, 0.0);
.
...
If i have tables such as:
table_1: 1, 'Hello My Name is Hal', '2009:11:02 08:42'
table_1: 2, 'Hello My Name is Dave', '2009:11:02 08:30'
table_2: 1, 'Ima all #red due to twitter', '2009:11:02 09:42'
And lets imagine all the table columns have the same col_names
Is there any way i can do a query to return the results in one SELECT on ...
I have a subset of a pointer class that look like:
template <typename T>
struct Pointer
{
Pointer();
Pointer(T *const x);
Pointer(const Pointer &x);
template <typename t>
Pointer(const Pointer<t> &x);
operator T *() const;
};
The goal of the last constructor is to allow to pass a Pointer of a subclass, o...
Suppose I wish to have 2 functions, one that generates a random integer within a given range, and one that generates a random double within a given range.
int GetRandomNumber( int min, int max );
double GetRandomNumber( double min, double max );
Notice that the method names are the same. I'm trying to decide whether to name the functi...