Monthly Archives: August 2011

Updates

Recently there has been somewhat of a hiatus from the SwhistleSoft Team, due to projects and other engagements. Lets call this a sort of summer hiatus and get ready for some quality articles in the upcoming fall tech season. It has come to our attention that some of the features of the introduction to CMS are not as useable as people may like. We are looking into a solution to this in order to help our  clients learn to use these systems effectively. Comments are welcome, but we are most likely going to set up a sort of client sandbox with a login so that clients can reset their own environment as well as control access to the environment.

Lame Scripting Awards

Lame Scripting Awards

How many people have been using cat to open files in their shell only to pipe the output to another command, or how many have piped things to wc -l from grep? Don’t understand what I am talking about, and want to be enlightened? Check out: Useless use of cat award. This is an old article but the information is probably more relevant than some other information presented in class or online. Lets be honest though and realize that there is more than one way to skin a scripted cat.

Javascript and PHP Size Based Styles

Javascript and PHP Size Based Styles

So you want to support different screen resolutions do you? Well, it is possible too much difficulty by creating a multiplexer for CSS files. This solution I am speaking about involves creating several style sheets for popular screen resolution groups and a cookie to save the information and redirecting when the cookie is not set. This solution should be handled with care as cookies are not always supported and could create and endless redirect.

Continue reading

PHP SNI Switch for HTTPS WINXP IE

PHP SNI Switch for HTTPS WINXP IE

A possible solution to an Error page for HTTPS SNI in WinXP Internet Explorer

Although this is not the best way to treat this situation, it is possible to have a switch for the Internet Explorer XP Browser in order to treat it specifically when hosting multiple sites with one ip and https. For those of you looking for the answer:

Continue reading

Html Form Editing Embed Form Elements

Html Form Editing Embed Form Elements

We have a demo up at http://www.swhistlesoft.com/demo/edithtmlforms/ which you may of course take a look at. There are some bugs and we will be posting a more complete demo in the near future. You can also check out other demos by going to:

http://www.swhistlesoft.com/demo/demolist

As we update and add demos, this list will be automatically updated.

MySQL Singleton Class to allow easy and clean access to common mysql commands

The MySQL Database class is implemented using the singleton design pattern. This design pattern allows for only one single instance of the object. This one instance can then be obtained through a static method. This provides a convenience in that you can get your database object from anywhere in your code.
Continue reading

Database PHP Session Handling

Database PHP Session Handling

As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously.
Continue reading

A JQuery Print Library that fixes the IE7 Shrink-to-Fit issue

There is an option in most browsers called “Shrink-to-Fit”. This is a page setup configuration that, if turned on, will attempt to scale the web page in size to make it fit on the selected paper size you are printing to. The scaling mechanism also attempts to scale it to a size that will fit on the least amount of pages. Although this does make sense when you are trying to print an actual web page, it can be a nightmare for web application developers who are trying to control the print job. For example, say your web application produces a Invoice for a customer. As a developer you want to try to control the layout of the invoice so you probably have a print.css file and you already have taken into account the page layout specific for a print job.
Continue reading