
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)
Sur d’autres sites (11091)
-
Evolution #3955 : Amélioration de l’API de détection et de changement de langue
6 juin 2017, par RastaPopoulos ♥De la navigation ? C’est surtout une amélioration de l’API de cherchage de langue, et d’application et de langue et son enregistrement en cookie, à mon avis.
Concrètement il faudrait :
- une fonction générique pour chercher la langue préférée de l’utilisateurice modulo les langues réelles du site (= renvoyer la langue du site que préfère la personne) : chercher_langue_preferee()
- que utiliser_langue_preferee() applique la langue préférée, mais qui existe vraiment dans le site, cf apparemment les modifs qu’a dû faire Real3T
- une fonction générique pour enregistrer une langue donnée en paramètre dans la session/le cookie de la personne qui visite le hit, apparemment on n’a pas de fonction qui fait ça proprement : enregistrer_lanngue_visiteur($lang) ?
- éventuellement, avoir directement une fonction qui combine tout : qui cherche la langue préférée, qui la garde en mémoire chez la personne, et qui l’applique pour le hit en cours : enregistrer_langue_preferee() ?
- avoir une constante qui permet d’activer ce comportement directement (du genre _LANG_ENREGISTRER_PREFEREE) sans rien avoir à coder soi-même ! Et qui serait donc à appliquer par les squelettes qui ont besoin de ce comportement
- éventuellement avoir une option pour activer ça par interface humaine, mais qui ne serait active que si la constante n’est pas définie ! (si la constante est définie, alors l’option est grisée avec sa valeur définie dans la constante, et une phrase expliquant que c’est déjà définie dans le code : "Le comportement de recherche de la langue préférée est déjà défini dans le code de votre site.")Peut-être aussi qu’il serait pas mal de rendre cohérent toutes les fonctions en les préfixant pareilles, lang_chercher_preferee(), lang_utiliser_preferee(), lang_enregistrer($lang), lang_enregistrer_preferee(), avec les anciennes fonctions toujours là qui appelleraient les nouvelles.
Voilà tout ce qui m’est venu pour rendre tout ça cohérent, lisible, facile à apprendre et retenir.
-
How to Terminate a Process Normally Created using ProcessBuilder
30 janvier 2015, par Bilal Ahmed YaseenI am creating Processes using ProcessBuilder in my Java Application. The created process executes some FFMPEG commands which actually copy the RTSP streams in specified destination media file.
ProcessBuilder builder = new ProcessBuilder("ffmpeg", "-i", RTSP_URL, "-f", fileFormat, destFilePath);
Process processToExecute = builder.start();I want to close the process before it completes its execution. So, If I run this FFMPEG command directly in windows CMD and then press ’CTRL+C’ after 5 seconds then process get terminates with status ’2’. And I can play the media file created so far.
So, If I do the same operation in my Java Application using :
process.destroy(); //I call this method after 5 sec
I get the status code ’1’ which means abnormal termination. I get the status by the following way :
processToExecute.destroy();
processToExecute.exitValue(); //This return me status '1'And I can’t play the media file and I think this is due to the abnormal termination of the process.
So how I can terminate the process created using ProcessBuilder in the same way we do in CMD with (CTRL+C) so that I may play the created media file ?
I want to terminate process (created using ProcessBuilder) in Java Application with status code of ’2’ that I get when I terminate process using CMD.
EDIT#01 : --- Sharing Findings
So, when I try to delete that file once app terminates, I get the following error :
The Action Can't be Performed Because File is Opened in FFMPEG.exe
Which means that process is not terminating the command it is executing. That command still has occupied this file that’s why I am not getting able to play it. Process gets terminate when I call :
processToExecute.destroy();
But, the task it is performing (that is execution of a command) is still active. Strange !!!!
EDIT#02 : Sharing Ultimate Reason
Actually If I directly press ’CTRL+C’ or ’q’ in cmd when process is running then it terminates the process successfully and this process is no more visible in the currently executing processes lists.
And Programatically when I call method :
cmd> processToExecute.destroy();
It terminates the process but when I see the list of currently executing processes I can still see them over there.
And same scenario exists If I try to terminate this process using ’taskkill’ or ’kill’ command in another CMD by specifying their’s name or pid that still process terminates abnormally.
P.S. I use the following command to see the running processes :
tasklist
So from this it proves that destroy() method from Application and ’taskkill or kill’ command from another CMD is not terminating the process normally that pressing ’CTRL+C’ and ’q’ does.
-
How to Terminate a Process Normally Created using ProcessBuilder
22 avril, par Bilal Ahmed YaseenI am creating Processes using ProcessBuilder in my Java Application. The created process executes some FFMPEG commands which actually copy the RTSP streams in specified destination media file.


ProcessBuilder builder = new ProcessBuilder("ffmpeg", "-i", RTSP_URL, "-f", fileFormat, destFilePath);
Process processToExecute = builder.start();



I want to close the process before it completes its execution. So, If I run this FFMPEG command directly in windows CMD and then press 'CTRL+C' after 5 seconds then process get terminates with status '2'. And I can play the media file created so far.


So, If I do the same operation in my Java Application using :


process.destroy(); //I call this method after 5 sec



I get the status code '1' which means abnormal termination. I get the status by the following way :


processToExecute.destroy();
 processToExecute.exitValue(); //This return me status '1'



And I can't play the media file and I think this is due to the abnormal termination of the process.


So how I can terminate the process created using ProcessBuilder in the same way we do in CMD with (CTRL+C) so that I may play the created media file ?


I want to terminate process (created using ProcessBuilder) in Java Application with status code of '2' that I get when I terminate process using CMD.


EDIT#01 : --- Sharing Findings


So, when I try to delete that file once app terminates, I get the following error :


The Action Can't be Performed Because File is Opened in FFMPEG.exe



Which means that process is not terminating the command it is executing. That command still has occupied this file that's why I am not getting able to play it. Process gets terminate when I call :


processToExecute.destroy();



But, the task it is performing (that is execution of a command) is still active. Strange !!!!


EDIT#02 : Sharing Ultimate Reason


Actually If I directly press 'CTRL+C' or 'q' in cmd when process is running then it terminates the process successfully and this process is no more visible in the currently executing processes lists.


And Programatically when I call method :


cmd> processToExecute.destroy();



It terminates the process but when I see the list of currently executing processes I can still see them over there.


And same scenario exists If I try to terminate this process using 'taskkill' or 'kill' command in another CMD by specifying their's name or pid that still process terminates abnormally.


P.S. I use the following command to see the running processes :


tasklist



So from this it proves that destroy() method from Application and 'taskkill or kill' command from another CMD is not terminating the process normally that pressing 'CTRL+C' and 'q' does.