2015年5月28日 星期四

generator-onfocus generator-disabled generator-disable

{onfocus}

if(document.getElementById('openApproveButton')){ var s=document.getElementById('SOBODY2.CONFIRM'+thisRow).checked; document.getElementById('openApproveButton').disabled = s; }

{/onfocus}

{endOfLoad}
   if(newAdd==0){document.getElementById('this.id').disabled = true;};
{/endOfLoad}

2015年5月14日 星期四

itext-indent


http://kodejava.org/how-do-i-set-paragraph-indentation-in-itext/


package org.kodejava.example.itextpdf;

import com.itextpdf.text.Chunk;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class ParagraphIndentationDemo {
    private static final String CONTENT =
            "Lorem ipsum dolor sit amet, consectetur adipisicing " +
            "elit, sed do eiusmod tempor incididunt ut labore et " +
            "dolore magna aliqua. Ut enim ad minim veniam, quis " +
            "nostrud exercitation ullamco laboris nisi ut aliquip " +
            "ex ea commodo consequat. Duis aute irure dolor in " +
            "reprehenderit in voluptate velit esse cillum dolore eu " +
            "fugiat nulla pariatur. Excepteur sint occaecat cupidatat " +
            "non proident, sunt in culpa qui officia deserunt mollit " +
            "anim id est laborum.";

    public static void main(String[] args) {
        Document document = new Document();
        try {
            PdfWriter.getInstance(document,
                    new FileOutputStream("ParaIndentation.pdf"));
            document.open();

            Paragraph paragraph = new Paragraph();
            paragraph.add(new Chunk(ParagraphIndentationDemo.CONTENT));

            // Set paragraph's first line indent
            paragraph.setFirstLineIndent(75);

            // Set paragraph's left side indent
            paragraph.setIndentationLeft(50);

            // Set paragraph's right side indent
            paragraph.setIndentationRight(25);
            document.add(paragraph);
        } catch (DocumentException | FileNotFoundException e) {
            e.printStackTrace();
        } finally {
            document.close();
        }
    }
}

2015年5月7日 星期四

vi /etc/mysql/my.cnf ubuntu 20150730

ubuntu

mysql tune , mysql performance


vi /etc/mysql/my.cnf


etc/my.cnf
innodb_buffer_pool_size = 384M
key_buffer = 256M
query_cache_size = 1M
query_cache_limit = 128M
thread_cache_size = 8
max_connections = 400
innodb_lock_wait_timeout = 100