`
tianyalinfeng
  • 浏览: 433424 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表
struts2使用UrlRewriteFilter时报错 The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknow ...

css样式优先级

    博客分类:
  • Css
样式后面加上!important字样,确保该样式的优先级,不被其他样式覆盖 #content p{ font-size: 1.8em !important; }

flash时钟

package {         import flash.display.Sprite;         import flash.events.TimerEvent;         import flash.geom.Point;         import flash.utils.Timer; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat;                  public class Main exten ...
function lookProperty(obj){ var ob=eval(obj); var property=""; for(var p in ob){ property+=p+"\n"; } alert(property); }

自动调整图片大小

    博客分类:
  • Css
max-width:600px; //IE7、FF等其他非IE浏览器下最大宽度为600px;    width:expression(document.body.clientWidth>600?"600px":"auto"); //当图片大小大于600px,自动缩小为600px; 
public static String trimHtml(String input) { if (input == null || input.trim().equals("")) { return ""; } String str = input.replaceAll("\\&[a-zA-Z]{1,10};", "").replaceAll( "<[^>]*>", ""); str = str.replaceAll("[(/ ...
例如:Test.java 在Test中获取项目classes文件夹路径 Test.classLoader.getResource("").getPath()

Ehcache配置

<defaultCache             maxElementsInMemory="10000"//缓存中最大允许创建的对象数             eternal="false"//缓存中对象是否为永久的,如果是,超时设置将被忽略,对象永不过期             timeToIdleSeconds="120"//缓存数据钝化时间(设置对象在它过期之前的空闲时间)             timeToLiveSeconds="120" //缓存数据生存时间(设置对象在它过期之前的生存 ...

js平滑返回顶部功能

    博客分类:
  • Js
head里添加 <style type="text/css"> .backToTop {    display: none;    width: 18px;    line-height: 1.2;    padding: 5px 0;    background-color: #000;    color: #fff;    font-size: 12px;    text-align: center;    position: fixed;    _position: absolute;    right: 10px;    bo ...
所需文件 1. ZeroClipboard.js 2. ZeroClipboard.swf   使用 1. 设置好ZeroClipboard.swf的位置,可在ZeroClipboard.js中修改,也可调用ZeroClipboard.setMoviePath方法 2. var clip = new ZeroClipboard.Client(); 3. 设置好透明flash层 var movie = clip.getHTML(24,14);//可自定义长宽 document.write("<div id='movieDiv' style='position: ...
<s:bean id="myComparator" name="com.sample.util.MyComparator"></s:bean> <s:sort comparator="myComparator" source="list"> <s:iterator status="st"> </s:iterator> </s:sort> package com.sample.u ...
<s.c.r.i.p.t type="text/javas.c.r.i.p.t"> jQuery.noConflict(); //将变量$的控制权让渡给prototype.js jQuery(function($){ //使用jQuery $("p").click(function(){ //继续使用 $ 方法 alert( $(this).text() ); }); }); $("pp").style.display = 'none'; //使用prototype </s.c.r.i.p.t>
<%! int a = 0; %>   当jsp编译为servlet时,a是一个全局变量,此时还可以为a加修饰符,如 <%! private static int a = 0; %>   <% int a = 0; %> 当jsp编译为servlet时,a只是某个方法里的局部变量
斐波那契序列 F(1)=1, F(2)=2, 对n>=2, 有F(n) = F(n-1) + F(n-2)
private static int recursiveMax(int[] a, int n) { if (n == 1) { return a[0]; } return Math.max(recursiveMax(a, n - 1), a[n - 1]); }
Global site tag (gtag.js) - Google Analytics