Archive for Декабрь 4th, 2008
Immediate If
Function IIf (condition As Variant, trueCondition As Variant, falseCondition As Variant) As Variant
‘ such a basic function for all other programming languages … stands for "Immediate IF"
‘ posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/328BED8C4AB8E446862574EF0068734A
‘ written by Mike Mortin
If condition Then
If Isobject(TrueCondition) Then
Set IIf = trueCondition
Else
IIf = trueCondition
End If
Else
If Isobject(TrueCondition) Then
Set IIf = falseCondition
Else
IIf = falseCondition
End If
End If
End Function
Original source : http://www.openntf.org/projects/codebin/codebin.ns…
Get all the servers in a cluster
Function GetClusterServers(server As String, getAllServers As Boolean) As Variant
‘ returns a list of servers in cluster, given one server
‘ posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/71497FFD8E4531A7862574EF006567C5
‘ written by Mike Mortin 20081027 Dim s As New NotesSession
Dim cluster As String
Dim serverDoc As NotesDocument
Dim serverName As NotesName
Dim key(1 To 1) As Variant
Dim navDoc As NotesViewEntry
Dim nav As NotesViewNavigator ‘ define domain and name as per the default "Servers" view
Set serverName = New NotesName(server)
key(1) = serverName.Canonical
Set serverDoc = GetDocFromDb(s.CurrentDatabase, "($Servers)", key, True) ‘ get a list of servers in the same cluster
cluster = serverDoc.ClusterName(0) If cluster = "" Then
‘ if there is no cluster
GetClusterServers = Iif(getAllServers, serverName.Abbreviated, Null)
Else
‘ grab all server documents in the cluster
Set nav = GetCategoryDocsFromDb(currentDb, "Clusters", cluster) ‘ go through the category, add names to replica list, skip the submitted server if requested
Set navDoc = nav.GetFirstDocument()
While Not navDoc Is Nothing
Set serverDoc = navDoc.Document
If serverDoc.ServerName(0) <> server Or getAllServers Then
Set serverName = New NotesName(serverDoc.ServerName(0))
GetClusterServers = GetClusterServers & serverName.Abbreviated & ","
End If
Set navDoc = nav.GetNextDocument(navDoc)
Wend
End If ‘ tighten up the list
GetClusterServers = Split(GetClusterServers, ",")
GetClusterServers = Fulltrim(GetClusterServers)
End Function
Original source : http://www.openntf.org/projects/codebin/codebin.ns…
Five Domino domain default server settings you should change and why
In this article, Lotus Notes Domino expert Andy Pedisich gives five default settings in your Domino domain that you should change, including the Message Recall setting and the ‘use more secure Internet Passwords’ setting. Modifying these settings will improve server performance, enhance Domino security and will give you tighter control of your Domino domain.
Original source : http://feeds.feedburner.com/~r/techtarget/Searchdo…
Using Formula language code to sort Lotus Notes messages by subject
Lotus Notes will sort messages by Date, Sender and Subject with prefixes such as Re: and Fwd:. This Formula language code will customize your All documents view by stripping out prefixes to easily sort Lotus Notes messages by subject alone.
Original source : http://feeds.feedburner.com/~r/techtarget/Searchdo…
Google Adds HTTPS Support to the Ajax Libraries API
Original source : http://blog.httpwatch.com/2008/11/27/google-adds-h…
When generated JavaScript goes wild; JavaScript WTF in SharePoint
Original source : http://ajaxian.com/archives/when-generated-javascr…
Avoid save-conflicts in web applications
Original source : http://dontpanic82.blogspot.com/2008/11/avoid-save…