eplice代码不能自动html弹出窗口代码的原因

Notepad++代码自动完成制作方法
Notepad++代码自动完成(jQuery版)
Notepad++的代码提示文件是一个XML文件,位置是在:..\Program
Files\Notepad++\plugins\APIs\,该目录下面有各种语言的提示文件。
使用方法:
将这三个文件:html.xml, css.xml, javascript.xml
复制到上面所说的目录下面即可。友情提醒:覆盖前请备份原来的文件。
(注:下载不了的同学请下载这个)
html.xml 收录 264 项, css.xml 收录 562 项, javascript.xml 收录了 2284
html部分包含了 HTML5 的新标签,css部分包含了 CSS3 的新属性。
javascript包含了 Firefox6、chrome13、ie9、safari5、opera11.51
的各种属性,也包括了 jQuery 中 "jQuery"全局对象 和 用 "$"取到的元素的各种属性和方法。
(制作过程有点匆忙,可能会有遗漏或者错误的内容,请自行修改文件即可,或者给我留言,我会修复)
打开自动提示的功能:
打开Notepad++的代码自动完成的功能:设置--&首选项--&备份与自动完成,"所有输入均启用自动完成"前面打上钩:
注:自动完成默认的呼出快捷键是:ctrl+space,该快捷键和输入法冲突,建议把输入法的快捷键给改了。
已投稿到:君,已阅读到文档的结尾了呢~~
源代码 组织机构代码 组织机构代码查询 组织机构代码证年检 组织机构代码证 颜色代码 神秘代码 专业代码 留言代码 人力资源六大模块
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
ICE 模块代码
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口博客访问: 3752
博文数量: 3
博客积分: 105
博客等级: 民兵
技术积分: 40
注册时间:
APP发帖 享双倍积分
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: Python/Ruby
ICE的一些基本调用可以看两年多以前我写的一篇博客:&
由于ICE的一些调用都比较公式化,所以完全可以将它抽象出来,让它的调用更简单,简单到当你有了ice接口文件,服务端的ip,port 以及连接字符串之后,真的只需要写三行代码就可以搞定一次通过ICE的远程调用,并且后续代码中就真的想调用本地函数一样方便的调用服务端接口最终简单的调用可以是这样:(后面会有详细解释)import IceCommInvokericeCommInvoker = IceCommInvoker.IceCommInvoker()TestCaller = iceCommInvoker.createCaller("Printer.ice","SimplePrinter:default -p 10000")print TestCaller.printString("just a test!")废话不多说,先上实现代码:(如果没兴趣仔细看,直接把下面的这段代码copy出来,存为IceCommInvoker.py 可以直接用了)####################################################################################################################
IceCommInvoker.py#
Description:
create another testfile,just import IceCommInvoker#
Author: Jason.gs##-----------------------------------------------------------------------------------------------------------------#Function:
createIceAPICaller(icefile,icemoduleName,iceinterfacePrx,iceconnStr)##
--icefilename#
icemoduleName
--icemodulename#
iceinterfacePrx --"iceinterfacename"+Prx#
iceconnStr
--"ice server stringToIdentity"+"connect protocol"+"server IP"+"server port"# #Example:#
import IceCommInvoker#
iceCommInvoker = IceCommInvoker.IceCommInvoker()#
TestCaller = iceCommInvoker.createIceAPICaller("Printer.ice","Demo","PrinterPrx","SimplePrinter:default -p 10000")#
print TestCaller.printString("just a test!")##-----------------------------------------------------------------------------------------------------------------##Function:
createIceAPICaller_plus(icefile,icemoduleName,iceinterfacePrx,cfgpath,secure)##
--icefilename#
icemoduleName
--icemodulename#
iceinterfacePrx --"iceinterfacename"+Prx#
--path of the file which include connect string and ICESSL configuration#
--configurate your connect string like this: Proxy.connstr = hello:tcp -p 10000:udp -p 10000:ssl -p 10001 #
--bool type,is ICESSL or not,default is False# #-----------------------------------------------------------------------------------------------------------------#Function:
createCaller(icefile,iceconnStr)##
--icefilename#
iceconnStr
--"ice server stringToIdentity"+"connect protocol"+"server IP"+"server port"#Attention: this method only support icefile which include one module and one interface#Example:#
import IceCommInvoker#
iceCommInvoker = IceCommInvoker.IceCommInvoker()#
TestCaller = iceCommInvoker.createIceAPICaller("Printer.ice","SimplePrinter:default -p 10000")#
print TestCaller.printString("just a test!")#-----------------------------------------------------------------------------------------------------------------#Function:
genInstance(classname)#
--classname in icemodule,most of the time is a Struct in icefile#Example:#////////////////////ice file/////////////////////////
#module testIM#{#
struct SIceSession#
string sessionNo;# #
interface SessionMgr#
int getUserSession(string uid,out SIceSession retsession);#
int checkUserSession(string uid,string sessionNo);#
int removeSession(string uid);#
int getUserExistSession(string uid, out SIceSession retsession);#
#///////////////////ice file/////////////////////////##//////////////////test code/////////////////////////#import IceCommInvoker#iceCommInvoker = IceCommInvoker.IceCommInvoker()#ApiCaller = iceCommInvoker.createCaller("imsession.ice","SessionProxyId:default -h 10.250.3.34 -p 2001")#res = ApiCaller.genUserSession(uid)#CSIceSession = iceCommInvoker.getInstance('SIceSession')#if(res[0] == 0):#
siceSession = res[1]#
session = CSIceSession.sessionNo#
return session#else:#
print "getsession error"#
traceback.print_exc()#//////////////////test code/////////////////////////######################################################################################################################coding=UTF-8#please set tabstop=8import sys, traceback, Iceimport osclass IceCommInvoker(Ice.Application):&&&&def createIceAPICaller(self,icefile,icemoduleName,iceinterfacePrx,iceconnStr):&&&&&&&&try:&&&&&&&&Ice.loadSlice('--all -I/opt/Ice-3.2.1/slice',[icefile])&&&&&&&&self.m_icemodule = __import__(icemoduleName,globals(), locals())&&&&&&&&m_interfacePrx = getattr(self.m_icemodule,iceinterfacePrx)&&&&&&&&communicator = Ice.initialize()&&&&&&&&m_iceAPICaller = m_interfacePrx.checkedCast(communicator.stringToProxy(iceconnStr))&&&&&&&&if not m_iceAPICaller:&&&&&&&&&&&&print "invalid proxy! check your icefile, sometimes expired!"&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&else:&&&&&&&&&&&&return m_iceAPICaller&&&&&&&&except:&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&if communicator:&&&&&&&&&&&try:&&&&&&&&&&&&&&&communicator.destroy()&&&&&&&&&&&except:&&&&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&sys.exit(status)&&&&def createIceAPICaller_plus(self,icefile,icemoduleName,iceinterfacePrx,cfgpath,secure = False):&&&&&&&&try:&&&&&&&&Ice.loadSlice('--all -I/opt/Ice-3.2.1/slice',[icefile])&&&&&&&&#Ice.loadSlice(icefile,['-I','/opt/Ice-3.2.1/slice'])&&&&&&&&self.m_icemodule = __import__(icemoduleName,globals(), locals())&&&&&&&&m_interfacePrx = getattr(self.m_icemodule,iceinterfacePrx)&&&&&&&&communicator = Ice.initialize()&&&&&&&&communicator.getProperties().load(cfgpath)&&&&&&&&m_iceAPICaller = m_interfacePrx.checkedCast(communicator.propertyToProxy("Proxy.connstr").ice_secure(secure))&&&&&&&&if not m_iceAPICaller:&&&&&&&&&&&&print "invalid proxy! check your icefile, sometimes expired!"&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&else:&&&&&&&&&&&&return m_iceAPICaller&&&&&&&&except:&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&if communicator:&&&&&&&&&&&try:&&&&&&&&&&&&&&&communicator.destroy()&&&&&&&&&&&except:&&&&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&sys.exit(status)&&&&#createCaller only support icefile which include one module and one interface&&&&def createCaller(self,icefile,iceconnStr):&&&&&&&&try:&&&&&&&&#For example, the following calls to Ice.loadSlice are functionally equivalent&&&&&&&&#without --all ,you must slice2py ice type files which your icefile includes&&&&&&&&Ice.loadSlice('--all -I/opt/Ice-3.2.1/slice',[icefile])&&&&&&&&#Ice.loadSlice('--all -I/opt/Ice-3.2.1/slice',[icefile])&&&&&&&&#Ice.loadSlice('--all -I/opt/Ice-3.2.1/slice' + ' ' + icefile)&&&&&&&&#Ice.loadSlice(icefile,['--all','-I','/opt/Ice-3.2.1/slice'])&&&&&&&&#find string of icemoduleName and iceinterfaceName from ice file&&&&&&&&icemoduleName = ""&&&&&&&&iceinterfaceName = ""&&&&&&&&fn = open(icefile)&&&&&&&&b_findmodule = False&&&&&&&&b_findinterface = False&&&&&&&&for line in fn.readlines():&&&&&&&&if(line.find('module') != -1):&&&&&&&&&&&&if(b_findmodule):&&&&&&&&&&&&&&&&print "find more than one module in icefile"&&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&&sys.exit(status)&&&&&&&&&&&&lineWordList = line.split()&&&&&&&&&&&&index = 0&&&&&&&&&&&&for i in lineWordList:&&&&&&&&&&&&index += 1&&&&&&&&&&&&if(i == 'module'):&&&&&&&&&&&&&&&&b_findmodule = True&&&&&&&&&&&&&&&&break&&&&&&&&&&&&#sometimes: module moduleName{&&&&&&&&&&&&icemoduleName = lineWordList[index].split("{")[0]&&&&&&&&&&&&continue&&&&&&&&if(line.find('interface') != -1):&&&&&&&&&&&&if(b_findinterface):&&&&&&&&&&&&print "find more than one interface in icefile"&&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&&sys.exit(status)&&&&&&&&&&&&lineWordList = line.split()&&&&&&&&&&&&index = 0&&&&&&&&&&&&for i in lineWordList:&&&&&&&&&&&&index += 1&&&&&&&&&&&&if(i == 'interface'):&&&&&&&&&&&&&&&&b_findinterface = True&&&&&&&&&&&&&&&&break&&&&&&&&&&&&#sometimes: interface interfaceName{&&&&&&&&&&&&iceinterfaceName = lineWordList[index].split("{")[0]&&&&&&&&&&&&if(b_findmodule and b_findinterface):&&&&&&&&&&&&break&&&&&&&&&&&&if not (b_findmodule and b_findinterface):&&&&&&&&&&&&&&&&print "can't find any module and interface"&&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&&sys.exit(status)&&&&&&&&#ready to call Ice server&&&&&&&&self.m_icemodule = __import__(icemoduleName,globals(), locals())&&&&&&&&m_interfacePrx = getattr(self.m_icemodule,iceinterfaceName + "Prx")&&&&&&&&communicator = Ice.initialize()&&&&&&&&m_iceAPICaller = m_interfacePrx.checkedCast(communicator.stringToProxy(iceconnStr))&&&&&&&&if not m_iceAPICaller:&&&&&&&&&&&&print "invalid proxy! check your icefile, sometimes expired!"&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&else:&&&&&&&&&&&&return m_iceAPICaller&&&&&&&&except:&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&status = 1&&&&&&&&&&&&sys.exit(status)&&&&&&&&if communicator:&&&&&&&&&&&try:&&&&&&&&&&&&&&&communicator.destroy()&&&&&&&&&&&except:&&&&&&&&&&&&&&&traceback.print_exc()&&&&&&&&&&&&&&&status = 1&&&&&&&&&&&&&&&sys.exit(status)&&&&def genInstance(self,className):&&&&try:&&&&&&&selfClass = getattr(self.m_icemodule,className)&&&&&&&selfInstance = selfClass()&&&&&&&return selfInstance&&&&except:&&&&&&&traceback.print_exc()&&&&&&&status = 1&&&&&&&sys.exit(status)可以看到 class IceCommInvoker 中有四个方法,分别是:createCallercreateIceAPICallercreateIceAPICaller_plusgenInstance一般情况下推荐用createCaller 这个最简单,最常用,可以看到注释里有Example:import IceCommInvokericeCommInvoker = IceCommInvoker.IceCommInvoker()TestCaller = iceCommInvoker.createCaller("Printer.ice","SimplePrinter:default -p 10000")print TestCaller.printString("just a test!")比如之前已经拿到了Printer.ice这个接口文件,并且这个文件中已经定义了 printString(string s)这个接口,拿到了连接字符串是&SimplePrinter&服务端监听的ip 和端口(ip为本地时可以默认不填),那么这三行代码就搞定了,另外因为我的做法是分析ice文件中的module 和 interface名字,这个方法只适用于一个ice文件中有且仅有一个module 和一个interface的情况(绝大部分合理的设计应该这样)。ice文件可以传绝对路径或者相对路径的全路径createIceAPICaller 这个方法就麻烦点 需要你在调用的时候指定module 和 interface 当然它就不受那个ice文件中有且仅有一个module 和 interface的限制啦createIceAPICaller_plus 这个方法,提供了通过配置文件读取ice的一些设置,以及设置是否设置ssl通信的选项,很简单的看注释就可配置文件的内容如下:# The client reads this property to create the reference to the# "hello" object in the server.#Proxy.connstr=SimplePrinter:default -p 10000Ice.MessageSizeMax = 1## Warn about connection exceptions##Ice.Warn.Connections=1## We want a faster ACM for this demo.##Ice.ACM.Client=10## Network Tracing## 0 = no network tracing# 1 = trace connection establishment and closure# 2 = like 1, but more detailed# 3 = like 2, but also trace data transfer##Ice.Trace.Network=1## Protocol Tracing## 0 = no protocol tracing# 1 = trace protocol messages##Ice.Trace.Protocol=1## Security Tracing## 0 = no security tracing# 1 = trace messages##IceSSL.Trace.Security=1## SSL Configuration##Ice.Plugin.IceSSL=IceSSL:createIceSSL#IceSSL.DefaultDir=../../../certs#IceSSL.CertAuthFile=cacert.pem#IceSSL.CertFile=c_rsa1024_pub.pem#IceSSL.KeyFile=c_rsa1024_priv.pem设置了ssl通信后记得配置好IceSSl相关的几个配置genInstance 这个方法也是非常常用的ice支持在ice文件中定义struct,你可以把他理解成ice中定义的一种类型,并不是你调用方语言代码中的struct,虽然它最终其实也就是个stuct。我们可以通过genInstance这个方法生成一个 ice文件中定义的这个struct的类型的一个实例(貌似有点绕口)具体的看上面代码的注释吧好了,都很简单的,最后附件中附上代码和配置文件记住额,仅仅只需要import&IceCommInvoker 一切都变得简单,得益于动态语言的特性,有空再搞个ruby版本&&另外如果python调用ice过程中遇到问题可以先看下我的另一篇blog,可能有帮助:
阅读(1153) | 评论(0) | 转发(0) |
下一篇:没有了
相关热门文章
给主人留下些什么吧!~~
请登录后评论。}

我要回帖

更多关于 html弹出窗口代码 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信