Tuesday, May 26, 2015

Grails / GORM database mapping Money data type on Microsoft SQL Server

import java.math.BigDecimal
class Cloth {
    ...
    BigDecimal price
    ...
    static mapping = {
        price sqlType: "money"
    }
}

reference : https://msdn.microsoft.com/en-us/library/ms378878(v=sql.110).aspx
remember, grails is java too :D

Friday, May 1, 2015

Make uninitialized disk using diskpart

Warning this command will erase all of data on the disk!!!

1. run cmd
2. type : diskpart
3. type : list disk
4. select the disk you want to clean / uninitialize, in this example : select disk 1
5. clean
6. done


This steps are useful if we want to change the disk partition type (GPT or MBR or other)