Wysmedia.com

Icon

~ We make IT easy for you ~

Using Alternative Text in Image

I used to browse a web image off in order to save the bandwith usage (also to speed up the loading). It is unpleasant sometimes to see a images that link to something but don’t have “alt” attributs that’s why sometimes I need to turn on the image for seeing what is the next.

Read the rest of this entry »

Native SQL Query on Grails

As we know, Hibernate Query Language or using GORM are not enough, for example if we want to create complex queries or using native sql functions ie. date() function in MySQL. That’s why we need to use Groovy SQL to achive that.

Read the rest of this entry »

Dance with Dynamic Jasper Report

jasper report

jasper report

Dynamic Jasper Report is such a nice thing that exists in this world. You can create a report using powerfull Jasper Engine without creating a jrxml first. You don’t need iReport anymore. Actually I hate using iReport, it is not fun for me :) Read the rest of this entry »

vim search and replace on multiple files

To search and replace on multiple files

First type :args **/*.groovy (change groovy with file extension you want to search and replace)

Type :argdo %s/something to replace/with new words/g |w

When you type |w, it means you tell vim to save every edited file. If you are not using w, it will not save and stopped on first file (it always ask file save before going on to next file)

Zebra Style on Table with JQuery

This is very cool tips that I found from jquery documentation. Create a table zebra with just one line of code.

You define a css for evenrow and oddrow with different colors.

$('#yourTableID tr:even').attr('class','evenrow');
$('#yourTableID tr:odd').attr('class','oddrow');

Open Flash Chart .6 for Grails

It is released new version for open flash chart for Grails.
the tutorial was on http://mybytes.wordpress.com/

The difference is that 0.6 using OFC version 2 and 0.5 still using version 1. Version 2 is not compatible with version 1 so please watch out when you tried to update that plugin.

More information about Open Flash Chart 2, check the maker web on http://teethgrinder.co.uk/open-flash-chart-2/

which one you prefer ?

I just having thought of current JavaFx that using syntax that looks like Groovy DSL. I think it is fun to have a syntax like that, instead of using XML. I hate XML you know ….

Which one you like ?

<html>
    <body>
        <table>
            <tr>
                <td> something here </td>
                <td> something here too </td>
                <td> something here as well</td>
            </tr>
             <tr>
                <td> another line here </td>
                <td> another line here too </td>
                <td> another line here as well</td>
            </tr>
        </table>
        <a href="http://wysmedia.comyr.com"> wysmedia</a>
    </body>
</html>

or

html{
    body{
        table{
            tr{
                td{"something here"}
                td{"something here too"}
                td{"something here as well"}
            }
            tr{
                td{"another line "}
                td{"another line too"}
                td{"another line as well"}
            }
        }
        p{
            h2{"a paragraph"}
            a{
                href:"http://wysmedia.comyr.com"
                title:"link to wysmedia"
                "wysmedia.com"
            }
        }
    }
}

which one you like the most ?

Grails and Mysql InnoDB

Here is a little tips to let grails create using innodb engine on mysql, everytime grails create a domain/table.

1
2
3
4
5
6
7
 dataSource {
      pooled = true
      driverClassName = "com.mysql.jdbc.Driver"
      username = "wysmedia"
      password = "password"
      dialect = org.hibernate.dialect.MySQLInnoDBDialect
 }

dialect = org.hibernate.dialect.MySQLInnoDBDialect that’s the main idea to set mysql using innodb. With InnoDB you can use service transaction or database transaction

Firebug console

Just playing with Firebug and instead of displaying “annoying” alert, we can use console.log(”your object”);

for example

var a = $("#test").val();
console.log(a);
var b = $("inputA");
console.log(b);

easy ? :)

Nice ICal Calendar with JQuery

Stefanoverna.com write how to create a nice looking calendar like those in ICal using Jquery. It looks good :)

on
this web