‘Uncategorized’ Category
» posted on Friday, March 5th, 2010 at 2:49pm by Dan
How to Properly Test if jQuery is Loaded
I saw many people claiming you can test for the existence of jQuery like this:
1 2 3 4 5 | if (jQuery) { // jQuery exists, put code here } else { // jQuery not loaded, put code here } |
This is incorrect. It will work fine if jQuery is loaded, but if it's not loaded, javascript will throw an error and the code to execute if jQuery is not loaded will probably not be processed. The modification to fix this is simple:
1 2 3 4 5 | if (window.jQuery) { // jQuery exists, put code here } else { // jQuery not loaded, put code here } |
post a comment | filed under How To's · Uncategorized
» posted on Thursday, January 21st, 2010 at 10:23pm by Dan
MySQL Select Count Distinct – Counting and Identifying Duplicate Records
Looking for a [relatively] quick way to identify duplicate records in a table and list how many records there are for each duplicate? Look no further.
In my case, I’ve got a table named Searches which tracks queries on one of my sites. I wanted to check the top queries, so I used this SQL statement:
There you have it. A simple, effective way to count and label duplicate records.
post a comment | filed under Uncategorized
» posted on Wednesday, November 18th, 2009 at 8:44pm by Dan
30 Google Wave Invites
I've got 30 more Google Wave invites to give away. Leave a comment with your email and I'll send them. First come, first serve.
This is actually a nomination and it may take a little while before you get your actual invite.
From now on, you must retweet the bitly URL (http://bit.ly/2rwYsG) on twitter and reply to me in order to get an invite.
Example tweet:
@xoise Free Google Wave invites: http://bit.ly/2rwYsG #GoogleWave
Then put a comment in the comment section and don't forget your email (doesn't have to be public).
46 comments | filed under Uncategorized
![[del.icio.us]](http://www.randomtools.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.randomtools.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.randomtools.net/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.randomtools.net/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://www.randomtools.net/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.randomtools.net/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.randomtools.net/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.randomtools.net/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.randomtools.net/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://www.randomtools.net/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.randomtools.net/wp-content/plugins/bookmarkify/yahoo.png)