December 17, 2007

Second Life References

Soon, Ekakan will make it public on our new virtual land and office in Second Life. We will be there in person as a company with some cool features and functions as well. Stay tuned!

This blog post will function as a references page for Second Life which, like the other reference pages for Lotus Notes/Domino and Java, is constantly updated.

General:

Development
Articles:
Tutorials:
Other:




Technorati tags:
, , ,


December 12, 2007

When "Recompile All LotusScript" returns an error

Recompiling all lotussript for a database returned an error today:
"<form name>: LotusScript Error - Syntax Error"

Good thing it did, but it would have been helpful knowing what was wrong. I got no hint at all other than the form name. So I looked at the modification date and by who a change was last made and tried to find the most probable change request. Still its not easy if the form is big with a lot of scripts tied to it.

I opened query save, removed a bunch of code and tried to save and there it was. The other day I had copied over a small table with some fields from another form and forgot about two buttons which were making calls to functions in a script library. This script library was not declared in Options with Use "scriptlib", but no error was raised when saving until now that is. I decided to copy the functions into another script library that was used in this form, modified them slightly and everything worked and went back to normal.

While searching for this on developerWorks I found another probable cause which might be good to know about. When defining a public class in Lotusscript named 'Picture' it can be saved without errors, but when running "Recompile All Lotusscript" the same error occurs.

Technorati tags:
, ,


December 06, 2007

Book recommendation for SCJP 5.0

It's time for a new book recommendation from me. In May earlier this year I recommended the book "Head First JAVA". I finished the book two months ago or so. The book stayed being excellent through the end and it's time for the next step in my mission to be a Java God ;-)

To really understand and remember everything I have combined my theoretical knowledge with practical work in the Domino environment as well as outside in Eclipse since experience is invaluable in the learning cycle. Of course I have oceans of information and experience to learn and teach but we all have to start somewhere.

So this mission must include a certification and therefore the natural choice for me had to be a preparation book for the certification test. I want to be a certified programmer for Java 5 so what would be better than reading a book named "Sun Certified Programmer for Java 5" with the same authors (Kathy Sierra and Bert Bates) as the previously recommended book? The book is really thick and is good exercize for my muscles carrying it around to and from work. Oh, and it is good reading as well. I have completed a chapter now and I am impressed as before. It has excellent coverage of all parts for the certification exam with tips and tricks, exercises and so on in a very structured way. It not only learns what to study but also how.

So go ahead and get this one if you want what I want. Read more on Google book search.

An interesting topic post from 2004 - Does Java certification matter?

Technorati tags:
, , , ,


December 01, 2007

Slow database performance

A database with slow performance can be caused by a lot of reasons. My last two cases were probably due to readers fields and deletion stubs.

If you have a slow view with a lot of documents in it, check if the documents have readers fields, it's a common cause and there are several suggested actions to take. If the user accessing the view only has access to a small part of all the documents it will render very slowly. A page (memory unit) will be read into memory consisting of approximately 300 documents. When scrolling down the view it will be recalculated. If you have access to all documents it will render pretty much as usual.

The other day I was troubleshooting a database which was slow to open with slow views. It had a view that it took about 2 minutes to open. The database had 50.000 documents and 129 views and this and several other views used readers fields so I figured that would be the problem.
I copied the database with all documents and accessed it with the same user and they behaved very differently. The same view that took about 2 minutes to open in the original database was opened in about 5 seconds in the copy. The only difference was the size of the database. The original was about 990MB and the copy started at 108MB.

So I figured that would be due to view indexes. An it probabaly were to some point but together with the view index it turned out that deletion stubs were part of it.

Five days a week, on each day, approximately 40.000 documents was deleted an new ones were created from an excel file (this was an old solution to update them). The purge interval was set to 120 days. So this means that there were about 40.000 * 88 (only weekdays) = 3.520.000 deletion stubs in the database. Since a deletion stub is about 100 bytes (at least it was in version 6) it means that the they used approximately 352MB of the space and the database consisted of a minimum of 352MB of deletion stubs although the count is more impressive.

The number of deletion stubs probably together with a corrupt view index caused the database to perform very slow. Fixup and Updall took a very long time as well and had to be aborted.

A copy of the database solved the problem but a long-term solution is of course to recode the agent to update the documents instead of replacing them and to make the purge interval more frequent.


Technorati tags:
,,, ,


October 31, 2007

Problem printing rich text fields

If you have a rich text field that contains a fair amount of information it will print nicely, but when it exceeds a certain amount of information each text paragraph will be printed on a separate page which causes a printout that normally would be of two pages to turn up on 40-50 pages. Really annoying and a waste of trees!

The solution to this problem is to enclose the rich text field in a table which compresses the content in the rich text field and prints nicely.

While testing, look at the print preview which shows the same result as the actual printing.

Technorati tags:
, , , ,


October 23, 2007

Prevent pasting documents into a view

Short tip today!
If you want to prevent documents from being pasted into a view, click on section 'Querypaste' for the view and type Continue=False in the sub routine.


Technorati tags:
, , ,


October 18, 2007

Print selected documents and attachments from a view

I have been trying to figure out how to print a document and its attachments when marking it in a view. A colleague had an agent which did the works as long as the attachments only are word documents. But if you don't know if it is a word, pdf, rtf, jpg or any other attachment the code gets long, uggly and still you proabably haven't covered all possible cases. I have however found a solution thanx to Charles Robinson who shows how to shell a windows application to open the attachments.

I have used my existing code with this one and the result is an agent that can run on selected documents in a view, print the documents and each document's attachments. It is run through a view action.

The code is not ultimate at all and there are still some minor problems left like when no application gets associated with the attached file nothing is printed out and that acrobat reader doesn't close when done. Probably fixable, but I am satisfied for now.

As you can see below I have used a sleep command. This might have to be adjusted depending on many different things, but it is needed or else the documents and attachments competes who gets to the printer first and everything is unsorted.

Here's the code. Hope someone can enjoy it!

In Options add Uselsx "*lsxlc"

In Declarations add Charles Robinsons code:

Const SEE_MASK_NOCLOSEPROCESS = &H40
Const SEE_MASK_FLAG_NO_UI = &H400

Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type

Declare Function ShellExecuteEx Lib "shell32.dll"_
Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long

Declare Function TerminateProcess Lib "kernel32"_
Alias "TerminateProcess" (Byval hProcess As Long, Byval uExitCode As Long) As Long


In Initialize add the following code:

On Error Goto ErrorHandler

Dim SEI As SHELLEXECUTEINFO

SEI.cbSize = Len(SEI)
SEI.fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_FLAG_NO_UI
SEI.lpVerb = "print"
SEI.nShow = 1
SEI.hInstApp = 0
SEI.lpIDList = 0

Dim s As New NotesSession
Dim session As New LCSession
Dim db As NotesDatabase
Dim object As NotesEmbeddedObject
Dim dc As NotesDocumentCollection

Dim doc As NotesDocument
Dim downloadfolder As String

Dim extrachar As String
Dim filecounter As Integer
Dim filecount As Integer
Dim filen As Variant
Dim antalfiler As Variant

Dim i As Integer, x As Integer, y As Integer

Dim sFile As String

Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim success As Variant

' Create a folder for temporary storage of files
downloadfolder = Environ("tmp")

Set db = s.CurrentDatabase

Set dc = db.UnprocessedDocuments

For i = 1 To dc.Count
Set doc = dc.GetNthDocument( i )

' Print document
Set uidoc = ws.EditDocument( False , doc , True , )
Call uidoc.Print(1)

' Get all attachments and print them
filen=Evaluate("@AttachmentNames",doc)
antalfiler=Evaluate("@Attachments", doc)

Call uidoc.Close
Delete uidoc

If antalfiler(0)>0 Then
For filecounter=0 To antalfiler(0)-1
x=x+1
Set Object = doc.GetAttachment( filen(filecounter) )
If ( object.Type = EMBED_ATTACHMENT ) Then
fileCount = fileCount + 1
If Dir(downloadfolder+"\"+ filen(filecounter))="" Then
extrachar=""
Else
' Extra character in case there are attachments with the same name
extrachar=Left(doc.universalid,4)+"___"
End If
Call object.ExtractFile (downloadfolder+"\"+extrachar+ filen(filecounter) )
End If
Next filecounter
End If

For y = 0 To filecounter-1
sFile = downloadfolder+"\"+extrachar+ filen(y)
SEI.lpFile = sFile
Call ShellExecuteEx(SEI)
Call session.Sleep(2000)
Next

' Delete all files
Call session.Sleep(5000)
For y = 0 To filecounter-1
sFile = downloadfolder+"\"+extrachar+ filen(y)
Kill sFile
Next

'Call TerminateProcess(SEI.hProcess, 0)

Next

Exit Sub

ErrorHandler:
msgbox Error$ & " on line " & Cstr(Erl) & " in " & Lsi_info(12)
Exit Sub




Technorati tags:
, , ,


October 13, 2007

Java references

I decided to create a Java references page as well (see Lotus N/D references for Lotus Notes/Domino and Sametime references) for my own use and possibly for someone else as well. Feel free to leave comments if you have suggestions to other reference pages and I will update this page.
Below is some of what I have come across so far.

Tutorials/References/APIs/Examples:

Java conventions:
Tools/plug-ins for Java conventions:
Certification preparation:
Java and Lotus Notes/Domino:
Java exceptions:
Eclipse:
Books:
Other:


Technorati tags:
, , , , ,


October 12, 2007

Conventions for Java code

I like the structure with Java. Although you can create structure with any language it somehow feels as it comes with Java, so it feels easier to accomplish and is kind of satisfying (in a really geeky way). So included in my personal project to be a kick-ass java developer (;-) I am also aiming towards writing nice, readable code that is based on predefined code conventions and guidelines both for the programming part but also for commenting.

You might have heard that really good written code doesn't need commenting. Maybe that's a bit exaggerated but in some sense true. If all variables, methods, classes and so on are named after specific conventions they will be more readable to you and other programmers that might inherit your code some day.

Take a look at the conventions for coding and commenting here:




Technorati tags:
, , , ,


October 11, 2007

XHTML Character Entity Reference

For all of the web developers out there. Here's an Ajax-based structured reference tool for XHTML Character entities. It lists the allowed entities in HTML 4 and XHTML 1.0 as outlined by W3C.

Seems like it could be of good use at occasions!


Technorati tags:
, ,


October 03, 2007

Get started with Dojo

Did you know that you could do this on any web page and fairly quickly? All you need to do is to access some javascript source files and add your own pictures. I might add the fisheye example to this blog later when I have more time.

With Dojo someone else has done the work for you to use for free and it works in any browser (or at least the most common ones).

I am currently looking into dojo and playing with it and I really like the way it's heading. An API (0.4.2) already exists much like Java's although they can't really be compared since the documentation certainly could be better with examples and references and it takes quite a lot of time to understand what to do with the objects if you're new to the toolkit. A really good thing is that you, as in Java, can choose what to include in your webpage. That is you don't have to import the entire library but only for example the widget functionality (dojo.widget.*).

Follow the link to dojo below to get started with several good tutorials and examples. But just to mention it, all you need to do is to download a zip-file and extract it to your file system. Then create a html-file, include dojo javascript source files and you're up and running.

Further on, and this is really interesting, there is a rumour that says that Dojo will be installed by default on the next version of Domino. Now if that's going to happen or not, I don't know, but it certainly gives me another reason to start looking at this.

If anyone knows any other good references or examples that you recommend please leave a comment.




Technorati tags:
, , ,


September 27, 2007

4n0th3r gr8 g33k d8

Well, I had no doubt about if this was going to be a good one or not, but just to be clear, it was!

This tuesday we had our second g33k date and approximately 30 developers, both customers and partners and actually an IBM:er ;-) showed up to listen to Viktor Krantz and Troy Reimer from Snapps talking about Quickr, dojo, JSON and other stuff. They showed us demos and really good code examples as well.

I have been looking more into the dojo toolkit that Viktor brought up during their presentation and it really fascinates me. It is SO easy to do cool stuff (depending on what you want to do and your level of skills of course). I can't believe I have avoided it before (not intentially though). Viktor explained to us about the pros of dojo and that it most likely will be part of next release of Domino as well, which makes it even more interesting.
Troy seems to be the king of coding structure and commenting just to mention something. A closer look at a lotusscript agent he made was a beautiful sight and I have learned a lot from that too. Thank's a lot guys for a great evening!

Besides this excellent show, we all had the privilege to meet each other and discuss those geeky things we like so much. Can't wait for next time!

Just before and in the beginning of the meeting I got a chance to very shortly show Ekakan's office that I have built in Second Life. I explained a little about what second life is, the purpose, how to build stuff, scripting and business ideas and I hope I am not the only one seeing the opportunities that lies here.

If you are interested in more info about Viktor and Troy, I described that in a recent post that you can read more about here.

And as a last thing I recorded a little piece of video where Viktor talks about Dojo. It's of a horrible quality but you can at least probably here something.


Technorati tags:
, , , , , ,


September 10, 2007

New ODS for Domino 8

The ODS (On Disk Structure) has changed for Domino from ODS 43 to ODS 48. It is not turned on by default though. Add this new notes.ini parameter to either the Domino server or the client and every new application you create will be with the new ODS version:

Create_R8_Databases=1


Upgrade existing databases to ODS 48 by using the notes.ini parameter and perform a copy-style compact (Load Compact -c).

Read more on this technote and on Chris Whisonant's blog who also writes about design compression.

Vince Schuurman writes about compression problems which is caused by the fact that encryption is enabled by default in Domino 8 (which can be read in the comments by Chris Whisonant).


Technorati tags:
, , ,


August 30, 2007

September G33K

* UPDATE *
Date for september g33k has been changed to the 25th of september



In may 24th earlier this year the first g33k date took off for which the expectations were set high and which also ended up very successfully. Another g33k meeting has been planned for september 25th and you wouldn't want to miss it!!!

This time Viktor Krantz and Troy Reimer from Snapps (US) are keynote speakers and will talk about the relatively new product Quickr and other things I'm sure. Snapps is the official IBM Design Partner for Quickplace (Quickr) and has produced high-quality, free Quickplace and Quickr templates. For the interested you can find templates for Quickplace 7 here and Lotus Quickr 8 templates at QuickrTemplates.com. Snapps are also co-producers of Collaboration University and let's not forget to mention Rob Novak's and Viktor Krantz's very popular session 'The great code giveaway' which is held every year at Lotusphere.

This is a great opportunity to meet other developers working with Lotus Notes/Domino, Java, web etc. and I assure you it will be both instructive, fun and beerish in a comfortable mixture that especially g33ks like us appreciate ;-)

The time for the meeting is set to 06:00 PM and will be held in the center of Stockholm, Sweden also this time at Ekakan's premises. Check here for more details and the latest information.

Sign up here in a comment or send a mail if you would like to join us!


Technorati tags:
, , , ,


August 29, 2007

Notes/Domino 8 preparation test are out

IBM Lotus Notes/Domino 8 certification preparation tests from CertFX are out:




Technorati tags:
, , ,


August 27, 2007

Java 5 in Notes 8

Java 5 (Tiger) is included in Notes 8. N/D 8 is backwards compatible though and defaults to earlier API. To make use of the new Java API when writing source code directly in the Notes client some adjustments are needed.

Add the following line to Notes.ini and restart notes:

javaCompilerTarget=1.5

Got this tip from Mikkel Heisterberg on lekkimworld.com.



Technorati tags:
, , ,


August 20, 2007

"That's not a bug that's a feature"


feature, originally uploaded by dratz.


August 16, 2007

Developing Java for Domino in Eclipse

I try to develop all agents and script libraries in Java rather than lotusscript nowadays. The notes java (from the lotus.domino library) covers many of the functions that lotusscript offers and besides that you have the whole Java library itself which many times makes it more powerful than lotusscript.

The notes client is not the best Java editor though. The type ahead functionality is not there as it is for lotusscript and the lack of color coding makes the code a bit difficult to read. Once you have tried to develop Java using Eclipse you get spoiled and it really is a great thing to be able to develop java applications (like agents and script libraries) for Domino in the Eclipse client.

Here's how to do it:
- Assuming you have a functional Eclipse client, create a new project (for example 'Notes Java') and open the properties for that project.
- Click on 'Java Build Path'
- Click on tab 'Libraries' and press button 'Add External JARs'
- Find 'Notes.jar' and click on open to add the special notes java classes to the build path, which makes it possible to use them in the Eclipse client. (I have the notes 7 client installed and the path was 'C:\Program\lotus\notes\jvm\lib\ext\Notes.jar')



- Create a package in the project and under the package create a class called for example 'JavaAgent'.
- Change 'Superclass' to 'lotus.domino.AgentBase'.



- Now start writing Java code in the Eclipse client as you normally would in the notes client. Copy and paste the skeleton code that always comes with a new java agent. Here's a test agent that uses a notes view to loop through all documents and prints a field value for each document.

package com.ekakan.NotesJava.agents;
import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();

AgentContext agentContext = session.getAgentContext();

Database db = agentContext.getCurrentDatabase();
View view = db.getView("actions");
Document doc = view.getFirstDocument();

while (doc != null) {
if (doc.isValid()) {
System.out.println(doc.getItemValueString("action"));
}
doc = view.getNextDocument(doc);

}

} catch(Exception e) {
e.printStackTrace();

}
}
}


- To run the code, first compile it in the Eclipse client to create a class-file, i.e. 'JavaAgent.class'.
- Import the class file to a new notes agent using the 'Imported Java' option.



- Save and use in what way you would like to. Whenever a change is made to the java file in the eclipse client the class file has to be imported into the notes client again of course.
- Another option instead of importing the class file is simply to copy and paste the code from eclipse to notes.

One thing that you might come across when trying to run the agent in the notes client is an unpleasant error message on the Java console saying something like this:

java.lang.UnsupportedClassVersionError: Unsupported major.minor version 49.0

This means that the JDK used to compile with is of a newer version than the version that the application is running against. Which in this case means that your Eclipse proabably uses version 5.0 or 6.0 while Notes uses 1.4. Check on the Domino console for the JVM version running using the command 'Show JVM'.
In Eclipse, open the properties for the project and click on 'Java Compiler'. In the JDK section, set the correct compiler compliance level, in this case 1.4.





Technorati tags:
, , ,


August 14, 2007

Gmail Toolbox

Mashable has listed the Gmail toolbox with over 60 tools for your Gmail.

A must for Google lovers!


Technorati tags:
, ,


August 13, 2007

Fun on YouTube!

This is hilarious!



And this is just so finnish ;-)



Thanks to my good friends Pär and Kristian for this!

Technorati tags:
, , ,


August 06, 2007

Evaluate in Java

Something I didn't know is that the evaluate function that is used in lotusscript to take advantage of the power of formulas also can be used in Java agents or script libraries in the notes client. There is a slight difference though:

Here's how it's used in Lotusscript. An array of strings is returned:
strArray=Evaluate(|@Unique(@DbColumn("":"ReCache"; "":""; "summaries"; 1))|)

In Java you make use of the session object to get the evaluate function. A vector is returned. Note that you replace the pipes (|) with (").
Vector v=session.evaluate("@Unique(@DbColumn('':'ReCache'; '':''; 'summaries'; 1))");

To loop through the vector and use the values as strings, do something like this:
for (int i=0; i<v.size(); i++) {
System.out.println(v.elementAt(i));
}


Read more and see examples of the evaluate function on notessidan.

Technorati tags:
, , ,


July 27, 2007

About mail.box

Sometimes it is desirable to put mail messages directly into the mail box on the server. If the server has one mail box it is called mail.box. But as you might know it is possible to create several mail boxes to increase performance if lots of mail are running through the system. Be cautious here though, 18 mail boxes is not a good alternative but 2, 3 or 4 might really help. Anyway, when telling the server to create several mail boxes the database mail.box will disappear and instead new mail boxes will be created called mail1.box, mail2.box and so on.

Now, if your application wants to create a mail in mail.box based on some form you probably would like to hard code the name of the database, that is mail.box. But what if the server has several mail boxes? No worries, don't change a thing. You still type mail.box and the server/router will put the mail in the mail box which is mostly available at the time.

It might be good to know that this is not supported officially though.

Here's where you change how many mail boxes to use. The command "Tell Router Update Config" should make the changes take effect immediately or you could just wait 5 minutes.



And here's a code strip as an example of how to put mail directly in mail.box.

Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim serverName As String
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rtitemA As NotesRichTextItem
Dim rtitemB As NotesRichTextItem

Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument

serverName = db.Server
Dim mailBoxDb As New NotesDatabase(serverName, "mail.box")
Dim mailDoc As NotesDocument
Set doc = uidoc.Document

Set mailDoc = New NotesDocument(mailBoxDb)
Call mailDoc.AppendItemValue("Form", "Memo")
Call mailDoc.AppendItemValue("From", uidoc.FieldGetText("From"))
Call mailDoc.AppendItemValue("SendFrom", uidoc.FieldGetText("From"))
Call mailDoc.AppendItemValue("Principal", uidoc.FieldGetText("Principal"))
Call mailDoc.AppendItemValue("SendTo", uidoc.FieldGetText("SendTo"))
Call mailDoc.AppendItemValue("Recipients", uidoc.FieldGetText("SendTo"))
Call mailDoc.AppendItemValue("ReplyTo", uidoc.FieldGetText("ReplyTo"))'
Call mailDoc.AppendItemValue("Subject", uidoc.FieldGetText("Subject"))

Set rtitemA = New notesrichtextitem(mailDoc, "Body")
Set rtitemB = doc.GetFirstItem("messageBody")

Call rtitemA.AddNewline(1)
Call rtItemA.AppendRTItem(rtitemB)

Call mailDoc.Save(True, False)



Technorati tags:
, ,


July 09, 2007

Good reading today

Web developer links:

And some other useful and interesting stuff:
Technorati tags:
, ,


July 01, 2007

Ekakans office in SL is getting its first shapes

I have started to build an office for Ekakan in Second Life and well... you have to start somewhere ;-)
Here's what it looks like at this very moment. I/we have great plans, ideas and thoughts for this. Although Ekakan doesn't yet have it's own place in SL, it will soon be for real and I'll let you know when that happens.

The idea is to be visible, to show the company and its competence in yet another medium. Maybe to be able to talk to the consultants the avatar way, read curriculum vitaes (resumes) and hire consultants. There are also plans to offer different types of tips and tricks and to be able to assist in different ways. The place to go to when you need to kill twenty minutes or help with techie questions and issues.

Come to the IBM Sandbox and I will give you the grand tour ;-) (if I'm currently there).


View from outside


Inside the office. Photos of some of the employees on the wall which show short presentations when touched.


There's also a window to lighten up the place and coloured sofas.



Technorati tags:
,


June 30, 2007

LSL-script for a Second Life football

I have been looking into the Linden Script Language (LSL) to be able to do more cool stuff within Second Life.

Here's a small script for a football. The ball can be kicked by just walking against it. Touching it causes the ball to bounce up in the air a couple of feet. You can also talk to it by saying "kick" which causes the ball to move with a certain vector strength and direction. "High kick" makes the ball going forward up in the air.

default {
state_entry () {

llListen (0, "", "","");
// Make sure that Physical is turned on
llSetStatus (1, TRUE);
}

collision_start (integer total_number) {

// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);

// Force the z coordinate up
diff.z = .1;


// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*5;

// Apply the kick vector to the ball

llApplyImpulse(kick_vector, FALSE);
}

listen (integer channel, string name, key id, string message) {
if (message == "kick") {

// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);

// Force the z coordinate up
diff.z = .1;

// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*10;


// Apply the kick vector to the ball
llApplyImpulse(kick_vector, FALSE);
}
else if (message == "high kick") {
// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);


// Set the z-coordinate high up
diff.z =500;


// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*25;

// Apply the kick vector to the ball

llApplyImpulse(kick_vector, FALSE);
}
}

touch_start (integer total_number) {
// Create a manual kick vector where only the z-coordinate has a value separate from zero
vector kick_vector = <0.0,0.0,0.0>;

// Apply the kick vector to the ball
llApplyImpulse(kick_vector, FALSE);
}
}


Copy/type the script into the script editor pane when creating/replacing a new script for an object. Remember you have to be in a place where scripting is allowed to modify it and see the changes in action. Second Sweden allows it and there are many more places.
























Here are a couple of reference pages to get you started:

- This article is good to get you started. I have taken some lines of code from here.
- LSL Portal
- Second Life Tutorials

Technorati tags:
, , , ,


June 14, 2007

My first iGoogle Gadget

*** UPDATE ***
I have updated and improved the Gadget some. It got better looking design and also a new view of the latest content from developerWorks, which is also default. If you added the last one, please update!
*** *** *** *** ***

I was inspired by the iGoogle Gadget that Thomas Adrian made.
You've heard of Google Maps. Now Google Gadgets are getting more popular. And as if that's not enough Google Mapplets are coming as well, which is Google Gadgets that can manipulate a map using the Google Maps API. This is cool!

This is my gadget showing the developerWorks technical library views. Default is Lotus, but you can change that to any of the other views and whether you want to see the summary and how many entries you'd like to see. I have uploaded it to the content directory, where you can get more cool gadgets for your iGoogle.



Technorati tags:
, , ,


June 13, 2007

Domino Designer in Eclipse

If you have tried Eclipse for regular Java programming you know how comfortable it is to work with. As you might know there will be a Domino Designer in Eclipse released sometime in the future and Maureen Leland has posted a couple of screenshots on the new progress on this project. Especially the Java editor is beautiful ;-)



Technorati tags:
, , ,


June 06, 2007

Summary of Lotus Nordic Meeting



Yesterday the Nordic Lotus Meeting was held in Second Life. Thomas "notessidan" Adrian hosted the meeting and although the number of attendees weren't that impressive (approximately 15?) it was in my opinion successful. It was a mix of people from different Nordic countries such as Sweden, Denmark and Norway and with different Lotus skills and experience with Second Life.

The discussions were mainly about Second Life and only brief about Lotus products at this first meeting. Notessidan showed us the stage that he had built for the location and also his Second Life office. We were all impressed and at least I got a bit excited about the possibilities that I can imagine when seing what can be done and when talking to all this people that were there.
We are building relations that seamlessly spans over countries, cultures and different humans with a variety of skillsets.

I can see a small problem with these meetings though that needs some improvement. Although there is an agenda it always turn out to be a slight chaos. People talk at the same time which causes some questions to be mistakenly ignored, someone starts building a big sphere or someone decides to pick up a giant aircraft from their inventory or suddenly someone starts dancing. All this causes some distraction which is completely understandable. Who wouldn't be if it took place in real life?

This is not at all wrong, it is rather amusing and funny actually but when it comes to the point when you would like to have productive and efficient meetings with results something has to be done.

Maybe some sort of guidelines needs to be written for meetings with an intended agenda on how to act to get the results wished for? What do you think?


Some snapshots from the event:


Thomas Adrian, Johan Känngård and me are dancing. Don't remember the other's names.


My first object, a Lotus Notes 8 bench. Do you want it? Contact Nicolas Paravane in SL



Yup, there was beer too...


Technorati tags:
, , ,


June 03, 2007

I love my Weber!

Yesterday I bought a new outdoor grill, a Weber One-Touch Platinum Charcoal Grill, Black. And today I'm a very happy man :-)

When doing the research for which grill I should buy, many people have been into the buy-and-throw philosphy - buy a cheap grill for like 200 SEK (approximately 30 US Dollars) in the spring, throw it when the autumn comes and then buy a new one for the next spring. I am not very fond of that. I think it's better to buy something really good that will last for many years.
And if you take care of it I think it will last, especially if it's a Weber since it won't rust standing outdoors.

Take a look at the product features and technical data here. There is a warranty for 10 years on most parts.







Technorati tags:
, ,


June 02, 2007

Nordic Lotus meeting in Second Life

On tuesday, 5th of June 2007 at 9PM GMT+01 there will be a Nordic Lotus meeting held in Second Life. It is Thomas Adrian, hosting Notessidan.se, who has taken the initiative to this independent event.
Anybody with a great interest in Lotus Notes/Domino and/or other Lotus software are welcome to exchange their thoughts and idéas and to take advantage of each other's knowledge and burning desire to share their competence and perhaps to make new contacts.

The agenda for the first meeting is:

  • Questions for people new to Second Life
  • Tip from everybody on places, activities and what can be done in SL
  • Open discussions on IBM/Lotus software
We will meet in the IBM Sandbox. Take a look at the community event on secondlife.com about this to easier find your way.

If you're new to Second Life or just want to know a little more there are several tutorials:
Please feel free to contact me when you get there if you need any help. My Second Life name is 'Nicolas Paravane' and Thomas Adrian's is 'notessidan Yao'.
See you there :-)

Technorati tags:
, , ,


May 25, 2007

Short summary of Swedish g33k date

Yesterday, May 24th 2007, the first g33k date took off at the premises of Ekakan, who acted as host, with an impressive collection of talented Notes/Domino developers and celebrities present.


It was very successful and I am quite sure everybody got something valuable out of it. Johan Känngård and Joachim Dagerot were keynote speakers and talked about different subjects, mostly in some way connected to the web. Johan Känngård has written a good summary about the event and also put his presentation and examples available for download on his blog. Joachim Dagerot has also posted a blog entry which is a follow-up on a subject that came up yesterday.

Next occassion will probably be after the summer in september or something like that. I guess it depends on who's hosting it and the interest and availability of everybody.

Here's a picture of our talented fellow N/D bloggers/developers and keynote speakers from yesterdays success.


Johan Känngård & Joachim Dagerot


Joachim Dagerot


Technorati tags:
, , ,


May 23, 2007

Flickrvision

I read on Next Generation Internet about Flickrvision. It's a really cool service accesible directly on the website which let's you watch as images are uploaded to Flickr in real time. Take a look at a subwindow below or click on the link for the site.



Technorati tags:
, ,


May 09, 2007

IBM Education Assistant for Lotus Software

Here's a tip if you need another learning resource.

IBM Education Assistant for Lotus Software provides help for Lotus Domino, Lotus Notes, Lotus Expeditor, Lotus Sametime and WebSphere Portal for different versions. The help is divided into text, video and audio.



Technorati tags:
, , , , ,


Widgets are really cool!

I found the Yahoo Widgets Engine when I was browsing IBM's community site IBM Web Innovation, which itself is pretty cool. Find more similar spaces or create your own if you miss one at developerwork community topic spaces.

Downloading the Yahoo Widget Engine will grant you access to to download around 4000 different widgets. I just started play with it and some useful and/or funny ones are widgets for displaying:

  • Wheather
  • Flickr photos
  • Notes mail
  • Clock
  • Recipes
  • IBM information like news, stocks, promotions, general search or the employee directory. The last one is pretty handy. It actually gives me information like email, phone number, city and country for any IBM employee in the world (not Sam Palisano though... hmm..). I can recall several times when I wanted contact information and had some trouble finding it.

    Here's a screenshot from the IBM Widget showing search results from the Employee Directory. This one is public available information of Ed Brill's contact information.



  • radio
  • gmail
  • itunes player
  • del.icio.us
  • and much more
Just click on the widget in the widget bar and a window will open the actual widget, like the IBM widget in the screenshot above. I really enjoy web-based widgets to put on your blog and so on and desktop widgets have not really been working for me earlier. I'll give it a shot now and see if it becomes useful to me.

More widgets here for websites and desktops (thank's Alex).

Technorati tags:
, , ,


May 06, 2007

Learn Java with Head First Java

While the platform for Lotus Notes, Domino and Sametime applications changes, the need of understanding Java grows bigger. Although IBM is designing their new development tools to minimize the need for new learning curves when it comes to development I still believe that you as a Domino developer (and Domino administrator) is better off understanding what Java is, how it works and it would certainly not hurt learning how to develop some in it as well.

I made the decision to learn Java a few months ago and to actually do it this time, and really good - you know to be a kick-ass Java developer (to almost quote Bob Balaban). I have studied/tried quite a lot of different programming languages before and looked at both C++ and Java (both object oriented) before but never really gone into the depth of it. But I have tried, several times. I have bought books (read the first chapters before I found something more interesting to do) and read tutorials on Internet and that has helped me to some point of course but when it comes to Java (in my opinion) it's a lot about understanding and a barrier to climb before you get it and fully can enjoy it and really make use of it. But once you have climbed that barrier you just keep going and nothing will stop you. And then it is up to you to decide whether you want to use your understanding of Java in what you do today or if you want to focus more on it and keep learning more like servlets, Java beans, JSP and whatever is out there.

What made me climb the barrier (I think I really got over it a couple of weeks ago) is an excellent book that I have to tell you about, it's called Head First Java and covers Java 5.0. Give it a chance although it at first almost feels you're going back to the early school years when briefly looking through it. It is a lot of pictures and a lot of explaining but that's what's so good about it. When you have read the first chapter you should be as excited as I am. And you don't have to be a newbie, in fact you shouldn't. You should have some basic knowledge about programming to get the most out of it I think. If you do, go ahead, you're gonna love it.

Here's a sample from Google Books (thanx Thomas).

The authors of the book has a blog as well called "Creating passionate users". And there are a few more books written in the same manners, take a look at them here.

Some Java-resources:



Technorati tags:
, , , , ,


Domino Best Practices Guides

Lotus Support has started blogging and in their second blog post was a table of the currently published best practices guides which (although it's a lot of reading) is a must reading for admin guys. Haven't read them all but I will.

If you in the last couple of months already have seen some of them be aware of that some more were published in the beginning of May and there are even more to come. Keep on eye on the Notes from Lotus Support blog for updates.

Technorati tags:
, , , ,


May 03, 2007

New notes.ini settings page

I read on Domino Blog that there's a new page on developerWorks with public notes.ini variables with descriptions, examples and comments.

-- UPDATE --
View of new notes.ini variables from the Notes/Domino Fix List



-- UPDATE --
I posted a comment on Domino Blog where I was pointing out that the list seems kind of small especially when compared to another Notes.ini list called the DrCC Notes.INI Reference. Amy Smith replied:

When the notes.ini info was in the admin help, we could only update it at major releases. It was hard to keep up with all the new .inis being created. Now, when a new Notes.ini variable is created, or an existing one changes or is rendered obsolete, that info can be updated on devWorks fairly quickly. So you can expect to see the .ini list on devWorks increase soon.

Currently, the existing Notes.ini documentation from 7.0 has been migrated to devWorks. We are now in the process of gathering new and updated notes.ini info for Domino 8. We plan on updating the on-line info every two weeks for the time being. That will probably slow down to once monthly after Domino 8 ships.



Technorati tags:
, ,


May 01, 2007

Maintain your web 2.0 collection with Wink

Wink markets themselves as the people search engine. This social search engine searches MySpace, Bebo, LinkedIn, Live Space, Friendster, Twitter and the web which right now according to wink means over 166,845,664 people.

Besides this which is both interesting and useful you can register for an account and state your different web2.0 accounts you have on the web. They have listed lots of them and if something isn't there you can state your own url.

After making some adjustments I copied a script, which can be both HTML and Flash, and put a wink widget on my blog. Whenever I make a change on wink it is reflected in the widget.

I can see three obvious and good ways of using this; the widget to put on the blog, a place which keeps track of all my different accounts and a people search engine.

Technorati tags:
, , , ,


April 25, 2007

Charity fund raising for children with cancer in Second Life

On April 28th at 1900 hours GMT+01:00 there will be a charity fund raising held in Second Life by the Children's cancer fund and Second Sweden.

It is the first swedish charity fund raising gala in Second Life and artists, both from real-life as well as established artists in SL like Natalie Moody (Therese Åhs) will be performing to raise money for children with cancer.



I'm sure this will be a really great evening, be sure to be there and buy a teddy bear and/or give some money.

Read more at Barncancerfonden's homepage. There's been an interview in swedish television about this as well, take a look at it on youTube.
Here is the location for the gala.

Technorati tags:
, , , , ,