Monday, September 13, 2010

Best app for Android!

So the best app I have found for Android phones is Juice Defender ( ). I know, goofy name but this thing really works! The interface isn't the greatest but it will extend the life of your battery.

Juice Defender can control the amount of background data that is being transfered and select apps that you want to stay connected. This is all customizable and I can go an entire day without charging under moderate phone usage. There is a free version and a pay version. I highly recommend trying it.

Lotus Script to check if a server is available

After searching through the Lotus Notes forums and blogs looking for code to determine if a server was up or not I figured out a good solution. Some of the examples I found use a template or database to check if the server is up. However there might be that chance that the template file is corrupt or missing. So here is a code snippet using the NotesDBDirectory class:

Function checkServerAvailability( ) As Boolean
' this function will check if a server is available from a user's client
On Error GoTo errorfound

Dim session As New NotesSession
Dim db As NotesDatabase
Dim dirdb As NotesDbDirectory
Dim ServerName As String

ServerName = InputBox("Enter the server name to check")

' assign database directory to dirdb variable
Set dirdb = session.GetDbDirectory(ServerName)

' grab the first database from the directory
' this line will throw the error if the server cannot be accessed
Set db = dirdb.GetFirstDatabase( DATABASE )

msgbox "Server " & Servername & " found"

checkServerAvailability = True

Exit Function

' since server is not found, return false with debug string
msgbox "Error" & Str(Err) & ": " & Error$

Exit Function

End Function