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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: majorbiff
  • Order by date
  1. majorbiff

    Tricky sort problem

    The original plan was to sort the values in an array. Due to the fact that the values were paired it made it a bit harder. Converting the array to a hash was a side-effect of an easy solution. I had originally looked into sorting the values without needing a hash but a sort on a hash seemed the...
  2. majorbiff

    Tricky sort problem

    Sorry, that should be: sub orderPartA(){ my %orderHash = @_; my %temp=(); my @missing; foreach (keys %orderHash){ m/Q(\d+).2/; $temp{$1} = 1; } @missing=grep(! $temp{$_}, (1..21)); $orderHash{"Q$missing[0].2=null"} = "Q$missing[0].1=null" unless...
  3. majorbiff

    Tricky sort problem

    I just realised that the suggestions are not going to work. At the moment the hash is a conversion from the array, therefore the hash looks like this: key data Q1.2=qaz->Q1.1=bla Q2.2=mar->Q2.1=foo Q3.2=ehh->Q3.1=meh The key isn't "Qx.2" It is actually "Qx.2=zzz" This means that I...
  4. majorbiff

    Tricky sort problem

    Two great ideas. Thanks guys. Alchemy is easy with Perl! s/lead/gold/g;
  5. majorbiff

    Parsing HTML data

    Something like this should do: s|images/|http://www.mysite.com/images/|g; Usually you would use '/' for pattern matching/substitution but you can use pretty much any symbol you want. Alchemy is easy with Perl! s/lead/gold/g;
  6. majorbiff

    Tricky sort problem

    Hope you all had a good easter. I have an interesting problem. I have a list of 38 values that need to be sorted. At this point quite simple but it gets worse. The list is made up of pairs of values in the form 'Qx.1=zzz' and 'Qx.2=zzz' (where 'x' is a number from 1 to 20 and 'zzz' is a short...
  7. majorbiff

    Tricky SQL joining tables question

    I tinkered with inner join but couldn't quite get it to work properly. Your solution works perfectly, thanks. Alchemy is easy with Perl! s/lead/gold/g;
  8. majorbiff

    Tricky SQL joining tables question

    I have 3 tables that look sort of like this (only the relevant bits): table 1: mainitems itemid name table 2: itemparts id testID iname type count table 3: category id cat items.testID is a reference to tests.itemID items.type is a reference to category.id An item ('a test') in...
  9. majorbiff

    Add on graphics card disables integrated graphics card

    Standard PCI graphics cards (not PCIx) will generally not function with onboard video, therefore the BIOS will automatically disable it. However, I have seen it done once before with hacked drivers. It depends on the motherboard and the video card. So the short answer is, no. Alchemy is easy...
  10. majorbiff

    Date difference question

    At the moment, the date format is DD/MM/YYYY. I was intitially thinking of avoiding the date format all together and just storing epoch time. When a user makes a second entry (the other date to compare), the current epoch time is noted and the difference between the two values then converted...
  11. majorbiff

    Date difference question

    Hello all. Putting it simply, I need to find the number of days between two dates and do something if the days are < 30 and something else if days >= 30. The 'something' my script has to do is not important at the moment. I have been playing around with a few ideas but have been somewhat...
  12. majorbiff

    apache wont work on internet

    Im getting a timeout on that address. It gets to 'ATM3-0-0-1.ia4.optus.net.au' then dies. Alchemy is easy with Perl! s/lead/gold/g;
  13. majorbiff

    Weird issue with images in cgi-bin

    I have recently changed over to a new server with 2.0.54. It seems to be the default behaviour of Apache on the new server to try to excecute all files in a cgi-bin directory. In other words, Apache attempts to excecute all files, not just scripts. My old server has 2.0.43 and didn't have this...
  14. majorbiff

    apache wont work on internet

    I Configured my Default DMZ Server to 192.168.0.2, also." I wouldn't do that if I were you. Your port forwarding would be useless if you have a DMZ configured for the same IP address. A port forward to port 8888 on your machine would be fine. Are you just using http://29.98.163.181 to access...
  15. majorbiff

    How do I create a variable whose name depends on the value of another?

    You may want to read this: http://www.tek-tips.com/viewthread.cfm?qid=934985 Or this to save you time: http://perl.plover.com/varvarname.html Alchemy is easy with Perl! s/lead/gold/g;
  16. majorbiff

    How do I create a variable whose name depends on the value of another?

    Echch! Dynamic variable names. Someone give me a can opener, I think theres a can of memory pointers around here somewhere. Alchemy is easy with Perl! s/lead/gold/g;
  17. majorbiff

    Problem with sorting a hash

    Nice work ishnid, have a star. Thanks to KevinADC too. Many good ideas. The script doesn't have to be fast, but a Schwartzian Transform is a nice touch. Alchemy is easy with Perl! s/lead/gold/g;
  18. majorbiff

    Problem with sorting a hash

    Belay the previous. Ive got it solved: foreach (sort {(split(/,/,$emailList{$a}))[0] <=> (split(/,/,$emailList{$b}))[0]} keys %emailList){ $flatList .= "$_: $emailList{$_} <br>"; } Alchemy is easy with Perl! s/lead/gold/g;
  19. majorbiff

    Problem with sorting a hash

    I have a hash array that needs to be sorted. Problem is, I can't get the elements to sort themselves correctly as I can't just sort by the keys. My hash data looks like this: key value 12345678 123, 12:00 25/7/2005: myemail@dumpster.org 12345680 124, 12:01 25/7/2005...
  20. majorbiff

    Simple password only protection

    Interesting reading here: http://httpd.apache.org/docs-2.0/howto/htaccess.html Quote: In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be...

Part and Inventory Search

Back
Top