View fib_log.py
# | |
from decimal import * | |
def fib(n): | |
return fib_iter(1,0,0,1,Decimal(n)) | |
def fib_iter(a,b,p,q,n): | |
nb_iter = 0 | |
while n != 0: |
View use-array_key_exists.php
<?php | |
$a = ['AB' => 12, 'CB' => 34]; | |
echo "Cas nominal : La clé est présente dans le tableau".PHP_EOL; | |
echo (int)array_key_exists('AB', $a).PHP_EOL; | |
echo (int)isset($a['AB']).PHP_EOL; | |
echo (int)!empty($a['AB']).PHP_EOL; | |
echo "Cas nominal : La clé n'est pas présente dans le tableau".PHP_EOL; |
View alert.js
alert("plop"); |