Typoscript Auto Copyright

## Copyright Notice [Begin]
      # Automatic year update
      lib.copyright = TEXT
      lib.copyright.data = date:U
      lib.copyright.strftime = %Y
      lib.copyright.wrap = 
      # secondary language copyright notice
      [globalVar = GP:L = 1]
        lib.copyright.wrap = 
      [end]
      ## Copyright Notice [End]

php generate ics

header("Content-Type: text/Calendar");
header("Content-Disposition: inline; filename=calendar.ics");
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:-//Foobar Corporation//NONSGML Foobar//EN\n";
echo "METHOD:REQUEST\n"; // requied by Outlook
echo "BEGIN:VEVENT\n";
echo "UID:".date('Ymd').'T'.date('His')."-".rand()."-example.com\n"; // required by Outlok
echo "DTSTAMP:".date('Ymd').'T'.date('His')."\n"; // required by Outlook
echo "DTSTART:20120227T1833000\n"; 
echo "SUMMARY:TEST\n";
echo "DESCRIPTION: this is just a test\n";
echo "END:VEVENT\n";
echo "END:VCALENDAR\n";

TBE_EDITOR.rawurlencode erroneously adds “=” in wizards

If you use a wizard for a colorpicker or a link in TYPO3 4.4.8 and 4.5.3 (haven’t tested with older versions) and click on the wizard button, the current value of the field is retrieved in the window.open() function using

TBE_EDITOR.rawurlencode(document.editform[‘data[pages][1][tx_testextension_color]_hr’].value,200)
TBE_EDITOR.rawurlencode(document.editform[‘data[pages][1][tx_testextension_internet]_hr’].value,200)
This returns a wrong value, because TBE_EDITOR.rawurlencode always adds a “=” in front:
– If the value is empty, “=” will be returned, resulting in a default value “http://=” in the link wizard.
– If a value is set in the color picker, e.g. “#333666”, the result of TBE_EDITOR.rawurlencode will be “=#333666” in the colorpicker wizard. (continue reading…)


安卓重力感应调整

顺序:
1,进入工厂模式:关机情况下,按住“下音量键”和“电源键”,直到出现长震动,这时放开电源键,按住“下音量键”直到出现工厂模式(见图)
2.进入工厂模式后,会先开始自动测试,这时一直按“上音量键”,直到进入主菜单,选择“Item Test”(见图)这里说明一下,下音量键为调整选项,电源键为确认
3.按“下音量键”到G-sensor Calibration,确定(见图)
4.这时注意,确保将手机放在一个水平面上,然后按“下音量键”到Do Calibration(40),点确认,直到调整完毕。
5.重启手机,看看是不是已经调整好了?


Displaying the current date

You can display the current date in various formats on a web site. This can be implemented by using the PHP function strftime within your TypoScript template record. (continue reading…)


PHP Document 代码注释规范

PHPDocumentor是一个用PHP写的工具,对于有规范注释的php程序,它能够快速生成具有相互参照,索引等功能的API文档。老的版本是 phpdoc。 (continue reading…)


PHP由周取日期

根据指定年份和周数,获取这一周的周一(开始日期)和周日(结束日期) (continue reading…)


MySQL数据库23道安全保障

使用mysql,安全问题不能不注意。以下是mysql提示的23个注意事项:
1.如果客户端和服务器端的连接需要跨越并通过不可信任的网络,那么就需要使用ssh隧道来加密该连接的通信。
2.用set password语句来修改用户的密码,三个步骤,先“mysql -u root”登陆数据库系统,然后“mysql> update mysql.user set password=password(‘newpwd’)”,最后执行“flush privileges”就可以了。 (continue reading…)


Converting transparent PNG to Jpeg

ImageMagick 6.3.2 with the MagickWand-API and I had troubles to convert and resize a partially transparent png to an jpg-file.
I tried the command line tools and the same things happend.

convert png.png png.jpg
–> a jpg-file is created and the transparent area is white

convert png.png -resize 500×400 png_small.jpg
–> a jpg-file in the right dimension is generated and the transparent area is black

What settings do i have to set if i want transparent areas always to be white?
(continue reading…)


WCAG 标题(h1–h6)

html语义化,是现在谈论得比较多的话题。那何谓html语义化,简单的说吧,就是要有良好的html结构,在剥离css后,依然能读懂一个页面的结构,能分清哪些是标题,哪些是内容。切忌不要用css让一个标签去表现另一个标签。 (continue reading…)

1 Comment more...

Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress