Language:
switch to room list switch to menu My folders
Go to page: First ... 79 80 81 82 [83] 84 85 86 87 ... Last
[#] Wed Aug 17 2011 08:59:10 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

yet another one of my punny programming jokes corrected by someone who knows better than me...

 

#include <studio.h>

int main(void)

{

int count;

for(count=1;count<=500;count++)

printf("I will check my code jokes before posting.\n");

return 0;

}

 

-- 
Stephen D King
skpacman8629@gmail.com



[#] Wed Aug 17 2011 08:59:59 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

and i think i forgot a semicolon in there somewhere... Spot the Mistake, Round 2!



[#] Wed Aug 17 2011 11:10:07 EDT from wizard of aahz @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Ugh.. When I see '?' in code I still think Print.. Wow...

[#] Wed Aug 17 2011 11:27:29 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


skpacman:

That last bit looked right to me. I haven't tried compiling it, but it looks correct.

[#] Wed Aug 17 2011 14:39:20 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

the "Foxtrot" comic strip did one similar to my previous coding joke... that's where I got the idea.

http://cdn.svcs.c2.uclick.com/c2/efe56a705e32012ee3bf00163e41dd5b --or-- http://bit.ly/qU3CvM

 

-- 
Stephen D King
skpacman8629@gmail.com



[#] Wed Aug 17 2011 23:03:59 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

and i think i forgot a semicolon in there somewhere... Spot the
Mistake, Round 2!

There aren't any missing semicolons ...

... but I doubt there's any such header file as <studio.h>

[#] Thu Aug 18 2011 08:46:38 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

 



... but I doubt there's any such header file as <studio.h>

 

We actually used <studio.h> when I was programming C++ in high-school. I didn't fully understand programming at the time, so I knew absolutely nothing of that header's function. I was required to put it on all of my assignments and programs though...

-- 
Stephen D King
skpacman8629@gmail.com



[#] Thu Aug 18 2011 14:03:32 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Heh.. must have been a custom header. Normally, you'd include <stdio.h> if you wanted to write to standard i/o.

[#] Thu Aug 18 2011 16:06:56 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

even better... the foxtrot comic has <stdio.h> where as i typed <studio.h>...  another for off-by-one....

I either misstyped it or flashed back to my old days.

I looked through some old programming notes and my teacher wrote why we used studio. we ran a virtualized "studio" that handled the IO for the programs we wrote, just in case someone tried to write something malicious, so the headers were always studio.... interesting how one letter can mean a world of difference.

-- 
Stephen D King
skpacman8629@gmail.com



[#] Fri Aug 19 2011 09:50:11 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

That sounds fishy to me. I'll bet there was someone in that organization who really thought that "stdio" was a misspelling of "studio" rather than an abbreviation of "STanDard Input/Output" and created an alias for it, then came up with a lame explanation for it later.

[#] Fri Aug 19 2011 12:40:18 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

not likely... this was in my high-school C++ class....

-- 
Stephen D King
skpacman8629@gmail.com



[#] Fri Aug 19 2011 15:28:27 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

If you got a C++ in the class then perhaps programming would not be a good career choice for you.

[#] Fri Aug 19 2011 16:18:51 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

good one :)

I actually sucked at programming of any kind in those days, I was barely starting to use computers for more than just photo editing and word processing.

Nowdays, I'm doing good to figure out and manipulate someon elses' code... I can barely get beyond Hello World when writing my own.

Thus why my chosen career path is technical drafting. CAD/CAM systems are my favorite thing to mess with and that's how I get paid, and what I went to school for... but that's for a different topic. ;)

-- 
Stephen D King
skpacman8629@gmail.com



[#] Fri Aug 19 2011 16:58:15 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

not likely... this was in my high-school C++ class....

....yeah... and...?

[#] Fri Aug 19 2011 16:59:52 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

I find that screwing around with setup and software and reconfiguring things is a lot of fun when you don't spend all that time feeling guilty that you should better be using your powers to accomplish some programming task.

But I've gotten over that guilt and now I like repartitioning drives and trying things out in VMs.


But I still do so hate it when my hard drive dies.

[#] Sat Aug 20 2011 20:17:15 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


I loathe setup.

But then, I have a history with it that sorta gives me reason to hate it.

[#] Mon Aug 22 2011 09:28:25 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

*roflamao*

http://www.addedbytes.com/blog/if-php-were-british/

now... wheres davew? ;-)



[#] Tue Aug 23 2011 10:18:00 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

arg. im losing my mind trying to make a custom log file.

So, I'm running vBulletin 4.1.0 on one of my web servers and recently i've caught people on my admin panel that weren't supposed to be on there.

I want to log ALL access to ./admincp directory to a file that I can monitor elsewhere on my server.

I also want this to be either .htaccess or .php based...

Ideas?

-- 
Stephen D King
skpacman8629@gmail.com



[#] Tue Aug 23 2011 11:37:57 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

so... i got a script working that creates a line in a .log file every time it's accessed.... now i just have to find where in the massive amount of .php files in the admincp area of vbulletin to incorporate it... here's the code and file location..

CODE:

<?php
//define file name
$filename = './accesslog.log';
//save IP address to variable
if ($_SERVER['HTTP_CLIENT_IP'])
$visitorIP = $_SERVER['HTTP_CLIENT_IP'];
if ($_SERVER['HTTP_X_FORWARDED'])
$visitorIP = $_SERVER['HTTP_X_FORWARDED'];
if ($_SERVER['HTTP_X_FORWARDED_FOR']) // when behind proxy
$visitorIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
$visitorIP = $_SERVER['REMOTE_ADDR'];
//save access date and time to variable
$today = date("F j, Y, g:i a");
$content = $visitorIP . " , " . $today . "\n";
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $content) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($content) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
?>

 

File: http://forum.muvalhalla.com/admincp/acpaccess.php



[#] Wed Aug 24 2011 11:09:41 EDT from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

got it to, er.. work i guess.

Had to hook it a back-handed way since vBulletin does output buffering, you can't actually do an include() to a flat file, you have to find just the right plugin, hook spot, and code to get anything custom to show up.

I ended up making a custom plugin that detects if someone tries to log into the admin panel using one of the admin accounts, but fails. It then shows the to-be-hacker a message saying they'll be banned shortly, sends me an e-mail that has his IP address and other information, posts the IP and exact local timestamp to a log file, then waits for me to ban the person.

Working like a back-handed, slightly backwards, and half-assed charm :)

-- 
Stephen D King
skpacman8629@gmail.com



Go to page: First ... 79 80 81 82 [83] 84 85 86 87 ... Last