<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for Landfill of wisdom</title>
	<atom:link href="http://tips.at.gg3.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://tips.at.gg3.net</link>
	<description>Dumping ground for small tips and big papers</description>
	<pubDate>Wed, 10 Mar 2010 14:18:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on grub2 cannot read core.img by chutz</title>
		<link>http://tips.at.gg3.net/2009/05/06/grub2-cannot-read-coreimg/#comment-2840</link>
		<dc:creator>chutz</dc:creator>
		<pubDate>Sat, 20 Feb 2010 10:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=57#comment-2840</guid>
		<description>@cmh: You can do it with fdisk, but you should tell it to use sectors as a unit. Either start  fdisk as "fdisk -u", or type "u" once you are in the fdisk interface. Then delete the partition and create it again (you will of course lose all data on the partition). A snipped down fdisk session:

&lt;code&gt;
&lt;strong&gt;$ sudo fdisk /dev/sdb&lt;/strong&gt;
&lt;strong&gt;Command (m for help): p&lt;/strong&gt;
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        3011     3915204    b  W95 FAT32
&lt;strong&gt;Command (m for help): u&lt;/strong&gt;
Changing display/entry units to sectors
&lt;strong&gt;Command (m for help): p&lt;/strong&gt;
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        1144     7831551     3915204    b  W95 FAT32
&lt;strong&gt;Command (m for help): d&lt;/strong&gt;
Selected partition 1
&lt;strong&gt;Command (m for help): n&lt;/strong&gt;
Command action
   e   extended
   p   primary partition (1-4)
&lt;strong&gt;p&lt;/strong&gt;
Partition number (1-4): &lt;strong&gt;1&lt;/strong&gt;
First sector (51-7831551, default 51): &lt;strong&gt;63&lt;/strong&gt;
Last sector, +sectors or +size{K,M,G} (63-7831551, default 7831551): &lt;strong&gt;+1G &lt;/strong&gt; 
&lt;strong&gt;Command (m for help): p&lt;/strong&gt;
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     2097215     1048576+  83  Linux&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@cmh: You can do it with fdisk, but you should tell it to use sectors as a unit. Either start  fdisk as &#8220;fdisk -u&#8221;, or type &#8220;u&#8221; once you are in the fdisk interface. Then delete the partition and create it again (you will of course lose all data on the partition). A snipped down fdisk session:</p>
<p><code><br />
<strong>$ sudo fdisk /dev/sdb</strong><br />
<strong>Command (m for help): p</strong><br />
&#8230;<br />
   Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1   *           1        3011     3915204    b  W95 FAT32<br />
<strong>Command (m for help): u</strong><br />
Changing display/entry units to sectors<br />
<strong>Command (m for help): p</strong><br />
&#8230;<br />
   Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1   *        1144     7831551     3915204    b  W95 FAT32<br />
<strong>Command (m for help): d</strong><br />
Selected partition 1<br />
<strong>Command (m for help): n</strong><br />
Command action<br />
   e   extended<br />
   p   primary partition (1-4)<br />
<strong>p</strong><br />
Partition number (1-4): <strong>1</strong><br />
First sector (51-7831551, default 51): <strong>63</strong><br />
Last sector, +sectors or +size{K,M,G} (63-7831551, default 7831551): <strong>+1G </strong><br />
<strong>Command (m for help): p</strong><br />
&#8230;<br />
   Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1              63     2097215     1048576+  83  Linux</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on grub2 cannot read core.img by cmh</title>
		<link>http://tips.at.gg3.net/2009/05/06/grub2-cannot-read-coreimg/#comment-2773</link>
		<dc:creator>cmh</dc:creator>
		<pubDate>Mon, 15 Feb 2010 19:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=57#comment-2773</guid>
		<description>how do you destroy the first partition and recreate it from sector 63?</description>
		<content:encoded><![CDATA[<p>how do you destroy the first partition and recreate it from sector 63?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on grub2 cannot read core.img by Max</title>
		<link>http://tips.at.gg3.net/2009/05/06/grub2-cannot-read-coreimg/#comment-2538</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Sat, 30 Jan 2010 06:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=57#comment-2538</guid>
		<description>Thanks pal. You've saved lot of my time.</description>
		<content:encoded><![CDATA[<p>Thanks pal. You&#8217;ve saved lot of my time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on grub2 cannot read core.img by Matthew</title>
		<link>http://tips.at.gg3.net/2009/05/06/grub2-cannot-read-coreimg/#comment-2064</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 27 Nov 2009 05:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=57#comment-2064</guid>
		<description>Thanks for posting this information.  This helped me with my long-standing problem.  Grub2 despirately needs some basic technical documentation, including common issues like this one.  So sad that it is so neglected, since it is so important.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this information.  This helped me with my long-standing problem.  Grub2 despirately needs some basic technical documentation, including common issues like this one.  So sad that it is so neglected, since it is so important.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Parsing HTML with Perl and XPath by nileside</title>
		<link>http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/#comment-1717</link>
		<dc:creator>nileside</dc:creator>
		<pubDate>Thu, 17 Sep 2009 22:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=52#comment-1717</guid>
		<description>#!/usr/bin/perl

use strict;
use HTML::Tree;
use LWP::Simple;
open FILE, "&#60;", "tickers.txt" or die $!;
while () {
 my($line) = $_;
  chomp($line);
   # Convert the line to upper case.
 $line =~ tr/[a-z]/[A-Z]/;
         my @arr=split(/,/, $line);
           print "Ticker" , "," ,            "BuyPrice" ,  ",",           "Threshold" ,  "," , "CurrPrice";           print "\n";
           print $arr[0],  "," ,                  $arr[1] ,  ",",                  $arr[2] ,  ","   ;
            my $funky = "http://www.xxxxx.com/News/CompanyBasicQuote.aspx?sskicode=$arr[0]+";
            my $content = get($funky);
            my $tree = HTML::Tree-&#62;new();
            $tree-&#62;parse($content);
            my ($title) = $tree-&#62;look_down( '_tag' , 'span' );
             my $curr_price = $tree-&#62;look_down(
             sub{ $_[0]-&#62; tag() eq 'span' and ($_[0]-&#62;attr('id') =~ /BasicQuote1_lblNse1/)}
             );
           my $currP=  $curr_price-&#62;as_text;
            print  $curr_price-&#62;as_text , "\n";
            my $rel_value= @arr[1]-@arr[1]*(@arr[2]/100);
            print "rel_value " , $rel_value ,"\n";
          if  ( $currP &#60; $rel_value )
          { print "value is less than the threshold. Email" }
          else
          { print "value is not less than the threshold" };

      };
close FILE or die $!  ;

#http://www.velikan.net/sendmail-for-windows-iis/
#sub sendmail()
#{
# print "Content-type: text/html\n\n";
#
#$title='Trading Alerts';
#$to='...email.com';
#$from= '....uremail.com';
#$subject='Trading Alerts';
#
#open(MAIL, "&#124;/usr/sbin/sendmail -t");
#
## Mail Header
#print MAIL "To: $to\n";
#print MAIL "From: $from\n";
#print MAIL "Subject: $subject\n\n";
## Mail Body
#print MAIL "This is a test message from sharekhan alerts customized! You can write your
#mail body text here\n";
#
#close(MAIL);
#
#print "$title
#\n\n\n";
#
## HTML content let use know we sent an email
#print "$title\n";
#print "A message has been sent from $from to $to";
#print "\n\n";
#}</description>
		<content:encoded><![CDATA[<p>#!/usr/bin/perl</p>
<p>use strict;<br />
use HTML::Tree;<br />
use LWP::Simple;<br />
open FILE, &#8220;&lt;&#8221;, &#8220;tickers.txt&#8221; or die $!;<br />
while () {<br />
 my($line) = $_;<br />
  chomp($line);<br />
   # Convert the line to upper case.<br />
 $line =~ tr/[a-z]/[A-Z]/;<br />
         my @arr=split(/,/, $line);<br />
           print &#8220;Ticker&#8221; , &#8220;,&#8221; ,            &#8220;BuyPrice&#8221; ,  &#8220;,&#8221;,           &#8220;Threshold&#8221; ,  &#8220;,&#8221; , &#8220;CurrPrice&#8221;;           print &#8220;\n&#8221;;<br />
           print $arr[0],  &#8220;,&#8221; ,                  $arr[1] ,  &#8220;,&#8221;,                  $arr[2] ,  &#8220;,&#8221;   ;<br />
            my $funky = &#8220;http://www.xxxxx.com/News/CompanyBasicQuote.aspx?sskicode=$arr[0]+&#8221;;<br />
            my $content = get($funky);<br />
            my $tree = HTML::Tree-&gt;new();<br />
            $tree-&gt;parse($content);<br />
            my ($title) = $tree-&gt;look_down( &#8216;_tag&#8217; , &#8217;span&#8217; );<br />
             my $curr_price = $tree-&gt;look_down(<br />
             sub{ $_[0]-&gt; tag() eq &#8217;span&#8217; and ($_[0]-&gt;attr(&#8217;id&#8217;) =~ /BasicQuote1_lblNse1/)}<br />
             );<br />
           my $currP=  $curr_price-&gt;as_text;<br />
            print  $curr_price-&gt;as_text , &#8220;\n&#8221;;<br />
            my $rel_value= @arr[1]-@arr[1]*(@arr[2]/100);<br />
            print &#8220;rel_value &#8221; , $rel_value ,&#8221;\n&#8221;;<br />
          if  ( $currP &lt; $rel_value )<br />
          { print &#8220;value is less than the threshold. Email&#8221; }<br />
          else<br />
          { print &#8220;value is not less than the threshold&#8221; };</p>
<p>      };<br />
close FILE or die $!  ;</p>
<p>#http://www.velikan.net/sendmail-for-windows-iis/<br />
#sub sendmail()<br />
#{<br />
# print &#8220;Content-type: text/html\n\n&#8221;;<br />
#<br />
#$title=&#8217;Trading Alerts&#8217;;<br />
#$to=&#8217;&#8230;email.com&#8217;;<br />
#$from= &#8216;&#8230;.uremail.com&#8217;;<br />
#$subject=&#8217;Trading Alerts&#8217;;<br />
#<br />
#open(MAIL, &#8220;|/usr/sbin/sendmail -t&#8221;);<br />
#<br />
## Mail Header<br />
#print MAIL &#8220;To: $to\n&#8221;;<br />
#print MAIL &#8220;From: $from\n&#8221;;<br />
#print MAIL &#8220;Subject: $subject\n\n&#8221;;<br />
## Mail Body<br />
#print MAIL &#8220;This is a test message from sharekhan alerts customized! You can write your<br />
#mail body text here\n&#8221;;<br />
#<br />
#close(MAIL);<br />
#<br />
#print &#8220;$title<br />
#\n\n\n&#8221;;<br />
#<br />
## HTML content let use know we sent an email<br />
#print &#8220;$title\n&#8221;;<br />
#print &#8220;A message has been sent from $from to $to&#8221;;<br />
#print &#8220;\n\n&#8221;;<br />
#}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Parsing HTML with Perl and XPath by Websites tagged "parsing" on Postsaver</title>
		<link>http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/#comment-937</link>
		<dc:creator>Websites tagged "parsing" on Postsaver</dc:creator>
		<pubDate>Tue, 30 Jun 2009 19:17:36 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=52#comment-937</guid>
		<description>[...] - Parsing HTML with Perl and XPath saved by bjbrennan2009-06-21 - Google Chrome Automated Testing saved by IanCrossland2009-06-20 - [...]</description>
		<content:encoded><![CDATA[<p>[...] - Parsing HTML with Perl and XPath saved by bjbrennan2009-06-21 - Google Chrome Automated Testing saved by IanCrossland2009-06-20 - [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixing unreadable email with mutt and vim by Websites tagged "mojibake" on Postsaver</title>
		<link>http://tips.at.gg3.net/2008/03/28/fixing-unreadable-email-with-mutt-and-vim/#comment-820</link>
		<dc:creator>Websites tagged "mojibake" on Postsaver</dc:creator>
		<pubDate>Wed, 06 May 2009 11:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/2008/03/28/fixing-unreadable-email-with-mutt-and-vim/#comment-820</guid>
		<description>[...] - Fixing unreadable email with mutt and vim saved by freakintourist2009-04-27 - Mojibake saved by bfaust2009-04-26 - MP3 ID3 Tags and encoding [...]</description>
		<content:encoded><![CDATA[<p>[...] - Fixing unreadable email with mutt and vim saved by freakintourist2009-04-27 - Mojibake saved by bfaust2009-04-26 - MP3 ID3 Tags and encoding [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Switching to Gnome by Nikolay Elenkov</title>
		<link>http://tips.at.gg3.net/2009/01/04/switching-to-gnome/#comment-723</link>
		<dc:creator>Nikolay Elenkov</dc:creator>
		<pubDate>Mon, 23 Feb 2009 04:45:42 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=54#comment-723</guid>
		<description>Ti da vidish syvpadenie :) Syshtata situaciya, samo deto me myrzeshe dirya
shto ne mi mount-va CD-ta. Sega pyk ako i stane, imash edna bira pone :) 

P.S Taz Captcha edvam se chete</description>
		<content:encoded><![CDATA[<p>Ti da vidish syvpadenie <img src='http://tips.at.gg3.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Syshtata situaciya, samo deto me myrzeshe dirya<br />
shto ne mi mount-va CD-ta. Sega pyk ako i stane, imash edna bira pone <img src='http://tips.at.gg3.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S Taz Captcha edvam se chete</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Parsing HTML with Perl and XPath by Bookmarks about Xpath</title>
		<link>http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/#comment-721</link>
		<dc:creator>Bookmarks about Xpath</dc:creator>
		<pubDate>Wed, 18 Feb 2009 21:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=52#comment-721</guid>
		<description>[...] - bookmarked by 2 members originally found by ghsilva on 2009-01-25  Parsing HTML with Perl and XPath  http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/ - bookmarked by 6 members [...]</description>
		<content:encoded><![CDATA[<p>[...] - bookmarked by 2 members originally found by ghsilva on 2009-01-25  Parsing HTML with Perl and XPath  <a href="http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/" rel="nofollow">http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/</a> - bookmarked by 6 members [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Parsing HTML with Perl and XPath by Sandia</title>
		<link>http://tips.at.gg3.net/2008/08/08/parsing-html-with-perl-and-xpath/#comment-339</link>
		<dc:creator>Sandia</dc:creator>
		<pubDate>Mon, 13 Oct 2008 22:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://tips.at.gg3.net/?p=52#comment-339</guid>
		<description>you could use HTML::TreeBuilder::XPath

http://search.cpan.org/dist/HTML-TreeBuilder-XPath/lib/HTML/TreeBuilder/XPath.pm

:D</description>
		<content:encoded><![CDATA[<p>you could use HTML::TreeBuilder::XPath</p>
<p><a href="http://search.cpan.org/dist/HTML-TreeBuilder-XPath/lib/HTML/TreeBuilder/XPath.pm" rel="nofollow">http://search.cpan.org/dist/HTML-TreeBuilder-XPath/lib/HTML/TreeBuilder/XPath.pm</a></p>
<p> <img src='http://tips.at.gg3.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
