Thursday, December 28, 2006

How to recover deleted files on formatted drive?

Here I'll show you how to use the File Scavenger program that allows you to recover permanently lost files on your hard drive. The application size is small but it's very effective in restoring deleted information. It scans your hard drive and detects if there are ones that could be restored.

Recently I've had to restore a 60Gb HDD that was 2 times formatted using NTFS quick and full windows installation format and simultaneously after the formats were installed 2 versions of Windows XP.
I've tried lots of recovery software on this drive to see what results they could bring out and I think that this program deserves special attention.
As an end result, I've managed to rescue 35Gb of music and photos from the hard drive.




Usage:

First off ensure that you've got a spare hard disk with a size similar to the damaged/deleted/formatted one.
Example: If you want to restore 40Gb of information ensure another drive with 40Gb free space.
Get a license because otherwise, you could recover only the starting chunks from the deleted files.

Start the File Scavenger. On the Search mode select Long Search and press the Search button. On the warning message press: No. Display deleted files. Then you'll have to wait for some time until the program finishes rescuing.
In the input box Recover using the Browse... button select the free harddrive already prepared for the information storage. You'll have to wait for this process to finish. When ready you'll have your information back and all you'll have to do is to sort it because the file names will be renamed.

Happy and successful restoring and be sure to check my Windows 10 course Cheers!

Thursday, December 21, 2006

Free website click heatmap - DIY

What are the click heat maps?
Heat maps are places on your website where users mostly click or hover their mouse. They are also known as website hot spots.
If you want to learn more about the JavaScript techniques you can visit the JavaScript course

 
Why do you need to know your website hotspots?

Once knowing their location you can reorder your important information, optimize your adverts to increase their CTR(click-through-rate), etc...

Remember that this type of click tracking is different from the simple web counters. Click heatmaps map the exact x,y clicks, and mouse hover positions. That makes such statistics really great for those who look for usability improvements.

Of course, there are free services such as Creazyegg.com and Clickdensity.com but the offered JavaScript actually slows down the user experience. So the following is a guide on on how to build your own heatmap tracking. I've combined 2 techniques so the AJAX script could work across multiple domains. Here are their respected versions URLs:


for the heatmap:
http://blog.corunet.com/english/the-definitive-heatmap

for the cross-domain AJAX:
http://blog.cbciweb.com/articles/tag/asynchronousjavascriptacrossdomains

INSTRUCTIONS:
1. Create an empty readable and writeable file: clickcount.txt on your webserver.
2. Place the following javascript code in your website just above the ending tag:

var xOffset,yOffset;
var tempX = 0;
var tempY = 0;
 
 
//detect browser
var IE = document.all?true:false

//find the position of the first item on screen and store offsets
//find the first item on screen (after body)
var firstElement=document.getElementsByTagName('body')[0].childNodes[1];
//find the offset coordinates
xOffset=findPosX(firstElement);
yOffset=findPosY(firstElement);
if (IE){ // In IE there's a default margin in the page body. If margin's not defined, use defaults
var marginLeftExplorer  = parseInt(document.getElementsByTagName('body')[0].style.marginLeft);
var marginTopExplorer   = parseInt(document.getElementsByTagName('body')[0].style.marginTop);
/*assume default 10px/15px margin in explorer*/
if (isNaN(marginLeftExplorer)) {marginLeftExplorer=10;}
if (isNaN(marginTopExplorer)) {marginTopExplorer=15;}
xOffset=xOffset+marginLeftExplorer;
yOffset=yOffset+marginTopExplorer;
}
/*attach a handler to the onmousedown event that calls a function to store the values*/
document.onmousedown = getMouseXY; 

/*Functions*/
/*Find positions*/
function findPosX(obj){
var curleft = 0;
if (obj.offsetParent){
while (obj.offsetParent){
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}else if (obj.x){
curleft += obj.x;
}
return curleft;
}
 
 
function findPosY(obj){
var curtop = 0;
if (obj.offsetParent){
while (obj.offsetParent){
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}else if (obj.y){
curtop += obj.y;
}
return curtop;
}
function getMouseXY(e) {
if (IE) {
tempX = event.clientX + document.body.scrollLeft
tempY = event.clientY + document.body.scrollTop
} else {
tempX = e.pageX
tempY = e.pageY
}
tempX-=xOffset;
tempY-=yOffset;

var url='http://yourwebsite.com/scripts/empty.php' /* Type your website URL here*/
url = url + '?x='+tempX+'&y='+tempY;
ajad_send(url);
 
return true;
}
 
var ajad_ndx_script = 0;
 
function ajad_do (u) {
// Create new JS element
var js = document.createElement('SCRIPT');
js.type = 'text/javascript';
ajad_ndx_script++;
js.id = 'ajad-' + ajad_ndx_script;
js.src = u;
 
 
// Append JS element (therefore executing the 'AJAX' call)
document.body.appendChild(js);
return true;
}
 
function ajad_get (r) {
// Create URL
// Do AJAD
return ajad_do(r);
}
  
function ajad_send(url) {
// referrer
// send it
ajad_get(url);
 
// remove the last script node.
document.body.removeChild(document.getElementById('ajad-' + ajad_ndx_script));
ajad_ndx_script--;
}



3. Create empty.php file and fill it with:
<?php
$q=$_SERVER['REQUEST_URI'];
include_once("functions.php");
save_file($q, "clickcount.txt");
?>


4. Statistics
Allow at least 2 days for the clicks to accumulate. If you open clickcount.txt in your browser you'll see the x,y coordinates of the user clicks.
In order to visualize the gathered data create file click_count.php with the following contents:

<?php
Header("Content-Type: image/png" );
$width=1024;
$height=4300;

$im=ImageCreate($width,$height);
$red = ImageColorAllocate ( $im, 255, 0, 0 );
$white = ImageColorAllocate ( $im , 255, 255, 255 );
$black = ImageColorAllocate ( $im ,0, 0, 0 );
$blue = ImageColorAllocate ( $im , 0 , 0 , 255 );
$gray = ImageColorAllocate ( $im , 0xC0, 0xC0 , 0xC0 );
ImageFill ( $im , 0 , 0 , $black );
$file="clickcount.txt";
$fp = fopen ( $file, 'r' ) or die("error opening file");
$file=fread($fp,filesize($file));
$splitted  = explode ("\n", $file);
foreach ($splitted as $split) {
if (empty($split) || !is_string($split)) continue;
$url=parse_url($split);

if (!empty($url['query'])) {
parse_str($url['query'],$vars);
$x = $vars['x'];
$y = $vars['y'];
//imagesetpixel($im,$x,$y,$white);
// draw  white ellipse
$col_ellipse = imagecolorallocate($im, 255, 255, 255);
imagefilledellipse($im, $x, $y, 10, 10, $col_ellipse);
}

}

Imagepng ($im);
imagedestroy($im);
?>


?>


website heat map

Here is a sample generated heatmap screenshot: Click to see the whole image.
heat map

Enjoy the course! I k!ow that the above mentioned code could be optimized further so your suggestions are always welcome!

Sunday, December 03, 2006

Skin care - how to fight acne II

omega 3 capsuleIf you are deeply interested in fighting acne here is more advanced information that I’ve gathered.

The hormones
One of the main factors causing acne is the excess hormones in our body. When our hormones are out of balance they send signals to the respectful glands to produce additional amounts of oil in order to restore the balance.

During teenage times the androgen hormone levels are spiking. This causes an excess sebum oil production which at the end of its pathway clogs our hair follicles and thus contributes to the creation of acne.

Why getting sufficient essential fatty acids(EFA) is important
Recent studies show that consuming essential oils in the right proportions normalizes the levels of EFA's in our sebaceous glands. The same EFA's control the production of androgen hormones thus achieving a normal hormonal balance in our body.

Some facts about EFA
When our body has a deficit of essential fatty acids, we will have:
- a weaken immune system
- more inflammation
- poor skin
- skin eruptions that won’t heal easily
- increased sebum production
- increased sebaceous glands size

Benefits: These oils came straight from fish & vegetable oils, nuts, and seeds as well as additional supplements.

Balancing EFA’s
Prior to trying to manually balance your hormone levels, I would recommend you having hormonal tests. According to results, you'll see what needs to be adjusted.
The three fatty acids you need to balance out are the Omega-3, Omega-6, and Omega-9. Most people have an excess of Omega-6, so they need to concentrate on getting more Omega-3 EFAs to their diet. On the flip side if your ratio of Omega-3 is more than Omega-6, concentrate on supplementing with Omega-6 oils.

Use of flax seed oil
flax seedsIt’s less potent than the fish oil, so when one wants quicker results he/she could try first fish oil and Spirulina and then steadily settle down with flax oil. The problem with the flaxseed oil is that the flaxseed must be grounded before digestion and also the body needs an enzyme called delta-6 desaturase (D6D) to transform the flax seed's Linoleic acid into GLA.


spirulinaSpirulina is the most potent form of GLA because it is derived from marine or freshwater algae. Fish consuming such algae become more potent also. Spirulina, taken together with fish oil eliminates the need of D6 for your body in order to work fine. It's very high in protein and can also enhance your muscular strength and athletic endurance. Studies conclude that spirulina is effective in increasing isometric muscle strength, especially in trained athletes as well as enhancing isometric muscle endurance in trained and untrained participants alike.
A mix of protein, amino acids, and vitamin B12, spirulina is an excellent dietary supplement for vegetarians, due to the fact that 60 to 70% of the plant’s structure is composed of protein. It can also benefit you with an immune-enhancing effect.

Nature of the D6D enzyme
This enzyme is dependant on so many factors like minerals like magnesium, zinc, calcium, vitamins B6, B12, E, biotin and it is important to remember that D6D potency declines as we age. The delta-6-desaturase enzyme is also inhibited by stress, disease, increased insulin levels, trans-fatty acids (like those found in margarine), saturated fats and alcohol. When D6 is not so strong the digestion of flax seed gets compromised. The solution is to try the direct supply of gamma linoleum acid(GLA) from foods such as spirulina, borage, night primrose, and others.
Fixing the inhibition problem
We can further inhibit enzyme D5D that converts the GLA to the bad Arachidonic acid which causes inflammation on our body and converts the hardly gained GammaLinoleic acid back to Arachidonic acid. The solution is to eat sesame seeds. They inhibit the production of this D5D enzyme so more GammaLinoleic acid stays for the body.

GLA is then broken down either to arachidonic acid (AA) or another substance called dihomogamma-linolenic acid (DGLA). Dihomo-gamma-linolenic acid (DGLA) is the actual precursor in the production of prostaglandins - it is beneficial and reduces the inflammation in our bodies which is our goal. By consuming enough magnesium, zinc, vitamins: C, B3, B6 GLA will convert to DGLA and not to AA.

The anti-inflammatory Prostaglandins
Prostaglandins are hormones made from fatty acids (with the help of enzymes) that act as chemical messengers. They act as regulatory molecules and are responsible for the cell's inflammatory and anti-inflammatory responses. Derived from Omega-3 and Omega-6 oils they help to regulate every function in our cells and organs. They also keep our androgen hormones in control so that excess sebum won't be produced resulting in acne. Normally, enzymes in your body break Omega-3 acids down to Eicosapentaenoic Acid(EPA) and Docosahexaenoic Acid(DHA). These two fatty acids then change into prostaglandins.

When Omega-3 fatty acids are not enough

image of salmonThey consist of the following tree fatty acids: alpha-linolenic acid(ALA), eicosapentaenoic acid(EPA) and docosahexaenoic acid(DHA).
ALA created in the chloroplasts of green plants from linoleic acid(LA) is important because it serves as a building material for EPA. DHA on the other side is an integral part of eye and brain tissue. It is found in marine algae (spirulina), plankton, fish, and mammals.
However, eating plenty of essential Omega-3 and Omega-6 fatty acids (EFA) is not enough to produce EPA and DHA. It is critical for acne and more importantly for your health that you get enough EPA and DHA in your cells and organs that they can convert and produce the required prostaglandins. Then it is necessary for you to take a fish oil supplement that contains both the EPA and DHA fatty acids.
In order to be fully digested they must be taken after eating otherwise they'll quickly burn as energy fuel and you won't fully benefit them.

Notes on salicylic acid
The anti-inflammatory mechanism of the salicylic acid is due to decreased prostaglandin synthesis and possibly by inhibiting the synthesis and/or activity of other mediators of the inflammation response. The type of inflammation that results in symptoms of redness and swelling is actually the acne.

Omega sources reference list
omega sourcesOmega-3: Avocados, Sesame seeds, Pumpkin seeds, Walnuts, Dark leaf green vegetables (spinach, mustard greens, kale), Wheat germ oil, Salmon, Sardines, Albacore tuna

Omega-6: Flaxseed oil, Flax seeds, Grapeseed oil, Pistachio nuts, Olives, Olive oil, Sunflower seeds, Evening primrose oil, Pumpkin seeds, Black currant oil

Omega-9: Olive oil, Avocados, Cashews, Almonds, Olives, Sesame oil, Pecans, Pistachio nuts

Subscribe To My Channel for updates

Burnout or toxic culture ?

Outsourcing companies are hell to be in for an experienced programmer, because managers are being allowed to mistakes, which are covered, th...