Archive for August, 2016

AngularJS : Insert HTML into view

ng-bind-html="thisCanBeusedInsideNgBindHtml">

http://stackoverflow.com/questions/9381926/angularjs-insert-html-into-view

Advertisements

Leave a comment

Change sort order for Spring Data findAll() method

 

List<Student> findAllByOrderByIdDesc();

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

findAllByOrderByIdAsc();

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