comparison

Using OR comparisons with IF statements

When using IF statements in Python, you have to do the following to make the "cascade" work correctly. if job == "mechanic" or job == "tech": print "awesome" elif job == "tool" or job == "rock": print "dolt" Is there a way to make Python accept multiple values when checking for "equals to"? For example, if job == "mec...

Why are the built in functions in PHP named so randomly?

It seems that there is no real pattern to the way functions are named, str_replace, strrpos, strip_tags, stripslashes are just some. Why is this the case? EDIT - this wasn't meant as a "troll" type post - just something that I think everytime I use the language! ...

.NET Date Compare: Count the amount of working days since a date?

What's the easiest way to compute the amount of working days since a date? VB.NET preferred, but C# is okay. And by "working days", I mean all days excluding Saturday and Sunday. If the algorithm can also take into account a list of specific 'exclusion' dates that shouldn't count as working days, that would be gravy. Thanks in advance...

Array Vs. Linked List

I apologize--this question may be a bit open-ended but I think there are probably definite, quantifiable answers to it so I'll post it anyway. A person I know is trying to learn C++ and software development (+1 to him) and he asked me why someone would want to use a linked list in preference to an array. Coding a linked list is, no dou...

Which Visual Studio debugger features are missing from WinDbg?

Are there any? ...

Windows SharePoint Services vs. Microsoft Office SharePoint Server?

There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing). My question is: what does MOSS do that makes it worth the extra cost? ..and does Microsoft Search Server not compete with the Business D...

Programmer vs Architect?

My ideal position would be designing systems and programs, I love the industry and the technology but I just don't really like ONLY coding. People at my work say that nowadays you can't just be a software architect. Any insight? NOTE: I didn't say I don't like coding, I meant I don't like ONLY coding (see edit above). ...

Comparing Two Strings producing a numeric delta

Does anyone know of a simple way to compare two strings together to generate the "amount of difference" between the two? (in a numeric value) I have been crawling google with little luck on this. And after doing some coding it's not as simple as I had thought. Any clues? ...

Which effects library should I integrate with GWT?

I am curious if anyone has done a comparison between the different options out there. So far I am leaning towards using Moo.fx because loading prototype.js just to use scriptaculous seems a bit much. Does that make sense? Are there any other effects libraries worth trying? Thanks. ...

Tool to compare sql server tables

Looking for a free tool to compare two sql server tables (both data and schema). Sorry, cannot afford any solutions from Red Gate. No Sql queries please. It would be great if the tool can script the differences found. I also went through some older posts. The closest I have seen is SQLDBDiff but I would love to try more options. ...

How do you compare two version Strings in Java?

Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be. I need to compare the versions and have the following hold true: 1.0 < 1.1 1.0.1 < 1.1 1.9 < 1.10 ...

Advantages of MS SQL Server 2008 over MS SQL Server 2005?

What are the key differences between MS SQL Server 2005 and 2008? Are there any compelling reasons for upgrading (any edition, as I have a customer with multiple editions)? Or can you point to a website with either a chart or bullet point comparison of the two servers? Also, is there anything noteworthy in the Express editions of ei...

Database comparison

Which industry-class database has the most unique features? (with "unique" meaning that no other RDBMS has them) I think my choice here is Oracle 11g: Flashback query (you can estract data as it was a moment in the past) ASM - automatic storage management Native code compilation of stored procedures Audit features (tracing everything,...

Wiki or CMS

What are the differences between a wiki and a CMS? Is there any? ...

What is the best "turnkey" stemming algorithm?

I need a good stemming algorithm for a project I'm working on. It was suggested that I look at the Porter Stemmer. When I checked out the page on the Porter stemmer I found that it is deprecated now in favor of the "Snowball" stemmer. I need a good stemmer, but I can't really spend significant time implementing (or optimizing) my own. W...

Aspect Oriented Programming vs. Object-Oriented Programming

Like most developers here and in the entire world, I have been developing software systems using object-oriented programming (OOP) techniques for many years. So when I read that aspect-oriented programming (AOP) addresses many of the problems that traditional OOP doesn't solve completely or directly, I pause and think, it is real? I hav...

Compare double in VBA precision problem

I have trouble comparing 2 double in Excel VBA suppose that I have the following code Dim a as double Dim b as double a = 0.15 b = 0.01 After a few manipulations on b, b is now equal to 0.6 however the imprecision related to the double data type gives me headache because if a = b then //this will never trigger end if Do you know...

Java Comparator

Does any one know of some kind of Comparator factory in Java, with a public Comparator getComparatorForClass(Class clazz) {} It would return Comparators for stuff like String, Double, Integer but would have a public void addComparatorForClass(Class clazz, Comparator comparator) {} For arbitrary types. ...

Windows Azure for web developers vs Amazon EC2

I just watched the Windows Azure intro video and it left me feeling like it was a front end shell for hosted IIS instances. Can anyone who know more (possibily that was part of the beta) shed on why you would use this vs. EC2. it seemed easy enough but really didnt give specifics on how it works, why it works or why you would use this v...

Why does Ruby seem to have fewer projects than other programming languages?

I've found Ruby to be very attractive; I like the fact that everything is an object and its syntax is very appealing. I was hoping that it would gain a lot of popularity this year, but I don't see lot of activity in Ruby. For instance if we take the number of tags added in SO there are only about 700 questions tagged as "ruby." This ...