记录学习过程中的点点滴滴
2010年六月
jquery ajax 提交checkbox数组的方法
六 27th
直接上代码,主要是获取checkbox值的方法:将其放到数组中,然后连接成字符串
var selectedItems = new Array(); $("input[@name='itemSelect[]']:checked").each(function() {selectedItems.push($(this).val());}); if (selectedItems .length == 0) alert("Please select item(s) to delete."); else $.ajax({ type: "POST", url: "/ajax_do_something.php", data: "items=" + selectedItems.join('|'), dataType: "text", success: function (request) { document.location.reload(); }, error: function(request,error){ alert('Error deleting item(s), try again later.'); } } )
隆重推出团购搜索测试版本[http://www.yaronspace.cn/tuan/]
六 26th
地址:http://www.yaronspace.cn/tuan
背景
团购网站最近爆发式增长,对用户来说,每天需要关注大量的团购网站的信息,所以有必要做一个团购网站的
信息整合。
经过一天的努力,搜索网站终于完成了,代码还是比较山寨的~~
具体实现的原理后续再贴吧~~
实现的功能
1,浏览系统已收录的团购网站当前的团购信息,已包括大多数团购网站,如果有些网站未收录,请发email:jidalyg_8711@163.com
2, 支持模糊查询功能
3, 支持feed订阅
4, 支持按价格升序或降序排列
将要实现的功能:
1,团购物品的自动分类
2,多城市浏览(目前只支持北京)
希望大家多多提意见 email: jidalyg_8711@163.com
ps:还需说明一点:网站页面我是从别的地方扒过来的,主要是自己水平太差了
搜索网站地址:http://www.yaronspace.cn/tuan
PM(06)_Leadership
六 23rd
1. Leadership and Management
Leadership is about people
What is management?
Management is the process of achieving organizational goals through engaging in the 4 major fuctions of planning, organizing, leading and controlling.
- Planning: setting goals and deciding best way to achieve them.
- Organising: allocating and arranging resources.
- Leading: influencing others to work towards goals.
- Controlling: regulating activities to reach goals.
What is leadership?
Influence others to achieve goals.
People accept a leader’s influence because the leader has power.
What kind of power?
- Legitimate power
- Reward power
- Expert power
- Information power
Managers vs Leaders
Leadership and managers are not the same thing
Leaders |
Managers |
Innovates |
Administers |
An original |
A copy |
Develops new things |
Maintains existing things |
People focus |
System and structure focus |
Inspires trust |
Controls |
Long term |
Short term |
Ask what and why |
Ask when and how |
Eyes on the horizon |
Eyes on the bottom line |
Do the right thing |
Do the things right |
smarty 截取字符串函数 truncate的用法
六 22nd
smarty truncate 截取字符串
从字符串开始处截取某长度的字符,默认的长度为80
指定第二个参数作为截取字符串的长度
默认情况下,smarty会截取到一个词的末尾,
如果需要精确到截取多少个字符可以使用第三个参数,将其设为”true”
具体用法如下:
//index.php $smarty = new Smarty; $smarty->assign('articleTitle', 'Two Sisters Reunite after Eighteen Years at Checkout Counter.'); $smarty->display('index.tpl'); //index.tpl {$articleTitle} {$articleTitle|truncate} {$articleTitle|truncate:30} {$articleTitle|truncate:30:""} {$articleTitle|truncate:30:"---"} {$articleTitle|truncate:30:"":true} {$articleTitle|truncate:30:"...":true}
输出结果:
Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after…
Two Sisters Reunite after
Two Sisters Reunite after—
Two Sisters Reunite after Eigh
Two Sisters Reunite after E…
PM(05)_Marketing and project management
六 21st
1. What is marketing?
Plan&Execute->Exchange->Satisfaction
Exchange: buying and selling
Distribution: transport and storage
Marketing mix: Product, Price, People, Promotion????
2. Evolution of marketing
- Production orientation: Take orders-> Distribute goods
- Sales orientation: Increase advertising->Enlarge sales force->Develop sales techniques
- Customer orientation->Determin customer needs->Develop goods and services to fill needs
The marketing concept is a business philosophy that involves the entire orgnization in the process of satisfying customers needs while achieving orgnizational goals.
vim中两个实用插件doxygen和projects的安装与使用
六 20th
DoxygenToolkit
DoxygenToolkit:它会根据配置自动生成注释,主要是license注释、文件注释、函数及类注释
1,下载地址:http://www.vim.org/scripts/script.php?script_id=987
并将其解压到$home/.vim/目录下
2, 修改.vimrc的配置,加入自己对Doxygen的配置
“doxygen setting
let g:DoxygenToolkit_authorName=”liyangguang liyangguang@baidu.com”
let g:DoxygenToolkit_briefTag_funcName=”yes”
let g:doxygen_enhanced_color=1
” DoxAuthor Dox DoxBlock三个命令的快捷操作
map <F3>a : DoxAuthor
map <F3>f : Dox
map <F3>b : DoxBlock
map <F3>c O/** */
3, 此时已安装完成,运行vim 在命令行输入 : DoxAuthor 即可看到效果
DoxAuthor:将文件名,作者,时间等关键字自动填好
DoxLic:license注释
Dox:函数及类注释
firefox插件Firebug的用法
六 9th
firebug作为firefox下js调试的工具,功能还是很强大的~~
下面两篇文章介绍了Firebug的基本用法
http://blog.csdn.net/rocket5725/archive/2009/09/01/4506532.aspx
http://blog.csdn.net/tianxiaode/archive/2007/09/02/1769152.aspx
JavaScript调试技巧之:断点调试
六 9th
这两篇文章写得挺全的
http://jsfox.cn/blog/javascript/debug-js-using-break-points-part1.html
http://jsfox.cn/blog/javascript/debug-js-using-break-points-part2.html
JavaScript调试技巧之:快速定位[转载]
六 9th
快速定位,其实就是快速定位程序的错误,所以也算是调试。这个在实际的码代码时往往比较实用。大多数情况下,你的js代码不多(少于1000行), 只要能迅速发现代码的错误,往往不用复杂的调试。关于常用的快速定位方法,我总结了一下几点,欢迎大家补充。
1. 使用alert
alert其实比较实用。本地调试中,在合适的位置写alert,打出来一些变量,虽然比较土,但是往往事半功倍!另外有一个alert技巧,想看 看一个对象中的属性和它的值吗,试试这个:
var str = "", i; for (i in obj) { str += i + ": " +obj[i] + "\n"; } alert(str); 更多 >
近期评论