This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!actor) { | |
| ui.notifications.error('No token selected'); | |
| } | |
| async function show(roll) { | |
| if (game.modules.get("dice-so-nice") && | |
| game.modules.get("dice-so-nice").active) { | |
| await game.dice3d.showForRoll(roll, game.user, true); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Type avec union | |
| type Status = 'active' | 'inactive' | null | |
| // Définition d'interfaces | |
| interface User { | |
| name: string; // propriété et type | |
| age: number; | |
| status: Status; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inf5190.chat; | |
| import java.util.Date; | |
| import java.util.List; | |
| import java.util.concurrent.ExecutionException; | |
| import org.springframework.web.bind.annotation.GetMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| import com.google.api.core.ApiFuture; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ComponentFixture } from '@angular/core/testing'; | |
| import { By } from '@angular/platform-browser'; | |
| /** | |
| * Classe de test qui aide à aller chercher des éléments HTML de la page. | |
| * | |
| * Elle utilise l'attribut `data-testid=` pour sélectionner les éléments. | |
| * Par exemple: | |
| * <input | |
| * name="username" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ComponentFixture, TestBed } from "@angular/core/testing"; | |
| import { ReactiveFormsModule } from "@angular/forms"; | |
| import { TestHelper } from "src/app/test/test-helper"; | |
| import { LoginFormComponent } from "./login-form.component"; | |
| import { MatFormFieldModule } from "@angular/material/form-field"; | |
| import { MatInputModule } from "@angular/material/input"; | |
| import { NoopAnimationsModule } from "@angular/platform-browser/animations"; | |
| describe("LoginFormComponent", () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inf5190.chat; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| import java.util.Arrays; | |
| import javax.annotation.PostConstruct; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inf5190.chat.auth; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| import static org.mockito.Mockito.times; | |
| import static org.mockito.Mockito.verify; | |
| import static org.mockito.Mockito.when; | |
| import java.util.concurrent.ExecutionException; | |
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.Test; | |
| import org.mockito.Mock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inf5190.chat.messages; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| import java.net.HttpCookie; | |
| import java.util.concurrent.ExecutionException; | |
| import org.junit.jupiter.api.AfterEach; | |
| import org.junit.jupiter.api.BeforeAll; | |
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.Test; | |
| import org.springframework.beans.factory.annotation.Autowired; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| @SpringBootApplication | |
| @PropertySource("classpath:cors.properties") | |
| @PropertySource("classpath:firebase.properties") | |
| public class ChatApplication { | |
| // ... | |
| @PostConstruct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://www.perdu.com/ | |
| // Ajouter jquery à la page | |
| var js = document.createElement('script'); | |
| js.src = 'https://releases.jquery.com/git/jquery-git.js'; | |
| document.getElementsByTagName('head')[0].appendChild(js); | |
| // Attendre un minimum que le script load | |
| // Manipulations | |
| $('h1').text('Toujours perdu?') |