Fichier XML de test
Date de publication : 27/08/2004. Date de mise à jour : 27/08/2004.
II. Exemples de coloration
II-A. Action script
II-B. ASP , ASP.NET
II-C. Borland C++ , C , C++ , C#
II-D. CSS
II-E. Delphi
II-F. INI
II-G. Java
II-H. Javascript
II-I. Oracle
II-J. Autre
II-K. PHP
II-L. VB , VB.NET
II-M. XML
II. Exemples de coloration
II-A. Action script
II-B. ASP , ASP.NET
| asp |
<%
idimage_get = Request.QueryString("idimage")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open chainedeconnexion
requete = "SELECT type_image, bin_image FROM images WHERE idimage=" & idimage_get
Set rs = conn.Execute(requete)
Response.ContentType = rs("type_image")
Response.BinaryWrite(rs("bin_image"))
conn.close
Set conn = Nothing
%>
|
| aspnet |
<asp:calendar id="Calendar1" runat="server"
Width="47px" Height="40px">
<TodayDayStyle Font-Names="Arial" Font-Bold="True" ForeColor="Red"></TodayDayStyle>
<SelectorStyle Font-Names="Arial"></SelectorStyle>
<DayStyle Font-Names="Arial" ForeColor="#006600"></DayStyle>
<DayHeaderStyle Font-Names="Arial" ForeColor="White" BorderColor="#006600"
BackColor="#006600"></DayHeaderStyle>
<OtherMonthDayStyle Font-Names="Arial" ForeColor="#006600" BorderColor="White"
BackColor="White"></OtherMonthDayStyle>
</asp:calendar>
|
II-C. Borland C++ , C , C++ , C#
| bcb |
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TButton *Button;
Button = dynamic_cast <TButton *> (Sender);
if (Button == Button1)
ShowMessage("Button1");
else
if (Button == Button2)
ShowMessage("Button2");
else
ShowMessage("C'est louche");
Button->Caption = "Appuyé";
}
|
| C |
char c1, c2, c3, c4;
c1 = 5;
c2 = 4;
c3 = c1 <<2;
if (a==b) {
x = 5;
} else {
x = 10;
}
|
| C++ |
#define c
#endif
class Base {
public:
void a() { cout << "Base::a" << endl; }
virtual void b(); { cout << "Base::b" << endl; }
};
int main()
{
Base x;
x.a();
x.b();
}
|
| C# |
ArrayList CompteurXML = new ArrayList();
ArrayList CompteurSQL = new ArrayList();
string sNomTable = Table.TableName;
for ( int i = 0; i < dsTableSQL.Tables[0].Rows.Count - 1; i++ )
{
object [] ligne = dsTableSQL.Tables[0].Rows[i].ItemArray;
}
|
II-D. CSS
| css |
select {
font-family : Courier ;
font-size : 10px ;
width : 200px;
}
option.bleu
{
color : #0000FF ;
background-color :#00CCFF ;
background : blue url(img.png) ;
background-color : blue ;
background-image : url(img.png) ;
}
|
II-E. Delphi
| delphi |
Var i:Integer;
begin
For i:=Onglet.PageCount-1 DownTo 0 Do
Begin
Onglet.ActivePageIndex:=i;
ShowMessage('Truc muche !'kqjhsd'jhkjh''hghghg');
FileName:= 'Document.doc';
URL ='http://toto.com';
End;
end;
|
II-F. INI
| ini |
[EditeurXML]
Nouveau=
Recent0="C:\BRUNO\HTML\kit.4.0.17\documents\tables\tables.xml"
Recent1="C:\BRUNO\HTML\kit.4.0.17\documents\srcdelphi\srcdelphi.xml"
SommaireWidth=310
WINDOWSTATE=2
WIDTH=696
HEIGHT=480
LEFT=162
TOP=44
TimerMAJSommaire=1000
|
II-G. Java
| java |
public class MaClasse{
public static Map uneVariableStatique = new HashMap();
static{
uneVariableStatique.put("une clef","une http://valeur");
uneVariableStatique.put("une autre clef","une autr\"e valeur\\\"");
}
}
|
II-H. Javascript
| JavaScript |
variable1 = document.formulaire.champs1.value;
variable2 = "qhkjqhfkq";
total = variable1 + variable2;
|
II-I. Oracle
| oracle |
CREAte TABLE hr.emp
(
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
job VARCHAR2(10),
mgr NUMBER(5),
hiredate DATE DEFAULT sysdate,
sal NUMBER(7,2),
com NUMBER(7,2),
deptno NUMBER(3) NOT NULL
CONSTRAINT dept_fk REFERENCES hr.departments
(department_id)
)
TABLESPACE tbs1
STORAGE
(
INITIAL 50K
NEXT 50K
MAXEXTENTS 10
PCTINCREASE 25
) ;
|
II-J. Autre
II-K. PHP
| php |
if ( $reponse_site == 'OK' )
{
if ( $userdata['user_level'] != ADMIN && $userdata['user_level'] != MOD )
{
$findateabo = time() + 31 * 1 * 86400;
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . VIP_SILVER . ",
user_findateabo = $findateabo,
user_finabo = 1
WHERE user_id = $user_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
}
message_die(GENERAL_MESSAGE, $message, 'Information');
}
else
{
message_die(GENERAL_MESSAGE, $message, 'Information');
}
|
II-L. VB , VB.NET
Attention en code VB pour mettre ' dans une chaine il faut mettre \'
| vb |
Private Sub Form_Load()
Dim MaBD As String
Dim i as Integer
MSChart1.AllowSelections = False
MoyMax = Format(MoyMax / 12, "#0.0 \' ")
End Sub
|
| vbnet |
Imports System
Imports System.Text.RegularExpressions
NameSpace ExemplesRegEx
Public Class Verification
Shared Sub Main()
Dim verif as Regex = new Regex("[0-9]{10}")
Dim numero as String = "0123456789"
Dim isNumero As Boolean = verif.IsMatch(numero)
If isNumero Then
Console.WriteLine("Le numéro de téléphone est valide ")
Else
Console.WriteLine("Le numéro de téléphone n'est pas valide ")
End If
End Sub
End Class
End NameSpace
|
II-M. XML
| xml |
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<xiti>
<alias>Dotnet</alias>
<logger>logv99</logger>
<id>12345</id>
</xiti>
</document>
|
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/developpez/www/developpez-com/upload/nono40/temp/testmp/index.php on line 41
Warning: include(http://nono40.developpez.com/temp/xmltestref.inc): failed to open stream: no suitable wrapper could be found in /home/developpez/www/developpez-com/upload/nono40/temp/testmp/index.php on line 41
Warning: include(): Failed opening 'http://nono40.developpez.com/temp/xmltestref.inc' for inclusion (include_path='.:/opt/php56/lib/php') in /home/developpez/www/developpez-com/upload/nono40/temp/testmp/index.php on line 41


Copyright © 2010 Toto.
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.