2014年domino学习小结

lotus domino javascript調用代理 立即下载


http://oatest1.citicbank.com/sgsoa/testniexz.nsf/recorddispaly?OpenForm
20140716
1.如何取删除整个视图文档
if not vw_rep is nothing then
call vw_rep.refresh
call vw_rep.AllEntries.RemoveAll(true)
end if


MsgBox dbview.Allentries.Count '返回视图中文档数目


2.如何取到复制冲突文档,可参考发文中“复制冲突”视图
2.1建立视图,条件为:SELECT @IsAvailable($conflict)


3.判断文档中某个域的值是否包含某个文档
3.1
如:以下用于多值域中是否包含某个字段的方法
Set item =adoc.Getfirstitem("fld_SelOperateName")
If item.Contains("分发跟踪") Then 
msgbox "11111111111"
end if
3.2用于判断文本域中是否包含某个字段
InStr(item.Text,"(报领导批示)]]></Action>")>0


4---将firefly上数据库模板替换到测试服务器方法
前提条件:先取sharecode,上传到服务器后签名


将firefly上数据库模板替换到测试服务器方法:
4.1.同步本地firefly,确保本地的模板库和firefly上的一致
4.2.ftp将模板传到ntf文件夹下,替换原模板
4.3.签名:在administrator端签名
4.4.在服务器端load模板库 load design -f ntf/branch/tcwsendfile.ntf
4.5.在服务器端load数据库load design -f tianjinoa/tcwsendfile.nsf--公文监控库
load design -f public/tcworg.nsf
load design -f ntf/tcwmobileinterface.ntf
load design -f tcwmobileinterface.nsf、
load design -f foshanoa/kkss.nsf
load design -f sgsoa/tcwsmsmanage.nsf


load design -f ntf/branch/tcwreceivefile_sp.ntf




4.6
刷分行
load design -d sgsoa 
刷整体数据库
load design 


5.数组for循环的使用
5.1使用for --to-------
Dim UserPosNoArr As Variant
UserPosNoArr=Split(UserPosNoStr,"↑")
For loopfjq=0 To Ubound(UserPosNoArr)
If UserPosNoArr(loopfjq)<>"" Then
UserPosNoStr=UserPosNoStr+"↑"+UserPosNoArr(loopfjq)
End If
Next
5.2使用forall in
Dim DeptListNo As Variant
ForAll x In DeptListNo '部门文书所在的部门ID
--------------
End ForAll

6.如何执行其他数据库上代理


Dim dbAutoFinish As NotesDatabase
Dim agAutoFinish As NotesAgent
Set dbAutoFinish = s.Getdatabase(CurDB.Server,"public/tcwautofinish.nsf")
Set agAutoFinish = dbAutoFinish.Getagent("ag_autofinishdoc")
Call agAutoFinish.Runonserver()

7.ftsearch的用法
7.1
FTSearch(query:string, max:int, sortopt:int, otheropt:int) 
说明:
sortopt Integer. Use one of the following constants to specify a sorting option: 
8 (default) sorts by relevance score. When the collection is sorted by relevance, the highest relevance appears first. To access the relevance score of each document in the collection, use the FTSearchScore property in NotesDocument. 
1542 sorts by document creation date in descending order. 
1543 sorts by document creation date in ascending order. 
32 sorts by document date in descending order. 
64 sorts by document date in ascending order. 
 
otheropt Integer. Use the following constants to specify additional search options. To specify more than one option, use a logical or operation.
16384 specifies a fuzzy search. 
512 uses stem words as the basis of the search. 
 




 实例:
if (database.isFTIndexed()) {
database.updateFTIndex(false)
} else {
database.createFTIndex(0, true)
}
var list = "";
var dc = database.FTSearch("new");
var doc = dc.getFirstDocument();
while (doc != null) {
list = list + doc.getItemValueString("Subject") + "\n";
doc = dc.getNextDocument();
}
return list


8.使用代理,根据模板创建数据库并且继承模板中的ACL
服务器:oazh05bj 模板路径:ntf/public/tcwautofinish.ntf 需创建的数据库路径:ntf/public/tcwautofinish.nsf


set createDB = session.getdatabase("oazh05bj","ntf/public/tcwautofinish.nsf")
if not createDB.isopen then
set tempDB= session.getdatabase("oazh05bj","ntf/public/tcwautofinish.ntf")
set createDB= tempDB.createfromtemplate("oazh05bj","ntf/public/tcwautofinish.nsf",true)
end if 
将原来的ACL添加"[]",如“-default-”修改为"[-default-]"


9.如何获取并添加数据库的acl操作
set acl=db.ACL
set entry= acl.getfirstentry
while not entry is nothing
if entry.name="文档管理员" then
entry.name="$_分行管理员" '修改ACL名称
entry.level=ACLLEVEL_DESIGNER '修改设计权限---ACLLEVEL_MANAGER 
entry.UserType=ACLTYPE_PERSON_GROUP '修改用户类型
entry.enableroles
entry.remove '删除ACL
end if
wend
acl.save
acllevel:
ACLLEVEL_AUTHOR (3) 
ACLLEVEL_DEPOSITOR (1) 
ACLLEVEL_DESIGNER (5) 
ACLLEVEL_EDITOR (4) 
ACLLEVEL_MANAGER (6) 
ACLLEVEL_NOACCESS (0) 
ACLLEVEL_READER (2) 
acltype:
ACLTYPE_UNSPECIFIED (0) 
ACLTYPE_PERSON (1) 
ACLTYPE_SERVER (2) 
ACLTYPE_MIXED_GROUP (3) 
ACLTYPE_PERSON_GROUP (4) 
ACLTYPE_SERVER_GROUP (5) 






!(@IsMember(@UPPercase(@username);@UPPercase(fld_CurStepPerformers))|@IsMember(@UPPercase(@username);@UPPercase(fld_CurStepRestPerformers))|@IsMember("[公文管理员]";@UserRoles)|fld_FlowIsEnd="1")




10.msgbox 打印后台报错信息通用版


MsgBox |数据库| & curdb.FilePath & |中代理| & session.CurrentAgent.Name & |在第| & Erl & |行出现错误:"| & Error & |"|


11.notesviewentry方法
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
view.AutoUpdate = False
Set nav = view.CreateViewNav
Set entry = nav.GetNth(2)
Messagebox entry.NoteID


12.公式及代理
@Dbname:显示服务器及数据库名称:
如:CN=oazh05bj/OU=serves/O=CITICB; sgsoa\testniexz.nsf
@Subset(@Dbname;1)显示服务器名称
如:CN=oazh05bj/OU=serves/O=CITICB;
@Subset(@Dbname;-1)显示数据库路径
以下表示返回:数据库路径
curDbPath=Evaluate(|@leftback(@LowerCase(@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/"));"/")|)


@Subset的用法----:
@Subset("New Orleans":"London":"Frankfurt":"Tokyo";2)---This example returns New Orleans;London. 
@Subset("New Orleans":"London":"Frankfurt":"Tokyo";-3)---London;Frankfurt;Tokyo. 
@ReplaceSubstring的用法-----
@ReplaceSubstring( "I like apples" ; "like" ; "hate" )--This example returns "I hate apples".
@ReplaceSubstring( "I like apples" ; "like" : "apples" ; "hate" : "peaches")
--This example returns "I hate peaches". 
@Username:CN=admin/O=CITICB
视图中从多个表单中取到文档:
SELECT @Contains(form;"frm_Org_")


13.用js获取当前时间
function GetCurTime(){
var time = new Date()
var hours = time.getHours()
  if (hours <=9) { hours="0"+hours }
var minutes = time.getMinutes()
if (minutes <=9) { minutes="0"+minutes }
var seconds = time.getSeconds()
if (seconds <=9) { seconds="0"+seconds }
  var year=time.getYear()
  var month=time.getMonth()+1
  var day=time.getDate()
  var Timestr=year+"年"+month+"月"+day+"日"+" "+hours+":"+minutes+":"+seconds
  //GetCurTime=year+"年"+month+"月"+day+"日"+" "+hours+":"+minutes+":"+seconds
return Timestr
}


14.公式中替换字符串的值
laiwendanwei:=@ReplaceSubstring(tmpendstr;"﹨";"");


15.如何用公式获取路径所在目录,如获取sgsoa


dbtempPath:=@Subset(@DbName;-1);
tempFilePath:=@If(@Contains(dbtempPath;"\\");@LeftBack(dbtempPath;"\\");@Contains(dbtempPath;"/");@LeftBack(dbTempPath;"/");"");
tempFilePath1:=@ReplaceSubstring(tempFilePath;"\\";"/");


16.如何使用公式获取传过来的参数--请参考kkss.nsf-strvalue域,在表单上存在一个域Query_String_Decode
方法一:
ref:=Query_String_Decoded;
str:=@Right(ref;"&searchvalue=");


@Left(@Right(QUERY_STRING_DECODED;"&StepName=");"&")
str
方法二:
使用代理传过来的为,可参考sgsoa/tcwsupervisory.nsf--公文监控库
"http://"+dContext.Server_Name(0)+":"+dContext.Server_Port(0)+"/"+DbPath(0)"/tcwfilesupervisory.nsf"+"/frm_VirtualDoc?openform&username="+username+"&dbpath="+DbPath0+"&UNID="+docFound.UniversalID
新增域为:fld_FlowDocDBName,设置为
@UrlQueryString("dbpath")


17.CGI variable names
Query_String_Decoded




18. notesname及common方法
Dim simplecurStepname As NotesName '当前环节处理人中文名
Set simplecurStepname=session.Createname(curPerformer) 
'当前环节处理人中文名 curPerformer为 CN=蔡志诚/OU=汽车金融中心/OU=总行/O=CITICIB
msgbox simplecurStepname.Common '当前环节处理人简称  


19.NotesDOMNode


20. session.getEffectiveUserName() -This is the name of the user logged into the server session running the script.
creator = session.EffectiveUserName


21.@name([CANONICALIZE];"|+UserName+|")|)的用法
Public Sub initCurUser(UserName As String , DeptID As String)
On Error Goto er 
temp=Evaluate(|@name([CANONICALIZE];"|+UserName+|")|)
Me.sUserName = temp(0)
Me.sDeptID = DeptID
Exit Sub
er:
Call mError.TreatWithError("sub initCurUser,class Appdoc")
End Sub



'******************************************************************************
' 名称                          runAutoAgent(sAgentName)
' 参数定义  sAgentName-要运行的代理名称
' 作者                  wq
' 创建时间              2005-8-22
' 版本号                  1.0
' 定义说明                      按sAgentName名称,运行特定的代理
'*******************************************************************************
Public Sub runAutoAgent(sAgentName As String)
On Error Goto er
Dim agent As NotesAgent
'Set db = s.CurrentDatabase
Set agent = mAppDB.GetAgent(sAgentName)
If agent.Run(mAppDoc.NoteID) <> 0 Then
Call mError.TreatWithError("sub runAutoAgent agent is run false,class Appdoc")
End If
Exit Sub
er:
Call mError.TreatWithError("sub runAutoAgent,class Appdoc")
End Sub




http:oatest1.citicbank.com:8080/tcwmobileinterface.nsf/SubmitDispension?wsdl

http://oatest1.citicbank.com/tcwmobileinterface.nsf/SubmitDispension?wsdl


22.window.confirm
function FullFinishDoc(){
var temp = window.confirm("此举将结束当前文档流程并退出,是否继续?");
if (temp) {
SubmitDoc("90")
}








liangwanghong
1.JavaScript怎样使一个div的内容发生变化.
答案:innerText
2.JavaScript怎样创建一个对象并给属性赋值.答案:符合以下方式即可,
var obj = {'id':1,'name':'liangwanghong'}
function obj(){this.id = 1;this.name = 'liangwanhong'}
function obj(){obj.prototype.id = 1;obj.prototype.name = 'liangwanhong';}


3.英文题,JSON数据格式
4.英文题,想最小开销的快速查询数据,怎么样建立索引
5.英文题,AB两台服务器,如果邮件发送不通,应该执行什么命令(route)


1.代理有几种调用方式
(1)按钮直接执行公式调用代理@Command([ToolsRunMacro];"CacExcleDown");
(2)按钮执行js,js调用某按钮的click,ajax调用、dom对象调用;
(3)表单submit触发webquerySave执行代理


2.jsheader,webQueryOpen执行顺序.
答案:WebQueryOpen,JsHeader, onload


3.查询某一文档几种方式,效率.
答案:db.search,效率最慢;db.ftsearch(); view.getDocumentByKey,效率适中,db.getDocumentByUNID,效率最快


1.增加select的一个option.答案:
var obj = document.createElement("option");
obj.text = "测试";
obj.value = "01"
document.forms[0].select.add(obj);
2.表单subject域值判断后台是否存在同subject文档,如有,提示,但是前台数据不能丢失,写出JS及LS.答案:
JS:
var ajax = new ActiveXObject("Msxml2.XMLHTTP");
ajax.open("POST", "代理名称?OpenAgent", True);
ajax.send(subject域值);
ajax.onreadystatechange = function(){
if(ajax.readyState == 4){
var value = ajax.responseText;
if(value == "Y"){
alert("已经存在!");
}else{
//提交文档保存
}
}
}


fld_routerelatekey
LS:
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim doc As NotesDocument
Set doc = session.DocumentContext
Dim subject As String
subject = doc.Request_Content(0)


Dim dc As NotesDocumentCollection
Set dc = db.Search("subject='" + subject + "'")
Print "Content-Type:text/xml"
If dc.Count > 0 Then
Print "Y"
Else
Print "N"
End If


9月
1.如何在代理中取时间
MsgBox "now======="&Now()
MsgBox "now======="&Format$(Now(),"HH:MM:SS")
2.NotesItem使用
可以使用noteitem创建域,并给域赋值,文本域,数字域,时间域,多值域
参数(文档doc,域名称,域值,域权限)
如下代码,位于网关库中 SendOneDept 方法
       '创建一个接收方的路由文件
Set NewDoc = RouteDoc.CopyToDatabase(CurDB)

NewDoc.form = "frm_DocRouteInfo"
Dim newValues( 1 To 6) As String
newValues( 1 ) = "CN=孙航/OU=信息技术部/OU=总行/O=CITICIB"
newValues( 2 ) = "OAZH05BJ/Servers/CITICIB"
newValues( 3 ) = "LocalDomainServers"
newValues( 4 ) = "$$系统管理员"
newValues( 5 ) = "#CITIC_NSC" 
newValues( 6 ) = "OAZH06BJ/Servers/CITICIB"
Dim item_edit As New NotesItem(newdoc, "fld_docAuthors",  _
newValues, AUTHORS)


This script creates a new text item in a document and gives it multiple values. The values in the text list are Bicycle, Train, and Foot.
Dim doc As NotesDocument
Dim textListItem As NotesItem
Dim newValues( 0 To 2 ) As String
'...set value of doc...
newValues( 0 ) = "Bicycle"
newValues( 1 ) = "Train"
newValues( 2 ) = "Foot"
Set textListItem = New NotesItem _
( doc, "Choices", newValues )
Call doc.Save( True, True )




1.如何取到当前浏览器的路径
var urlold=window.location.pathname.toString()
var strurl= urlold.substring(0,urlold.indexOf(".nsf"))+".nsf/getsearchfield?openagent";


2.对话框列表中值
返回值用“|”隔开,“|”前面表示下拉框显示的值,后面显示的真正的值。值的形式为数组,可用“:”隔开表示。
如下表示下拉表中第一个值为空
strServer := @Subset(@DbName;1);
strPath := @LeftBack(@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/");"/") + "/tcwworkflow.nsf";
tasks := @DbColumn("":"";strServer:strPath;"vws_TaskName";2);
tasksID := @DbColumn("":"";strServer:strPath;"vws_TaskName";1);
"":tasks + "|" +  "":tasksID
3.js中代码转码,使用escape
4.使用ajax 调用代理
eval("var myAjax = new Ajax.Request( urllast, { method: 'get', parameters: paramsnew,onComplete: BuildLinesArray})");
urllast:


5.使用产品代码调用ajax //请研究resttest返回值是什么
$ct.get(strurlnew,function(xhr){
restext = xhr.responseText;
},false);


if (restext=="2"){document.getElementById("displaysearch").innerHTML="没有该数据库 !";return false}
if (restext=="0"){document.getElementById("displaysearch").innerHTML="No database Select";return false;}
if (restext=="1"){document.getElementById("displaysearch").innerHTML="No search string";return false}
if (restext.indexOf("ErrorSystem")!=-1){document.getElementById("displaysearch").innerHTML=restext;return false}


get : function(url, callback, /* optional */async,/* Cache */cache) {
if (url.substring(0, 1) != "/" &  url.substring(0, 5) != "http:"){
url = this.getLocalDbName() + "/" + url;
}
if (!cache)
url += (/\?/.test(url) ? "&" : "?") + "_=" + (new Date).getTime();
var xhr = this.xhr();
async = typeof(async) == "boolean" ? async : true;
xhr.open("GET", url, async);
xhr.send(null);
if (!async) {
if (this.isFunction(callback))
callback(xhr);
return;
}
var me = this;
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (me.isFunction(callback))
callback(xhr);
}
}
}
},

14.js中调用代理汇总
使用Ajax
try{
argumentxml = new ActiveXObject("MSXML.DOMDocument");
if(argumentxml != null){
argumentxml.async = false;
if(argumentxml.load(url)) {
//alert(argumentxml.xml);
return argumentxml.selectSingleNode("//result").text
}
}

}catch(err) {}

14.2使用产品的
var argumentxml = $ct.loadXML(url);
alert(argumentxml.xml)

15.可参考短信发送数据库
鼠标放在按钮上,变成手状的代码:style="cursor:pointer"
<input type="button" name="btn_send" value="选择人员" class="coolbtn_style_2" style="cursor:pointer" onclick="selectuser('fld_SMSReceives_CN','fld_SMSReceives')"/>
点击某个按钮打开一个窗口
var url = filepath+"/tcworg.nsf/frmw_showusergroup?open&field="+strfieldname+"&fvalue="+strfieldValue;
    if($ct.getNavi()=="MSIE"){
    var heightconst=650;
var widthconst=850;
var leftconst=(screen.availWidth-widthconst)/2;
var topconst=(screen.availHeight-heightconst)/2;
wZoom="dialogLeft:"+leftconst+"px;dialogTop:"+topconst+"px;dialogHeight:"+heightconst+"px;dialogWidth:"+widthconst+"px; center: no; help: no; status:no";
//s1 = showModalDialog(url,document,'dialogWidth:850px,dialogHeight:600px,scroll:no');
s1 = showModalDialog(url,document,wZoom);
//s1 = showModalDialog(url,document,'dialogWidth:600px,dialogheight:400px');
}else{
$ct.showModalOther(url,document,650,580,"","0","选择人员");
}


16.使用代理判断某个文档是不是新文档
If CurDoc.IsNewNote Then
Else
End If


17.关注文档代码学习
请看行发文关注文档功能中页面跳转
function Gzwd(){
UNID = document.forms[0].fld_CurrentDocUNID.value;
DeptID = document.all("fld_CurUserDeptID").value;
StepID = document.all("fld_CurStepID").value;
UserName = document.all("fld_CurUserName").value;
location.href = "/<计算的值>/AG_GzDoc?openAgent&UNID="+UNID+"&StepID="+StepID+"&DeptID="+DeptID+"&UserName="+UserName;
}
AG_GzDoc中:
Print |<script>|
Print |alert("您已关注过此文档!");|
Print |parent.location.href = "|+ sPath +|";|
Print |</script>|
代理中去空格取唯一Arrayunique及FullTrim方法
MainDoc.fld_GzwdReaders = FullTrim(ArrayUnique(MainDoc.fld_GzwdReaders))
加锁:
lockID = CreateLock(SharesResources)
gotLock = CodeLock(lockID)
解锁---begin
If gotLock Then
releaseLock = CodeUnlock(lockID)
deleteLock=DestroyLock(lockID)
End If
解锁---end
19.组织机构人员排序中有关于xml转化的代码,
<XML id="Source">“此处为代理生成的一个xml文件”</XML>
<XML id="Style" Src="/public/xml/Org_User_DeptInfo.xsl"></XML> //格式转换
<script language="JavaScript" for=window event="onload">
document.all.tableDiv.innerHTML=Source.transformNode(Style.XMLDocument)
document.all("DeptCode").value=window.opener.document.all("fld_OrgSerialNum").value;
document.all("DeptID").value=window.opener.document.all("fld_OrgNo").value;
</script>
20.旧文档显示按钮,新文档不显示按钮。使用按钮中的隐藏条件
@IsNewDoc




10月
1.xml加载代码---可参考configuration.nsf库下frm_jd表单
var url = pathname1+"/AG_JDJudge?openAgent"+searchstring


try{
argumentxml = new ActiveXObject("MSXML.DOMDocument");
if(argumentxml != null){
argumentxml.async = false;
if(argumentxml.load(url)) {
return argumentxml.selectSingleNode("//result").text
}
}
}catch(err) {}

2.option下拉框中删除一个元素的方法。elSel.remove(i)
function removeOptionUnChecked(tarField){
//elSel = eval("window.parent.document.all(\"tmpSendTo\")");
elSel = (window.parent.document.forms[0].tmpSendTo);
  for (var i = elSel.length-1; i >= 0; i--){
    if(elSel.options[i].text.indexOf(tarField)!="-1"){
    elSel.remove(i);
    }
  }
}
添加一个元素的方法
function AddItem(obj,text,value){
var varItem = new Option(text,value);
obj.options.add(varItem);
}
AddItem(oSelect,tmpvalue1,tmpvalue);
3.style中字体加粗
font-weight:bold
4.遍历视图中取首列为key的文档集合
Dim vc_Notify As NotesViewEntryCollection
Dim entry_Notify As NotesViewEntry
Set vc_Notify = OpView.GetAllEntriesByKey(unid)
Set entry_Notify = vc_Notify.GetFirstEntry()  '取第一条文档
Set entry_Notify = vc_Notify.GetNextEntry(entry_Notify) '取下一条文档
5.向一个集合中添加文档
Dim docs As NotesDocumentCollection 
Set docs = mUtil.initDocCollection(db)
Call docs.AddDocument(doc)
'----------------------------------------------
Public Function initDocCollection(db As NotesDatabase)
Dim doc As New NotesDocument(db)
Call doc.save(True,False)
Dim dc As NotesDocumentCollection
Set dc = doc.Responses
Set initDocCollection = dc
Call doc.Remove(True)
End Function
'------------------------------------------------------
6. NotesDocumentCollection
NotesViewEntryCollection
7. GetFormattedText方法
Set rtfitem=doc.GetFirstItem("fld_NoteAll")
rtfstring =rtfitem.GetFormattedText( False, 0 )
8.代理中replace方法:"<","&lt";">","&gt"
strSource = Replace(strSource,"&","&amp;")
9.死循环后,在控制台输入 res s 或者res ser重启服务器
10.使用代理创建excel文件
Dim excelApplication ,excelbook,excelsheet As Variant
Set excelApplication= CreateObject("Excel.Application")
Set excelbook=excelApplication.workbooks.add
Set excelsheet=excelbook.Worksheets.add
excelApplication.statusbar="正在创建,请稍等............."
excelApplication.Visible = True
excelsheet.name="test"
excelsheet.cells(1,1).value="fld_title"
excelsheet.cells(1,2).value="数量"

Dim i As Integer
i=1
While Not doc Is Nothing
i=i+1
excelsheet.cells(i,1)= doc.fld_title(0)
excelsheet.cells(i,2)= doc.fld_count(0)
Set doc = vwsAllView.Getnextdocument(doc)
Wend

Call excelsheet.UsedRange.Columns.AutoFit()
excelApplication.statusbar="创建完成"
11.使用js创建excel
var oXL = new ActiveXObject("Excel.Application");
oXL.Visible = true;
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
oSheet.Cells(1,1).value = "拟稿时间";
oSheet.Cells(1,2).value = "办结时间";
12.如何计算数据库大小和数据库文档数
db.Size
db.Alldocuments.Count
13.ajax方法总结
1.使用httprequest获取文档
function ajaxFunction()
 {
  var xmlhttp=null;
  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
    }
    else {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
    xmlhttp.onreadystatechange=function()
      {
      if(xmlhttp.readyState==4 )
        {
         var xmldoc=xmlhttp.responseXML
         alert(xmldoc.xml)
        }
      }
    url="http://oatest1.citicbank.com/sgsoa/org.xml"
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
 }
2.使用load方法获取文档
var url="http://oatest1.citicbank.com/sgsoa/org.xml"
try{
var agrxml=XMLDOM()
if(agrxml!=null){
agrxml.async = false;
agrxml.onreadystatechange=function(){
     if(agrxml.readyState==4){
      alert(agrxml.selectSingleNode("//ID").text)
}
      }
     agrxml.load(url)
  }
}catch(err){
}
function XMLDOM() {
var xmlDomVers = [
"Microsoft.XmlDom",
"MSXML2.DOMDocument",
"MSXML2.DOMDocument.3.0",
"MSXML2.DOMDocument.4.0",
"MSXML2.DOMDocument.5.0"
];
for (var i=xmlDomVers.length-1;i>=0;i--) {
try {
var xmlDom = new ActiveXObject(xmlDomVers[i]);
return xmlDom;
} catch(e) {continue;}

}
}
1.xpath 中 xmldoc为xml文件
下面的例子会选取所有价格高于 35 的 price 节点:
xmlDoc.selectNodes("/bookstore/book[price>35]/price")
2.ArrayGetIndex("")




11月
1.代理中ArrayUnique 方法用于数组去重
2.this.style.height=this.scrollHeight +'px'
tell amgr run "tcwinitagent.nsf" 'bank_searchlink'
3.域值的类型notesitem.type,以下表示为富文本格式
rtitem_atta.Type = RICHTEXT
4.Mid$(start,end) start=0 表示从第一个字符开始
5.规范时间
Format$(docCur.fld_enddate(0),"yyyy-mm-dd")
6.文件上载控件-在创建-》嵌入元素-》文件上载控制
7.str = "abcd1234.doc"
len(str) = 12
instr(str,".") = 9
right$(str,3)= "doc"
8. HTTP 任务重新启动
Tell HTTP Restart
重启服务器
res s
9.char(10) 表示空格


12月
1.通过代理向服务器发送命令
Dim strCommand As String
strcommand = "push OAZH05BJ sgsoa\tcwpersonalwork.nsf"
Call session.SendConsoleCommand(session.CurrentDatabase.Server,strCommand)
2.检查附件本地附件大小功能。请参考publictooljs
checkFileSize:function(filename){
    filesizeKb = 12;//先暂时写死为12M
try{
if(document.all){
var fso = new ActiveXObject("Scripting.FileSystemObject");
if(!fso.FileExists(filename)){
alert("上传文件不存在,请重新输入!");
return false;
}
var file = fso.getfile(filename);
var fileSize = file.size ;//单位:b
var cfileSizeKb = fileSize/1024;//转为kb
if(parseFloat(cfileSizeKb) > parseFloat(filesizeKb*1024)){
alert("当前文件的大小为" + (parseFloat(cfileSizeKb)/1024).toFixed(1) + "M,最大上传文件不能超过" + filesizeKb + "M");
window.location.reload();
}
}
}catch(err){
if(err.description == "Automation 服务器不能创建对象"){
alert("文件大小检验未生效! \r\n 请如下修改浏览器设置:工具->Internet选项->安全->Internet/本地Internet->自定义级别->ActiveX控件和插件->对没有标记为安全的ActiveX控件进行初始化和脚本运行->启动!");
}
window.location.reload();
}
}
if($ct.isIE()){
//调用公用方式检查附件大小
if(atoblen!=""){
$ct.checkFileSize(atoblen);
}
}else{
if(atoblen!=""){
filesize=document.forms[0].atob.files[0].size;
var cfileSizeKb = filesize/1024;//转为kb
if(parseFloat(cfileSizeKb) > parseFloat(12*1024)){ //不能超过12M
alert("当前文件的大小为" + (parseFloat(cfileSizeKb)/1024).toFixed(1) + "M,最大上传文件不能超过12M");
window.location.reload();
return false
}
}

} 
3.atoblen = "C:\Documents and Settings\citic\桌面\记录\ecworgbydeptid.xsl"
var natoblen = atoblen.split("\\")
var strfilenamesuffix = natoblen[natoblen.length-1];
strfilenamesuffix======为ecworgbydeptid.xsl
alert(natoblen.length)========为6
4.Arraygetindex  用于判断数组中是否存在某个元素
If arrReceiveDeptID(0)<>"" Then
index = Arraygetindex(arrReceiveDeptID,Cstr(v))
End If
If Isnull(index) Then
todept = todept + {<todept>}+Chr(10)
todept = todept + {<todeptname>} & doc_WF.fld_SelDeptList(i) & {</todeptname>}+Chr(10)
todept = todept + {<todeptid>} & Cstr(v) & {</todeptid>}+Chr(10)
todept = todept + {</todept>}+Chr(10)
End If


5.使用公式,取到视图中某列中某条文档的某个值
server:=@Subset(@DbName;1);
dbname:=@LeftBack(@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/");"/")+"/tcwworkflow.nsf";
tmp:=@DbLookup("":"NoCache";server:dbname;"vws_TaskName";fld_TaskID;"fld_FieldNameByMark");
tmp


7.解释http中,get和post有什么区别?
HTTP请求:get与post方法的区别
             相同点;
l          Get与post(对于“post”除非相应里有cache-control或者expires头域指示其相应不可缓存)请求的相应是可缓存的;
          不同点:
1.         Get是从服务器上获取数据,post是向服务器传送数据
2.         Get是把参数数据队列加到提交表单的action属性所指定的URL中,值和表单中各个字段一一对应,在URL中可以看到,post是通过HTTP post机制,将表单内各个字段与其内容放置在html header内一起传送到action属性所指的URL地址,用户看不到这个过程;
3.         get传送的数据量较小,不能大于2kb;post传送的数据量较大,一般被默认为不受限制的。但理论上,IIS4中最大量为80kb,IIs5中为100kb;
4.         get安全性非常低;post安全性较高;
5.         get适用于多请求,而保留post仅用于更新站点;
6.         在form提交的时候,如果不指定method,则默认为get请求,form中提交的数据将会附加在url之后,以?与URL分开。字母数字字符原样发送,但空格转换为“+”号,其它符号转换为%xx,其中xx为该符号为16进制表示的ASCII(或ISO Latin-1)值;
7.         get请求提交的数据放置在HTTP请求协议头中,而post提交的数据则放在实体数据数据中;
GET 请求
  //JS
  var xhr = XHR();
  xhr.open("get","test.php?qs=true&userName=abc&pwd=123456",true);
  xhr.onreadystatechange = function () {
  if (xhr.readyState==4 && xhr.status ==200) {
  alert(xhr.responseText);
  }
  };
  xhr.send(null);
  //PHP
  print_r($_GET);
POST 请求
  //JS
  var xhr = XHR();
  xhr.open("post","test.php",true);
  xhr.onreadystatechange = function () {
  if (xhr.readyState==4 && xhr.status ==200) {
  alert(xhr.responseText);
  }
  };
  //比GET请求多了一步
  xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  //另外,数据是通过send方法发送的
  xhr.send("qs=true&userName=abc&pwd=123456");
  //PHP


8.解释css中,padding 和magin 有什么区别?
margin:层的边框以外留的空白
padding:层的边框到层的内容之间的空白


9.domino中调用代理有多种方式,请对各种方式进行简单描述?
9.1 执行其他数据库上代理
 Dim dbAutoFinish As NotesDatabase
 Dim agAutoFinish As NotesAgent
 Set dbAutoFinish = s.Getdatabase(CurDB.Server,"public/tcwautofinish.nsf")
 Set agAutoFinish = dbAutoFinish.Getagent("ag_autofinishdoc")
 Call agAutoFinish.Runonserver()


9.2 使用公式运行代理@Command([ToolsRunMacro]; "CreateCPBH");
9.3从js中通过URL调用代理
9.4后台执行代理 tell amgr run "shujuku.nsf" 'agent'


10.linux/AIX系统与windows系统开发时,有什么不同


10.1 数据库路径 linux aix 下为“sgsoa/tcworg.nsf”,window 下为 “sgsoa\tcworg.nsf”


11.想要通过特定条件在数据库中查找文档(如某个字段等于、包含特定的值),使用lotuscript有哪些方法,各有什么优缺点?
db.FTSearch :使用了数据库索引,此外,根据服务器的Notes.ini 设置,对返回的文件集合的大小施加了限制
db.Search:它不需要全文索引和预先创建的视图,因此它是一种非常方便的查询方法
view.GetAllDocumentsByKey:为检索文件集合最快的方式。唯一的缺点是需要建立相关的视图
view.GetDocumentByKey




12.编程题
实现以下代码:文档以subject字段为关键字,提交时做唯一性检测(如检测已有同关键字文档,给出提示但填写信息不能丢失),文档对应视图为vwDocbySubmit,检测包括前台javascript和后台lotuscript
答案:
url="oa1/Testagent?opentagent&subject="+subject
try{
agrxml=XMLDOM(); //"MSXML2.DOMDocument"
if(agrxml!=null){
 agrxml.async = true;
 if(agrxml.load(url)){
 alert(agrxml.xml)
 alert(agrxml.selectSingleNode("//ID").text)
 }
  } 
}catch(e){}




function XMLDOM() {
  var xmlDomVers = [
  "Microsoft.XmlDom",
  "MSXML2.DOMDocument",
  "MSXML2.DOMDocument.3.0",
  "MSXML2.DOMDocument.4.0",
  "MSXML2.DOMDocument.5.0"
  ];
  for (var i=xmlDomVers.length-1;i>=0;i--) {
   try {
    var xmlDom = new ActiveXObject(xmlDomVers[i]);
    return xmlDom;
   } catch(e) {continue;}
   
  }
 }


Print {Content-Type: text/xml}
 Print {<?xml version="1.0" encoding="GB2312" ?>}




function ajaxFunction()
 {
  var xmlhttp=null;
  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
    }
    else {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
    xmlhttp.onreadystatechange=function()
      {
      if(xmlhttp.readyState==4 )
        {
         var xmldoc=xmlhttp.responseXML
         alert(xmldoc.xml)
        }
      }
    url="http://oatest1.citicbank.com/sgsoa/org.xml"
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
 }

















uniapp中使用canvas生成海报,并下载保存到手机相册 如下图,是在H5中,canvas生成后的效果,首先说明,H5不支持返回图片的临时路径,不能用于保存,APP端生成成功后,会返回图片的临时路径用来保存到相册。本地测试,用的网络图片,没有出现跨域的问题,APP端也正常显示。 完整代码:可以将整个代码复制到你得uniapp项目中直接运行。代码中做了详细的注册,关于API的用法,这里只标注的简单的提示,具体还是参考 官方链接uniapp-canvas吧 <template> <view class="demo"> <c. 阅读详情

相关推荐

PCIE6.0协议学习小记-Flit_Mode

PCIE6.0学习

code_aJack的博客 4631

如何创建一个只显示复制冲突文档的视图

如何创建一个只显示复制冲突文档的视图 环境 产品:Lotus Domino平台:跨平台软件版本:5.x 问题

点点滴滴 2666

记录一次小项目中的重放攻击与解决方案

文章目录1、重放攻击简介2、重放攻击演示3、解决方案4、重放攻击验证 欢迎各位 前(提)来(出)讨(意)论(见)。 1、重放攻击简介 重放攻击(Replay Attacks)又称重播攻击、回放攻击,是指攻击者发送一个目的主机已接收过的包,来达到欺骗系统的目的,主要用于身份认证过程,破坏认证的正确性。 举个简单的小例子。 我们往系统里面插入一条数据,如果此次操作的数据包被攻击者获取,又恰巧后台没有对重复内容进行验证,那么攻击者就可以利用该数据包重复的发起请求,无限制的往数据库插入数据,即使请求包是加密的也

fiveSix 8725

Domino 通用视图&在线编辑

或许就要出来的安卓APP端的LOTUS客户端,以后不再流行使用Web开发,可能现在使用的Web的应用就要过时,乐观其成。 最近在做个JAVA的项目,在线编辑Table里面的内容。想想在Domino其实也是很方便实现的。全前端的业务,使用 Nodes.js做前端开发后,很多业务转到前端来做。花了些时间简单做了个Demo,以下图片简要介绍: 资料下载地址ht...

weijia3624的专栏 8286

Cesium+Three.js融合实战:从零构建GIS与BIM一体化大场景

本文详细介绍了Cesium与Three.js融合技术在GIS与BIM一体化大场景中的应用实践。通过坐标系转换、双引擎协同渲染等核心技术,实现宏观地理信息与微观建筑细节的完美结合,为智慧城市、数字孪生等项目提供高效解决方案。文章包含环境配置、性能优化等实战经验,助力开发者快速掌握三维可视化开发技巧。

weixin_42563415的博客 259

ENVI5.6 自动化流程:GF系列卫星影像批处理与质量优化

本文详细介绍了如何利用ENVI5.6构建针对GF-2、GF-6、GF-7系列卫星影像的自动化批处理流水线。通过配置Batch Processing工具,实现从正射校正到图像融合的全流程批量处理,并分享参数设置、质量监控与故障排查的实战经验,旨在显著提升海量遥感影像的处理效率与成果质量。

efc1234567的博客 603

lotus domino 复制保存冲突解决

复制和保存冲突 在两次复制时间段之间,如果有两个或多个用户对相同文档的不同复本进行了编辑,就会导致复制冲突。而保存冲突则是在两个或多个用户同时编辑服务器上同一个数据库的同一个文档时发生。当发生复制冲突或保存冲突时,Notes 将在视图页面左边把发生冲突的文档标注出来。 Notes 如何处理复制冲突 在两个或多个用户编辑并保存同一个文档之后,下次进行复制时,Notes 将编辑和保存最频繁的文

biaorger的专栏 5164

8、多导睡眠图记录中基于级联自适应滤波器的脑电图信号噪声去除

本文提出了一种基于三级级联自适应滤波器的新型方法,用于去除多导睡眠图(PSG)记录中脑电图(EEG)信号的常见伪迹,包括50/60 Hz电源线干扰、心电图(ECG)和眼电图(EOG)伪迹。该方法采用最小均方(LMS)算法,通过分阶段滤波有效分离并衰减各类噪声,在保留EEG关键神经节律信息的同时显著提升信号质量。研究利用MIT-BIH数据库中的18份真实PSG记录进行验证,结果表明该方法具有无相位失真、实现简单、自适应能力强等优势,适用于睡眠研究及脑机接口等生物医学应用领域。

banana的博客 173

domino常用知识总结

关于多值数据转换的问题,在ls代理里面 Dim newdb As NotesDatabase  Dim newview As NotesView Set newdb = New NotesDatabase("",F.Getcurpath(db) & "/e_multData.nsf") '多值数据的数据库 Set newview = newdb.Getview("v_module_byda

那一抹、璀璨 3063

【代码版本管理】SVN(Subversion)

认知有限,望大家多多包涵,有什么问题也希望能够与大家多交流,共同成长!本文先对SVN(Subversion)代码版本管理做个简单的介绍,具体内容后续再更,其他模块可以参考去我其他文章提示:以下是本篇文章正文内容。

qq_35635374的博客 668

标题:Stata17安装后遇到Java安装问题解决方法

设置JAVA_HOME环境变量:在Windows上,您需要设置JAVA_HOME环境变量以告诉Stata Java的安装路径。d. 输入变量名为JAVA_HOME,变量值为Java安装路径。注意:请确保您的Java版本与Stata兼容,并使用正确的Java安装路径。设置Stata的Java安装路径:现在,您需要告诉Stata Java的安装路径。如果您看到Java版本信息,则表示Java已成功安装。如果没有安装,请先下载并安装Java。确认Java已安装:首先,请确保您的计算机上已经正确安装了Java。

CyberSparkZ的博客 2867

Lotus 公式用法归类

访问用户环境用户环境是包含数据库的服务器或工作站,数据库包括以下内容: 复制公式、由新邮件到达时或定时触发的代理、选择公式或列公式。否则,用户环境是用户运行公式的 Notes 工作站。用户名可以是专有名称也可以是非专有名称,专有名称可以是规范或缩写的,使用 @Name 可更改用户名的格式。以下函数返回或处理用户环境的信息。函数 描述@UserName 返回用户名或服务器名。@Name([key

咸鱼白菜 1677

Laser-Marking 激光振镜打标机的开源代码 - 下载 - 搜珍网

为了方便开发者的使用和定制化需求,我们在这里提供激光振镜打标机的开源代码,并附带详细的描述。首先,让我们来了解一下激光振镜打标机的基本原理。振镜系统由两个可移动的反射镜组成,可以控制激光束在水平和垂直方向上的偏转角度,从而实现对工件的精确控制。通过这段开源代码,开发者可以根据自己的需求对激光振镜打标机进行二次开发和定制化。你可以修改振镜角度、打标速度等参数,也可以添加其他功能,例如自动识别和追踪等。首先,我们创建了一个串口对象,用于与激光振镜打标机进行通信。函数实现了对用户输入文本的打标操作。

TechProX的博客 1276

DOMINO复制冲突文档产生的原因

  DOMINO复制冲突文档这个应该是domino设计者不可避免会遇到的问题,他的产生形式有两种,一种是同步复制时产生的,一种是保存时产生的。   同步复制时产生复制冲突文档的原理以为domino大神已经分析的很透彻了,这个是其博客的地址:http://blog.sanmaozhao.com/articles/behind-the-scenes-of-replication-conflict.h...

weixin_33849942的博客 309

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

有关search及ftsearch的一点总结

searchFormula$ = {Form = "formname" & starttime>"开始时间" & endtime<"结束时间"}Set collection = db.Search(searchFormula$, dateTime,0)Set doc=collection.getfirstdocumentWhile Not(doc ...

weixin_30472035的博客 420

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

刷新文档的计算域

Formular: @Command([ToolsRefreshAllDocs])LotusScript:  Dim s As NotesSession  Dim db As NotesDatabase  Dim view As NotesView Dim doc As NotesDocument   Set s = New NotesSession Set db = s.CurrentDat

xqdak的专栏 695

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

关于Domino里面的Ftsearch功能的使用(未完善)

最近在写一个查找文件的接口时,发现别人用Ftsearch去查找,居然还可以进行全文的检索,觉得挺厉害的,所以网上找了一下相关的资料。不过我对于Ftsearch如何写检索条件,还是有点模糊,所以借着写接口代码的时候顺便试了一下,要是有不对的地方,恳请斧正。 部分代码如下: '将当前用户加入到搜索条件 If struiuser = "" Then tempstr = "" Else vuiuser = Evaluate({@Name([CN];"} & struiuser & {")

dengweitao的博客 681

通过后端代理实现Web搜索功能

通过后端代理实现Web搜索功能

XZZ_2018的博客 1693

[Domino]执行命令load design的时候出现Warning: Cannot locate design template

发现问题 在做Pseudo Test的时候被QA测出了一个问题。在Domino concole打命令“load design”,被Workbench翻译过后的数据库提示了一个警告:Warning: Cannot locate design template 'xxx' used by 'xxx' 分析原因 在Google查了一下,是模板继承时候出的问题,找不到被继承的那个模板文件就会报这

隐之狐的专栏 2484

domino使用URL进行数据搜索

<br />    客户OA系统待办事宜库在使用搜索功能时搜索不到任何数据,分析后台代码搜索功能是使用URL来实现:<br />http://Host/Database/ViewName/[$SearchForm]?SearchView[ArgumentList]<br />其中重要的是拼接ArgumentList的Query。<br />一、排查问题:<br />1、输入“测试”后,点击“搜索”URL链接中的Query参数为“(测试) and (field fldDocumentauthors conta

神灵的专栏 1019

在Domino中如何为一些特定的邮箱数据库更新设计

Technote (troubleshooting) 问题 用户在对邮箱模版进行更改后,需要对所有的或是部分邮箱数据库进行更新设计。使用load design将会对所有的此服务器上的所有数据库进行刷新设计,而不只是针对特定的数据库。那么,怎样才能为一些特定的邮箱数据库更新设计呢? 解决问题 [标题] 使用文件转换工具配合相应的参数可以实现不同的功能,Convert 命令的

Gavid0124的专栏 2190

Domino开发

Domino 简单功能实现 %REM Sub util Description: Comments for Sub %END REM Sub util %REM '模糊查询1 默认查询所有 str1 = "@Contains(name;'"+searchTxt+"')" Set docs = db.Search(str1, NOTHING, 0) Dim tmpdoc As...

孬蛋的博客 752

Domino Web引擎最大搜索结果数设置方法

打开names数据库--配置--服务器--所有服务器文档,选择需要设置的服务器文档打开。Internet Protocol标签--Domino Web引擎标签--转换/显示区块--最大搜索结果数,默认是1000,可以调整为10000或更多。【用法】:Domino Web应用中使用URL命令SearchSite, SearchView和SearchDomain时,可带参数SearchMax=[n],n为最大返回结果数,如果没有指定n,则由以上服务器文档设置决定最大返回结果数。

qinchua08的专栏 939

Java中访问Domino的问题

因为做的是EAI的项目,要集成原来的Domino应用,有一个修改Domino的需求,因为以前没有找到合适的方法,就对names.nsf数据库遍历了一遍用户,找到匹配的用户再修改,本来连接Domino就很慢,这样一来就更慢了,1155个用户光遍历一遍就用了2分多钟,后来一个同事找到一个方法,改完之后,竟然只用5秒钟就一切都搞定了: int i = view.FTSearch("文件名", 3);

Tina Salangane's Blog -Study Word 944

我和domino不得不说的故事(连载2016-3-2)

1、关于NotesViewEntry 注意:通过NotesViewEntry获取某列的值时,若该列的值为@IsExpandableor@DocNumber或者是常量时,将不会显示。 Setentry=view.GetEntryByKey("Sportscar",False)Messageboxentry.ColumnValues(0),,...

377

45. NotesViewNavigator用途之二——获取列表字段的选项

NotesViewNavigator在Notes对象里常常被忽视,平常的开发实践中似乎只需要NotesView,NotesDocument最多加上NotesViewEntry的组合就够了。不过,有些场合它却可以发挥难以替代的作用。在23. 在LotusScript中利用视图的合计功能求和里我们已经看到一个例子,这里继续说明另一个实例。 联动菜单,一个列表框(姑且称为二级列表框)的选项跟随另一...

我是传奇 254
下一篇: http中get和post的方法
java_jane
博客等级 码龄12年 102粉丝 74原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值