MongoDB
Voir la doc… hahaha… Quelques requêtes ci-dessous…
Requête pour trouver des doublons sur un index et nettoyer la donnée avant contrainte d’unicité.
Le principe est
- de remonter les objets avec un élément les caractérisant (type?) et de les grouper par identifiant + compter le nombre d’occurences.
- de garder les identifiants qui sont trouvés plus d’une fois
- regrouper par nombre d’occurences les identifiants
[{
$group: {
_id: "$idOuvrage",
niveau: {
$first: "$niveau"
},
count: {
$sum: 1
}
}
}, {
$match: {
count: {
$gt: 1
}
}
}, {
$group: {
_id: "$count",
niveau: {
$first: "$niveau"
},
ids: {
$push: "$_id"
}
}
}]
ORACLE… usual stuff…
Posté par D.E.S. dans Informatique le 4 octobre 2018
Peu utilisé récemment, j’ai du retrouver des fonctions que je n’avais pas utilisé depuis un moment :
Sujets récurrents Java…
Posté par D.E.S. dans Informatique le 3 octobre 2018
> Gestion de null :
> Replace…
JsonTypeInfo – attribute still visible after jackson interprets the JSON
Posté par D.E.S. dans Informatique le 2 octobre 2018
https://stackoverflow.com/questions/33611199/jackson-jsontypeinfo-property-is-being-mapped-as-null#33611726
The keyword is… visible
Maven release dry run
mvn –batch-mode release:prepare -DdryRun=true
(instead of looking for it again and a…)
source : https://maven.apache.org/maven-release/maven-release-plugin/usage.html
Config with scalability
https://12factor.net/config
Java threads sync
I’ll come back to it:
http://tutorials.jenkov.com/java-concurrency/read-write-locks.html
Native full screen navigator capture
Posté par D.E.S. dans capitalisation, DIY, Informatique le 14 février 2018
> Chrome :
- F12
- ctrl + shift + P
- Start writing part of the command to be executed. eg. »full screen »
- click on the chosen command. eg. [Mobile] Capture full size scrrenshot
Source : https://www.utilitylog.com/full-page-screenshot-chrome/
> Firefox :
- MAJ + F2 (OSX : MAJ + Fn + F2)
- screenshot –fullpage downladFullPage.png
Source : https://korben.info/faire-une-capture-ecran-complete-de-site-web-directement-depuis-firefox.html
iterm on mac – cmder on windows
scoop install cmder
Define proxy for Windows user
setx HTTP_PROXY protocol://user:pwd@server:port
setx HTTPS_PROXY protocol://user:pwd@server:port
relaunch cmd