comparison

When "" == s is false but "".equals( s ) is true

EDIT Thanks for the promptly responses. Please see what the real question is. I have make it bold this time. I do understand the difference between == and .equals. So, that's not my question ( I actually added some context for that ) I'm performing the next validation for empty strings: if( "" == value ) { // is empty string }...

Why Do You Use Delphi?

Nick Bradbury (the author of HomeSite, TopStyle and FeedDemon) just posted a fascinating explanation of why he uses Delphi: http://nick.typepad.com/blog/2009/07/why-i-use-delphi.html I'd like to know if there are other reasons. Why do you use Delphi? (I'm making this community wiki from the onset. I'm interested in hearing your answe...

Unexpected result when comparing values retrieved with PropertyInfo.GetValue()

I've got some code which I use to loop through the properties of certain objects and compare the property values, which looks somewhat like this: public static bool AreObjectPropertyValuesEqual(object a, object b) { if (a.GetType() != b.GetType()) throw new ArgumentException("The objects must be of the same type."); Type type = a....

comparing time ranges

hi! I'm trying to write an sql statement which compares time ranges. I got some excellent ideas from this question: http://stackoverflow.com/questions/143552/comparing-date-ranges the problem however is times that span midnight e.g. given the following start and end times: 19:00 - 20:00 21:00 - 21:30 23:00 - 01:00 01:00 - 03:00 I w...

C++ string comparison in one clock cycle

Is it possible to compare whole memory regions in a single processor cycle? More precisely is it possible to compare two strings in one processor cycle using some sort of MMX assembler instruction? Or is strcmp-implementation already based on that optimization? EDIT: Or is it possible to instruct c++ compiler to remove string duplicates...

Is Perl faster than bash?

I have a bash script that cuts out a section of a logfile between 2 timestamps, but because of the size of the files, it takes quite a while to run. If I were to rewrite the script in Perl, could I achieve a significant speed increase - or would I have to move to something like C to accomplish this? #!/bin/bash if [ $# -ne 3 ]; then ...

Is there a difference between !== and != in PHP?

Is there a difference between !== and != in PHP? ...

What are the advantages and disadvantages to using OpenID?

I'm currently debating whether I should use OpenID login for one of my websites. OpenID may be harder for me to implement because I already have registration and login code written, but this is just a time consideration. What advantages and disadvantages are there to using OpenID in contrast to, say, a traditional website user account sy...

Is relational comparison between int and float directly possible in C?

I am using Visual Studio 6 with some old time code written in c. I found an issue where the code looks like this.. int x = 3; float y = 3.0; if(x == y){ do some crazy stuff } is this a valid comparison? is it possible at run time the allocation for the float is 3.0000001 and this would fail? I am a rookie so take it easy on me :...

Is there a good library for sorting a large array of numbers in C?

If I have a large array of integers or floats, what is a good algorithm/ implementation for sorting (in C)? It is a bit late in the game for an edit... but I am looking for correctness and speed. ...

What are the differences between Access and Oracle?

I'd like to know what are the differences between Access and Oracle. ...

MOSS vs. traditional ASP.NET

I am in process of evaluating MOSS (SharePoint) and traditional ASP.NET for my client's site. The site will be available to client's partners over the internet. I'm interested in differences between these two approaches from following perspectives: Development perspective. How does development differs? What are pros and cons of both a...

Concise description of all common software licenses for the average programmer?

I'm reviewing some jQuery plugins for distribution with closed source (on the server, anyhow) commercial applications. One thing I'm noticing is that there isn't any standard license that covers all plugins. After reading through the legal BS of a couple licenses, I'm feeling very glad I didn't go through with getting a law degree. ...

What can be done in R that can't be done with Python/Numpy/SciPy

I've been recently wondering about the over-proliferation of DSLs like R - and thinking whether this is good or bad. Specifically, I wonder what right has R as a stand-alone language and environment? Wouldn't it be much better to build it as an internal DSL/library on some popular language (like Python)? What can R do that Python with s...

Firebird vs HSQLDB at Java

Hi , i wanna write a small (5-6 table) desktop app in java.I wanna use Firebird 2.1. database.But i googled and see HSQLDB.I wanna make a decision between firebird and hsqldb :) So which database i have to use ? ...

Fortran's performance

Fortran's performances on Computer Language Benchmark Game are surprisingly bad. Today's result puts Fortran 14th and 11th on the two quad-core tests, 7th and 10th on the single cores. Now, I know benchmarks are never perfect, but still, Fortran was (is?) often considered THE language for high performance computing and it seems like the...

Whats difference between FMS, Wowza and Red5, any comparison table would be helpfull

I want to know what is the main technical difference between the FMS , wowza and Flash media server . Any body have a comparison table or link please help thanks ...

SQL Server Compact - using OleDB vs SqlServerCe

Looking for performance vs. ease of use comparisons between the two Hopefully some real world examples too ? This is for a desktop Winforms/C# app using SQL Server Compact 3.5 and .net 2.0 ...

C# generics compared to C++ templates.

Possible Duplicate: What are the differences between Generics in C# and Java and Templates in C++? What are the differences between C# generics compared to C++ templates? I understand that they do not solve exactly the same problem, so what are the pros and cons of both? ...

Why isn't stl compare function a member?

Just idly curious why the compare function for stl::sort can't be a static member? I have a small little helper class foo that is declared and defined in a header, but now I have to create a foo.cpp file for the implementation of cmp() so it isn't multiply defined. I also have to think of a suitably decorated name so fooCmp() doesn...