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 | |
if (!empty($_GET['p'])) | |
{ | |
if (is_file($_GET['p'].".php")) | |
{ | |
include($_GET['p'] . ".php"); | |
} | |
else | |
{ | |
echo 'error'; |
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 | |
/** | |
* @author Florent Viel | |
*/ | |
class MailAttachmentManager | |
{ | |
/** | |
* @var string {host:port\params}BOX voir http://fr.php.net/imap_open | |
*/ |
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
#!/usr/bin/env php | |
<?php | |
require_once("attachmentread.class.php"); | |
$host="{host:port/params}BOX"; // voir http://fr.php.net/imap_open | |
$login=""; //imap login | |
$password=""; //imap password | |
$savedirpath="./" ; // attachement will save in same directory where scripts run othrwise give abs path | |
$jk=new MailAttachmentManager($host, $login, $password, $savedirpath); // Creating instance of class#### | |
?> |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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 | |
$start_request = microtime(true); | |
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |
$configuration = ProjectConfiguration::getApplicationConfiguration('front', 'dev', true); | |
sfContext::createInstance($configuration)->dispatch(); | |
$enable_graphite = sfConfig::get('app_enable_graphite'); |
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
function modifieTexte() { | |
var t2 = document.getElementById("t2"); | |
t2.firstChild.nodeValue = "trois"; | |
} | |
function load() { | |
var el = document.getElementById("t"); | |
el.attachEvent("onclick", modifieTexte); | |
} |
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
function modifieTexte() { | |
var t2 = document.getElementById("t2"); | |
t2.firstChild.nodeValue = "trois"; | |
} | |
function load() { | |
var el = document.getElementById("t"); | |
el.addEventListener("click", modifieTexte, false); //ne marche pas | |
} |
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
fviel@grievous ⮀ ~/git/newkozikaza ⮀ ⭠ master ⮀ ls -l vendor/composer | |
total 164 | |
-rw-r--r-- 1 fviel users 1320 7 mai 14:16 autoload_classmap.php | |
-rw-r--r-- 1 fviel users 5674 7 mai 14:16 autoload_namespaces.php | |
-rw-r--r-- 1 fviel users 1380 7 mai 14:16 autoload_real.php | |
-rw-r--r-- 1 fviel users 6857 7 mai 14:16 ClassLoader.php | |
-rw-r--r-- 1 fviel users 139733 7 mai 14:16 installed.json | |
fviel@grievous ⮀ ~/git/newkozikaza ⮀ ⭠ master ● ⮀ |
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 | |
function benchStrintf() { | |
$begin = microtime(true); | |
for ($i=0; $i<1000000; $i++) { | |
$result = sprintf('%d = %d + %d selon %s', 42, 11, 31, 'php'); | |
} | |
var_dump(microtime(true)-$begin); | |
} |
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 | |
/** | |
* TimThumb by Ben Gillbanks and Mark Maunder | |
* Based on work done by Tim McDaniels and Darren Hoyt | |
* http://code.google.com/p/timthumb/ | |
* | |
* GNU General Public License, version 2 | |
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
* | |
* Examples and documentation available on the project homepage |
OlderNewer