Pages

Friday, January 25, 2013

Fatal error: Maximum execution time of 300 seconds exceeded with phpMyAdmin

Fatal error: Maximum execution time of 300 seconds exceeded with phpMyAdmin

see file :   \phpMyAdmin\libraries\config.default.php
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */
 $cfg['ExecTimeLimit'] = 300;

==> for import/export large data, we can  incre exec time limit, i have change to 0 for unlimited. 

Tuesday, January 15, 2013

JSTL Cơ bản [ P1 Core]

[updating...]
JSP là một công nghệ được xâu dựng dựa trên cú pháp của ngôn ngữ kịch bản - script language tương tự php , js.... do vậy việc ta lập trình các câu lệnh điều khiển, vòng lặp , đọc ghi dữ liệu.... đều phải khai báo, sử dụng thông qua các script tag như  :

JSP Syntax :
<%-- -->
<% code fragment %>
 or <jsp:scriptlet> code fragment </jsp:scriptlet>
<%= expression %>
or
<jsp:expression> expression </jsp:expression>
<%! declaration; [ declaration; ]+ ... %>
or
 <jsp:declaration> code fragment [ declaration; ]+ ... </jsp:declaration>
--> điều này khiển trang jsp trở nên phức tạm lên rất nhiều.
Examples
<% 
   String name = null; 
   if (request.getParameter("name") == null) { 
%> 
 
<%@ include file="error.html" %> 
 
<% 
   } else { 
   foo.setName(request.getParameter("name")); 
   if (foo.getName().equalsIgnoreCase("integra")) 
      name = "acura"; 
   if (name.equalsIgnoreCase( "acura" )) { 
%>
Như ta thấy ví dụ này chỉ kiểm tra giá trị của một param để làm công việc tương ứng mà cũng đã dối mắt rồi khó kiểm soát và việc bảo trì cũng trở lên khó khăn hơn.

Một giải pháp được ưa thích hơn đó là sử dụng JSTL Core tag libs.
JSTL core bao gồm các tag sau : 


JSTL Core
Sau đây ta sẽ đi lần lượt các tag thường xuyên được sử dụng trong ứng dụng.

<c:out /> 



<c:forEarch /> 

-------------------------------------------------------------------------
Muốn lấy số thứ tự hiện thời của vòng lặp khi thao tác với forEach tag trong JSTL -> sử dụng thuộc tính varStatus.

- [varStatus].index : bắt đầu từ 0  -  the 0-based index of the current round of the iteration
- [varStatus].count : bắt đầu từ 1 -   the 1-based count of the current round of the iteration


-------------------------------------------------------------------------

Link tham khảo :
http://jstl.java.net/
http://docs.oracle.com/javaee/6/api/javax/servlet/jsp/jstl/core/LoopTagStatus.html
http://docs.oracle.com/javaee/5/tutorial/doc/bnakc.html
http://stackoverflow.com/tags/jstl/info

GIT push : The remote end hung up unexpectedly



Problems
$ git push -u origin master
Password for 'https://......git'
error : RPC failed; result=55, HTTP code = 0
fatal : The remote end hung up unexpectedly
fatal : The remote end hung up unexpectedly
Everything up-to-date
solution : commit size (default is < 1Mbyte) --> tăng commit size lên.
// tăng lên 500M
git config --global http.postBuffer 524288000
refer link https://bitbucket.org/site/master/issue/3578/cannot-push-fatal-the-remote-end-hung-up

Hibernate Core 3.6.4 Conflict org.hibernate.type.WrappedMaterializedBlobType

Starting with 3.6, Hibernate Annotations is incorporated into Hibernate Core, so the old hibernate-annotations jar should not be included.

refer link
http://lists.jboss.org/pipermail/hibernate-issues/2011-August/033267.html
https://hibernate.onjira.com/browse/HHH-6284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

==> with  hibernate 3.6.x version<hibernate.version>3.6.10.Final</hibernate.version> must remove :