So, here's the scenario. I have a file with a created time, and I want to choose a time from a list of times that that file's created time is closest or equal too...what would be the best way to accomplish this?
...
I'm using Compare .NET Objects to test whether my POCOs are persisted correctly to a test database. Let's take an example POCO:
public class NoahsArk
{
public virtual Noah Noah { get; set; }
}
And the mapping file, using FNH:
public class NoahsArkMap : ClassMap<NoahsArk>
{
References(x => x.Noah).Cascade.All();
}
Now, I run...
In this program I'm writing, it would need frequent database communication, and at the moment I'm using just XML files. Is there really a benefit from using MySQL or SQL in general over XML. Just note that I'm using C# so MySQL is not very fun to deal with in it (from what little experience I have).
...
Hi
I have two ruby hashes (which are essentially models) and am trying to find the differences between them, one is an old instance of an object where the other has new values assigned to some attributes. I'm trying to determine which keys have changed, but there doesn't seem to be anything built into the Hash for this. I can think of...
Hi everyone. So my problem is this:
I am receiving a JSON string from across the network. When decoded (using SBJSON libraries), it becomes an NSDictionary that SHOULD contain a number of some sort for the key 'userid'. I say 'should' because when I compare the value to an int, or an NSINTEGER, or NSNumber, it never evaluates correctly....
In my programming class we currently have a project that requires us to take arguments into the program. I then need to be able to check one of the arguments to see which value was passed to the program so that I can choose the appropriate behavior for the program to follow. In a previous homework assignment I did this with the strcmp fu...
How do you go about comparing two generic classes?
class Entry<K,V>
{
protected K key;
protected V value;
public K getKey() { return key; }
public V getValue() { return value; }
public static Comparator KeyComparator = new Comparator()
{
public int compare(Object o1, Object o2)
{
int key1 = ( (Entry) o1 ).getKey();
int...
I am thinking of starting a blog, which I would like integrated into my existing website. I come back empty handed from googling for a comparison of blogging software written in PHP.
My requirements:
Simple but not rudimentary (not a result of a 15 minute CodeIgniter tutorial)
Quality source code (I'd like to be able to learn from it ...
Maybe, some performance comparison or some noticeable specific differences is what I want to know.
As I heard there is no really big difference. Hence, I've got one more question. For what purposes dozens of people spent their time to reinvent the wheel implement already implemented spec ones more?
...
I taught i had a clear view of the difference between these, but giving it a deep i got confused.
Can someone help with a comparison, please?
...
Woohoo, I've come to arrays now, thank god.
Now, I've got 2 arrays!
int colorvalues[][] = {{34,255,255,56},{127,204,11,34},{123,98,127,34},{34,34,127,17}};
Imagine it as a 4x4 pixel picture
Now, I want to create a histogram, the distribution of colorvalues from 0 to 255. For example here I've 2*255, 2*127, 5*34 and so on.
So I've ...
We have a for fun project which require us to compare two black and white bitmaps of two signature and say whether they are the same persons signature. As this is just two loaded bitmaps rather than data captured from a tablet the approach is going to be a little different to normal signature recognition.
I am thinking it would require...
How do I compare times in python?
I see that date comparisons can be done and there's also "timedelta", but I'm struggling to find out how to check if the current time (from datetime.now()) is earlier, the same, or later than a specified time (e.g. 8am) regardless of the date.
...
I thought caseinsensitiveLocalizedCompare: would take care of this (that is not including "the" and "a" in the comparison) , but it does not.
(Also, In response to the first answer below, I understand that "case insensitive" part wouldn't help, but I thought that the "localized" part may help.
I can't find any options to do this and g...
Hi everyone,
Have a list of dates in excel in the format (this comes originally from csv):
23/11/09 07:27:02
23/11/09 08:01:50
23/11/09 08:38:58
23/11/09 09:40:01
What I want to do is count the number of these falling between hour blocks, like 7-8, 8-9, 9-10 etc
Not sure how to get started, but one idea was just to put logic statemen...
How to compare groups of tuples in sql: consider the following example:
TABLE T1
--------
GROUP VALUE
----- -----
A FOO
A BAR
X HHH
X ZOO
TABLE T2
--------
GROUP VALUE
----- -----
B ZOO
C FOO
C BAR
I want to write an sql query which compares the groups of values...
I'm attempting to use reflection to determine the result of a call to .Equals on two different but "equal" instances of a type.
My method would be something like:
public static bool TypeComparesProperties(Type t)
{
// return true if (an instance of t).Equals(a different instance of t)
// will be true if all publicly accessible...
I'm experimenting a bit with textual comparison/basic plagiarism detection, and want to try this on a website-to-website basis. However, I'm a bit stuck in finding a proper way to process the text.
How would you process and compare the content of two websites for plagiarism?
I'm thinking something like this pseudo-code:
// extract tex...
What is the difference between
(function (lambda ...))
and
(lambda ...)
and
'(lambda ...)
?
It seems three are interchangeable in a lot of cases.
...
Hello $mostamazingforumforfastanswersever.
I have a quick silly question; what is the best way to write this :
if ($curpageurl == "www.mysite.com/this" || "www.mysite.com/this/")
{
echo 'this is the this page';
}
and if it isn't, then I need to call
while (isset($somevariable)
{
echo '$somevariable';
}
and if that variable isn'...