Results 1 to 24 of 24

Thread: Mongrel

  1. #1

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Mongrel

    Hello World

    Ooh this upgrade is a bit fancy!

    Hey where's DejaVu Sans? Oh wait, that's linux

    vb Code:
    1. Private Sub vbf
    2.     Dim vbforums as New PHP.Forum
    3.     Do
    4.          Spam vbforums
    5.     Loop
    6. End Sub
    7.  
    8. Private Sub Spam(forum as PHP.Forum)
    9.     Dim i as Integer
    10.     For i = 1 to 100
    11.         vbforums.SendMessage "Spam! :lol:","I am a n00b"
    12.     Next i
    13. End Sub
    Last edited by kregg; Feb 26th, 2007 at 06:11 PM.

  2. #2

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    Hello World

    Ooh this upgrade is a bit fancy!

    Hey where's DejaVu Sans? Oh wait, that's linux

    php Code:
    1. <?php
    2. include ($_SERVER['DOCUMENT_ROOT']."/classes/upload/upload_class.php"); //classes is the map where the class file is stored (one above the root)
    3.  
    4. $max_size = 1024*250; // the max. size for uploading
    5.    
    6. $my_upload = new file_upload;
    7.  
    8. $my_upload->upload_dir = $_SERVER['DOCUMENT_ROOT']."/files/new/"; // "files" is the folder for the uploaded files (you have to create this folder)
    9. $my_upload->extensions = array(".png", ".zip", ".pdf"); // specify the allowed extensions here
    10. // $my_upload->extensions = "de"; // use this to switch the messages into an other language (translate first!!!)
    11. $my_upload->max_length_filename = 50; // change this value to fit your field length in your database (standard 100)
    12. $my_upload->rename_file = true;
    13.        
    14. if(isset($_POST['Submit'])) {
    15.     $my_upload->the_temp_file = $_FILES['upload']['tmp_name'];
    16.     $my_upload->the_file = $_FILES['upload']['name'];
    17.     $my_upload->http_error = $_FILES['upload']['error'];
    18.     $my_upload->replace = (isset($_POST['replace'])) ? $_POST['replace'] : "n"; // because only a checked checkboxes is true
    19.     $my_upload->do_filename_check = (isset($_POST['check'])) ? $_POST['check'] : "n"; // use this boolean to check for a valid filename
    20.     $new_name = (isset($_POST['name'])) ? $_POST['name'] : "";
    21.     if ($my_upload->upload($new_name)) { // new name is an additional filename information, use this to rename the uploaded file
    22.         $full_path = $my_upload->upload_dir.$my_upload->file_copy;
    23.         $info = $my_upload->get_uploaded_file_info($full_path);
    24.         // ... or do something like insert the filename to the database
    25.     }
    26. }
    27. ?>
    28. <?php if (isset($info)) echo "<blockquote>".nl2br($info)."</blockquote>"; ?>
    Last edited by kregg; Feb 26th, 2007 at 06:14 PM.

  3. #3

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    Hello World

  4. #4

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    html Code:
    1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    2. "http://www.w3.org/TR/html4/loose.dtd">
    3. <html>
    4. <head>
    5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    6. <title>Upload example</title>
    7. <style type="text/css">
    8. <!--
    9. label {
    10.     float:left;
    11.     display:block;
    12.     width:120px;
    13. }
    14. input {
    15.     float:left;
    16. }
    17. -->
    18. </style>
    19. </head>
    20.  
    21. <body>
    22. <h3>File upload script:</h3>
    23. <p>Max. filesize = <?php echo $max_size; ?> bytes.</p>
    24. <form name="form1" enctype="multipart/form-data" method="post">
    25.   <input type="hidden" name="MAX_FILE_SIZE" value=""/><br>
    26.   <label for="upload">Select a file...</label><input type="file" name="upload" size="30"><br clear="all">
    27.   <label for="name">New name?</label><input type="text" name="name" size="20">
    28.   (without extension!) <br clear="all">
    29.   <label for="replace">Replace ?</label><input type="checkbox" name="replace" value="y"><br clear="all">
    30.   <label for="check">Validate filename ?</label><input name="check" type="checkbox" value="y" checked><br clear="all">
    31.   <input style="margin-left:120px;" type="submit" name="Submit" value="Submit">
    32. </form>
    33. <br clear="all">
    34. <p>
    35. </body>
    36. </html>

  5. #5

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    sql Code:
    1. Select *
    2. From tblVBF
    3. Where member="kregg"
    4. And rating>10;

  6. #6

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    c Code:
    1. #include <stdio.h>
    2.  
    3. main()
    4. {
    5.   for(;;)
    6.       {
    7.           printf ("Hello World!\n");
    8.       }
    9. }

  7. #7

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    c++ Code:
    1. #include <iostream>
    2.  
    3. int main()
    4. {
    5.     std::cout << "Hello, world!\n";
    6. }
    7.  
    8. #include <iostream.h>
    9.  
    10. main()
    11. {
    12.     for(;;)
    13.     {
    14.         cout << "Hello World! ";
    15.     }}

  8. #8

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    python Code:
    1. >>> def hello():
    2. ...print "Hello, World!"
    3. ...

  9. #9

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    delphi Code:
    1. procedure TForm1.FormCreate(Sender: TObject);
    2. begin
    3.   Caption := 'Hello Delphi! ' + DateTimeToStr(Now);
    4. end

  10. #10

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    pascal Code:
    1. program HelloWorld;
    2.  
    3. begin
    4.   writeln('Hello World');
    5. end.

  11. #11

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    cobol Code:
    1. 000100 IDENTIFICATION DIVISION.
    2. 000200 PROGRAM-ID.     HELLOWORLD.
    3. 000300
    4. 000400*
    5. 000500 ENVIRONMENT DIVISION.
    6. 000600 CONFIGURATION SECTION.
    7. 000700 SOURCE-COMPUTER. RM-COBOL.
    8. 000800 OBJECT-COMPUTER. RM-COBOL.
    9. 000900
    10. 001000 DATA DIVISION.
    11. 001100 FILE SECTION.
    12. 001200
    13. 100000 PROCEDURE DIVISION.
    14. 100100
    15. 100200 MAIN-LOGIC SECTION.
    16. 100300 BEGIN.
    17. 100400     DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
    18. 100500     DISPLAY "Hello world!" LINE 15 POSITION 10.
    19. 100600     STOP RUN.
    20. 100700 MAIN-LOGIC-EXIT.
    21. 100800     EXIT.

  12. #12

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    fortran Code:
    1. PROGRAM HELLO
    2.       DO 10, I=1,10
    3.       PRINT *,'Hello World'
    4.    10 CONTINUE
    5.       STOP
    6.       END

  13. #13

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    kregg Code:
    1. llama new nanimal
    2. blox "erg"
    3. llama=egg


  14. #14

  15. #15
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Mongrel

    Id like to try too!

    whats this Code:
    1. Hey?
    Code:
    Dim this As New Code



    VB Code:
    1. Dim a as string = "hey"
    2. Private Sub Death
    3.     'Death
    4. End Sub
    Last edited by Atheist; Feb 26th, 2007 at 08:33 PM.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  16. #16
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Mongrel

    tety
    My usual boring signature: Something

  17. #17
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Mongrel

    Chit Chat Code:
    1. Blah, blah, blah....
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  18. #18

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    Chit Chat Code:
    1. RobDog888: Blah, blah, blah....
    2. kregg: Roffle Roffle Roffle
    3. Marty: Ban Ban Ban

    Where's the highlighting syntax?
    O.o

  19. #19

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    Is it going to be 269? No

  20. #20
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Mongrel

    Dylan Code:
    1. if (miss_old_syntax=="yes")
    2.     blow_up_vbf=>True
    3. }
    My usual boring signature: Something

  21. #21
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Mongrel

    m,opwejfhieruaweiorueropijwerkjllthweropigtjser[]lwe
    r]poitupw9ser8gtujerkl;agtmjweruopthwo;ersklgnmlxcvknjbkljdfhgposekrgtjgseriopghpsejko;rgnpserjkghwpei rugnau9gnhqa[eriogtnjwal;rtmknjpsioruthgwil;ek Aerklpgjsoperuhtgwo[er gszszszszopsdrnj[jyw49[-uitjqperai0j

  22. #22

  23. #23

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    vb Code:
    1. Dim colRandom As New CollectionDim intTry As Integer Randomize On Error Resume Next Do Until colRandom.Count = 6    ' Generate the random number    intTry = Int(Rnd * 16 + 1)    ' Attempt To add it To the collection along with a matching key    colRandom.Add intTry, CStr(intTry)    If Err.Number = 457 Then        ' The key is already In the collection so it isn't added again    End IfLoop For intTry = 1 To 6    Debug.Print colRandom(intTry)Next

  24. #24

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Mongrel

    [vbcode]
    Dim hello as string
    [/vbcode]

    [b]Hello[/b]

    [noparse][/noparse]

Posting Permissions

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



Click Here to Expand Forum to Full Width