Author: jriggs

  • Drupal – Pass Data To Template File

    Probably most useful for passing large blocks of data that can be iterated over from within the template file. Using this method allows the developer to keep the application logic separate from the presentation layer. The data being passed in would most typically be an array. 1) Create the function that will generate the data […]

  • Javascript Count Up Timer With Hours, Minutes, and Seconds

    Here is a script that takes a given time and increments each second to make it appear to update in realtime. Time given, must be in hh:mm:ss format and the div id must be realtime 12:12:12 12:12:12 Script that makes everything happen, needs jquery, but could be easily re-written in pure javascript. $(document).ready (function () […]

  • Ubuntu 12.04 Mouse Stops or Hangs When Going To Other Monitor

    After the latest update to Ubuntu you may have noticed that the mouse seems to get stuck when trying to go from one monitor to the other. The problem is the new “Sticky edges” settings. To fix this go to System Settings->Displays and flip the “Sticky edges” switch to “Off”

  • MySQL First Character in a String

    SUBSTRING(,1,1)