Official Asymptote example – NURBSsphere

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 8 h 13 min

You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import three; /* Reference: @article{Qin97, title={{Representing quadric surfaces using NURBS surfaces}}, author={Qin, K.}, journal={Journal of Computer Science and Technology}, volume={12}, number={3}, pages={210–216}, year={1997}, publisher={Springer} } */ size(10cm); currentprojection=perspective(5,4,2,autoadjust=false); [...]


Official Asymptote example – NURBScurve

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 7 h 13 min

You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import three; size(10cm); currentprojection=perspective(50,80,50); // Nonrational curve: // udegree=3, nu=6; real[] knot={0,0,0,0,0.4,0.6,1,1,1,1}; triple[] P={ (-31.2061,12.001,6.45082), (-31.3952,14.7353,6.53707), (-31.5909,21.277,6.70051), (-31.4284,25.4933,6.76745), (-31.5413,30.3485,6.68777), (-31.4896,32.2839,6.58385) }; draw(P,knot,green); // Rational Bezier curve: // udegree=3, [...]


Fork de php-mode pour Emacs permettant de supporter les namespaces et # pour commenter

Category: Emacs,PHPPh. Ivaldi @ 2 h 17 min

Voici enfin un patch fork qui ajoute la gestion des namespaces, de la notation heredoc ainsi que le support de # comme caractère de commentaire à cette version de php-mode. Pour l’appliquer, télécharger le patch et lancer cette simple commande patch php-mode.el < php-mode.el.diff Voilà la résultat après redémarrage d’Emacs : # is finally rendered correctly [...]


Fork of php-mode for emacs in order to handle namespaces and # as commenting character

Category: Emacs,PHPPh. Ivaldi @ 1 h 36 min

Finally, a patch fork that adds support for namespaces, heredoc and the support of # as comment character for this version of php-mode. To apply it, download the patch and execute this simple command line patch php-mode.el < php-mode.el.diff After restarting Emacs, you should obtain something like this # is finally rendered correctly namespace Pi\Truc\Bidule; [...]


PIPRIME.FR est membre de l’APRIL

Category: AsymptotePh. Ivaldi @ 10 h 07 min

PIPRIME.FR soutient l’APRIL


Loguer les erreurs de Tidy dans ZFDebug

Category: PHP,ZendPh. Ivaldi @ 10 h 25 min

Basé sur l’article de Ryan David Mauger, « Keeping your HTML valid with Zend Framework, Tidy and Firebug », cet article montre comment loguer les erreurs reportées par Tidy dans la barre de log ZFDebug.


Les 7 péchés de Windows 7

Category: Divers Ph. Ivaldi @ 12 h 00 min

Du fait que Windows 7 est propriétaire, Microsoft s’adjuge un contrôle légal sur ses utilisateurs par toute une gamme de copyrights, contrats et brevets. Microsoft use de son pouvoir pour abuser ses utilisateurs. Sur le site windows7sins.org, la Free Software Foundation dresse la liste de sept exemples d’abus perpétrés par Microsoft.


Exemples d’utilisation courante de la commande find (shell UNIX/Linux)

Category: Administration,LinuxPh. Ivaldi @ 11 h 34 min

Cet article présente quelques exemples d’utilisation courante de la commande shell Unix find.


Script bash pour générer le fichier de toutes les fonctions PHP

Category: Linux,PHP,Script ShellPh. Ivaldi @ 5 h 57 min

Un script bash qui permet de générer la liste de toutes les fonctions PHP.


BBCODE dans les commentaires de WordPress

Category: PHP,WordPressPh. Ivaldi @ 12 h 41 min

Pour implémenter le bbcode « code » dans les commentaires de WordPress il suffit de mettre les lignes suivantes dans le fichier function.php de son thème. function pi_comment($comment) { $comment = preg_replace(‘/\[code\](.+)\[\/code\]/smU', '<pre style="padding:1em 0 1em 5px;">\1</pre>', htmlspecialchars($comment,ENT_QUOTES,'UTF-8',false)); return $comment; } add_filter('comment_text', 'pi_comment',0); Ne pas oublier le paramètre false dans la fonction htmlspecialchars, cela évite de convertir [...]