Firobe
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- tags: upsud --- # TP 8 info 111 groupe Eco-Math Lien vers Jupyterhub : [cliquez ici](https://jupytercloud.lal.in2p3.fr) ## Instructions Commencez par créer une section à votre nom dans ce fichier, et écrire dans cette section "Début". Puis connectez-vous sur le serveur JupyterHub, téléchargez les documents du TP selon la procédure usuelle (`info-111 fetch Semaine8` dans un terminal), ouvrez 00index.html avec Jupyter pour lire le sujet, et faites le TP par vous-même. Mettez à jour votre section en écrivant où vous en êtes (une fois les fichiers téléchargés, remplacer "début" par "Exo 1 Q1", puis une fois la 1ere question faite, remplacer "Exo 1 Q1" par "Exo 1 Q2", etc.) Notez aussi dans votre section vos questions et/ou y copier-coller vos messages d'erreur en cas de besoin d'aide, et n'hésitez pas à attirer mon attention via le chat Collaborate. ## FAQ **RAPPEL : COMMENT COMPILER** - une fois le fichier truc.cpp rempli, le sauvegarder (File->Save) - ouvrir un terminal (New->Terminal) - se positionner dans le dossier de la semaine avec `cd ProgImperative/Semaine9` - compiler le fichier avec (en remplaçant truc par votre fichier) `info-111 g++ truc.cpp -o truc` - exécuter le programme compilé avec `./truc` **Ouvrir un fichier avec JupyterHub :** il suffit de cliquer sur le nom du fichier quand on est dans la liste des fichiers **Problème de compilation:** Il faut avec le terminal se placer avec cd dans le dossier où se trouve le fichier .cpp qu'on veut compiler, sinon on a une erreur du type *no such file or directory* **Si vous avez une erreur du genre terminate called after throwing an instance of 'std::runtime_error'** what(): code non implanté ligne 3 Aborted (core dumped) C'est que vous avez oublié de supprimé une ligne qui commence par "throw...": ces lignes doivent être supprimée et remplacées par le code adéquat. **Comment exécuter ?** Pour exécuter c'est `./nom du programme` (une fois qu'il a bien été compilé sans erreur). **Est-ce normal que le terminal n'affiche rien à l'exécution ?** Pour certains programmes c'est normal, ça dépend de ce qu'il y a dans le main du programme. Par exemple dans ce TP, beaucoup de programmes n'affichent rien, mais créent des fichiers (ou écrivent dans des fichiers déjà existants). **Pour créer vous-même un fichier sur JupyterHub:** au même endroit que pour ouvrir un terminal, cliquer sur new et selectionner Text File. Par contre ça donnera un fichier .txt, il faudra ensuite le renommer en .pbm avec File -> Rename une fois le fichier ouvert. **Pour agrandir une image:** appuyer sur les touches Ctrl et + **Problème pour convertir un fichier pbm en png :** erreur du genre convert-im6.q16: unable to read image ... C'est que votre image .pbm d'origine n'est pas correcte (et donc que le programme qui l'a conçue n'est pas correct). Pour vérifier, ouvrir votre fichier .pbm en tant que texte (donc en cliquant simplement dessus) et vérifier que le texte qu'il contient est bien celui que vous attendez. Si vous ne trouvez pas le problème: avez-vous bien pensé à tous les éléments d'une image .pbm (pas uniquement les pixels) ? Avez-vous bien le bon nombre de pixels ? C'est compliqué à vérifier en taille 100, commencez par faire un damier automatique en taille 10 pour bien compter les pixels. **Le fichier pbm semble correct mais** quand on ouvre en tant qu'image, ca ne donne pas vraiment un damier: c'est probablement un soucis d'alternance, de nombre de pixels par ligne ou de nombre de lignes. Faire le programme pour un damier automatique en taille 10, ouvrir l'image en tant que texte, et vérifer en comptant le nombre de pixels par ligne (et en vérifiant qu'ils alternent bien comme il faut, y compris en début et fin de ligne). Exemple: ## Barnabé Exo 1 Q1 Allez-y, lancez-vous, soyez concentrés et efficaces ! ## Pierre Exo 4 ## Anna Exo 4 ## Vincent int main() { ofstream fichier; fichier.open("damier-automatique.pbm"); fichier<<"P1"<<endl; fichier<<"100 100"<<endl; for(int i=0;i<10,i++){ for(int j=0;j<10,j++){ fichier<<"0 1 0 1 0 1 0 1 0 1 ";} } fichier.close();} j'ai bien mis un esapce entre le 1 et le " ok merci exo degrade.cpp ## Axel Geertsen EXO Degradé de gris ## Theo theo.lebreton@jupyterhub:~/ProgImperative/Semaine8$ convert damier-automatique.pbm damier-automatique.png convert-im6.q16: unable to read image data `damier-automatique.pbm' @ error/pnm.c/ReadPNMImage/1346. convert-im6.q16: no images defined `damier-automatique.png' @ error/convert.c/ConvertImageCommand/3258. exo dégrdé de gris ## Lorenzo Exo 4 ## Xiaolin exo2 ## Romane ex 3 q1 ## Caroline exercice grand damier ## Hongji Debut ## Lina ex 1 Q3 ## Laura exercice grand damier ## Clara exo 3 grand damier ## Eythan Exercice grand damier ## Remi P2 # CREATOR: GIMP PNM Filter Version 1.1 10 10 255 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 20 20 20 20 30 30 30 30 30 30 30 30 30 30 40 40 40 40 40 40 40 40 40 40 50 50 50 50 50 50 50 50 50 50 80 80 80 80 80 80 80 80 80 80 120 120 120 120 120 120 120 120 120 120 180 180 180 180 180 180 180 180 180 180 220 220 220 220 220 220 220 220 220 220 255 255 255 255 255 255 255 255 255 255 Nuances de gris

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully