MySQL queries for custom reporting in Dell’s KACE system

Posted January 4th, 2012 in SQL, Toolbox by Jonathan

I’ve probably said it before, but in my current job I get to learn a lot of new things all the time, as a web developer I’ve self-taught myself a lot of my current skill set. One of which is MySQL. I had a pretty basic understanding of SQL and simplistic queries. I’ve never really pushed myself into going further into bigger and nastier queries. Though, I did pick up a good piece of advice at an open source conference I attended. The speaker mentioned that independent of whatever language you are programming in, your database engine (he was speaking of MySQL) will do it better every time. Well the more I dig into it, the more I realize just how correct that statement is. I’ve been living under the impression that I can deal with data better outside of the database engine versus generating a better query to get the right data. I know that makes me sound lazy or dumb – but I think a lot of web developers fall into this when there’s no real reason to push the limits. I mean I could probably catch a lot of you selecting * in your statements huh?

Continue Reading »

Session Time Out Notifier (PHP, Jquery)

Posted December 14th, 2010 in JQuery, PHP, Toolbox, Web Development by Jonathan

I was tooling around mint.com the other day and noticed that after a certain amount of time a notice appeared at the top of the screen to inform me that I was about to be logged out. Then after the time ran out I was returned to the login screen.

A few weeks ago, a coworker was asking if there was a better way to deal with being logged out on a backend system I put together. Once I saw the mint.com system I knew I had to try to build something like it. So I did, it’s not exactly the same because of the system I’m using but it works just as well and looks good doing it – I also wanted it to be a simple addition.

Getting started;

Have some idea of how to use jQuery, I don’t think what I’ve done here is hard – but at least understand some basic concepts like the $(document).ready() function,.fadeIn(),.click(),etc. For PHP, have an idea of $_GET variables, and header locations. Then some knowledge of Javascript itself, and an understanding of loops and counting.

Continue Reading »

Toolbox – Ajax requests and caching

Posted March 4th, 2010 in Featured, JQuery, Toolbox, Web Development by Jonathan

Today was a reminder of how much I can forget. I have been working on a quick little report to help a group of people here at work. Nothing special, but I was adding some nice functionality to make updating things easier.

Basically each result row had 2 check boxes. Where they could check or uncheck either of them and it would update a table in the background. No biggie I thought, of course I had been developing it in Firefox and Chrome and occasionally in IE 8, and everything previous to the check boxes worked fine in all the browsers.

Continue Reading »

Toolbox – Insert Text into TinyMCE at cursor

Posted November 25th, 2009 in Featured, JQuery, Toolbox, Web Development by Jon

In my mind, I can hear the them to Picture Pages playing in the background – because I want to remind you that in my quest to be a better web developer (and share with the world) I started this “toolbox” so I could keep a cataloged stockpile of simple easy to use tricks to make my life easier – plus I wanted to share…

This is documented somewhere on TinyMCE’s site, but it’s may not be easy to find. It’s simple little trick that I use as a helper to a simple image manager to go along with TinyMCE (since you have to pay for an image manager).

In my day to day life, it seems like I need a backend to every site I build, no one wants simple pages anymore. So I end up with a lot of forms, which have a lot of textareas in them. I like using TinyMCE as the wysiwyg editor for those textareas. This also calls for adding images and TinyMCE charges for the built in feature above using a url for an image. This presented me with a problem, I have end users who aren’t savvy enough to upload images (FTP) and then get the url to add the image to the editor, but they want images.

Continue Reading »

ToolBox – Preloading With Jquery

Posted November 12th, 2009 in Featured, JQuery, Toolbox by Jon

I thought I’d start a new Category called “Toolbox”, specifically for what I use on a daily basis for web development. These are snippets, functions, cheats, etc that anyone can use and make my life as a web developer that much easier…

This installment is something I’ve been using lately to preload images so they don’t spit out the alt text…Mostly it seems to happen when I’m doing something with ajax.

I found this snippet at Matt Farina’s blog.

This is the code (I just made a js file out of it and include it when necessary).

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length;i++) {
      jQuery("<img>").attr("src", arguments[i]);
  }
}

Continue Reading »