Results 1 to 19 of 19
Thread: ACG thread (Any Code Goes)
-
12-18-2007, 10:03 PM #1
ACG thread (Any Code Goes)
working on some nice code script routine, function? ran across some
free code online that you like and wanna share with us? post it here.
I start. any language does it... random pieces of code...
no more than 30 lines of code per post please...
-
12-18-2007, 10:06 PM #2
sending email out in PHP script:
<?php
$to = "sales@emailemail.com";
$subject = 'Name: ' . $_REQUEST['FullName'] . ', Company: ' . $_REQUEST['Company'];
$email = $_REQUEST['Email2'];
$message .= 'Name: ' . $_REQUEST['FullName'] . "\r\n\n";
$message .= 'Title: ' . $_REQUEST['Title'] . "\r\n\n";
$message .= 'Company: ' . $_REQUEST['Company'] . "\r\n\n";
$message .= 'Email: ' . $_REQUEST['Email2'] . "\r\n\n";
$message .= 'Message / Inquiry: ' . $_REQUEST['Comments'] . "\r\n\n";
$headers = "From: $email";
#getting ready to send this email out
$sent = mail($to, $subject, $message, $headers);
if($sent)
{
print "Your mail was sent successfully";
header( 'Location: contact.php?sent=1' ) ;
}
else
{print "We encountered an error sending your mail. Please notify support at: email@blahblah.com"; }
?>
-
12-18-2007, 10:10 PM #3
invoke the Quick Time plug-in to play a .mov file into a web page:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="380" height="330">
<param name="src" value="videos/myvideo1.mov">
<param name="autoplay" value="true">
<param name="controller" value="true">
</object>
-
12-18-2007, 10:17 PM #4
I wrote this funny way to write a "try catch" block in Java.
try
{
Kia(username);
}
catch(SlowException you)
{
throwOut(you);
}
-
12-18-2007, 10:29 PM #5
- Join Date
- Apr 2007
- Location
- Denton (Dallas)
- Posts
- 10,580
Silver- 2003 GTI 1.8T :(
im sick of code... i made a c in c/c++ class... irony i think not... i have a few simple programs written tho
-
12-18-2007, 10:30 PM #6
-
12-18-2007, 10:32 PM #7
QBasic, my wife wrote this lab... with a bit of my help
calculate downpayment on a loan, etc etc...
CLS
PRINT " Enter loan:"
INPUT loan
WHILE loan <> 0
IF loan > 100000 THEN
DP = .2 * loan
ELSE
DP = .15 * loan
END IF
PRINT "Down payment:", DP
PRINT " Enter loan:"
INPUT loan
WEND
END
-
12-18-2007, 10:42 PM #8
- Join Date
- Apr 2007
- Location
- Denton (Dallas)
- Posts
- 10,580
Silver- 2003 GTI 1.8T :(
#include <iostream>
//function main begins program execution
int main()
{
// variable declarations
int num1, num2, num3, num4, num5;//defines the numbers to be added later
int counter;//defines the while loop counter
int sum;//defines the sum to be output
cout << "Enter number 1: ";//accepts input num1
cin >> num1;
cout << "Enter number 2: ";//accepts input num2
cin >> num2;
cout << "Enter number 3: ";//accepts input num3
cin >> num3;
cout << "Enter number 4: ";//accepts input num4
cin >> num4;
cout << "Enter number 5: ";//accepts input num5
cin >> num5;
sum = num1 + num2 + num3 + num4 + num5;//calculates the sum of num1-num5
cout << "The sum is " << sum << endl;//outputs sum of num1-num5
return 0;// executes the program and output
} // end function main
-
12-18-2007, 10:43 PM #9
- Join Date
- Apr 2007
- Location
- Denton (Dallas)
- Posts
- 10,580
Silver- 2003 GTI 1.8T :(
was that simple enough?
-
12-18-2007, 10:43 PM #10
- Join Date
- Apr 2007
- Location
- Denton (Dallas)
- Posts
- 10,580
Silver- 2003 GTI 1.8T :(
that should prob be iostream.h but either way it works...
-
12-18-2007, 10:47 PM #11
cool... code matrix! random bits and bites here
-
12-18-2007, 10:49 PM #12
-
12-19-2007, 05:07 AM #13
- Join Date
- Nov 1999
- Location
- over here...
- Age
- 45
- Posts
- 25,709
[]D [] []V[] []D- 1999 trans am
CLS
PRINT"Hello!"
PRINT
PRINT"Send your money to Spaz so he can buy a turbo?"
INPUT"YES OR NO?:"
IF INPUT = NO THEN FORMAT C:
IF INPUT = YES THEN C : ENTER # # # # #...
-
12-19-2007, 05:26 AM #14Code:
int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. }
-
12-19-2007, 06:49 AM #15
-
12-19-2007, 06:59 AM #16
-
12-19-2007, 02:11 PM #17
CMD_Click()
If dj.caption = "POST WHORE" Then
Msgbox "DJ Is a freggon post wh0re...", vbstop
else
Msgbox "DJ is not a post wh0re, just no life....."
end if
End Sub
Just a lame VB message box thing, i'm at my grandmas stealing her internuts, so i cant do much, all i know is VB6.0 just learning VB.net
-
12-19-2007, 04:24 PM #18
-
12-20-2007, 05:37 AM #19
IROC Z was a dungeon master in the 80's LMAO
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Help: Code help please
By kingls1 in forum Computer & TuningReplies: 1Last Post: 04-13-2012, 07:42 PM -
dtc code 171 and 174?
By mark21742 in forum Computer & TuningReplies: 10Last Post: 07-15-2008, 10:05 PM -
Anyone ever have this code???
By wheelszzz in forum General HelpReplies: 5Last Post: 04-11-2007, 04:25 PM -
help!!ses code and what to do???
By baseballss in forum General HelpReplies: 14Last Post: 02-23-2006, 07:01 PM
Bookmarks