Бюллетень "Lotus Notes CodeStore"

  Все выпуски  

Pushing policy settings to the client for updating notes.ini and Eclipse preference settings

Рассылку ведет: Программист на Lotus NotesLotus CoderВыпуск No 205 от 2009-07-15
рассылка о программировании на Lotus Notes/Domino
Обсуждения на форумах, блогах. Примеры программного кода на LotusScript,@formula, Java


Бюллетень "Lotus Notes CodeStore" Выпуск 13 от 21.04.2008


CodeStore. Примеры кодов

This Lotusscript class is using the Google REST API for geocoding an address. You simply instantiate the class by passing the address broken down into four arguments (street, city, state, zip). If you lack data, pass an empty string. Note: The code is currently written for US addresses. The class will submit the address to Google and get information back. The class exposes the same information you sent (street, city, state and zip) as well as latitude and longitude and "accuracy", a number describing how accurate the latitude/longitude is (street level, intersection, city, etc). The class can be used not only to retrieve the latitude and longitude for a location, but also to verify that a particular address exists, or look up the zip code based on the street, city and state. Simply take the code in GeoCode.txt and paste it into a (new) script library. I call it Class.GeoCode. Then you can use it everywhere you like. I am working on an updated/expanded version that will let you generate KML data for Google Maps/Google Earth as well.
Еще примеры:
Больше кодов на сайтах:

Форумы.Свежи темы и обсуждения

Или как вариант, удалить письмо (если оно не дошло) с специализированных почтовых ящиков сервера (mail1(2).box).
Думаю ковырять в сторону MTU надо.
В ACL почтовой базы запрети удаление писем.
А есть ли способы проверки сессия устанавливается с компрессией или без? (например Server-Client)
Люди добрые! Сами мы не местные...
Поможите!!! smile.gif
Возможно плохо искал - не нашел. Извиняйте. sad.gif
Вопрос вот в чем. При отправке письма указываем внешнего адресата и кого-нибудь внутреннего (например, начальника) ставим в копию. Получается примерно так:
КОМУ: user2@mail.ru
КОПИЯ: user1/Org/ru
Внешний адресат хочет отправить ОТВЕТ ВСЕМ, т.е. по логике и отправитель и user1 должны получить письма. Но! До адресата(user2) письмо доходит с лотусовым адресом юзера1 т.е. user1/Org/ru который по честному копируется в поле КОПИЯ при ответе и соответственно ничего не отправляется.
Начальство бьет копытом...
Эта шняга стала проявляться после перетаскивания сервака с 6.5.5 на 8.5. Назад пререехать пока нет никакой возможности, а решить надо.
сейчас настройки стоят такие:

Основные для маршрутизатора и SMTP
Число почтовых ящиков: 3
Использование SMTP для отправки сообщений во внешние домены Интернета: ВКЛ.
Разрешается использование SMTP в локальном домене Интернета: ВЫКЛ.
Доступность серверов локального домена Notes для SMTP по TCP/IP: Всегда
Просмотр адреса: Полное имя, затем локальная часть
Исчерпывающий поиск: ВКЛ.
Узел передачи сообщений, исходящих из локального домена Интернета:
Метод аутентификации, используемый при отправке сообщений хосту передачи: ВЫКЛ.

Что делать?

Смарт-узел локального домена Интернета:
Использование смарт-узла локального домена Интернета для всех адресатов локального домена Интернета: ВЫКЛ.
Поиск имени узла: Динамический, затем локальный
В ACL почтовой базы запрети удаление писем.
Или как вариант, удалить письмо (если оно не дошло) с специализированных почтовых ящиков сервера (mail1(2).box).
А есть ли способы проверки сессия устанавливается с компрессией или без? (например Server-Client)
Думаю ковырять в сторону MTU надо.
И еще пара вопросов.
Интересные темы:
Список форумов:

Tips. Советы

This is a new whitepaper from Kathleen B Murray describing search forms and how to use them, including information on the search syntax supported, ACLs, and custom fields.

Read | Permalink

Like having a team of consultants by your side -- ones who have all the answers and never make mistakes -- THE VIEW gives you immediate access to field-tested instruction, guidance, and best practices from the brightest Lotus professionals around.

See the new instruction, advice, and best practices added to THE VIEW this week.

Andre Guirard asks if DXL Exporter should give an error and refuse to export design elements if (a) the user has less than Designer access, and/or (b) the design of the application is hidden then provides us with his answer.

Read | Permalink
First SNAPPS released PandaBear for end users. Now they introduce Flippr for Quickr admins. Rob Novak provides a quick description of Flippr and links so you can download your copy.

Read | Permalink
Dave Hay was creating some DB2 databases under Linux using a SQL script. Everything seemed fine until... After reading back through the script he found a problem in the syntax.

Read | Permalink

Try a free course at www.tlcc.com/dompower8

Vladislavs Tatarincevs has seen a few servers crash recently with a specific call stack message. He's found that downgrading Tivoli seems to fix the problem.

Read | Permalink
Andy Donaldson didn't want to hold back on his R8 client rollout. So he's rolled out the integrated Sametime client with all the functions of the stand-alone Sametime client enabled. He lists the steps you need to take.

Read | Permalink

Mark Hughes has found one way of coding rounded corners in Xpages for IE8 but he doesn't like it. He's wondering if you've found a better way of doing this.

Read | Permalink
Julian Buss needs to create a multi-language login form. He's started from the default DomCfg.nsf but is running into problems and wants to know if anyone else has succeeded in creating a multi-language screen.

Read | Permalink
Ed Brill has posted a 4-minute video of Program Director Krista Hiltz Kahn talking about the release of Alloy, which integrates Lotus Notes with SAP, at the recent SAPphire convention.

Read | Permalink

Part of the Gears work I've been doing involved generating a random string to use as a "Sync ID" for a device. The server then knows where data has been taken offline to. It can then decide whether to allow it be either taken down to or sent back from a device with a different Sync ID.

This worked well and I was happy that the Sync ID format I'd come up with was suitably random. Then I happened to read Google's advice on the matter and noticed they recommend using GUIDs. This got me interested, so I read more on Wikipedia, where they say of their uniqueness:

... consider the observable universe, which contains about 5x1022 stars; every star could then have 6.8x1015 unique GUIDs.

That's the kind of geeky over-the-topness I love. Not just that it was over the top but also that they look so much more professional than some random string. Where the Sync IDs used to look something like this:


Now they look like:


Makes no difference to anybody but me really, but I like to be happy with the work I've done, no matter if other people will every appreciate the details or not.

Generating a UUID

Generating a GUID (a variant of a UUID) was easy.  I just did a quick Google and and soon found this simple bit of JavaScript. Once pasted in to my JavaScript file it worked straight away. Job done.

What niggled me was that I didn't understand what the code was doing and I don't like to just paste in any old code off the Google without really knowing what it's doing.

The logic of the code was simple -- perform a loop 36 times and build a string of random "hex" characters (0 to 9 and A to F), with a dash ("-") here and there. What had me perplexed was the following line which chose the character to insert:

uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r & 0xf];

In particular it was the single pipe (|) and single ampersand (&) that through me. Not to mention the odd-looking 0xf and stuff.

I've been coding in JavaScript for 10 years or more now and am used to using || and && in my code, but I'd never seen a pipe or a ampersand used in anything other than a pair.

After reaching for my copy of O'Reilly's JavaScript Pocket Guide, I soon found out that their singular use was as an a "bitwise operator" and after reading this Mozilla Developer Center page (a couple of times) it all started to make some kind of sense.

If like me of last week you don't just don't get it, then it's probably worth me writing a quick layman's guide.

A Quick Guide To Binary Counting

Here's a table with the numbers 1 to 9 in binary form:

Number Binary Equates To
1 0001 0+0+0+1
2 0010 0+0+2+0
3 0011 0+0+2+1
4 0100 0+4+0+0
5 0101 0+4+0+1
6 0110 0+4+2+0
7 0111 0+4+2+1
8 1000 8+0+0+0
9 1001 8+0+0+1

Given any binary string you can convert it to a real number by working from the right-most "bit" (a 1 or a 0) and working towards the left. If the first bit is a 1 then you add one (to zero at this point, so you have 1). If the bit to the left of the first bit is a 1 you add 2 (now you have 3). If the bit to the left of that bit is 1 then you add 4 (now you have 7). This carries on. Notice each time you move one bit to the left the number you add doubles.

Bitwise Operations

Doing bitwise operations simply means you put the binary form of two numbers next to each other and compare the bits in each position of each binary string. For example, let's take the bitwise operation (5 | 2). This is a "bitwise or" and means we compare the bits in each number and if either of them are a 1 then we put a 1 in the same position in the resulting binary number. Otherwise we use a 0 in that position.

Here's an example of a bitwise Or operation.

  Number Binary Operation
  5 0101 |
  2 0010  
Result 7 0111  

Now let's look at a "Bitwise And" comparison of two numbers. In this case the resulting binary only has a 1 in each position where both the binary numbers we're inspecting also have a 1.

For example:

  Number Binary Operation
  5 0101 &
  2 0010  
Result 0 0000  

So, 5 | 2 = 7 whereas 5 & 2 = 0. Hope that makes sense?

Back to the JavaScript

Let's look again at the JavaScript that had me perplexed:

uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r & 0xf];

The other thing which threw me was the hex number format. Although it looked familiar it took a while to work out that 0x3 is just another way (hex notation) of writing the number 3. Same goes for 0x8 being 8. While 0xf is 15, which is 00001111 in binary (8+4+2+1).  

With this knowledge I was ready to port the code.

Porting to LotusScript

Reproducing the logic of the ifs and for loops from JavaScript to LotusScript didn't take long. What took me some time was working out how to represent hex numbers in LotusScript. After a while I worked it out and this line of code of JavaScript:

uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r & 0xf];

Became this LotusScript:

If i=20 Then uuid(i) = chars( ( r And &H3 ) Or &H8 )
Else uuid(i) = chars( r And &HF )
End If

The LotusScript works well and you can see a demo of it in use here. If you want a copy of the code before I make a new version of DEXT available then here's a LotusScript file with it.

Happy Now?

Although I had now ported the code and felt happier that I understood what it was doing I still had no idea why it was doing it!

Even with my new-found knowledge of Bitwise operators I still didn't know why it was comparing with 3 and then 9 for the 20th character in the string. Even after a glance at the spec it made no sense. That's the point where I decided I didn't need to go to that level and stopped worrying about it. Although, if anybody can enlighten me...

Something else I didn't get was why the author of the JavaScript was doing a Bitwise And comparison with 15 (1111) as, from what I could see, any hex number less than 16 when compared with 15 is always just itself! e.g: 7 & 15 = 15.

The other part of the JavaScript I didn't get was why it did a "bitwise or" of the random number generated with 0, like so:

r = 0 | rnd()*16;

A "bitwise or" with 0 always just returns the number being compared with it. I can only guess that it acts like a Round() function and removes the decimal part, which can't exist in the resulting binary number. Anybody?


Whether you need to use GUIDs in your LotusScript or not or even if you ever need to use other random strings of any length, hopefully, like me, you'll have learnt something if you've read this far? Even if all you've learnt it that Jake doesn't know the first thing about Computer Science...

Click here to post a response

Еще советы:
Смотри советы на сайтах:

Блоги. Что обсуждают и пишут

Author: Jan Schulz
Tags: task calendar contacts API
To programmaticaly add a todo item, a callendar item or something is a big challange, even if you know the scriptlibs in the mailfile. Please add a api (either as a build in or as a template to inherit in my app) to work with calendar items, task and contacts, so that adding or manipulating them becomes easy. It should be available in LS and in xPages.

Author: Jan Schulz
Tags: task calendar contacts API
To programmaticaly add a todo item, a calendar item or contact is a big challange, even if you know the scriptlibs in the mailfile. Please add a api (either as a build in or as a template to inherit in my app) to work with calendar items, task and contacts, so that adding or manipulating them becomes easy. It should be available in LS and in xPages.

Author: Jan Schulz
Tags: session timeout
When the session timeout happens, you get error messages. Please don't display a error message but a small login window and then submit the comment/vote.
Also, please add a comment textarea even when not loged in and just show this "popup" when clicking submit.
What should not happen is, that you loose your comment, vote or current idea when the session timout happens.

Author: Yancy Lent
Tags: ctrl-t browser
This would be simular to Ctrl-M which opens a new mail message when you're in the Notes client and simular to IE, FF and other browsers that allow for new tab creation.

We need to up both the quantity and quality of the posts on the OpenNTF blog, and whilst we try and keep up to date with all new projects, new releases etc via the OpenNTF twitter channel, we need to do more.  So we want to help you publicize your ...
Author: Patrick Kwinten
Tags: adobe flash object embedded
my 'rich client' does not seem to be so rich. i guess (adobe) flash has become quiet a standard for the web. why not make it a standard object that can be embedded for the Notes client?

Author: Karl-Henry Martinsson
Tags: sametime notes client
Allow more than one Sametime server to be listed in the location document.
I might want to be connected to both the bleedyellow server and my company server.
Perhaps have some kind of icon/categorization that show what server a particular user is on.

Еще записи:
Интересные блоги специалистов:

Статьи и Документация

You can push custom or supplied notes.ini and/or Eclipse managed settings to Notes users using the Custom Settings tab on Domino desktop policy page.
A Domino 5.0.3 or later server is configured to send SMTP messages outside the local Internet domain via a Sendmail relay server. A secondary Sendmail server is set up to provide failover in the event the primary relay is down. Creating a failover SMTP Connection document that references the secondary Sendmail host does not appear to work. When the primary relay host is unresponsive, the dynamic cost is set to "1," and the message is queued in MAIL.BOX, pending the next scheduled retry interval. This behavi
Resource Reservation databases (RRDB) based on a 6.x or earlier design are not supported on Domino 7 servers.
You have a compressed Directory catalog and would like to remove unwanted or double entries. How can this be done?
You want to sign design elements related to the Out Of Office (OOO) agent to a specific ID in the Lotus Domino Web Access DWA) release 7 template. What security access is required for this to function properly?
You notice that some views in the Domino Directory are not kept up to date automatically by the directory indexer. Why is this happening?
IBM's recommendations for maintenance to be installed for the Lotus Notes® Traveler product.
You can push custom or supplied notes.ini and/or Eclipse preferences to Notes users using the Custom Settings tab on the Domino desktop policy page.
In IBM® Lotus Notes® 8.5 and IBM Lotus® Expeditor 6.2, the composite application infrastructure has been enriched with a generic application container framework. It comes with a set of components that allow for creating powerful and flexible applications without the need to write a single line of code. This article describes the generic application container framework and provides a step-by-step tutorial to create a composite application using the browser and spreadsheet container components. Weather data, such as average rainfall, is extracted from www.worldclimate.com and visualized in a chart defined in an IBM Lotus Symphony™ spreadsheet.
IBM® Lotus® Forms 3.5 provides support for XML digital signatures (XMLDSig) from W3C XML Signature Syntax and Processing. An XML digital signature for a Lotus Forms document can cover markup for the presentation layer and XML data managed by the XForms markup within the Lotus Forms document. This ability enables the signature to protect the full human context of a contract or agreement between the signing parties.
This article describes how to improve the performance of IBM® Lotus® Quickr™ services for Lotus Domino®.
The following message appears on the Lotus Domino server console: "...TCPEndp_ConvertToNativeSockAddr> Exit Status 0000h". What does this mean?
In Lotus Notes/Lotus Domino, when a group with "Access Control List only" access is listed in the Owner Only restriction field, members of that group receive an error message when trying to book the room to which the owner restrictions apply. No user in the group can book the room or resource.
This document provides download information for IBM Lotus Notes and Domino 8.0.2 Fix Pack 2 (
The IBM Lotus Notes and Domino team hosed an Open Mic call titled "Customizing the Lotus Notes install kit" on Wednesday, June 24th at 10:00 am eastern US time (2:00 pm GMT). This document contains a link to a recording and questions and answers from that session. Note: Answers to additional questions asked will be added to this document as they become available.
Также почитатай:
Найти документацию можно на сайтах:

В избранное