File Information is Cached by PHP

PHP Caches file metadata in status cache , causing wrong(cached) output from these file operation functions

stat(), lstat(), file_exists(), is_writable(), is_readable(), is_executable(), is_file(), is_dir(), is_link(), filectime(),fileatime(), filemtime(), fileinode(), filegroup(), fileowner(), filesize(), filetype(), and fileperms().

when i use filesize() function , I intend to get the correct size . I feel there is no valid reason behind caching this

WORKAROUND

call clearstatcache() before calling any of the above mentioned functions

 

Free Private Repositories from BitBucket

Does my code have to be public?

Bitbucket and GitHub take different approaches to private and public repositories. This is at the heart of their pricing model, or even philosophy you might say. We’ll talk more about these differences below. Bitbucket offers unlimited free private repos while GitHub charges for them. Public repositories are unlimited and free in both services to an unlimited number of contributors.

Bottom line: No, you’ll get free private repositories on Bitbucket and pay for them on GitHub.

Read More

Custom Blur Event on <div> tag

$(“.aaaa”).each(function(){
var that = this;
$(this).click(function(){
$(this).text(“Clicked”);
$(document).bind(“click”,blurHandler);
});

var blurHandler = function(e){
var container = $(that);
if(!container.is(e.target) && container.has(e.target).length === 0){
container.text(“Blurred”);
$(document).unbind(“click”,blurHandler);
}

};
});

see the working example in jsfiddle