在 goods.php 文件,找到 $smarty->assign('goods', $goods);在它上面增加下面代码:方法一:$cat_arr = get_parent_cats($goods['cat_id']);foreach ($cat_arr AS $val) { $goods['t....
分类:
其他好文 时间:
2014-07-18 17:02:46
阅读次数:
161
1. ListView须要设置adapter,它的item是通过adapter的方法getView(int position, View convertView, ViewGroup parent)获得的。2. ListView中仅仅有第一屏的item须要新建,它的引用会被存在RecycleBin对...
分类:
其他好文 时间:
2014-07-18 14:09:48
阅读次数:
192
最近在编写一个js库采用的是面向对象的思想来进行编写,因此在js继承上有了一定的问题js继承有几种继承方式,分别为原型继承,类似继承,混合继承。原型继承: var child = function(){} var parent = function(){}child.prototype=new p....
分类:
Web程序 时间:
2014-07-18 14:02:45
阅读次数:
261
帧用来存放子页面,既可以是iframe,又可以是frameset。window对象是全局对象,页面上的一切函数和对象都在它的作用域里。 1、parent代表父窗口、如果父窗口又存在若干层嵌套,则top代表顶级父窗口。self代表窗口自身。Java代码if(self==top){//}判断窗口是否处....
分类:
编程语言 时间:
2014-07-18 12:10:41
阅读次数:
239
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2", "1", ...
分类:
其他好文 时间:
2014-07-18 11:19:56
阅读次数:
210
堆有两种: max-heap 和 min-heap. Max-heap 一般用来排序,Min-heap 用来实现 priority queue.max-heap的定义是:for each i: A[parent(i)] >= A[i]min-heap: for each i: A[parent(i)...
分类:
其他好文 时间:
2014-07-18 10:23:12
阅读次数:
180
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-07-17 23:27:12
阅读次数:
216
Avalidprovisioningprofileforthisexecutablewasnotfound导入证书,真机运行报错原因:provisioningprofile所对应的证书里面所包含的设备中,缺少了你自己这台设备的UDID,你需要把自己的UDID发送给提供provisioning文件的那个人,让他给你加上,然后再重新提供一个provisioningp..
分类:
其他好文 时间:
2014-07-17 20:23:09
阅读次数:
203
上一篇说到了,对于OS X 10.10 DP2,使用它内置的createinstallmedia命令生成的USB安装盘,安装后会把目标分区转化为Core Storage;另外,该命令的不完善的地方是,有的时候会说"xxx is not a valid volume mount point."而无法继续。所以,这个小脚本就派上了用场:...
分类:
其他好文 时间:
2014-07-17 16:39:39
阅读次数:
326
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all va...
分类:
其他好文 时间:
2014-07-17 10:18:17
阅读次数:
181