onsdag 27 oktober 2010

HTML 5 Canvas and .toDataURL

the Canvas object in HTML 5 contains alot of great things
one of the interesting things is that it has a implemented method to get the data inside the canvas as a base64 encoded string.

So if you would
var img1=new Image();
img1.src="Image1.jpeg";
var img2=new Image();
img2.src="Image2.jpeg";
var canvas=document.createElement('canvas');
canvas.width=300;
canvas.height=300;
var canvas2d=canvas.getContext("2d");
canvas2d.drawImage(img1,0,0);
canvas2d.drawImage(img2,100,100);
var data=canvas.toDataURL();

Data will now contain a png image with both the images.
Encoded using base64 easy to send using ajax or store in a field.
You can draw images, plot dots, draw lines, boxes.

There is some online painting sites that already is using this.


Enhanced by Zemanta

söndag 3 oktober 2010

Can't imagine that any other system is this simple when upgrading

Upgrading from Domino 8.5.1 with Traveler to 8.5.2 with traveler no problem
and it takes no time.

1. I copied the installation files to the server 3 files

Domino 8.5.2
Traveler 8.5.2
Domino HF for SMTP

2. Shutdown the domino services

3. Started installation files for Domino

4. Started installation file for Hotfix

5. Started installation for Traveler

6. Started domino services again

Total time of upgrade max 15 minutes, bet that Microsoft if you can!!!

Of course we need to upgrade mailboxes but that can be done later no need for that
directly.
And there might be some other problems with your server but this server was straight forward no problem ;-)

Enhanced by Zemanta

fredag 17 september 2010

XPages Event parameters solution found

It's very interesting that event parameters retrieval is totally undocumented and there is no articles / blogentries about it on the web. You should know that I have been searching and trying to get the solution thru the community but with no luck.

But Now I have found the solution

When triggering a onClick event the this object will contain a XspEventHandler and
this object has a method called getParameters() this method will return a Java ArrayList.
The arraylist will contain the parameters with name and value.
So to print all parameters you can walk thru them like this

var value=this.getParameters();
var tmp="";
for(x=0;x<value.size();x++){
tmp+=value.get(x).getName()+" - "+value.get(x).getValue();
}

tmp will then contain a string will all the names and data of the event parameters for you to display.

Check out my article in the application development wiki

fredag 10 september 2010

Anybody know how event parameters work in XPages

I have been searching for information on how to retrieve them but with no luck.
It's probably dead simple but I don't know how. If you do please send me and comment ;-)

The solution


tisdag 31 augusti 2010

Inbox Rules engine could be used for more

Lotus competencesImage via WikipediaThis if the rules engine of Lotus Notes could be used for more than sorting emails into folders.

When working in the inbox you would like it to help you. Imagine if you automatically could create tasks,calendar appointments from certain incoming emails.

Perhaps create documents in the notebook template to store interesting newsletters.
a more intelligent inbox that can automatically do stuff for you and just leave a summary in the inbox for you like the out of office summary would be a great help to everybody that receives alot of emails.

Googles approach with the priority inbox, that sorts the emails with different priority depending how often you send / read emails to a recipient is also very interesting but that will probably only solve a little bit of the problem.
Enhanced by Zemanta

måndag 30 augusti 2010

Agent alias revisited in 8.5.2 Gold

As I wrote before about having aliases on agents that doesn't have brackets around them.
Although the agent itself is only shown in the agent list, in 8.5.1 this did break the agent name.
And in earlier code drops of 8.5.2 this was an problem too. But as I wrote in my Earlier post I was confident that this would be solved until we reach GOLD of 8.5.2 and it did so if you have used agents that has a name like this "(my agent)" and an alias like this "my agent" this works really well now in 8.5.2.


Enhanced by Zemanta

torsdag 5 augusti 2010