Search:

Type: Posts; User: roccivic; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    3,941

    Re: Beginners programming challenge #24

    My entry in PERL:


    #!/usr/bin/perl -s
    use warnings;

    # Buffer the input here
    my $buffer;

    # Function to process the buffer and output statistics
  2. Re: PHP/HTML Newbies: find out if there is no frame or target?

    +1 for what gingerkid said.

    If you really want to keep using the frames, try something along these lines:

    Start a session in the main window and assign a random string to a session variable....
  3. Replies
    4
    Views
    776

    [SOLVED] Re: php explode? or do something else?

    Do what?

    You want to print all members that are attending the party? Ok, but why would explode() leave you with only one? Explode will merely make an array for you from a string, it's your job to...
  4. Replies
    8
    Views
    380

    [SOLVED] Re: About PHP Errors

    Apache handles PHP errors. Open a terminal and execute:


    sudo gedit /etc/php5/apache2/php.ini

    Search for "display_errors" directive (it may be there more than once) and set it to "On" in every...
  5. Replies
    5
    Views
    832

    [SOLVED] Re: HTML/Javascript - Saving files

    The quick answer here is: no and no. JS or any other client-side scripting languages cannot write to files directly AFAIK. So you'll need a server for this.

    Anyway, where do you want to save this...
  6. Replies
    6
    Views
    318

    Re: A efficient SQL way to do this?

    Databases are not supposed to be able to do cross columns ordering. If you find yourself in a situation where you have to, it's probably because you made a design error at some earlier stage. That...
  7. Replies
    8
    Views
    1,162

    Re: PHP Globals and Values

    This seems much more intuitive to me, consider that I figured it would just substitute the text '/var/www' directly for the $_SERVER['DOCUMENT_ROOT'].

    What is the '.' for and why does it have to...
  8. Replies
    35
    Views
    1,540

    Re: How would one create this simple program?

    Python is actually cross-platform and is available for Win, all sorts of Unices (including probably all linux distros) and Mac.
  9. Replies
    7
    Views
    639

    [SOLVED] Re: Get author name of files / folders

    Well the user may not be necessarily the same as the group. A user 'foo' may be easily in group 'bar' or even 'root'.

    A small snippet from my terminal to illustrate the point:
    ...
  10. Replies
    35
    Views
    1,540

    Re: How would one create this simple program?

    That's what you pay programmers to do. Besides these are linux forums, so it's inappropriate to be asking for a windows only solution here.
  11. Replies
    1
    Views
    2,432

    Re: XAMPP Apache + php_xmlrpc

    You installed XAMMP from a tarball, right? Maybe you have another copy that you obtained through apt? If so:

    sudo apt-get remove apache2
  12. Re: PHP wont show errors in development stage! HELP!

    Change

    display_errors = off
    to

    display_errors = on

    (there can be multiple instances of that line in php.ini, if so change all)

    restart apache:
  13. Replies
    7
    Views
    352

    Re: fulls stop, return

    What you want is the xsendkeycode command. You can install it with:

    sudo apt-get install lineakd

    Google for usage.
  14. Replies
    1
    Views
    720

    Re: phpMyAdmin error

    The usual fix for this is to clear the cookies in your browser and restart apache:


    sudo /etc/init.d/apache2 restart

    If you still have problems, try the PMA forums:...
  15. Re: First BASh Script Ever. Please Critique. :)

    Your script should fail when the commands that it executes fail. Try something along these lines:


    echo && echo "(NOW, UPDATING REPOSITORIES)" && yum check-update || echo "REPOSITORY UPDATE...
  16. Replies
    7
    Views
    352

    Re: fulls stop, return

    Open a terminal and execute this (use CTRC+C to quit):


    while true; do echo -n "."; sleep 1; echo ""; sleep 1; done

    or paste this into a text file, say "myscript.sh":


    #!/bin/bash
  17. Replies
    6
    Views
    632

    Re: Javascript insert HTML

    if you include jQuery (http://jquery.com/) in your page, then you can load content through ajax like this:


    <html>
    <body>
    <script type="text/javascript"...
  18. Re: Shell script to ping/see if port 80 is open?

    echo -n "GET / HTTP/1.0\r\n\r\n" | nc 127.0.0.1 80 || /path/to/emailing/script


    This will try to send a GET request to 127.0.0.1 at port 80, if there is no reply it will run the script found at...
  19. Re: elegant solution req'd for ugly ugly ugly awk sed sed hack

    Don't know perl or awk. But how about a PHP solution? Not a one-liner...

    First:

    sudo apt-get install php-cli

    Then save this as "foo.php":

    <?php
  20. Thread: Bash question

    by roccivic
    Replies
    6
    Views
    382

    Re: Bash question

    I don't know why your code doesn't work...

    But consider the following:


    #!/bin/bash

    for ((i=$1;i<$2;i++)); do
    mv $i $3
    done
  21. Replies
    31
    Views
    4,802

    Re: Beginner's Programming Challenge 18

    It was very difficult to pick a winner, as all entries were good.

    And the winner is....

    ... red_Marvin with his entry in PERL.


    #!/usr/bin/env perl # just tell bash that it...
  22. Replies
    31
    Views
    4,802

    Re: Beginner's Programming Challenge 18

    I'm supposed to be judging this, but I forgot about it. I'll try go through the entries ASAP.
  23. Replies
    31
    Views
    4,802

    Re: Beginner's Programming Challenge 18

    I had no idea, lol!
  24. Replies
    31
    Views
    4,802

    Beginner's Programming Challenge 18

    Hi all, as I am the winner of Beginner's Programming Challenge 17 I have the honour of bringing to you Beginner's Programming Challenge 18.

    This time the challenge involves some basic...
  25. Replies
    19
    Views
    3,560

    Re: Beginner's Programming Challenge 17

    I just exploited an XSS vulnerability on it, lol. :biggrin:
    But that doesn't count as hacking your server, right?

    You might want to change line 16, from:

    $string = trim($_GET['task']);...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4