Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jriggs420

  1. jriggs420

    array modification

    I think this question is best posed with an example: Here's a sample array: @array=qw( 11111 22222 33333 xxmeta xxdata ); There could be more, less, or no 'xx...', and the length of the array varies. Given that, how would I reference the last line in the array...
  2. jriggs420

    ls | vi shell script

    I've come up with a simple shell script that works, but I want to refine it a bit so maybe some others can use it. Basically, it allows to me open a file from certain directory regardless of my cwd: vi `ls /home/jriggs/dox/*"$*" `Lets me just enter last part of the file, and there it is. I...
  3. jriggs420

    Remove duplicates

    Nice code rharsh. Would you mind breaking down line 3 a bit more *** grep(!$temp{$_}++ ***? Reminds me of some japhs I've seen. I'm still trying grasp hashes, thanks- Because a thing seems difficult for you, do not think it impossible for anyone to accomplish. Marcus Aurelius
  4. jriggs420

    append to .htaccess file

    Thanks for the links guys. The module seemed a bit like overkill for what I was going for, but It's good to know about in case I ever get real creative with this. I was a slow day at work, so I went ahead and did the script I was talking about. I'd like to put it up here for any critiques you...
  5. jriggs420

    append to .htaccess file

    I have a relatively small, but aggravating problem on my apache server. Some script kiddie somewhere keeps trying to telnet into my server with a very crude brute force prog. I see it in my auth.log file as Jul 24 14:17:03 localhost sshd[4506]: Illegal user amanda from 218.202.223.244 Jul 24...
  6. jriggs420

    search replace text in textbox

    I'm pretty new to C#. Currently I am trying to work with Microsoft's 2005 Visual C# express. Here's what I'm trying to accomplish: 1) Browse to a word doc on my Computer 2) Read .doc into a text box 3) Do some modifications to the contents 4) ftp revised text in .txt format to my server I am at...
  7. jriggs420

    Using Open File Dialog Box

    Update: So after digging through the the help section I found this codeif(openFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK) // Load the contents of the file into a RichTextBox control: rtbData.LoadFile(openFile1.FileName, RichTextBoxStreamType.PlainText) Which works...
  8. jriggs420

    Using Open File Dialog Box

    Hi All, I'm totally new to OO programming, well more precisely microsoft .net style syntax. I recently downloaded Visual c# express, I want to learn, but am having a difficult time getting started. Mainly I think I'm searching the wrong terms. My first goal is to open a word doc in my...
  9. jriggs420

    simple perl search routine

    I'm using a text file to hold some information about files, like a mini-database (I know, I know). I'm trying to write a little sub-routine that will let the user enter 1, 2, OR 3 terms, and will return results arranged by relevence. Like m/($term1 AND $term2 AND $term3) then m/($term1 AND...
  10. jriggs420

    Kill a script

    Sorry, looking back, exit would have been the better choice of words. I was learning all about forking, so I had parents killing children on my mind when I wrote it. Still it's not too clear in my mind the difference between 'killing' a script and 'exit' they look to have the same net effect...
  11. jriggs420

    Kill a script

    Thanks for the reply Paul. I'm not sure I completely follow the example you've given. I think I wasn't specific enough in the OP. I'm basically looking for an alternative to 'ctrl+y' (linux), or ctrl+alt+del (windows). Killing the script in this manner seems sloppy/inefficient/dangerous???, so I...
  12. jriggs420

    Kill a script

    I'm looking for a way to kill a script on user input from the keyboard. I was originally trying to use a while loop, but that didn't really accomplish what I wanted (at least the the way I did it). Some folks over on the CB at perlmonks recommended using perl's fork function. I read the...
  13. jriggs420

    Script not showing created file

    Follow-up: In this directory I have 2 photos now, one is the thumbnail and the other is the actual fullsize jpg. I'm trying to create dynamic <a href's for the thumbs. the files are formatted as such: himom.jpg himom.jpg.thumb.jpg So, as I'm looping thru, img src should be 'himom.jpg.thumb.jpg...
  14. jriggs420

    Dealing with formatted array

    Sorry it took so long to get back. As I was reading through this thread again, I realized we weren't really addressing the issue I was have the *most* problems with. I'll try to detail it out again. I have two separate programs. One formats the input data, into a temporary file. The second goes...
  15. jriggs420

    Script not showing created file

    Of course, order of operations. Sometimes I lose the forest for all the trees, or is it the other way around? Thanks for the advice. Does anyone know a better way to write {print "<img src=\"\/uploads\/$file\" border=0 width=\"40\" height=\"40\"><br>";} I've not been able to get 'qw()' to work...

Part and Inventory Search

Back
Top