RE: [perl-win32-gui-users] Win32::GUI help

2004-01-07 Thread Farrington, Ryan
I think I did kind of the same thing you are looking at. What I had to do
was create a child process to handle all my requests. Take a look at
Win32::ProcFarm to create and talk with your children processes while having
your parent process deal with the interface. Give that a shot =-) I will try
to find some of my code and send it on. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
#SHUCHI MITTAL#
Sent: Wednesday, January 07, 2004 7:30 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Win32::GUI help


Hi once again everyone
 
I just started working with Win32::GUI yesterday and was wondering if anyone
could tell me how I can do the following:
 
1/ Make a basic GUI with certain buttons-- I have successfully managed to
make this!!:)
 
2/ Every button click should invoke another perl script -- I think I can do
this by including the system command in the button click method. If anyone
knows any other sophisticated method then pelase tell me
 
3/ I need to display the output while execution of each of the scripts, that
runs on a button click, on some sort of box/window. This box or window can
appear on the original window or pop up a new one which would close once
execution finishes. that is : I have a basic window with buttons. on click
of button I should see a text box or a pop up window which shows me the
result of the script execution. If its a pop up window it should close when
script finishes execution and if its a text box then it can just stay as it
is once the execution finishes. I I have NO idea how to do this so any sort
of help would be great. I tried reading some tutorials on Win32::GUI but Im
still lost. Any advice/script snippets to start me off would be much
appreciated.
 
Thanx in advance
 
Cheers
 
Shuchi
 
 


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users



RE: [perl-win32-gui-users] Win32::GUI help

2004-01-07 Thread Farrington, Ryan
Here ya go: All the use's were done to allow for perl2exe to compile it into
an application. The code is really really sloppy. =( Also I used guiloft to
create the win32::Gui stuff... Way easier.. I would highly recommend it! =-)


---CODE---
#!e:\perl\bin\perl
#this is the parent script
use Win32::GUI;
use Win32;
use Win32::GUI::Loft;
use Win32::GUI::Resizer;
use Win32::GUI::ToolbarWindow;
use Win32::GUI::BorderlessWindow;
use Win32::GUI::Loft::Cluster;
use Win32::GUI::Loft::ControlProperty;
use Win32::GUI::Loft::ControlProperty::Readonly;
use Win32::GUI::Loft::ControlInspector;
use Win32::GUI::Loft::Control;
use Win32::GUI::Loft::Control::ForegroundBackground;
use Win32::GUI::Loft::Control::Intangible;
use Win32::GUI::Loft::Control::Window;
use Win32::GUI::Loft::Control::Button;
use Win32::GUI::Loft::Control::Textfield;
use Win32::GUI::Loft::Control::RichEdit;
use Win32::GUI::Loft::Control::Label;
use Win32::GUI::Loft::Control::Checkbox;
use Win32::GUI::Loft::Control::Radiobutton;
use Win32::GUI::Loft::Control::Listbox;
use Win32::GUI::Loft::Control::Combobox;
use Win32::GUI::Loft::Control::TreeView;
use Win32::GUI::Loft::Control::ListView;
use Win32::GUI::Loft::Control::Groupbox;
use Win32::GUI::Loft::Control::Toolbar;
use Win32::GUI::Loft::Control::StatusBar;
use Win32::GUI::Loft::Control::ProgressBar;
use Win32::GUI::Loft::Control::TabStrip;
use Win32::GUI::Loft::Control::Splitter;
use Win32::GUI::Loft::Control::ImageList;
use Win32::GUI::Loft::Control::Timer;
use Win32::GUI::Loft::Control::Custom;
use Win32::GUI::Loft::Control::Graphic;
use Win32::GUI::Resizer;
use Data::Dumper;
use IO::Socket;
use Cwd;
use Data::Dumper;
use Win32::Process;
use Win32::ProcFarm::Port;
use Win32::ProcFarm::TickCount;
use Win32::ProcFarm::Parent;
use Win32::ProcFarm::Port;

#this hides the dos window =-) yeah!
my ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS); my
$port_obj = Win32::ProcFarm::Port-new(9000, 1); my $interface =
Win32::ProcFarm::Parent-new_async($port_obj, perl_script.pl,
Win32::GetCwd);

$interface-connect;
sub main {

# this code from here to the other here (lol) is all I need to
create the window. Ergo why GUILOFT ROCKS!
my $fileWindow = Hotfix.gld;
my $objDesign = Win32::GUI::Loft::Design-newLoad($fileWindow) or
die(Could not open window file ($fileWindow));
#Create a menu and assign it to the design object before
#building the window.
$objDesign-mnuMenu(
Win32::GUI::MakeMenu(
File=mnuFile,
  Save= mnuFileSave,
  Save All= mnuFileSaveAll,
  Exit= mnuFileExit,
Help= mnuHelp,
  About= mnuHelpAbout
)
);
my $win = $objDesign-buildWindow() or die(Could not build window
($fileWindow));
$win-Show();
# the other HERE! =-)

}

sub ::btnOpen_Click {
$jobServerToProcess = localhost;
$interface-execute('check_server', $jobServerToProcess);
}


---END CODE---


---CODE---
#!e:\perl\bin\perl
#this is the child process
use Data::Dumper;
use IO::Socket;
use Win32::GUI;
my ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS);

sub init {
  my($port_num, $unique) = @ARGV[0,1];

  $socket = new IO::Socket::INET (localhost:$port_num) or die Child
unable to open socket.\n;
  print $socket pack(V, $unique);
}

sub main_loop {
  my $len, $cmd;

  my $temp = read($socket, $len, 4);
  $temp or exit;
  $temp == 4 or die Unable to completely read command length.\n;
  $len = unpack(V, $len);
  (read($socket, $cmd, $len) == $len) or die Unable to completely read
command.\n;
  my($command, $ptr2params);
  eval($cmd);
  my(@retval) = $command(@{$ptr2params});
  my $retstr = Data::Dumper-Dump([EMAIL PROTECTED], [ptr2retval]);
  print $socket (pack(V, length($retstr)).$retstr);
}

init;
while(1) {
main_loop;
}

sub check_server {
my($server) = shift;
# do your stuff here! =-)

}





RE: [perl-win32-gui-users] Win32::GUI help

2004-01-07 Thread Farrington, Ryan
I build it with perl2exe as well but that will require a small mod to the
parent.pm in procfarm. The change has been submitted to the creator of
procfarm but he has not released it.

I tested it on XP and NT4 and 2K so as far as I can tell once it is compiled
as long as you are calling the lowest common denominator for the OS's it
should work =-)


Open parent.pm and look for the following code:

sub _new_async {
  my $self = shift;

  my $process;
  my $unique = $Win32::ProcFarm::Parent::unique++;
  my $port_num = $self-{port_obj}-get_port_num;
  (my $perl_exe = $^X) =~ s/\\[^\\]+$/\\Perl.exe/;
  Win32::Process::Create($process, $perl_exe, perl $self-{script}
$port_num $unique, 0, 0, $self-{curdir}) or
  die Unable to start child process.\n;
  $Win32::ProcFarm::Parent::processes-{$unique} = $process;
  $self-{state} = 'init';
  return $self;
}


Replace it with this code:

sub _new_async {
  my $self = shift;

  my $process;
  my $unique = $Win32::ProcFarm::Parent::unique++;
  my $port_num = $self-{port_obj}-get_port_num;
  if($self-{script}=~ /\.exe/ig){
Win32::Process::Create($process, .\/$self-{script},
$self-{script} $port_num $unique, 0, 0, $self-{curdir}) or die Unable
to start child process. .\/$self-{script} $port_num $unique\n;
  } else {
(my $perl_exe = $^X) =~ s/\\[^\\]+$/\\Perl.exe/;
Win32::Process::Create($process, $perl_exe, perl $self-{script}
$port_num $unique, 0, 0, $self-{curdir}) or die Unable to start child
process. perl $self-{script} $port_num $unique\n;
  }
  $Win32::ProcFarm::Parent::processes-{$unique} = $process;
  $self-{state} = 'init';
  return $self;
}

-Original Message-
From: Jeremy White [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 9:16 AM
To: [EMAIL PROTECTED]
Cc: perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Win32::GUI help


Looks good - I'll have to have a play. Have you had any issues rolling out 
your exe across different versions of windows? Do you build the child with 
perl2exe before shipping it out?

Thanks,

jez.


From: Farrington, Ryan [EMAIL PROTECTED]
CC: 'perl-win32-gui-users@lists.sourceforge.net'
perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Win32::GUI help
Date: Wed, 7 Jan 2004 08:17:12 -0600

Here ya go: All the use's were done to allow for perl2exe to compile it
into
an application. The code is really really sloppy. =( Also I used guiloft to
create the win32::Gui stuff... Way easier.. I would highly recommend it! 
=-)


---CODE---
#!e:\perl\bin\perl
#this is the parent script
use Win32::GUI;
use Win32;
use Win32::GUI::Loft;
use Win32::GUI::Resizer;
use Win32::GUI::ToolbarWindow;
use Win32::GUI::BorderlessWindow;
use Win32::GUI::Loft::Cluster;
use Win32::GUI::Loft::ControlProperty;
use Win32::GUI::Loft::ControlProperty::Readonly;
use Win32::GUI::Loft::ControlInspector;
use Win32::GUI::Loft::Control;
use Win32::GUI::Loft::Control::ForegroundBackground;
use Win32::GUI::Loft::Control::Intangible;
use Win32::GUI::Loft::Control::Window;
use Win32::GUI::Loft::Control::Button;
use Win32::GUI::Loft::Control::Textfield;
use Win32::GUI::Loft::Control::RichEdit;
use Win32::GUI::Loft::Control::Label;
use Win32::GUI::Loft::Control::Checkbox;
use Win32::GUI::Loft::Control::Radiobutton;
use Win32::GUI::Loft::Control::Listbox;
use Win32::GUI::Loft::Control::Combobox;
use Win32::GUI::Loft::Control::TreeView;
use Win32::GUI::Loft::Control::ListView;
use Win32::GUI::Loft::Control::Groupbox;
use Win32::GUI::Loft::Control::Toolbar;
use Win32::GUI::Loft::Control::StatusBar;
use Win32::GUI::Loft::Control::ProgressBar;
use Win32::GUI::Loft::Control::TabStrip;
use Win32::GUI::Loft::Control::Splitter;
use Win32::GUI::Loft::Control::ImageList;
use Win32::GUI::Loft::Control::Timer;
use Win32::GUI::Loft::Control::Custom;
use Win32::GUI::Loft::Control::Graphic;
use Win32::GUI::Resizer;
use Data::Dumper;
use IO::Socket;
use Cwd;
use Data::Dumper;
use Win32::Process;
use Win32::ProcFarm::Port;
use Win32::ProcFarm::TickCount;
use Win32::ProcFarm::Parent;
use Win32::ProcFarm::Port;

#this hides the dos window =-) yeah!
my ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS); my 
$port_obj = Win32::ProcFarm::Port-new(9000, 1); my $interface = 
Win32::ProcFarm::Parent-new_async($port_obj, perl_script.pl, 
Win32::GetCwd);

$interface-connect;
sub main {

   # this code from here to the other here (lol) is all I need to
create 
the window. Ergo why GUILOFT ROCKS!
   my $fileWindow = Hotfix.gld;
   my $objDesign = Win32::GUI::Loft::Design-newLoad($fileWindow) or 
die(Could not open window file ($fileWindow));
   #Create a menu and assign it to the design object before
   #building the window.
   $objDesign-mnuMenu(
   Win32::GUI::MakeMenu(
   File=mnuFile,
 Save= mnuFileSave,
 Save All= mnuFileSaveAll,
 Exit= mnuFileExit

RE: passing parms to subroutine

2003-10-29 Thread Farrington, Ryan
Title: RE: passing parms to subroutine





Look for dereferencing. Section 4.8.2 in Perl in a Nutshell



-Original Message-
From: lorid [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 29, 2003 2:14 PM
To: Moon, John
Cc: perl users
Subject: Re: passing parms to subroutine



Thanks.
I didnt see anything about the $$ for refering to the value in my book , but then again Im in a hurry. anyway - I get it, it works now

Lori


Moon, John wrote:


 SUN1-BATCHperl -e 'my $a=abc; Show(\$a);sub Show {my 
 SUN1-BATCH($value)[EMAIL PROTECTED];print
 value=$$value\n;}'
 value=abc
 SUN1-BATCH

 Hope this helps ...

 jwm

 -Original Message-
 From: lorid [mailto:[EMAIL PROTECTED]]
 Sent: October 29, 2003 14:31
 To: perl users
 Subject: passing parms to subroutine

 Im used to subs in C or VB but this has me puzzled...
 I am trying to pass a scalar ref to a subroutine,
 When I try to use the value of the passed parm inside the sub Im 
 getting a garbage value (has address instead of value? ) from my 
 process_files sub,and the increment sub, but the sub that I dont 
 declare a prototype on or use () in the func. definition It works ??

 Can someone spot my error, or tell me the right way to pass a scalar 
 to a sub and use it ?

 #!/usr/bin/perl -w
 use warnings;
 use strict;

 #prototypes
 sub increment(\$);
 sub process_files(\$);

 my $a= 5;
 my $pc_unzipped_file = 
 'C:\\TMCC\\CIT_153\\hw9\\hw9_files\\CNUTLZD.TXT';

 increment($a);
 print $a;
 process_files($pc_unzipped_file);

 my $a= 5;
 my $pc_unzipped_file = 
 'C:\\TMCC\\CIT_153\\hw9\\hw9_files\\CNUTLZD.TXT';

 increment($a);
 print $a;

 process_files($pc_unzipped_file);

 #function defs
 sub increment(\$){

 my $reference = shift;

 print \nThe reference:$reference\n;
 print \nThe reference:@_\n;

 $$reference++;

 }

 sub process_files(\$){

 my $file_ref = shift;

 print \nGot the Filename: $file_ref \n;

 print \nGot the Filename: @_\n;
 }

 first (1,2,3);
 sub first #how come no ()
 here ? , also I notice they dont create a prototype
 {
 print \nIn first the ars are @_\n; # this allows me to get
 at values inside the sub which is what I need.
 }

 Thanks

 Lori

 ___
 Perl-Win32-Users mailing list 
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





reading/writing to a ascii file

2003-10-28 Thread Farrington, Ryan
Title: reading/writing to a ascii file





Ok guys here is the pickle I'm in now =-) I need to read from a ASCII file and only modify the lines that match a variable.

I do not want to read the entire file into memory and write the entire file out each time I need to make a change.


Here is what I am doing that reads the entire file and re-writes the entire file:



$var1 = '106253498';
open(FILE, my.file);
@file = FILE;
close(FILE);
open(FILE, my.file);
chomp @file;
foreach my $line (@file){
 if ($line =~ /^$var1\|/){
  #do my data changes
  $line = asdf1234;#where asdf1234 is my changes
 }
 print FILE $line . \n;
}
close(FILE);



Can anyone offer a suggestion? My issue is that the data that is coming in is x length (where x is a dynamic space) and the value I am writing back to the line can be a max of x+10 and a min of x-10.. 




RE: reading/writing to a ascii file

2003-10-28 Thread Farrington, Ryan
Title: RE: reading/writing to a ascii file





That is still opening and reading the entire file and then creating an entire new file... I may run into instances where the file will be opened and modified many times.

-Original Message-
From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 28, 2003 9:53 AM
To: 'Farrington, Ryan'; [EMAIL PROTECTED]
Subject: RE: reading/writing to a ascii file



Ryan, it's easier than you think:


open(IN, $inputfile) or die can't open $inputfile: $!;
open(OUT,$outputfile) or die can't open $outputfile: $!; while (IN){
 s/$string/$replacement/g;
 print OUT $_;
}
close IN;
close OUT;
rename($outputfile, $inputfile) or die can't rename... $!;



-- 
Mark Thomas [EMAIL PROTECTED]
Internet Systems Architect User Technology Associates, Inc.


$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;






RE: Getting the full cgi parameter string...

2003-10-27 Thread Farrington, Ryan
Title: RE: Getting the full cgi parameter string...





Seth,
 Do you need the get or the post? If you want to output all the variables that become available when you run a script in cgi just parse the %ENV hash that should give you all the info you need.

-Original Message-
From: KING,SETH (HP-Boise,ex1) [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 27, 2003 12:19 PM
To: '[EMAIL PROTECTED]'
Subject: Getting the full cgi parameter string...


I need to retrieve the full parameter string passed to a cgi to then do a
URL-decoding on it. Pls help!!


Seth King
Programmer Analyst
Hewlett-Packard Boise Site
The Network Group
396-3645

___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Killing a process on a win32 box

2003-08-14 Thread Farrington, Ryan
Title: RE: Killing a process on a win32 box





BTW... Here is a good tutorial for that kind of thing
http://gsu.linux.org.tr/oreilly/perl/sysadmin/ch04_02.htm


Thanks OREILLY


-Original Message-
From: Kris Wolff [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 12, 2003 12:07 PM
To: [EMAIL PROTECTED]
Subject: Killing a process on a win32 box



Hi all, 


does anybody know, how can i kill a process by its ID on a win2000 
or xp box ? 



Thanx in advanced. 




Kris Wolff
Application Developer
dietzk. Interactive OHG
Am Kirchplatz 41-43
D-65779 Kelkheim
Fon +49 (0) 6195 72 42- 15
Fax +49 (0) 6195 72 42- 29
[EMAIL PROTECTED]
http://www.dietzk.de


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: CGI Script permissions to call scripts on another server

2003-08-06 Thread Farrington, Ryan
Title: Message



Michael,
 The user that apache runs as is the user you need to give 
access to that share... ex: my machine runs apache as a domain account. If I 
give that user access to a network share I can access the files in 
it...



-Original Message-From: Rafala, Michael 
[mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 12:48 
PMTo: [EMAIL PROTECTED]Subject: 
CGI Script permissions to call scripts on another server
I've got a CGI network permissions problem I've got 
to solve, and I'm wondering if I can do it from within my CGI script (or any 
other way):
A Perl CGI script (Win32/Apache) calls a .bat file. 
I've tried putting the .bat file in various places: 
-- This works fine if the .bat file is in the same 
folder as the cgi script: 
system( 'test.bat' ); 
-- This works fine too (c:\ is the root of 
the host machine): 
system( 'c:\myfolder\test.bat' ); 
-- But this doesn't work: 
system( '//AnotherServer/myfolder/test.bat' 
); 
The apache error log shows a "permission 
denied" message for the client IP address (the ip of the person making the cgi 
call). 
When I change permissions on 
//AnotherServer/myfolder to include "Everyone", the batch file runs. 
The problem is, my systems administrator 
won't be thrilled to see that "Everyone" group there. Is there a way to have my 
CGI script log on as a specific user (with permissions) before making the 
system() call? Or some other solution?
Setting an Apache ScriptAlias doesn't seem to 
help. 
I'm afraid I'm not much of a network guy, so 
I hope this makes sense. 
Michael Rafala Cadmus Professional Communications [EMAIL PROTECTED] 410-691-6445 410-691-6939 
fax 


RE: Win32::ODBC Question

2003-08-01 Thread Farrington, Ryan
Title: RE: Win32::ODBC Question





I think the best way to do this would be to hit the registry and look at ODBC.ini 


-Original Message-
From: Martin, Stanley G [GMG] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 01, 2003 10:50 AM
To: perl-win32-users (perl-win32-users)
Subject: Win32::ODBC Question



I have to move a ton of ODBC Connections from one box to another and was wondering if in this module there is a way to get all the attributes for a particular ODBC Connection so that I can turn around and insert it onto the other. I have Dave Roth's Standard Extensions book, but can't find anything that pulls all this info out, just how to put it in.

Stanley G. Martin
System Administrator
Sprint - EIS3 Customer Care 
[EMAIL PROTECTED]





___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Page generation tweeking

2003-07-23 Thread Farrington, Ryan
Title: RE: Page generation tweeking





Thanks to $Bill for the help... his solution actually made it generation of the page quicker =) below is the final solution:

my @array = qw(102345 102356 102375);
my $count = '';
my $output_htmlvar = '';
fopen(FILE, $memberdir/memberlist.txt);
My @memberlist = FILE;
fclose(FILE);


foreach my $stuffs (@array){
 fopen(MAILDATA, $stuffs.mail);
 my @notify = MAILDATA;
 fclose(MAILDATA);
 chomp(@notify);
 my %notify = map { $_ = 1 } @notify;
 $output_htmlvar .= select name='name' multiple size='3';
 foreach my $curmem (sort @memberlist) {
  $curmem =~ s/[\n\r]//g;
  FormatUserName($curmem);
  #$tmp_error .= checking $curmem with the value of  . $notify{$curmem} . br\n;
  if(exists $notify{$curmem}){
   $output_htmlvar .= qq~option selected value=$curmem$curmem/option~;
   $count++;
  } else {
   $output_htmlvar .= qq~option value=$curmem$curmem/option~;
  }
 }
 $output_htmlvar .= /select;
}
print $output_htmlvar . \n;
-Original Message-
From: Farrington, Ryan [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 23, 2003 9:41 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Page generation tweeking



Ok I have a page that reads 2 files into arrays. Pretty simple stuff like this: 
 open(FILE, file1.txt); 
 @file1 = FILE; 
 close(FILE); 
 
 open(FILE, file2.txt); 
 @file2 = FILE; 
 close(FILE); 
Now file1 contains a complete list of users. And file2 contains a list of specific users. What I really want in the long run is to output the complete user list into a select/select form on a webpage... Below is what I currently have:

--- CODE --- 
 $count = 0; 
 MEMBER:foreach my $curmem (@memberlist) { 
 $curmem =~ s/[\n\r]//g; 
 my $there = 0; 
 NOTE:foreach my $note (@notify){ 
 $note =~ s/[\n\r]//g; 
 if($note eq $curmem){ 
 $there = 1; 
 last NOTE; 
 } 
 } 
 if($there){ 
 $memberlist_htmlvar .= qq~option selected value=$curmem$curmem/option~; 
 } else { 
 $memberlist_htmlvar .= qq~option value=$curmem$curmem/option~; 
 } 
 } 
--- END CODE --- 
Now my problem is this: the above code works fine when I have to write it 3-4 times. But when I have it being written more then that the page slows down drastically. Ideally what I would like is a single variable that generates the option list once then have some dynamic way of checking it against the @notify array and marking it selected if it exists. BTW each time I get to the notify section I have to read a different file depending on where I am at in the loop. So the memberlist stays constant and the notify is dynamic. Ex:

--- bad code no flames =)--- 
##before initial loop starts generate the member list with a variable I want filled in when I make reference to the variable

foreach my $curmem (@memberlist) { 
 $curmem =~ s/[\n\r]//g; 
 $memberlist_htmlvar .= qq~option $hash{$curmem} value=$curmem$curmem/option~; 
} 
##during loop 
 %hash = (); 
 NOTE:foreach my $note (@notify){ 
 $note =~ s/[\n\r]//g; 
 $hash{$note} =  selected ; 
 } 
 Print $memberlist_htmlvar; # I would like this to output the memberlist_htmlvar but have the $hash{$curmem} 
 #filled in with the new variables 



Anyone have thoughts? 





Page generation tweeking

2003-07-23 Thread Farrington, Ryan
Title: Page generation tweeking





Ok I have a page that reads 2 files into arrays. Pretty simple stuff like this:
 open(FILE, file1.txt);
 @file1 = FILE;
 close(FILE);
 
 open(FILE, file2.txt);
 @file2 = FILE;
 close(FILE);


Now file1 contains a complete list of users. And file2 contains a list of specific users. What I really want in the long run is to output the complete user list into a select/select form on a webpage... Below is what I currently have:

--- CODE ---
 $count = 0;
 MEMBER:foreach my $curmem (@memberlist) {
  $curmem =~ s/[\n\r]//g;
  my $there = 0;
  NOTE:foreach my $note (@notify){
   $note =~ s/[\n\r]//g;
   if($note eq $curmem){
$there = 1;
last NOTE;
   }
  }
  if($there){
   $memberlist_htmlvar .= qq~option selected value=$curmem$curmem/option~;
  } else {
   $memberlist_htmlvar .= qq~option value=$curmem$curmem/option~;
  }
 }
--- END CODE ---


Now my problem is this: the above code works fine when I have to write it 3-4 times. But when I have it being written more then that the page slows down drastically. Ideally what I would like is a single variable that generates the option list once then have some dynamic way of checking it against the @notify array and marking it selected if it exists. BTW each time I get to the notify section I have to read a different file depending on where I am at in the loop. So the memberlist stays constant and the notify is dynamic. Ex:

--- bad code no flames =)---
##before initial loop starts generate the member list with a variable I want filled in when I make reference to the variable

foreach my $curmem (@memberlist) {
 $curmem =~ s/[\n\r]//g;
 $memberlist_htmlvar .= qq~option $hash{$curmem} value=$curmem$curmem/option~;
}
##during loop
 %hash = ();
 NOTE:foreach my $note (@notify){
  $note =~ s/[\n\r]//g;
  $hash{$note} =  selected ;
 }
 Print $memberlist_htmlvar; # I would like this to output the memberlist_htmlvar but have the $hash{$curmem} 
  #filled in with the new variables



Anyone have thoughts?





RE: REWRITE RE: Error trapping

2003-07-18 Thread Farrington, Ryan
Title: RE: REWRITE RE: Error trapping





Grrr still didn't catch the error =(


-Original Message-
From: Burak Gürsoy [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 17, 2003 1:06 PM
To: [EMAIL PROTECTED]
Subject: RE: REWRITE RE: Error trapping



ok, try this one:


#!/usr/bin/perl -w
use strict;
BEGIN {
 $| = 1;
 $SIG{__DIE__} = sub


 my $msg = shift;
 EventLogger(PERL Service, error, 666, $msg\n\n);
 exit;
 };
}


# add your code here...



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Farrington, Ryan
Sent: Thursday, July 17, 2003 4:18 PM
To: '[EMAIL PROTECTED]'
Subject: REWRITE RE: Error trapping



Ok so now here is the stumper for me... I used
[code]
Local $SIG{__DIE__} = sub


 my $msg = shift;
 EventLogger(PERL Service, error, 666, $msg\n\n);
 exit;
};
[/code]
And it died again today but no event written =( if it dies in a module will this catch it?



-Original Message-
From: Burak Gursoy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 15, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: RE: Error trapping



it is $SIG{__DIE__} actually...
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Carl Jolley
Sent: Tuesday, July 15, 2003 7:39 PM
To: FARRINGTON, RYAN
Cc: [EMAIL PROTECTED]
Subject: Re: Error trapping



On Mon, 14 Jul 2003, FARRINGTON, RYAN wrote:
 Ok I have a perl script that has been compiled as an executable and is 
 running on a 2K server as a service. Now the problem is that it is 
 die'ing without generating an error. Is there anyway to trap the die 
 and then have it output it to a function before actually die'ing?

Have you tried to define a $SIG{DIE} subroutine?
 [EMAIL PROTECTED] Carl Jolley
 All opinions are my own and not necessarily those of my employer 



___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: How to edit an FTPed HTML page?

2003-07-11 Thread FARRINGTON, RYAN
Title: RE: How to edit an FTPed HTML page?





Example:


Computer 1 (your computer)
Script.pl
 |--- get file and store it in c:\temp



Computer 2 (their computer)
Script.pl
 |--- get file and store it in c:\temp



I don't see why it would download to your machine unless you have a UNC path somewhere


-Original Message-
From: ashish srivastava [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 11, 2003 9:38 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: How to edit an FTPed HTML page?



Hi
I am able to FTP the file to any local directory on 'MY Machine'. But the 
application should be such that any user can FTP the file to a fixed 
location on HIS m/c (say C:\Temp. I will make sure that all the users have 
this directory on their sys.). Then he should edit it and upload it. At present when other users download the file, it is getting downloaded to 

my dir (say C:\temp).


Ashish



From: FARRINGTON, RYAN [EMAIL PROTECTED]
To: 'ashish srivastava' [EMAIL PROTECTED], 
[EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: How to edit an FTPed HTML page?
Date: Fri, 11 Jul 2003 09:30:14 -0500

Ashish just make sure it saves it to a local drive. Ex: 
c:\temp\perl_ftp\your.html

-Original Message-
From: ashish srivastava [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 11, 2003 9:04 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: How to edit an FTPed HTML page?


Hi
Another doubt. My script is running on a server installed on my 
machine.
Now

when i FTP a file it will be downloaded to a particualr directory. But 
what when other people use this script? I want the file to be 
downloaded to their local machines and not on my machine.
How can i do this?

TIA
Ashish


 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: How to edit an FTPed HTML page?
 Date: Fri, 11 Jul 2003 10:00:52 +0100
 
 
 On 11/07/2003 08:13:32 perl-win32-users-admin wrote:
 
  Hi All
  
  My application needs to edit an HTML page which is located on a 
  remote server(UNIX). I can FTP the particular file to my local 
  directory, but
 can
 i
  open this file in Netscape Composer through a Perl script?
  
 
 Sure, system() should be able to do it:
 
 # assume file was FTPs to $localfilepath
 system( qq(c:/program files/netscape/netscape.exe -edit
 $localfilepath) );
 
 (adjust accordingly for netscape location and the correct switch for
 Composer)
 
 Note: this will block your script until you exit Composer.
 
 --
 Csaba Ráduly, Software Engineer, Sophos Anti-Virus
 Email: [EMAIL PROTECTED], Tel: 01235 559933, Web: 
 www.sophos.com Add live virus info to your website: 
 http://www.sophos.com/link/vfeed
 
 
 
 ___
 Perl-Win32-Users mailing list 
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_
Astrology can be fun. Find out for yourself. 
http://www.msn.co.in/Astrology/Astromagic/ With just a click!

___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_
Polyphonic ringtones. Latest movie trailors. 
http://server1.msn.co.in/sp03/gprs/index.asp On your mobile!





RE: Re[2]: OH NOOO SPAM ATTACK!

2003-07-10 Thread FARRINGTON, RYAN
Title: RE: Re[2]: OH NOOO SPAM ATTACK!





John... The only problem with that solution is that is requires sendmail and A UNIX-like operating system what about us poor schmucks that #1 run a Microsoft OS and #2 don't have access to the mail server? =)

-Original Message-
From: John Mason Jr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 10, 2003 1:28 PM
To: 'Lee Goddard'
Cc: [EMAIL PROTECTED]
Subject: RE: Re[2]: OH NOOO SPAM ATTACK!





 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On 
 Behalf Of Lee Goddard
 Sent: Thursday, July 10, 2003 12:28 PM
 To: =James Birkholz=
 Cc: [EMAIL PROTECTED]
 Subject: Re[2]: OH NOOO SPAM ATTACK!
 
 
 Hi =James,
 
 On Thursday, July 10, 2003 at 3:42:24 PM, you wrote:
 
 JB This is not spam. It's a subscriber to this list who has made the 
 JB ill-advised choice to use a spam-blocking service.
 
 Why doesn't the service check the mail headers for the
 list or bulk setting and ignore such posts?
 
 And is there an open-source anti-spam program in perl?
 And if not, why not?
 
 (No, I'd rather not pay ActiveState.)




Links to setting up a antispam and antivirus open source server


http://linux-sxs.org/index2.html



And from the creator of mimedefang


http://www.roaringpenguin.com/mimedefang/


http://www.mimedefang.org 



I would also recommend checking out http://www.canit.ca
The commercial product based on mimedefang, it allowed me to get this up
and running very quickly and the tech support was awesome.



John Mason



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: download patches.

2003-07-08 Thread FARRINGTON, RYAN
Title: RE: download patches.





Janardhan,
 We are working on the same solution... The XML file from shavlik is a little better to play with but microsoft in their infinate wisdom allowed Shavlik to make the XML file so convoluted that it is almost imposible (from my side at least) to get the correct files... What I do is use the XML files from microsoft and shavlik to get the newest bulletins and then use code to compare what the server/workstation has against a hand coded standard. works ok for us..

-Original Message-
From: Molumuri, Janardhan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 07, 2003 11:09 PM
To: '[EMAIL PROTECTED]'
Subject: download patches.



Hi all,


Can we automatically download patches, by parsing HFnetchk output and XML
file.


Thanks,
--janardhan.


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: DBI Count Distict

2003-06-27 Thread FARRINGTON, RYAN
Title: RE: DBI Count Distict





I would use the SQL server to make the counts for me... or you could take the query then make a hash using the first three digits as the key and make the value increment... then you just hash through the hash (hehehe) and get your final count... 

-Original Message-
From: steve silvers [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 27, 2003 8:52 AM
To: [EMAIL PROTECTED]
Subject: DBI Count Distict



Quick question I'm calling out a column called data which looks like so:


001A
001B
002A
002D
003D
003E
004A
005


I need to get the count of all 001 and 002 and 003... so on where 001 = 2 
and 002 = and 004 = 1...


I have


$sql = SELECT Data FROM table;


while (($Data) = $sth-fetchrow_array) {


 print $Data \n;
}


Any help greatly appreciated.
Thanks in advance
Steve


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Creating interactive process on remote clients with WMI

2003-06-25 Thread FARRINGTON, RYAN
Title: RE: Creating interactive process on remote clients with WMI





truthfully a good way around this is to create the process as a scheduled job (using WMI) and make sure it is set to go off 1-2 mins ahead of the current time... we use it and from what I can tell a lot of Microsoft Certified Partners do the same tasks when dealing with remote installs and other processes that may require a interactive session on the remote machine... =) hope this helps

-Original Message-
From: Scott Campbell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 25, 2003 6:46 AM
To: 'Jangale V-S SPEL-TIT'; [EMAIL PROTECTED]
Subject: RE: Creating interactive process on remote clients with WMI



I have tried to do this, and emailed the forum, but with no reponse.
From all my reading of the msdn site, it appears that when creating
remote processes via WMI, they cannot be interactive, for security
reasons. If creating a process locally via WMI, it can be interactive.
Someone may correct me if I'm wrong, but this is where I ended up.


Scott Campbell
Senior Software Developer
Somix Technologies
http://www.somix.com




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
Jangale V-S SPEL-TIT
Sent: Wednesday, June 25, 2003 7:02 AM
To: '[EMAIL PROTECTED]'
Subject: Creating interactive process on remote clients with WMI



Dear All,


I am using W2K, SP3


I trying to launch a process on remote computer
using WMI. However this process need to interactive.


Following is my attempt


use Win32::OLE qw( in );
use Win32::OLE::Variant;


$Machine = . unless( $Machine = shift @ARGV );
$Machine =~ s#^[\\/]+## if( $Machine =~ m#^[\\/]{2}# );
$CLASS = WinMgmts:{impersonationLevel=impersonate}!//$Machine;
$WMI = Win32::OLE-GetObject( $CLASS ) || die Unable to connect to
$Machine: . Win32::OLE-lastError();


$PROCESSSTARTUP = $WMI-Get(Win32_ProcessStartup)-SpawnInstance_;


$PROCESSSTARTUP-{WinstationDesktop} = winsta0\\default;
$PROCESSSTARTUP-{ShowWindow} = 1;


print $PROCESSSTARTUP-{WinstationDesktop}\n;


$Process = $WMI-Get( Win32_Process ) || die Unable to get the
process
list: . Win32::OLE-LastError();


$vPid = Variant( VT_I4 | VT_BYREF, 0 );
$test =join(  , @ARGV );
if( 0 == $Process-Create( join(  , @ARGV ), undef, $PROCESSSTARTUP,
$vPid
) )
{
 print Process successfully created with PID $vPid\n;
}
else
{
 print Failed to create process.\n;
}



However, the process created on remote desktop is not interactive !


How can I make the process interactive ??



With Best Regards,


V.S. Jangale


___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Changing Default Gateway

2003-06-25 Thread FARRINGTON, RYAN
Title: RE: Changing Default Gateway





you could use WMI if you are working with a WIN32 system... but if your hitting an NT 4 box it will not take effect until the next reboot =)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 25, 2003 10:34 AM
To: Wingfield, Nancy
Cc: '[EMAIL PROTECTED]';
[EMAIL PROTECTED]
Subject: Re: Changing Default Gateway




I think you should be able to use the route command line program. You'll
have to do a route DELETE of the default entry and then route ADD
for the new way out. You can use route PRINT to get a look at your
current routing table.
--
Nick Ayoub
[EMAIL PROTECTED], [EMAIL PROTECTED]
IS - Systems and Operations, TEL 480-792-7275, FAX 480-792-4054
Microchip Technology, 2355 W. Chandler Blvd., Chandler AZ 85224-6199
http://www.microchip.com




|-+---
| | Wingfield, Nancy |
| | [EMAIL PROTECTED] |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | veState.com |
| | |
| | |
| | 06/25/2003 12:18 PM |
| | |
|-+---
 ---|
 | |
 | To: '[EMAIL PROTECTED]' |
 | [EMAIL PROTECTED] |
 | cc: |
 | Subject: Changing Default Gateway |
 ---|





Hi Discussion Group,
I'm wondering if anyone knows whether it is possible to change the default
gateway, and not have to reboot in order for the changes to take effect...I
figured out how to change the default gateway, but I have to reboot before
the changed default gateway is used.
Anyone have any ideas??
Thanks,
Nancy Wingfield
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs






___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Displaying a status bar

2003-06-25 Thread FARRINGTON, RYAN
Title: RE: Displaying a status bar





I don;t think there is really a way unless u use a flash front end to start the perl script running then take the output from the perl script and use that to make your determination... flash has some kewl content tools... =)

-Original Message-
From: Hsu, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 25, 2003 1:06 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Displaying a status bar



Hello,


Can someone let me know of a method of displaying a status bar on
screen(html) in Perl script while it is processing a task. I have tried to
print html, but it won't display the image until it has finished processing,
and then it displays with the rest of the information. _javascript_ is an
option, but if the status screen is selected into the background, it will
never close.


Thanks,
David
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: how to match the last line in a file

2003-06-19 Thread FARRINGTON, RYAN
Title: RE: how to match the last line in a file





could you not also do 
open(FILE, file_for_read.txt);
@array = FILE;
$last_line_number = $#array;
$last_line = $array[$last_line_number];


??


you may have to add one or subtract one I can't remember =)



-Original Message-
From: Dave Crawford [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 19, 2003 2:58 PM
To: Grace Huang; [EMAIL PROTECTED]
Subject: Re: how to match the last line in a file



Do you only need the last line or are you processing each line of the file?
If you only need the last line you can use:


while (READIN) {
 $last = $_;
 }


# ... perform your match on $last here


-Dave


- Original Message - 
From: Grace Huang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 3:16 PM
Subject: how to match the last line in a file



Hi


I use while (my $line = READIN) {...} to read a file, how can I determine
if a line is the last line in the file since I need to match something in
the last line? Thanks.


Grace
--
Yiting (Grace) Huang
Bioinformatics Programmer
Peter Myler's Lab
Seattle Biomedical Research Institute
206-284-8846 ext. 373


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: MS SQL Server

2003-06-18 Thread FARRINGTON, RYAN
Title: RE: MS SQL Server





omg... linux people using MS SQL servers? shame on you... =)


-Original Message-
From: Andy Wardley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 18, 2003 10:15 AM
To: Matt Sergeant
Cc: [EMAIL PROTECTED]
Subject: Re: MS SQL Server



Matt Sergeant wrote:
 Anyone got any experience of doing MS SQL Server from mod_perl on Linux
 (via the FreeTDS drivers)?


Only a little, but I know that Simon Matthews ([EMAIL PROTECTED]) has done a 
lot. ISTR he switched from Postgres to SQL Server (from mod_perl 
front end, via FreeTDS) and hasn't looked back.


He has nothing but good things to say about SQL Server, and from the 
limited exposure that I'm getting to it now, I'd be inclined to agree.


A





RE: Why is PHP popular?

2003-06-06 Thread FARRINGTON, RYAN
Title: RE: Why is PHP popular?





Yes, I feel I know perl well enough to make money with it... Although my skill set it not dedicated to PERL it is just another language in the list. For me perl is a tool to assist in Server Administration and not a primary source for my income.

-Original Message-
From: Jim Schueler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 05, 2003 9:07 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Why is PHP popular?



OK. I've got my own newbie question: How can a Perl programmer with 
many years of Web development experience feed himself and his family?


In this post-DotCom-bust world, all of my potential business is jobbed to 
inhouse or agency Art Directors. Art Directors use programmers as a 
last resort. They live off those free throwaway scripts as much as they 
rely on stock photography (but without the royalties) and usually
discourage the customer from spec'ing anything more technically advanced.


In the interest of improving my appeal to the Art Director market, I'm
reconsidering my long-time practice of in-lining code. Art Directors hate 
inline code because the programmer controls the final deliverable.


So regarding Mr. Friberg's recommendation below, I'd be more interested in
an alternative to yet-another-scripting-language that does away with inline
code altogether. If there's enough interest, I can probably justify a 
reasonable investment of time. On the other hand, I'd be just as happy if
someone has an easy answer to the above question.


Jim Schueler
http://www.tqis.com/



Robert Friberg wrote:


 Hi all,

 I've had the sad opportunity to work with PHP on a
 few small projects.

 PHP as a language is seriously flawed, yet it
 is very popular and widespread. I believe this
 is due to the concept of inlining the code
 directly, as also with ASP and JSP.

 If the perl community had had an equivalent
 and pushed for it up front then a weed like
 php would probably never have emerged.

 I wonder if it's too late for that now?

 Apache::ASP is a candidate, www.apache-asp.org,
 but needs mod_perl so installation is too
 complicated for many.

 The installation should be a no-brainer:

 - Drop the .so/.dll into *this* directory
 - Add *these* 4 lines to httpd.conf
 - Put code between % % -tags in a file
 with a .psp extension

 mvh,
 #---
 # Robert Friberg perl,java,xml,uml,sql,delphi,
 # Systemutvecklare c/c++,vb,php,linux,apache
 # 0733-839080
 #
 # Ensofus AB linuxservrar,serverhosting,
 # www.ensofus.se internetsystem, Miljö Online
 #---

 ___
 ActivePerl mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


--
Even the safest course is fraught with peril.



___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



-- 


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





Apache::MP3

2003-05-30 Thread FARRINGTON, RYAN
Title: Apache::MP3





Has anyone gotten Apache::MP3 to run on Mod_perl 2?





MOD_PERL 2.0?

2003-05-30 Thread FARRINGTON, RYAN
Title: MOD_PERL 2.0?





just as a test I used the ALL in ONE package to get this installed and it works like a champ except for Apache::compat errors with something about line 68. =( I don't have the error infront of me but it is something like method not defined.




Couple questions (alarm(), nested loops)

2003-03-19 Thread FARRINGTON, RYAN
Title: Couple questions (alarm(), nested loops)





ok does ActiveState implement something like alarm() in the win32 version? 


and if I have nested loops:


foreach $var(@vars){


 foreach $stuff (@stuffs){


 }


}


how do I make the second loop force the first loop to go to the next instance. I know next works in the first loop but if I do that in the second it only affects the second loop =(




RE: [PHP-WIN] Force a user to download a text file from a link

2003-02-21 Thread FARRINGTON, RYAN
that requires some form of trust in the user... I experience too many stupid
people in what I do on a day to day basis and it is just easier if it forces
a download... 


typical user experience: I were a user and there was a link to a word
document that i wanted to edit. If I clicked on the link [and I had word
installed =)] it would open the file in my browser window and allow me to
edit it... but there is not toolbar for saving.. where are all my formatting
tools... oh no I've gotta call the person that put the link out because I
can't figure out what to do... help me ... BLAH!!! I hate people like that
so I force the download and they edit it locally and use the same page to
re-upload it.. it is just easier =)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 3:51 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link



Far be it from me to question the wisdom of tweaking the headers, but why do
you need them at all?
Why can't you just do:

a href =filename.txtclick here/a

which, so far as I can see, will load said text page into the user's browser
window as soon as they click on the link. If the user then wants to save it,
they can use the browser's Save As function.

Too easy?

Jill


-Original Message-
From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 2:22 PM
To: 'George Pitcher'; Matt Babineau; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link


you could also try this:
or this 
or this 



RE: [PHP-WIN] Force a user to download a text file from a link

2003-02-20 Thread FARRINGTON, RYAN
you could also try this:

header(Content-Type: application/octet-stream); 
header(Content-Type: application/force-download); 
header(Content-Disposition: attachment; filename=$name); 
header(Content-Transfer-Encoding: text); 



or this 

header( Content-type: application/octet-stream ); 
header( Content-Disposition: attachment; filename=$skeleton_name.skl ); 
header( Content-Length: $filesize ); 
echo $file_contents; 

or this 


$size=filesize(urfile);

header(Content-Type: application/octet-stream);
header(Content-Length: $size);
header(Content-Disposition: attachment; filename=urfile_name.mp3);
header(Content-Transfer-Encoding: binary);
$fh = fopen(urfile_name, r);
fpassthru($fh);





they all work for me =) I know I should pick one and stay with it but I get
bored =)

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 10:33 AM
To: Matt Babineau; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link


Matt,

You should NEVER force a download on anyone. How do they know it isn't
carrying a virus.

What you should do is to send the headers that prompt a dialog box for Save
or Open (I'm sure you've seen this).

I'm not sure which headers you use for csv or txt files but I do this with
PDFs all the time.

?php
$fpd = E:\\Pdf\\ . $fp . .pdf;
$len = filesize($fpd);
header(Content-Type: application/pdf);
header(Content-Disposition: inline; filename=$fpd);
header(Content-Title: $fpd);
header(Content-Length: $len);
readfile($fpd);
?

I suspect that you just need to change pdf to text in the Content-Type line.

Using the above script will always save the file as  (scriptname.pdf)
so I've been a bit creative and when my user is heading towards a document,
an appropriately named script containing  the above script is created
on the fly and called to handle the download. It is then deleted when
they confirm downloading.

The rest of my site uses Lasso so there's no point showing how those parts
work.

HTH

George

 -Original Message-
 From: Matt Babineau [mailto:[EMAIL PROTECTED]]
 Sent: 19 February 2003 4:24 pm
 To: [EMAIL PROTECTED]
 Subject: [PHP-WIN] Force a user to download a text file from a link


 How can I force a download of a TXT file from a Link? Or an Excel CSV
 file? using PHP of course too. I am running PHP 4.3 on W2K. Are there
 any tutorials for this?

 Thx-

 Matt



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] php defining variable defaults?

2003-02-13 Thread FARRINGTON, RYAN
ok cold fusion has the ability to do a cfparam name='' default='' 

this lets you specify a variable name to be defaulted to a value if it is
called without being defined. I usually use this for variables specified by
forms either by GET or POST.  now I can't find it's equivalent in PHP.. can
anyone direct me in the correct direction?




RE: [PHP-WIN] php defining variable defaults?

2003-02-13 Thread FARRINGTON, RYAN
that is exactly what I was looking for!!! =) Thank you very much!

-Original Message-
From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 4:21 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] php defining variable defaults?


You could do

   if(!isset($var)) $var = 'asdf';

Or if you're using a function, you can specify default values in the
parameter list:

   function my_func($var1 = 'default1', $var2 = 'default2') {
  // do stuff
  // do stuff
   }

Matt

|-Original Message-
|From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]] 
|Sent: Thursday, February 13, 2003 4:12 PM
|To: '[EMAIL PROTECTED]'
|Subject: [PHP-WIN] php defining variable defaults?
|
|
|ok cold fusion has the ability to do a cfparam name='' default='' 
|
|this lets you specify a variable name to be defaulted to a 
|value if it is called without being defined. I usually use 
|this for variables specified by forms either by GET or POST.  
|now I can't find it's equivalent in PHP.. can anyone direct me 
|in the correct direction?
|
|



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Win32::OLE 5.6?

2003-01-30 Thread FARRINGTON, RYAN
Title: Win32::OLE 5.6?





has anyone seen the following error when trying to connect to a database using a connect string? the connection works for something like 50 connections then dies then comes back eventually... Any ideas?



OLE exception from Provider:


Unspecified error


Win32::OLE(0.1403) error 0x80004005: Unspecified error





RE: Daemon example

2003-01-29 Thread FARRINGTON, RYAN
Title: RE: Daemon example





win32::daemon::simple required you to be able to use win32::daemon as well... daemon has to be installed as a package =(

-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 10:25 AM
To: FARRINGTON, RYAN
Cc: [EMAIL PROTECTED]
Subject: RE: Daemon example



From: FARRINGTON, RYAN [EMAIL PROTECTED]
 here is what I get when I try to install the win32::daemon on 5.8
 
 Error installing package
 'http://www.roth.net/perl/packages/win32-daemon.ppd': R
 ead a PPD for 'http://www.roth.net/perl/packages/win32-daemon.ppd',
 but it is no t intended for this build of Perl
 (MSWin32-x86-multi-thread-5.8)


I said:

 I'm using it (though via Win32::Daemon::Simple) with 5.8 (build 804)
 with no problems. You can install it with PPM from
 http://Jenda.Krynicky.cz/perl


Try


ppm install http://Jenda.Krynicky.cz/perl/Win32-Daemon.ppd


Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
 -- Terry Pratchett in Sourcery





RE: Daemon example

2003-01-29 Thread FARRINGTON, RYAN
Title: RE: Daemon example





ARG!!! WTF... why does that work and installing it from www.roth.net doesn't =(


-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 11:00 AM
To: [EMAIL PROTECTED]
Subject: RE: Daemon example



From:  FARRINGTON, RYAN [EMAIL PROTECTED]
 win32::daemon::simple required you to be able to use win32::daemon as
 well... daemon has to be installed as a package =(


Oh well ... I did NOT ask you to install Win32::Daemon::Simple !


What do you get if you run


 ppm install http://Jenda.Krynicky.cz/perl/Win32-Daemon.ppd


?


Jenda


= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
 -- Terry Pratchett in Sourcery


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Daemon example

2003-01-29 Thread FARRINGTON, RYAN
Title: RE: Daemon example





now I get:


Can't locate loadable object for module Win32::Daemon in @INC (@INC contains: d:
/perl/lib d:/perl/site/lib .) at xml_service.pl line 13





ARG... oh well... I'll work it off 5.6 and forget the threading stuff I'm trying to learn =)
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 11:00 AM
To: [EMAIL PROTECTED]
Subject: RE: Daemon example



From:  FARRINGTON, RYAN [EMAIL PROTECTED]
 win32::daemon::simple required you to be able to use win32::daemon as
 well... daemon has to be installed as a package =(


Oh well ... I did NOT ask you to install Win32::Daemon::Simple !


What do you get if you run


 ppm install http://Jenda.Krynicky.cz/perl/Win32-Daemon.ppd


?


Jenda


= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
 -- Terry Pratchett in Sourcery


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





Win32::OLE

2003-01-10 Thread FARRINGTON, RYAN
Title: Win32::OLE





ok I have a script that uses Win32::OLE(ADODB.Connection) to connect to a MSSQL 2K database server and I was just playing with the query analyser provided by Microsoft with the client components. When u run a query it returns (x) rows effected [or something like that] I would like to get this returned to the script. Anyone have ideas?




RE: Win32::OLE

2003-01-10 Thread FARRINGTON, RYAN
Title: Win32::OLE




the unfortunate thing about that is what 
happens when the row count is above 100mil [takes 
FOREVER =)], or your doing an 
update [no change] =( 

  -Original Message-From: Bullock, Howard A. 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, January 10, 2003 
  3:02 PMTo: 'FARRINGTON, RYAN'Subject: RE: 
  Win32::OLE
  
  You should execute 
  the following SQL to determine the row count before actually executing the SQL 
  to return data.
  
  Select count(*) from 
  ... 
  
  
  
  
  
  Howard A. 
  Bullock
  Global IT 
  Infrastructure
  717-810-3584
  
  -Original 
  Message-From: 
  FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 3:57 
  PMTo: 
  [EMAIL PROTECTED]Subject: Win32::OLE
  
  ok I have a script that uses 
  Win32::OLE(ADODB.Connection) to connect to a MSSQL 2K database server and I 
  was just playing with the query analyser provided by Microsoft with the client 
  components. When u run a query it returns (x) rows effected [or something like 
  that] I would like to get this returned to the script. Anyone have 
  ideas?


perl -w script ?

2002-11-19 Thread FARRINGTON, RYAN
Title: perl -w script ?





ok, So when I run perl -w load.pl I get the following... the script runs great but I was just surfing around and I found a perl scrits should always be run with -w ex: perl -w so I tried it and now i'm a little worried about the output =-( can anyone help me out?


line 5 is my script is 


use Win32::Lanman;




Subroutine SERVICE_ACCEPT_STOP redefined at d:/Perl/lib/Exporter.pm line 57.
 Exporter::import('NET_INFO_DESCRIPTION', 'NET_STATUS_DESCRIPTION', 'SERVICE_CONTROL_DESCRIPTIONS', 'SERVICE_STATE_DESCRIPTIONS', 'SERVICE_CONTROLS', 'SERVICE_START_TYPES', 'SERVICE_ERROR_TYPES', 'SC_FAILURE_ACTIONS', ...) called at load.pl line 5

 main::BEGIN() called at d:/Perl/site/lib/Win32/Lanman.pm line 5


 eval {...} called at d:/Perl/site/lib/Win32/Lanman.pm line 5
Subroutine SERVICE_ACCEPT_PAUSE_CONTINUE redefined at d:/Perl/lib/Exporter.pm line 57.
 Exporter::import('NET_INFO_DESCRIPTION', 'NET_STATUS_DESCRIPTION', 'SERVICE_CONTROL_DESCRIPTIONS', 'SERVICE_STATE_DESCRIPTIONS', 'SERVICE_CONTROLS', 'SERVICE_START_TYPES', 'SERVICE_ERROR_TYPES', 'SC_FAILURE_ACTIONS', ...) called at load.pl line 5

 main::BEGIN() called at d:/Perl/site/lib/Win32/Lanman.pm line 5
 eval {...} called at d:/Perl/site/lib/Win32/Lanman.pm line 5
Subroutine SERVICE_ACCEPT_SHUTDOWN redefined at d:/Perl/lib/Exporter.pm line 57.


 Exporter::import('NET_INFO_DESCRIPTION', 'NET_STATUS_DESCRIPTION', 'SERVICE_CONTROL_DESCRIPTIONS', 'SERVICE_STATE_DESCRIPTIONS', 'SERVICE_CONTROLS', 'SERVICE_START_TYPES', 'SERVICE_ERROR_TYPES', 'SC_FAILURE_ACTIONS', ...) called atload.pl line 5

 main::BEGIN() called at d:/Perl/site/lib/Win32/Lanman.pm line 5


 eval {...} called at d:/Perl/site/lib/Win32/Lanman.pm line 5





RE: Connection to MSSql

2002-11-18 Thread FARRINGTON, RYAN



below 
is the code I use to access a SQL 2K box. Make sure you are running MDAC 2.7 
otherwise you will run into problems. Please forgive the un-'l33t code... I'n 
not a PERL guru (yet) and if you want to assist in making the code 'l33t please 
give it a shot =)


use 
Win32::OLE;use Win32::OLE::Variant;use Win32::ADO;

my 
$Username = "uname";my $Password = "p455w0rd";my $Database = 
"database_name";my $DBServer = "SQLserver-test";

if(Connect("1") eq "Good"){
 #you are connected... do your 
thing
} else 
{
 #you errored out... look at the 
connect sub to find how to report it.
}



## 
Connect()purpose: To connect to a SQL server using 
ADODB.connection##returns: success or 
failuresub 
Connect{local ($count) = @_;local ($Status, $str) = 
"";$Conn = 
Win32::OLE-new("ADODB.Connection");$Conn-Open("Provider=SQLOLEDB.1;Password=$Password;Persist 
Security Info=True;User ID=$Username;Initial Catalog=$Database;Data 
Source=$DBServer");$str = 
Win32::OLE-LastError();if($str){@str = split(/\n/, 
$str);print FILE "$str[0]\n$str[1]\n$str[2]\n"; #prints to a log 
file...you know how to do that =)$Status = 
"Bad";} else {$Status = 
"Good"}

if($Status eq "Bad"){if($count 
= '3'){sleep 3;$Status = 
Connect($count+1);}}return 
$Status;}


RE: Source-Code-Protection

2002-10-31 Thread FARRINGTON, RYAN
Title: RE: Source-Code-Protection





Harald,
 Perl2exe http://www.indigostar.com is shareware but you can always use it to make executables... I use it for the same reason here at the office and I make sure I am the only person with access to the source... 

-Original Message-
From: Harald Wopenka [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 31, 2002 7:01 AM
To: Morbus Iff; [EMAIL PROTECTED]
Subject: AW: Source-Code-Protection



Jep, I know. I like Open-Source. But sometimes there are some people
grabbing your work and telling people its theirs... I cases like that some
protection comes in very handy...


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von
Morbus Iff
Gesendet: Donnerstag, 31. Oktober 2002 13:54
An: Harald Wopenka; [EMAIL PROTECTED]
Betreff: Re: Source-Code-Protection



I think its a common problem with Perlprogs that u cant hide your


That's a feature. Working around this feature will earn you scorn.


--
Morbus Iff ( now in fun bath toy! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Can't locate Date/Format.pm

2002-10-30 Thread FARRINGTON, RYAN
Title: Message



Mark,
 Here comes a stupid question. Did 
you extract it? If so it created a directory named 'TimeDate-1.1301' under that 
you'll see 2 directories and 4 files... you have 2 choices... you can either 
type the following:

perl 
makefile.pl
nmake
nmake 
test
nmake 
install

I've 
attached my version of nmake (you can find another if you don't trust me, also 
I've renamed it to .txt from .exe) 

or you 
can just be brave and just copy the files from /lib to the following 
locations

%perl_path%\site\lib\Time\Zone.pm%perl_path%\site\lib\Date\Format.pm%perl_path%\site\lib\Date\Language.pm%perl_path%\site\lib\Date\Parse.pm%perl_path%\site\lib\Date\Language\Austrian.pm%perl_path%\site\lib\Date\Language\Czech.pm%perl_path%\site\lib\Date\Language\Dutch.pm%perl_path%\site\lib\Date\Language\English.pm%perl_path%\site\lib\Date\Language\French.pm%perl_path%\site\lib\Date\Language\German.pm%perl_path%\site\lib\Date\Language\Italian.pm%perl_path%\site\lib\Date\Language\Norwegian.pm


or you 
could always find it on PPM

inside 
PPM type: 

search 
TimeDate
install TimeDate

and 
that will install a cut down version with only French as an alternate 
language.



  -Original Message-From: Ricci, Mark 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 30, 2002 10:09 
  AMTo: 'FARRINGTON, RYAN'; 
  '[EMAIL PROTECTED]'Subject: RE: Can't 
  locate Date/Format.pm
  Thanks, Ryan.
  
   I was able to download it. But what directory do you 
  install it in. 
   I copied it here:
   c:\perl\site\lib\
  
   and here:
   c:\perl\site\win32
  
   but I'm getting the same error about not being able to find 
  the pm.
  
  
  Mark
  
  

-Original Message-From: FARRINGTON, 
RYAN [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 
October 30, 2002 9:37 AMTo: 
'[EMAIL PROTECTED]'Subject: RE: Can't 
locate Date/Format.pm
http://search.cpan.org/author/GBARR/TimeDate-1.1301/ 
look at download 1/4 down the page... 
-Original Message- From: 
Ricci, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 30, 2002 8:20 AM To: '[EMAIL PROTECTED]' Subject: Can't locate Date/Format.pm 
Hello, 
 I can't seem to 
find this module: 
 use 
Date::Format; 
 Any pointers 
where it might be located? 
Thanks, Mark 
This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and/or 
privileged information. Any review, use, disclosure or distribution by persons or entities other than the 
intended recipient(s) is prohibited. If you 
are not the intended recipient, please contact the 
sender by reply and destroy all copies of the original message. 
Thank you. 
WordWave, Capturing the Power of the Spoken Word 
http://www.wordwave.com 
___ 
Perl-Win32-Users mailing list [EMAIL PROTECTED] To 
unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 
  
  This e-mail message is for the sole use of the 
  intended recipient(s) and may contain confidential and/or privileged 
  information. Any review, use, disclosure or distribution by persons or 
  entities other than the intended recipient(s) is prohibited. If you are not 
  the intended recipient, please contact the sender by reply and destroy all 
  copies of the original message.
  Thank you.
  WordWave, Capturing the Power of the Spoken 
  Word
  http://www.wordwave.com


RE: merging two tabseparated text files.

2002-10-29 Thread FARRINGTON, RYAN
Title: RE: Terrible at my logic



your 
data does not match with the info... =(

  -Original Message-From: Mohanty, Debi (MED, TCS) 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, October 29, 2002 
  12:46 PMTo: 
  [EMAIL PROTECTED]Subject: merging two 
  tabseparated text files.
  Hi,
   Please any one suggest how can I add two tabseparated text 
  files in to one tabseparated text file.
  
  In 
  the text file 1 and the text file2 One column is common to both the files. So 
  Is there any way by comparing the record no (which is present in both the 
  files), I will be generate a single file.
  
  As 
  per example :- 
  
  
  File 
  1:--
  
  Orig 
  Report #Author PhoneAuthor employee #Author 
  nameCustomer CountryOrig Created By 
  **1026921Y7317KAKIZAWA,TSUYOSHIJAPANKIDOKORO,MIYUKI1026922Y7677TAKAAKI,TOBEJAPANTAKAAKI,TOBE1026923843421EXPOSITO,JEAN-PIERREFRANCEEXPOSITO,JEAN-PIERRE102692414502ROULLEAU 
  DENISFRANCEROULLEAU,DENIS10269259PERRET, 
  DENISFRANCEPERRET, Denis10269269PERRET, 
  DENISFRANCEPERRET, Denis10269273290THOMAS, 
  JULIANUNITED KINGDOMThomas, 
  Julian10269282545MURTON,BOBIRELANDMURTON,BOB
  
  File2:-
  
  Orig 
  Report #Actions TakenProblem DescriptionInvestigation 
  SummaryValidation of EffectivenessTask 
  notes1026921Kanto U/S, Yokoyama-sanEOLOn 
  EchopacEOL*** NOTES FROM: KIDOKORO,MIYUKI *** 
  020701EOLSHR-02G-009EOL1026922EOLNeed the 
  evaluation EOLERROR 38 appeared. She checked the cassette 
  correctly mounted and tried theEOL(barak Jul.2,2002) Status to 
  EVAL.EOLEOLEOL1026923We must get 
  theEOLThe systeme can make only fluoro with the We have error 
  4A6B and the collimator board failed led (Michel Le Morvan, 02 
  July 2002) Deter*** NOTES FROM: LE_MORVAN,MICHEL *** 
  020708EOL1026924this type of power supply is no more 
  dc outputs on power supply*** NOTES FROM: KRISTOFFERSEN,JAN 
  *** 0207051026925Je pense qu'il serait preferable de realiser cette 
  operationEOLavant l'arrivee chez le client.Perte de temps durant 
  l'installation (Michel Le Morvan, 02 July 2002) Determined 
  *** NOTES FROM: "DDTs-to-CQA" *** 
  020702EOL102690this type of power supply is no more dc 
  outputs on power supply*** NOTES FROM: KRISTOFFERSEN,JAN *** 
  020705192345this type of power supply is no more dc outputs on 
  power supply*** NOTES FROM: KRISTOFFERSEN,JAN *** 
  020705
  Please help me on this issue.
  
  ThanksRegards
  Debi
  


RE: Terrible at my logic

2002-10-25 Thread FARRINGTON, RYAN
Title: RE: Terrible at my logic





Hari,
Joseph is hitting it on the head... *warning sloppy code ahead* the following code worked like a champ for me on all the provided inputs...


@str = (250 80707 13 294 8,
332 0 286 5 428 0,
332 0 286 5 428 0, 
414 9 428 0 797 ,
333 0 781 2 458 9 ,
414 01286 9 784 7 ,
280 9 428 0 281 0 ,
428 0 487 0 458 0 ,
486 797 ,
239 5 789 00 269 9 ,
239 5 789 00 269 9 ,
281 0 ,
250 82707 15 401 9 ,
486 286 9 250 00788 30787 2 ,
486 286 9 250 00788 30787 2 ,
707 0 788 20 340 ,
707 0 788 20 340 ,
788 20496 ,
788 20496 ,
812 20,
719 45781 2 ,
707 14788 21 414 9 355 8 344 1 ,
707 14788 21 414 9 355 8 344 1 ,
805 4 724 2 781 2 719 41,
788 30781 2 427 31820 8 ,
428 0 401 9 781 2 ,
239 0 787 2 998 3 427 31511 9 ,
894 1 788 29 599 0 716 99,
894 1 788 29 599 0 716 99);




foreach $str (@str){
 my $num = '6';
 for(my $i = 0; $i = 42; $i += 6) {
  if($i eq '18'){
   $num = '7';
  } else {
   $num = '6';
  }  
  print substr($str, $i, $num);
  unless($i eq '12'){
   print  ;
  }
  if ($i eq '18'){
   $i++;
  }
  
 }
 print \n;
}


-Original Message-
From: Krishna, Hari [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 10:37 AM
To: 'Sisyphus'; [EMAIL PROTECTED]
Subject: RE: Terrible at my logic



The length has no significance as far as I am concerned. But each set of
numbers belong to A line only.
So the length of each input line may vary.


Let me post how the input file looks like.


250 80707 13 294 8 
332 0 286 5 428 0 
332 0 286 5 428 0 
414 9 428 0 797 
333 0 781 2 458 9 
414 01286 9 784 7 
280 9 428 0 281 0 
428 0 487 0 458 0 
486 797 
239 5 789 00 269 9 
239 5 789 00 269 9 
281 0 
250 82707 15 401 9 
486 286 9 250 00788 30787 2 
486 286 9 250 00788 30787 2 
707 0 788 20 340 
707 0 788 20 340 
788 20496 
788 20496 
812 20
719 45781 2 
707 14788 21 414 9 355 8 344 1 
707 14788 21 414 9 355 8 344 1 
805 4 724 2 781 2 719 41
788 30781 2 427 31820 8 
428 0 401 9 781 2 
239 0 787 2 998 3 427 31511 9 
894 1 788 29 599 0 716 99
894 1 788 29 599 0 716 99



Here's how my output should look like:


250 80 707 13 294 8
332 0 286 5 428 0
332 0 286 5 428 0
414 9 428 0 797
333 0 781 2 458 9
414 01 286 9 784 7
280 9 428 0 281 0
428 0 487 0 458 0
486 797
239 5 789 00 269 9
239 5 789 00 269 9
281 0
250 82 707 15 401 9
486 286 9 250 00788 30 787 2
486 286 9 250 00788 30 787 2
707 0 788 20 340
707 0 788 20 340
788 20 496
788 20 496
812 20
719 45 781 2
707 14 788 21 414 9 355 8 344 1
707 14 788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 41
788 30 781 2 427 31820 8
428 0 401 9 781 2
239 0 787 2 998 3 427 31 511 9
894 1 788 29 599 0 716 99
894 1 788 29 599 0 716 99


But MY LOGIC GIVES ME THE FOLLOWING OUTPUT (Iam cutting an pasting from the
wordpad exactly as is..):


250 80 707 13 294 8 
 332 0 286 5 428 0 
 332 0 286 5 428 0 
 414 9 428 0 797 
 333 0 781 2 458 9 
 414 01 286 9 784 7 
 280 9 428 0 281 0 
 428 0 487 0 458 0 
 486 797 
 239 5 789 00 269 9 
 239 5 789 00 269 9 
 281 0 
 250 82 707 15 401 9 
 486 286 9 250 0 0788 3 0787 2 
 486 286 9 250 0 0788 3 0787 2 
 707 0 788 20 340 
 707 0 788 20 340 
 788 20 496 
 788 20 496 
 812 20 
 719 45 781 2 
 707 14 788 21 414 9 355 8 344 1 
 707 14 788 21 414 9 355 8 344 1 
 805 4 724 2 781 2 719 4 1
 788 30 781 2 427 3 1820 8 
 428 0 401 9 781 2 
 239 0 787 2 998 3 427 3 1511 9 
 894 1 788 29 599 0 716 9 9
 894 1 788 29 599 0 716 9 9



Hope this might help you guys to help me out with the problem.


Thanks a lot.


Regards,
Hari.





-Original Message-
From: Sisyphus [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 10:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Terrible at my logic




- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]



 Heres my input:

 486 286 9 250 00788 30787 2



This is different to the input you originally posted. (It is only 32
characters long.)


Just thought I'd pont that out in case it has a bearing on the solution to
this problem :-)


Cheers,
Rob


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Perl IDE..

2002-10-23 Thread FARRINGTON, RYAN
Title: RE: Perl IDE..





Komodo 1.1 is free!!! =) I'll see if I can find my download of it and then I'll send out a link to where u can download it =)

-Original Message-
From: David Kaufman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 23, 2002 9:17 AM
To: [EMAIL PROTECTED]; Stephen Gray
Subject: Re: Perl IDE..



Stephen Gray [EMAIL PROTECTED] wrote:
 Is there a favourite Perl IDE for Win 95... or are there too many to have a
 defined winner ??
 
 I'm just getting into Perl, so I just need the basics... also, code will
 only be executed on Windows. Interested in exploring how perl interacts
 with the o/s and ole.
 
 Thanks.


ActiveState Komodo is great: http://activestate.com/Products/Komodo/


...not free, mind you. but great. 


-dave
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: Perl IDE..

2002-10-23 Thread FARRINGTON, RYAN
Title: RE: Perl IDE..





I also found that PrimalScript is a good Perl editor =)


-Original Message-
From: Joao Vieira da Cunha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 23, 2002 9:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Perl IDE..



I've been using the OpenPerl IDE from SourceForge. It's not Komodo, but if 
you're just getting into perl, it's a good first step.


http://open-perl-ide.sourceforge.net/


Joao


MIT / Sloan


At 10:16 23/10/2002 -0400, you wrote:
Stephen Gray [EMAIL PROTECTED] wrote:
 Is there a favourite Perl IDE for Win 95... or are there too many to have a
 defined winner ??

 I'm just getting into Perl, so I just need the basics... also, code will
 only be executed on Windows. Interested in exploring how perl interacts
 with the o/s and ole.

 Thanks.


ActiveState Komodo is great: http://activestate.com/Products/Komodo/


...not free, mind you. but great.


-dave
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: msvc++ and environment variables

2002-10-08 Thread FARRINGTON, RYAN
Title: RE: msvc++ and environment variables





try set from a command prompt that will output every environment varible...


-Original Message-
From: Sisyphus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: msvc++ and environment variables



Hi,
Not strictly a perl issue but:


My vcvars32.bat file (which sets the environment for compilation) contains
some lines like these:
set path= various folders;%path%
set include= other folders;%include%
set lib = different folders;%lib%


I can get a listing of the folders in the path by simply entering 'path' at
a command prompt.


But both 'include' and 'lib' (when entered at a command prompt) are  not
recognized as an internal or external command, operable program or batch
file.


How can I obtain a listing of the folders in 'lib' and 'include' ?


This has been puzzling me for some time . thought I would have stumbled
over the answer by now . but I haven't
:-(


Cheers,
Rob


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





RE: [perl-win32-gui-users] System Administrator

2002-06-10 Thread FARRINGTON, RYAN
Here is your solution
Win32::PerfLib 


I've used it in the past and it works great for the applications I'm using
it in

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 09, 2002 11:32 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] System Administrator



I am a novice in Perl. pardon me if this is too basic.. 

i am trying to get the PerfMon statistics such as CPU utilization, Memory
Utilization. 

how can i do this? 


ravi 



[perl-win32-gui-users] Everyone's work

2002-06-04 Thread FARRINGTON, RYAN
I'm extremely interested to see what everyone has come up with... Does
anyone know a site that would be suitable for uploading our working
Win32::Gui applications for everyone to see... I have something simple but I
think people supporting a Win32 environment would think it useful as a tool
=)


[perl-win32-gui-users] eek! =)

2002-05-28 Thread FARRINGTON, RYAN
Using Win32::GUI and I'm having a problem with the program reporting to
windows that it is not responding. I know that it is because of the loop I
have the program in but I still want the user to work while I'm processing
in the background. I found a reference to $win-DoEvents() but as far as I
can see that works but it errors out with Use of uninitialized value in
subroutine entry at hotfix.pl line 172 Gah =( I'm starting to hate this...
I've looked at the archives but no search sucks =) Anyone have any ideas?


RE: [perl-win32-gui-users] eek! =)

2002-05-28 Thread FARRINGTON, RYAN
here is a sample break from the code starts on line 162 ends on line
185.
 
sub ::btnOpen_Click {
 defined(my $win = $Win32::GUI::Loft::window{winFileDisplay}) or return(1);
 my %file1 = $win-tvwTreeView()-ItemInfo(
$win-tvwTreeView-SelectedItem() ) or return(1);
 my $file = $file1{'-text'};
 $interface-execute('check_server', $file);
 until($interface-get_state eq 'fin') {
  my $void = $win-DoEvents();
  $win-pbProgressBar()-StepIt();
  sleep(1);
 }
 $win-pbProgressBar()-SetPos(0);
 my @return_value = $interface-get_retval;
 my $msg = ;
 foreach my $line (@return_value){
  $msg = $msg . $line;
 }
 $win-reFileSelected()-Text($msg);
 
 return(1);
}

-Original Message-
From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 8:48 AM
To: 'perl-win32-gui-users@lists.sourceforge.net'
Subject: [perl-win32-gui-users] eek! =)



Using Win32::GUI and I'm having a problem with the program reporting to
windows that it is not responding. I know that it is because of the loop I
have the program in but I still want the user to work while I'm processing
in the background. I found a reference to $win-DoEvents() but as far as I
can see that works but it errors out with Use of uninitialized value in
subroutine entry at hotfix.pl line 172 Gah =( I'm starting to hate this...
I've looked at the archives but no search sucks =) Anyone have any ideas?