Feb 13 2010

jCarouselLite Nested Lists

Topics: Coding, Internet, jQuery  
 

The lightweight jCarouselLite plugin for jQuery is very useful for simple carousel applications.  It eliminates the need for special class names and endless customization options by relying on a required  structure:

<div> <ul> <li>content-1</li> <li>content-2</li> </ul> </div>

This works, except when the content is html that contains another unordered lists.  Consider:

<div>
    <ul>
        <li>
            <h1>This are my main points:</h1>
            <ul>
                <li>Point 1</li>
                <li>Point 2 </li>
            </ul>
        </li>
        <li>content-2</li>
    </ul>
</div>

After this problem beat one of my projects to its knees, I discovered the reason is the way the plugin uses jQuery selectors.  In the uncompressed source code you can find the following at line 228 and 236:

var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible;
var li = $("li", ul), itemLength = li.size(), curr = o.start;

The problem is that in jQuery, $(arg1, arg2) is translated to $(arg2).find(arg1) and the find function searches all descendants, not just the immediate children – so it picks up the nested ul & li elements as well. 

There is an extremely simple fix to this.  Simply change those two lines of code to select only the immediate descendants of the carousel div.  This worked for me:

var div = $(this), ul = div.children("ul"), tLi = ul.children("li"), tl = tLi.size(), v = o.visible;
var li = $(this).children("ul").children("li"), itemLength = li.size(), curr = o.start;

Hope that helps!  Please let me know your comments …

Feb 5 2010

StudentBait | Help Guide

Index

Registering – Student

The registration process begins at http://studentbait.com where clicking the “register” link underneath the login form brings you to the following screen:

image

First name & Last name must be at least 2 letters long and no more than 16, while the Password has a minimum length of 4 and maximum of 16.  Correct any mistakes made according to the message(s) that display.  Once successfully registered the following screen will present itself:

image

The next student is for a student to join a course.  Clicking the “Join Course” option from the toolbar will display a list of all currently available courses.

image

Clicking the button “Join Course” beside the appropriate course automatically enrolls you in it.  That’s it!   The course will now be listed and available from the “My Courses” link on the toolbar.

image

To add another courses, simple rinse and repeat.

Registering – Teacher

Teacher registration starts the same way as a student.  Go to http://studentbait.com and click register.  Create a new account using the following form that appears:

image

Once successfully created you will be automatically logged in and presented with the following screen.

image

Click the “Edit Account” option in the top right of the toolbar.

image

Type the word “algonquin” into the field labeled “Change Role to Teacher”.  Hit submit and your account will be converted to the role of teacher.  The toolbar menu options will change and the following screen will greet you:

image

Congratulations!  You are now enrolled as a teacher.  You now might like to create a course.  If so, keep reading …

Creating A Course

A new course can be created at any time by a teacher (see Registering – Teacher) by clicking the “New Course” option from the toolbar permanently at the top of the window.  Selecting this option presents the following screen:

image

As enter the course details the real time preview on the left will show you how your course will look when created.  “Short Name” is usually the course code and section number, and sometimes the semester.  It should be short and easily identifiable. The “Full Name” can include anything else pertinent: details left out, clarification or repetition.  Finally “Time Open” sets the amount of time (in minutes) attendance is open for students whenever it is taken.  (For example, if it is set to 10 – once the teacher presses “Take Attendance” students will have 10 minutes to login and mark themselves present, after which attendance will be closed.) Default is 10 mins.

Press “Create” to create your course! If successful, StudentBait redirects to the new course homepage.

image

The course is now available for students to join (see Registering – Student) and is listed on the creating teacher’s “My Courses” page.

image

Archiving A Course

Once you a course is over, many teachers wish to keep a record of class attendance for future reference.  However to keep finished courses in the same place as active ones can be quite problematic.  To address this issue, StudentBait allows archiving of completed courses.  To do this, simple click on the course you wish to archive from your “My Courses” page.

image

Clicking your chosen course takes you to it’s course homepage.

image

You will find the link “Archive Course” available underneath the course header.  Select that command and verify your intentions via the pop-up as follow:

image

You will be redirected back to “My Courses” where the archived course will no longer be visible.  To access archived courses (and un-archive it if so desired), simply click the “Archives” link from the main toolbar.  A list of all your archived courses will be displayed and you can interact with them as normal.

image

Taking Attendance

To take attendance, a course must already be created, and the students enrolled in it.  After that, attendance is a simple 2 step process:

1) View your list of “My Courses”.  Beside each course their will be a button “Take attendance now.”

image

2) Click the button “Take attendance now.”  Your students will now have 10 minutes (or the amount of time you set when creating the course) to login and click “I am in class”.  You will be redirected to the “attendance homepage” that displays who is in class and absent for this attendance.

image

As students mark themselves present, the list of “Students Present” and “Students Absent” will change.  To view changes, refresh the page.

image

Students mark themselves present by clicking the “I am in class!” button that appears beside each course in their “My Courses” list after their teacher presses “Take attendance now.”  NOTE: this button only appears for student’s if they are in the same classroom as their teacher (verified by IP) and during the time attendance is set to remain open (default = 10 minutes)

image

Viewing Attendance

StudentBait offers many ways to view attendance statistics for a course.  The green bars that display in various parts of the program all display percentage attendance for different view.  Let’s start with the “My Courses” view

image

The green bar underneath the course Short Name and Full Name is a calculation of overall course attendance.  For example, in 09F-BUS2302-453, each class is attended on average by 72% of all enrolled students.  In 09F-BUS2302-450 however, only 56% of students attend each class.

Clicking any course takes you to the course homepage, which provides more attendance views and breakdowns.

image

The main green bar underneath the course Short Name & Full Name is the same as displayed previously – the overall course attendance. However the smaller green bars that underlay each student name show that student’s average attendance for the course.  Similarly, the ones under the dates on the right show the attendance for each date & time attendance was taken.

The small bars don’t provide a specific percentage, but provide a quick comparative overview.  For example, it is obvious that Barkley, Elliot has attended every class so far while Dutchyshen, Brett has missed most.  Similarly you can see that Tuesday, October 27th was the most well attended class of the semester.  For more detailed attendance information on either a certain day or individual, click the appropriate bar chart.  If an options drop-down appears, click the details link.

image

1) Attendance for a certain day:

Clicking a certain day will take you to the following screen:

image

You will notice the course Short Name has been replaced by the day and time this attendance was taken.  In addition, the main green bar immediately after the course Short Name & Full Name now displays the results of this specific attendance.  In this case, when attendance was taken on Tuesday, October 27th, 2009, 89% of enrolled students were present.  Below this header, a list of the students absent and present are displayed with their names overlaying a bar chart of their overall course attendance.

2)Attendance for a certain day:

Clicking a specific person will take you to the following screen:

image

In this display, the course Short Name has again been replaced, this time by the name of the person we are examining.  The large green bar under the person’s name and the course details now display’s the overall attendance of this person.  In this case: Barkley, Elliot, who has attended 100% of classes.

A detailed list of the classes this person has attended and missed follow, with the date & time of the attendances overlaid on the familiar small green bar showing the average attendance for that day.

Jan 22 2010

How To Research Online

Topics: How-To, Internet  
 

Internet Search Engines

The first (and only) destination for many netizens is their favorite search engine.  Google dominates this playing field, however there are a number of alternatives worthy of your attention.  For example:

  • Clusty – a metasearch engine (meaning it compiles results from a number of other search engines) that “clusters” your results into categories.  Especially useful at the outset when searching using very broad keywords (ie: football, presentations, accounting, etc)
  • Wolfram Alpha – called a “computational knowledge engine” is incredibly adept at handling any fact based queries.  For example, if you wanted to know what the land mass of Russia is, this is your search engine. Other examples show some the incredible features you can find here.
  • Yahoo & Bing are the traditional alternatives to Google.  They offer the same functionality but with different data sets.  Useful for a quick check to make sure that Google isn’t missing anything.
  • Blinkx – a video / multimedia search engine.  But not YouTube.  Blinkx focuses on editorial / news content and thus is perfect when credible sources are key.

Even if you decide to stick to your tried and true Google-fu, there are many functions old faithful has that you have probably never used.  Google’s advanced search features turn your trusty pocketknife into a swiss army.  Rather than reinventing the wheel here, I suggest you check out Google Guide for a fantastic walkthrough of everything Google.  Start with their novice page if you have no idea how to use AND or OR when searching, and if you’ve already mastered those basics, try out their 2 page advanced operator guide (PDF).

Online Library Resources & Directories

There are a number of fantastic web portals specifically designed for research that are often missed by the casual researcher.  These portals & directories focus on academic quality sources of known reputation.  Here are some of the best:

  • Wikipedia is of course the 100 pound gorilla in this category.  Little needs to be said besides the fact that even if your school doesn’t allow Wikipedia references in your projects, it is still the best place to get an overview of your subject and the external references from the article are often academically friendly.
  • Refdesk.com is marketed as: “Reference, Facts, News – Free and Family-friendly Resources”.  It is hard to describe it any other way.  It doesn’t have the web 2.0 visual flair, but it has links to everything from people searches, this day in history, news sources, archival photos, positive good news and on and on.  A great place to start your research.
  • Internet Public Library (ipl2) is a librarian maintained collection of many off-line and online information sources.  National and international newspapers and magazines can be found in pdf format, blogs, websites and ebooks are reviews and listed by topic and you can search it all by keyword
  • Internet Archive is a non-profit foundation dedicated to preserving the vast amounts of online data.  If you need to find anything that is or was on the Internet at some point, this is the site to check out.  One of their most popular features is the “Wayback Machine” that has website snapshots throughout history. (ie: see Google.com back to 1998)
  • Library Chick – “a collection of links to the best of the Internet’s FREE resources for those with big brains and small pocketbooks!”  I think that covers it!

Deep Web Search Engines

According to Wikipedia, the size of the open web is 167 terabytes.  The deep web (including library databases, dynamic pages or private networks) is estimated at 91,000 terabytes!  These areas are often full of valuable, credible sources – of particular use to students!  The best reference is the top 10 list published by MakeUseOf.com.

Question Forums

  • Yahoo Answers lets you ask a question and sometimes a random passersby will have a valuable answer.  There is no guarantee though of a quality or timely response though.
  • ChaCha – has a human answer every query entered.  This slows the results down by a few minutes, but can save time wading through endless pages of unrelated results on your traditional search engine.  To use ChaCha, you simply call 1-800-2ChaCha or send a text to 242242 (US only unfortunately).  Leave your query as a voicemail and within 2 – 5 minutes you will be texted a response, researched by a human guide!

How To Evaluate Source Reliability

This will be covered in more detail in a future post, but for now this article at VirtualSalt is an excellent reference, as is this reference from Cornell University.

A simple way to  evaluate an online source is to use the same evaluation criteria as printed books and journals.  You should examine:

  • Author
  • Date of Publication
  • Edition or Revision
  • Publisher
  • Title of Journal
  • Intended Audience
  • Objective Reasoning
  • Coverage
  • Writing Style
  • Evaluative Reviews

VirtualSalt refers to the CARS checklist for Information Quality.  The following warning signs are taken directly from it:

  1. CREDIBILITY:
    • Anonymity
    • Lack of Quality Control
    • Negative Metainformation. If all the reviews are critical, be careful.
    • Bad grammar or misspelled words. Most educated people use grammar fairly well and check their work for spelling errors. An occasional split infinitive or comma in the wrong place is not unusual, but more than two or three spelling or grammar errors is cause for caution, at least. Whether the errors come from carelessness or ignorance, neither puts the information or the writer in a favorable light.
  2. ACCURACY
    • No date on the document
    • Vague or sweeping generalizations
    • Old date on information known to change rapidly
    • Very one sided view that does not acknowledge opposing views or respond to them
  3. RESONABLENESS
    • Intemperate tone or language ("stupid jerks," "shrill cries of my extremist opponents")
    • Overclaims ("Thousands of children are murdered every day in the United States.")
    • Sweeping statements of excessive significance ("This is the most important idea ever conceived!")
    • Conflict of Interest ("Welcome to the Old Stogie Tobacco Company Home Page. To read our report, ‘Cigarettes Make You Live Longer,’ click here." or "The products our competitors make are dangerous and bad for your health.")
  4. SUPPORT
    • Numbers or statistics presented without an identified source for them
    • Absence of source documentation when the discussion clearly needs such documentation
    • You cannot find any other sources that present the same information or acknowledge that the same information exists (lack of corroboration)

Attribution

If you do not correctly attribute your sources, you are guilty of plagiarism.  This is one of the most common student mistakes.  If it isn’t in your own words, you need to show where it came from.  A direct quotation (copy/paste) definitely needs quotation marks, whereas a paraphrase can get away without those, but still needs a reference to the source you are basing your words on at the end.  Berkeley library details all the different ways to attribute your sources.  Read it and use it so that you aren’t accused of cheating!

Stay tuned for these article follow ups in the near future:

Organizing Your Research

Advanced Research Techniques

Nov 7 2009

Wedding Reception Music to Dance To (Playlist Included)

Topics: Music, Personal  
 
Turning our wedding into a downtown street attraction.

The Pre-Reception Wedding Music

My wife and I were married June 20, 2009.  Among the many fabulous memories we have of the day is the great party our wedding reception turned out to be.  The music packed the dance floor every song and resurrected friends and family sidelined for years.

Having previously created many playlists better classified as instruments of torture than entertainment, I knew the trend toward programming your own music in advance is usually a huge mistake.  A DJ’s ability to read a crowd and respond in realtime is invaluable. And yet playlists persist.  For us, it let us address our concerns about lyrical content (explicit / depressing / etc … ), save some money and politely keep crazy requests at bay.

Our playlist is best matched to a crowd of diverse ages and mainstream musical tastes, with a few surprises (an Arabic Dabkeh, the Numa Numa songs, etc).  It is completely free of explicit and obscene language and geared to a night of dancing, not talking ;)   If you are trying to program your own music, my heart goes out to you!  Feel free to use, modify and copy to your hearts content.  Let the good times roll!

(Note: Songs 2 and 3 were the first dances of our parents – you may find others more suitable for you.)

  1. Michael Buble – Everything (3:33)
  2. Lake – Do I Love You (4:05)
  3. Dan Hill – Sometimes When We Touch (4:01)
  4. The Marvelettes – Jimmy Mack (2:54)
  5. Dion & the Belmonts – Runaround Sue (2:44)
  6. The Platters – Hold Me, Thrill Me, Kiss Me (2:27)
  7. Randy Travis – Forever And Ever, Amen (3:33)
  8. Humperdink, Englebert – The Last Waltz (3:13)
  9. Dance Disco Funk – - Ultimate Party Megamix from 60s 70s 80s & 90s (4:10)
  10. Michael Buble – L O V E (2:50)
  11. Al Green – Lets Stay Together (4:50)
  12. Norah Jones – Come Away With Me (3:05)
  13. Will Glahe – Beer Barrel Polka (2:16)
  14. Buggles – Video Killed The Radio Star (3:26)
  15. Bee Gees – Stayin’ Alive (4:47)
  16. Miley Cyrus – Girls Just Wanna Have Fun (3:06)
  17. Van Morrison – Brown Eyed Girl (3:03)
  18. Frankie Valli – Can’t Take My Eyes Off You (3:19)
  19. Eric Clapton – Wonderful Tonight (3:39)
  20. Leona Lewis – Bleeding Love (4:00)
  21. The Grass Roots – Sooner or Later (2:36)
  22. Lynyrd Skynyrd – Sweet Home Alabama (4:45)
  23. Creedence Clearwater Revival – Down on the Corner (2:44)
  24. Rednex – Cotton Eye Joe (3:13)
  25. Louis Prima – Pennies From Heaven (2:21)
  26. Brian Setzer Orchestra – Jump Jive An’ Wail (2:53)
  27. The Platters – Only You (2:33)
  28. Neil Diamond – Sweet Caroline (3:33)
  29. Garth Brooks – Friends in Low Places (4:19)
  30. ABBA – Dancing Queen (3:51)
  31. James Brown – I Got You (I Feel Good) (2:46)
  32. O-Zone – Dragostea Din Tei (3:34)
  33. Contours, The – Do You Love Me (2:52)
  34. Sister Sledge – We Are Family (3:36)
  35. Roy Orbison – Pretty Woman (2:58)
  36. Tim McGraw & Faith Hill – Its Your Love (3:48)
  37. Michael Buble – Lost (3:40)
  38. Grupo Mania – Soñaré (4:45)
  39. Daft Punk – One More Time (3:55)
  40. Haddaway – Haddaway – What Is Love (4:25)
  41. Beyonce – Single Ladies (Put A Ring On It) (3:17)
  42. Tarkan – Simarik (3:55)
  43. James Blunt – You’re Beautiful (clean version) (3:24)
  44. Blue Rodeo – Try (4:05)
  45. Bride And Prejudice – Punjabi Wedding Song (2:50)
  46. George Harrison – I’ve Got My Mind Set On You (3:51)
  47. Sam & Dave – Soul Man (2:37)
  48. Outkast – Hey Ya (4:08)
  49. Various Artists – ESPN Presents the Jock Jam (3:15)
  50. Dwight Yoakam – Guitars, Cadillacs, and Hillbilly Music (3:05)
  51. The Bangles – Eternal Flame (3:56)
  52. Nat King & Natalie Cole – Unforgettable (3:29)
  53. Kenny Loggins – Footloose (3:49)
  54. Dead or Alive – You Spin Me ‘Round (Like a Record) (3:17)
  55. Crystal Method & Fatboy Slim – Magic Carpet Ride (3:24)
  56. Beyoncé Knowles feat. Jay-Z – Crazy In Love (3:57)
  57. Paula Abdul – Straight Up (4:11)
  58. Cascada – Everytime We Touch (Radio Mix) (3:19)
  59. Big Bad Voodoo Daddy – Go Daddy-O (3:12)
  60. Savage Garden – Truly Madly Deeply (4:37)
  61. Plain White T’s – Hey There Delilah (3:52)
  62. Lenny Kravitz – American Woman (4:21)
  63. Bob Seger – Old Time Rock & Roll (4:34)
  64. Etta James – At Last (2:57)
  65. Blondie – Heart of Glass (4:33)
  66. Andrea Bocelli/Sarah Brightman – Time to Say Goodbye (Con Te Partirò) (4:08)