There are cookies that exist that are not part of the browser. Even if you do a clear cookies from your browser of choice, these cookies still persist. these are cookies managed by adobe flash.

In an article mentioned here, a bunch of companies are being sued because of Quantcast, who basically recreated cookies using the flash system so that they could track users interactions with some big named sites.

So how do we remove those “zombie” cookies? Adobe provides a help page, but the page looks like its a demo when in reality it is your browser’s flash that you are controlling. The page of note is the web privacy one. You can go here to check it out.

What you will want to do is just do a delete all websites to clear your flash cookie cache. now you are back to being an anonymous user.

Ever wonder what phone number you’re calling from? or if your in an office with multiple lines, what lines you’re using? or maybe you’re setting up the office and need to do some troubleshooting on the phone lines. MCI provides an awesome service which identifies what number you are calling, just call (800) 444-4444 to have MCI tell you what phone number it is. best thing? its free!

I was looking at Newegg‘s checkout procedure and it had this cool check box where you could either check all or check none, and then when you clicked on a sub checkbox it would check or uncheck the check all checkbox if it didn’t meet that condition. I re-created the code in JQuery so I could use it on one of my projects.

The HTML markup:

Title
Trinity Mobile Bin Rack
Trinity Stainless Steel Work Table
Trinity NSF 5-Tier XL Heavy-Duty Commercial Chrome Shelving Rack

Ok, if you look at the markup, you’ll see that the table header has a checkbox with the id of ‘chkAll’. Then for all the items I have them with the class ‘chkbox’. It is important to note that the chkAll checkbox does NOT have the class ‘chkbox’.

The JQuery code:

 $(document).ready(function()
        {
			$("#chkAll").click(function()
			{
				var flag = $(this).is(':checked');
				$('input.chkbox').attr('checked',flag);
			});
			$('input.chkbox').click(function()
			{	
				var flag = true;
				$('input.chkbox').each(function()
				{
					flag = flag && $(this).is(':checked');
				});
				$("#chkAll").attr('checked',flag);
			});
        });

So how does it work? I make sure to call the functions only when the document is ready. Once that happens I attach a function to the clicking of the id ‘chkAll’. In this function I first check to see if the current chkAll checkbox is checked or not, if it is then I’m going to immediately make all the class ‘chkbox’ checkboxes to checked and vice versa.

The second function I have is if I happen to click one of the class ‘chkbox’ checkboxes, Again I attach a function to the click event. I use a JQuery expression .each- which is kinda like a foreach loop, which will loop through all the elements that satisfy my ‘chkbox’ class, I then create a variable that AND’s all the other element’s states. When it is done, I am able to determine if the chkAll checkbox should be checked or not.

See the demo

There might come a time where you’ll want to “backup” the song that you own and it happens only to be on youtube.com. A pretty decent solution for that is this site:

http://www.video2mp3.net/

the site is free, void of multiple annoying ads, occasionally it’ll have this one ad which takes up half the screen, but you can just close it, and it doesn’t require you to give away your email address.

Recently on my Macbook Pro, Vuze kept prompting me to update, but for some reason halfway through the install it would say:

Applications/.install4j/inst_jre.cfg
Could not create this file. Should I try again.

I had to search around and thought that it might be a permissions issue kinda like Windows where you run as Administrator. I also thought it was odd that it never asked me for my username/password.

Long story short, to make sure that it updates, you must delete that folder, I used console to delete it.

sudo rm -R .install4j/


Everyone knows that google has pacman, but did you know that if you hit insert coin twice, you can play 2 player?

1st player
arrows

2nd player
up – w
down – s
left – a
right – d

I’ve always seen it done. Clearing the input field on focus.

JQuery seems to be pretty simple. Its just the syntax you have to get used to.

First the html markup

Sign up

Notice that for each input field I have an id, name, and alt attribute

Next integrating JQuery


Notice that I’m using googleapis to host the javascript. It seems that this is a better/faster alternative to hosting it directly on your host, plus google servers are most likely cached and will provide a better experience for the client.

Next building the JQuery plugin

		$.fn.clearSetFocus = function(iAttr)
		{
		}

We’re gonna create a namespace for ourselves. In my case, I named my function clearSetFocus. The $ creates a new JQuery object. you could also use jQuery(). So, I’ve created a new function named clearSetFocus and I’m taking in one parameter, called iAttr.

To actually attach this plugin to an element all I have to do is to call it.

Calling the plugin

$(document).ready(function(){
			$('#newsName').clearSetFocus('alt');
			$('#newsEmail').clearSetFocus('alt');
		});

Notice that I call the document.ready function before I add my plugin to the elements. I’ve found that if I don’t do that then the js could execute before the elements are loaded and make the script fail. So what I’ve done is create a new jQuery object for the element #newsName and attached the plugin clearSetFocus with the parameter alt.

Back to writing the plugin.

The plugin

//name my function clearSetFocus
		$.fn.clearSetFocus = function(iAttr)
		{
			//on focus
			this.focus(function()
			{
				if ($(this).val() == $(this).attr(iAttr))
				{
					$(this).val("");
				}
				
			//on blur - chained functionality	
			}).blur(function()
			{
				//get the value currently in the input
				if($(this).val().length==0)
				{
					//replace the value with the alt value
					$(this).val($(this).attr(iAttr));
				}
			});
		};

The this refers to my element that I’ve attached the plugin to. so in this case the element #newsName. I attach the function focus() – which allows me to add a function to when the user focus’ on the element. In this case, my logic is simply, if my value is the same as my alt value, then clear it. on blur() – which means to navigate away from the element, my logic is if the value’s length is 0, but the alt value back in.

Couple things to note.
.val() – this allows me to either get the value associated with the element
.val(“test”) – allows me to set the value of the element
.attr(“id”) – allows me to retrieve the value of the attribute of the element. so if the markup was

, I would get test

All done!