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

February 2012

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      

Archives

Powered by Movable Type 4.34-en

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.