Why Not?

What shall we do today…

Category: Programming

Making Usable Frameworks and SDKs

User experience is one of the most important parts when developing a project. Users should never have to think or fight with your product if you wish for it to succeed. If you look at most of the successful web applications today, the simplicity of the user experience if prevalent.  Gmail and Google Calendar are [...]

Customize the CSS of Dojo’s Tab Container

A few weeks ago I developed a page on Jazz.net that required the functionality from dojo’s dijit.layout.tabContainer. This is a great widget that quickly adds some great organization and functionality to your page. The problem I ran into was customizing the CSS of the Tab Container. This is not a simple task as dojo’s templating [...]

Window.location.href and Executing Code Placed after

This is the type of situation where you don’t even know HOW to word it for google to search for the answer.  But anyways…on to the situation: You have run into a situation where you need to change your web page’s URL. Simple enough, all you need to call is the following: window.location.href = “http://google.com”; [...]

Unhandled Exception at 0xccccccc8 When Closing Visual Studio Applications

I was running into this error whenever I tried to close a Visual Studio C++ application I was developing.  It said the following whenever I closed it: Unhandled exception at <MEMORY ADDRESS> in <APP NAME>.exe: 0xC0000005: Access violation reading location 0xccccccc8 What this exception is telling you is that you have uninitialized variables in your [...]

Making jQuery calls in a function when a parameter can be a string or integer

Consider a function of when you are creating a list of items that have unique IDs, some are long integers and some are strings since they are a mix of chars and integers.  Also, you have very little control over these id values since they are retrieved from a web service and are too long [...]

PHP – array_search() and boolean false

Yesterday while programming I came across a situation where I had to check if an array in php contained a value. Simple enough. Calling the array_search function does the trick. However, there is a small detail that involves this function, it returns the KEY of where in the array the value is located, if not [...]

Chaining in jQuery

I just finished watching a great presentation by John Resig, creator of jQuery, on javascript and jQuery (redundant, i know). One interesting point he made about the library was the idea of chaining in jQuery and how it creates its own stack. Given the following code: $(“ul”).find(“li”).hide().end().find(“div”).load( “somePage.html” ).end(); Can translate into this: $(“ul”) //returns [...]

How to Submit Javascript Arrays through jQuery AJAX calls

When making ajax calls in jQuery there are 4 simple functions one can use to access data on the server: $.ajax $.get $.post $(‘#blah’).load Now there is ample documentation about how to use these functions, but I have not seen any that deals with submiting data to the server from an array of values, which [...]

Retrieving the pixel location of a DOM element

jQuery is an awesome javascript library that GREATLY simplifies iterating through various elements in the DOM, retrieving various attributes of elements, and makes the amount of code you write smaller. In this post I am going to explain a snippet of code that will grab the x and y pixel coordinates of any element in [...]

Acquire an SSL certificate for your Java Programs in Windows XP

So I have been developing a java program that needs to access a server that requires SSL certification for the client computer to be able to access the data on the server. If your program does not have SSL certification you will get an error along the lines of: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: [...]