Results 1 to 19 of 19
  1. #1
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863

    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...

  2. #2
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    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"; }
    ?>

  3. #3
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    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>

  4. #4
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    I wrote this funny way to write a "try catch" block in Java.

    try
    {
    Kia(username);
    }

    catch(SlowException you)
    {
    throwOut(you);
    }

  5. #5
    Missing 4 Cylinders BULLET_WS6's Avatar
    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

  6. #6
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    throw few line of code in here.

  7. #7
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    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

  8. #8
    Missing 4 Cylinders BULLET_WS6's Avatar
    Join Date
    Apr 2007
    Location
    Denton (Dallas)
    Posts
    10,580

    Silver
    2003 GTI 1.8T :(

    Quote Originally Posted by djvaly View Post
    throw few line of code in here.
    #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

  9. #9
    Missing 4 Cylinders BULLET_WS6's Avatar
    Join Date
    Apr 2007
    Location
    Denton (Dallas)
    Posts
    10,580

    Silver
    2003 GTI 1.8T :(

    was that simple enough?

  10. #10
    Missing 4 Cylinders BULLET_WS6's Avatar
    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...

  11. #11
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    cool... code matrix! random bits and bites here

  12. #12
    Missing 4 Cylinders BULLET_WS6's Avatar
    Join Date
    Apr 2007
    Location
    Denton (Dallas)
    Posts
    10,580

    Silver
    2003 GTI 1.8T :(

    Quote Originally Posted by djvaly View Post
    cool... code matrix! random bits and bites here
    im not that skilled... i can do simple... loops, if else then, few other little things

  13. #13
    O U 8 1 2 Spaz's Avatar
    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 # # # # #...



  14. #14
    Impounded 86 IROC-Z's Avatar
    Join Date
    Aug 2005
    Location
    .
    Age
    35
    Posts
    11,676

    Everything fiberglass
    2005 Amberlamps

    Code:
    int getRandomNumber()
    {
         return 4; // chosen by fair dice roll.
                   // guaranteed to be random.
    }

  15. #15
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    Quote Originally Posted by Spaz View Post
    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 # # # # #...


    I chose NO

  16. #16
    O U 8 1 2 Spaz's Avatar
    Join Date
    Nov 1999
    Location
    over here...
    Age
    45
    Posts
    25,709

    []D [] []V[] []D
    1999 trans am

    Quote Originally Posted by djvaly View Post
    I chose NO

  17. #17
    Peckerhead Knighthawk LS1's Avatar
    Join Date
    Jul 2005
    Location
    Loveland, CO
    Posts
    2,509

    Black
    1999 Trans am

    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

  18. #18
    car enthusiast djvaly's Avatar
    Join Date
    Nov 2005
    Location
    Philly area
    Posts
    9,863
    Dj <> hahahah

  19. #19
    Senior Member ss~zoso~ss's Avatar
    Join Date
    Dec 2004
    Location
    )
    Posts
    9,128

    SS: NBM, tan top
    1998-SS, 2010 Jetta TDI

    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

  1. Help: Code help please
    By kingls1 in forum Computer & Tuning
    Replies: 1
    Last Post: 04-13-2012, 07:42 PM
  2. dtc code 171 and 174?
    By mark21742 in forum Computer & Tuning
    Replies: 10
    Last Post: 07-15-2008, 10:05 PM
  3. Anyone ever have this code???
    By wheelszzz in forum General Help
    Replies: 5
    Last Post: 04-11-2007, 04:25 PM
  4. help!!ses code and what to do???
    By baseballss in forum General Help
    Replies: 14
    Last Post: 02-23-2006, 07:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •