May 2007 Archives

LotusScript & UML

lssuml.jpg
It's also find out from OpenNTF, OpenDOM, collected packages of Interfaces & Abstract Classes, like Notes C API, etc..
You could see UML class diagram in this reference database.
The author web site is OpenDOM.
In his blog, he recommended the redbook of IBM, Performance Considerations for Domino Applications, especially for Dynamic Script Library Loading.

Notes Document Maintenance Tool

Notes Document Maintenance Tool.jpg
There is a great tool for modify notes documents without write any agent code.
From: OpenNTF
Author: Ferhat Ikbal

Regular Expressions in LotusScript

From Lotus Sandbox, by David M Phillips.
This regular expressions in LotusScript using the VBScript RegExp object.
Example:

Dim re As New RegExp

' Pattern matching defaults to case sensitive.
Dim test As Boolean
test = re.Test ("ABC", "b")
Msgbox "'ABC' contains 'b' (case sensitive) = " & test
re.IgnoreCase = True
test = re.Test ("ABC", "b")
Msgbox "'ABC' contains 'b' (case insensitive) = " & test

' Match returns success indication.
test = re.Match ("xyz", "a")
Msgbox "'xyz' has a match for 'a' = " & test

' Global defaults to False; = return first match only.
Dim count As Integer
test = re.Match ("them these theirs", "e")
' Match returns successful matches as a collection property.
count = re.matches.count
Msgbox "'them these theirs' with Global = false matches 'e' " & count & " time."

' Global defaults to True; = return All match.
re.Global = True
test = re.Match ("them these theirs", "e")
' Match returns successful matches as a collection property.
count = re.matches.count
Msgbox "'them these theirs' with Global = false matches 'e' " & count & " time."

re.Global = True
test = re.Match ("them these theirs", "the[a-z]+")
Dim position As Integer
Dim length As Integer
Dim s As String
Dim msg As String
Forall m In re.matches
position = m.FirstIndex ' zero-based
length = m.Length
s = m.Value
msg = msg & "Match at position " & position & ". " & length & " character string = " & s & Chr (10)
End Forall
Msgbox msg

' Replaces returns source string with any successful replacement.
s = re.Replaces (s, "([a-z]*)\W(\w*)\s(\S*)", "$3 $2 $1")
Msgbox "Change 'them these theirs' to '" & s & "'."


But, also could use Java, "java.util.regex" package.
Script Library:
import java.util.regex.*;

public class regex {
public boolean check(String patten, String input){
return Pattern.matches(patten, input);
}
}

Sub Click(Source As Button)
Dim js As JAVASESSION
Dim regexClass As JAVACLASS
Dim regexObject As JavaObject
Set js = New JAVASESSION
Set regexClass = js.GetClass("regex")
Set regexObject = regexClass.CreateObject
Msgbox regexObject.check("^[A-Za-z]+$", "00")
End Sub

For more information, see the following:
* VBScript RegExp object properties and methods
Sun Java tutorial: Regular Expressions

AS400 iSeries Access Port Number

TCP:449 & 8471~8479

WMI Restart Matlab Web Server

Set ServiceSet = GetObject("winmgmts:").ExecQuery("select * from Win32_Service where Name='matlabserver'")
intSleep = 5000

for each Service in ServiceSet
Service.StopService()
WSCript.Sleep intSleep
Service.StartService()
next

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Archives

Powered by Movable Type 4.34-en

Recent Comments

  • panandy: 3Q read more
  • Anonymous: philipz大 沒有邀請碼,無法註冊,致無法下載工具 請問有何方法可以解決? 感恩 read more
  • philipz: harushard, It is your java code problem. Check it and read more
  • harushard: java.lang.NoClassDefFoundError: Could not initialize class examples.ExamplesMCRFactory could you explain why read more
  • philipz: IM已經是無解了,建議可以用Plurk Api試看看。 read more
  • ann: hi,請問以上問題解決了沒?可以分享一下嗎? read more
  • Anonymous: 邀請碼沒有~無法下載工具~~怎麼辦 read more
  • Melody: test read more
  • philipz: Ginger: 您好,請您在我的噗浪上留言即可一起討論。 read more
  • Ginger: 版大您好: 在看過您做的期貨即時訊息BOT後覺得很不錯,自己也有一些想法不知能否與您交流與協助呢? 若您覺得ok的話,可以email或是噗浪(ID: king0355)與我聯繫。感謝 : ) read more

About this Archive

This page is an archive of entries from May 2007 listed from newest to oldest.

April 2007 is the previous archive.

June 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.