- 浏览: 270983 次
- 性别:
- 来自: 北京
-
最新评论
-
jimode2013:
thanks
UIPanGestureRecognizer学习笔记 -
白色蜻蜓:
- (void) loadView { //opaquevie ...
UIWebView中使用UIActivityIndicatorView
文章列表
CGRectMake的四个参数
- 博客分类:
- ios征程
对CGRectMake,不是很明白,经常使用 initWithFrame:CGRectMake(0,160,260,200)];其中四个参数分别是x y width height
Navigation和TabBar合用
- 博客分类:
- ios征程
AppDelegate中的代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//self.nav = [[[UINavigationController alloc ] initWithRootViewController:viewController ] autorelease ];
//设置标签栏
UIViewController *viewCon1, *viewCon2, *vie ...
Project -> Edit Project Settings. Then choose the "General" tab. At the bottom you can choose "Base SDK for all Configurations:"
iphone开发中怎么更改程序图标
- 博客分类:
- ios征程
在项目的Info.plist里找到icon这个选项,指定一下图标名即可,如"icong.png"
1. DAO里写好根据商品名模糊查找,返回一个String[] 数组 的方法
public String[] findbyname(String name){
Session sess=HibernateSessionFactory.getSession();
String [] goodsname = null;
try {
String hql="select a from TGoods a where a.goodsnum-a.sellnum>0 and a.goodsname like '%"+nam ...
Java code
List<Object> list = new ArrayList<Object>();
Map <Object,Integer> map = new HashMap <Object,Integer>(); for(Object o :list)
{
map.put(o, map.get(o)==null?1:map.get(o)+1);
}
var myDate = new Date();
myDate.getYear(); //获取当前年份(2位)
myDate.getFullYear(); //获取完整的年份(4位,1970-????)
myDate.getMonth(); //获取当前月份(0-11,0代表1月)
myDate.getDate(); //获取当前日(1-31)
myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒 ...
var a = document.getElementById("aHref");
a.href = '/user';
//取消<a>标签原先的onclick事件,使<a>标签点击后通过href跳转(因为无法用js跳转)^-^
a.setAttribute("onclick",'');
//激发标签点击事件OVER
a.click("return false");
document.getElementById("up").setAttribu ...
substr 方法返回一个从指定位置开始的指定长度的子字符串。stringvar.substr(start [, length ])参数stringvar必选项。要提取子字符串的字符串文字或 String 对象。start必选项。所需的子字符串的起始位置。字符串中的第一个字符的索引为 0。length可选项。在返回的子字符串中应包括的字符个数。说明如果 length 为
<script type="text/javascript">
//图片不存在的时候转向一张默认的图片
function imgError(obj){
obj.src='images/book15.jpg';
obj.onerror = null;//控制onerror事件只触发一次
// img标签中应用onerror="imgError(this);"onerror='imgError(this);'
}
</script>
<style type="text/css">
.code{
font-family:Arial;
font-style:italic;
color:white;
border:0;
padding:2px 3px;
letter-spacing:3px;
font-weight:bolder;
width:40px;height: 20px;color:#FFFFFF;text-align: center;
}
</style>
<body oncontextmenu="s ...
屏蔽文本被选中:
在需要屏蔽的元素标签上添加ondblclick="return false;" onselectstart="return false"事件即可。例如
<body ondblclick="return false;" onselectstart="return false"></body>
屏蔽右键:
在需要屏蔽的元素标签上添加oncontextmenu="self.event.returnValue=false&q ...
select * from nrpt_book t where concat(t.name,t.author) like '%平%';
结果是不论name字段还是author字段只要其中包含平这个字的记录 都被查出来
public class SortAction extends ActionSupport {
String xml1 = "";
String xml2 = "";
String xml3 = "";
List<Sort> list1 = null;
List<Sort> list2 = null;
List<Sort> list3 = null;
private BookSortService bookSortService;
public void setB ...