Friday, January 25, 2013

virtualbox seamless mouse pointer integration and install guest additions

While running the Redhat linux on Virtual box, every time when I want to leave from
guest OS to host system I need to press "Ctrl" key (my Host key is Ctrl) .This is because seamless mouse pointer integration is not enable. This is painful and takes time to jump between guest OS and host system. After reading some forums post and web articles I have come across with a solution.In this method there will be one mouse pointer and pressing the Host key is no longer required to "free" the mouse from being captured by the guest OS and vice-versa. Following steps guide how to enable seamless mouse support on linux based guest system.


[1] install gcc and kernel-devel

install the GNU C compiler and the kernel development packages using

#yum install gcc

followed by

#yum install kernel-devel


[2] Reboot guest system

Reboot your guest system in order to activate the updates.

[3]Install Guest Additions

Click "Devices" --> "Install Guest Additions"




install guest additions

















[4] Follow the installation wizard
you will get window similar to below and click "OK" , you may need provide authentication




VBOXADDITIONS





















[5] It will be prompted with terminal window similar to following, Press Return and close that window... that's all , Now seamless mouse integration should be enabled . have a nice day!




virtualbox guest additions installation














Tuesday, January 22, 2013

Adding categories and sub categories to blogspot

 At the moment of writing this tutorial,  there is no way to add sub categories to blogspot, may be in future blogger will add this feature . To implement this feature needs to edit  HTML code of your template

[1] Take backup of your blog. 


Click " Settings  --->  Other --> Export blog " , and download the backup of your blog post , you can even can take template backup also.


[2] Edit HTML code of  your blog


Click " Template" --> "Edit HTML" , and you will get HTML code of template .
find a line similar to the following, it should be within first 10 -15 lines of code.
<b:skin><![CDATA[/* 

then add the following code before to above line.
<script src='http://blogcat.site40.net/dtree.js' type='text/javascript'/> 

final output should be similar to following
<script src='http://blogcat.site40.net/dtree.js' type='text/javascript'/> 
<b:skin><![CDATA[/*



[3] Adding JavaScript for Subcategories

go to "Layout" click " add a Gadget "  then choose " HTML/JavaScript " gadget and paste the following code and save the template.

//start


<style type="text/css">

.dtree {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 15px;
width:480px;
color: #000;
white-space: nowrap;
}
.dtree img {
border: 0px;
vertical-align: middle;
}
.dtree a {
color: #333;
text-decoration: none;
}
.dtree a.node, .dtree a.nodeSel {
white-space: nowrap;
padding: 1px 2px 1px 2px;
}
.dtree a.node:hover, .dtree a.nodeSel:hover {
color: #333;
text-decoration: underline;
}
.dtree a.nodeSel {
background-color: #c0d2ec;
}
.dtree .clip {
overflow: hidden;
}

</style>
<div class="dtree">


<script type="text/javascript">
<!--

d = new dTree('d');

d.add(0,-1,'Blog Categories'); //
d.add(1,0,' '); //
d.add(100,1,' ','','');  //
document.write(d);
//-->
</script>
</div>

//end


Now, it is done !

d.add(0,-1,'Blog Categories');
d.add(1,0,' ');
d.add(100,1,' ','','');  

please make sure to edit(fill the parameters) above highlighted lines of code according to your blog, otherwise this will not work. Please refer following code explanation.

JavaScript Code explanation


bellow is example code I'm using on my blog. now I'm going to explain the code. all my explanation are bold italic

all the categories are staring from 1 and topics are staring from 100
/*category index 0-99
0 - Blog categories
1 - OpenCV
2 - Linux
3 - Networking stuff

topics start 100..
*/

explanation for d.add() functions and it's parameters
d.add( index , parent index , topic , topic URL  , brief description of the topic ) .this is very simple explanation. you can learn more about from this link http://www.destroydrop.com/javascripts/tree/api/


d.add(0,-1,'Blog Categories');
d.add(1,0,'OpenCV'); //OpenCV category
d.add(100,1,'OpenCV installation','http://techtute.blogspot.com/2011/01/opencv-22-installation-on-visual-studio.html','opencv 2.2 installation on visual studio 2008');

d.add(101,1,'Negative Images','http://techtute.blogspot.com/2011/06/negative-background-images.html','negative background images');

d.add(102,1,'Positive Images','http://techtute.blogspot.com/2011/06/haartraining-positive-samples.html','haartraining positive samples');

d.add(103,1,'opencv haartraining','http://techtute.blogspot.com/2011/06/opencv-haartraining.html','opencv haartraining steps');




If you have followed above steps correctly, you will get an output similar to the following :) .
You can find live demonstration top right hand under name as " categories " 


Adding sub categories to blogspot




















Monday, January 21, 2013

set post title before blog title in blogger for better SEO

Default blogspot template title structure is  " Blog Title | Post Title ". Appearing blog title before the post title will cause to get low clicks to your content through search engine, because post title provide summary of post/article content not the blog title. So let's change this default behavior .

click on the " Template "  --> " Edit HTML "  --> " Proceed " .
find following line of code

<title><data:blog.pageTitle/></title>

and replace the above line with following code

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<title><data:blog.pageName/> |
<data:blog.title/></title>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>

save the template, Now blogspot template title structure should be changed into " Post Title | Blog Title "  . please note this takes some times to change on search engine, later you can verify it, from  following Google query.
site: yourblog.blogspot.com 
below is example output of ,  site:techtute.blogspot.com




post title before blog title in blogger


















Sunday, January 6, 2013

[SOLVED] the action can't be completed because the file is open in windows explorer mkv file

There was  movie on my hard disk which has mkv format and When I'm going to delete that mkv file, it is prompted with following error message.
" the action can't be completed because the file is open in windows explorer "


the action can't be completed because the file is open in windows explorer


 

 and it doesn't allow me to delete it at all. I restarted my computer and try to delete it but same error no luck. Finally I have found a solution , it was very simple than I thought . This is what I have done

[1] open command promt

for windows 7 , click start and type cmd

[2] Change the directory where delete file is located

in my case, file is at Desktop and I used following command to change the directory
cd c:\Users\Admin\Desktop

Now try to delete file using command line , issue following command
del "file name"

but you will get an error message similar to following for sure :) don't worry !!
" The process cannot access the file because it is being used by another process. "



The process cannot access the file because it is being used by another process
























[3] Disable "explorer.exe"

open the task manager , select "Process" tab and select "explorer.exe" from the process list and click "End Process" button
Now every thing should be vanished except command promt and Task manager , don't be confused we will get back them all later :D

[4] Delete the mkv file

Now again issue del command , this time it should be executed and you will get no error messages.
ok , big step is done , now time to get back desktop and task bar

[5] bring back desktop and task bar

type explorer.exe on command prompt . how simple it is :))


Related Posts