Wiki Help

PLUGINS: Code



Standard Code plugin:
{CODE(wrap=>1)}
{Hello World in Pascal}

program HelloWorld(output);
begin
  WriteLn('Hello World!');
end.
{CODE}

  Standard Code plugin:
{Hello World in Pascal}

program HelloWorld(output);
begin
  WriteLn('Hello World!');
end.


__PHP__ code 
im __geshi__ (Generic Syntax Highlighter) Format 
{CODE(colors=php)}
<?php
  // Hallo Welt in PHP
  echo 'Hallo, Welt!';
?>{CODE}

  PHP code
im geshi (Generic Syntax Highlighter) Format
<?php
  // Hallo Welt in PHP
  echo 'Hallo, Welt!';
?>


__Microsoft C#__ code 
im __geshi__ (Generic Syntax Highlighter) Format
{CODE(colors=csharp)}
// Hallo Welt in Microsoft C#.

using System;

class HelloWorld
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hallo, Welt!");
        return 0;
    }
}
{CODE}

  Microsoft C# code
im geshi (Generic Syntax Highlighter) Format
// Hallo Welt in Microsoft C#.
 
using System;
 
class HelloWorld
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hallo, Welt!");
        return 0;
    }
}



__Perl__ code 
im __geshi__ (Generic Syntax Highlighter) Format
{CODE(colors="perl")}
#! /usr/bin/perl -w
    eval 'exec /opt/perl_32/bin/perl -S $0 ${1+"$@"}'
        if 0; #$running_under_some_shell

use strict;
use File::Find ();
use Fcntl ':mode';

# Set the variable $File::Find::dont_use_nlink
use vars qw/*name *dir *prune/;
*name   = *File::Find::name;
*dir    = *File::Find::dir;
*prune  = *File::Find::prune;

sub wanted;
sub ls ();

my @rwx = qw(--- --x -w- -wx r-- r-x rw- rwx);

my (%uid, %user);
while (my ($name, $pw, $uid) = getpwent) {
    $user{$uid} = $name unless exists $user{$uid};
}
....
{CODE}

  Perl code
im geshi (Generic Syntax Highlighter) Format
#! /usr/bin/perl -w
    eval 'exec /opt/perl_32/bin/perl -S $0 ${1+"$@"}'
        if 0; #$running_under_some_shell
 
use strict;
use File::Find ();
use Fcntl ':mode';
 
# Set the variable $File::Find::dont_use_nlink
use vars qw/*name *dir *prune/;
*name   = *File::Find::name;
*dir    = *File::Find::dir;
*prune  = *File::Find::prune;
 
sub wanted;
sub ls ();
 
my @rwx = qw(--- --x -w- -wx r-- r-x rw- rwx);
 
my (%uid, %user);
while (my ($name, $pw, $uid) = getpwent) {
    $user{$uid} = $name unless exists $user{$uid};
}
....



__SHELL__ (bash) code
im __geshi__ (Generic Syntax Highlighter) Format
{CODE(colors="Bash")}
...
programm_option()
{
n_HELP_INDEX=${#HELP_ARRAY[@]}
HELP_INDEX=3
while (( HELP_INDEX <= n_HELP_INDEX )); do
  printf "${HELP_ARRAY[HELP_INDEX]}"
  let HELP_INDEX=HELP_INDEX+1
done
}
...{CODE}

  SHELL (bash) code
im geshi (Generic Syntax Highlighter) Format
...
programm_option()
{
n_HELP_INDEX=${#HELP_ARRAY[@]}
HELP_INDEX=3
while (( HELP_INDEX <= n_HELP_INDEX ))
 do
  printf "${HELP_ARRAY[HELP_INDEX]}"
  let HELP_INDEX=HELP_INDEX+1
done
}
...



__SQL__ code
im __geshi__ (Generic Syntax Highlighter) Format
...eine Variante des regulären SELECT.
{CODE(colors="sql")}
SELECT * 
   INTO OUTFILE '/home/mysql/export.csv'
   FIELDS
      TERMINATED BY ','
      OPTIONALLY ENCLOSED BY '"'
      LINES TERMINATED BY '\n'
   FROM TableName;
{CODE}

  SQL code
im geshi (Generic Syntax Highlighter) Format
...eine Variante des regulären SELECT.
SELECT * 
   INTO OUTFILE '/home/mysql/export.csv'
   FIELDS
      TERMINATED BY ','
      OPTIONALLY ENCLOSED BY '"'
      LINES TERMINATED BY '\n'
   FROM TableName;