Page 12 of 30 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #111
    Join Date
    Aug 2007
    Location
    Helsinki, Finland
    Beans
    7

    Thumbs up Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by Wugglz View Post
    CGI using python

    hellocgi.py
    Hi - I cant compete with you on python, but I did the same in PHP. The main purpose was just give more code, but it really hurt me to see a simple project like this to two files - and that it returns non valid code by W3C standards (no offence in any way!!).

    So this has one PHP file, it first gives user a form to send and when it's called with sending the form at same time it shows the Hello... message. You can see i at http://salamanteri.homelinux.net/php/hellolinux.php

    CGI using PHP
    hellolinux.php

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Hello Ubuntu</title>
    <!-- PHP CGI HelloUbuntu contribute -->
    </head><body>
    <?php
    if (!isset($_POST["name"])) { ?>
    <form name="input" action="hellolinux.php" method="post">
    What is your name? 
    <input type="text" name="name">
    <input type="submit" value="Submit">
    </form>
    <?php
    } else {
          print "<b>Hello ".$_POST["name"].". Welcome to your Linux!</b>\n";
    } ?>
    </body>
    </html>

  2. #112
    Join Date
    Aug 2007
    Location
    Helsinki, Finland
    Beans
    7

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by Matakoo View Post
    Still, if you know how, you can manage anything on windows based computers through scripts. Change permissions, remove/add users (and getting the details out of databases or spreadsheats if you want to), add/delete printers, manipulate the registry, you name it really.
    I know some of these and some you mentioned are actually possible with CMD.exe batches, but those I dont remember well. Fortunately there are more tools - for example with cygwin you have direct access to registry through the filesystem cygwin shows. In cygwin you might (depending on what are you doing) benefit a lot of combining direct access with powerful scripting language. Database connections of course possible and even easy to make from most good scripting languages (like perl, be it running in cygwin or is it a pure Win proggy). I recall you could change permissions with cygwin system, but not sure.

    You know...the more vocal of the MS-fanboys like to complain that Linux (or any OS that is *IX based really) is too reliant on the command prompt. For system administrators that's a moot point. *IX or Windows, you need to know your way around the command line and scripting if you want to be efficient. And Microsoft knows this. They just chooses not to say that, most likely for promotional reasons.
    Well, we shall see if they manage(d?) to do something good and do it well this time. For a long time to get really powerful command line tools and script engines the only choise was 3rd party software. This is just a guess, but I'm guessing that plain usual unix shells are still way better than powershell - no claims, just a guess.

  3. #113
    Join Date
    Jun 2006
    Location
    CT, USA
    Beans
    5,267
    Distro
    Ubuntu 6.10 Edgy

    Re: "Hello Ubuntu" in every programming language

    Guys, stop it! this is **not** a discussion thread, read first page please!

    If you really feel importance of bashing Gates, start new tread, and please edit out this unnecessary noise

  4. #114
    Join Date
    Apr 2005
    Location
    Paris
    Beans
    601
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: "Hello Ubuntu" in every programming language

    PL/1

    Code:
    HELLO:   PROCEDURE OPTIONS (MAIN);
    
    	DECLARE NAME CHARACTER (100) VARYING INIT('');  
    
            PUT SKIP LIST('HI ! WHAT S YOUR NAME ?');
    	GET LIST (NAME); 
    
            PUT SKIP LIST('HELLO, ');
    	PUT LIST (NAME);
    	PUT LIST ('! WELCOME TO UBUNTU !');
    
    END HELLO;
    Sorry for my English - Home Page - PPA Webkit - PPA Midori - PPA Liferea - Personal PPA
    «Violence never settles anything.» - Genghis Khan, 1162-1227

  5. #115
    Join Date
    Aug 2007
    Location
    Arvada, CO
    Beans
    275
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: "Hello Ubuntu" in every programming language

    Code:
    section .data
    
    	hello:		db	0Ah,0Dh,'Hello, Ubuntu.'
    	hellolen: 	equ	$ - hello
    
    section .text
    
    global _start
    
    _start:
    
    	mov	eax, 04h
    	mov	ebx, 01h
    	mov	ecx, hello
    	mov	edx, hellolen
    	int	80h
    
    	mov	eax, 01h
    	sub	ebx, ebx
    	int	80h
    To build:

    nasm -f elf helloubuntu.asm
    ld -s -o helloubuntu helloubuntu.o

    Whee!

  6. #116
    Join Date
    Aug 2007
    Location
    Helsinki, Finland
    Beans
    7

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by bobbocanfly View Post
    Probably been done but

    LOLCODE
    Hi - is there Linux (or any other program to run and/or compile the code? If not... Sad, but then I might be the first to write it - and hopefully the language is good enough that the engine could be written in LOLCODE after making it in another lang

    For NEDCODE I have same questions.

  7. #117
    Join Date
    Aug 2007
    Location
    Helsinki, Finland
    Beans
    7

    Angry Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by pmasiar View Post
    Guys, stop it! this is **not** a discussion thread, read first page please!
    Sorry, got carried over the line on this.... Tpuly sorry!

    If you really feel importance of bashing Gates, start new tread, and please edit out this unnecessary noise
    True, but instead of Gates its his company that I bash. Sorry anyway.

  8. #118
    Join Date
    Feb 2005
    Location
    Vancouver, Canada
    Beans
    95

    Re: "Hello Ubuntu" in every programming language

    Ant

    Code:
    <project>
        <input message="Hi! What's your name?" addproperty="name"/>
        <echo message="Hello, ${name}! Welcome to Ubuntu!" level="info"/>
    </project>

  9. #119
    Join Date
    Dec 2005
    Location
    Lahore , Pakistan
    Beans
    15

    Re: "Hello Ubuntu" in every programming language

    can some one write an m file for the matlab

  10. #120
    Join Date
    May 2007
    Beans
    46

    Re: "Hello Ubuntu" in every programming language

    the king of languages:

    AWK

    Code:
    BEGIN { print "Hi! What's your name? " }
    1 { name = $0;
    exit; }
    END { print "Hello, " name " Welcome to Ubuntu!"; }
    To run, save as file e.g. helloubuntu.awk then type:
    gawk -f helloubuntu.awk
    or there is the one line method (for Bash):
    gawk "BEGIN { print \"Hi! What's your name? \" } 1 { name = \$0; exit; } END { print \"Hello, \" name \" Welcome to Ubuntu\!\";}"

Page 12 of 30 FirstFirst ... 2101112131422 ... LastLast

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
  •