This file contains hidden or 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 | |
require "Chart.php"; | |
?> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Charts</title> | |
<link rel="stylesheet" href="chart.css"> | |
<script src="ChartJS.min.js"></script> |
This file contains hidden or 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 | |
$PieChart = new Chart('pie', 'examplePie'); | |
$PieChart->set('data', array(2, 10, 16, 30, 42)); | |
$PieChart->set('legend', array('Work', 'Eat', 'Sleep', 'Listen to music', 'Code')); | |
$PieChart->set('displayLegend', true); | |
echo $PieChart->returnFullHTML(); | |
?> |
This file contains hidden or 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 | |
class User | |
{ | |
protected $name; | |
/* | |
Returns < 0 if $a->name is less than $b->name; > 0 if $a->name is greater than $b->name, and 0 if they are equal. | |
*/ | |
static function sortUsersName(User $a, User $b) | |
{ |
This file contains hidden or 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
// | |
// This function moves long emails in your Inbox to the Archive folder and warn the sender that you don't want to read too long emails. | |
// It could be very useful if you want to keep a clean inbox and spend less time reading and writring emails | |
// Just run it every 5 minutes (for example) and you'll be fine! | |
// | |
// Copyleft - Antoine AUGUSTI - www.antoine-augusti.fr - 2013 | |
// | |
function filterLongEmails() | |
{ |
This file contains hidden or 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
program triInsertion; | |
const MAX = 20; | |
var t : array[1..MAX] of integer; | |
var nb : integer; | |
type tableau = array[1..MAX] of integer; | |
{On recherche où placer l'élément sur l'intervalle [1..borneSup]} | |
function obtenirIndiceDInsertion (t : tableau; borneSup, lEntier : integer) : integer; | |
var i : integer; | |
begin |
This file contains hidden or 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 | |
function age($naiss) | |
{ | |
list($jour, $mois, $annee) = split('[/]', $naiss); | |
$today['mois'] = date('n'); | |
$today['jour'] = date('j'); | |
$today['annee'] = date('Y'); | |
$annees = $today['annee'] - $annee; |
This file contains hidden or 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
// Dans le menu | |
<a href="signup" onClick="_gaq.push(['_trackEvent', 'Page d\'inscription', 'Clic', 'Menu']);" title="Inscription">Inscription</a> | |
// Dans l'article de blog | |
<a href="signup" onClick="_gaq.push(['_trackEvent', 'Page d\'inscription', 'Clic', 'Article de blog']);" title="Inscription">Inscription</a> | |
// Dans le footer | |
<a href="signup" onClick="_gaq.push(['_trackEvent', 'Page d\'inscription', 'Clic', 'Footer']);" title="Inscription">Inscription</a> |
This file contains hidden or 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 | |
ini_set('session.cookie_domain', substr($_SERVER['SERVER_NAME'], strpos($_SERVER['SERVER_NAME'], "."), 100)); |
This file contains hidden or 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
postfix reload | |
# Reponse de Postfix : | |
#postfix/postfix-script: refreshing the Postfix mail system | |
postsuper -r ALL | |
# Exemple de reponse : | |
#postsuper: Requeued: 42 messages | |
postfix flush |
This file contains hidden or 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
#amavis unix - - - - 2 smtp | |
# -o smtp_data_done_timeout=1200 | |
# -o smtp_send_xforward_command=yes |