This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
carre(X, Result) :- Result is X * X. | |
list_carre([X], [XCarre]) :- carre(X, XCarre). | |
list_carre([X|R], [XCarre| Result1]):- lcarre(R, Result1), carre(X, XCarre). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fibo(1, Result):- Result is 1. | |
fibo(2, Result):- Result is 1. | |
fibo(X, Result):- X > 2, X1 is X - 1, X2 is X - 2, fibo(X1, ResultN1), fibo(X2, ResultN2), Result is ResultN1 + ResultN2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fact(0,1). | |
fact(1,1). | |
fact(X, Result):- X > 1, X1 is X-1, fact(X1, Result1), Result is Result1 * X. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% list_contains(5, [1,2]) % Renvoie false | |
% list_contains(5, [1,5]) % Renvoie true | |
list_contains(X, [X|_]). | |
list_contains(X, [_|R]):- list_contains(X, R). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Programme sur les liens familiaux */ | |
pere(paul, jean). | |
pere(paul, frederic). | |
pere(emilie, marie). | |
pere(jean, andre). | |
pere(jean, cathy). | |
pere(jean, francis). | |
pere(frederic, marc). | |
pere(frederic, lisa). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
"DisableUNCCheck"=dword:00000001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$loader = require_once __DIR__.'/vendor/autoload.php'; | |
$loader -> add('Application', __DIR__); // PSR-0 autoloading, the directory '__DIR__/Application' must exists | |
$app = new Silex\Application(); | |
$app->run(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo curl -s https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disable directory browsing | |
Options All -Indexes | |
# Deny access to this directory for anybody | |
Order allow,deny | |
Deny from all |