www.webdeveloper.com

Search:

Type: Posts; User: Sixtease

Page 1 of 16 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    1,125

    Well basically you would place the script to the...

    Well basically you would place the script to the cgi-bin directory and set its execute and read permissions. Then make a HTML page with the form. The action attribute of the form should be the URL of...
  2. Replies
    4
    Views
    1,327

    Then I'd hook the deleting all invalid sessions...

    Then I'd hook the deleting all invalid sessions to requests: Whenever a request comes, before anything else is done, delete the old sessions. You may want to store the last time the check was done...
  3. Replies
    2
    Views
    875

    sub get_record { my $record = ; ...

    sub get_record {
    my $record = <DATA>;
    chomp $record;
    return $record
    }

    my @records_buf;
    while (my $record = get_record()) {
    push @records_buf, $record;
    if (@records >= 3)...
  4. Replies
    4
    Views
    1,327

    I would set up a cron job every minute that will...

    I would set up a cron job every minute that will delete all sessions with mod time older than 15000ms. And of course with each request, actualize the session mod time. Where is the catch? Or is there...
  5. Replies
    2
    Views
    694

    What? What language is this? :-) What is the...

    What? What language is this? :-) What is the relationship of the first lines (amb ...) with the line below (12-05-30 ...)?

    If you just want to extract the time (with colons stripped), and save the...
  6. Replies
    2
    Views
    635

    my ($before_img1, $img1, $after_img1) = $bc[2] =~...

    my ($before_img1, $img1, $after_img1) = $bc[2] =~ /(.*?)(<\s*img\b[^>]*>)(.*)/;
  7. Replies
    1
    Views
    600

    You can't do that with Perl. Ask Google about...

    You can't do that with Perl. Ask Google about JavaScript file system API to do that.

    Otherwise, try to follow a tutorial. Handling forms with Perl is a completely basic topic, covered a thousand...
  8. Replies
    2
    Views
    297

    You can do so using globs: my $variable =...

    You can do so using globs:


    my $variable = 'foo';
    {
    no strict 'vars';
    *$variable = sub { print "Foo!\n"; };
    }
    foo();
  9. Replies
    4
    Views
    391

    Here's how I do it: use Email::MIME; use...

    Here's how I do it:


    use Email::MIME;
    use Email::Sender::Simple;
    use Email::Sender::Transport::SMTP;
    sub _sendmail {
    my ($mail, $cfg) = @_;

    my $to = $mail->{to};
  10. Replies
    2
    Views
    179

    What you do is: for each line { add the line...

    What you do is:

    for each line { add the line to @urls; print the whole @urls array }

    Of course you end up with
    url1
    url1 url2
    url1 url2 url3

    The simplest thing were to move the printing...
  11. Replies
    5
    Views
    240

    Show me an example of the variable $user_remove...

    Show me an example of the variable $user_remove contains.

    If it has just the username (and that's the sufficient match criterion), then you can check if it's the last word on $line:

    $line =~...
  12. Replies
    5
    Views
    240

    one solution could be (assuming the users to...

    one solution could be (assuming the users to remove are in @users_remove array) to replace the loop with:
    LINE:
    foreach my $line (@file_lines) {
    foreach my $user_remove (@users_remove) {
    ...
  13. That's what you write in your regexp ^{\*+$...

    That's what you write in your regexp

    ^{\*+$
    ^: line start
    {: literal "{"
    \*: literal "*"
    +: repetition
    $: end of line
    So if there's anything else than just {******, the match fails.
  14. To me, it looks like your first regexp...

    To me, it looks like your first regexp substitution wipes out the whole content of $line. But it's hard to tell without knowing what's in the @file array.
  15. I'm too lazy to try and decipher what it should...

    I'm too lazy to try and decipher what it should do. Please, tell me what you expect the $cmd variable to contain, exactly.
  16. Yes, it's because to change the action property,...

    Yes, it's because to change the action property, you have to say: $('[name=mnu1]').prop('action', 'bt.cgi');
  17. Forget about Perl, this is purely a...

    Forget about Perl, this is purely a JavaScript/HTML problem.

    I suggest this: Link jQuery (add to your HTML head:
    <script...
  18. Well, without more context, it's difficult. I'd...

    Well, without more context, it's difficult. I'd need to see what's in the a and mnu1 variables. I'd suggest avoiding the use of global variables and if your project is not tiny and you need not save...
  19. Replies
    4
    Views
    1,211

    OK. I think you just need to separate separate...

    OK. I think you just need to separate separate things.

    1) Displaying images is a matter of HTML. There's no reason to involve Perl or any kind of scripting. So just go ahead and experiment with...
  20. Replies
    4
    Views
    531

    Check what scripting language your hosting...

    Check what scripting language your hosting program includes. If none, then you can use an external service, there should be plenty. Just google around.
  21. This is for the JavaScript forum. You do it...

    This is for the JavaScript forum.

    You do it this way: Create a string representation for the current filter (like the value of the option from the select tag), then store that to the fragment part...
  22. Replies
    3
    Views
    1,277

    Well, my first step would be to think of the data...

    Well, my first step would be to think of the data structures that would represent the state of the game. The game is represented by a field of 7x7 cells. A cell can be free, destroyed, occupied by...
  23. Replies
    3
    Views
    1,277

    Buddy, do your homework. Try to implement the...

    Buddy, do your homework. Try to implement the thing and when you get stuck, share your research and we'll help you get over the obstacles.
  24. Replies
    8
    Views
    1,215

    Well, to list a directory should not be a...

    Well, to list a directory should not be a problem. The glob function should help you with that. To download a directory, I'd probably just zip it and stream the zipped thing to the client.
  25. Replies
    5
    Views
    969

    Heh :-) Yes. The sorting function is a bit messy,...

    Heh :-) Yes. The sorting function is a bit messy, admitted. It sorts so that it is really "merged" from the two files. To sort it alphanumerically, it only gets simpler: just remove the sorting...
Results 1 to 25 of 377
Page 1 of 16 1 2 3 4
HTML5 Development Center



Recent Articles