如果你的JS出现错误,这个代码可以让浏览器不显示错误。运行效果OnErrorExamplewindow.onerror=function(sMessage,sUrl,sLine){alert("Anerroroccurred:\n"+sMessage+"\nURL:"+sUrl+"\nLineNumber:"+sLine);returntrue
系统 2019-08-29 21:55:37 2148
反射,可以实现动态晚绑定组件,大道理不说,实例说明问题。1.新建项目,项目结构如图:一个类库,一个网站;类库中包含2个类;2.不添加引用,实现查看,调用类库中的方法,属性等;效果如图:(访问类库中的类)(访问指定类中的方法)3.代码:①user1.cs,user2.cs两者都一样,只是类名不同。usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;name
系统 2019-08-12 09:29:55 2148
注意:本地使用会由于Flash安全设置而无法发声,上传到WEB服务器后一切正常,通过IE/FF/Chrome测试。源码:见附件转载:http://www.oschina.net/news/18728/google-index-doodle-source-code2011年06月09日Google涂鸦-吉他-源代码
系统 2019-08-12 09:29:48 2148
1.Domain通过Cookice的Domain属性可以限制Cookice发送的域,只有向这个域发出请求的时候,才可以再请求中附带这个Cookice的信息。ex:如果Cookice的Domain属性设置为.cnblogs.com,则请求www.cnblogs.com的时候,可以携带这个Cookice的信息;如果Cookice的Domain属性设置为www.cnblogs.com,那么在请求file.cnblogs.com的时候就不会携带这个Cookice的
系统 2019-08-12 09:27:15 2148
20091213out_invoice中加入病人类别1.out_invoice表中增加一字段Brlbchar(10)2.pOut_Chg_RecipeSettl3add变量@brlbvarchar(10)out-iinvoice中插入值3.Recipesettlfrm中1.spRecipeSettl3中params设置(增加@brlbvarchar(10))2.添加控件panBrlb3.全局变量gBrlbGetPatientInfo中读取4.ifSysDM
系统 2019-08-12 09:27:12 2148
igotaproblem,theproblemislistcantuseexporttoexcelbuttoninsharepoint2010.Ifoundmyaccountisn'thavethepromissonofUseClientIntegrationFeatures.So,Ithinkthisiscauseoftheproblem.throughmyinvestigation,igotthewaytosolvetheproblem.solutio
系统 2019-08-12 09:26:44 2148
在linux2.6内核中,使用cdev结构体描述字符设备,cdev的定义在中可找到,其定义如下:引用structcdev{structkobjectkobj;structmodule*owner;conststructfile_operations*ops;structlist_headlist;dev_tdev;unsignedintcount;};cdev结构体中的dev_t成员定义了设备号,为32位,其中高12位为主设备号
系统 2019-08-12 01:33:10 2148
1.简介Matplotlib是一个非常强大的画图工具,对数据的可视化起着很大的作用Matplotlib可以画线图,散点图,等高线图,条形图,柱形图,3D图形等2,基础语法importnumpyasnpimportmatplotlib.pyplotaspltx=np.linspace(-3,3,50)#在(-3,3)之间生成50个数y1=2*x+1y2=x**2plt.figure(num=1,figsize=(8,5))#定义编号为1,大小为(8,5)pl
系统 2019-09-27 17:57:07 2147
深浅拷贝importcopy浅拷贝:copy.copy不可变类型和可变类型都是原列表中的地址深拷贝:copy.deepcopy不可变类型的地址是原列表中的地址可变类型的地址是新生成元素的地址(即独立地址)importcopya=[1,2,[3,4]]#深浅拷贝的区别提现在[3,4]这个子对象b=copy.copy(a)#浅拷贝c=copy.deepcopy(a)#深拷贝a.append(5)a[2].append(6)print('a:',a)print(
系统 2019-09-27 17:56:58 2147
类装饰器propetyproperty是一种特殊的属性,访问它时会执行一段功能(函数)然后返回值classStudent:def__init__(self,name,birth):self.name=nameself.birth=birth@property#将一个方法伪装成属性defage(self):importtimereturntime.localtime().tm_year-self.birthalex=Student('alex',1930)p
系统 2019-09-27 17:56:49 2147