Developpement
1. vimrc howto
you you can find below my vimrc i used on most of my servers.
here is what it does:
- :ai : 'autoindent' does nothing more than copy the indentation from the previous line, when starting a new line. It can be useful for structured text files, or when you want to control most of the indentation manually, without Vim interfering
- :si : 'smartindent' automatically inserts one extra level of indentation in some cases, and works for C-like files
.
- filetype : based on the file extension it will enable some plugins (colorisation, indentation etc)
- syntax : it will colorized your file
- background : the background is set to black
- ignorecase: it will ignore the case when searching (using /)
- highlight search
- show matching bracket when going over
- switch buffer with F5 then <tab>
- paste mode with F2
i created this vimrc thanks to a lot of different people over Internet.
1. Recuperation du flux Video
initiate:
http://ip address:port/cgibin/CGIProxy.fcgi?usr=admin&pwd=xxx&cmd=setSubStreamFormat&format=1
then:
http://192.168.1.117:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=admin&pwd=xxx
tutorial opencv python camera ip
http://robokite.blogspot.fr/2013/04/opencv-python-ip-webcam.html
Annexe
Source:
https://learn.adafruit.com/raspberry-pi-face-recognition-treasure-box/software
http://thinkrpi.wordpress.com/magic-mirror/
tuto pour recuperer le flux de la camera:
tuto python opencv
https://realpython.com/blog/python/face-recognition-with-python/
Tutorial tiré de : http://fr.openclassrooms.com/informatique/cours/des-applications-ultra-rapides-avec-node-js
node.js est du javascript executé coté serveur.
1.Différence entre Apache et node.js
Node.js est un environnement de développement JavaScript basé sur les évènements. l y a un seul thread mais aucune opération n'est bloquante. Ainsi, les opérations un peu longues (chargement d'un fichier, téléchargement d'une page web, démarrage d'un serveur web...) sont lancées en tâche de fond et une fonction de callback est appelée quand l'opération est terminée. contrairement à Apache qui est multithread.
1.1 Apache
1.2 node.js
2. Exemple simple serveur HTTP
2.1 Exemple 1
dans un fichier test.js
Ensuite pour le lancer, depuis un terminal:
node test.js
Ensuite dans un navigateur http://localhost:8080
2.2 Exemple 2 récuperation de variable
3.http server express.js
express.js est un module pour node.js qui permet de créer plus rapidement des serveurs http.
il faut auparavant l'installer via npm:
1.express.js
express.js est un module pour node.js qui permet de créer plus rapidement des serveurs http.
il faut auparavant l'installer via npm:
zz
1. Example getopts
2. explication
la chaine passé à getopt permet de définir les options:
- le 1er ":" signifie de laisser l'utilisateur gérer les erreurs. sinon getopts s'en charge
- "h" signifie que l'option "h" est valide
- "f:" signifie que l'option "f" est valide et qu'elle attend un argument
- "g:" même chose
on peut donc lancer le script ainsi:
L'utilisation d'une option invalide (non comprise dans la liste fournise à getopts) sera rejeté.