Monday, September 12, 2011

To replace the un-necessary strings in filename

Somehow, the filenames had infections with the extra '%E7%E7htm'.
What surprises me is that not all files had the same error.
So, I wrote a simple code to get rid of the extra characters in the filename/ extension.

% To replace   '%E7%E7htm' by 'htm'

% fn = '2Oct_09.%E7%E7htm'
list = dir;

jj = 1;
while jj < length ( list)
    fn = list(jj,1).name;
    [pathstr, name, ext] = fileparts(fn)
    if  strcmp(ext,'.%E7%E7htm') % ~list(jj,1).isdir
%         if strcmp(fn(9:15),'%E7%E7h')
          newfn=  strrep(fn, '%E7%E7h', 'h');
%         end
          system([ 'mv ' fn,' ' newfn])
%       disp('asdf')  
    jj = jj+1;

Wednesday, September 7, 2011

Add Waving Nepali Flag widget in blogger

This post is about how to add a widget to blogspot blogs.

The code is:
<form method="POST" action="">
<input type="hidden" name="widget.title" value="NP Flag"/>
<input type="hidden" name="widget.content" value="<a style='display:scroll; position:fixed; bottom:100px; left:24px;' href='#'><img src='' alt='np flag' width='75' height='100' border='0' /></a>"/>
<input type="hidden" name="widget.template" value="<data:content/>" />
<input type="hidden" name="infoUrl" value=""/>
<input type="hidden" name="logoUrl" value="#"/>
<input type="submit" name="go" value="Add NP flag"/>

Sunday, September 4, 2011

Twitter Follow badge for blogger with Nepal.gif Flag

Cool GIF flag in blogspot blog with twitter follow button

Add the following code in the html code of your blog before </body> tag

<!-- twitter follow badge by go2web20 -->
<script src='' type='text/javascript'/>
<script charset='utf-8' type='text/javascript'><!--
tfb.account = 'nabinkm';
tfb.label = 'follow-me';
tfb.color = '#2f3192';
tfb.side = 'r'; = 136;
<!-- end of twitter follow badge -->

Now insert the html at any place in the body. For blogger blogs, I find it easy to add html element and add it there.

<a style="display:scroll;position:fixed;bottom:100px;left:1px;" href="" target="_blank"><img height="97" style="border:0;" src="" /></a>
<a href=""> @nabinkm </a>

<a style="display:scroll;position:fixed;bottom:100px;left:24px;" href="" target="_blank"><img style="border:0;" src="" height="100" width="75" /></a>