❯ javap CityMapper.class
Compiled from "CityMapper.java"
public class ch.hearc.ig.guideresto.persistence.datamapper.CityMapper extends ch.hearc.ig.guideresto.persistence.datamapper.Mapper {
public ch.hearc.ig.guideresto.persistence.datamapper.CityMapper();
public ch.hearc.ig.guideresto.business.City researchById(java.lang.Integer);
public java.util.Set<ch.hearc.ig.guideresto.business.City> researchAll();
public void insert(ch.hearc.ig.guideresto.business.City);
}
This file contains 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
public class Person { | |
private String email; | |
@Size(min = 8) | |
private String firstname; | |
@NotNull | |
@Future | |
private Date future; |
This file contains 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
List<String> validations = createValidator("ch.arnaudgeiser.InvalidGmailAddress", (Person p) -> Pattern.matches(p.getName(), ".*@gmail\\.com")).apply(person); | |
System.out.println(validations); |
This file contains 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
spring.datasource.url=jdbc:h2:file:/home/arnaudgeiser/temp/hello | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.datasource.username=sa | |
spring.datasource.password=password | |
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect | |
spring.jpa.show-sql=true | |
spring.jpa.generate-ddl=true |
This file contains 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
;; Unversité valide! | |
(def universite | |
{:nom "UniFR" | |
:etudiants [{:nom "Geiser" | |
:prenom "Arnaud" | |
:admissions [{:semestre "SP-2020" :statut "Immatricule"} | |
{:semestre "SA-2020" :statut "Immatricule"} | |
{:semestre "SP-2021" :statut "Immatricule"} | |
{:semestre "SA-2021" :statut "Immatricule"}]} | |
{:nom "Rosset" |
This file contains 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
;; Unversité valide! | |
(def universite | |
{:nom "UniFR" | |
:etudiants [{:nom "Geiser" | |
:prenom "Arnaud" | |
:admissions [{:semestre "SP-2020" :statut "Immatricule"} | |
{:semestre "SA-2020" :statut "Immatricule"} | |
{:semestre "SP-2021" :statut "Immatricule"} | |
{:semestre "SA-2021" :statut "Immatricule"}]} | |
{:nom "Rosset" |
This file contains 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
(ns advent-of-code.core | |
(:require [clojure.string :as str])) | |
(def content (slurp "/tmp/input")) | |
(defn compute [[direction nb]] | |
(let [nb' (Integer/parseInt nb)] | |
(condp = direction | |
"forward" [nb' 0] | |
"down" [0 nb'] |
This file contains 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
source "exoscale" "my-app" { | |
api_key = var.api_key | |
api_secret = var.api_secret | |
instance_template = "Linux Ubuntu 20.04 LTS 64-bit" | |
instance_security_groups = ["default"] | |
template_zone = "ch-gva-2" | |
template_name = "golfview-template" | |
template_description = "Hello" | |
template_username = "arnaud" | |
#template_boot_mode = "uefi" |
This file contains 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
public class OrderService { | |
private final EmailService emailService; | |
public OrderService(EmailService emailService) { | |
this.emailService = emailService; | |
} | |
public void createOrder(Order order) { | |
// ... | |
emailService.send(email) |
This file contains 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
class Etudiant { | |
public final String nom; | |
public final String prenom; | |
public final double note1; | |
public final double note2; | |
public final double note3; | |
public Etudiant(String nom, String prenom, double note1, double note2, double note3) { | |
this.nom = nom; | |
this.prenom = prenom; |
OlderNewer