May 31, 2007

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.

Posted by philipz at 01:27 AM | Comments (0)

May 29, 2007

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

Posted by philipz at 04:01 PM | Comments (0)

May 14, 2007

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

Posted by philipz at 02:12 AM | Comments (0)

May 09, 2007

AS400 iSeries Access Port Number

TCP:449 & 8471~8479

Posted by philipz at 03:40 PM | Comments (0)

May 07, 2007

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

Posted by philipz at 03:36 PM | Comments (0)