My entry in PERL:
#!/usr/bin/perl -s
use warnings;
# Buffer the input here
my $buffer;
# Function to process the buffer and output statistics
Type: Posts; User: roccivic; Keyword(s):
My entry in PERL:
#!/usr/bin/perl -s
use warnings;
# Buffer the input here
my $buffer;
# Function to process the buffer and output statistics
+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....
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...
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...
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...
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...
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...
Python is actually cross-platform and is available for Win, all sorts of Unices (including probably all linux distros) and Mac.
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:
...
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.
You installed XAMMP from a tarball, right? Maybe you have another copy that you obtained through apt? If so:
sudo apt-get remove apache2
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:
What you want is the xsendkeycode command. You can install it with:
sudo apt-get install lineakd
Google for usage.
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:...
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...
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
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"...
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...
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
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
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...
I'm supposed to be judging this, but I forgot about it. I'll try go through the entries ASAP.
I had no idea, lol!
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...
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']);...