
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (37)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (6427)
-
Python UnicodeEncodeError : 'charmap' codec can't encode when using GEOPY
9 août 2015, par Tony RoczzI have been fiddling with python geopy and I tried the basic commands given in the documentation. But I am getting the UnicodeEncodeError when trying the
raw
command(to geolocate a query to an address and coordinates)print(location.raw)
Error
UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in position 83: character maps to <undefined></undefined>
Then I tried the other way around (To find the address corresponding to a set of coordinates)
print(location.address)
I am getting the same error
UnicodeEncodeError: 'charmap' codec can't encode character '\u0101' in position 10: character maps to <undefined></undefined>
I tried
print((location.address).encode("utf-8"))
, now am not getting any error but the output printed is like thisb'NH39, Mirz\xc4\x81pur
and when using
print((location.raw).encode("utf-8"))
I am getting errorAttributeError: 'dict' object has no attribute 'encode'
Can anyone tell me what is going on here and what I should do to get a proper output ?
Edit :(After being marked as duplicate)
Based on the solution given in this problem I am reporting on how it does not solve my problem
What I wanted to know is why do I get the UnicodeEncodeError when trying out the basic sample codings given in the documentation and it did answer for that.
If I want to use it an application how do I solve the error and I cannot have the application running on separate IDE or send the output to a external file since my application will function based on the output from geopy, I want the application to run in the terminal as my other applications do.
-
Anomalie #2698 (Fermé) : mauvais hashage du mot de passe
10 mai 2012, par denisb -touche (au moins) les spip en 2.1 et 3.0 alors que "Prof_Mathématiques_Site01" est un mot de passe valide, "Prof_Mathematiques_Site01", s’il est bien enregistré (accepté sans message d’erreur) en base, n’est pas reconnu lors de la phase de login => "Erreur de mot de passe." on notera la subtile (...)
-
the ffmpeg recording does not stop after the test case is successfully executed,
21 mai 2024, par ghufranI am new to selenium, I want to add screen recording in my test cases, and I am using ffmpeg. The issue i am facing is the recording successfully starts, but it does not stop after the test case is successfully executed.


Below is how my code is strcutured :


package utilities;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ScreenRecording {

 private Process ffmpeg;
 private String outputFilePath;
 private boolean isRecording;

 public ScreenRecording(String outputFilePath) {
 this.isRecording = false;
 this.outputFilePath = outputFilePath;
 }

 public void startRecording() throws IOException {
 String command = String.format(
 "ffmpeg -y -f gdigrab -framerate 30 -probesize 100M -analyzeduration 10M -i desktop -vf \"crop=1920:1080:0:0\" -c:v libx264 -preset ultrafast -qp 0 -pix_fmt yuv420p %s",
 outputFilePath
 );
 System.out.println("Executing command: " + command); // Print command for debugging
 try {
 ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", command);
 builder.redirectErrorStream(true); // Combine error and output streams
 ffmpeg = builder.start();
 isRecording = true;

 // Log output and errors
 new Thread(() -> {
 try (BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpeg.getInputStream()))) {
 String line;
 while ((line = reader.readLine()) != null) {
 System.out.println(line);
 }
 } catch (IOException e) {
 e.printStackTrace();
 }
 }).start();
 } catch (IOException e) {
 e.printStackTrace(); // Print exception for debugging
 throw e; // Rethrow exception to propagate it to the caller
 }
 }

 public void stopRecording() {
 if (ffmpeg != null) {
 ffmpeg.destroy();
 System.out.println("Recording stopped.");
 isRecording = false;
 }
 }

 public boolean isRecording() {
 return isRecording;
 }
}




public class AccountFeatures extends BaseTest {

 @Test(testName = "Register User")
 public void testRegisterUserScenario() throws InterruptedException {
 HomePage homePage = new HomePage(driver);
 LoginPage loginPage = new LoginPage(driver);
 SignUpPage signUpPage = new SignUpPage(driver);
 homePage.clickOnLogin();
 Assert.assertEquals(loginPage.getSingupText(), "New User Signup!");
 loginPage.enterUserName(randomName);
 loginPage.enterUserEmail(randomEmail);
 loginPage.clickOnSignUpButton();
 signUpPage.clickOnTitle();
 signUpPage.enterPassword(randomPassword);
 signUpPage.selectDate(birthDay);
 signUpPage.selectMonth("December");
 signUpPage.selectYear();
 signUpPage.selectFromCountryDropDown("Canada");
 }
}



import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import utilities.ScreenRecording;
import webdrivers.DriverManager;

import java.io.IOException;

public class BaseTest {

 protected WebDriver driver;
 private ScreenRecording recorder;

 @BeforeMethod
 public void setUp() throws IOException {
 // Initialize WebDriver (you can choose Chrome, Firefox, etc.)
 String outputFilePath = "D:\\Projects\\screen_recordings\\screen_recording.mp4";
 recorder = new ScreenRecording(outputFilePath);
 recorder.startRecording();
 driver = DriverManager.getDriver();
 driver.get(DataConfig.baseUrl);
 driver.manage().window().maximize();
 }

 @AfterMethod
 public void tearDown() {
 if (driver != null) {
 driver.quit();
 }
 if (recorder != null && recorder.isRecording()) {
 recorder.stopRecording();
 }
 }
}



I tried different solutions but it does not work at all. Before that i was using @AfterTest annotations but it was giving stack overflow exception.