[Flug] semi-OT: per gli adepti AGOW in lista

simo fsockopen@yahoo.it
Mar 2 Ott 2007 10:36:01 CEST


Una breve cronostoria del programma di affiliazione:


10 REM ########## THE AGOW MEMBERSHIP ###########
20 PRINT "WELCOME TO THE AGOW AUTOEXAMINATOR"
30 INPUT "INSERISCI IL TUO AGOW-ID:", AGOWID$
40 PRINT "BENVENUTO #", HEX$(A$)
50 POKE 53280,0
60 POKE 53281,1
70 GOSUB MAKEAGOW
80 EXIT
90 SUB MAKEAGOW
...
100 RETURN

RUN
---------------------------------------
/* ########## THE AGOW MEMBERSHIP ########### */
<include stdlib.h>
<include stdio.h>
<include string.h>
<include agow.h>

int main(int argc, char *argv[])
{
    char[] agowid, args;
    printf("Inserisci il tuo AGOW-ID:");
    if((args = scanf("%s", agowid)==0)
    {
       printf("Benvenuto #%x\n", agowid);
    }
    system("/usr/sbin/makeagow");
    return 0;
}
---------------------------------------
#!/usr/bin/python
########## THE AGOW MEMBERSHIP ###########
import sys
import getopt

def toHex(s):
#convert string to hex
    lst = []
    for ch in s:
        hv = hex(ord(ch)).replace('0x', '')
        if len(hv) == 1:
            hv = '0'+hv
        lst.append(hv)


def main():
    agowid = raw_input("Inserisci il tuo AGOW-ID:")
    print "Benvenuto #" + toHex(agowid)
     sys.exit(0)

if __name__ == "__main__":
    main()
---------------------------------------

import java.io.*;
///* ########## THE AGOW MEMBERSHIP ########### */
public class MakeAgow {

   public static void main (String[] args) {

      System.out.print("Inserisci il tuo AGOW-ID: ");
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      String agowId = null;

      try {
         userName = br.readLine();
      } catch (IOException ioe) {
         System.out.println("IO error trying to read your agowid");
         System.exit(1);
      }

      System.out.println("Benvenuto, #" + this.stringToHex(agowId));

   }

    public static String stringToHex(String base)

    {

     StringBuffer buffer = new StringBuffer();

     int intValue;

     for(int x = 0; x < base.length(); x++)

         {

         int cursor = 0;

         intValue = base.charAt(x);

         String binaryChar = new String(Integer.toBinaryString(base.charAt(x)));

         for(int i = 0; i < binaryChar.length(); i++)

             {

             if(binaryChar.charAt(i) == '1')

                 {

                 cursor += 1;

             }

         }

         if((cursor % 2) > 0)

             {

             intValue += 128;

         }

         buffer.append(Integer.toHexString(intValue) + " ");

     }

     return buffer.toString();
    }
}  
---------------------------------------
<?php
///* ########## THE AGOW MEMBERSHIP ########### */
set_time_limit(0);
@ob_end_flush();
ob_implicit_flush(true);

class prompt {
    var $tty;
    function prompt() {
        if (substr(PHP_OS, 0, 3) == "WIN") {
            $this->tty = fopen("\con", "rb");
        } else {
            if (!($this->tty = fopen("/dev/tty", "r"))) {
                $this->tty = fopen("php://stdin", "r");
            }
        }
    }
    function get($string, $length = 1024) {
        echo $string;
        $result = trim(fgets($this->tty, $length));
        return $result;
    }
} 

$p = new prompt();
$agowid = $p->get("Inserisci il tuo AGOW-ID:");
printf("Benvenuto #%x", $agowid);

?>
 


non ho proprio un cazzo da fare ...

-- 
class simone extends AGOW {$aka = "#ffffff"; $url ="http://www.agow.org/";}
--






      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html



Maggiori informazioni sulla lista flug