Awesome proof of concept about how Shazam works

Reproduced from

http://sites.google.com/site/redcodenl/creating-shazam-in-java-1

This guy is ^n times the developer I am and his proof of concept is totally sweet.

 

Creating Shazam in Java

A couple of days ago I encountered this article: How Shazam Works

This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
About Shazam

Fuzzy search, aka unified search, in SugarCRM - you CAN search for parts of text fields!

I'm just blogging this because it took me way too long to find the answer. It turns out that SugarCRM v5.2.2 DOES INDEED support 'fuzzy search', aka 'unified search', out of the box. What this means, is you can get partial matches when you're searching fields. Say you're searching your list of leads on a custom field you made called 'region'. You've added region to the search area, but region doesn't have the prettiest data. For example, say you have three leads, and their region data is 'CA, TX, AZ', 'TX and surrounding states', and 'Dallas, TX'.

use batch file to write to .txt log

I've got a couple .bat files that are set up on various machines to run at certain times and do various tasks. But how do you check to make sure they're actually running as scheduled? Just log the run as an entry in a .txt file. On the last line of the batch file, use a command like this:

echo batch file was executed at %time% on %date% >> log.txt

This will write the following to your log.txt file:

batch file was executed at 16:39:02.08 on Mon 06/21/2010

Lol! Can't delete a .tmp file in Windows 7? Hit F5.

So it appears Windows 7 has a bug (I know, unheard of right) where files that do not actually exist anymore still appear to be valid. When you try to delete the file, you get an error saying that Windows cannot find the file, check the file's location blah blah blah. The trick? Hit F5 to refresh your screen. If the files are already deleted, they'll disappear.

SugarCRM outgoing mail settings on 1and1 hosting

So I was testing an installation of SugarCRM (version 5.2.2, I think) on siliconrockstar.com and could not for the life of me get Sugar to be able to send email over smtp. I even called 1and1 to verify the settings I was using. Every time I would try to send a test email, I would get errors like the following:

Mon Jun 7 19:03:44 2010 [27224][1][FATAL] SMTP -> ERROR:AUTH not accepted from server. Code: 503 Reply: 503 AUTH command used when not advertised
Mon Jun 7 19:03:44 2010 [27224][1][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not authenticate.

VS2010 + .NET 4 + IIS 5.1 = FAIL

So, I was trying to set up a development environment to test Visual Studio 2010 RC out and ran across this nugget of assholery - IIS 5.1 (the highest version that comes with XP and cannot be 'upgraded') DOES NOT WORK WITH .NET 4.O. And Visual Studio 2010 won't start unless .NET 4.x is installed. So basically, if you want to try out VS 2010, you're stuck either using the built-in server, or IIS 6+.

Weak.

lol!

css programmer image

Lol! Float drop.

Thanks to http://www.toothpastefordinner.com

Classic ASP random numbers with Rnd not working?

Ok, ok, I'll be the first to admit: I'm not the greatest in Classic ASP at this point. I've worked in it but it's been a few years since I did anything serious and that was in ASP.NET anyway. And really, if you're developing for the web, why the hell would you use a Windows server anyway? Why straggle by in old-school ASP when I can murder fools in PHP5?

variable variables in PHP5, - or - Dolla Dolla Bills Y'all

Now here's a neat way to get your values out of $_POST, using PHP variable variables (as indicated by the double dollar signs):

foreach($_POST as $key => $value) {
$$key = $value;
}

And now you have all of your post values neatly stowed away in local variables :D The double dollar signs take the value of a pre-existing variable and use that value as the name of a new variable. I'm sure it has other uses but this was the most obvious and most applicable to my line of work.

IE6 bug - absolute positioning cuts off text, words get cut off, etc

When you absolutely position a div in IE6 (say, like a one-line headline, for example), be sure to specify the font size AND the line-height. IE6 will cut off your text if you have font-size 32px but your inherited line-height is 14px, and you will be confused. It still does this even if you have overflow:visible.

Syndicate content