-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have two variables:
char charTime[] = "TIME";
char buf[] = "SOMETHINGELSE";
I want to check if these two are equal... using charTime == buf doesn't work.
What should I use, and can someone explain why using == doesn't work?
Would this action be different in C and C++?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Why am I getting this result?
[TestMethod]
public void nan_test()
{
Assert.AreEqual(1, double.NaN, 1E-1); <-- Passes
Assert.AreEqual(1, double.NaN); <-- Fails
}
What difference does the delta have in asserting NaN equals a number? Surely it should always return false. I am aware…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Is it possible to test for enum equality in JSF?
i.e.
<h:outputText value="text" rendered="#{myBean.enum==BeanEnum.enum1}"/>
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I understand that, with a singleton situation, you can perform such an operation as:
spam == eggs
and if spam and eggs are instances of the same class with all the same attribute values, it will return True. In a Django model, this is natural because two separate instances of a model won't ever…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm basically building a simple list, and one of the items in the list is selected. I'm accomplishing this by having a "selected" class applied to whichever item I want to have selected. I have two buttons that go forward and backward which traverse this list. However, when the user gets to the…
>>> More