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')  
    end
    jj = jj+1;
end


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="http://www.blogger.com/add-widget">
<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='http://i1202.photobucket.com/albums/bb377/nabinkm/nepalflag.gif' 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="http://www.nabinkm.com"/>
<input type="hidden" name="logoUrl" value="#"/>
<input type="submit" name="go" value="Add NP flag"/>
</form>


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='http://www.go2web20.net/twitterfollowbadge/1.0/badge.js' type='text/javascript'/>
<script charset='utf-8' type='text/javascript'><!--
tfb.account = 'nabinkm';
tfb.label = 'follow-me';
tfb.color = '#2f3192';
tfb.side = 'r';
tfb.top = 136;
tfb.showbadge();
--></script>
<!-- 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="http://www.twitter.com/nabinkm" target="_blank"><img height="97" style="border:0;" src="http://i.imgur.com/t2Iha.jpg" /></a>
<a href="http://www.twitter.com/nabinkm"> @nabinkm </a>



<a style="display:scroll;position:fixed;bottom:100px;left:24px;" href="http://www.twitter.com/nabinkm" target="_blank"><img style="border:0;" src="https://lh4.googleusercontent.com/-EIrgWSiVvwk/Taezn19w38I/AAAAAAAAHqU/zOrSSKtKrOs/s155/nepalflag.gif" height="100" width="75" /></a>