lundi 29 octobre 2018

Java : Formats are generally not synchronized.




From JavaDoc :

Formats are generally not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.

 It allows for formatting (date -> text), parsing (text -> date), and normalization
Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.


If using Java 8, it's better to use thread-safe

DateTimeFormatter

samedi 20 octobre 2018

Git: merge ff vs --no-ff vs --ff-only

git merge --no-ff branch : force git à créer un commit avec un msg à garder dans l'historique
git merge --ff-only : force git à faire un merge uniquement s'il peut le faire avec un ff, sinon il doit abandonner.

liens:
http://www.dynamic-mess.com/developpement/git-merge-fast-forward-rebase-culture-git/
https://tech.m6web.fr/tentative-d-explication-des-fast-forward-sous-git

JavaScript : pass-by-reference or pass-by-value ?

 Data type manipulation in JavaScript


TypeCopied byPassed byCompared by
NumberValueValueValue
BooleanValueValueValue
StringImmutableImmutableValue
ObjectReferenceReferenceReference

Spatial locality and linkedlist

Spatial locality refers to the use of data elements within relatively close storage locations. Sequential locality, a special case of spatial locality, occurs when data elements are arranged and accessed linearly, such as, traversing the elements in a one-dimensional array.

jeudi 11 octobre 2018