1. window.attachEvent
IE和FF处理不同,如下
另,不能直接使用带参数函数 做为attachEvent的第二个参数,可以使用function(){//这里调用你的需要加参数的js函数}来调用
if (window.attachEvent)
window.attachEvent("onresize",function(){ ra_OnPageResize(0)});
else if (window.addEventListener)
window.addEventListener("resize",function(){ ra_OnPageResize(0)},false);
//FF 里事件是resize
2. js调整FrameSet布局cols问题
其实就是直接设置FrameSet.cols (p2f1)就行
今天头晕了,对下面的p1f3.cols设置了半天无效。。
p1:
<frameset id=p1f1>
<frame id=p1f2>
<frame src=p2.htm id=p1f3>
</frame>
p2:
<frameset id=p2f1>
<frame id=p2f2>
<frame id=p2f3>
</frame>
附js:
function Submit_onclick()
{
if (!window.parent.Fset) return;
str= window.parent.Fset.cols;
if (str) str = str.substring(0,str.indexOf(","));
if ((str)&&(str>150)&&(str!="0%"))
{
window.parent.Fset.cols="0%,*";
}
else
{
window.parent.Fset.cols="200,*"
}
}
//今天调试跨浏览器发现,ff里不能通过对Frame的ID来直接访问
(IE FF都可以直接通过Frame的Name来访问,但是FrameSet不支持name属性)
因此上面的window.parent.Fset =》window.parent.document.getElementById("Fset");
posted @
2008-08-06 17:44 calmzeal 阅读(11) |
评论 (0) |
编辑
现象:
SQL> select rownum,emp.* from emp;
ROWNUM A
---------- ----------
1 1
2 2
3 1
4 1
SQL> select rownum,emp.* from emp where rownum<3;
ROWNUM A
---------- ----------
1 1
2 2
SQL> select rownum,emp.* from emp where rownum=2;
未选定行
解释(google到的,不过自己后面也理解了):
How ROWNUM Works
ROWNUM is a pseudocolumn (not a real column) that is available in a query. ROWNUM will be assigned the numbers 1, 2, 3, 4, ... N, where N is the number of rows in the set ROWNUM is used with. A ROWNUM value is not assigned permanently to a row (this is a common misconception). A row in a table does not have a number; you cannot ask for row 5 from a table—there is no such thing.
!ROWNUM是在什么时候被赋予每条记录的!
Also confusing to many people is when a ROWNUM value is actually assigned. A ROWNUM value is assigned to a row after it passes the predicate phase of the query but before the query does any sorting or aggregation. Also, a ROWNUM value is incremented only after it is assigned, which is why the following query will never return a row:
select *
from t
where ROWNUM > 1;
Because ROWNUM > 1 is not true for the first row, ROWNUM does not advance to 2. Hence, no ROWNUM value ever gets to be greater than 1. Consider a query with this structure:
select ..., ROWNUM
from t
where <where clause>
group by <columns>
having <having clause>
order by <columns>;
Think of it as being processed in this order:
1. The FROM/WHERE clause goes first.
2. ROWNUM is assigned and incremented to each output row from the FROM/WHERE clause.
3. SELECT is applied.
4. GROUP BY is applied.
5. HAVING is applied.
6. ORDER BY is applied.
That is why a query in the following form is almost certainly an error:
select *
from emp
where ROWNUM <= 5
order by sal desc;
The intention was most likely to get the five highest-paid people—a top-N query. What the query will return is five random records (the first five the query happens to hit), sorted by salary. The procedural pseudocode for this query is as follows:
ROWNUM = 1
for x in
( select * from emp )
loop
exit when NOT(ROWNUM <= 5)
OUTPUT record to temp
ROWNUM = ROWNUM+1
end loop
SORT TEMP
It gets the first five records and then sorts them. A query with WHERE ROWNUM = 5 or WHERE ROWNUM > 5 doesn't make sense. This is because a ROWNUM value is assigned to a row during the predicate evaluation and gets incremented only after a row passes the WHERE clause.
Here is the correct version of this query:
select *
from
( select *
from emp
order by sal desc )
where ROWNUM <= 5;
This version will sort EMP by salary descending and then return the first five records it encounters (the top-five records). As you'll see in the top-N discussion coming up shortly, Oracle Database doesn't really sort the entire result set—it is smarter than that—but conceptually that is what takes place.
posted @
2008-07-18 11:00 calmzeal 阅读(25) |
评论 (1) |
编辑
posted @
2008-07-10 15:42 calmzeal 阅读(6) |
评论 (0) |
编辑
http://hi.baidu.com/simadi/blog/item/05eebba1da17918f4710649d.html
在Asp.net AJAX 1.0 RTM版中,使用FrameSet或Iframe时,frame或iframe的frameborder属性应使用1 或 0,如:
frameborder="0"
而不能使用yes 或 no,如:
frameborder="no"
否则AJAX 1.0会出现如下脚本错误:
Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was NaN.
posted @
2008-07-10 08:30 calmzeal 阅读(20) |
评论 (0) |
编辑
由于XX安全(之前92自带的apache1.3一直未能升级到2.0,被指安全隐患,望达人指点升级方法)问题,
最后Oracle要统一升级到10G了
在测试服上升级10G后,程序大部分访问正常
92的导出dmp文件能直接imp到10G
但是在access里进行ODBC调用时发现速度巨慢
同一句查询语句,用ODBC连92执行不到500ms
连10G要耗时3000-4000ms
google一通,有个老外情况更惨,原来十分钟的要几个小时。。。
他最后解决办法是 修改一个参数 但是对我无效 也记不清了 (好像是关掉行反馈? 有类似问题的可以google : Access + oracle 10 + slow + odbc)
只好自己捣鼓。。
发现把odbc驱动换成Microsoft ODBC provider for oracle
测试速度居然比 Oracle ODBC drvier 10.1.*要快 50%
看来是Oracle ODBC驱动的问题
安装新版Oralce ODBC驱动解决问题,后面安装的是10.2.*的ODBC版本
就3文件替换就行
sqora32.dll
sqoras32.dll
sqresus.dll
顺便说一句,服务器安装新的就行
posted @
2008-04-16 11:11 calmzeal 阅读(467) |
评论 (3) |
编辑
这几天framework 自动更新
结果造成webservices调用报错:
System.IO.FileNotFoundException: 找不到文件或程序集名称“ygbe1ssc.dll”,或找不到它的一个依赖项。
文件名: “ygbe1ssc.dll”
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
google 到微软的解决办法:
http://support.microsoft.com/?id=823196
说是TEMP文件夹权限问题
提供了一个实用的跟踪办法,详见上面的连接:
<system.diagnostics>
<switches>
<add name="XmlSerialization.Compilation" value="4"/>
</switches>
</system.diagnostics>
但是对我们的服务器无效,最后发现是CSC.EXE被破坏的原因
%system%
\Microsoft.NET\Framework\v2.0.50727\csc.exe 文件修改日期为今天,大小为0
复制正常文件替换解决问题
不知道有没有类似自动升级造成的情况
或者是我们服务器被病毒破坏了?
posted @
2008-04-16 10:55 calmzeal 阅读(248) |
评论 (0) |
编辑
我们的应用系统有部分数据传输是对本地Access表进行导出XML后上传服务器
昨天有用户发生上传错误时,发现一个奇怪的现象:
Access数据表看起来正常,但是在读入到ADO RecordSet并存为XML时,数据列平白多了如标题所示的4个
用Access程序打开mdb文件,可看到每个表的图标都有个类似同步的图标,其他都和正常数据表一致(字段定义、数据等等)
孤陋寡闻的我没见过这个,又发现复制一张里面的表,粘贴完后能看到新增的4个字段:
s_ColLineage、s_Generation、s_GUID、s_Lineage
而且还删除不了这几个字段。。
狂google一通+问朋友后+自己动手搞半天后,总结相关信息如下:
1. 这个数据文件是因为开启了Access的同步复制功能造成的。那4张表是系统表。
2. 查看系统表可在 工具 --》 选项里 打开 显示 系统对象
3. 更多关于同步的信息查看Office目录下
RPLBRF35.CHM帮助
4. 要想从同步复制表恢复成一般本地表是个相当痛苦的事情。。
先记下这些,什么时候再看看有什么办法在ADO里面忽略这些系统字段没
posted @
2008-04-08 11:54 calmzeal 阅读(34) |
评论 (0) |
编辑
baidu到一篇关于 SQL Server差异同步的文章:
http://dev.csdn.net/author/cassaba/cc3fb4ffb7f646c1bf5c789d67dcb43b.html
在Oracle9中 没有提供 类似ChechSum的函数
(好像10G以上版本开始有了;Oracle92中包OWA_OPT_LOCK.CHECKSUM方法提供类似功能,不过只能对单列进行计算,详见:
http://www.dbforums.com/archive/index.php/t-1289203.html)
我采取的办法是 类似上面的方法3,在Update和Insert时维护更新时间
源服务器提供WS服务,目标服务器程序调用。
2边采取同样排序查询更新时间(按需更新表主键)
将更新时间拼凑起来进行CRC32校验码计算,比较差异时再比较更新时间
posted @
2008-03-31 08:54 calmzeal 阅读(73) |
评论 (2) |
编辑