This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
在app的根目录下新一个Global类继承自GlobalSettings。 | |
这样,可以覆盖GlobalSettings类中的方法,以达到修改应用程序的行为:包括启动,停止等 | |
**/ | |
import play.*; | |
import play.libs.*; | |
import com.avaje.ebean.Ebean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT o where A o IN(o.members) m WHERE m.key = ? and m.value = ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var o = {}; | |
for(var i = 0; i < 10; i++){ | |
o['id['+ i +']'] = i; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" type="text/css" href="css/uploadify.css"> | |
<script type="text/javascript" src="jquery/jquery-1.7.js"></script> | |
<script type="text/javascript" src="jquery/jquery.uploadify.min.js"></script> | |
<script type="text/javascript" src="jquery/swfobject2.2.js"></script> | |
<script> | |
$(document).ready(function() { | |
$("#uploadify").uploadify({ | |
//开启调试 | |
'debug' : false, | |
//是否自动上传 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, $, undefined) { | |
var myFunc = function() { | |
// ... | |
} | |
window.myFunc = myFuc; | |
}) (window, jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void test(Boolean b, String testname){ | |
System.out.format("\n---- %s -----\n : %s", testname, (b ? "success" : "false")); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* datagrid的扩展 | |
*/ | |
$.extend($.fn.datagrid.defaults, { | |
onLoadSuccess: function (data) { | |
if (!data || !data.rows || data.rows.length == 0) { | |
var body = $(this).data().datagrid.dc.body2; | |
var columns = $(this).data().datagrid.options.columns; | |
var columns_length = columns.length; | |
var colspan = columns[ columns_length > 0 ? columns_length - 1 : 0].length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.onkeydown = function (e) { | |
// 兼容FF和IE和Opera | |
var theEvent = e || window.event; | |
var code = theEvent.keyCode || theEvent.which || theEvent.charCode; | |
if (code == 13) { | |
$('#formId').trigger('submit'); | |
return false; | |
} | |
return true; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuleBasedCollator collator = (RuleBasedCollator) Collator.getInstance(Locale.CHINA); | |
collator.compare(str, o.getName()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn install:install-file -Dfile=D:\mvn\spring-context-support-3.1.0.RELEASE.jar -DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar |