Data Table Customization as per need

 

DataTable({
"scrollY" : "700px",
"scrollX" : "100%",
"scrollCollapse" : true,
"paging" : false,
"searching" : false,
"bAutoWidth": true,
"bScrollAutoCss": true,
"bProcessing": true,
"bRetrieve": true,
"bJQueryUI": true,
"autoWidth": true,
"ordering": false,
"bInfo" : false,
"order": [[ 2, "asc" ]],
fixedColumns : {
 leftColumns : 10
}
})

postgres db error or broken postgress healer or fix or recovery

https://lxadm.com/Repairing_broken_PostgreSQL_databases_/_tables

https://www.endpoint.com/blog/2016/09/19/pghealer-repairing-postgres-problems

http://www.pateldenish.com/2016/09/recovering-corrupted-postgres-database.html

https://www.postgresql.org/docs/current/continuous-archiving.html

https://www.postgresql.org/docs/current/high-availability.html

Grails BuildConfig.groovy, difference between build, compile, and runtime?

  • build – dependency that is only needed by the build process
  • runtime – dependency that is needed to run the application, but not compile it e.g. JDBC implementation for specific database vendor. This would not typically be needed at compile-time because code depends only the JDBC API, rather than a specific implementation thereof
  • compile – dependency that is needed at both compile-time and runtime. This is the most common case
  • provided – dependency that is needed at compile-time but should not be packaged with the app (usually because it is provided by the container). An example is the Servlet API

Database Dynamic with Live Database

 

 
def indexNext(Integer max){
		println params
		params.max = Math.min(max ?: 10, 100)
        params.max=params.length
        params.offset=params.start ?:0

		def jsonMap=[:]
		
		def rows=[]
		jsonMap.draw=params.draw
		jsonMap.recordsTotal=BlogPosts.count().toString()
		jsonMap.recordsFiltered=BlogPosts.count().toString()
		def postlist=BlogPosts.createCriteria().setMaxResults(10).setFirstResult(params.start.toInteger()).list()
        println postlist
		postlist.each{
			def row=[]
			row<
	

How to Use Icheck for Checkbox and Radio button

Download https://github.com/fronteed/iCheck/

  1. Choose a color scheme, there are 10 different styles available:
    • Black — flat.css
    • Red — red.css
    • Green — green.css
    • Blue — blue.css
    • Aero — aero.css
    • Grey — grey.css
    • Orange — orange.css
    • Yellow — yellow.css
    • Pink — pink.css
    • Purple — purple.css
  2. Copy /skins/flat/ folder and icheck.js file to your site.
  3. Insert before </head> in your HTML (replace your-path and color-scheme):
    <link href="your-path/flat/color-scheme.css" rel="stylesheet">
    <script src="your-path/icheck.js"></script>
    

    Example for a Red color scheme:

    <link href="your-path/flat/red.css" rel="stylesheet">
    <script src="your-path/icheck.js"></script>
    
  4. Add some checkboxes and radio buttons to your HTML:
    <input type="checkbox">
    <input type="checkbox" checked>
    <input type="radio" name="iCheck">
    <input type="radio" name="iCheck" checked>
    
  5. Add JavaScript to your HTML to launch iCheck plugin:
    <script>
    $(document).ready(function(){
      $('input').iCheck({
        checkboxClass: 'icheckbox_flat',
        radioClass: 'iradio_flat'
      });
    });
    </script>
    

    For different from black color schemes use this code (example for Red):

    <script>
    $(document).ready(function(){
      $('input').iCheck({
        checkboxClass: 'icheckbox_flat-red',
        radioClass: 'iradio_flat-red'
      });
    });
    </script>
    
  6. Done.

Document is also there how to use this icheck.js

https://github.com/fronteed/iCheck/

hibernate hql query using named parameter using passing map with like clause in grails

here we are seaching in college where in department how many student with same name for example than query is grails

College.executeQuery("from college as c where Department.name like :depname and Student.name like :stuname",[depname:params.deptName,stuname:params.studentName])