<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ismaël Maurice</title>
    <description>The latest articles on Forem by Ismaël Maurice (@isma).</description>
    <link>https://forem.com/isma</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F708008%2F4619b8bd-15f5-41cf-8481-b066c2521bf8.jpeg</url>
      <title>Forem: Ismaël Maurice</title>
      <link>https://forem.com/isma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/isma"/>
    <language>en</language>
    <item>
      <title>Similitude par cosinus</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Fri, 16 May 2025 03:47:15 +0000</pubDate>
      <link>https://forem.com/isma/similitude-par-cosinus-ga6</link>
      <guid>https://forem.com/isma/similitude-par-cosinus-ga6</guid>
      <description>&lt;p&gt;La similitude par cosinus permet de déterminer le degré de similitude entre deux phrases par calcul du cosinus de l'angle formé par les deux vecteurs de chacune de ces phrases.&lt;/p&gt;

&lt;p&gt;Soit les phrases suivantes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bonjour John.&lt;/li&gt;
&lt;li&gt;Bonjour Doé.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On remarque que les deux phrases sont similaires mais comment le savoir avec un ordinateur.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;En raison de la difficulté d'ajout de formule Mathématiques dans dev.to, vous trouverez l'article sur le sujet dans le pdf disponible ici:&lt;/strong&gt; &lt;a href="https://github.com/tisma95/articles/blob/master/cosine-similarity/dist/cosine-similarity_fr.pdf" rel="noopener noreferrer"&gt;Similitude par cosinus&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vous trouverez des exemples de codes ici:&lt;/strong&gt; &lt;a href="https://github.com/tisma95/articles/tree/master/cosine-similarity/sentence-similarities-benchmark" rel="noopener noreferrer"&gt;Calcul de la similitude de différentes manières&lt;/a&gt; &lt;strong&gt;qui montre diverses méthodes de calcul de manière native avec Python, SpaCy, NLTK.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>algorithms</category>
      <category>ai</category>
      <category>mathematics</category>
    </item>
    <item>
      <title>Cosine similarity</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Fri, 16 May 2025 03:36:49 +0000</pubDate>
      <link>https://forem.com/isma/cosine-similarity-33kf</link>
      <guid>https://forem.com/isma/cosine-similarity-33kf</guid>
      <description>&lt;p&gt;Similarity by cosine determines the degree of similarity between two sentences by calculating the cosine of the angle formed by the two vectors in each sentence.&lt;/p&gt;

&lt;p&gt;Consider the following sentences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bonjour John.&lt;/li&gt;
&lt;li&gt;Bonjour Doé.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that the two sentences are similar, but how can you tell with a computer?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Due to the difficulty of adding mathematical formulas to dev.to, you will find the article on the subject in the pdf available here:&lt;/strong&gt; &lt;a href="https://github.com/tisma95/articles/blob/master/cosine-similarity/dist/cosine-similarity_en.pdf" rel="noopener noreferrer"&gt;Cosine similarity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code examples can be found here:&lt;/strong&gt; &lt;a href="https://github.com/tisma95/articles/tree/master/cosine-similarity/sentence-similarities-benchmark" rel="noopener noreferrer"&gt;Calculating similarity in different ways&lt;/a&gt; &lt;strong&gt;which shows various calculation methods natively with Python, SpaCy, NLTK.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>algorithms</category>
      <category>ai</category>
      <category>mathematics</category>
    </item>
    <item>
      <title>Comment rendre les logs utiles ?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 28 Sep 2024 10:46:41 +0000</pubDate>
      <link>https://forem.com/isma/comment-rendre-les-logs-utiles--j8</link>
      <guid>https://forem.com/isma/comment-rendre-les-logs-utiles--j8</guid>
      <description>&lt;h2&gt;
  
  
  Comment rendre les logs utiles ?
&lt;/h2&gt;

&lt;p&gt;En tant que développeurs, les logs constituent la partie expressive de notre application. Ils permettent de capturer l’activité d’une application.&lt;/p&gt;

&lt;p&gt;En programmation informatique, un développeur peut décider d’afficher ou non les logs dans son application qui peut être une aide de traçabilité en cas de erreurs.&lt;/p&gt;

&lt;p&gt;Le problème qui se pose maintenant est de savoir quoi afficher et où d’où l’objet de cet article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logs dans une fonction unique
&lt;/h2&gt;

&lt;p&gt;Par définition, une fonction reçoit en entrée aucun ou plusieurs paramètres, ensuite effectue des opérations et retourne un résultat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rnx5fs6iams9uc22isn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rnx5fs6iams9uc22isn.png" alt="Architecture d'une fonction" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dans une fonction simple les informations utiles à afficher dans les logs sont :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Le(s) paramètre(s) que la fonction reçoit.&lt;/li&gt;
&lt;li&gt;Le résultat après opérations (optionnel utile quand on a une suite d’appel de fonctions).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Par exemple pour une fonction qui ne prend aucun paramètre et retourne le message ‘Hello’ on aurait en Python :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wegkbdq33hveajaies8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wegkbdq33hveajaies8.png" alt="Log d'une fonction sans paramètre" width="605" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Supposons que la fonction prenne en paramètre un nom et retourne « Hello nom d’utilisateur », on aurait :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzixc4ty6tlms16fmq5kb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzixc4ty6tlms16fmq5kb.png" alt="Log d'une fonction avec paramètres" width="605" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Si on veut afficher le résultat de la fonction dans les logs on aurait :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzb0o8fmoasy7z50lvda9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzb0o8fmoasy7z50lvda9.png" alt="Log d'une fonction avec paramètres et résultat" width="605" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quand les paramètres contiennent des informations confidentielles comme l’email et mot de passe, il ne faut pas afficher ces informations dans les logs il faut les remplacer par **.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Logs dans une suite de fonctions
&lt;/h2&gt;

&lt;p&gt;Un programme informatique est une suite de fonctions et méthodes qui s’appellent entres elles. Supposons un programme constitué de 3 fonctions &lt;em&gt;fonction A&lt;/em&gt;,&lt;em&gt;fonction B&lt;/em&gt; et &lt;em&gt;fonction C&lt;/em&gt; avec la pile suivante :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lox3uzssec777ksrbx4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lox3uzssec777ksrbx4.png" alt="Architecture d''appel de plusieurs fonctions" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quand on a plusieurs fonctions les logs doivent se présenter comme suit :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;La fonction appelante doit afficher ses paramètres lors de son appel.&lt;/li&gt;
&lt;li&gt;La fonction appelante après avoir exécuté une autre fonction doit afficher le résultat obtenu.&lt;/li&gt;
&lt;li&gt;La fonction appelante peut afficher le résultat renvoyé.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Soit une fonction main qui appelle une fonction obtenirNom et avec le nom saisi par l’utilisateur appelle une fonction hello pour afficher le message ‘Hello nom d’utilisateur’.&lt;/p&gt;

&lt;p&gt;Si on veut appliquer les logs dans cette suite de fonctions on aurait :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F317rmdasr8kgdrt2imat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F317rmdasr8kgdrt2imat.png" alt="Log d'une suite de fonctions" width="605" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;L’exécution donnerait :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2sdyrw58joqqlukwff2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2sdyrw58joqqlukwff2.png" alt="Log d'une suite de fonctions exécution" width="527" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dans les exemples précédents nous avons utilisé la fonction print pour afficher les logs. Dans vos projets il faut préférer des modules de logs de votre langage. En Python, vous pouvez utiliser &lt;a href="https://docs.python.org/3/library/logging.html" rel="noopener noreferrer"&gt;Logging&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Les techniques décrites plus haut reste adaptable selon vos besoins.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quand les paramètres contiennent des informations confidentielles comme l’email et mot de passe, il ne faut pas afficher ces informations dans les logs il faut les remplacer par **.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>code</category>
      <category>python</category>
    </item>
    <item>
      <title>How to make logs useful?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 28 Sep 2024 10:39:54 +0000</pubDate>
      <link>https://forem.com/isma/how-to-make-logs-useful-3b9a</link>
      <guid>https://forem.com/isma/how-to-make-logs-useful-3b9a</guid>
      <description>&lt;h2&gt;
  
  
  How to make logs useful?
&lt;/h2&gt;

&lt;p&gt;As developers, logs are the expressive part of our application. They allow us to capture the activity of an application.&lt;/p&gt;

&lt;p&gt;In computer programming, a developer can decide whether to display logs in his application, which can be a traceability aid in the event of errors.&lt;/p&gt;

&lt;p&gt;The problem now is to know what to display and where, hence the purpose of this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logs in a single function
&lt;/h2&gt;

&lt;p&gt;By definition, a function receives one or more parameters as input, then performs operations and returns a result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flcqqk1233l4771cw4sc6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flcqqk1233l4771cw4sc6.png" alt="Function architecture" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a simple function, the useful information's to be displayed in the logs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The parameter(s) the function receives.&lt;/li&gt;
&lt;li&gt;Result after operations (optional, useful when you have a sequence of function calls).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, for a function that takes no parameters and returns the message 'Hello' we would have in Python:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mswy07zx6mmequqfgg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mswy07zx6mmequqfgg7.png" alt="Log of a function without parameters" width="605" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Suppose the function took a name as parameter and returned “Hello username”, we'd have:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6hygko81oph0d8b4ub1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6hygko81oph0d8b4ub1.png" alt="Log function with parameters" width="605" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we want to display the result of the function in the logs we would have:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegf6nn342mj9llv2t6kb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegf6nn342mj9llv2t6kb.png" alt="Log function with parameters and result" width="605" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When parameters contain confidential information such as email and password, these should not be displayed in the logs and should be replaced by **.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Logs in a sequence of functions
&lt;/h2&gt;

&lt;p&gt;A computer program is a sequence of functions and methods that call each other. Let's assume a program consisting of 3 functions: &lt;em&gt;function A&lt;/em&gt;, &lt;em&gt;function B&lt;/em&gt; and &lt;em&gt;function C&lt;/em&gt;, with the following stack:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foc86isuhp93hubqoz9pj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foc86isuhp93hubqoz9pj.png" alt="Multi-function call architecture" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you have several functions, the logs should look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The calling function must display its parameters when called.&lt;/li&gt;
&lt;li&gt;After executing another function, the calling function must display the result obtained.&lt;/li&gt;
&lt;li&gt;The calling function can display the returned result.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's say a &lt;strong&gt;main&lt;/strong&gt; function calls a &lt;strong&gt;getName&lt;/strong&gt; function and, with the name entered by the user, calls a &lt;strong&gt;hello&lt;/strong&gt; function to display the message 'Hello username'.&lt;/p&gt;

&lt;p&gt;If we want to apply the logs in this sequence of functions, we would have:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd51gede3ifxc833v43oi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd51gede3ifxc833v43oi.png" alt="Log of a sequence of functions" width="605" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Execution would give :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj60cey5u2liwg3u6tl0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj60cey5u2liwg3u6tl0r.png" alt="Log d'une suite de fonctions exécution" width="481" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In the previous examples, we used the print function to display logs. In your projects, you should use log modules from your own language. In Python, you can use &lt;a href="https://docs.python.org/3/library/logging.html" rel="noopener noreferrer"&gt;Logging&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The techniques described above can be adapted to suit your needs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When parameters contain confidential information such as email and password, these should not be displayed in the logs and should be replaced by **.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>code</category>
      <category>python</category>
    </item>
    <item>
      <title>Quelle est le rôle de la fonction id en Python ?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sun, 24 Mar 2024 15:47:20 +0000</pubDate>
      <link>https://forem.com/isma/quelle-est-le-role-de-la-fonction-id-en-python--21ol</link>
      <guid>https://forem.com/isma/quelle-est-le-role-de-la-fonction-id-en-python--21ol</guid>
      <description>&lt;h2&gt;
  
  
  Définition
&lt;/h2&gt;

&lt;p&gt;Par définition, les variables sont de façon imagée des cases dans lesquelles Python va stocker des valeurs identifiées par une étiquette appelée nom de variable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31fvtl1hg0wfalndjvld.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31fvtl1hg0wfalndjvld.jpg" alt="Etagère" width="800" height="879"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://unsplash.com/fr/photos/gros-plan-dun-tiroir-rouge-avec-des-chiffres-dessus-Z43SnJD0rrQ" rel="noopener noreferrer"&gt;Source Image&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Si la mémoire de l'ordinateur était représentée comme une étagère avec plusieurs tiroirs numéroté, la valeur d'une variable serait stockée dans un de ces tiroirs.&lt;/p&gt;

&lt;p&gt;Le rôle de &lt;em&gt;id&lt;/em&gt; en Python est de renvoyer le numéro de la case mémoire où est stockée la valeur de la variable.&lt;/p&gt;

&lt;p&gt;Pour utiliser &lt;strong&gt;id&lt;/strong&gt; on respecte le format suivant: &lt;code&gt;id(nom_variable)&lt;/code&gt;. Par exemple:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6z11b8t0rbvk53qira3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6z11b8t0rbvk53qira3.png" alt="Exemple utilisation de id" width="398" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dans l'exemple précédent on voit que les variables &lt;em&gt;a&lt;/em&gt; et &lt;em&gt;b&lt;/em&gt; ont un numéro de case mémoire différent ce qui signifie que les valeurs des variables sont stockées dans des cases mémoire différentes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La fonction id ne renvoie pas tout le temps le même numéro de case mémoire. La valeur obtenue varie d'un ordinateur à l'autre.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quand on écrit un programme en Python pour les types primitifs comme &lt;strong&gt;int&lt;/strong&gt;(entier), &lt;strong&gt;float&lt;/strong&gt;(nombre à virgule), &lt;strong&gt;bool&lt;/strong&gt;(booléen) et les types &lt;strong&gt;str&lt;/strong&gt;(chaine) lorsque deux variables ont la même valeur, les deux variables partagent la même case mémoire tant que leur valeur est identique. Comme dans les exemples ci-dessous:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw3oa7vhailhyl8cfamou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw3oa7vhailhyl8cfamou.png" alt="Exemple id sur les ints" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Le même résultat est obtenu avec les &lt;strong&gt;strings&lt;/strong&gt; type &lt;strong&gt;str&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz089x2kpcsjmyjwmqc0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz089x2kpcsjmyjwmqc0n.png" alt="Exemple id sur les types chaines" width="404" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ce mécanisme de partage de la même case mémoire n'augmente pas la mémoire occupée par une variable. 100 variables ayant la même valeur et 50 variables ayant la même valeur sont liées à une seule case mémoire.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cependant cela n'est plus pareil pour les types &lt;strong&gt;Objets&lt;/strong&gt; comme les &lt;strong&gt;list&lt;/strong&gt;(liste), &lt;strong&gt;tuple&lt;/strong&gt; et les &lt;strong&gt;dict&lt;/strong&gt;(dictionnaires). Toute déclaration d'une variable de type objet sera stockée dans une nouvelle case mémoire peu importe qu'une autre variable avec la même valeur existe ou non.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56ok4qb2iwu5d9nmhizq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56ok4qb2iwu5d9nmhizq.png" alt="Exemple sur les types objets" width="517" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contrairement aux types primitifs ici on a une augmentation du nombre de cases mémoire occupées. 100 variables de type objet occuperont 100 cases mémoires différentes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quand on utilise l'opération &lt;strong&gt;=&lt;/strong&gt; pour assigner une variable à une autre c'est la copie de la case mémoire qui est faite. &lt;strong&gt;a=b&lt;/strong&gt; signifie assigne aux variables &lt;strong&gt;a&lt;/strong&gt; et &lt;strong&gt;b&lt;/strong&gt; la même case mémoire qui est celle de &lt;strong&gt;b&lt;/strong&gt;. Vue que la case mémoire est pareil dans le cas des listes cela revient à manipuler la même liste.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lx3tlfm5ly0zp8p63c7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lx3tlfm5ly0zp8p63c7.png" alt="Exemple d'utilisation d'égalité" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Subtilité avec input
&lt;/h2&gt;

&lt;p&gt;Quand l'utilisateur entre dans le jeu cela change.&lt;/p&gt;

&lt;p&gt;Précédemment pour les types primitifs, &lt;strong&gt;id&lt;/strong&gt; renvoyait la même valeur parce les variables contenaient les mêmes valeurs. Quand on utilise la fonction &lt;strong&gt;input&lt;/strong&gt; (qui permet à l'utilisateur de saisir une valeur), la valeur saisie par l'utilisateur est stockée dans une nouvelle case mémoire.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4evfg57jlnd2bhipuf2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4evfg57jlnd2bhipuf2.png" alt="Exemple sur les mutations" width="763" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quand l'utilisateur doit saisir un nombre la saisie est stockée dans une nouvelle case mémoire car on ne sait pas si ce que va fournir l'utilisateur est une valeur déjà stockée ou non.&lt;/p&gt;

&lt;p&gt;Après la saisie de l'utilisateur, si on convertit et qu'on a la même valeur qu'une déjà stockée, l'identifiant devient celui de la valeur actuellement stockée on parle de &lt;strong&gt;mutation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ce mécanisme de mutation ne fonctionne pas avec les chaines de caractères ni avec les types objets.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quand il s'agit du type &lt;strong&gt;str&lt;/strong&gt; la case mémoire où la valeur de l'utilisateur est stockée ne changera pas même si la même valeur existe déjà c'est pourquoi on dit que les chaine de caractères &lt;strong&gt;str&lt;/strong&gt; sont &lt;strong&gt;immuables&lt;/strong&gt; car leur &lt;strong&gt;id&lt;/strong&gt; ne change plus quand déjà alloué.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7f0olcc6xvn7e8kyx8v8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7f0olcc6xvn7e8kyx8v8.png" alt="Exemple sans mutation" width="645" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Subtilité des comparaisons avec &lt;em&gt;is&lt;/em&gt; et &lt;em&gt;is not&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Il existe en Python les mots clés &lt;strong&gt;is not&lt;/strong&gt; et &lt;strong&gt;is&lt;/strong&gt; qui sont utilisés par certains programmeurs (moi y compris je suis tombé dans le piège d'où l'objet de l'article) parfois à tort pour vérifier si deux variables ont la même valeur.&lt;/p&gt;

&lt;p&gt;Cependant cette méthode ne signifie pas la même chose quand on parle des types complexes comme les &lt;strong&gt;string&lt;/strong&gt; (chaines de caractères).&lt;/p&gt;

&lt;p&gt;En réalité les mots clés &lt;strong&gt;is&lt;/strong&gt; et &lt;strong&gt;is not&lt;/strong&gt; font une comparaison des cases mémoire c'est à dire du résultat des valeurs de &lt;strong&gt;id&lt;/strong&gt; pas des valeurs des variables.&lt;/p&gt;

&lt;p&gt;Ces mots clés vérifient que deux variables sont stockées dans la même case mémoire. Pour comparer les valeurs on utilisera &lt;strong&gt;==&lt;/strong&gt; et &lt;strong&gt;!=&lt;/strong&gt; quand on parle des chaines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb9qj0qedjnjrvbobx1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb9qj0qedjnjrvbobx1b.png" alt="Exemple is sur les types entiers" width="413" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;==&lt;/em&gt; et &lt;em&gt;!=&lt;/em&gt; sur les types primitifs sont identiques que &lt;em&gt;is&lt;/em&gt; et &lt;em&gt;is not&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sur les chaines c'est plus pareil.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dy3p7d4gxjx9cq4ifu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dy3p7d4gxjx9cq4ifu5.png" alt="Exemple is sur les types chaines" width="465" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pour résumer :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;is&lt;/strong&gt; et &lt;strong&gt;is not&lt;/strong&gt; donne le même résultat que &lt;strong&gt;!=&lt;/strong&gt; et &lt;strong&gt;==&lt;/strong&gt; pour les variables de types simples car ces valeurs sont mutables, les identifiants de cases mémoire changent quand les valeurs sont identiques. Plusieurs variables avec la même valeur auront la même case mémoire.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;is&lt;/strong&gt; et &lt;strong&gt;is not&lt;/strong&gt; sont différents de &lt;strong&gt;!=&lt;/strong&gt; et &lt;strong&gt;==&lt;/strong&gt; pour les variables de types complexes comme les chaines. Deux chaines de mêmes valeurs n'ont pas forcément les mêmes identifiants de cases mémoire. Pour les chaines de caractères on utilisera &lt;strong&gt;==&lt;/strong&gt; pour vérifier l'égalité des valeurs des variables de types chaine et &lt;strong&gt;!=&lt;/strong&gt; pour vérifier la différence entre les valeurs.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is the Python id function?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sun, 24 Mar 2024 15:40:31 +0000</pubDate>
      <link>https://forem.com/isma/what-is-the-python-id-function-4gik</link>
      <guid>https://forem.com/isma/what-is-the-python-id-function-4gik</guid>
      <description>&lt;h2&gt;
  
  
  What is the role of the &lt;strong&gt;id&lt;/strong&gt; function in Python?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Definition
&lt;/h3&gt;

&lt;p&gt;By definition, variables are a pictorial representation of boxes in which Python will store values identified by a label called a variable name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy21ixqatidll44q4v3pi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy21ixqatidll44q4v3pi.jpg" alt="Shelf"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://unsplash.com/fr/photos/gros-plan-dun-tiroir-rouge-avec-des-chiffres-dessus-Z43SnJD0rrQ" rel="noopener noreferrer"&gt;Image Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If computer memory were represented as a shelf with several numbered drawers, the value of a variable would be stored in one of the drawers.&lt;/p&gt;

&lt;p&gt;The role of &lt;em&gt;id&lt;/em&gt; in Python is to return the number of the memory cell where the value of the variable is stored.&lt;/p&gt;

&lt;p&gt;To use &lt;strong&gt;id&lt;/strong&gt; we use the following format: &lt;code&gt;id(variable_name)&lt;/code&gt;. For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr0t0upm24jv7lbu6cbc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr0t0upm24jv7lbu6cbc1.png" alt="Example with id in Python"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the previous example, we can see that the variables &lt;em&gt;a&lt;/em&gt; and &lt;em&gt;b&lt;/em&gt; have different memory location numbers, which means that the values of the variables are stored in different memory locations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The id function does not always return the same memory cell number. The value obtained varies from one computer to another.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When writing a program in Python for primitive types such as &lt;strong&gt;int&lt;/strong&gt;(integer), &lt;strong&gt;float&lt;/strong&gt;(decimal point), &lt;strong&gt;bool&lt;/strong&gt;(Boolean) and &lt;strong&gt;str&lt;/strong&gt;(string), when two variables have the same value, both variables share the same memory slot as long as the value is identical. As in the examples below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1oep5t2kj0sax3r33ip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1oep5t2kj0sax3r33ip.png" alt="Example of id on int type"&gt;&lt;/a&gt;&lt;br&gt;
The same result is obtained with &lt;strong&gt;strings&lt;/strong&gt; type &lt;strong&gt;str&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bug3xulme15v61fevu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bug3xulme15v61fevu1.png" alt="Example of id on string type"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;This mechanism of sharing the same memory slot does not increase the memory occupied by a variable. 100 variables with the same value and 50 variables with the same value are linked to a single memory cell.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, this is no longer the case for &lt;strong&gt;Object&lt;/strong&gt; types such as &lt;strong&gt;list&lt;/strong&gt;, &lt;strong&gt;tuple&lt;/strong&gt; and &lt;strong&gt;dict&lt;/strong&gt; (dictionaries). Any declaration of an object-type variable will be stored in a new memory cell, regardless of whether another variable exists or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzndogj8bocrqor1xo68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzndogj8bocrqor1xo68.png" alt="Example with id on object type"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unlike primitive types, here we have an increase in the amount of memory occupied. 100 object-type variables will occupy 100 different memory slots.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the &lt;strong&gt;=&lt;/strong&gt; operation is used to assign one variable to another, the memory location is copied. For example, &lt;strong&gt;a=b&lt;/strong&gt; means assigning the same memory location to the &lt;strong&gt;a&lt;/strong&gt; and &lt;strong&gt;b&lt;/strong&gt; variables, i.e. that of &lt;strong&gt;b&lt;/strong&gt;. As the memory location is the same in the case of lists, this amounts to manipulating the same list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkd6d1aj223qhbw4xmdr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkd6d1aj223qhbw4xmdr2.png" alt="Example with equal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Ruler with input function
&lt;/h3&gt;

&lt;p&gt;When the user enters the game, things change.&lt;/p&gt;

&lt;p&gt;Previously, for primitive types, &lt;strong&gt;id&lt;/strong&gt; returned the same value because the variables contained the same values. When the &lt;strong&gt;input&lt;/strong&gt; function is used to allow the user to enter a value, the value entered by the user is stored in a new memory cell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsr4kqwec1q8db7neyjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsr4kqwec1q8db7neyjj.png" alt="Example with mutation"&gt;&lt;/a&gt;&lt;br&gt;
When the user is asked to enter a number, the entry is stored in a new memory cell, as we don't know whether what the user is going to provide is a value already stored or not.&lt;/p&gt;

&lt;p&gt;After user input, if we convert and have the same value as one already stored, the identifier becomes that of the currently stored value - this is called &lt;strong&gt;mutation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This mutation mechanism does not work with strings or object types.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When it comes to the &lt;strong&gt;str&lt;/strong&gt; type, the memory location where the user's value is stored will not change even if the same value already exists. This is why &lt;strong&gt;str&lt;/strong&gt; strings are said to be &lt;strong&gt;immutable&lt;/strong&gt;, as their &lt;strong&gt;id&lt;/strong&gt; does not change when already allocated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgxut1dnnmxyyry46gngw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgxut1dnnmxyyry46gngw.png" alt="Example with no mutation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Comparisons rules with &lt;em&gt;is&lt;/em&gt; and &lt;em&gt;is not&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;In Python, the keywords &lt;strong&gt;is not&lt;/strong&gt; and &lt;strong&gt;is&lt;/strong&gt;, which are used by some programmers (including me, who fell into the trap, hence the purpose of this article), sometimes incorrectly, to check whether two variables have the same value.&lt;/p&gt;

&lt;p&gt;However, this method is not at all the same when it comes to complex types such as &lt;strong&gt;string&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In reality, the &lt;strong&gt;is&lt;/strong&gt; and &lt;strong&gt;is not&lt;/strong&gt; keywords compare memory cells, i.e. the result of &lt;strong&gt;id&lt;/strong&gt; values, not variable values.&lt;/p&gt;

&lt;p&gt;These keywords verify that two variables are stored in the same memory cell. To compare values, we use &lt;strong&gt;==&lt;/strong&gt; and &lt;strong&gt;!=&lt;/strong&gt; when talking about strings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk59vroy6zalkdfz6s3sk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk59vroy6zalkdfz6s3sk.png" alt="Example with is on integer type"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;==&lt;/em&gt; and &lt;em&gt;!=&lt;/em&gt; on primitive types are identical to &lt;em&gt;is&lt;/em&gt; and &lt;em&gt;is not&lt;/em&gt;.&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On the channels, it's not the same.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq59v6zqwm0385pz5wkq3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq59v6zqwm0385pz5wkq3.png" alt="Example with is on string type"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To summarize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;is&lt;/strong&gt; and &lt;strong&gt;is not&lt;/strong&gt; give the same result as &lt;strong&gt;!=&lt;/strong&gt; and &lt;strong&gt;==&lt;/strong&gt; for variables of simple types, since these values are mutable, and memory location identifiers change when the values are identical. Several variables with the same value will have the same memory location.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;is&lt;/strong&gt; and &lt;strong&gt;is not&lt;/strong&gt; are different from &lt;strong&gt;!=&lt;/strong&gt; and &lt;strong&gt;==&lt;/strong&gt; for complex variables such as strings. Two strings with the same values do not necessarily have the same memory cell identifiers. For strings, we use &lt;strong&gt;==&lt;/strong&gt; to check the equality of string variable values and &lt;strong&gt;!=&lt;/strong&gt; to check the difference between values.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>Différence entre height, min-height, max-height, width, min-width, max-width</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sun, 11 Feb 2024 18:19:27 +0000</pubDate>
      <link>https://forem.com/isma/difference-entre-height-min-height-max-height-width-min-width-max-width-h1l</link>
      <guid>https://forem.com/isma/difference-entre-height-min-height-max-height-width-min-width-max-width-h1l</guid>
      <description>&lt;h2&gt;
  
  
  Définition de width et height
&lt;/h2&gt;

&lt;p&gt;Les propriétés &lt;strong&gt;CSS&lt;/strong&gt; &lt;strong&gt;width&lt;/strong&gt; et &lt;strong&gt;height&lt;/strong&gt; permettent respectivement de spécifier la largeur et la hauteur d'un élément.&lt;/p&gt;

&lt;p&gt;Pour voir la différence entre chacun des élements nous allons utiliser le code de base suivant:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Height Only&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;/* On écrira ici le code de la demo */&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Propriété height
&lt;/h2&gt;
&lt;h3&gt;
  
  
  height sans contrainte
&lt;/h3&gt;

&lt;p&gt;La propriété &lt;strong&gt;height&lt;/strong&gt; permet d'appliquer une hauteur à un élément &lt;em&gt;html&lt;/em&gt;. La valeur peut être absolue en pixel ou relative en pourcentage.&lt;/p&gt;

&lt;p&gt;Si on applique une valeur absolue de 20 pixels à notre &lt;em&gt;div&lt;/em&gt; précédente en remplaçant le &lt;em&gt;style&lt;/em&gt; par:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On obtient le résultat suivant:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32ncdk65zk0zlxmhd9de.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32ncdk65zk0zlxmhd9de.png" alt="Résultat hauteur sans débordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Le texte à l'intérieur de la &lt;em&gt;div&lt;/em&gt; déborde car le texte est plus grand que 20 pixels.&lt;/p&gt;

&lt;p&gt;Si on veut faire contenir le contenu (le texte) dans le conteneur (la div) on peut utiliser la propriété css &lt;em&gt;overflow: auto&lt;/em&gt;. Ce qui donne comme style:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Avec la propriété &lt;em&gt;overflow: auto;&lt;/em&gt; le contenant restera à l'intérieur du conteneur avec une barre de défilement verticale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfyllepr66ulkcz1fih7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfyllepr66ulkcz1fih7.png" alt="Résultat hauteur avecdébordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  height avec min
&lt;/h3&gt;

&lt;p&gt;On peut précéder la propriété &lt;strong&gt;height&lt;/strong&gt; de &lt;strong&gt;min&lt;/strong&gt;. Dans ce cas le mode de fonctionnement change:&lt;/p&gt;

&lt;p&gt;Si on utilise &lt;strong&gt;min-height&lt;/strong&gt; celà signifie que l'élément ne peut avoir une hauteur plus pétite que celle spécifiée même si la hauteur de l'écran est plus pétite que la hauteur spécifiée.&lt;/p&gt;

&lt;p&gt;Si on change le style par:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;510px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;La hauteur de la page web sera au minimum égale à la hauteur spécifiée même si le contenu de la &lt;em&gt;div&lt;/em&gt; ne dépasse pas la valeur spécifiée. Par exemple sur un écran de 648 x 530 (largeur x hauteur) aura comme résultat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkqfk0odu31nifbyq2dr3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkqfk0odu31nifbyq2dr3.png" alt="Résultat hauteur minimale"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dans l'exemple précédent on voit que la &lt;em&gt;div&lt;/em&gt; a gardé sa hauteur minimun de 510 pixels même si le texte à l'intérieur ne dépasse pas les 510 pixels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Si jamais on applique une valeur min-height à la &lt;em&gt;div&lt;/em&gt; et que le contenu de la &lt;em&gt;div&lt;/em&gt; a une hauteur plus grande que la valeur spécifiée, la &lt;em&gt;div&lt;/em&gt; aura comme hauteur celle de son contenu.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Par exemple si on applique le style suivant:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On obtient comme résultat:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81mpbdaty1iiwi7yopjs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81mpbdaty1iiwi7yopjs.png" alt="Résultat hauteur minimale"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ici la valeur de la &lt;em&gt;div&lt;/em&gt; a pris la valeur de son contenu le texte.&lt;/p&gt;

&lt;p&gt;Pour résumer les règles d'application:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une hauteur de 50 pixels alors&lt;/td&gt;
&lt;td&gt;la hauteur de la &lt;em&gt;div&lt;/em&gt; sera de 50 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une hauteur de 10 pixels alors&lt;/td&gt;
&lt;td&gt;la hauteur de la &lt;em&gt;div&lt;/em&gt; sera de 20 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  height avec max
&lt;/h3&gt;

&lt;p&gt;Quand on utilise la propriété &lt;strong&gt;max-height&lt;/strong&gt;, celà signifie que l'élément ne peut avoir qu'au maximun la hauteur spécifiée.&lt;/p&gt;

&lt;p&gt;Le fonctionnement ici est un peu différent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Si le contenu de l'élément a une hauteur plus grande que la hauteur maximale spécifiée, on aura un débordement comme ci dessous:
&lt;code&gt;css
&amp;lt;style&amp;gt;
    .app {
        max-height: 50px;
        background-color: yellow;
        border: solid 2px black;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;
Ce qui donne comme résultat:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lpfdgqgz083mm8x55n1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lpfdgqgz083mm8x55n1.png" alt="Résultat hauteur maximale avec débordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pour éviter le débordement on peut appliquer la proprité &lt;em&gt;overflow: auto;&lt;/em&gt; pour avoir le résultat:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdn549ia8aga6e5j65aa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdn549ia8aga6e5j65aa.png" alt="Résultat hauteur maximale sans débordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Si le contenu de l'élément a une hauteur plus pétite que la hauteur maximale spécifiée, le conteneur prend la hauteur du contenu comme ci-dessous:
&lt;code&gt;css
&amp;lt;style&amp;gt;
    .app {
        max-height: 300px;
        background-color: yellow;
        border: solid 2px black;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;
Ce qui donne comme résultat:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F688m3h4myf61mko8h4wg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F688m3h4myf61mko8h4wg.png" alt="Résultat hauteur maximale avec débordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Peut importe la valeur du &lt;strong&gt;max-height&lt;/strong&gt; dès l'instant qu'elle est plus grande que la taille du contenu on obtient le même résultat.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;ou&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Donnera le même résultat identique à celui affiché plus haut:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F688m3h4myf61mko8h4wg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F688m3h4myf61mko8h4wg.png" alt="Résultat hauteur maximale avec débordement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pour résumer les règles d'application:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;max-height: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une hauteur de 50 pixels alors&lt;/td&gt;
&lt;td&gt;la hauteur de la &lt;em&gt;div&lt;/em&gt; sera de 20 pixels avec débordement du contenu sur 30 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une hauteur de 10 pixels alors&lt;/td&gt;
&lt;td&gt;la hauteur de la &lt;em&gt;div&lt;/em&gt; sera de 10 pixels identique à celle de son contenu&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Pour plus d'information sur la propriété consulter &lt;a href="https://developer.mozilla.org/fr/docs/Web/CSS/height" rel="noopener noreferrer"&gt;height&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Propriété width
&lt;/h2&gt;

&lt;p&gt;La propriété &lt;strong&gt;width&lt;/strong&gt; est identique à la propriété &lt;strong&gt;height&lt;/strong&gt; sauf que la règle s'applique sur la largeur. Ce qui donne les régles suivantes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une largeur de 50 pixels alors&lt;/td&gt;
&lt;td&gt;la largeur de la &lt;em&gt;div&lt;/em&gt; sera de 50 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une largeur de 10 pixels alors&lt;/td&gt;
&lt;td&gt;la largeur de la &lt;em&gt;div&lt;/em&gt; sera de 20 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;max-width: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une largeur de 50 pixels alors&lt;/td&gt;
&lt;td&gt;la largeur de la &lt;em&gt;div&lt;/em&gt; sera de 20 pixels avec débordement du contenu sur 30 pixels sur la largeur&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;Si le contenu de la &lt;em&gt;div&lt;/em&gt; peut être affiché sur une largeur de 10 pixels alors&lt;/td&gt;
&lt;td&gt;la largeur de la &lt;em&gt;div&lt;/em&gt; sera de 10 pixels identique à celle de son contenu&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Comme pour la propriété &lt;em&gt;height&lt;/em&gt; on peut appliquer la propriété &lt;em&gt;overflow: auto;&lt;/em&gt; dans le cas du &lt;em&gt;width&lt;/em&gt; le contenu restera à l'intérieur du conteneur avec une barre de défilement verticale.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On peut aussi utiliser les deux propriétés sur un même élément.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pour plus d'information sur la propriété consulter &lt;a href="https://developer.mozilla.org/fr/docs/Web/CSS/width" rel="noopener noreferrer"&gt;width&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>web3</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Difference between height, min-height, max-height, width, min-width, max-width</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sun, 11 Feb 2024 18:09:33 +0000</pubDate>
      <link>https://forem.com/isma/difference-between-height-min-height-max-height-width-min-width-max-width-2ica</link>
      <guid>https://forem.com/isma/difference-between-height-min-height-max-height-width-min-width-max-width-2ica</guid>
      <description>&lt;h2&gt;
  
  
  Definition of width and height
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;CSS&lt;/strong&gt; properties &lt;strong&gt;width&lt;/strong&gt; and &lt;strong&gt;height&lt;/strong&gt; are used to specify the width and height of an element respectively.&lt;/p&gt;

&lt;p&gt;To see the difference between each element, we'll use the following basic code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Height Only&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;/* We'll write the demo code here */&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Property height
&lt;/h2&gt;
&lt;h3&gt;
  
  
  height without constraint
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;height&lt;/strong&gt; property is used to apply a height to a &lt;em&gt;html&lt;/em&gt; element. The value can be absolute in pixel or relative in percentage.&lt;/p&gt;

&lt;p&gt;If we apply an absolute value of 20 pixels to our previous &lt;em&gt;div&lt;/em&gt; by replacing the &lt;em&gt;style&lt;/em&gt; with:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We obtain the following result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm169g18e1081s12maoy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm169g18e1081s12maoy3.png" alt="height_with_overflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The text inside the &lt;em&gt;div&lt;/em&gt; overflows the container because the text is larger than 20 pixels.&lt;/p&gt;

&lt;p&gt;If you want the content (the text) to be contained within the container (the div), you can use the css property &lt;em&gt;overflow: auto&lt;/em&gt;. This gives the following style:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With the property &lt;em&gt;overflow: auto;&lt;/em&gt; the container will remain inside the container with a vertical scroll bar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvk2py34zeurrxv3hu5w3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvk2py34zeurrxv3hu5w3.png" alt="height_min"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  height with min
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;height&lt;/strong&gt; property can be preceded by &lt;strong&gt;min&lt;/strong&gt;. In this case, the operating mode changes:&lt;/p&gt;

&lt;p&gt;If &lt;strong&gt;min-height&lt;/strong&gt; is used, this means that the element height cannot be smaller than the specified height, even if the screen height is smaller than the specified height.&lt;/p&gt;

&lt;p&gt;If we change the style to:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;510px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The height of the web page will be at least equal to the specified height, even if the content of the &lt;em&gt;div&lt;/em&gt; does not exceed the specified value. For example, on a 648 x 530 (width x height) screen, the result would be.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdyww1eupbpk6c1go2mcb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdyww1eupbpk6c1go2mcb.png" alt="height_min_2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the previous example, we can see that the &lt;em&gt;div&lt;/em&gt; has kept its minimum size of 510 pixels, even though the text inside doesn't exceed 510 pixels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If a min-height value is applied to the &lt;em&gt;div&lt;/em&gt; and the contents of the &lt;em&gt;div&lt;/em&gt; have a height greater than the specified value, the &lt;em&gt;div&lt;/em&gt; will have the height of its contents.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, if we apply the following style:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The result is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2n6lssat11zrfagmval.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2n6lssat11zrfagmval.png" alt="max_height_without_overflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here the value of the &lt;em&gt;div&lt;/em&gt; has taken the value of its text content.&lt;/p&gt;

&lt;p&gt;To summarize the rules of application:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a height of 50 pixels, then&lt;/td&gt;
&lt;td&gt;the height of the &lt;em&gt;div&lt;/em&gt; will be 50 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a height of 10 pixels, then&lt;/td&gt;
&lt;td&gt;the height of the &lt;em&gt;div&lt;/em&gt; will be 20 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  height with max
&lt;/h3&gt;

&lt;p&gt;When the &lt;strong&gt;max-height&lt;/strong&gt; property is used, this means that the element can only have a maximum of the specified height.&lt;/p&gt;

&lt;p&gt;It works a little differently here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the element's content is higher than the specified maximum height, an overflow will occur, as shown below:
&lt;code&gt;css
&amp;lt;style&amp;gt;
    .app {
        max-height: 50px;
        background-color: yellow;
        border: solid 2px black;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;
The result is:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mbd4zp2xbgcrwt9rrq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mbd4zp2xbgcrwt9rrq9.png" alt="Imax_height_with_overflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To avoid overflow, you can apply the &lt;em&gt;overflow: auto;&lt;/em&gt; property to get the result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p32s04ao884eh10qcbi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p32s04ao884eh10qcbi.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the content of the element has a height greater than the maximum height specified, the container takes the height of the content as shown below:
&lt;code&gt;css
&amp;lt;style&amp;gt;
    .app {
        max-height: 300px;
        background-color: yellow;
        border: solid 2px black;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;
The result is:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx96kifm4wi7y32xcsv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx96kifm4wi7y32xcsv3.png" alt="max_height_without_overflow_2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It doesn't matter what the &lt;strong&gt;max-height&lt;/strong&gt; value is, as long as it's greater than the content size, you get the same result.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Will give the same result as above:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx96kifm4wi7y32xcsv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcx96kifm4wi7y32xcsv3.png" alt="max_height_without_overflow_2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To summarize the application rules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;max-height: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a height of 50 pixels, then&lt;/td&gt;
&lt;td&gt;the height of the &lt;em&gt;div&lt;/em&gt; will be 20 pixels with a 30-pixel content overflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-height: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a height of 10 pixels, then&lt;/td&gt;
&lt;td&gt;the height of the &lt;em&gt;div&lt;/em&gt; will be 10 pixels identical to that of its content&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For more information on the property, consult &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/height" rel="noopener noreferrer"&gt;height&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Property width
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;width&lt;/strong&gt; property is identical to the &lt;strong&gt;height&lt;/strong&gt; property, except that the rule applies to the width. This gives the following rules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;If the content of the &lt;em&gt;div&lt;/em&gt; can be displayed at a width of 50 pixels, then&lt;/td&gt;
&lt;td&gt;the width of the &lt;em&gt;div&lt;/em&gt; will be 50 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a width of 10 pixels, then&lt;/td&gt;
&lt;td&gt;the width of the &lt;em&gt;div&lt;/em&gt; will be 20 pixels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;max-width: 20px;&lt;/td&gt;
&lt;td&gt;If the content of the &lt;em&gt;div&lt;/em&gt; can be displayed at a width of 50 pixels, then&lt;/td&gt;
&lt;td&gt;the width of the &lt;em&gt;div&lt;/em&gt; will be 20 pixels, with the content extending 30 pixels over the width&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;min-width: 20px;&lt;/td&gt;
&lt;td&gt;If the &lt;em&gt;div&lt;/em&gt; content can be displayed at a width of 10 pixels, then&lt;/td&gt;
&lt;td&gt;the width of the &lt;em&gt;div&lt;/em&gt; will be 10 pixels identical to that of its content&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;As with the **height&lt;/strong&gt; property, you can apply the &lt;strong&gt;overflow: auto;&lt;/strong&gt; in the case of &lt;strong&gt;width&lt;/strong&gt; the content will remain inside the container with a vertical scroll bar.**&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can also use both properties on the same element.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For more information on the property, consult &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/width" rel="noopener noreferrer"&gt;width&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>website</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How do I back up all my Github repositories?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 21 Oct 2023 09:40:20 +0000</pubDate>
      <link>https://forem.com/isma/how-do-i-back-up-all-my-github-repositories-3ibo</link>
      <guid>https://forem.com/isma/how-do-i-back-up-all-my-github-repositories-3ibo</guid>
      <description>&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;The goal of this article is to explain how to back up all your Github repositories with a utility script.&lt;/p&gt;

&lt;p&gt;I wrote this script in order to be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the personal user repositories private and public,&lt;/li&gt;
&lt;li&gt;the user organization repositories,&lt;/li&gt;
&lt;li&gt;the ancestor repositories,&lt;/li&gt;
&lt;li&gt;the fork repositories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the script is run for the first time, it will retrieve all the repositories if the repositories have been previously retrieved it will do an update.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
The repository name with space will be replace in clone folder by -. Example the repository name like &lt;strong&gt;repo 1&lt;/strong&gt; will be clone with name &lt;strong&gt;repo-1&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Before getting started, you'll need to install &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;Git&lt;/strong&gt; on your machine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python &amp;gt;=3.9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installation, you can clone the utility script at the following address: &lt;a href="https://github.com/tisma95/github-clone"&gt;Github Clone Repo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Preparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Token creation
&lt;/h3&gt;

&lt;p&gt;Go to your &lt;strong&gt;Github&lt;/strong&gt; account to generate a token with read-only authorization as below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you use the &lt;a href="https://github.com/settings/tokens?type=beta"&gt;Fine-grained personal access tokens&lt;/a&gt; you must provide the following authorizations:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco8sfcc0pnhtqwllsn0b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco8sfcc0pnhtqwllsn0b.png" alt="Image description" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you use the &lt;a href="https://github.com/settings/tokens/new"&gt;Personal access token (classic)&lt;/a&gt; you must provide the following authorizations:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13ka7itawoqmm9ujjzzp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13ka7itawoqmm9ujjzzp.png" alt="Image description" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
If you want to update fork repositories, you need to give workflow authorization to allow repositories to be updated. Activate the option as shown below:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvb9d29h2dzf2trbkrxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvb9d29h2dzf2trbkrxc.png" alt="Image description" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Initializing environment variables
&lt;/h3&gt;

&lt;p&gt;In the clone utility project repository folder, create the file &lt;strong&gt;.env&lt;/strong&gt; with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Clone repo host&lt;/span&gt;
&lt;span class="s"&gt;DOMAIN = github.com&lt;/span&gt;
&lt;span class="c1"&gt;# Domain protocol type http or https&lt;/span&gt;
&lt;span class="s"&gt;PROTOCOL = https&lt;/span&gt;
&lt;span class="c1"&gt;# Access Token To Domain&lt;/span&gt;
&lt;span class="s"&gt;TOKEN = your_generate_token_here&lt;/span&gt;
&lt;span class="c1"&gt;# Storage Folder =&amp;gt; Folder where the repositories will be save =&amp;gt; example /home/toto or C:\users\toto for windows&lt;/span&gt;
&lt;span class="s"&gt;FOLDER = folder_path_here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must enter specific values as shown in the example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfpmjlsowkz6oq4uxwq6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfpmjlsowkz6oq4uxwq6.png" alt="Image description" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
During execution, destination folders will be created if they do not exist.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Execution
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in the project folder (must be run once):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python3 -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or for ubuntu&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    virtualenv venv
&lt;/code&gt;&lt;/pre&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
If you encounter an error, please check the following link: &lt;a href="https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d"&gt;https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to activate the environment:Lancez la commande suivante pour activer l'environnement:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or on windows&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    env\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the modules from the command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the backup script with the command: &lt;code&gt;python main.py&lt;/code&gt; or &lt;code&gt;python3 main.py&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At the end you'll have all the repositories in the destination folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jimn92gi4big773rdi0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jimn92gi4big773rdi0.png" alt="Image description" width="800" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Note that for each execution you have the log generated inside utility script folder inside subfolder &lt;strong&gt;logs&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For &lt;strong&gt;Gitlab&lt;/strong&gt; version you can visit &lt;a href="https://dev.to/isma/how-do-i-back-up-all-my-gitlab-repositories-oje"&gt;Gitlab Backup&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>python</category>
    </item>
    <item>
      <title>Comment sauvegarder tous ses dépôts Github ?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 21 Oct 2023 09:40:05 +0000</pubDate>
      <link>https://forem.com/isma/comment-sauvegarder-tous-ses-depots-github--c6e</link>
      <guid>https://forem.com/isma/comment-sauvegarder-tous-ses-depots-github--c6e</guid>
      <description>&lt;h2&gt;
  
  
  Objectif
&lt;/h2&gt;

&lt;p&gt;L'objectif de cet article est d'expliquer comment sauvegarder l'ensemble de ses dépôts Github avec un script utilitaire.&lt;/p&gt;

&lt;p&gt;J'ai écris cet script dans le but de pouvoir :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;récupérer tous mes dépôts Github ainsi que toutes les branches associées,&lt;/li&gt;
&lt;li&gt;récupérer tous les dépôts dont j'ai fait un fork ainsi qu'une mise à jour du fork avant récupération,&lt;/li&gt;
&lt;li&gt;récupérer tous les dépots de mes organisations,&lt;/li&gt;
&lt;li&gt;récupérer tous les dépôts de mes ascendants.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quand le script est exécuté pour la première fois, il va récupérer tous les dépôts si les dépôts ont été précédemment récupérer il fera une mise à jour.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
Les dépôts avec des espaces dans le nom seront récupérés avec remplacement de l'espace par &lt;strong&gt;-&lt;/strong&gt;. Par exemple le dépôt avec nom &lt;strong&gt;repo 1&lt;/strong&gt; sera récupérer avec le nom &lt;strong&gt;repo-1&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Avant de commencer, vous devez installer &lt;strong&gt;Python&lt;/strong&gt; et &lt;strong&gt;Git&lt;/strong&gt; sur votre machine :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python &amp;gt;=3.9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Après installation, vous pouvez cloner le script utilitaire à l'adresse suivante: &lt;a href="https://github.com/tisma95/github-clone"&gt;Github Clone Repo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Préparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Création des tokens
&lt;/h3&gt;

&lt;p&gt;Allez sur votre compte &lt;strong&gt;Github&lt;/strong&gt; pour générer un token avec l'autorisation de la lecture uniquement comme ci-dessous :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Si vous utilisez l'option &lt;a href="https://github.com/settings/tokens?type=beta"&gt;Fine-grained personal access tokens&lt;/a&gt; vous devez fournir les autorisations suivantes :&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm35onln13op3snaqe6ga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm35onln13op3snaqe6ga.png" alt="Image description" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Si vous utilisez l'option &lt;a href="https://github.com/settings/tokens/new"&gt;Personal access token (classic)&lt;/a&gt; vous devez fournir les autorisations suivantes :&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftzndbqfv44dxfbog2da.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fftzndbqfv44dxfbog2da.png" alt="Image description" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
Si vous voulez mettre à jour les dépôts fork, vous devez donner l'autorisation workflow pour permettre la mise à jour des dépôts. Activez l'option comme ci-dessous :&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf4m6k509p5v5p6d2kym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf4m6k509p5v5p6d2kym.png" alt="Image description" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Initialisation des variables d'environnement
&lt;/h3&gt;

&lt;p&gt;Dans le dossier du dépôt récupéré, créer le fichier &lt;strong&gt;.env&lt;/strong&gt; avec le contenu suivant :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Domaine Github&lt;/span&gt;
&lt;span class="s"&gt;DOMAIN = github.com&lt;/span&gt;
&lt;span class="c1"&gt;# Protocol du domaine par défaut https&lt;/span&gt;
&lt;span class="s"&gt;PROTOCOL = https&lt;/span&gt;
&lt;span class="c1"&gt;# Copier et coller le token que vous avez généré précédemment ici&lt;/span&gt;
&lt;span class="s"&gt;TOKEN = le_token_genere_ici&lt;/span&gt;
&lt;span class="c1"&gt;# Dossier là où sera sauvegardé les dépôts mettre le chemin absolu =&amp;gt; exemple /home/toto ou C:\users\toto pour windows&lt;/span&gt;
&lt;span class="s"&gt;FOLDER = chemin_absolu_du_dossier&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vous devez mettre les valeurs spécifiques comme l'exemple ci-dessous :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7zwjml1k8ic6zq4mv71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7zwjml1k8ic6zq4mv71.png" alt="Image description" width="800" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Lors de l'exécution, les dossiers de destination seront créés s'ils n'existent pas.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Exécution
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Lancez la commande suivante dans le dossier du projet (doit être lancé une fois) :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python3 -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou pour ubuntu&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    virtualenv venv
&lt;/code&gt;&lt;/pre&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Si vous rencontrer une erreur, veillez vérifier sur le lien suivant: &lt;a href="https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d"&gt;https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lancez la commande suivante pour activer l'environnement :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou sur windows&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    env\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installez les modules à partir de la commande :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lancez le script de sauvegarde avec la commande : &lt;code&gt;python main.py&lt;/code&gt; or &lt;code&gt;python3 main.py&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Et voilà à la fin vous aurez tous les dépôts dans le dossier de destination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qcyrxo8bffzf31v2o8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qcyrxo8bffzf31v2o8a.png" alt="Image description" width="800" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Notez que pour chaque exécution, vous avez le journal généré dans le dossier du script utilitaire dans le sous-dossier &lt;strong&gt;logs&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pour la version avec &lt;strong&gt;Gitlab&lt;/strong&gt; vous pouvez visiter &lt;a href="https://dev.to/isma/comment-sauvegarder-tous-ses-depots-gitlab--2e9m"&gt;Sauvegarde Gitlab&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>python</category>
    </item>
    <item>
      <title>How do I back up all my Gitlab repositories?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 21 Oct 2023 09:39:40 +0000</pubDate>
      <link>https://forem.com/isma/how-do-i-back-up-all-my-gitlab-repositories-oje</link>
      <guid>https://forem.com/isma/how-do-i-back-up-all-my-gitlab-repositories-oje</guid>
      <description>&lt;h1&gt;
  
  
  How do I back up all my Gitlab repositories?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;The goal of this article is to explain how to back up all your Gitlab repositories with a utility script.&lt;/p&gt;

&lt;p&gt;I wrote this script in order to be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the personal user repositories private and public,&lt;/li&gt;
&lt;li&gt;the user organization repositories,&lt;/li&gt;
&lt;li&gt;the fork repositories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the script is run for the first time, it will retrieve all the repositories if the repositories have been previously retrieved it will do an update.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
The repository name with space will be replace in clone folder by -. Example the repository name like &lt;strong&gt;repo 1&lt;/strong&gt; will be clone with name &lt;strong&gt;repo-1&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Before getting started, you'll need to install &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;Git&lt;/strong&gt; on your machine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python &amp;gt;=3.9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installation, you can clone the utility script at the following address: &lt;a href="https://github.com/tisma95/gitlab-clone"&gt;Gitlab Clone Repo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Preparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Token creation
&lt;/h3&gt;

&lt;p&gt;Go to your &lt;strong&gt;Gitlab&lt;/strong&gt; account to generate a token with read-only authorization as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BxY98hKY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4d4t6e3mv7yq06vzxwbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BxY98hKY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4d4t6e3mv7yq06vzxwbw.png" alt="Image description" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
If you want to update fork repositories, you need to give workflow authorization to allow repositories to be updated. Activate the option as shown below:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WDYcKz0_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cht248et7jq89h5ye65o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WDYcKz0_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cht248et7jq89h5ye65o.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Initializing environment variables
&lt;/h3&gt;

&lt;p&gt;In the clone utility project repository folder, create the file &lt;strong&gt;.env&lt;/strong&gt; with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Clone repo host&lt;/span&gt;
&lt;span class="s"&gt;DOMAIN = gitlab.com&lt;/span&gt;
&lt;span class="c1"&gt;# Domain protocol type http or https&lt;/span&gt;
&lt;span class="s"&gt;PROTOCOL = https&lt;/span&gt;
&lt;span class="c1"&gt;# Access Token To Domain&lt;/span&gt;
&lt;span class="s"&gt;TOKEN = your_generate_token_here&lt;/span&gt;
&lt;span class="c1"&gt;# Username gitlab&lt;/span&gt;
&lt;span class="s"&gt;USERNAME = your_gitlab_username&lt;/span&gt;
&lt;span class="c1"&gt;# Storage Folder =&amp;gt; Folder where the repositories will be save =&amp;gt; example /home/toto or C:\users\toto for windows&lt;/span&gt;
&lt;span class="s"&gt;FOLDER = folder_path_here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must enter specific values as shown in the example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7yeALPUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gvodwbz2x51tajozd2rh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7yeALPUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gvodwbz2x51tajozd2rh.png" alt="Image description" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
During execution, destination folders will be created if they do not exist.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Execution
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the following command in the project folder (must be run once):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python3 -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or for ubuntu&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    virtualenv venv
&lt;/code&gt;&lt;/pre&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
If you encounter an error, please check the following link: &lt;a href="https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d"&gt;https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to activate the environment:Lancez la commande suivante pour activer l'environnement:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;or on windows&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    env\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the modules from the command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the backup script with the command: &lt;code&gt;python main.py&lt;/code&gt; or &lt;code&gt;python3 main.py&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At the end you'll have all the repositories in the destination folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N8WcojxR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z43wu4nzi7paz16466hs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N8WcojxR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z43wu4nzi7paz16466hs.png" alt="Image description" width="800" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Note that for each execution you have the log generated inside utility script folder inside subfolder &lt;strong&gt;logs&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For &lt;strong&gt;Github&lt;/strong&gt; version you can visit &lt;a href="https://dev.to/isma/how-do-i-back-up-all-my-github-repositories-3ibo"&gt;Github Backup&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>git</category>
      <category>github</category>
      <category>python</category>
    </item>
    <item>
      <title>Comment sauvegarder tous ses dépôts Gitlab ?</title>
      <dc:creator>Ismaël Maurice</dc:creator>
      <pubDate>Sat, 21 Oct 2023 09:39:07 +0000</pubDate>
      <link>https://forem.com/isma/comment-sauvegarder-tous-ses-depots-gitlab--2e9m</link>
      <guid>https://forem.com/isma/comment-sauvegarder-tous-ses-depots-gitlab--2e9m</guid>
      <description>&lt;h2&gt;
  
  
  Objectif
&lt;/h2&gt;

&lt;p&gt;L'objectif de cet article est d'expliquer comment sauvegarder l'ensemble de ses dépôts Gitlab avec un script utilitaire.&lt;/p&gt;

&lt;p&gt;J'ai écris cet script dans le but de pouvoir :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;récupérer tous mes dépôts Gitlab ainsi que toutes les branches associées,&lt;/li&gt;
&lt;li&gt;récupérer tous les dépôts dont j'ai fait un fork ainsi qu'une mise à jour du fork avant récupération,&lt;/li&gt;
&lt;li&gt;récupérer tous les dépots de mes organisations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quand le script est exécuté pour la première fois, il va récupérer tous les dépôts si les dépôts ont été précédemment récupérer il fera une mise à jour.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
Les dépôts avec des espaces dans le nom seront récupérés avec remplacement de l'espace par &lt;strong&gt;-&lt;/strong&gt;. Par exemple le dépôt avec nom &lt;strong&gt;repo 1&lt;/strong&gt; sera récupérer avec le nom &lt;strong&gt;repo-1&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Avant de commencer, vous devez installer &lt;strong&gt;Python&lt;/strong&gt; et &lt;strong&gt;Git&lt;/strong&gt; sur votre machine :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python &amp;gt;=3.9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Après installation, vous pouvez cloner le script utilitaire à l'adresse suivante: &lt;a href="https://github.com/tisma95/gitlab-clone"&gt;Gitlab Clone Repo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Préparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Création des tokens
&lt;/h3&gt;

&lt;p&gt;Allez sur votre compte &lt;strong&gt;Gitlab&lt;/strong&gt; pour générer un token avec l'autorisation de la lecture uniquement comme ci-dessous :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2G4e2keS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3r7qu1thmlcbka1x51u0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2G4e2keS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3r7qu1thmlcbka1x51u0.png" alt="Image description" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;br&gt;
Si vous voulez mettre à jour les dépôts fork, vous devez donner l'autorisation workflow pour permettre la mise à jour des dépôts. Activez l'option comme ci-dessous :&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iEcod7lw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2n69fi022pbisswimwb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iEcod7lw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2n69fi022pbisswimwb.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Initialisation des variables d'environnement
&lt;/h3&gt;

&lt;p&gt;Dans le dossier du dépôt récupéré, créer le fichier &lt;strong&gt;.env&lt;/strong&gt; avec le contenu suivant :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Domaine Gitlab&lt;/span&gt;
&lt;span class="s"&gt;DOMAIN = gitlab.com&lt;/span&gt;
&lt;span class="c1"&gt;# Protocol du domaine par défaut https&lt;/span&gt;
&lt;span class="s"&gt;PROTOCOL = https&lt;/span&gt;
&lt;span class="c1"&gt;# Copier et coller le token que vous avez généré précédemment ici&lt;/span&gt;
&lt;span class="s"&gt;TOKEN = le_token_genere_ici&lt;/span&gt;
&lt;span class="c1"&gt;# Nom d'utiliateur gitlab&lt;/span&gt;
&lt;span class="s"&gt;USERNAME = nom_d_utilisateur_gitlab&lt;/span&gt;
&lt;span class="c1"&gt;# Dossier là où sera sauvegardé les dépôts mettre le chemin absolu =&amp;gt; exemple /home/toto ou C:\users\toto pour windows&lt;/span&gt;
&lt;span class="s"&gt;FOLDER = chemin_absolu_du_dossier&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vous devez mettre les valeurs spécifiques comme l'exemple ci-dessous :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CxZY_1f5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qvvdcq38638pa40pg74w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CxZY_1f5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qvvdcq38638pa40pg74w.png" alt="Image description" width="800" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Lors de l'exécution, les dossiers de destination seront créés s'ils n'existent pas.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Exécution
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Lancez la commande suivante dans le dossier du projet (doit être lancé une fois) :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    python3 -m venv env
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou pour ubuntu&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    virtualenv venv
&lt;/code&gt;&lt;/pre&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Si vous rencontrer une erreur, veillez vérifier sur le lien suivant: &lt;a href="https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d"&gt;https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lancez la commande suivante pour activer l'environnement :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;ou sur windows&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    env\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installez les modules à partir de la commande :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lancez le script de sauvegarde avec la commande : &lt;code&gt;python main.py&lt;/code&gt; or &lt;code&gt;python3 main.py&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Et voilà à la fin vous aurez tous les dépôts dans le dossier de destination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nT5iDU3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alm21zq0y2fd51cef45p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nT5iDU3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alm21zq0y2fd51cef45p.png" alt="Image description" width="800" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Information:&lt;/strong&gt;&lt;br&gt;
Notez que pour chaque exécution, vous avez le journal généré dans le dossier du script utilitaire dans le sous-dossier &lt;strong&gt;logs&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pour la version avec &lt;strong&gt;Github&lt;/strong&gt; vous pouvez visiter &lt;a href="https://dev.to/isma/comment-sauvegarder-tous-ses-depots-github--c6e"&gt;Sauvegarde Github&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>git</category>
      <category>github</category>
      <category>python</category>
    </item>
  </channel>
</rss>
