看看想想记记
2009-10-16Tech

1条评论
945 views

Lightwindow图片大小的BUG

Lightwindow 是个不错的图片浏览库,但有个情况就是在IE下,会出现在图片没有载入完全时,会出现很小一个框的BUG,看不清图片

lightwindow

现在有个解决方案:

老外提供的》》

主要是IE引起的,具体原因要研究一下,但注意不要COPY他的代码

要用原版的:>>>

同样,你也可以下载我这里的:

Lightwindow.js    1217-1239:
// We have to do this instead of .onload
this.checkImage[i] = new PeriodicalExecuter(function(i) {
if (!(typeof $('lightwindow_image_'+i).naturalWidth != "undefined" && $('lightwindow_image_'+i).naturalWidth == 0)) {
this.checkImage[i].stop();
var imageHeight = $('lightwindow_image_'+i).getHeight();
if (imageHeight > this.resizeTo.height) {
this.resizeTo.height = imageHeight;
}
this.resizeTo.width += $('lightwindow_image_'+i).getWidth();
this.imageCount--;
$('lightwindow_image_'+i).setStyle({
height: '100%', width: '100%'
});
if (this.imageCount == 0) {
this._processWindow();
}
}
}.bind(this, i), 1);

换成如下代码:

// We have to do this instead of .onload
var ie = (document.all)?1:0;
this.checkImage[i] = new PeriodicalExecuter(function(i) {
if(ie){ //THE BROWSER IS IE
if ( $('lightwindow_image_'+i).complete && !(typeof $('lightwindow_image_'+i).naturalWidth != "undefined" && $('lightwindow_image_'+i).naturalWidth == 0)) {
this.checkImage[i].stop();
var imageHeight = $('lightwindow_image_'+i).getHeight();
if (imageHeight > this.resizeTo.height) {
this.resizeTo.height = imageHeight;
}
this.resizeTo.width += $('lightwindow_image_'+i).getWidth();
this.imageCount--;
$('lightwindow_image_'+i).setStyle({
height: '100%', width: '100%'
});
if (this.imageCount == 0) {
this._processWindow();
}
//alert('IE has been detected')
}
}
else
{//NOT IE, PROBABLY FF, OPERA, OTHER
//this line works for all other browsers
if ($('lightwindow_image_'+i).complete && !(typeof $('lightwindow_image_'+i).naturalWidth != "undefined" && $('lightwindow_image_'+i).naturalWidth == 0)) {
this.checkImage[i].stop();
var imageHeight = $('lightwindow_image_'+i).getHeight();
if (imageHeight > this.resizeTo.height) {
this.resizeTo.height = imageHeight;
}
this.resizeTo.width += $('lightwindow_image_'+i).getWidth();
this.imageCount--;
$('lightwindow_image_'+i).setStyle({
height: '100%', width: '100%'
});
if (this.imageCount == 0) {
this._processWindow();
}
}
}
}.bind(this, i), 1);

2009-09-29Symbian

没有评论
889 views

symbian应用程序Uid

RWsSession& ws = iEikonEnv->WsSession();
TInt wgid = ws.GetFocusWindowGroup();
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid);
TUid aCurAppUid = gn->AppUid();
CleanupStack::PopAndDestroy(gn);

0002

需要从Uid转为十六进制。。。

0003

0001

const TUid KUidIdleApp5 = {0×10005901};

2009-08-30Tech

没有评论
689 views

wordpress 的移植出现的问题

有时wordpress系统需要COPY+PASTE一份新的,

解决办法 是:复制整个目录,修改wp-config.php

修改SQL,改成新的目录,尤其注意的是有serialize的数据中,更换一下数据

常见问题1:

You do not have sufficient permissions to access this page.

可能的问题是 $_usermeta这个数据表中的数据问题:需要改成新的:老外解决方案

如果还有问题:修改表$prefix_options

记录$prefox_user_roles,这个是否换成新的了

2009-08-11Symbian

没有评论
701 views

symbian调试工具-hooklogger

在使用Symbian进行开发时经常会忘记释放我们曾经使用过的内存或指针,从而导致我们在模拟器中最后退出软件时会爆出提示,而检验遗漏的内存是程序员的天职所在,所以我们要想做好Symbian的开发,就必须熟悉如何查找内存,而Symbian SDK中提供了一个很好的工具HookLogger用来检验我们的内存操作。
下面所提到的是2008年5月1日版(0.423 rc版)(对应的SDK是9.1/S60_3rd的)
下载
http://developer.symbian.com/main/downloads/files/HookLogger.msi这个是官方的链接地址。
安装:
至于安装并没有像很多文章中所说的那么复杂,我只是安装在默认的目录,而官方的视频教程(后面会提到,也给过链接吧)也是一个象征性的地址。
使用:
我也就不多说了,官方的视频教程(http://developer.symbian.com /main/tools_and_sdks/developer_tools/supported/hook_logger/intro.htt)说的很清楚。如果有些地方因为网速不能打开,那我就做个小的介绍。
1、安装完毕后启动HookLogger的应用程序,这是可以启动模拟器,一般会有一个提示说是你的HookLogger和模拟器没有Hook上,你就直接点击确定并关闭模拟器(不要急着把HookLogger也关了)。
2、设置系统环境变量,新建一个环境变量,名称为epocroot,变量值为C:\Symbian\9.2\S60_3rd_FP1  (一般为你自己的安装目录)。重新启动操作系统。
3、打开Windows的命令控制台(开始菜单中单击运行, 输入cmd然后就按下回车),跳转到你所安装的HookLogger的目录(如默认的 C:\Program Files\HookLogger,这里要在控制台中输入 cd C:\Program Files\HookLogger然后回车),输入命令SetupHooks,回车;会弹出一些提示信息,接着输入SetupHooks epocroot, 回车。

3.1可以看到如下:

C:\Program Files\HookLogger>SetupHooks
** usage:
SetupHooks <DEVICE> [--remove|r] [--platform=<PLATFORM>] [--build=<BUILD>]
** where:
<DEVICE> specifies the device name to attach hooks to (as listed by ‘devices’),
or DEFAULT for the default device, or EPOCROOT to attach to %EPOCROOT%\epoc32
(as used by legacy Symbian tools)
<PLATFORM> defaults to WINSCW
<BUILD> defaults to UDEB
–remove detaches the hooks, restoring the original EUSER.DLL

C:\Program Files\HookLogger>SetupHooks epocroot
Setting up hooks in “C:\Symbian\9.2\S60_3rd_FP1\epoc32\release\WINSCW\UDEB”
已复制         1 个文件。
Setup euser.dll to load EUserParasite_EKA2.dll, original preserved as euser.orig
.dll.
Run SetupHooks with –r to restore it

C:\Program Files\HookLogger>
4、设置完成,在HookLogger的Filters的Tab页面中,左侧的下拉菜单中选择Include only checked,在下面的Browse for EXE的按钮中选中你要进行调试的那个工程的模拟器对应的exe程序,一般在C:\Symbian\9.1\s60_3rd\epoc32\release\winscw\udeb\中,而文件名一般是你的工程名。
5、设置完毕后启动模拟器,在模拟器中运行你要调试的那个程序,直到退出时爆出 Alloc ********(16位的地址),这时在HookLogger的Heap的Tab,单击第三个按钮(List all alloc),你会发现该页面中有一列Ptr,在这一列中找到你的那个对应的地址(Alloc中的********),然后用鼠标选中这一行,单击下面的 第四个按钮(Alloc details)这时会弹出一个对话框,找到第一个有关你的类名及函数名的位置(这里就是根源所在),在#后的数字就是你的内存泄露所在的位置。
6、跳到你的源文件中步骤4的位置,找出你的内存泄露出现在哪里,这样你就可以进行下一步调试了。

以上方法本人初步研究可以很好的运行,有问题大家在相互交流。

以上大部分内容来自:鬼人王 >>

http://www.devdiv.net/thread-7886-1-3.html

2009-07-29Tech

没有评论
677 views

PHP发送邮件导致页面无法显示

有一天,一台HK的服务器报告

PHP发送邮件的功能导致页面无法显示,症状是:进度条一直在 走,到最后超出了IE最大时长,显示“该页无法显示”

网管确定下来,原来是他们弄了个无效的DNS服务器在那(估计就不能解析域名的不知道什么服务器),改为正确的DNS器,OK了,是记

2009-07-13Tech

没有评论
2,081 views

ajax请求返回403错误解决办法

这个问题表现是:

IE浏览器下运行正常,但在Firefox下不正常。表现为(用httpwatch查看)

ajax firefox 403

ajax firefox 403

发生原因:未知

解决办法 :

在当前目录下加上.htaccess


SecFilterEngine Off

2009-07-01Tech

没有评论
897 views

WordPress主题之comfy

wordpress主题-comfy是一个不错的theme,标准的三栏结构

comfy-2

这种结构很适合做新闻的CMS之用。如果配合加上CACHE的插件应该效果很棒。comfy-1

comfy使用篇

1.需要配置config.inc.php 这个是在wp-contents目录comfy目录下,主要配置feature的分类ID,从后台里面可以得到,还有首页显示几个category的ID,顺序。

2. comfy提供了几人上功能pageview pagevote功能,这些模板是可以在后台setting里设置修改,不用修改源代码滴。

2009-06-23杂杂杂

没有评论
747 views

绿霸下的google baidu bing

好邪恶,好强大呀!

好邪恶,好强大哦!

好邪恶,好强大哦!

baidu-image

Carbide C++编译排错备忘

1.编译没有指定到文件

这种可能是某种方法没有实现,或者lib包也没放到mmp中,,,

2. E32USER-CBase 71

The explanation of E32USER-CBase 71

This panic is raised when TRAPs have been nested and an attempt is made to exit from a TRAP nest level before all the cleanup items belonging to that level have been popped off the cleanup stack.

There must be the same number of items on the cleanup stack on entering a TRAP harness as there is on exiting. In other words, anything that is pushed onto the cleanup stack inside a TRAP harness must be popped off before leaving the harness.

For example, the following code avoids this panic when FooLC() does not leave, by explicitly popping pointer before the end of the harness:

TRAPD(error, pointer = FooLC(); CleanupStack::Pop(pointer));

3.

BAFL 15 PANIC

多半是资源文件没有加载进来,记得查看一下编译成功的 rsc或者rsg文件,是否内容有更新

4.Cardbide c++只是有报错,但没报哪一行
这种就比较复杂一点了,多数是因为mmp里面的.lib文件没有加载进来

5。

2009-05-14Tech

没有评论
527 views

HTML 标签

 

 

转自:http://hi.baidu.com/guodong828/blog/item/4ba8b20fd828b9ecab6457bf.html

 

base标记是一个基链接标记,是一个单标记。用以改变文件中所有连结标记的参数内定值。它只能应用于标记<head>与</head>之间。
你网页上的所有相对路径在链接时都将在前面加上基链接指向的地址。

重要属性:href
设定前缀的链接地址:target
设定文件显示的窗口,同a标记中的target

简单例子:
<html>
<head>
<base href=”http://www.baidu.com” target=”_blank”>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<title>base标记</title>
<link rel=”Shortcut Icon” href=”ani.CUR”>
</head>
<body>
<a href=”77.htm” target=”_self”>77</a>
<a href=”88.htm”>88</a>
</body>
</html>

当点了链接后,跳出的文件是http://www.baidu.com/77.htm或http://www.baidu.com/88.htm,它就是在这些相对路径的文件前加上基链接指向的地址。如果目标文件中的链接没有指定target属性,就用base标记中的target属性。
常在框架结构中用,如左右两个框架,把左边的框架中文件里的连接都显示在右边的框架里。只要用base标记,把其target属性值写为右框架名称,这就不用再为左框架里的文件中的每一个连接都指定target属性。

返回顶部