Warning: filemtime(): stat failed for /home/developpez/www/developpez-com/upload/djibrilhttps://www.developpez.com/template/kit/developpez-kit-generation.css in /home/developpez/www/developpez-com/template/entete.php on line 405

Warning: filemtime(): stat failed for /home/developpez/www/developpez-com/upload/djibrilhttps://www.developpez.com/template/kit/code.css in /home/developpez/www/developpez-com/template/entete.php on line 405

Warning: filemtime(): stat failed for /home/developpez/www/developpez-com/upload/djibrilhttps://www.developpez.com/template/kit/lightbox.2.51.css in /home/developpez/www/developpez-com/template/entete.php on line 405
IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

multipage Article DVP avec le nouveau look

Projet d'affichage
Image non disponible


précédentsommairesuivant

III. Exemple de coloration des codes

III-A. CSS

 
Sélectionnez
/* définition du style de la police, et largeur du select */
select {
font-family : Courier ;
font-size : 10px ;
width : 200px;
}

/* élément de couleur bleu */
option.bl_eu 
{
color : #0000FF ;
background-color :#00CCFF ;

background : blue url(img.png) ; 
background-color : blue ; 
background-image : url(img.png) ; 

}

III-B. Delphi et Delphi pour .NET

 
Sélectionnez
// commentaire
{
Un commentaire sur
plusieurs lignes }
{$ une directive }
Var i:Integer;
<a href="lien.html?parametre1=valeur1&amp;parametre2=valeur2">test</a>

(*
Et un autre
*)
begin
  For i:=Onglet.PageCount-1 DownTo 0 Do
  Begin
    Onglet.ActivePageIndex:=i;
    // En commentaire d ON ' euuuuuu
    ShowMessage('Truc muche !'kqjhsd'jhkjh''''''hghg''''hg'); // c'est un comment !
    { et un autre }
    FileName:= 'Document.doc'; // ou 'Document.rtf'
    URL ='http://toto.com';
  End;
end;

III-C. JAVA

 
Sélectionnez
// un comment en deb
public class MaClasse{
   public static Map uneVariableStatique = new HashMap();
   static{
/*      uneVariableStatique.put("une clef","une valeur");
      uneVariableStatique.put("une autre clef","une autre http:// jshdjshd");*/
      //etc un comment et import
      uneVariableStatique.put("une clef","une http://valeur");
      uneVariableStatique.put("une autre clef","une autr\"e valeur\\\"");
   qal.declareImports("import com.unilog.data.Track"); 
   import toto;
   }

}

III-D. Perl

 
Sélectionnez
#!/usr/bin/perl
use strict;
use warnings;

# Voici une ligne de commentaire.
print "Bonjour\n"; # Affichage du mot bonjour (autre commentaire).

III-E. PHP

 
Sélectionnez
function creationPanier(){
	if (!isset($_SESSION['panier'])){
		$_SESSION['panier']=array();
		$_SESSION['panier']['libelleProduit'] = array();
		$_SESSION['panier']['qteProduit'] = array();
		$_SESSION['panier']['prixProduit'] = array();
		$_SESSION['panier']['verrou'] = false;
	}
	return true;
}

III-F. XML

 
Sélectionnez
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
    <xiti>
        <!-- compteur Dotnet-->
        <alias>Dotnet</alias>
        <logg_er>logv99</logg_er>
        <id>12345</id>
    </xiti>
</document>

III-G. HTML

 
Sélectionnez
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Titre</title>
    </head>
    <body>
    </body>
</html>

III-H. PYTHON

 
Sélectionnez
class Personne:
   def __init__(self, nom, prenom):
       self.nom = nom
       self.prenom = prenom
   def presenter(self) :
       return self.nom + " " + self.prenom
class Etudiant(Personne):
   def __init__(self, niveau, nom, prenom):
       Personne.__init__(self, nom, prenom)
       self.niveau = niveau
   def presenter(self):
       return self.niveau + " " + Personne.presenter(self)
e = Etudiant("Licence INFO", "Dupontel", "Albert")
assert e.nom == "Dupontel"

III-I. DELPHI

 
Sélectionnez
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;
type
  TForm1 = class(TForm)
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
end.

III-J. PASCAL

 
Sélectionnez
unit Unit1;
    {$mode objfpc}{$H+}
interface
uses
    Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
    { TForm1 }
    TForm1 = class (TForm)
         Label1: TLabel; { le label "Hello world!" posé sur la fenêtre }
    private
         { private declarations }
    public
         { public declarations }
    end;
var
    Form1: TForm1; 
implementation
initialization
    {$I unit1.lrs}
end.

précédentsommairesuivant


Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/developpez/www/developpez-com/upload/djibril/tutoriels/club/dvp-html5/article-multi-versionfinale-mp/index.php on line 104

Warning: include(http://djibril.developpez.com/tutoriels/club/dvp-html5/reference/xmltestref-html5.inc): failed to open stream: no suitable wrapper could be found in /home/developpez/www/developpez-com/upload/djibril/tutoriels/club/dvp-html5/article-multi-versionfinale-mp/index.php on line 104

Warning: include(): Failed opening 'http://djibril.developpez.com/tutoriels/club/dvp-html5/reference/xmltestref-html5.inc' for inclusion (include_path='.:/opt/php56/lib/php') in /home/developpez/www/developpez-com/upload/djibril/tutoriels/club/dvp-html5/article-multi-versionfinale-mp/index.php on line 104
  

Copyright © 2012 djibril. Aucune reproduction, même partielle, ne peut être faite de ce site ni de l'ensemble de son contenu : textes, documents, images, etc. sans l'autorisation expresse de l'auteur. Sinon vous encourez selon la loi jusqu'à trois ans de prison et jusqu'à 300 000 € de dommages et intérêts.