经典韩剧《爱情是什么》在线播放地址

Filed under: 心情故事 | No Comments »
Posted on

剧情简介:
一边是传统保守的旧式家庭,一边是现代民主的新式家庭,却同样拥有爱国爱子之心,演绎了温暖亲情,温柔爱情。

播放网址:
http://video.sina.com.cn/xztsy/aiqingshishenme/

aptana 破解 for V1.1

Filed under: JAVA | No Comments »
Posted on
Java代码 复制代码
  1. package com.aptana.ide.core.licensing;
  2. import java.util.Calendar;
  3. import java.util.TimeZone;
  4. //crack by lizhou
  5. public final class ClientKey
  6. {
  7. private ClientKey()
  8. {
  9. this.type = 0;
  10. this.email = “Cracker@aptana.com”;
  11. this.expiration = 31536000000000L;
  12. }
  13. public static ClientKey decrypt(String encrypted, String email)
  14. {
  15. return new ClientKey();
  16. }
  17. public boolean isCloseToExpiring()
  18. {
  19. return false;
  20. }
  21. public boolean isValid()
  22. {
  23. return true;
  24. }
  25. public boolean isCloseToMatching()
  26. {
  27. return false;
  28. }
  29. public boolean isExpired()
  30. {
  31. return false;
  32. }
  33. public String getEmail()
  34. {
  35. return email;
  36. }
  37. public Calendar getExpiration()
  38. {
  39. Calendar expirationCal = Calendar.getInstance(GMT);
  40. expirationCal.setTimeInMillis(expiration);
  41. return expirationCal;
  42. }
  43. public boolean isTrial()
  44. {
  45. return false;
  46. }
  47. public boolean isPro()
  48. {
  49. return true;
  50. }
  51. public boolean shouldProPluginsRun()
  52. {
  53. return true;
  54. }
  55. public static String trimEncryptedLicense(String encrypted)
  56. {
  57. String newEncrypted = encrypted;
  58. newEncrypted = newEncrypted.trim();
  59. newEncrypted = newEncrypted.replaceAll(“–begin-aptana-license–”, “”);
  60. newEncrypted = newEncrypted.replaceAll(“–end-aptana-license–”, “”);
  61. newEncrypted = newEncrypted.replaceAll(“\\s+”, “”);
  62. return newEncrypted;
  63. }
  64. public static final String BEGIN_LICENSE_MARKER = “–begin-aptana-license–”;
  65. public static final String END_LICENSE_MARKER = “–end-aptana-license–”;
  66. private static final TimeZone GMT = TimeZone.getTimeZone(“GMT”);
  67. /*    private static final String EMAILS_NON_MATCHING = ”EMAILS_NON_MATCHING”;
  68. private static final int PRO = 0;
  69. private static final int TRIAL = 1;
  70. */
  71. private String email;
  72. private long expiration;
  73. private int type;
  74. }

server 2003 怎样为本机添加域用户

Filed under: 资料搜集 | No Comments »
Posted on

现有一台server 2003加到域后,怎样像XP一样添加为本机一个域用户?

在 本地用户和组 里,选择组,打开属性,会出来添加的界面,这是就可以添加基于域的用户了。

IE与FireFox的Javascript兼容性问题及解决

Filed under: JavaScript&AJAX | No Comments »
Posted on

原地址:http://hi.baidu.com/thinsoft/blog/item/9d159a1bdb6939f9ae513319.html

应该采用:
document.getElementById(”apple”) 以ID来访问对象,且一个ID在页面中必须是唯一的
document.getElementsByTagName(”div”)[0] 以标签名来访问对象

1.setAttribute(string name, string value):增加一个指定名称和值的新属性,或者把一个现有的属性设定为指定的值。

设置对象的属性则应该采用:
document.getElementById(”apple”).setAttribute(”width”,”100″)
document.getElementsByTagName(”div”)[0].setAttribute(”width”,”100″)
访问对象的属性则采用:
document.getElementById(”apple”).getAttribute(”width”)
document.getElementsByTagName(”div”)[0].getAttribute(”width”)

我们经常需要在JavaScript中给Element动态添加各种属性,这可以通过使用setAttribute()来实现,这就涉及到了浏览器的兼容性问题。
var bar = document.getElementById(”foo”);
bar.setAttribute(”onclick”, “javascript:alert(’This is a test!’);”);
这里利用setAttribute指定e的onclick属性,简单,很好理解。但是IE不支持,IE并不是不支持setAttribute这个函数,
而是不支持用setAttribute设置某些属性,例如对象属性、集合属性、事件属性,也就是说用setAttribute设置style和onclick这些属性
在IE中是行不通的。为达到兼容各种浏览器的效果,可以用点符号法来设置Element的对象属性、集合属性和事件属性。
document.getElementById(”foo”).className = “fruit”;
document.getElementById(”foo”).style.cssText = “color: #00f;”;
document.getElementById(”foo”).style.color = “#00f”;
document.getElementById(”foo”).onclick= function () { alert(”This is a test!”); }
2、关于class和className
class属性在W3C DOM中扮演着很重要的角色,但由于浏览器差异性仍然存在。使用setAttribute(”class”, vName)语句动态设置
Element的class属性在firefox中是行的通的,在IE中却不行。因为使用IE内核的浏览器不认识”class”,要改用”className”;
同样,firefox 也不认识”className”。所以常用的方法是二者兼备:
element.setAttribute(”class”, vName);
element.setAttribute(”className”, vName);    //for IE

关于IE下TABLE无法插入新行的问题
IE下TABLE无论是用innerHTML还是appendChild插入<tr>都没有效果,而其他浏览器却显示正常。解决他的方法是,将<tr>加到TABLE的<tbody>元素中,如下面所示:

var row = document.createElement(”tr”);
var cell = document.createElement(”td”);
var cell_text = document.createTextNode(”香蕉不吃苹果”);
cell.appendChild(cell_text);
row.appendChild(cell);
document.getElementsByTagName(”tbody”)[0].appendChild(row);
window.event

IE:有window.event对象
FF:没有window.event对象。可以通过给函数的参数传递event对象。如onmousemove=doMouseMove(event)

鼠标当前坐标
IE:event.x和event.y。
FF:event.pageX和event.pageY。
通用:两者都有event.clientX和event.clientY属性。

鼠标当前坐标(加上滚动条滚过的距离)
IE:event.offsetX和event.offsetY。
FF:event.layerX和event.layerY。

标签的x和y的坐标位置:style.posLeft 和 style.posTop
IE:有。
FF:没有。
通用:object.offsetLeft 和 object.offsetTop。

窗体的高度和宽度
IE:document.body.offsetWidth和document.body.offsetHeight。注意:此时页面一定要有body标签。
FF:window.innerWidth和window.innerHegiht,以及document.documentElement.clientWidth和document.documentElement.clientHeight。
通用:document.body.clientWidth和document.body.clientHeight。

添加事件
IE:element.attachEvent(”onclick”, func);。
FF:element.addEventListener(”click”, func, true)。
通 用:element.onclick=func。虽然都可以使用onclick事件,但是onclick和上面两种方法的效果是不一样的, onclick只有执行一个过程,而attachEvent和addEventListener执行的是一个过程列表,也就是多个过程。例如: element.attachEvent(”onclick”, func1);element.attachEvent(”onclick”, func2)这样func1和func2都会被执行。

标签的自定义属性
IE:如果给标签div1定义了一个属性value,可以div1.value和div1["value"]取得该值。
FF:不能用div1.value和div1["value"]取。
通用:div1.getAttribute(”value”)。

父节点、子节点和删除节点
IE:parentElement、parement.children,element.romoveNode(true)。
FF:parentNode、parentNode.childNodes,node.parentNode.removeChild(node)。

CSS:透明
IE:filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=60)。
FF:opacity:0.6。

设置CSS 的STYLE
document.getElementById(’look’).style.cssText=”display:none;”;//通用
document.getElementById(’look’).setAttribute(”style”,”display:none;”);//firefox

如何在Web页面上直接打开、编辑、创建Office文档

Filed under: 资料搜集 | No Comments »
Posted on

有朋友询问如何在Web页面上做到像SharePoint中的效果一样,能直接激活客户端的Word来打开.doc文件,而不是类似直接点击.doc文档链接时Word在IE中被打开那样。想想这个问题应该很多人都会感兴趣,所以干脆写一篇blog来大致描述一下方法。

在安装Office2003以后,有一个ActiveX控件被安装到了系统中,这个控件位于“Program Files\Microsoft Office\OFFICE11\owssupp.dll”。通过这个控件,客户端页面上的JavaScript就可以激活本地的Office软件,来实 现打开、编辑Office文档。(另,Office XP应该就已经包含这个ActiveX控件了。)

首先,用Script创建一个本地的对象:

openDocObj = new ActiveXObject(”SharePoint.OpenDocuments.2″); // 为了兼容Office XP,可以创建“SharePoint.OpenDocuments.1”

然后,调用openDocObj的相应的方法。比如打开服务器上的一个Office文档:

openDocObj.ViewDocument(”http://www.abc.com/documents/sample.doc”);

openDocObj对象会根据参数中不同的Office文档类型(.doc、.xls、.ppt)来打开不同的程序(Word、Excel、PowerPoint)。ViewDocument()方法还有一个重载签名,可以让我们手工指定激活哪个程序来打开文档:

openDocObj.ViewDocument(”http://www.abc.com/documents/sample.doc“, 要激活的程序的ProgID);

那么要打开Office程序在线编辑文件又如何?

openDocObj.EditDocument(”http://www.abc.com/documents/sample.doc“);

就可以直接激活Word,在Word里面编辑文档,然后直接点击Word里面的保存功能,就可以将文件保存会服务器上了。注意:为了让Word能将 编辑后的文档直接保存会服务器,访问Web站点的当前上下文的Windows Identity必须对服务器的相应目录(即“http://www.abc.com/documents”这个虚拟目录所对应的服务器上的物理路径)有 相应的写权限,否则保存动作会失败。编辑完成后,EditDocument()会返回一个bool值,来反映编辑操作是否成功。

我们还可以通过打开服务器上的一个文档模版,来创建一个新的文档:

openDocObj.CreateNewDocument(”http://www.abc.com/documents/sampleTemplate.dot“, “http://www.abc.com/documents/“);

就可以使用“http://www.abc.com/documents/sampleTemplate.dot”这个模版来创建一个新的文档,默 认新文档的保存地点是“http://www.abc.com/documents/”。创建新文档时使用的程序取决于模版文件的类型(比如.dot模版 会对应Word)。新文档的保存同样需要注意权限问题。CreateNewDocument()方法同样会返回一个bool值来反映操作是否成功。

CreateNewDocument()方法的第一个参数,除了可以使用一个模版的地址外,还可以直接指定为希望用来创建新文档的客户端程序的ProgID。