Settings max_allowed_packet MySQL
mySQLThis is just a little note on settings the max allowed packet in mysql without rebooting it. I always forget how to do it when I neet to change it quickly for something.
set global max_allowed_packet = 32 * 1024 * 1024;
This will set it for 32 megs. Change the 32 to have it larger or smaller.
Furnishweb on Handshake 2.0
Cool Stuff, Fusebox, ColdfusionOne of the first articles about the Service we wrote in Coldfusion and Fusebox is up on Handshake 2.0.
http://www.handshake20.com/2009/04/furnishweb-delivers.html
Handshake 2.0 is a cool idea to use the internet to get your products and or company noticed when you don;t have the time to blog or you;re just not that good at it :)
http://www.handshake20.com/how2useh20.html
Defaulting the cursor to the First input box on any page.
Cool Stuff, javascriptHere's a short and simple javascript using Jquery to put the cursor in the first text box on a web page. I added this to one of our sites to make sure the cursor starts in the different forms / search boxes on all the pages of our site.
<script>
document.ready(function()){
$("input[type='text']:first").select();
};
</script>It's using Jquery to find the FIRST : INPUT tag with a TYPE="TEXT" on the page. Then it selects it to move the cursor.
QForms + Jquery
javascriptHere is a few interesting tidbits some of you might already know, but I thought it was interesting. I love using qForms. I know I could write my own validation using the forms plugin and other things in JQuery. I have used qForms for so long and have so many applications using it. They actually play nicely together and you get the best of both worlds.
Since QForms needs to be set after the form it can be in the document.ready() section of the web page and it works great. This also allows all your Javascript to be in the same place so you don't have to put it in the page after the form like you do without Jquery.
<script>
document.ready(function(){
objMyForm = new qForm(“frmMyForm”);
objMyForm.myfield_1.required = true;
objMyForm.myfield_1.description = ‘My test Field”;
});
</script>It’s a simple thing but it makes using qForms even easier.
Coldfusion Debug and Heap Space Errors
Coldfusion, RailoI was writing a quick script today to clean up some data for an import using Coldfusion 8. It runs a single query and then loops over the results updating a different table. Now before you roll your eyes I know this is not the best way to do this, but I needed it done quickly. When I would run the page it would stop with a 500 Heap space error and Coldfusion would die. I couldn't figure it out so I decided to try it on a development copy of Railo. The page didn't finish, but I got a Debug out of memory error. Which pointed me in the right direction. I added in <cfsetting showdebugoutput="false"> and the page ran perfectly in Coldfusion 8 and Railo.
This is a good reason you should never have debug turned on in Production :). Extra kudos for the Railo guys though. Railo stayed up and working and also give me the debug information I need to figure out what the heck was going on.





Loading....