PayPal is the easiest way to receive money online. Get one now or Click here to sign up. Sign up for PayPal and start accepting credit card payments instantly.

Invalid GPG keys: warning: rpmts HdrFromFdno: Header V3_DSA signature: NOKEY

Sometimes you encountered problem that fail to install the package after you execute yum install . Below the error that you encountered

Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID db42a60e


Public key for autoconf-2.59-5.noarch.rpm is not installed

This errors occurs sometime with yum install with the old GPG keys that are obsolete, you need to update them . Just run the command below to update the old GPG keys.

rpm --import /etc/pki/rpm-gpg/RPM*

How to convert seconds into HH:MM:SS (24 hour format) using Perl

use strict;
my $sec = 30028;
# result should be 08:20:28
my $time = &ConvertSeconds2Hours($sec);
print $time;
sub ConvertSeconds2Hours()
{
my $sec=shift;

my $hours = ($sec/3600);
my ($hours,$x) = split('\.', $hours);
if ($hours < 10)
{
$hours = "0" . $hours;
}
my $min = ($sec%3600);
$min = ($min/60);
my ($min,$x) = split('\.', $min);
if ($min < 10)
{
$min = "0" . $min;
}
$sec = ($sec%60);
if ($sec < 10)
{
$sec = "0" . $sec;
}

return "$hours:$min:$sec";

}

How to peek message MSMQ using perl

use Win32::OLE;
use strict;
my %getInbox;
my $msmq_path = "direct=os:MSMQ-Server\\Private\$\\test";
my $objInfo = Win32::OLE->new('MSMQ.MSMQQueueInfo');
my $objMsg = Win32::OLE->new('MSMQ.MSMQMessage');

$objInfo->{FormatName}= $msmq_path;
#$objMsg->{Body}= "test";
#$objMsg->{Label}= '12005I112';
my $objQue=$objInfo->open(1,0);
$getInbox{message} = $objQue->PeekCurrent(0,1,1,10);
$getInbox{info} = $objQue->Receive() if (defined($getInbox{message}));
while (defined($getInbox{info}))
{
print $getInbox{info}->{Body},"\n";
print $getInbox{info}->{Label},"\n";
$getInbox{message} = $objQue->PeekNext(0,1,1,10);
last if (!(defined($getInbox{message})));
$getInbox{info}=$objQue->Receive()
}

$objQue->Close;

How to send message in transactional MSMQ queue using perl

use Win32::OLE;
&sendInbox("Body",'MSMQ-Server\private$\test');
sub sendInbox()
{
my $Body = shift;
my $Queue = shift;
my $sendMsg = Win32::OLE->new('MSMQ.MSMQMessage');
my $sendInfo = Win32::OLE->new('MSMQ.MSMQQueueInfo');
my $Sendxdisper = Win32::OLE->new('MSMQ.MSMQTransactionDispenser'); #
my $Sendxact = Win32::OLE->new('MSMQ.MSMQTransaction'); #
$Sendxact = $Sendxdisper->BeginTransaction();
$sendInfo->{FormatName}= "direct=os:" . $Queue;
my $sendQ = $sendInfo->Open(2, 0);
$sendMsg->{Label}= "Label";
$sendMsg->{Body}= $Body;
#Send Message
$sendMsg->Send($sendQ,$Sendxact);
$sendQ->Close;
$Sendxact->Commit();
}

WebProNews Feed

eWeek - RSS Feeds

HowtoForge - Howtos and Tutorials

The Register

PayPal is the easiest way to receive money online. Get one now or Click here to sign up. Sign up for PayPal and start accepting credit card payments instantly.