Отправляет email-рассылки с помощью сервиса Sendsay

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

  Все выпуски  

Бюллетень "Lotus Notes CodeStore" No 78 от 2008-09-19


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

рассылка:выпускархивлентаблогсайт

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

comp.soft.prog.lotuscodesrore

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

Sub Initialize Dim I As Long Dim ExportedFields List As Long
Dim NombreExportedFields As Long Const NomCSVFile = "C:\TEMP\Export.CSV" Dim CSVFile As Long
CSVFile = Freefile() Open NomCSVFile For Output Access Write As CSVFile Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments I=1
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing) And (I<50) Forall ANotesItem In Doc.Items
If Not Iselement( ExportedFields( ANotesItem.Name ) ) Then
NombreExportedFields = NombreExportedFields + 1
ExportedFields( ANotesItem.Name ) = NombreExportedFields
End If
End Forall I = I +1
Set doc = collection.GetNextDocument(doc)
Wend Redim LigneOut( 1 To NombreExportedFields) As String Forall UC In ExportedFields
LigneOut( UC ) = Listtag( UC )
End Forall Call FlushLineOut( CSVFile , LigneOut ) Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing) Forall ANotesItem In Doc.Items
If Not Iselement( ExportedFields( ANotesItem.Name ) ) Then Error 9995
LigneOut( ExportedFields( ANotesItem.Name ) ) = ANotesItem.Values(0)
End Forall Call FlushLineOut( CSVFile , LigneOut ) Call session.UpdateProcessedDoc( doc )
Set doc = collection.GetNextDocument(doc)
Wend Close #CSVFile End Sub Sub FlushLineOut( FileNum As Long , LigneOut() As String ) Dim i As Long For I = 1 To Ubound( LigneOut ) If I>1 Then Print #FileNum, |;| ; Print #FileNum, |"| + LigneOut( I ) + |"| ; LigneOut( I ) = "" Next I Print #FileNum, "" End Sub
Dim FileNum As Long
Dim LogError As String Sub Initialize Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing) Call InitExport( Doc.ListName(0) )
Call GroupExport( Doc.ListName(0) )
Call TerminateExport( ) Set doc = collection.GetNextDocument(doc)
Wend
print LogError
End Sub Sub TerminateExport( ) Close #FileNum End Sub Sub GroupExport( GroupName As String ) Dim Session As New NotesSession
Dim DB As NotesDatabase
Set DB = Session.CurrentDatabase Dim AllUsersView As NotesView
Set AllUsersView = DB.GetView( "($Users)" ) Dim Doc As NotesDocument
Set Doc = AllUsersView.GetDocumentByKey( GroupName , True ) If Doc Is Nothing Then
LogError = LogError + " Groupe/User introuvable : " + GroupName + Chr$(10)
Exit Sub
End If If Doc.Type(0) = "Group" Then Forall OneMember In Doc.Members
GroupExport( OneMember )
End Forall Elseif Doc.Type(0) = "Person" Then Print #FileNum, |"| + Doc.FullName(0) + |"| End If End Sub Sub InitExport( GroupName As String ) FileNum = Freefile() Open "c:\TEMP\Export CSV of " + GroupName + ".CSV" For Output Access Write As FileNum End Sub
'---: Option Declare ' ' FieldName TAB Length TAB Position ' Const FormatFileInput=|
USR-IDAZE 8 36
USR-MAZEAT 7 44
USR-TIAZETRE 4 51
USR-NAZEOM 25 55 | ' ' FieldName TAB Length TAB Position ' Const FormatFileOutput=|
USR-IDAZE 8 501
USR-MAZEAT 7 509
USR-TIAZETRE 4 516
USR-NAZEOM 25 520 | Const FileNameInput = "IN.TXT"
Const FileNameOutput = "OUT.TXT" Type LineFileFormat
Name As String
Length As Long
Position As Long
End Type Type FormatConv
In As LineFileFormat
Out As LineFileFormat
End Type Dim LineOutTotalLength As Long Sub Initialize Dim FormatConvertion List As FormatConv
Dim V As Variant
Dim FormatFile_Tmp As Variant
Dim LineFileFormat_Tmp As LineFileFormat ' IN
FormatFile_Tmp = Split( FormatFileInput , Chr$(10) )
Forall Champ In FormatFile_Tmp
V = Split( Champ , Chr$( 9 ) )
If Trim$( V(0) ) <> "" Then
LineFileFormat_Tmp.Name = Trim$( V( 0 ) )
LineFileFormat_Tmp.Length = Val( V( 1 ) )
LineFileFormat_Tmp.Position = Val( V( 2 ) )
FormatConvertion( LineFileFormat_Tmp.Name ).IN = LineFileFormat_Tmp
End If
End Forall ' OUT
FormatFile_Tmp = Split( FormatFileOutput , Chr$(10) )
Forall Champ In FormatFile_Tmp
V = Split( Champ , Chr$( 9 ) )
If Trim$( V(0) ) <> "" Then
LineFileFormat_Tmp.Name = Trim$( V( 0 ) )
LineFileFormat_Tmp.Length = Val( V( 1 ) )
LineFileFormat_Tmp.Position = Val( V( 2 ) )
FormatConvertion( LineFileFormat_Tmp.Name ).OUT = LineFileFormat_Tmp
If LineFileFormat_Tmp.Position + LineFileFormat_Tmp.Length > LineOutTotalLength Then LineOutTotalLength = LineFileFormat_Tmp.Position + LineFileFormat_Tmp.Length
End If
End Forall ' ' Format Control ' Forall OneFieldConvertion In FormatConvertion
If OneFieldConvertion.In.Name = "" Then
Print OneFieldConvertion.Out.Name + Chr$(9) + Chr$(9) + " The ouput file do not contains this field"
Elseif OneFieldConvertion.Out.Name = "" Then
Print OneFieldConvertion.In.Name + Chr$(9) + Chr$(9) + " The ouput file do not contains this field"
Elseif OneFieldConvertion.In.Length > OneFieldConvertion.Out.Length Then
Print OneFieldConvertion.In.Name + Chr$(9) + Chr$(9) + " This field size will be reduced to " + Cstr(OneFieldConvertion.Out.Length) + " instead of " + Cstr(OneFieldConvertion.In.Length)
End If
End Forall ' ' Convertion ' Dim FileNumInPut As Long
FileNumInPut = Freefile
Open FileNameInput For Input Access Read As FileNumInPut Dim FileNumOutPut As Long
FileNumOutPut = Freefile
Open FileNameOutput For Output Access Write As FileNumOutPut Dim S As String
Do Until Eof(FileNumInPut)
Line Input #FileNumInPut, S
Print #FileNumOutPut, LineConvert( S , FormatConvertion )
Loop Close #FileNumOutPut
Close #FileNumInPut End Sub Function LineConvert( LineIn As String, FormatConvertion List As FormatConv ) As String Dim S As String Dim LineOut As String
LineOut = Space$( LineOutTotalLength ) Forall AFieldToConvert In FormatConvertion
If (AFieldToConvert.IN.Name <> "") And (AFieldToConvert.OUT.Name <> "") Then
S = Mid$( LineIn , AFieldToConvert.IN.Position , AFieldToConvert.IN.Length )
If Len(S) < AFieldToConvert.OUT.Length Then
S = S + Space$( AFieldToConvert.OUT.Length - Len(S) )
End If
LineOut = Left$( LineOut , AFieldToConvert.OUT.Position-1 ) + Left$( S , AFieldToConvert.OUT.Length ) + Mid$( LineOut , AFieldToConvert.OUT.Position + AFieldToConvert.OUT.Length )
End If
End Forall LineConvert = LineOut End Function
Еще примеры:
Больше кодов на сайтах:

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

Здравствуйте. Сервер Lotus Domino 6.5, пользователи подключаются через WEB.
В Person документе пользователя на админской вклаке устанавливаю галочку в поле "Force user to change Internet Password on next login:". Пользователю при входе предлагается заменить пароль. Он его меняет, но почему-то и по истечению суток остается возможность войти на сервер под старым паролем, подновым к стати тоже. Подскажите пожалуйста что не так делаю?
Начал собирать информацию о лицензировании Lotus Domino, однако часть вопросов все равное остается.

На сегодня есть две схемы лицензирования Lotus Domino. Это полная схема Enterprise и Express для среднего и малого бизнеса.

Enterprise

По этому варианту отдельно покупаются лицензии на сервер, отдельно на рабочие места пользователей.
Программное обеспечение купленное по этому варианту используется без ограничений, в полном объеме.
Lotus Domino Administrator входит в серверную лицензию.

С 25 июля 2006 года компания IBM на свое программное обеспечение ввела новые правила лицензирования серверных лицензий.
Количество лицензий определяется архитектурой и количеством процессоров установленных на сервере. Для одно-двуядерного процессора минимальное количество серверных лицензий составляет 100 штук.
Для уточнения расчета количества лицензий компания IBM предлагает спрециально разработанный инструмент "Value unit calculator". К нему можно обратиться через интернет по ссыле: https://www-112.ibm.com/software/howtobuy/p...ator/vucalc.wss

Средняя цена
Lotus Domino (2 ядра) - 4100 $
Lotus Notes - 160 $
Designer - 900 $

Express
Лицензируются только рабочие мест. Лицензия на сервер НЕ ПОКУПАЕТСЯ. Количество серверов не ограничичено.

Этот вариант имеет следующие ограничения:
- организация ранее не покупала ПО у IBM по программе Passport Advantage;
- в организации работает до 1000 сотрудников;
- нельзя использовать кластер из серверов Домино;
- нельзя использовать партиции на одном компьютере.
- Нет каскадирования адресной книги

Средняя цена
Lotus Domino - бесплатно
Lotus Notes - 151 $
Designer - 900 $
Интересные темы:
Список форумов:

Tips. Советы

How many mistakes can you spot in the HTML below?

<h3>My HTML is well dodgy, innit.</h4>
<p>This is my first paragraph</P>
<p>The second one isn't closed properly!!
<div><p>The third P is in a div that's unclosed. <b><i>Oh no</b></i>!!!</p>

Lots aren't there! Now imagine this is what a user has typed in to a form of a site where you've allowed HTML input. Whether or not you trust the users or even whether they mean to do it you can't expect them to get the syntactic rules of HTML right. Nor can you take the fact that the form uses an editor such as TinyMCE to mean the HTML sent to the server will be valid.

What you need to is have the server sanitise the HTML and make sure it's fit for use. If, as in the example above, a user has added a DIV element and didn't close it, who knows what problems this might cause.

Luckily there's a Java library called XMLUnit that includes a class called TolerantSaxDocumentBuilder which you can pass really bad HTML to and it will, ever so tolerantly, fix all the errors and make sure it's valid.

Here's a demo form where the WQS agent fixes all the problems in the HTML thrown at it. Press the "submit" button and see what happens. Once submitted you can edit the document to check that it did indeed fix all the errors.

Try including your own examples of poor HTML. See if you can break the page layout. If you do then send me the URL of the broken page.

Notice also that the HTML is not only fixed but also altered by the WQS agent. CSS classes are added to the first and last paragraphs, if there are more than one or three paragraphs, respectively. This shows how you can add to the HTML in any way you choose. You can also remove HTML -- any script tags are removed from the demo form.

Code to be released as and when DEXT is ready for download. Scream if you want it sooner!

Click here to post a response

When upgrading to Lotus Notes 8 or Lotus Notes 8.0.1, give your end users the best possible upgrade experience by performing a Smart Upgrade. This tutorial from "Giving your users the complete Notes 8 upgrade experience" gives explains how to successfully roll out a Lotus Notes client upgrade and how to implement a Smart Upgrade.

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

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

Author: Luis Benitez
Tags: lotus connections web2.0 social software computing networking adoption
Idea:
Back in the early 80's, companies had issues adopting computers. In the early 90's, it was email. In the early 2000's it was Instant Messaging. And now we have Social Software.
 
Now that Social Software is the new medium for collaboration we need to help key stakeholders create their own custom strategy for social software adoption within their enterprise.  In order to be successful, they need to understand how to create their own adoption strategy that fits their culture and work environment.
 
 

Author: Luis Benitez
Tags: lotus connections web2.0 social software computing networking adoption
Idea:
Back in the early 80's, companies had issues adopting computers. In the early 90's, it was email. In the early 2000's it was Instant Messaging. And now we have Social Software.
 
Now that Social Software is the new medium for collaboration we need to help key stakeholders create their own custom strategy for social software adoption within their enterprise.  In order to be successful, they need to understand how to create their own adoption strategy that fits their culture and work environment.
 
This session is focused at project managers, business sponsors, and technical experts to help understand the unique business value Lotus Connections can bring to your organization. This workshop also outlines best practices to adopting social software to increase the ROI with Lotus Connections.  The session will share success stories from other customers as well as lessons learned from customers where adoption was not too successful.  Finally, in this session we'll cover what IBM has done to promote the use and adoption of social software inside and outside of the firewall.

Author: Karen Coulter
Tags: teamroom
Idea:
When you post a response to a teamroom document there is no way to easily send a link to assignee's.
 
It would be good if the list of original assignees was included in the response document so you could send a link to all, selected assignees or no one.

Author: Henry Newberry
Tags: JavaScript Web 2.0 Domino Applications
Idea:
JavaScript is both a procedural and object oriented language. If we do anything with JavaScript we are using objects, but we may not know it. Classes allow us to create our own objects that can be used repeatedly to simplify and empower our applications. In this session we will design, implement and extend classes that improves the user experience and leverages some interesting features of Domino.
 
Why:
Notes and Domino developers are at various levels of comfort with the use of classes in LotusScript and JavaScript. This session will help them get over the hump of planning and implementing and extending a class that they can then use throughout their applications.

Author: Henry Newberry
Tags: Lotusphere Languages best-practices
Idea:
Increasingly, clients are demanding that new applications are able to adapt themselves to users' language preferences. Unfortunately, the tools to make this easy to do are pretty much non-existant. This session will show you an approach to build Domino web applications able to sense users' browser settings and respond with pages in each user's own language. Included will be details of a strategy that is easy to implement and requires minimal additional development. The session will include discussion about trade-offs and potential design issues to take into account as well as demonstrating several sophisticated implementations of the basic concept.
 
.Among larger organizations, internationalization is a hot-button issue. Unfortunately, the products out there (including, I am sorry to say, the Global Workbench) do not really fulfill the need appropriately. This session will introduce, explain, and then demonstrate a way for web developers to take matters into their own hands and build mult-lingual Domino applications...today.
 
Probable presenters: Scott Good and Henry Newberry

Author: Ritch Carroll
Tags: VMware virtualization
Idea:
With budget pressures and service delivery requirements at an all time high, how does IT serve its customers better with less cost? Virtualize. Domino server virtualization with VMware ESX can significantly decrease your actual hardware cost by reducing the number of physical servers in your environment that you have to maintain while at the same time increasing reliability, disaster recovery potential and performance. Domino and VMware are a perfect match in any environment.
 
You could manage all of your virtualized Domino servers from one place with VirtualCenter. No need to go touch the hardware or find it in the rack. Need to reboot? No need to hit a power button, do it virtually. Need to bring another server online? Clone it from another one in no time. Need to recover a crashed server? You can build out a new O/S in less than 5 minutes. Need to patch one of your virtual hosts that a Domino server sits on? Move it to its cluster partner with no downtime. Domino server low on memory resources? Give it more on the fly. Need to add a processor to a Domino server that’s overloaded? Add it and one reboot it’s done.

We will show you how the solution is architected at our client sites to give them almost 100% availability and significantly decreased hardware, licensing and datacenter cost.

Author: Rainer Brandl
Tags: notes browser link
Idea:
Hi all,
 
wouldn´t it be nice to have the possibility to send a link from the embedded browser directly without having this done by "copy / paste"
 
Rainer

Author: Scott Cochrane
Tags: field type-ahead
Idea:
I think there are similar ideas for this but I'm not sure its totally covered....
 
Basically when you use the type-ahead on the Notes 8 To email field - you find it very useful very quickly.
 
So it'd be nice to have something similar for standard notes dialog list and combo fields.
 
I know in the dialog list field you at least get the first matching option - but getting a list of matching options in a drop down would be sweet.
 
 
In fact if I was to enable it on any field it would be the dialog list field.
 
Now maybe this is an option via the web with XPages - I don't know.  But have it work on the Notes client and across the web would be excellent.

Author: Handly Cameron
Tags: connections atom rss feed delicious
Idea:
Provide the ability to add a RSS/ATOM feed to Dogear.  New links in the feed would be added to Dogear, including propagation to the Home Page, Communities, Activities, watch lists, etc.
 
Why this would help:  Users of services such as Delicious or Mag.nolia would be able bring in their links from these external services and share them with their internal community.  Communities has a similar feature to add feeds, but it is hard for users to discover the links there.  Running these links through the normal Dogear feed, including showing up on the home page, adding to Communities, Activities, etc. would be very powerful.
 
Known issue: This would be very helpful for wiring link sites together, but could be dangerous if someone linked a news feed into Dogear as the flood of information would dilute the value of specific links choosen by users.  Proper controls and admin would be needed.

Author: Greg Walrath
Tags: Administration web
Idea:
I've been wanting to come up with a good session idea for years, and I've realized recently that I don't see a lot of sessions strictly on using Domino as a web server. Plenty of stuff for developers, but nothing on the admin side. As someone who's used the Domino web server since it was code-named 'Domino', I'd like to bring my years of experience as a Domino web admin and cover all the basics as well as some advanced stuff:
 
Basic setup
Configuration options
SSL (it's easier than you think!)
Load-balancers
Clustering & Replication
Performance considersations (view & full-text indices)
Hardware considerations
External web servers (e.g., Apache)
Managing design updates
Static vs. Dynamic content
 
Whaddyathink?

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

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

Your Domino server is crashing at startup when it attempts to create and map memory.
Error: "None of the components of the proposed new name are different than their old values" when renaming user's common name using AdminP.
The Lotus Domino server hangs during a Lotus Enterprise Integration (LEI) job activity. The semaphore debug shows that any job that needs to allocate memory is waiting for semaphore 0x0142. However, there is no holder for semaphore 0x0142.
Beginning with Domino 8, the Web Server Plugin for WebSphere Application Server no longer ships with the Domino kit
When launching the Notes client from a shortcut, one of the following errors occurs: "<path> is not inaccessible. This folder was moved or removed", or "The item 'notes.exe' that this shortcut refers to has been changed or moved so this short cut will no longer work properly".
Your Lotus Domino server was not added as a Windows service when it was installed. How do you add it after the installation?
Attempts to access a new Lotus Domino server fail with the following error: "Unable to find path to server."
A roaming user has lost his/her password. Normally, the Administrator would use the ID recovery feature to recover the users ID file. Because a user is roaming and their ID file can be potentially stored within their Personal Address Book on the designated roaming server, this goal may not be easily achieved for this user. This technote describes how The only way to recover this user's password would be by using the ID recovery option and recover their ID, then assign it a new password. The Notes Admin
This technote describes how to create the Directory Catalog database and configure the Directory Catalog server.
Также почитатай:
Найти документацию можно на сайтах:

В избранное