« Test » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Aucun résumé des modifications
 
(225 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
= php =
= Test =
<kode lang='php'>
<?php
sleep(1);  // attendre 1 seconde
?>
</kode>


= razor =
= Razor =
<kode lang='razor'>
<kode lang='razor'>
@page "/mypage"
@* comment *@
@inherits MyPageBase
<h1>Title</h1>
</kode>
 
<kode lang='blazor'>
@page "/mypage"
@inherits MyPageBase
<h1>Title</h1>
</kode>
 
<kode lang='cshtml'>
@page "/mypage"
@inherits MyPageBase
<h1>Title</h1>
</kode>
</kode>


= tsql =
= Comment end of line =
<kode lang='tsql'>
IF NOT EXISTS (SELECT *
              FROM INFORMATION_SCHEMA.TABLES
              WHERE TABLE_SCHEMA = 'MonSchema'
              AND  TABLE_NAME = 'MaTable')
BEGIN
    create table MonSchema.MaTable (
        -- clé primaire
id int identity(1, 1) constraint pk_maTable primary key,
-- insère le nom de l’utilisateur courant par defaut
[colonne_2] varchar(50) NOT NULL DEFAULT SYSTEM_USER,
-- insère la date courant si rien n’est spécifié
[colonne_3] datetime NOT NULL DEFAULT GETDATE()
    );
END
 
-- Supprimer une table
drop table MonSchema.MaTable;
 
-- Supprimer toutes les tables
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
EXEC sp_MSForEachTable 'DROP TABLE ?'
</kode>
 
= no highlight =
<kode lang='cs'>
<kode lang='cs'>
var myObject = new MyCLass();
var i = 0; // comment
</kode>


<kode>
private double progressValue; // between 0 and 100
var myObject = new MyCLass();
</kode>


<kode lang='nohighlight'>
var o = new Class
var myObject = new MyCLass();
{
    Prop1 = "value"  // comment
};
</kode>
</kode>


= highlight C# =
= Template =
<kode lang='cs'>
{{code | lang=html | code=
using System.IO.Compression;
<div>{<!-- -->{tag}<!-- -->}</div>
}}


namespace MyApplication
{{code | lang=html | code=
{
<div>{{((}}tag{{))}}</div>
    interface IInterface { }
}}


    class Program : IInterface
{{code | lang=html | code=
     {
<tbody>
        /// <summary>
     {{#.}}
         /// Main method
    <tr>
         /// </summary>
         <td>{{id}}</td>
         /// <param name="args"></param>
         <td>{{fields.title}}</td>
         static void Main(string[] args)
         <td>{{fields.state}}</td>
        {
         <td><ul>
            // comment
          {{#items}}<li>{{title}}</li>{{/items}}
            /* multi-lines
          {{^items}}No items{{/items}}
            * comment
        </ul></td>
            */
    </tr>
            Console.WriteLine($"Hello {Name}!");
    {{/.}}
</tbody>
}}


            if (b == true)
= Nowiki =
            {
<syntaxhighlight lang='cs'>
              // FIXME
var v = 1;
              MyClass mc;
var v = 2;
              MyClass mc = new MyClass(myVariable, MyProperty, myVariable.MyProperty);
<nowiki>var v = 3;</nowiki>
              IMyInterface mi = MyClass<IMyInterface>.Create(new MyClass("test"));
</syntaxhighlight>
              MyClass.MyStaticMethod(myVariable, MyProperty, myVariable.MyProperty);
              List<int> li = new List<int>() { 1, 2, 3 };
              MyClass[] amc = new MyClass[] { 1, 2, 3 };


              MyClass mc = mc;
{{#tag:syntaxhighlight|
              Myclass mc = mc;
var v = 1;
var v = 2;
<nowiki>var v = 3;</nowiki>
}}


              Type t = typeof(MyClass);
= List and break =
              Type t = typeof(IInterface);
# Step1 inline code <syntaxhighlight lang='bash' inline>111 222 333</syntaxhighlight> end line<br>extra line
              Type t = typeof(MyClass<int>);
# Step 2 code block <syntaxhighlight lang="bash">
              Type t = typeof(IInterface<int>);
111
              Type t = typeof(MyClass<IInterface>);
222
</syntaxhighlight>extra line


              DateTime d = new DateTime();
<ol>
              DateTime? d = null;
<li>Step1 inline code <syntaxhighlight lang='bash' inline>111 222 333</syntaxhighlight> end line<br>extra line</li>
<li>Step 2 code block <syntaxhighlight lang="bash">
111
222
</syntaxhighlight>extra line</li>
<li>Step 3 kode <kode lang='bash'>
111
222
</kode>extra line</li>
<li>Step 4 text</li>
<li>Step 5 filebox<filebox fn='xxx.sh'>
111
222
</filebox>extra line</li>
<li>Step 6 End</li>
</ol>


              var engine = new FileHelperAsyncEngine<DailyValue>();
= pre =
<pre>
yyy
</pre>


              Contract.Requires<ArgumentNullException>(argument != null);
= SyntaxHighlight =
<syntaxhighlight lang='cs' inline>var v = new StringBuilder();</syntaxhighlight>


              var un_objet = Session["clé"] as MaClasse;
<syntaxhighlight lang='cs'>
var v = new StringBuilder();
</syntaxhighlight>


              catch (Exception ex)
<syntaxhighlight lang="js">
              {
// some js code
                  lbStatus.Text = "Error: " + ex.Message;
</syntaxhighlight>
              }
            }
            else if (b == false)
            {
              var query = from p in entities.Persons
                          select new { First = p.FirstName, Last = p.LastName };
            }
            else
            {
              MyProperty = "value";
              MyMethod(myVariable, MyProperty, myVariable.MyProperty);
            }


            foreach (MyClass<int> mc in mcList)
= no highlight =
            {
<kode lang='cs'>
            }
var myObject = new MyCLass();
</kode>


            foreach (MyClass mc in mcList)
<kode lang='cs' class='nohighlight'>
            {
var myObject = new MyCLass();
            }
</kode>


            using (GZipStream s = new GZipStream(fs, CompressionMode.Decompress))
<kode class='nohighlight'>
            {
var myObject = new MyCLass();
            }
        }
 
        [DataMember("")]
        private List<int> MyMethod(MaClasse mc, MaClasse<int> mci, IInterface ii, MaClasse<MaClasse> mcmc)
        {
        }
 
        public void Methode(DateTime date1 = default(DateTime), DateTime? date2 = null)
        {
            if (date1 == default(DateTime)) date1 = new DateTime(...);
            if (date2 == null) date2 = new DateTime(...);
        }
    }
}
</kode>
</kode>
= [[Modèle_MediaWiki|liens+]] =
* [http://www.meteofrance.com/previsions-meteo-france/ferney-voltaire/01210 meteo]
* [[Modèle_MediaWiki|Modèle MediaWiki]]
= ini =
<filebox fn='test.ini'>
[section]
cle = valeur
# comment
// comment
; comment
</filebox>


= listes =
= listes =
Ligne 236 : Ligne 177 :
* trois
* trois
</div>
</div>
= Code xxx =
<filebox fn='test.ps1'>
# Renforce les règles de vérification et créé une erreur si elles ne sont pas respectées
Set-StrictMode -Version Latest
# Stop le script à la première erreur (par défaut à Continue)
$ErrorActionPreference = "Stop"
# Force tous les Cmdlet à s'arrêter à la première erreur
$PSDefaultParameterValues['*:ErrorAction']='Stop'
</filebox>
<kode lang='ps'>
# Renforce les règles de vérification et créé une erreur si elles ne sont pas respectées
Set-StrictMode -Version Latest
# Stop le script à la première erreur (par défaut à Continue)
$ErrorActionPreference = "Stop"
# Force tous les Cmdlet à s'arrêter à la première erreur
$PSDefaultParameterValues['*:ErrorAction']='Stop'
</kode>
<kode lang='javascript'>
k = 10;
</kode>
<kode lang='js'>
k = 10;
</kode>
<kode lang='markdown'>
# Titre 1
## Titre 2
</kode>
<kode lang='md'>
# Titre 1
## Titre 2
</kode>
<kode lang='ts'>
class MyClass {
  public static myValue: string;
  constructor(init: string) {
    this.myValue = init;
  }
}
import fs = require("fs");
module MyModule {
  export interface MyInterface extends Other {
    myProperty: any;
  }
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
</kode>
<filebox fn='test.ts'>
class MyClass {
  public static myValue: string;
  constructor(init: string) {
    this.myValue = init;
  }
}
import fs = require("fs");
module MyModule {
  export interface MyInterface extends Other {
    myProperty: any;
  }
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
</filebox>


= SVG =
= SVG =
[[Fichier:Bash.svg|100px]]
[[File:Bash.svg|100px]]
<br />
<br />
[[File:1.svg|1000px]]
[[File:Bash.svg]]
<br />
[[File:ASP.NET_Core.svg]]
 
= Liens =
* [http://programmesradio.rts.ch/couleur3/ web http] xxx
* [https://www.mediawiki.org/wiki/Extension:Highlightjs_Integration web https] xxx
* [[Accueil|Local https]] xxx
 
<kode lang='asp'>
<% xxx %>
</kode>
 
= Excel =
<kode>
=Format(Fields!date.Value,"dddd dd/MM/yyyy")
</kode>
<kode lang='vba'>
=Format(Fields!date.Value,"dddd dd/MM/yyyy")
</kode>
<kode lang='excel'>
=Format(Fields!date.Value,"dddd dd/MM/yyyy")
</kode>
 
= Autres =
Test 222

Dernière version du 21 novembre 2023 à 01:10

Test

Razor

Razor.svg
@* comment *@

Comment end of line

Cs.svg
var i = 0;  // comment

private double progressValue;  // between 0 and 100

var o = new Class
{
    Prop1 = "value"  // comment
};

Template

Html.svg
<div>{{tag}}</div>
Html.svg
<div>{{tag}}</div>
Html.svg
<tbody>
    {{#.}}
    <tr>
        <td>[[:Modèle:Id]]</td>
        <td>[[:Modèle:Fields.title]]</td>
        <td>[[:Modèle:Fields.state]]</td>
        <td><ul>
          {{#items}}<li>[[:Modèle:Title]]</li>[[:Modèle:/items]]
          [[:Modèle:^items]]No items[[:Modèle:/items]]
        </ul></td>
    </tr>
    {{/.}}
</tbody>

Nowiki

var v = 1;
var v = 2;
<nowiki>var v = 3;</nowiki>
var v = 1;
var v = 2;
var v = 3;

List and break

  1. Step1 inline code 111 222 333 end line
    extra line
  2. Step 2 code block
    111
    222
    extra line
  1. Step1 inline code 111 222 333 end line
    extra line
  2. Step 2 code block
    111
    222
    extra line
  3. Step 3 kode
    Bash.svg
    111
    222
    extra line
  4. Step 4 text
  5. Step 5 filebox
    xxx.sh
    111
    222
    extra line
  6. Step 6 End

pre

yyy

SyntaxHighlight

var v = new StringBuilder();

var v = new StringBuilder();
// some js code

no highlight

Cs.svg
var myObject = new MyCLass();
Cs.svg
var myObject = new MyCLass();
Bash.svg
var myObject = new MyCLass();

listes

  • un
    • deux
      • trois
  • dix
    • trente
  • un
    • deux
    • 22
      • trois
  • plus
  • plus
  • moins
  • moins
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois
  • un
  • deux
  • trois

SVG

Bash.svg
Bash.svg