From dirkvanderwalt at webmail.co.za Tue May 4 04:06:36 2004 From: dirkvanderwalt at webmail.co.za (DIRK KONRAD) Date: Mon Aug 2 21:40:03 2004 Subject: [Za-pm] runnig perl-GTK apps as root on SuSE Message-ID: Hi, I dont want to start a distro war, just need some quick fix, if there may be one. I've created a perl-GTK app that at some stage asks for the root password and if OK it will start another app as ?root?. This worked fine under all the mandrakes, but now I have to make it work on Suse 9.0. What I get, when I try and run the app as root, is the following: ----------------------------- Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Tue May 4 10:08:19 2004 Gtk-WARNING **: cannot open display: :0.0 at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Gtk.pm line 68. If I open my xserver with ?xhost +? , I can run it, thus pointing to a lock down issue. Anyone with a more permanent remedy? _____________________________________________________________________ For super low premiums ,click here http://www.dialdirect.co.za/quote From spikeh at mweb.co.za Thu May 6 06:18:47 2004 From: spikeh at mweb.co.za (Spike) Date: Mon Aug 2 21:40:03 2004 Subject: [Za-pm] IP's Message-ID: <5.2.1.1.2.20040506131515.01f27830@pop3.mweb.co.za> Any body got any cool code to check if an IP is within a particular range? I can check the four individual elements of the code with a series of if statements but there must be a more graceful way to do it. if 196.2.49.19 is in the range 196.2.1.1 to 196.3.29.76 do something. Spike Hodge UNIX Programmer M-Web Technology 021 596 8496 083 294 9593 Fax 0866721733 Click here and make M-Web your homepage http://homepage.mweb.co.za -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/za-pm/attachments/20040506/5d5ffb6a/attachment.htm From oskar at qualica.com Thu May 6 06:47:41 2004 From: oskar at qualica.com (Oskar Pearson) Date: Mon Aug 2 21:40:03 2004 Subject: [Za-pm] IP's In-Reply-To: <5.2.1.1.2.20040506131515.01f27830@pop3.mweb.co.za> References: <5.2.1.1.2.20040506131515.01f27830@pop3.mweb.co.za> Message-ID: <20040506114741.GF4893@qualica.com> Hi > Any body got any cool code to check if an IP is within a particular range? > I can check the four individual elements of the code with a series of if > statements but there must be a more graceful way to do it. > > if 196.2.49.19 is in the range 196.2.1.1 to 196.3.29.76 do something. You could convert it all to the numeric representation of the IP and do a simple "less than or greater than" trick. #!/usr/bin/perl -w use strict; my $ip = "196.2.49.19"; my $startRange = "196.2.1.1"; my $endRange = "196.3.29.76"; my $ip_num = &numeric($ip); my $startRange_num = &numeric($startRange); my $endRange_num = &numeric($endRange); unless($startRange_num < $endRange_num) { die("Start of range is not less than end of range"); } if (($ip_num >= $startRange_num) && ($ip_num <= $endRange_num)) { print "Is in range ($ip_num, $startRange_num, $endRange_num)\n"; } else { print "Is NOT range ($ip_num, $startRange_num, $endRange_num)\n"; } sub numeric { my $ip = shift; unless ($ip =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/) { die("Ip invalid? $ip"); } my $numeric; $numeric = $1 * 256 * 256 * 256; $numeric += $2 * 256 * 256; $numeric += $3 * 256; $numeric += $4; #print "Numeric: $numeric\n"; return($numeric); } Says: Is in range (3288477971, 3288465665, 3288538444) Oskar -- Oskar Pearson Qualica Technologies (Pty) Ltd web: http://www.qualica.com/ From oskar at qualica.com Thu May 20 07:30:42 2004 From: oskar at qualica.com (Oskar Pearson) Date: Mon Aug 2 21:40:03 2004 Subject: [Za-pm] Employment: Senior Perl Developer Requirement Message-ID: <20040520123042.GH31583@qualica.com> Hi Please forward all replies to brett@qualica.com, or contact him on the details below. Our details are as follows: Telephone: 011-327-6050 Fax: 011-327-5062 For a map, physical address, postal address, and so forth, please see: http://www.qualica.com/index.php?p1=map Senior Perl Developer ===================== Description ----------- Work on the design, development and implementation of a variety of mod_perl web-based projects within a small project team. Required Skills --------------- 1. Perl (5+ years experience) - Excellent Perl skills (OO, DBI, CPAN, XS) - Experience on Linux/UNIX platforms 2. Database (3+ years experience) - Excellent working knowledge of SQL - Working knowledge of RDBMS (Sybase 11.x/12.x, MS SQL Server 7/2000, PostgreSQL 7.x) - Experience on Linux/UNIX platforms - Beneficial to have good design, stored procedure and performance tuning skills 3. Web Development (3+ years experience) - Good knowledge of HTML, DHTML - Good Javascript/ECMAScript skills (Procedural and OO) - Experience with Apache and mod_perl - Experience on Linux/UNIX platforms 4. Design Methodologies (1+ years experience) - Working knowledge of UML - Ability to work from Technical Design Specifications - Ability to adhere to design and coding standards Beneficial Skills ----------------- 1. CVS/Subversion - working knowledge 2. XML, SAX, XSLT skills 3. C/C++, Java - working knowledge Oskar -- Oskar Pearson Qualica Technologies (Pty) Ltd web: http://www.qualica.com/ From christiaan at jib.co.za Thu May 20 08:13:21 2004 From: christiaan at jib.co.za (Christiaan (JIB)) Date: Mon Aug 2 21:40:03 2004 Subject: [Za-pm] smpp Message-ID: Hello all Anybody ever used smpp to send and receive sms'es I have no problem sending messages off an SMS; but not quite sure how to receive messages and get status for those messages or how to receive messages Any help will be cool - This is my first time working with SMPP so I am a bit in the dark - have downloaded lots of docs but struggling Regards, Christiaan Christiaan Engelbrecht Tel: (021) 686 1620 Fax: (021) 686 8385 Cell: (083) 395 6787 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/za-pm/attachments/20040520/e6bd0d1a/attachment.htm