Archive for August, 2016

AngularJS : Insert HTML into view


Leave a comment

Change sort order for Spring Data findAll() method


List<Student> findAllByOrderByIdDesc();

Since I’ve been told that it’s easy to miss the key point of this answer, here’s a little clarification:


The little ‘by’ does all the magic



Leave a comment

Extract digits from a string in Java

"123-456-Abc*_789"  "123456789"


You can use regex and delete non-digits.

str = str.replaceAll("\\D+","");

Leave a comment