03 2012 档案
摘要:When leveraging Facebook as a marketing channel, you will want to create a custom landing page to welcome new users, set the stage for your brand presence, and show that you take Facebook seriously.To create a Facebook Landing Page tab, you’ll needa Facebook business page. If you don’t already have
阅读全文
摘要:$.each(selectValues, function(key, value) { $('#mySelect') .append($("<option></option>") .attr("value",key) .text(value)); });或者:auxArr = []; auxArr[0] = "<option value=''></option>"; $.each(data, function(k, v){ ...
阅读全文
摘要:From:http://jasonswett.net/blog/inheritance-with-symfony-and-doctrine-orm/ The Problem Doctrine ORM claims to support some kind of inheritance but I have yet to see a good example. The inheritance documentation on the Doctrine ORM site could be worse but it certainly has a lot of room for improveme.
阅读全文
摘要:在Windows Server 2003的服务器平台上,用CKFinder上传中文文件名的文件,上传后,文件名变成了乱码,导致文件链接找不到。上传中文名文件乱码问题在ckfinder/config.php中找到如下一段配置代码:/*If you have iconv enabled (visit http://php.net/iconv for more information),you can use this directive to specify the encoding of file names in yoursystem. Acceptable values can be fou
阅读全文
摘要:From: http://papermashup.com/using-php-and-css-to-make-a-simple-graph/Here’s an easy way to display a simple percentage graph using PHP to work out the percentages and do the maths and CSS to display the data on our page. Here’s the demo.First you need to copy the CSS below into the head of your pag
阅读全文
摘要:Cufon官方并不支持中文,所以很多收费主题里带了Cufon字体,写了中文就不识别了google一番,发现很多人遇到同样的问题,归纳了一下解决方法,大致有如下几种。方法一,使用中文字体的js文件,目前有一个做好的,是微软雅黑字体,中英文都支持的,只要使用这个字体就可以万无一失了,缺点是只有一种字体,不支持粗体、斜体等样式,看着比较单调。使用时如下设置即可Cufon.replace ('#id', {fontFamily: 'Microsoft YaHei'});或者Cufon.set('fontFamily', 'Microsoft Ya
阅读全文
摘要:$(function() {$("div#friend_pic1").hover(function() {$("div#fname_1").delay(2000).slideUp();});$("div#friend_pic1").mouseout(function() {$("div#fname_1").slideDown();});});like: http://jsfiddle.net/XnnvD/1/
阅读全文
摘要:I had an array with something like the following: Array ( [0] =>null, [1] => test, [2] => fun ). But I don’t want [0], the empty value in the array.After searching the web for a good solution, I saw that people were using anywhere from 4 to 10+ lines of code to remove null values from array
阅读全文
摘要:From: http://www.masteringapi.com/tutorials/how-to-post-a-message-on-the-user-wall-using-facebook-graph-api/33/This is a quick post to demonstrate how to post a status message on the user wall using the Facebook Graph API. First of all, you need the publish_stream extended permission to perform this
阅读全文
摘要:// put this line in the first of the template<?php echo pack("CCC",0xef,0xbb,0xbf); ?>
阅读全文
摘要:global $timezoneTable; $timezoneTable = array( "-12" => "(GMT -12:00) Eniwetok, Kwajalein", "-11" => "(GMT -11:00) Midway Island, Samoa", "-10" => "(GMT -10:00) Hawaii", "-9" => "(GMT -9:00) Alaska", "-8
阅读全文
摘要:From: http://www.karlrixon.co.uk/writing/calculating-age-from-date-of-birth-in-php/I imagine it’s a fairly common task to calculate an age in years from a date of birth. However most of the solutions I’ve seen either seem to be unnecessarily complicated or else fail to take in into account leap year
阅读全文
摘要:Here we go !The sort in admin generator is for a single field only, but in some complex list, it can be usefull to sort by multiple criterias. This is the main goal of this snippet. Those functions therefore override the ones of your auto-generated class.(1)And to display what are the ongoing sort c
阅读全文
摘要:div显示滚动条的css代码<div > 这里是你要显示的内容 </div>效果如下:显示滚动条的代码div显示上下滚动条的css代码<div > 这里是你要显示的内容 </div>div只显示上下滚动条OVERFLOW-Y:scroll;这段是关键修改div滚动条颜色的css代码<div > 这里是你要显示的内容 </div>修改滚动条颜色的代码SCROLLBAR-FACE-COLOR(立体滚动条凸出部分的颜色)SCROLLBAR-HIGHLIGHT-COLOR(滚动条空白部分的颜色)SCROLLBAR-SHADOW-C
阅读全文