Hello and welcome to beautiful Jun Blog.

Latest Writings

[转]开始EditPlus的自动完成

一直用着DW写样式,其实还算不错,就是启动太慢,软件越做越大,用到的功能是越来越少了。

长期以来,一直想找个可以替换的编辑器,试用过TOPSTYLE,结果还是不习惯。

以前曾经尝试过用EDITPLUS来写代码,可惜被DW养成的坏习惯,纯手写代码实在写不下去,效率太差了……。前两天忽然在群里看到有人在讨论 EDITPLUS,说起EDITPLUS配置自动完成的书写效率多高,自己也心痒痒,在网上先随便DOWN了个自动完成的模版,然后再把按自己的习惯进行 了修改,试用了几天,感觉还是满爽的,终于可以抛弃DW了。 (全文…)

Posted on 29 七月 '10 by admin, under php. No Comments.

uploadify插件可选参数的详细介绍

此文转自:http://blog.sina.com.cn/s/blog_5db0dfe40100ielj.html
最近项目用到uploadify,作为资料存档

以下是可选项的参数说明:(红色的属性代表常用的)

1 uploader 上传控件的主体文件,flash控件

默认值=’uploadify.swf’

2 script

相对路径的后端脚本,它将处理您上传的文件。

绝对路径前缀或’/'或’http’的路径

默认值=’uploadify.php’

3 checkScript

检查该文件是否已经选择驻留在服务器上。
没有默认值。 官方例子中’check.php’是提供核心文件
4 scriptData

可提供URL传递参数。用来传递get参数。例如:

index.jsp?id=1&action=uploadify可以设置成:

‘script’: ‘index.jsp’,

‘scriptData’:{‘id’:1,’action’:'uploadify’},

注:要设置‘method’:‘GET’.

5 fileDataName

您的文件在上传服务器脚本阵列的名称。
默认值=’Filedata’
6 method

设置为发送到后端脚本的方法。要么’get’或post’。

默认值’post’

7 scriptAccess

?
8 folder

您想将文件保存到的路径。考虑到安全问题,一般并不在客户端设定后供服务器得到所存的路径。我试了下。这 个参数好像以get的方式传递的。设定post得不到这个值。
9 queueID

文件队列ID。与div的id一致。参考上一篇例子的用法。
10 queueSizeLimit

限制在一次队列中的次数(可选定几个文件)。默认值= 999,而一次可传几个文件有 simUploadLimit属性决定
11 multi

是否允许同时上传多文件,可设定true或false。

默认false。设定true时,选中的文件是当前项。

12 auto 选定文件后是否自动上传,可设定true或false。

默认false

13 fileDesc

出现在上传对话框中的文件类型描述。与fileExt需同时使用
14 fileExt

支持的格式,启用本项时需同时声明fileDesc。

如:‘*.rar,*.doc

15 sizeLimit

控制上传文件的大小,单位byte
16 simUploadLimit

多文件上传时,同时上传文件数目限制。默认1

一次可传几个文件。

17 buttonText

默认按钮的名字。默认BROWER
18 buttonImg

使用图片按钮,设定图片的路径即可。
19 hideButton

上传按钮的隐藏。true 或false。默认flase
20 rollover

21 width 按钮图片的长度。默认 110
22 height

按钮图片的高度。默认 30
23 wmode

背景透明transparent 与不透明opaque设定。默认 不透明

24 cancelImg

取消按钮。设定图片路径。默认cancel.png
25 onInit

函数, 初始化时的状态。

onInit: function() {

$(“#id”).html(“上传前”);},

26 onComplete

函数:可传递五个参数

event: 事件对象

queueID: 完成文件的唯一标识符。

fileObj:

name – 文件名

filepath –上传路径

size – 文件大小

creationDate – 文件创建时间

modificationDate文件最近修改时间

type –文件的扩展名

response: 服务器回调的数据

来源:(http://blog.sina.com.cn/s/blog_5db0dfe40100ielj.html) – uploadify插件可选参数的详细介绍_项海军_新浪博客data:

fileCount – The total number of files left in the queue

speed – 平均上传速度 KB/s

如:

onComplete: function(event, queueID, fileObj) {

alert(“文件:” +fileObj.name + “上传失败”);  }

27 onSelectOnce

函数:可传递二个参数

event: The event object.

data: An object containing details about the select operation.

fileCount – The total number of files in the queue

filesSelected – The number of files selected in the select operation

filesReplaced – The number of files that were replaced in the queue

allBytesTotal – The total number of bytes for all files in the queue

28 onCancel

函数:可传递四个参数

event: The event object.

queueID: The unique identifier of the file that was cancelled.

fileObj: An object containing details about the file that was selected.

name – The name of the file

size – The size in bytes of the file

creationDate – The date the file was created

modificationDate – The last date the file was modified

type – The file extension beginning with a ‘.’

data: Details about the file queue.

fileCount – The total number of files left in the queue

allBytesTotal – The total number of bytes left for all files in the queue

29 onClearQueue

函数:可传递一个参数

event: The event object.

30 onQueueFull

函数:可传递二个参数

event – The event object.

queueSizeLimit – The maximum size of the queue.

31 onError

函数:可传递四个参数

event: The event object.

queueID: The unique identifier of the file that was errored.

fileObj: An object containing details about the file that was selected.

name – The name of the file

size – The size in bytes of the file

creationDate – The date the file was created

modificationDate – The last date the file was modified

• type – The file extension beginning with a ‘.’

errorObj: An object containing details about the error returned.

• type – Either ‘HTTP’, ‘IO’, or ‘Security’

• info – An error message describing the type of error returned

32 onOpen

函数:可传递三个参数

event: The event object.

queueID: The unique identifier of the file that was opened.

fileObj: An object containing details about the file that was selected.

name – The name of the file

size – The size in bytes of the file

• creationDate – The date the file was created

modificationDate – The last date the file was modified

type – The file extension beginning with a ‘.’

33 onProgress

函数:可传递四个参数

event: The event object.

queueID: The unique identifier of the file that was updated.

fileObj: An object containing details about the file that was selected.

name – The name of the file

size – The size in bytes of the file

creationDate – The date the file was created

modificationDate – The last date the file was modified

type – The file extension beginning with a ‘.’

data: An object containing details about the upload and queue.

percentage – The current percentage completed for the upload

bytesLoaded – The current amount of bytes uploaded

allBytesLoaded – The current amount of bytes loaded for all files in the queue

speed – The current upload speed in KB/s

34 onSelect

event: The event object.

queueID: The unique identifier of the file that was selected.

fileObj: An object containing details about the file that was selected.

name – The name of the file

size – The size in bytes of the file

creationDate – The date the file was created

modificationDate – The last date the file was modified

type – The file extension beginning with a ‘.’

35 onAllComplete

函数:可传递二个参数

event: The event object.

data: An object containing details about the upload process.

filesUploaded – The total number of files uploaded

errors – The total number of errors while uploading

allbytesLoaded – The total number of bytes uploaded

speed – The average speed of all uploaded files

36 onCheck

函数:可传递五个参数

event: The event object.

checkScript: The path to the file checking script.

fileQueue: A file queue object consisting of  key/value pairs with the queue ID as the key and the filename as the value.

folder: The path to the upload folder.

single: True if only one file is being uploaded from the queue.

Posted on 30 六月 '10 by admin, under Jquery. 3 Comments.

去除ckeditor里烦人的拼写检查

其实很简单
打开config.js文档

CKEDITOR.editorConfig = function( config )
{
config.scayt_autoStartup = false; //增加这一项即可
};

Posted on 30 六月 '10 by admin, under php. No Comments.

去掉链接时虚线框的几个方法

1.直接给链接加是onfocus=”this.blur()”.

<a href=”#” onfocus=”this.blur()”>链接</a>

2.CSS实现

a{blr:expression(this.onFocus=this.close());} /* 只支持IE,过多使用效率低 */

a{blr:expression(this.onFocus=this.blur());} /* 只支持IE,过多使用效率低 */

a:focus { -moz-outline-style: none; } /* IE不支持 */

3..htc实现IE支持

<public:attach event=”onfocus” onevent=”hscfsy()”/>

<script language=”javascript”>

function hscfsy(){

this.blur();

}

</script>

调用 a {behavior:url(htc文件所在路径地址)}

4.通过JavaScript遍历实现

window.onload=function()

{

for(var ii=0; ii document.links$[$ii$]$.onfocus=function(){this.blur()}

}

5.对WordPress可以用内部的JQuery框架来去除

$(“a”).bind(“focus”,function(){

if(this.blur){

this.blur();

}

});

转自:http://leotheme.cn/javascript/quediaolinksdesxk.html

Posted on 23 六月 '10 by admin, under CSS. No Comments.

继续踢腾讯微博种子。。。

http://t.qq.com/invite/7e37fabfcb1b36eb6afb

http://t.qq.com/invite/e22d0abccbddd42af8dd

http://t.qq.com/invite/9150a1fe084e7abd1d3b

http://t.qq.com/invite/ef0c4ea80b751f73e1d9

http://t.qq.com/invite/44bb7b51962c2639423f

http://t.qq.com/invite/740325df5936d167f355

http://t.qq.com/invite/b3de15d7e627718df1bf

http://t.qq.com/invite/926ab732004d19f5b22d

Posted on 24 五月 '10 by admin, under 其他. No Comments.

再踢5个腾讯微博种子

又新获得5个新种子:

http://t.qq.com/invite/7e37fabfcb1b36eb6afb

http://t.qq.com/invite/62fdf89ba925dab626bb

http://t.qq.com/invite/9150a1fe084e7abd1d3b

http://t.qq.com/invite/8161c65a12a605bd55cd

http://t.qq.com/invite/e22d0abccbddd42af8dd

Posted on 23 五月 '10 by admin, under 其他. No Comments.

踢五个QQ微博种子

http://t.qq.com/invite/a225a845cad2bde5824b

http://t.qq.com/invite/c31b82233879c1b5e61b

http://t.qq.com/invite/42fd71f84c2889b1bea3

http://t.qq.com/invite/952c1b7a62b79e967f7d

http://t.qq.com/invite/7b6a82ab3977ca030b51

Posted on 22 五月 '10 by admin, under 其他. No Comments.

让Firefox能在最小化时释放内存

Tags:.

Firefox的多标签浏览以及对插件的支持,使成为继IE之后又一款倍受欢迎的。不过,当 你在Firefox中打开多个标签后,系统资源占用率也会直线上升,当打开的标签页数目达到一定数量时,可能会导致其他应用程序暂时无法运行的窘境。其 实,我们可以通过设置,让Firefox在最小化时立即释放占用的内存,万一遇到打开很多窗口导致其他程序无法正常运行时,只要将Firefox最小化便 可以解决问题。

打开Firefox,然后在地址栏中输入:about:config 并回车,打开设置窗口,然后右击下面的空白区域并选择“New/Boolean”,新建一个名为“config.trim_on_minimize”的布 尔型值,并将其值设置为“True”。这样就可以实现在Firefox最小化时自动释放占用的内存资源,从而在一定程度上可以避免因为Firefox打开 了很多标签窗口而导致系统暂时假死的情况。

另外,我们还可以在 “About:config”设置中将名为“browser.sessionhistory.max_total_viewers”(页面快进/快退功能 中保存的页面总数,默认是-1(无限))的值修改为5或更小,这样就避免浪费更多的资源来保存页面快进/快退的页面数。最后重新启动Firefox,你便 会发现Firefox占用的系统资源不再高高不下了。

Posted on 4 四月 '10 by admin, under 其他. No Comments.

Google G3和Iphone 3G入手

Tags:, , , .

这个月千先入手了HTC Hero G3,其实我是想入手Iphone的,但是预算有限,之后老婆看到我换机了,心里痒痒,去买山寨Iphone(注明:本人尤其厌恶china山寨),随后让我去退了,费了一番周折和损失,之后去拿下了美版Iphone. 这段时间使用下来,感觉G3有一定的潜力,但是和Iphone比起来差距太大了,虽然市场里的应用达到了iStore的一半,但是很多都只是冲冲数字而已,现在有点小后悔了,但是听说四月底Android1.5可以升级到Android2.1了,希望我的HTC Hero起码可以翻翻墙吧,只有这一点小要求了.

Posted on 29 三月 '10 by admin, under 其他. No Comments.

测试Featured Content Gallery插件的一点小问题

按照安装要求配置了,但是首页怎么都是一个空白,很明显JS没执行

问题还是处在WAMP的配置上,插件里的jd.gallery.js.php用到”<?= ?>”的缩略写法,我的WAMP默认确实关闭了 short open tag

在此备注一下,免得以后忘记

Posted on 23 三月 '10 by admin, under 其他. No Comments.